public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mick <michaelkintzios@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Net problems
Date: Thu, 14 May 2015 06:53:45 +0100	[thread overview]
Message-ID: <201505140654.11319.michaelkintzios@gmail.com> (raw)
In-Reply-To: <20150514034538.GB4269@solfire>

[-- Attachment #1: Type: Text/Plain, Size: 2477 bytes --]

On Thursday 14 May 2015 04:45:38 Meino.Cramer@gmx.de wrote:
> Hi,
> 
> I have a problem with some kind of a lokal net connection (ethernet
> over USB):

I think that the problem is not network related, but USB rules related.  
Please see below.


> Current handling is as follows:
> I boot my Gentoo-Linux PC, which connects to my Fritz!Box, collect
> EMail etc...works fine so far.
> Then I connect an embedded system (Arietta G25
> www.acmesystems.it/arietta) to the usb port and wait until this
> little thing has booted.
> On my Linux PC I do the following then (as root):
> 
> ifconfig usb0 192.168.10.1 up
> echo 1 >! /proc/sys/net/ipv4/ip_forward
> iptables -A FORWARD -i eth1 -j ACCEPT
> modprobe ip_tables
> modprobe ip_conntrack
> iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
> ssh -t root@ariettaa abduco -A root
> 
> (I real life I have two Ariettas which I connect to the
> PC the same time with two different IP-addresses and two
> different USB-ports)
> 
> This connects me finally to the Arietta, which do ethernet over USB.
> I put the commands into a script, so not too much hassle here.
> 
> But!
> On the Arietta I also installed Gentoo. An update, especially
> when it includes gcc can take up to three days (I tried
> crosscompilation and some other construction and I am currently
> most happiest (sounds a litte too much like 'german english'...;)
> with this).
> So I first fetch all needed files and then restart the update
> and detach from the terminal.
> 
> Now the problem:
> When I shutdown the PC, which needs not to run all the time, and
> restart it later again I am no longer able to connect to the Arietta
> with the steps described above. All needed modules are loaded while
> booting the PC and ifplugd is installed on the Arietta.
> 
> Unfortunately I have not found any differences of the USB interface,
> which would make it possible to handle the Ariettas via udev.

Have you used 'udevadm monitor' to check how your USB device is recognised?  
Each time it will be a different host & target and this is your problem.
 

> How can I make a reconnect after rebooting my PC possible every time?

I think that the solution is to create a udev rule which will identify your 
arietta interface when plugged in the PC and run the necessary script from 
there on.

Have a look here for persistent device naming:

https://wiki.gentoo.org/wiki/Udev

-- 
Regards,
Mick

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-05-14  5:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-14  3:45 [gentoo-user] Net problems Meino.Cramer
2015-05-14  5:53 ` Mick [this message]
2015-05-14  6:34   ` Meino.Cramer
2015-05-15 22:25     ` Mick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201505140654.11319.michaelkintzios@gmail.com \
    --to=michaelkintzios@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox