LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 12-01-2009, 03:45 PM   #1
VG1
LQ Newbie
 
Registered: Mar 2008
Posts: 5

Rep: Reputation: 0
Can Eth device names(or macs) be correlated to the physical eth port?


I am building a custom RedHat+<our-software> installer iso for our own appliance. Im using Red Hat 5.4. The appliances has two on-board eth interfaces. On the back panel of the appliance, these ports are marked 1 and 2.

When I install RH, I find the device names assigned such as eth0/eth1 are arbitrary. I understand this is to be expected with kernels 2.6+

Most of our customers connect their eth cables to the port marked 1 on the back and assume they should configure eth0 to make the device reachable. However, sometimes port 1 gets assigned eth1. This is not a blocking issue, but its going to confuse our customers and we wanted to make it easier on them.

From reading online discussion boards, I know HOW to switch the assignment of the eth names. However, what Im do not know is WHETHER I need to switch them at all. So I have two questions -

1)Is there anyway for me to tell which eth mac corresponds to which port on the back? Since they are soldered on the motherboard and not movable, I would think there would be some way to figure out that x mac address corresponds to the upper port (marked 1 etc).

2)Is there a way to tell this by running a linux command? We need to do this automatically so I need to be able to figure it out at install time from the kickstart post-install or similar.
 
Old 12-01-2009, 06:13 PM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Wheezy (Fluxbox WM)
Posts: 1,363
Blog Entries: 52

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
The dmesg log will show you the relationship between the device name, irq, address, and MAC, for example:

Code:
dmesg | grep 'eth.*irq'
I'm guessing the mapping address at least will be consistent (and different) between the two interfaces, but I don't know what your ethernet hardware is.

You can also use lsdev in combination with ifconfig -a.

I take it the MAC addresses aren't labelled on the appliance (I'm assuming you will edit /etc/udev/rules.d/70-persistent-net.rules to force the device name based on MAC address).

Last edited by neonsignal; 12-01-2009 at 06:19 PM.
 
  


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
Set up IP on specific eth device? johnnybhoy67 Linux - Networking 3 10-21-2005 12:33 PM
Need help with shapecfg working with virtual eth device rdmaxx Linux - Networking 1 02-10-2005 04:38 PM
Device 'eth' doesn't exist Moth7 Linux - Networking 2 10-24-2003 04:45 PM
Change Eth Device gamehack Slackware 4 09-01-2003 11:31 AM
Cannot activate eth device kakridge Linux - Networking 4 07-14-2003 08:22 PM


All times are GMT -5. The time now is 07:25 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration