LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices


Reply
  Search this Thread
Old 06-06-2020, 12:23 PM   #1
wirelessmc
Member
 
Registered: Aug 2008
Location: San Diego County
Distribution: Slackware
Posts: 183

Rep: Reputation: 37
eth0 changed to eth1 when replacing motherboard


The network interface is still eth0 in /etc/udev/rules.d/70-persistent-net.rules:

# PCI device 0x8086:0x1539 (igb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="30:9c:23:b6:10:0c", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"


I have worked around this for now by turning on USE_DHCP[1]="yes" in /etc/rc.d/rc.inet1.conf

...but...

I'd like to know how to reset the DEVNAME back to eth0 and what/why exactly caused this when I swapped out my dead motherboard.

Thanks, wirelessmc
 
Old 06-06-2020, 12:41 PM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Is this the MAC address of the NIC on the new motherboard: 30:9c:23:b6:10:0c?
 
Old 06-06-2020, 02:56 PM   #3
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by wirelessmc View Post
The network interface is still eth0 in /etc/udev/rules.d/70-persistent-net.rules:
Normally that file keeps the OLD MAC address (which isn't there anymore) as eth0, so the new detected one becomes eth1
The solution mostly is to remove /etc/udev/rules.d/70-persistent-net.rules altogether and reboot to let it be REgenerated with the curently present MAC address for the the interface.
 
1 members found this post helpful.
Old 06-06-2020, 03:08 PM   #4
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,173

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
As ehartman suggested, remove the 70-persistance-net.rules and reboot. The system will make a new file with the new nic info.
 
1 members found this post helpful.
Old 06-06-2020, 03:41 PM   #5
wirelessmc
Member
 
Registered: Aug 2008
Location: San Diego County
Distribution: Slackware
Posts: 183

Original Poster
Rep: Reputation: 37
Thumbs up

Thanks guys. That was it. The old MAC address from the previous MB was in the /etc/udev/rules.d/70-persistent-net.rules file.
I should have figured that one out myself. Duh!

I removed the old rules file and rebooted -but- I suppose I could have also just edited that rules file with the new MAC and run /etc/rc.d/rc.inet restart

I suppose some clever person (who frequently swaps out his NIC or MB) has written a start-up script to clobber and replace that file if the MAC (in the rules file) is not detected on boot.
 
1 members found this post helpful.
Old 06-07-2020, 01:18 AM   #6
kingbeowulf
Senior Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware
Posts: 1,266
Blog Entries: 11

Rep: Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744
IIRC, via network manager (aka network mangler) or rc.inet1.conf, you can clone/spoof the MAC address for each interface. For eth0, add, for example,
Code:
# Config information for eth0:
IPADDR[0]="192.168.1.3"
NETMASK[0]="255.155.255.0"
IPALIASES[0]=""
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""
HWADDR[0]="30:9c:23:b6:10:0c"
Now when /etc/udev/rules.d/70-persistent-net.rules for fixed IP it will get that MAC and never see the one from the motherboard - you can then plug that HD in into any motherboard - no scripts required.
 
Old 06-07-2020, 05:01 PM   #7
wirelessmc
Member
 
Registered: Aug 2008
Location: San Diego County
Distribution: Slackware
Posts: 183

Original Poster
Rep: Reputation: 37
Thanks so much kingbeowulf! Your suggestion of using fixed IP addresses might just solve another issue. One even more pressing is the machines that use IPV6 by default on my local network (i.e. over IPV4) have name resolution issues with the older machines that default to IPV4. This would no longer be an issue since I could then use a /etc/hosts file with fixed addresses. I have always just assumed that my home (AT&T) router will only assign addresses via DHCP. It might be perfectly happy with static IP addresses but I haven't really tried configuring it to do so. I will look into this. Thanks!
 
Old 06-13-2020, 12:00 AM   #8
kingbeowulf
Senior Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware
Posts: 1,266
Blog Entries: 11

Rep: Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744
wirelessmc,
I have a few fixed IP on my home network. I use that IP and MAC reservervations in the Netgear wifi router (DD-WRT) so that they too get a human readable name. Better than having to remember to update hosts files on serveral boxes!

Look for services management, dhcp static leases. Also may need to enable dnsmasq (DD-wrt and OpenWRT). On some factory stock router firmware (Netgear I am looking at you!), setting up static leases and hostnames (DNS) is not possible. Thus for a dhcp lease 192.168.1.x -> name.domain but for a static IP just the IP, no name (unless you just go ahead an fire up a slackware box to do local DNS).
 
  


Reply



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
Can't bring up eth0 or eth1 after replacing main harddrive (centos) abefroman Linux - Networking 8 08-28-2013 01:27 PM
is this legal: can still ping eth1 through eth0, even if eth1 cable is unplugged 5883 Linux - Networking 2 12-05-2012 03:55 AM
howto acess intrnet thru eth1(wireless card)in winXP via briging in linux(eth0-eth1) labhesh_popli Linux - Wireless Networking 1 09-21-2006 01:11 AM
eth1 added, mysql connections FROM this machine are from eth1. Need bound to eth0??? kreese Linux - Networking 9 03-31-2004 12:12 PM
Kernel 2.4.22 finds eth0 and eth1 but 2.6.0 does not find eth1 coollink Linux - Networking 3 01-13-2004 07:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration