Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Net problems
Date: Thu, 14 May 2015 05:54:24
Message-Id: 201505140654.11319.michaelkintzios@gmail.com
In Reply to: [gentoo-user] Net problems by Meino.Cramer@gmx.de
1 On Thursday 14 May 2015 04:45:38 Meino.Cramer@×××.de wrote:
2 > Hi,
3 >
4 > I have a problem with some kind of a lokal net connection (ethernet
5 > over USB):
6
7 I think that the problem is not network related, but USB rules related.
8 Please see below.
9
10
11 > Current handling is as follows:
12 > I boot my Gentoo-Linux PC, which connects to my Fritz!Box, collect
13 > EMail etc...works fine so far.
14 > Then I connect an embedded system (Arietta G25
15 > www.acmesystems.it/arietta) to the usb port and wait until this
16 > little thing has booted.
17 > On my Linux PC I do the following then (as root):
18 >
19 > ifconfig usb0 192.168.10.1 up
20 > echo 1 >! /proc/sys/net/ipv4/ip_forward
21 > iptables -A FORWARD -i eth1 -j ACCEPT
22 > modprobe ip_tables
23 > modprobe ip_conntrack
24 > iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
25 > ssh -t root@ariettaa abduco -A root
26 >
27 > (I real life I have two Ariettas which I connect to the
28 > PC the same time with two different IP-addresses and two
29 > different USB-ports)
30 >
31 > This connects me finally to the Arietta, which do ethernet over USB.
32 > I put the commands into a script, so not too much hassle here.
33 >
34 > But!
35 > On the Arietta I also installed Gentoo. An update, especially
36 > when it includes gcc can take up to three days (I tried
37 > crosscompilation and some other construction and I am currently
38 > most happiest (sounds a litte too much like 'german english'...;)
39 > with this).
40 > So I first fetch all needed files and then restart the update
41 > and detach from the terminal.
42 >
43 > Now the problem:
44 > When I shutdown the PC, which needs not to run all the time, and
45 > restart it later again I am no longer able to connect to the Arietta
46 > with the steps described above. All needed modules are loaded while
47 > booting the PC and ifplugd is installed on the Arietta.
48 >
49 > Unfortunately I have not found any differences of the USB interface,
50 > which would make it possible to handle the Ariettas via udev.
51
52 Have you used 'udevadm monitor' to check how your USB device is recognised?
53 Each time it will be a different host & target and this is your problem.
54
55
56 > How can I make a reconnect after rebooting my PC possible every time?
57
58 I think that the solution is to create a udev rule which will identify your
59 arietta interface when plugged in the PC and run the necessary script from
60 there on.
61
62 Have a look here for persistent device naming:
63
64 https://wiki.gentoo.org/wiki/Udev
65
66 --
67 Regards,
68 Mick

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Net problems Meino.Cramer@×××.de