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

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


Err I should mention that in order to get a link up to get you that info
I had to remove the HWADDR line from the eth0 config. 


Greg

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