LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 09-13-2013, 10:25 AM   #1
lems
Member
 
Registered: May 2004
Distribution: Slackware x86, x86_64 & ARM
Posts: 144

Rep: Reputation: 44
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
 
Old 09-13-2013, 10:34 AM   #2
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, Slackware64
Posts: 1,736

Rep: Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834
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.
Old 09-13-2013, 10:53 AM   #3
vdemuth
Member
 
Registered: Oct 2003
Location: West Midlands, UK
Distribution: Slackware 14 (Server),Suse 13.1 (Desktop),, Mepis on the wifes lappy
Posts: 768

Rep: Reputation: 92
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
 
Old 09-13-2013, 11:12 AM   #4
FeyFre
Member
 
Registered: Jun 2010
Location: Ukraine, Vinnitsa
Distribution: Slackware
Posts: 308

Rep: Reputation: 22
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.
Old 09-13-2013, 11:46 PM   #5
lems
Member
 
Registered: May 2004
Distribution: Slackware x86, x86_64 & ARM
Posts: 144

Original Poster
Rep: Reputation: 44
Yep, editing the udev rule did the trick. Thanks a lot.
 
  


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
What determines the assignment of eth0, eth1, eth2, etc.. larold Linux - Hardware 1 02-04-2010 12:07 PM
How to determine which physical interface corresonds to eth0, eth1, eth2, and eth3 karrj Linux - Newbie 5 05-01-2008 07:44 AM
Copying/routing data from eth0 to eth1 and eth2 theVOID Linux - Networking 3 04-14-2008 06:30 AM
eth0 - eth1 - eth2 and how to determine which driver they are using vharishankar Linux - Networking 7 06-02-2005 10:52 PM
eth0 eth1 and eth2 on boot sergiodemoura Linux - Newbie 4 12-03-2003 01:21 AM


All times are GMT -5. The time now is 12:44 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