I just upgraded a number of x86_64 boxes from 12.2 to 13.1. All of computers sit behind a firewall which can also act as a DHCP server. One of the computers is dual homed with one ethernet interface on an external network. All of the internal ethernet interfaces had static IP addresses assigned and everything worked fine. I upgraded to 13.1 and the upgrade successfully preserved the network settings at least by looking at the “Network Settings” in Yast as well as looking at the /etc/sysconfig/network/ifcfg-eth0 script. However, when the system boots, it comes up with an IP address which it shouldn’t have. If I manually change the IP address to what it should be, everything works as it should. However, the proper configuration does not persist across boots. I don’t know how many times I’ve saved the static IP address setup, only to have it change after I hit “Save” in the “Network Settings”. I’m getting pretty frustrated – the configuration looks right, but what the systems actually do is different from how they are configured.
It seems to me that the hosts are accepting DHCP data when they should not be.
If anyone can offer some guidance, I would greatly appreciate it. Thanks.
Read the release notes, or search this forum. The “eth0” style of naming network interfaces has changed, they now have names like “enp3s0”. It is much easier to delete all the network device settings and start again. If you have a lot of machines, you could configure your DHCP server to allocate fixed/static IP addresses to each MAC.
You disable the assignment of fixed names, so that the unpredictable kernel names are used again. For this, simply mask udev’s rule file for the default policy: ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules (since v209: this file was called 80-net-name-slot.rules in release v197 through v208)
You create your own manual naming scheme, for example by naming your interfaces “internet0”, “dmz0” or “lan0”. For that create your own udev rules file and set the NAME property for the devices. Make sure to order it before the default policy file, for example by naming it /etc/udev/rules.d/70-my-net-names.rules
You alter the default policy file, for picking a different naming scheme, for example for naming all interface names after their MAC address by default: cp /usr/lib/udev/rules.d/80-net-setup-link.rules /etc/udev/rules.d/80-net-setup-link.rules, then edit the file there and change the lines as necessary.
You pass the net.ifnames=0 on the kernel command line (since v199)
Regarding point 2, you can also use YaST to rename the interface to whatever you like (eth0 f.e.), this creates a file /etc/udev/rules.d/70-persistent-net.rules which will be respected even after future upgrades (my interfaces f.e. are still called eth0 and wlan0 even on 13.1 ).
But I’m not sure whether it will use the current ifcfg-eth0 in this case. It could be that YaST overwrites it and you have to configure it again anyway.
I think what I would try is to first pass the “net.ifnames=0” kernel option, use YaST->Network Devices->Network Settings->Edit to create that /etc/udev/rules.d/70-persistent-net.rules files, and then remove the kernel option again.
This would would seem to match “How do I disable this” point #2 from the freedesktop.org site. However, I want to go with the new way of doing things. Can I just delete the file, reboot, and hope everything comes up correctly?
But I think that if you use YaST > Network Devices
to delete all existing interfaces then [OK]
Go back into the Network Devices module and configure the interfaces,
that should fix everything to the new scheme.
I removed the 70-persistent-net.rules and rebooted the machine. I then edited the network setting to set the static IP address to the desired value, and rebooted again. The ethernet device name came up with the new fangled device name (enp3s0), but the IP address I assigned is not the IP address which is assigned to the interface. Looking into the /etc/sysconfig/network/ifcfg-enp3s0 file shows the correct (i.e. my assigned address) IP address. But, again, this differs from the IP address actually used by the interface.
This is minor progress, but I cannot understand why the IP address doesn’t assign correctly for a static address. Could this really be a DHCP related problem?
Also, the 70-persistent-net.rules file was not regenerated on boot up; I thought it might be.
Test the DHCP theory by restarting the network with the ethernet cable disconnected. I assume that you are using Traditional/ifup (not network manager) and Activate device At Boot Time (YaST Network Settings).
Continuing to probe my system for information. In the Yast2->Services Manager, I can find references to the bad IP address being set by the Avahi-daemon service. There is also a similar reference under dbus-org.freedesktop.Avahi Full Info.
Can the avahi-daemon be turned off without wreaking havoc on the system?
That’s NetworkManager, so apparently you have BOTH ifup and NetworkManager enabled. (might be caused by the fact that you upgraded from 12.2 to 13.1. On 12.2 NetworkManager.service was always enabled and an environment variable decided whether it would start NetworkManager or not)
Enter YaST->Network Devices->Network Settings->Global Options, and switch to “User-controlled using NetworkManager” and click on OK. Then enter it again and switch back to ifup. That should fix it.
Check* YaST2 - services-manager* and make sure that Network Manager is Disabled and Inactive.
Also apply all recommended updates – there were some problems with the* yast2 lan* module, although I doubt it is an issue here.
Bingo!! When I changed to “Network Manager” and press “OK” it began to reconfigure the networking and then gave an error saying to network. Then I went back into the Network Setting and changed it back to Traditional ifup, and it work. Just be sure, I rebooted and it came up properly.
W00t!!! I am so happy. You are genius! Thanks for all your help.