Solved

15 ethernet interfaces, which is Eth0 ?  ( in linux )

Posted on 2007-12-06
7
1,001 Views
Last Modified: 2010-04-21
We have stacked servers and the people that manage them are very very far away.  They need to plug into eth0 and the dell servers run Redhat 4.

Without plugging in all the interfaces, how can we determine which actuall nick ( or quad nic port ) is eth0

I need someone to be able to physicaly point to eth0  

How does linux deside which one is zero ?  
0
Comment
Question by:itguy411
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 88

Expert Comment

by:rindi
ID: 20423593
ifconfig eth0 will show you some info on the nic, including it's MAC address. From that you should be able to find out which one it is.
0
 
LVL 13

Expert Comment

by:WizRd-Linux
ID: 20423905
if ifplugd is running on the server and you can call the people that support the box you can be on the phone and plug in 1 interface, they should then be able to tell you by looking at /var/log/messages which interface has been plugged in, if it isn't the correct one move to the next one till they tell you eth0 is plugged in.

It would pay at that stage to create a list / map of the cards and label the interfaces.
0
 
LVL 8

Accepted Solution

by:
Rance_Hall earned 300 total points
ID: 20424028
Linux assigns the ethX numbers in the order that the nics are detected at startup, this is influenced by two paramaters:

In order of importance:  the order that the network card modules are modprobed into the kernel at startup

a system with three nics might have nic 2 listed as eth0 if its module was the first one loaded, and thus its the first one detected.

If you have more that one nic in the system that takes the same module/driver then the order is the pci port order on the MB

a pci scan starts at pci slot 0 and works it way down the list.

so two identical cards will be numbered in the order that the bus was scanned.

so, combine those two items, and you have the ethX mystery pretty well solved.

so to recap, the order that the driver was loaded into the kernel, and the order of identical cards on the bus.

You can usually manipulate the module loading order by creating a modprobe.conf file, or something similar for your distro (check your docs for sure) and listing the modules in the order you want them loaded.

This can sometimes force eth0 to be the one you want.  (sometimes because the bus order thing you cant change)

0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 12

Expert Comment

by:bhnmi
ID: 20424051
I have found more often then not (allot more then not), that the port furthest to the right is eth0.
0
 
LVL 1

Assisted Solution

by:manuelflury
manuelflury earned 200 total points
ID: 20427047
Use lspci to get the information from the PCI bus

The order the module are loaded determine the numbering

Finally type as root :

dmesg to get info from the kernel

You should get your answer :

$ dmesg | grep eth
divert: not allocating divert_blk for non-ethernet device lo
divert: allocating divert_blk for eth0
e1000: eth0: e1000_probe: Intel(R) PRO/1000 Network Connection
divert: allocating divert_blk for eth1
e1000: eth1: e1000_probe: Intel(R) PRO/1000 Network Connection
e1000: eth0: e1000_watchdog_task: NIC Link is Up 100 Mbps Full Duplex
e1000: eth0: e1000_watchdog_task: 10/100 speed: disabling TSO
divert: not allocating divert_blk for non-ethernet device sit0
0
 
LVL 8

Assisted Solution

by:Rance_Hall
Rance_Hall earned 300 total points
ID: 20427539
My first introduction to modules.conf was on a gentoo box.

Iif you change the order that the modules are loaded you get eth0 assigned to different nic.

as far as the furthest to the right, I think thats the MB pci slot order, but different MB makers can put them in another order if they want to.

This is one think that freebsd got right, when a kernel driver detects an ethernet card, the card is not given ethX as a name, its given a name that is related to the driver that is loaded to run the card.

so then you end up with vr0 and xl0 and whatever else.  its still in MB pci port order, but its alot nicer (IMO)







0
 

Author Closing Comment

by:itguy411
ID: 31413266
This was one of the best, accurate and total solutions I  have had on EE and I love EE.

0

Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question