Upgraded 12.2 -> 13.1 now static IP addresses breakage,


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.

Well, you can also disable the new naming scheme and continue to use the old one.
From http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ :

I don’t like this, how do I disable this?

You basically have four options:

  1. 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)
  2. 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
  3. 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.
  4. 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 :wink: ).
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.

Thanks for the feedback. I looked at my /etc/dev/rules.d/70-persistent-net.rules file. Here is the only real line:

<code>SUBSYSTEM==“net”, ACTION==“add”, DRIVERS=="?", ATTR{address}==“aa:bb:cc:dd:ee”, ATTR{dev_id}==“0x0”, ATTR{type}==“1”, KERNEL=="eth", NAME=“eth0”

(MAC address has been obscured)

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?


In a clean install the file is present, but empty. I would:

#  cat /dev/null > /etc/udev/rules.d/70-persistent-net.rules

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.


You do not need to reboot

# systemctl restart network.service
#  ip addr

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).

Check that you do not have a rogue* /etc/sysconfig/network/ifcfg-** file
or some custom settings in * /etc/sysconfig/network/dhcp*

You could try e.g.

:>  grep -r "192.168" /etc/

Yes, I am using the traditional ifup, and the device is activated at boot time.

When I do the systemctl command with the cable disconnected it comes up with the proper address. When I plug the cable back in and do a systemctl restart then it comes up with the wrong IP address.

This would lead me to conclude it is an issue of DHCP client overriding the static settings. Do you agree?

The only place in /etc/ where 192.168.xxx (where xxx is my subnet) is in the places where it should be: /etc/hosts, /etc/exports,
/etc/sysconfig/network/routes and /etc/sysconfig/network/ifcfg-enp3S0

Here is some additional info I just got from this command:

ps aux | grep hcp

There is a dhcp client running as shown by the output:

root      5549  0.0  0.0  14276  7856 ?        S    11:43   0:00 /sbin/dhclient -d -sf /usr/lib/nm-dhcp-client.action -pf /var/run/dhclient-enp3s0.pid -lf /var/lib/NetworkManager/dhclient-6d58de3d-743d-479d-bf2c-2a90d7f997c3-enp3s0.lease -cf /var/lib/NetworkManager/dhclient-enp3s0.conf enp3s0

So, why the heck is dhclient running? Where can I turn this off?

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.