Solved

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

Posted on 2007-12-06
7
986 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
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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Hyper-convergence systems have taken the IT world by storm and have quickly started to change our point of view of how the data center should and could be architected. In this article, I’ll explain the benefits of employing a hyper-converged system …
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 several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

816 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now