command to match ethernet port to network card


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting command to match ethernet port to network card
# 1  
Old 03-08-2012
command to match ethernet port to network card

hi I juts want to know if there is a command that checks if an ethernet port corresponds to a network card.

ex. I have 3 network cards, one is two ports, and the other two 8 ports.

How do I know that eth0 corresponds to the the two-port network card and eth9 corresponds to the first 8-port network card?

Thanks!!
# 2  
Old 03-08-2012
On Linux you could use ethtool -p eth0 to have the port flash the lights for identification. Note that this is pretty much Linux only, and ethtool isn't installed by default.
# 3  
Old 03-08-2012
Quote:
Originally Posted by pludi
On Linux you could use ethtool -p eth0 to have the port flash the lights for identification. Note that this is pretty much Linux only, and ethtool isn't installed by default.
hmmm but you check it manually, I was wondering if I can get the answer by script...

something like this....

Code:
eth=eth0
if eth correspond to nw_card1
  echo "${eth} is port of nw card 1"
elif eth correspond to nw_card2
  echo "${eth} is port of nw card 2"
elif eth correspond to nw_card3
  echo "${eth} is port of nw card 3"

I need the commands for the if statements if there are any.. Smilie

thanks!
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Regex to match Exact port number (netstat command)

Hi All, We have this regex:\\*.*?(.600).*?.(LISTEN|ESTABLISHED) OS = Solaris 10 The purpose of this regex is to match the ports in output of "netstat -an" and report if any ports between 6000-6009 are getting used. The only problem is if I have something like this (sample output as... (6 Replies)
Discussion started by: sk2code
6 Replies

2. Solaris

Problem with my Ethernet Card

Hi Gurus of Solaris. I have a problem yesterday when I was installing solaris in a x86 equipement I attached some log that I capture when I try to resolve the problem Any guru that can help please. Any command or procedure that I can run, please advice me Regards Andres (10 Replies)
Discussion started by: andresguillen
10 Replies

3. Solaris

SUN GIGABIT ETHERNET CARD

Hi, we have SUN Gigabit ethernet cards at the server, both have 2 lines connected but hiw can I found out which cable is on which port before I configure it: the cards has 4 ports , from right to left the cables are connected at the first right then 2 empty then the last at the left side. ... (1 Reply)
Discussion started by: manni2
1 Replies

4. AIX

Utilization of Ethernet Card

Hi, is it possible to find out network utilization of etherenet card in %? Regards, Manoj (2 Replies)
Discussion started by: manoj.solaris
2 Replies

5. IP Networking

ethernet card

What command do I use to show mw the ethernet card, I have tried ipconfig -a (1 Reply)
Discussion started by: dhlopomo
1 Replies

6. SCO

Issue with a ethernet card

Installed a replacement 3com pci card on an ibm PC 300 GL, running OpenServer 6.0 , brought up system, and recieved this message: Fsstat:/dev/boot mounted Mounted /stand filesystem System auditing is not enabled. Dlpid:Unable to open network adapter driver (/dev/mdi/r8e0) Dlpid:No such... (0 Replies)
Discussion started by: tazmss1
0 Replies

7. UNIX for Dummies Questions & Answers

Ethernet card problem...

I am an extreme novice trying to learn Linux. I have redhat 9 installed in a computer I built specifically to install and learn linux. I have an asus a7v8x-x motherboard with the realtek 10/100 mbps ethernet card. I also installed a Jaht adapter jn-1110r32c ethernet card. I cannot get the... (2 Replies)
Discussion started by: Tony Empire
2 Replies

8. IP Networking

RedHat and Ethernet card no like each other

I have searched this forum for solution and have drawn a blank... so I come to you for help :) I an a Win XP user that has no problem getting on internet when I am on that OS (currently on it right now ;)). I installed red hat 9 and when I use that OS, I cannot get a connection. I ran the... (10 Replies)
Discussion started by: Minnesota Red
10 Replies

9. Filesystems, Disks and Memory

ethernet card for Solaris

Hi, How can i check the speed of the Ethernet card that my Sun server has and also how can i change it to full Duplex if it is set to half duplex? What is the file that takes care of this? (3 Replies)
Discussion started by: i2admin
3 Replies
Login or Register to Ask a Question