How to know which Nic is eth0,1 or 2 ?

Greg Dickie greg at max-t.com
Fri Sep 1 06:26:18 CDT 2006


Sure

Thanks for looking at this. As an aside, is there no way this reordering
problem could be fixed in BIOS? See below:


Greg

[root at sh15 ~]# grep -P HWADDR\|DEVICE /etc/sysconfig/network-
scripts/ifcfg-*
/etc/sysconfig/network-scripts/ifcfg-bond0:DEVICE=bond0
/etc/sysconfig/network-scripts/ifcfg-eth0:DEVICE=eth0
/etc/sysconfig/network-scripts/ifcfg-eth1:DEVICE=eth1
/etc/sysconfig/network-scripts/ifcfg-eth1:HWADDR=00:13:72:67:55:A9
/etc/sysconfig/network-scripts/ifcfg-eth2:DEVICE=eth2
/etc/sysconfig/network-scripts/ifcfg-eth2:HWADDR=00:13:72:67:55:A7
/etc/sysconfig/network-scripts/ifcfg-eth3:DEVICE=eth3
/etc/sysconfig/network-scripts/ifcfg-eth3:HWADDR=00:E0:ED:04:9F:9C
/etc/sysconfig/network-scripts/ifcfg-eth4:DEVICE=eth4
/etc/sysconfig/network-scripts/ifcfg-eth4:HWADDR=00:E0:ED:04:9F:9D
/etc/sysconfig/network-scripts/ifcfg-eth5:DEVICE=eth5
/etc/sysconfig/network-scripts/ifcfg-eth5:HWADDR=00:E0:ED:04:9F:9E
/etc/sysconfig/network-scripts/ifcfg-eth6:DEVICE=eth6
/etc/sysconfig/network-scripts/ifcfg-eth6:HWADDR=00:E0:ED:04:9F:9F
/etc/sysconfig/network-scripts/ifcfg-eth7:DEVICE=eth7
/etc/sysconfig/network-scripts/ifcfg-eth7:HWADDR=00:E0:ED:04:9F:A0
/etc/sysconfig/network-scripts/ifcfg-lo:DEVICE=lo



[root at sh15 ~]# ip -o link show eth0
11: eth0: <BROADCAST,MULTICAST,UP,LUP> mtu 1500 qdisc pfifo_fast qlen
1000\    link/ether 00:13:72:67:55:a9 brd ff:ff:ff:ff:ff:ff
[root at sh15 ~]# ip -o link show eth1
Device "eth1" does not exist.
[root at sh15 ~]# ip -o link show eth2
12: eth2: <BROADCAST,MULTICAST,SLAVE,UP,LUP> mtu 1500 qdisc pfifo_fast
master bond0 qlen 1000\    link/ether 00:13:72:67:55:a7 brd
ff:ff:ff:ff:ff:ff
[root at sh15 ~]# ip -o link show eth3
5: eth3: <BROADCAST,MULTICAST,SLAVE,UP,LUP> mtu 1500 qdisc pfifo_fast
master bond0 qlen 1000\    link/ether 00:13:72:67:55:a9 brd
ff:ff:ff:ff:ff:ff
[root at sh15 ~]# ip -o link show eth4
6: eth4: <NO-CARRIER,BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc
pfifo_fast master bond0 qlen 1000\    link/ether 00:e0:ed:04:9f:9d brd
ff:ff:ff:ff:ff:ff
[root at sh15 ~]# ip -o link show eth5
7: eth5: <NO-CARRIER,BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc
pfifo_fast master bond0 qlen 1000\    link/ether 00:e0:ed:04:9f:9e brd
ff:ff:ff:ff:ff:ff
[root at sh15 ~]# ip -o link show eth6
8: eth6: <NO-CARRIER,BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc
pfifo_fast master bond0 qlen 1000\    link/ether 00:e0:ed:04:9f:9f brd
ff:ff:ff:ff:ff:ff
[root at sh15 ~]# ip -o link show eth7
9: eth7: <NO-CARRIER,BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc
pfifo_fast master bond0 qlen 1000\    link/ether 00:e0:ed:04:9f:a0 brd
ff:ff:ff:ff:ff:ff










On Thu, 2006-08-31 at 23:13 -0500, Matt Domsch wrote:
> On Thu, Aug 31, 2006 at 07:50:45PM -0400, Greg Dickie wrote:
> > 
> > Hi Matt,
> > 
> >   I just tried this again and it doesn't seem to work for me. Sometimes
> > but not always I get into a very funky state ad the interfaces refuse to
> > come up. I stuck -vx in ifup to get a trace of what was happening and
> > have included an excerpt below. Maybe its a bug in RHEL, the only funny
> > thing I'm doing is setting up bonding but I can't imagine why that would
> > be a problem...... Any ideas?
> 
> I don't think bonding is the problem.  It's breaking down in the
> rename logic when trying to swap the names of 2 devices, which is kind
> of tricky.  It effectively needs to do a shell-sort like rename.  1->temp;
> 2->1; temp->2.
> 
> 
> > + modprobe eth0
> > + echo /sbin/hotplug
> > + configure_ccwgroup_device
> > + local DIR SYSDIR
> > + '[' -z '' -o -z '' ']'
> > + return
> > + '[' -n 00:13:72:67:55:A7 ']'
> > ip -o link | awk -F ':' -vIGNORECASE=1 "/$HWADDR/ { print \$2 }"
> > ++ ip -o link
> > ++ awk -F : -vIGNORECASE=1 '/00:13:72:67:55:A7/ { print $2 }'
> > + local 'curdev= eth1'
> > + '[' -z ' eth1' ']' 
> > + rename_device eth0 00:13:72:67:55:A7 ' eth1'
> > + /sbin/nameif eth0 00:13:72:67:55:A7
> > cannot change name of eth1 to eth0: Device or resource busy
> > get_hwaddr ${1}
> > ++ get_hwaddr eth0
> > ++ LC_ALL=
> > ++ LANG= 
> > ++ ip -o link show eth0
> > ++ sed 's/.*link\/[^ ]* \([[:alnum:]:]*\).*/\1/'
> > ++ awk '{ print toupper($0) }'
> > + local hw2=
> 
> Here's a problem.  This just returned empty somehow, which greatly
> confuses the rest of rename_device.
> 
> Would you mind sending the DEVICE and HWADDR lines from
> /etc/sysconfig/network-scripts/ifcfg-eth* ?
> 
> And the results of running 'ip -o link show eth0'  for each eth* ?
> 
> (you can send to me privately if you need).
> 
> Thanks,
> Matt
> 
-- 
Greg Dickie
just a guy
Maximum Throughput



More information about the Linux-PowerEdge mailing list