[CentOS] 6.x - find interface with link up

Thu Dec 15 21:39:05 UTC 2011
m.roth at 5-cent.us <m.roth at 5-cent.us>

Les Mikesell wrote:
> On Thu, Dec 15, 2011 at 2:56 PM,  <m.roth at 5-cent.us> wrote:
>> Les Mikesell 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