LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-16-2015, 06:12 AM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 490

Rep: Reputation: 30
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 ?
 
Old 03-16-2015, 06:29 AM   #2
ut0ugh1
Member
 
Registered: Oct 2011
Posts: 59

Rep: Reputation: Disabled
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.
 
Old 03-16-2015, 09:35 AM   #3
mddnix
Member
 
Registered: Mar 2013
Distribution: Redhat, Ubuntu
Posts: 525

Rep: Reputation: 141Reputation: 141
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

Last edited by mddnix; 03-16-2015 at 09:48 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Headless install -- How to auto detect NIC driver and interface? guanx Slackware - Installation 9 07-03-2012 10:23 AM
linux can not detect linksys NIC EG1032 v2 linuxtraveler Linux - Networking 4 02-08-2006 03:50 PM
Help, linux install didnt detect my onboard nic!! abefroman Linux - Hardware 4 11-18-2005 07:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration