FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 10-15-2010, 08:48 AM
Giles Coochey
 
Default network interface question

On 15/10/2010 10:36, John Doe wrote:

From: Paras pradhan <pradhanparas@gmail.com>



I have eight nics and its getting difficult to me which MAC id
represents which physical port. Any way to find this?



Unless you are 100% sure the nics detection follow a sequential order that
matches the nics physical ports order, I think you will have to test them one at
a time...

JD



Not sure whether this is true for all operating systems, but in many
systems I have come across the following ordering convention:



* Onboard NIC's get listed first, e.g. eth0, eth1.

* First PCI bus gets listsed next, starting at slot 1... e.g. eth1,
eth2

* If there are multiple interfaces per card then they are ordered in
increasing MAC address value.



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 10-15-2010, 08:57 AM
Peter Kjellstrom
 
Default network interface question

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

/Peter

> Thanks!
> Paras.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 10-15-2010, 04:44 PM
Paras pradhan
 
Default network interface question

On Fri, Oct 15, 2010 at 3:57 AM, Peter Kjellstrom <cap@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.

Paras.

>
> /Peter
>
>> Thanks!
>> Paras.
>
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 10-15-2010, 04:46 PM
Paras pradhan
 
Default network interface question

On Fri, Oct 15, 2010 at 3:48 AM, Giles Coochey <giles@coochey.net> wrote:
> On 15/10/2010 10:36, John Doe wrote:
>
> From: Paras pradhan <pradhanparas@gmail.com>
>
> I have eight nics and its getting difficult to me which MAC id
> represents which physical port. Any way to find this?
>
> Unless you are 100% sure the nics detection follow a sequential order that
> matches the nics physical ports order, I think you will have to test them
> one at
> a time...
>
> JD
>
> Not sure whether this is true for all operating systems, but in many systems
> I have come across the following ordering convention:
>


> * Onboard NIC's get listed first, e.g. eth0, eth1.
> * First PCI bus gets listsed next, starting at slot 1... e.g. eth1, eth2

Didn't happen

> * If there are multiple interfaces per card then they are ordered in
> increasing MAC address value.

Might be true but never tested. Planning to test this.

Paras.

>
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
>
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 10-15-2010, 05:01 PM
 
Default network interface question

Paras pradhan wrote:
> On Fri, Oct 15, 2010 at 3:57 AM, Peter Kjellstrom <cap@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.
>
After some thought, I think what I'd do is plug a cable into them in, one
at a time, and use ethtool to find the one, and only one, that says "link
detected", and you've got it.

mark

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 10-15-2010, 05:09 PM
Les Mikesell
 
Default network interface question

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

"ifconfig -a" should give you the interfaces and hwaddr values.

--
Les Mikesell
lesmikesell@gmail.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 10-15-2010, 05:10 PM
Bowie Bailey
 
Default network interface question

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

--
Bowie
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 10-15-2010, 05:12 PM
Bowie Bailey
 
Default network interface question

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@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
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 10-15-2010, 05:14 PM
Les Mikesell
 
Default network interface question

On 10/15/2010 12:01 PM, m.roth@5-cent.us wrote:
> Paras pradhan wrote:
>> On Fri, Oct 15, 2010 at 3:57 AM, Peter Kjellstrom<cap@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.
>>
> After some thought, I think what I'd do is plug a cable into them in, one
> at a time, and use ethtool to find the one, and only one, that says "link
> detected", and you've got it.

mii-tool is a little handier for this since it will iterate over all the
interfaces itself. But, it will incorrectly call a 1Gb link 100baseT.

--
Les Mikesell
lesmikesell@gmail.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 10-15-2010, 05:18 PM
Paras pradhan
 
Default network interface question

Yes I just tested like this..

What i did was:

ifconfig -a gives me logical names such as: __tmp1035166962 , ethX

and ethtool -p __tmp1035166962 makes blinking in the network port. My
problem is resolved.

Thanks a lot guys. Appreciate it.

Paras.

On Fri, Oct 15, 2010 at 12:12 PM, Bowie Bailey <Bowie_Bailey@buc.com> wrote:
> *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@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
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 10:20 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org