public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* NIC renaming does not rename /proc/sys/net/ipv4 Was: Re: NICs trading places ?
  2003-03-29  4:47 ` Andi Kleen
@ 2003-03-29 12:17   ` bert hubert
  2003-03-29 12:29     ` Andi Kleen
  0 siblings, 1 reply; 4+ messages in thread
From: bert hubert @ 2003-03-29 12:17 UTC (permalink / raw)
  To: Andi Kleen, netdev; +Cc: Dave Jones, linux-kernel

On Sat, Mar 29, 2003 at 05:47:17AM +0100, Andi Kleen wrote:
> Dave Jones <davej@codemonkey.org.uk> writes:
> 
> > 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


-- 
http://www.PowerDNS.com      Open source, database driven DNS Software 
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: NIC renaming does not rename /proc/sys/net/ipv4 Was: Re: NICs trading places ?
  2003-03-29 12:17   ` NIC renaming does not rename /proc/sys/net/ipv4 Was: " bert hubert
@ 2003-03-29 12:29     ` Andi Kleen
  2003-03-29 14:25       ` Wichert Akkerman
  0 siblings, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2003-03-29 12:29 UTC (permalink / raw)
  To: bert hubert; +Cc: netdev, Dave Jones, linux-kernel

On Sat, 2003-03-29 at 13:17, bert hubert wrote:
> On Sat, Mar 29, 2003 at 05:47:17AM +0100, Andi Kleen wrote:
> > Dave Jones <davej@codemonkey.org.uk> writes:
> > 
> > > 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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: NIC renaming does not rename /proc/sys/net/ipv4 Was: Re: NICs trading places ?
  2003-03-29 12:29     ` Andi Kleen
@ 2003-03-29 14:25       ` Wichert Akkerman
  0 siblings, 0 replies; 4+ messages in thread
From: Wichert Akkerman @ 2003-03-29 14:25 UTC (permalink / raw)
  To: linux-kernel

Previously Andi Kleen wrote:
> 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.

-- 
Wichert Akkerman <wichert@wiggy.net>           http://www.wiggy.net/
A random hacker

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: NIC renaming does not rename /proc/sys/net/ipv4 Was: Re: NICs trading places ?
       [not found]       ` <20030329142519.GG2078@wiggy.net.suse.lists.linux.kernel>
@ 2003-03-29 17:50         ` Andi Kleen
  0 siblings, 0 replies; 4+ messages in thread
From: Andi Kleen @ 2003-03-29 17:50 UTC (permalink / raw)
  To: Wichert Akkerman; +Cc: linux-kernel

Wichert Akkerman <wichert@wiggy.net> writes:

> > 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?

They are only set up when the inet device structure is created.
That happens at the first ifconfig/ip, not on driver init.

As for non ethernet devices - if you find a reliably way to identify/number
them then the same principle can be used for them too.

-Andi

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-03-29 17:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20030328221037.GB25846@suse.de.suse.lists.linux.kernel.suse.lists.linux.kernel>
     [not found] ` <p73isu2zsmi.fsf@oldwotan.suse.de.suse.lists.linux.kernel>
     [not found]   ` <20030329121755.GA17169@outpost.ds9a.nl.suse.lists.linux.kernel>
     [not found]     ` <1048940960.2176.86.camel@averell.suse.lists.linux.kernel>
     [not found]       ` <20030329142519.GG2078@wiggy.net.suse.lists.linux.kernel>
2003-03-29 17:50         ` NIC renaming does not rename /proc/sys/net/ipv4 Was: Re: NICs trading places ? Andi Kleen
     [not found] <20030328221037.GB25846@suse.de.suse.lists.linux.kernel>
2003-03-29  4:47 ` Andi Kleen
2003-03-29 12:17   ` NIC renaming does not rename /proc/sys/net/ipv4 Was: " bert hubert
2003-03-29 12:29     ` Andi Kleen
2003-03-29 14:25       ` Wichert Akkerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox