openSUSE 13.1 network config

Hi.

I’m having an interesting problem here. I’m using Virtualbox and I just did an upgrade from openSUSE 12.1 to 13.1 (x86_64). I was using a bridged network adapter in Virtualbox, with a fixed IP address in openSUSE.

Now, after the upgrade, for some reason the IP changed to a different one, and no matter what I do, it comes up after reboot every time with that same IP - let’s say it is X.Y.Z.67, when before I was using X.Y.Z.13.

I tried setting the right IP in YaST, no go. I tried setting it to DHCP and back to manual, no go. If I look in /etc/sysconfig/network/ifcfg-eth0, there is the right IP written there. But no matter what I do, when I reboot, the X.Y.Z.67 IP comes up. Oh, and dhcpcd is not running.

The network connection otherwise still works. And another interesting thing - don’t remember seeing it anytime before: when I do “ifconfig eth0 X.Y.Z.13 up”, the default route gets deleted, and I have to add it again ?!?

Does anyone have any idea what is going on, or what I’m doing wrong? Thanks!

Well if the IP number change did not effect performance I say its not a big deal.
If its not causing you issues then isnt that a good thing and more of a minor quirk?

I have a bunch of scripts that use a hardcoded IP, so it is at least an annoyance, since I will have to update them all. But I’d say not being able to set the IP is not a good think, or a quirk, it is quite a huge bug, don’t you think?

You need to read the release-notes. They should be found in YaST. The network naming convention has changed and “eth0” et al are deprecated. Make sure that you have the release version of 13.1 plus updates. The “yast2-network” module did not work properly with the new names until recently. Mixing “ip addr” (or the old “ifconfig”), and the old naming convention, with YaST and the new naming leads to confusion.

But an upgrade shouldn’t change the old names.
I still have eth0 and wlan0 here (and everything works fine).

But he really could suffer from the problem mentioned in the release notes, that an interface might be configured twice.

4.3. Duplicated Network Interfaces

The current version of systemd uses a new convention for assigning
predictable names to network interfaces. YaST is changed accordingly.


Some reports indicate a bug in YaST when conversion from one naming scheme
to another takes place. If the same network interface has two different
names, you have been hit by this bug. In this case remove the different
network interfaces in /etc/sysconfig/network and use YaST to configure the
network anew.


For more information about predictable network interface names, see http://
www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
.

Hi guys, thanks for your help.

I did look at the release notes, but it seems it was an older version, didn’t mention anything about the duplicate names etc. Also, it seems I have to upgrade / modernize my linux knowledge, since I’m still used to using ifconfig and route commands instead of the more modern ones :wink:

Anyway, I also tried upgrading a openSUSE 12.3 machine, but the upgrade got botched up and didn’t complete successfully. Since my openSUSE installations have been upgraded god knows how many times, I just decided to do a clean install and it works great. I’ll try another upgrade from 12.1 to see if I can fix the ethernet errors, otherwise I’ll just stick with the clean install.

Cheers!

On 2013-11-20 13:06, wolfi323 wrote:

> But an upgrade shouldn’t change the old names.

But it does.

> I still have eth0 and wlan0 here (and everything works fine).

Not me. I get the old name (eth0) which does not work, and the new name
(ens33) which is not configured. I had to delete eth0 and configure
ens33 to get network.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

On 2013-11-21 10:56, rkrajnc wrote:
> I did look at the release notes, but it seems it was an older version,

You have to look at the local copy of the release notes, in
“/usr/share/doc/release-notes/”.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

It didn’t here.

> I still have eth0 and wlan0 here (and everything works fine).

Not me. I get the old name (eth0) which does not work, and the new name
(ens33) which is not configured. I had to delete eth0 and configure
ens33 to get network.

The point is, I guess, whether you have the interface names set in /etc/udev/rules.d/70-persistent-net.rules or not.
If you have, they won’t change on upgrade.

Otherwise the default names are used for the interface, and those have changed in 13.1.

In your case I guess there was still the config for eth0 present (in /etc/sysconfig/network), but the interface got a new name, so eth0 didn’t work anymore.

You can still rename the interfaces in YaST->Network Devices->Network Settings though:
Select your interface and click on “Edit”, then switch to the Hardware tab and click on “Change Name” next to “Device Name”.
This should create that rules file then.

Is this how I would convert over to the new naming convention, or is there something else to do?

I too am left with the eth0, eth1 … but would like to use the new standard.

No. With this you can set any name you want (well, within certain limits I guess :wink: )

To get the new naming scheme, just remove the file /etc/udev/rules.d/70-persistent-net.rules.
And you should remove the old configuration files for eth0, eth1, … from /etc/sysconfig/network/ as well of course (ifcfg-eth0 and so on).

On 2013-11-21 14:06, wolfi323 wrote:

> The point is, I guess, whether you have the interface names set in
> /etc/udev/rules.d/70-persistent-net.rules or not.

I don’t use that.

> If you have, they won’t change on upgrade.
>
> Otherwise the default names are used for the interface, and those have
> changed in 13.1.
>
> In your case I guess there was still the config for eth0 present (in
> /etc/sysconfig/network), but the interface got a new name, so eth0
> didn’t work anymore.

Of course I had the old config files, it was an upgrade.

> You can still rename the interfaces in YaST->Network Devices->Network
> Settings though:
> Select your interface and click on “Edit”, then switch to the Hardware
> tab and click on “Change Name” next to “Device Name”.
> This should create that rules file then.

Mmm… interesting.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Right.
And that’s the reason why your interface names got changed to the new scheme.

But if the interface names are set in that file, nothing changes on upgrade. If it does, it would be a bug.

> In your case I guess there was still the config for eth0 present (in
> /etc/sysconfig/network), but the interface got a new name, so eth0
> didn’t work anymore.

Of course I had the old config files, it was an upgrade.

And that was your problem. Apparently the old config files don’t get removed on upgrade.

I think I have seen a bug report about this from you, right?

On 2013-11-21 23:56, wolfi323 wrote:
> I think I have seen a bug report about this from you, right?

No, I reported the find on the factory mail list, as a RFC. If others
suggest it is a bug, I write a bugzilla. I reported about half a dozen
issues on bugzillas, but not this one.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

https://bugzilla.novell.com/show_bug.cgi?id=846550

I’ve got an interesting problem with ifup configuration through yast. Clean new installation as a virtual machine guest under openSUSE 12.3 running KVM selects virtio as the network driver type (seems proper). Initial boot following load retains my network configuration (eth0 is using virtio). Next boot, the configuration shows “ethernet card 0 - not connected”. If I go into yast2 lan, and flip it to network manager, then back to ifup … the NIC begins working again. If I boot again, I’m back where I started. I have removed the configuration and re-added it (as previous posters have also done), but this has not changed the behavior.

It’s probably not such a great choice installing openSUSE 13.1 as a guest on an openSUSE 12.3KVM box, but it’s what I was playing with.

Thoughts?

Follow-up:

Using network manager, rather than using yast lan, I have been able to configure my static ip address and it’s worked following reboots. What’s disconcerting is that the ifup configuration through yast is apparently not observed. I did see in /var/log/messages that the service was being stopped just after committing the configuration changes for ifup. Thought that might help someone if they were experiencing the same problems.

No, it is not. Interfaces on virtual systems were exempt from persistent naming and were never entered into this file. That’s why users on virtual systems suddenly found their interfaces with changed names. On real hardware file was automatically maintained so there new names were not applied after update. It does not mean that interfaces always get desired names though … so I would not count on it.

[quote="“arvidjaar,post:18,topic:95110”]

No, it is not. Interfaces on virtual systems were exempt from persistent naming and were never entered into this file. That’s why users on virtual systems suddenly found their interfaces with changed names.[/QUOTE]
Yes it is.
The reason, why his interface names got changed, is that they are/were not listed in this file.
And on upgrade, that file should not be deleted or changed.

I didn’t say anything as to why they were not in there in the first place. :wink:

I just ran through this same problem - your yast2 modules are probably out of date. Run zypper up and you should get a list of yast2 updates.