Skip to contentSkip to conversation

NICs trading places ?

DISCUSSION Andi Kleen 3 participants 4 messages Mar 29, 2003 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Andi Kleen

author
#1 lore raw
Quoted 3 lines · Dave Jones

I just upgraded a box with 2 NICs in it to 2.5.66, and found that what was eth0 in 2.4 is now eth1, and vice versa. Is this phenomenon intentional ? documented ?

Just assign mac addresses to names and run nameif early in boot.

-Andi

#2 lore raw

NIC renaming does not rename /proc/sys/net/ipv4 Was: Re: NICs trading places ?

Quoted 7 lines · Andi Kleen
Quoted 3 lines · Dave Jones

I just upgraded a box with 2 NICs in it to 2.5.66, and found that what was eth0 in 2.4 is now eth1, and vice versa. Is this phenomenon intentional ? documented ?

Just assign mac addresses to names and run nameif early in boot.

A slight problem with that is that not all parts of /proc/sys get renamed this way:

snapcount:/proc/sys/net/ipv4/conf# ifconfig lo down
snapcount:/proc/sys/net/ipv4/conf# ip link set name lo0 lo
snapcount:/proc/sys/net/ipv4/conf# ls -l
total 0
dr-xr-xr-x    2 root     root            0 Mar 29 13:16 all
dr-xr-xr-x    2 root     root            0 Mar 29 13:16 default
dr-xr-xr-x    2 root     root            0 Mar 29 13:16 eth0
dr-xr-xr-x    2 root     root            0 Mar 29 13:16 lo

Which can be very confusing. This problem exists in both 2.5 and 2.4.

Regards,

bert

Signature · 2 lines
http://www.PowerDNS.com      Open source, database driven DNS Software 
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO
author
#3 lore raw

Re: NIC renaming does not rename /proc/sys/net/ipv4 Was: Re: NICs trading places ?

Quoted 11 lines · bert hubert
Quoted 7 lines · Andi Kleen
Quoted 3 lines · Dave Jones

I just upgraded a box with 2 NICs in it to 2.5.66, and found that what was eth0 in 2.4 is now eth1, and vice versa. Is this phenomenon intentional ? documented ?

Just assign mac addresses to names and run nameif early in boot.

A slight problem with that is that not all parts of /proc/sys get renamed this way:

Just rename at early boot before IP is set up. That is what i usually do - set up /etc/mactab and run it very early at boot.

Running it later is usually flakey. e.g. it can also give confusing effects with old style named ip aliases.

-Andi

#4 lore raw

Re: NIC renaming does not rename /proc/sys/net/ipv4 Was: Re: NICs trading places ?

Quoted 2 lines · Previously Andi Kleen

Just rename at early boot before IP is set up. That is what i usually do - set up /etc/mactab and run it very early at boot.

How does that solve the problem of /proc/sys/net/*/conf/* not being renamed?

Another problem is that nameif only supports ethernet devices currently, making it an incomplete solution.

Wichert.

Signature · 2 lines
Wichert Akkerman <[email protected]>           http://www.wiggy.net/
A random hacker