[CentOS] network interface question

Bowie Bailey Bowie_Bailey at BUC.com
Fri Oct 15 17:12:27 UTC 2010


 On 10/15/2010 1:10 PM, Bowie Bailey wrote:
>  On 10/15/2010 12:44 PM, Paras pradhan wrote:
>> On Fri, Oct 15, 2010 at 3:57 AM, Peter Kjellstrom <cap at nsc.liu.se> wrote:
>>> On Thursday 14 October 2010, Paras pradhan wrote:
>>> ...
>>>> I have eight nics and its getting difficult to me which MAC id
>>>> represents which physical port. Any way to find this?
>>> Have a look at the "-p" option to ethtool
>> It would be useful (to me)  if I can use mac address instead of
>> interface name in -p option.
> Try this script (untested):
>
> --------------------------------------------
> #!/bin/bash
> ETH=`ifconfig | grep -i $1 | cut -d ' ' -f 1`
> echo "Blinking $ETH - $1"
> ethtool -p $ETH 30
> --------------------------------------------
>
> Just call it with the mac address as an argument.  It will find the
> interface with ifconfig and then call ethtool to blink the lights for 30
> seconds.
>
> (Assuming your NIC supports ethtool.  The system I tried to test this on
> was not supported...)

oops...

Make that "ifconfig -a" in the script to find inactive interfaces.

-- 
Bowie



More information about the CentOS mailing list