?
Solved

How can I force a network device to always be eth0 (for example)?

Posted on 2006-04-21
2
Medium Priority
?
345 Views
Last Modified: 2008-03-10
I've recently figured out a problem when upgrading from 2.4 kernel to 2.6. It was because the 2.4 kernel detected my (in use) network adapter as eth0 while the 2.6 kernel detected the unused network adapter as eth0 instead.  I had to configure eth1 to get the 2.6 kernel on the network.

1. Was it detected differently because of udev?
2. Can I force a network adapter to always be eth0?

Many thanks,
Steve
0
Comment
Question by:sda100
2 Comments
 
LVL 43

Accepted Solution

by:
ravenpl earned 1000 total points
ID: 16507593
Example from my RH system
file: /etc/udev/rules.d/10-localeth.rules content
KERNEL="eth*",SYSFS{address}="00:e0:81:40:03:da",NAME="eth0"
KERNEL="eth*",SYSFS{address}="00:e0:81:40:03:db",NAME="eth1"
KERNEL="eth*",SYSFS{address}="00:e0:81:40:03:13",NAME="eth2"

Also, You can use ifrename tool http://www.die.net/doc/linux/man/man8/ifrename.8.html
0
 
LVL 9

Author Comment

by:sda100
ID: 16507616
Thank you.  I use Gentoo, which is slightly different but you pointed me in the right direction, and I've solved my problem.  Thank you very much.

Steve :)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month13 days, 9 hours left to enroll

750 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