Re: network interface question

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



 On 10/15/2010 12:44 PM, Paras pradhan wrote:
> On Fri, Oct 15, 2010 at 3:57 AM, Peter Kjellstrom <cap@xxxxxxxxxx> 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...)

-- 
Bowie
_______________________________________________
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