Re: 6.x - find interface with link up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Thu, Dec 15, 2011 at 3:39 PM,  <m.roth@xxxxxxxxx> wrote:

>>>> In earlier versions 'mii-tool' would iterate over interfaces and show
>>>> which have link up.   In 6.x it wants an interface as a parameter.
>>>> What is the appropriate way to find which of some number of of
>>>> interfaces are connected?   Better yet, what is the least typing to
>>>> get the mac addresses of those interfaces?
>>>
>>> ethtool, or even lshw.
>>
>> How do you make ethtool iterate over the available interfaces?
>
> I suppose that would be a script. lshw - which is clearer than just
> dmidecode, would do it.
>
> Dumb question: in /etc/sysconfig/network-scripts, do the ifcfg-* have
> HWADDRs?

They do, but the case I want to cover is where an existing server is
cloned, or the disk has been moved from a failed chassis to a spare.
And in this case the existing files will be wrong, and the nics will
be named more or less randomly.   Assume the hands-on operators don't
know much about linux and you can't actively help until they get at
least one of the right IP's on the right NIC.

With 5.x I'd use mii-tool to find the connected interface (connecting
one wire at a time if necessary), then ifconfig on that interface to
get the hwaddr, then edit that into the ifcfg-* file for the names I
want the active NICs to have, and reboot.   That's awkward enough to
ask someone to do who already prefers windows, and it looks like it
just got harder by having to explicitly run mii-tool for each possible
interface (and we always have 4 to 6 per box).   There has to be a
better way.   I thought 6.1 was going to have a new NIC name
convention but I haven't had time to look into it and have to make
something work now.

-- 
   Les Mikesell
    lesmikesell@xxxxxxxxx
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux