List Info

Thread: Assign eth0 to specific NIC




Assign eth0 to specific NIC
country flaguser name
United States
2008-03-11 16:12:55
Hi Friends -- 
 
On Bering uClibc 3.1, is there a way to control which
network card gets assigned eth0, eth1, etc. when all cards
use the same module?  I have two on-board NICs and a card
NIC in the same system, and the card is detected first
(assigned eth0), with the on-board NICs last (assigned eth1
and eth2).  I would prefer to use the onboard NICs as eth0
and eth1.
 
The last time I could find this question asked was 2003 --
the answer then was no -- so I was wondering if anything had
changed since then?
 
Thanks so much!
 
Merrick
____________________________________________________________
_____
Helping your favorite cause is as easy as instant
messaging. You IM, we give.
http://im.live.com/Messenger/IM/Home/?source=text_
hotmail_join
------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
------------------------------------------------------------
------------
leaf-user mailing list: leaf-userlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user

Support Request -- http://leaf-project.org/


Re: Assign eth0 to specific NIC
country flaguser name
Netherlands
2008-03-12 02:53:25
Hi Merrick,

AFAIK it's the kernel which assigns the NICs to a specific
number. Maybe
it's possible to use some sort of userspace tool to
reshuffle those
interfaces based on mac-addresses afterwards. But it's
non-trivial.


Eric

> Hi Friends --
>
>
> On Bering uClibc 3.1, is there a way to control which
network card gets
> assigned eth0, eth1, etc. when all cards use the same
module?  I have two
> on-board NICs and a card NIC in the same system, and
the card is detected
> first (assigned eth0), with the on-board NICs last
(assigned eth1 and
> eth2).  I would prefer to use the onboard NICs as eth0
and eth1.
>
> The last time I could find this question asked was 2003
-- the answer
> then was no -- so I was wondering if anything had
changed since then?
>
> Thanks so much!
>
>
> Merrick
>
____________________________________________________________
_____
> Helping your favorite cause is as easy as instant
messaging. You IM, we
> give. http://im.live.com/Messenger/IM/Home/?source=text_
hotmail_join
>
------------------------------------------------------------
-------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>
------------------------------------------------------------
------------
> leaf-user mailing list: leaf-userlists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/leaf-user

> Support Request -- http://leaf-project.org/

>
>



------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
------------------------------------------------------------
------------
leaf-user mailing list: leaf-userlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user

Support Request -- http://leaf-project.org/


Re: Assign eth0 to specific NIC
user name
2008-03-12 04:28:16
Well, yes and no.

The kernel assigns the numbers sequentially but it is the
module that 
requests these assignments in the order it finds the NICs.
With the 
older ISA cards you could enforce this order by specifying
several 
hardware properties (actually, these were required) but with
PCI this is 
all plug-and-pray. If you use an old computer for Bering or
any other 
LEAF distribution you may still be able to tweak the
detection sequence 
by manually setting the IRQs in the BIOS setup.

No luck for Merrick though I'm afraid since having an
onboard NIC seems 
to imply he's using a fairly recent machine. With the
current hardware 
generation the only valid option appears to be using udev
rules, but 
this requires a 2.6 kernel.


Gordon

Eric Spakman wrote:
> Hi Merrick,
> 
> AFAIK it's the kernel which assigns the NICs to a
specific number. Maybe
> it's possible to use some sort of userspace tool to
reshuffle those
> interfaces based on mac-addresses afterwards. But it's
non-trivial.
> 
> 
> Eric



------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
------------------------------------------------------------
------------
leaf-user mailing list: leaf-userlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user

Support Request -- http://leaf-project.org/


Re: Assign eth0 to specific NIC
country flaguser name
Finland
2008-03-12 06:30:30
Hi,

ifrename, iproute2 and udev has capability to rename
interface labels.
Years ago I tried to keep interface label consistent with
map token in
/etc/network/interfaces on a Debian system. There was an
example script
in Debian for it. It worked.

ip command from iproute2 seems to do the trick on a LEAF
Bering-uClibc
3.0 Rev 7 uClibc 0.9.28 system as can be seen from
following.

nailhead# ip link
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop
     link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc
pfifo_fast qlen 1000
     link/ether 00:10:b5:9a:12:66 brd ff:ff:ff:ff:ff:ff
4: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop
qlen 1000
     link/ether 00:10:b5:9a:0a:bb brd ff:ff:ff:ff:ff:ff
nailhead# ip link set eth1 name eth3
nailhead# ip link
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop
     link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc
pfifo_fast qlen 1000
     link/ether 00:10:b5:9a:12:66 brd ff:ff:ff:ff:ff:ff
4: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop
qlen 1000
     link/ether 00:10:b5:9a:0a:bb brd ff:ff:ff:ff:ff:ff


Erkki


on 12.3.2008 09:53 Eric Spakman wrote:
> Hi Merrick,
> 
> AFAIK it's the kernel which assigns the NICs to a
specific number. Maybe
> it's possible to use some sort of userspace tool to
reshuffle those
> interfaces based on mac-addresses afterwards. But it's
non-trivial.
> 
> 
> Eric
> 
>> Hi Friends --
>>
>>
>> On Bering uClibc 3.1, is there a way to control
which network card gets
>> assigned eth0, eth1, etc. when all cards use the
same module?  I have two
>> on-board NICs and a card NIC in the same system,
and the card is detected
>> first (assigned eth0), with the on-board NICs last
(assigned eth1 and
>> eth2).  I would prefer to use the onboard NICs as
eth0 and eth1.
>>
>> The last time I could find this question asked was
2003 -- the answer
>> then was no -- so I was wondering if anything had
changed since then?
>>
>> Thanks so much!
>>
>>
>> Merrick
>>
____________________________________________________________
_____
>> Helping your favorite cause is as easy as instant
messaging. You IM, we
>> give. http://im.live.com/Messenger/IM/Home/?source=text_
hotmail_join
>>
------------------------------------------------------------
-------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio
2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>>
------------------------------------------------------------
------------
>> leaf-user mailing list: leaf-userlists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/leaf-user

>> Support Request -- http://leaf-project.org/

>>
>>
> 
> 
> 
>
------------------------------------------------------------
-------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>
------------------------------------------------------------
------------
> leaf-user mailing list: leaf-userlists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/leaf-user

> Support Request -- http://leaf-project.org/



------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
------------------------------------------------------------
------------
leaf-user mailing list: leaf-userlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user

Support Request -- http://leaf-project.org/


Re: Assign eth0 to specific NIC
country flaguser name
United States
2008-03-12 13:35:58



Hi, Thanks to Eric, Gordon, and Erkki for responding! On
this machine I do have the ability to modify the IRQs in the
BIOS , so I tried Gordon's suggestion to alter the IRQs
assigned to each NIC.  Unfortunately, this had no effect on
the NIC detection order with the module I am using (Erich
Titl's new 7.6.5 e1000).In my case, the detection order is
the same for each boot, just in the wrong order.  Because of
this, I didn't need to check the MAC to find out which card
is which.  So, Erkki's solution works great -- I just added
several "ip link set ethx name ethy" statements to
re-shuffle the names. Thank you all for your help. Merrick

> Date: Wed, 12 Mar 2008 10:24:33 +0200> From:
erkki.lintuneniki.fi> To: leaf-userlists.sourceforge.net> CC: merrick_mundayhotmail.com> Subject: Re: [leaf-user] Assign eth0
to specific NIC> > > Hi,> > ifrename,
iproute2 and udev has capability to rename interface labels.
> Years ago I tried to keep interface label consistent
with map token in > /etc/network/interfaces on a Debian
system. There was an example script > in Debian for it.
It worked.> > ip command from iproute2 seems to do the
trick on a LEAF Bering-uClibc > 3.0 Rev 7 uClibc 0.9.28
system as can be seen from following.> > nailhead# ip
link> 1: lo: <LOOPBACK,UP> mtu 16436 qdisc
noqueue> link/loopback 00:00:00:00:00:00 brd
00:00:00:00:00:00> 2: dummy0: <BROADCAST,NOARP> mtu
1500 qdisc noop> link/ether 00:00:00:00:00:00 brd
ff:ff:ff:ff:ff:ff> 3: eth0:
<BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast
qlen 1000> link/ether 00:10:b5:9a:12:66 brd
ff:ff:ff:ff:ff:ff> 4: eth1: <BROADCAST,MULTICAST>
mtu 1500 qdisc noop qlen 1000> link/ether
00:10:b5:9a:0a:bb brd ff:ff:ff:ff:ff:ff> nailhead# ip
link set eth1 name eth3> nailhead# ip link> 1: lo:
<LOOPBACK,UP> mtu 16436 qdisc noqueue>
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00> 2:
dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop>
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff> 3:
eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc
pfifo_fast qlen 1000> link/ether 00:10:b5:9a:12:66 brd
ff:ff:ff:ff:ff:ff> 4: eth3: <BROADCAST,MULTICAST>
mtu 1500 qdisc noop qlen 1000> link/ether
00:10:b5:9a:0a:bb brd ff:ff:ff:ff:ff:ff> > >
Erkki> > > on 12.3.2008 09:53 Eric Spakman
wrote:> > Hi Merrick,> > > > AFAIK it's
the kernel which assigns the NICs to a specific number.
Maybe> > it's possible to use some sort of userspace
tool to reshuffle those> > interfaces based on
mac-addresses afterwards. But it's non-trivial.> >
> > > > Eric> > > >> Hi Friends
--> >>> >>> >> On Bering uClibc
3.1, is there a way to control which network card gets>
>> assigned eth0, eth1, etc. when all cards use the
same module? I have two> >> on-board NICs and a
card NIC in the same system, and the card is detected>
>> first (assigned eth0), with the on-board NICs last
(assigned eth1 and> >> eth2). I would prefer to use
the onboard NICs as eth0 and eth1.> >>> >>
The last time I could find this question asked was 2003 --
the answer> >> then was no -- so I was wondering if
anything had changed since then?> >>> >>
Thanks so much!> >>> >>> >>
Merrick> >>
____________________________________________________________
_____> >> Helping your favorite cause is as easy as
instant messaging. You IM, we> >> give. http://im.live.com/Messenger/IM/Home/?source=t
ext_hotmail_join> >>
------------------------------------------------------------
-------------> >> This SF.net email is sponsored
by: Microsoft> >> Defy all challenges. Microsoft(R)
Visual Studio 2008.> >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/0
1/> >>
------------------------------------------------------------
------------> >> leaf-user mailing list:
leaf-userlists.sourceforge.net> >> https://lists.sourceforge.net/lists/listinfo/leaf-user
> >> Support Request -- http://leaf-project.org/
> >>> >>> > > > > >
> >
------------------------------------------------------------
-------------> > This SF.net email is sponsored by:
Microsoft> > Defy all challenges. Microsoft(R) Visual
Studio 2008.> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/0
1/> >
------------------------------------------------------------
------------> > leaf-user mailing list: leaf-userlists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/leaf-user
> > Support Request -- http://leaf-project.org/

____________________________________________________________
_____
Helping your favorite cause is as easy as instant
messaging. You IM, we give.
http://im.live.com/Messenger/IM/Home/?source=text_
hotmail_join
------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
------------------------------------------------------------
------------
leaf-user mailing list: leaf-userlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user

Support Request -- http://leaf-project.org/


[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )