Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2007-12-06
7
Medium Priority
?
1,017 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 1200 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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
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 800 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 1200 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

More or less everybody in the IT market understands the basics of Networking, however when we start talking about Storage Networks, things get a bit dizzier, and this is where I would like to help.
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

718 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