* confused by netbase/udev
@ 2010-02-09 11:23 Steffen Sledz
2010-02-09 11:59 ` Paul Menzel
2010-02-09 21:14 ` Cliff Brake
0 siblings, 2 replies; 10+ messages in thread
From: Steffen Sledz @ 2010-02-09 11:23 UTC (permalink / raw)
To: openembedded-devel
I'm a bit confused about netbase and udev use im Angstrom.
Here's what i see:
I connect an USB-NIC.
/etc/udev/rules.d/70-persistent-net.rules is created:
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# USB device 0x:0x (MOSCHIP usb-ethernet driver)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:13:3b:04:02:ae", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
But the NIC is not comming up (no ip assigned via DHCP). :(
I disconnect the USB-NIC and reboot.
/etc/udev/rules.d/70-persistent-net.rules still exists with
the mentioned content. Why?
I connect another USB-NIC.
/etc/udev/rules.d/70-persistent-net.rules is extended:
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# USB device 0x:0x (MOSCHIP usb-ethernet driver)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:13:3b:04:02:ae", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
# USB device 0x:0x (pegasus)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:00:e8:00:0f:e0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
This NIC is also not coming up. :(
And for each new NIC another name is created?! :(
And here's what i like to see:
* Connect an USB-NIC should result in an DHCP-configured interface.
* Disconnect the USB-NIC remove all traces from the system.
Hope you can clear the mist in my head.
Steffen
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: confused by netbase/udev
2010-02-09 11:23 confused by netbase/udev Steffen Sledz
@ 2010-02-09 11:59 ` Paul Menzel
2010-02-09 13:18 ` Steffen Sledz
2010-02-09 21:14 ` Cliff Brake
1 sibling, 1 reply; 10+ messages in thread
From: Paul Menzel @ 2010-02-09 11:59 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 1066 bytes --]
Am Dienstag, den 09.02.2010, 12:23 +0100 schrieb Steffen Sledz:
> I'm a bit confused about netbase and udev use im Angstrom.
> Here's what i see:
>
> I connect an USB-NIC.
>
> /etc/udev/rules.d/70-persistent-net.rules is created:
[…]
> And for each new NIC another name is created?! :(
>
> And here's what i like to see:
> * Connect an USB-NIC should result in an DHCP-configured interface.
Do you have it configured somewhere (for example in [2])? If not you can
use a daemon like NetworkManager.
> * Disconnect the USB-NIC remove all traces from the system.
[1] is necessary because (at least under Debian (I cannot verify on
Ångström right now)) you can set certain parameters in [2], i. e. if an
interface should be configured statically or dynamically. You have to
reference those devices with `ethN` (N ∈ ℕ) but without [1] they would
be randomly enumerated. That is why [1] is needed.
[…]
I hope that helps.
Thanks,
Paul
[1] /etc/udev/rules.d/70-persistent-net.rules
[2] /etc/network/interfaces
[-- Attachment #2: Dies ist ein digital signierter Nachrichtenteil --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: confused by netbase/udev
2010-02-09 11:59 ` Paul Menzel
@ 2010-02-09 13:18 ` Steffen Sledz
2010-02-09 13:29 ` Petr Štetiar
0 siblings, 1 reply; 10+ messages in thread
From: Steffen Sledz @ 2010-02-09 13:18 UTC (permalink / raw)
To: openembedded-devel
Paul Menzel wrote:
>> And here's what i like to see:
>> * Connect an USB-NIC should result in an DHCP-configured interface.
>
> Do you have it configured somewhere (for example in [2])? If not you can
> use a daemon like NetworkManager.
> ...
> [2] /etc/network/interfaces
It's the Angstrom standard configuration containing e.g.
# Wired or wireless interfaces
auto eth0
iface eth0 inet dhcp
iface eth1 inet dhcp
But i'm not sure what this part means (especially what means 'auto'
here. Where can i found some documentation about the content of this
config file. The busybox and ifup/ifdown manpages are not very helpful
here. :(
And another problem is the mentioned naming. If every connected
USB-NIC gets a new name i cannot refer to it in this config file.
> I hope that helps.
Just a tiny bit. ;-)
Steffen
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: confused by netbase/udev
2010-02-09 13:18 ` Steffen Sledz
@ 2010-02-09 13:29 ` Petr Štetiar
2010-02-09 13:38 ` Steffen Sledz
2010-02-09 15:38 ` Steffen Sledz
0 siblings, 2 replies; 10+ messages in thread
From: Petr Štetiar @ 2010-02-09 13:29 UTC (permalink / raw)
To: openembedded-devel
Steffen Sledz <sledz@dresearch.de> [2010-02-09 14:18:08]:
> # Wired or wireless interfaces
> auto eth0
> iface eth0 inet dhcp
> iface eth1 inet dhcp
>
> But i'm not sure what this part means (especially what means 'auto'
> here. Where can i found some documentation about the content of this
> config file. The busybox and ifup/ifdown manpages are not very helpful
> here. :(
man 5 interfaces?
Quote:
" lines beginning with the word "auto" are used to identify the physical
interfaces to be brought up when ifup is run with the -a option. (This
option is used by the system boot scripts.) Physical interface names
should follow the word "auto" on the same line. There can be multiple "auto"
stanzas. ifup brings the named interfaces up in the order listed. "
> And another problem is the mentioned naming. If every connected
> USB-NIC gets a new name i cannot refer to it in this config file.
You can get unique name/symlink using udev rule.
-- ynezz
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: confused by netbase/udev
2010-02-09 13:29 ` Petr Štetiar
@ 2010-02-09 13:38 ` Steffen Sledz
2010-02-09 13:47 ` Petr Štetiar
2010-02-09 15:38 ` Steffen Sledz
1 sibling, 1 reply; 10+ messages in thread
From: Steffen Sledz @ 2010-02-09 13:38 UTC (permalink / raw)
To: openembedded-devel
Petr Štetiar wrote:
> man 5 interfaces?
Not at openSUSE. :(
But the internet found it for me. :)
>> And another problem is the mentioned naming. If every connected
>> USB-NIC gets a new name i cannot refer to it in this config file.
>
> You can get unique name/symlink using udev rule.
Do you have short pointer or example for me?
Steffen
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: confused by netbase/udev
2010-02-09 13:38 ` Steffen Sledz
@ 2010-02-09 13:47 ` Petr Štetiar
0 siblings, 0 replies; 10+ messages in thread
From: Petr Štetiar @ 2010-02-09 13:47 UTC (permalink / raw)
To: openembedded-devel
Steffen Sledz <sledz@dresearch.de> [2010-02-09 14:38:51]:
> Petr Štetiar wrote:
> >
> > You can get unique name/symlink using udev rule.
>
> Do you have short pointer or example for me?
http://www.google.com/search?hl=en&q=rename+interface+udev
-- ynezz
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: confused by netbase/udev
2010-02-09 13:29 ` Petr Štetiar
2010-02-09 13:38 ` Steffen Sledz
@ 2010-02-09 15:38 ` Steffen Sledz
2010-02-09 22:58 ` Paul Menzel
1 sibling, 1 reply; 10+ messages in thread
From: Steffen Sledz @ 2010-02-09 15:38 UTC (permalink / raw)
To: openembedded-devel
Petr Štetiar wrote:
> man 5 interfaces?
>
> Quote:
>
> " lines beginning with the word "auto" are used to identify the physical
> interfaces to be brought up when ifup is run with the -a option. (This
> option is used by the system boot scripts.) Physical interface names
> should follow the word "auto" on the same line. There can be multiple "auto"
> stanzas. ifup brings the named interfaces up in the order listed. "
OK, i try to solve one problem after the other. Let's accept that
every new USB-NIC gets a new name for now (using a pool of interface names).
I've tried to create a /etc/network/interfaces which fits my wishes:
------------->snip<----------------
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# the loopback interface
auto lo
iface lo inet loopback
# interfaces to bring up at boot time
auto eth0
# the onboard NIC
iface eth0 inet dhcp
# interfaces to bring up when hotplugging
allow-hotplug eth1 eth2 eth3 eth4 eth5 eth6 eth7 eth8
# additional USB-NIC's
iface eth1 inet dhcp
iface eth2 inet dhcp
iface eth3 inet dhcp
iface eth4 inet dhcp
iface eth5 inet dhcp
iface eth6 inet dhcp
iface eth7 inet dhcp
iface eth8 inet dhcp
------------->snip<----------------
This works fine when hotplugging, but the USB-NIC is not recognised
when connected while booting up. :(
I tried to change the one line responsible for that to
auto eth0 eth1 eth2 eth3 eth4 eth5 eth6 eth7 eth8
This works better but leads to dirty errors messages while booting
and shutdown for disconnected interfaces:
boot:
eth1: unknown interface: No such device
eth2: unknown interface: No such device
eth3: unknown interface: No such device
eth4: unknown interface: No such device
eth5: unknown interface: No such device
eth6: unknown interface: No such device
eth7: unknown interface: No such device
eth8: unknown interface: No such device
shutdown:
Deconfiguring network interfaces... cat: /var/run/udhcpc.eth0.pid: No such file or directory
cat: /var/run/udhcpc.eth1.pid: No such file or directory
eth1: unknown interface: No such device
cat: /var/run/udhcpc.eth2.pid: No such file or directory
eth2: unknown interface: No such device
cat: /var/run/udhcpc.eth3.pid: No such file or directory
eth3: unknown interface: No such device
cat: /var/run/udhcpc.eth4.pid: No such file or directory
eth4: unknown interface: No such device
cat: /var/run/udhcpc.eth5.pid: No such file or directory
eth5: unknown interface: No such device
cat: /var/run/udhcpc.eth6.pid: No such file or directory
eth6: unknown interface: No such device
cat: /var/run/udhcpc.eth7.pid: No such file or directory
eth7: unknown interface: No such device
cat: /var/run/udhcpc.eth8.pid: No such file or directory
eth8: unknown interface: No such device
done.
I'm not really happy with that. :(
Steffen
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: confused by netbase/udev
2010-02-09 11:23 confused by netbase/udev Steffen Sledz
2010-02-09 11:59 ` Paul Menzel
@ 2010-02-09 21:14 ` Cliff Brake
2010-02-10 7:43 ` Steffen Sledz
1 sibling, 1 reply; 10+ messages in thread
From: Cliff Brake @ 2010-02-09 21:14 UTC (permalink / raw)
To: openembedded-devel
On Tue, Feb 9, 2010 at 6:23 AM, Steffen Sledz <sledz@dresearch.de> wrote:
> I'm a bit confused about netbase and udev use im Angstrom.
>
> Here's what i see:
>
> I connect an USB-NIC.
>
> /etc/udev/rules.d/70-persistent-net.rules is created:
I ended up just removing the following files from my build, and now it
works as I expect -- the first USB NIC is always eth0, etc.
70-persistent-net.rules
75-persistent-net-generator.rules
Cliff
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: confused by netbase/udev
2010-02-09 15:38 ` Steffen Sledz
@ 2010-02-09 22:58 ` Paul Menzel
0 siblings, 0 replies; 10+ messages in thread
From: Paul Menzel @ 2010-02-09 22:58 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 3343 bytes --]
Am Dienstag, den 09.02.2010, 16:38 +0100 schrieb Steffen Sledz:
> Petr Štetiar wrote:
> > man 5 interfaces?
[…]
> OK, i try to solve one problem after the other. Let's accept that
> every new USB-NIC gets a new name for now (using a pool of interface names).
>
> I've tried to create a /etc/network/interfaces which fits my wishes:
>
> ------------->snip<----------------
> # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
>
> # the loopback interface
> auto lo
> iface lo inet loopback
>
> # interfaces to bring up at boot time
> auto eth0
>
> # the onboard NIC
> iface eth0 inet dhcp
>
> # interfaces to bring up when hotplugging
> allow-hotplug eth1 eth2 eth3 eth4 eth5 eth6 eth7 eth8
>
> # additional USB-NIC's
> iface eth1 inet dhcp
> iface eth2 inet dhcp
> iface eth3 inet dhcp
> iface eth4 inet dhcp
> iface eth5 inet dhcp
> iface eth6 inet dhcp
> iface eth7 inet dhcp
> iface eth8 inet dhcp
> ------------->snip<----------------
>
> This works fine when hotplugging, but the USB-NIC is not recognised
> when connected while booting up. :(
Did you test this with both USB-NICs?
> I tried to change the one line responsible for that to
>
> auto eth0 eth1 eth2 eth3 eth4 eth5 eth6 eth7 eth8
>
> This works better but leads to dirty errors messages while booting
> and shutdown for disconnected interfaces:
>
> boot:
> eth1: unknown interface: No such device
> eth2: unknown interface: No such device
> eth3: unknown interface: No such device
> eth4: unknown interface: No such device
> eth5: unknown interface: No such device
> eth6: unknown interface: No such device
> eth7: unknown interface: No such device
> eth8: unknown interface: No such device
>
> shutdown:
> Deconfiguring network interfaces... cat: /var/run/udhcpc.eth0.pid: No such file or directory
> cat: /var/run/udhcpc.eth1.pid: No such file or directory
> eth1: unknown interface: No such device
> cat: /var/run/udhcpc.eth2.pid: No such file or directory
> eth2: unknown interface: No such device
> cat: /var/run/udhcpc.eth3.pid: No such file or directory
> eth3: unknown interface: No such device
> cat: /var/run/udhcpc.eth4.pid: No such file or directory
> eth4: unknown interface: No such device
> cat: /var/run/udhcpc.eth5.pid: No such file or directory
> eth5: unknown interface: No such device
> cat: /var/run/udhcpc.eth6.pid: No such file or directory
> eth6: unknown interface: No such device
> cat: /var/run/udhcpc.eth7.pid: No such file or directory
> eth7: unknown interface: No such device
> cat: /var/run/udhcpc.eth8.pid: No such file or directory
> eth8: unknown interface: No such device
> done.
>
> I'm not really happy with that. :(
How are your boot/init scripts activate the interfaces, i. e. what
options to they pass to `ifup`?
I still suggest to use a daemon as NetworkManager which as far as I know
compensate this flaw of udev and `/e/n/i` which were created when a
system had no dynamically added (non-wifi) NICs.
Although I must admit that I find a use case that someone is changing
the NICs not very common. Normally you get one and always use that
device with this one. And if you change it you normally only have to
edit `/e/n/i` once since from now on you will use the new device.
Thanks,
Paul
[-- Attachment #2: Dies ist ein digital signierter Nachrichtenteil --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: confused by netbase/udev
2010-02-09 21:14 ` Cliff Brake
@ 2010-02-10 7:43 ` Steffen Sledz
0 siblings, 0 replies; 10+ messages in thread
From: Steffen Sledz @ 2010-02-10 7:43 UTC (permalink / raw)
To: openembedded-devel
Cliff Brake wrote:
> I ended up just removing the following files from my build, and now it
> works as I expect -- the first USB NIC is always eth0, etc.
>
> 70-persistent-net.rules
> 75-persistent-net-generator.rules
I believe that's what we want.
BTW, what's the best way to remove them from the build? Something like
this in udev_141.bb?
do_install_append_hipox() {
rm -f {D}${sysconfdir}/udev/rules.d/75-persistent-net-generator.rules
}
Steffen
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-02-10 7:45 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-09 11:23 confused by netbase/udev Steffen Sledz
2010-02-09 11:59 ` Paul Menzel
2010-02-09 13:18 ` Steffen Sledz
2010-02-09 13:29 ` Petr Štetiar
2010-02-09 13:38 ` Steffen Sledz
2010-02-09 13:47 ` Petr Štetiar
2010-02-09 15:38 ` Steffen Sledz
2010-02-09 22:58 ` Paul Menzel
2010-02-09 21:14 ` Cliff Brake
2010-02-10 7:43 ` Steffen Sledz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.