LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Detect NIC interface in Linux (https://www.linuxquestions.org/questions/linux-newbie-8/detect-nic-interface-in-linux-4175536866/)

shipon_97 03-16-2015 06:12 AM

Detect NIC interface in Linux
 
Dear Friends ,

One of My linux server , I have 4 NIC card . I plugged a network cable one of NIC card . Now How can I understand which interface (eth0 or eth1 or eth2 or eth3) is connected with the cable ?

Which command I need to use to find it ?


My second question is :
using 'ethtool ' output I got a line : "Link detected : yes"
what does it means ?

ut0ugh1 03-16-2015 06:29 AM

ethtool ethx gives response connected if a lan cable is plugged in and connected to network device.
try each eth0, eth1 and ethx to know which is really connected but if you type ifconfig you should get the nic and its ip address.

Madhu Desai 03-16-2015 09:35 AM

Install bmon. The interface where RX/TX is changing is the one you plugged into.

Or,

You may just try

Code:

# cat /sys/class/net/eth0/operstate
up

Source: How to detect whether a physical cable is connected to network card slot on Linux


All times are GMT -5. The time now is 09:30 AM.