Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-13-2013, 10:25 AM
|
#1
|
Member
Registered: May 2004
Distribution: BSD
Posts: 269
Rep: 
|
After switching computers, eth0 became eth1 and then eth2
Hello,
when my desktop PC's motherboard died, I got another computer and put in my old hard drive from the broken PC. This worked fine, though eth0 then became eth1. Now that I replaced the motherboard, I put the hard drive from my replacement PC into my old desktop PC, and there eth1 now became eth2. How can I fix that? Do I need to fix this, or should I ignore it?
Thanks.
lems
|
|
|
09-13-2013, 10:34 AM
|
#2
|
MLED Founder
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453
|
Take a peek in /etc/udev/rules.d/70-persistent-net.rules. You should find a series of stanzas like this one:
Code:
# PCI device 0x10ec:/sys/devices/pci0000:00/0000:00:0a.0/0000:02:00.0 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:1f:d0:ae:ec:fe", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*",
NAME="eth0"
Edit them according to your needs, e. g. NAME="ethX".
Cheers,
Niki
|
|
2 members found this post helpful.
|
09-13-2013, 10:53 AM
|
#3
|
Member
Registered: Oct 2003
Location: West Midlands, UK
Distribution: Slackware 14 (Server),OpenSuse 13.2 (Laptop & Desktop),, OpenSuse 13.2 on the wifes lappy
Posts: 781
Rep:
|
I have something similar going on here with a motherboard with 2 network interfaces. But it seems they both have the same mac address, which in itself is odd.
Tried editing the 70-persistent-net-rules file but eth0 keeps getting changed to rename2. Any ideas what I can do to alter this. For instance, is there a permanent way to change the mac address of one of the i/faces?
TIA
|
|
|
09-13-2013, 11:12 AM
|
#4
|
Member
Registered: Jun 2010
Location: Ukraine, Vinnitsa
Distribution: Slackware
Posts: 351
Rep:
|
It must be so. System remembers network interfaces it ever found in system permanently(by its MAC) and associates own eth# name for each.
However you can reset this. Just remove file /etc/udev/rules.d/70-persistent-net.rules
|
|
2 members found this post helpful.
|
09-13-2013, 11:46 PM
|
#5
|
Member
Registered: May 2004
Distribution: BSD
Posts: 269
Original Poster
Rep: 
|
Yep, editing the udev rule did the trick. Thanks a lot.
|
|
|
All times are GMT -5. The time now is 07:54 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|