[CVALE] eth0 vs. eth1
Pete Zaitcev
zaitcev at redhat.com
Tue Aug 21 17:53:10 PDT 2007
On Tue, 21 Aug 2007 16:17:48 -0700, Patrick Bennett <stnick at bennettbungalow.com> wrote:
> i've got two nics in my linux box, nicA and nicB. How do I specify that
> nicA should always be eth0 and nicB should always be eth1? No GUI tools
> allowed.
>
> If it matters, I am using debian etch. nicA is an isa 10mb ne 2000
> clone. nicB is a 3com 3c59x card.
The right way to do it is to use the MAC address. In Fedora the address
in /etc/sysconfig/network-scripts/ifcfg-ethFOO is used. In the older
userland (e.g. RHL), it was done with /etc/mactab. Debian is commonly
behind, so try /etc/mactab. I also suggest to use names other than eth0,
eth1, so that rename always works.
The result should look like this:
[zaitcev at mallorn ~]$ ip addr
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ethaux: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:c0:f0:79:dd:b2 brd ff:ff:ff:ff:ff:ff
inet 67.181.30.74/22 brd 255.255.255.255 scope global ethaux
inet6 fe80::2c0:f0ff:fe79:ddb2/64 scope link
valid_lft forever preferred_lft forever
3: ethmain: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:40:63:d5:b2:20 brd ff:ff:ff:ff:ff:ff
inet 192.168.128.4/24 brd 192.168.128.255 scope global ethmain
inet6 2001:618:400:472a::c0a8:8004/64 scope global
valid_lft forever preferred_lft forever
inet6 fec0::1:0:0:c0a8:8004/64 scope site
valid_lft forever preferred_lft forever
inet6 fe80::c0a8:8004/64 scope link
valid_lft forever preferred_lft forever
inet6 fe80::240:63ff:fed5:b220/64 scope link
valid_lft forever preferred_lft forever
4: sit0: <NOARP> mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0
5: sit1 at NONE: <POINTOPOINT,NOARP,UP,10000> mtu 1480 qdisc noqueue
link/sit 0.0.0.0 peer 213.121.24.85
inet6 2001:618:400::43b5:1e4a/128 scope global
valid_lft forever preferred_lft forever
inet6 fe80::c0a8:8004/64 scope link
valid_lft forever preferred_lft forever
inet6 fe80::43b5:1e4a/64 scope link
valid_lft forever preferred_lft forever
[zaitcev at mallorn ~]$ cat /etc/sysconfig/network-scripts/ifcfg-ethaux
DEVICE=ethaux
BOOTPROTO=dhcp
TYPE=Ethernet
ONBOOT=yes
HWADDR=00:C0:F0:79:DD:B2
PEERDNS=no
[zaitcev at mallorn ~]$
Read your startup scripts and that will tell you what mechanism is used.
-- Pete
More information about the cvale
mailing list