SlackwareThis 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.
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.
It's not that I want the same ipv4 IP address on both eth0 and eth1, but this is the first time in in more than 20 years that the default interface has been eth1 and not eth0.The system is not seeing eth0, only eth1. Why this is I have no idea.
But, I did add the ipv4 IP address by running '/etc/rc.d/rc.inet1 eth1_start' which I've not before needed to do. Now this host sees other hosts on the LAN and can reach outside the network.
Occasionally (and recently) I'm also struggling to order multiple Ethernet adapters and started to make a habit out of editing the:
/etc/udev/rules.d/70-persistent-net.rules
Occasionally (and recently) I'm also struggling to order multiple Ethernet adapters and started to make a habit out of editing the:
/etc/udev/rules.d/70-persistent-net.rules
How interesting! Please confirm my understanding; that is, I can edit /etc/udev/rules.d/70-persistent-net.rules and add the above line for eth0 (ignoring the one for eth1) and then reset rc.inet1 and inet1.conf to use eth0. This would be consistent with all other hosts I've used.
I just checked 70-persistent-net.rules. It was similar to the above, but has the MAC address (6 octal numbers) as well as two extra key/value pairs: KERNEL=="eth*", NAME=="eth0"
So it looks like only eth0 is defined, yet the system is seeing eth1 instead.
I just tried changing the Ethernet interface to 0, but after changing rc.inet1.conf, rc.inet1, and restarting rc.inetd I could not bring up eth0. ifconfig told me there is no such device on this Asus Prime X470-Pro motherboard. Sigh.
I'll learn to live with this one host using eth1 while everyone else uses eth0.
I just checked 70-persistent-net.rules. It was similar to the above, but has the MAC address (6 octal numbers) as well as two extra key/value pairs: KERNEL=="eth*", NAME=="eth0"
So it looks like only eth0 is defined, yet the system is seeing eth1 instead.
Does the MAC address in that file match the MAC address of your card? If not, then eth0 is being reserved for the MAC address specified in that entry and your device would never get it. If it doesn't match, try replacing the MAC address in that file with the one from your device.
If it does match, then I'm not sure what could be causing the problem. You could try and change the logging levels of udev to hopefully allow some additional logging to give you some hints on why it isn't working. Supposedly you can change the running udev logging using udevadm control --log-priority=info, however, I'm not sure the easiest way to get udev to try and assign names again... maybe rmmod-ing and then modprobe-ing the module for that device. You should also be able to change the default log level in /etc/udev.conf, but I don't have a computer in front of me to look at the file. Changing the logging should allow output to /var/log/syslog and/or dmesg.
How interesting! Please confirm my understanding; that is, I can edit /etc/udev/rules.d/70-persistent-net.rules and add the above line for eth0 (ignoring the one for eth1) and then reset rc.inet1 and inet1.conf to use eth0. This would be consistent with all other hosts I've used.
Yes, you're right, if you edit /etc/udev/rules.d/70-persistent-net.rules and add only the line for eth0 providing its actual MAC Address, it'll instruct udevd to name that interface as eth0 on the next boot. Cannot guarantee how the other Ethernet adapters will be named, thus, it's recommended to care about all of them in /etc/udev/rules.d/70-persistent-net.rules.
This is ordering the interfaces based on their MAC addresses as unique identifiers, but there are other options too. You can order them based on the PCI/PCIe slot they're connected to, check with lspci, like here: https://www.linuxquestions.org/quest...ml#post5859800
You could also make use of these two utilities: https://linux.die.net/man/8/nameif https://linux.die.net/man/8/ifrename
Quote:
I just checked 70-persistent-net.rules. It was similar to the above, but has the MAC address (6 octal numbers) as well as two extra key/value pairs: KERNEL=="eth*", NAME=="eth0"
So it looks like only eth0 is defined, yet the system is seeing eth1 instead.
In post #4 I presented a sample, XX:XX:XX:XX:XX:XX, YY:YY:YY:YY:YY:YY, etc. should be substituted with the actual MAC Addresses of the adapters and, as mentioned above, configure a rule for all available Ethernet adapters, that way udevd won't mess things up.
As bassmadrigal advised, you can increase the verbosity of the udevd daemon, but the interface renaming should be visible in dmesg even without this verbosity increase. Look for lines like:
Typically, this kind of things happens if you move a disk from one computer to another (or if you change the eth-adapter). The old net-rule is still there, but now there is a new mac-address. The vast majority of my rigs have only one eth-adapter, but I do move disks between machines ... My solution is to delete 70-persistent-net.rule on each power-off (/etc/rc.d/rc.local_shutdown). Then, on reboot, the only adapter will be eth0 and it will be the right one.
That's what I also do on Slackware ARM, where I have a SDCard image that I clone and then adapt the system configuration, but valid when I only have one Ethernet adapter.
Does the MAC address in that file match the MAC address of your card? If not, then eth0 is being reserved for the MAC address specified in that entry and your device would never get it. If it doesn't match, try replacing the MAC address in that file with the one from your device.
Looking at 'ifconfig -a' I found the MAC address to be 0c:9d:92:83:63:27. That's not the address in 70-persistent-net.rules, so I changed it. Then I modified rc.inet1.conf by uncommenting the IP address and netmask for eth0 and commenting out the IP address and netmask for eth1. Then I ran 'rc.inet1 start_eth0' and 'rc.inetd restart'.
As a user I pinged www.google.com and connected without delay.
Looking again at ifconfig the ethernet interface is still eth1. When I tried 'ifconfig eth0 up' the kernel again replied that no such device existed.
I think you would either need to rmmod the module for the device and then modprobe it again or simply reboot for it to try and reassign that device a name.
Out of the record above you can read the PCI(e) position 0000:06:00.0 and the MAC Address XX:XX:XX:XX:XX:XX, both helping you in understanding over which interface is which.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.