Unix Technical Forum

udev and NIC devices

This is a discussion on udev and NIC devices within the Linux Operating System forums, part of the Unix Operating Systems category; --> Hi to all, I'm having troubles with udev and our NICs I use debian Etch with kernel 2.6.18 on ...


Go Back   Unix Technical Forum > Unix Operating Systems > Linux Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-19-2008, 07:15 AM
Maurizio
 
Posts: n/a
Default udev and NIC devices

Hi to all,
I'm having troubles with udev and our NICs

I use debian Etch with kernel 2.6.18 on a firewall with 5 ethernet cards.
The problem concerns the fact that udev is renaming the interface even if it
says is using the kernel name!

At boot time I see the console messages with eth[0-3] to a sundance (D-Link,
quad ethernet card), eth4 for the integrated Intel and eth5 for the 3com
card. After the login prompt the interfaces are all mixed up, on device
eth0 I found the Intel e100!!
I have modified the udev rules generator for the net avoiding the rename of
every device eth* and removed the z25_permanent-net.rules with no result.

I have also written a custom rule file as follow
KERNEL=="eth[0-9]", NAME="eth%n"

and on the udevtest it seams to work, but after the reboot I have the same
problem.

I don't want to hook the udev script to the mac-addresses because I have
more than 20 firewall like this one, each with 5/6 NICs.
I just want the udev to respect the order specified at boot time.

Why is the udev switching the devices? any hints?

Thanks
Maurizio
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-19-2008, 07:15 AM
Douglas Mayne
 
Posts: n/a
Default Re: udev and NIC devices

On Tue, 11 Sep 2007 12:01:09 +0200, Maurizio wrote:

> Hi to all,
> I'm having troubles with udev and our NICs
>

<snip>
>
> I don't want to hook the udev script to the mac-addresses because I have
> more than 20 firewall like this one, each with 5/6 NICs.
> I just want the udev to respect the order specified at boot time.
>
> Why is the udev switching the devices? any hints?
>

WAG: The kernel assigns the hardware when it sees it, apparently in
somewhat random order. Devices using different kernel modules may
also be loaded in arbitrary order.
>
> Thanks
> Maurizio
>

I only know that this problem goes away if you _do_ map through MAC
addresses. That seems less of a problem than random assignment.

--
Douglas Mayne
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-19-2008, 07:15 AM
Maurizio
 
Posts: n/a
Default Re: udev and NIC devices

Thank you for the reply

> WAG: The kernel assigns the hardware when it sees it, apparently in
> somewhat random order. Devices using different kernel modules may
> also be loaded in arbitrary order.

I have found that, using an initramfs I can put the modules to be loaded in
the correct order (and the kernel respects that order) in the file
/etc/initramfs-tools/modules
but inside the initram there is also the udev with the generation rules.
So when you create an initramfs you have also to check the
z25_persistent-net.rules generated in /etc/udev/rules.d/ before creating
the initram, because that file will be used during the boot and that's
where my NICs were renamed!

I have removed that file from the initramfs and now udev is respecting the
kernel name.

Thanks again
Maurizio
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:45 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com