OpenSuse 12.3 keeps renaming network interfaces?

5,883

It's a known bug. https://bugzilla.novell.com/show_bug.cgi?id=809843

It seems that the next update fixes the issue

To circumvent temporary the problem, use another name instead of ethX.

Note: YAST will configure the networks right, but want display the settings. (This can be also fixed)


Example

  1. Copy in /etc/sysconfig/network

    ifcfg-eth0 to ifcfg-net0 and ifcfg-eth1 to ifcfg-net1
    
  2. Edit /etc/udev/rules.d/70-persistent-net.rules

    SUBSYSTEM=="net", ... NAME="eth0"
    SUBSYSTEM=="net", ... NAME="eth1"
    

    to

    SUBSYSTEM=="net", ... NAME="net0"
    SUBSYSTEM=="net", ... NAME="net1"
    
Share:
5,883

Related videos on Youtube

rubber boots
Author by

rubber boots

"Wer sich nicht wehrt, landet am Herd." (german saying) Who is not struggling, ends up at the stove. Toute personne qui ne se défend pas, les terres à la poêle. Cualquier persona que no se defiende, las tierras en la cocina. Chi non si difende, le terre ai fornelli.

Updated on September 18, 2022

Comments

  • rubber boots
    rubber boots over 1 year

    After installing OpenSuse 12.3 (x64) on a server box with a single (onboard) NIC (assigned to eth0), all works fine so far (static IP, static route, no "Network Manager" - just the good old way).

    Because this box will be a server, I added two additional NICs. Now the problems start to show. The device names changed in a way, that the functional eth0 (on board, external IP) is now re-assigned to eth2 (or eth1, probably depending on unknown preconditions).

    How to solve this? Any idea how to set up a network configuration with device names based on established convention (eth0 = external IP, eth1 .. ethN fur subnets 1..N)?

    Never ever there have been any problems in preceeding SuSE versions. Maybe it's caused by an arcane systemd which looks like it cannot be disabled anymore?

    • goldilocks
      goldilocks about 11 years
      I think the preferred method to deal with this is to create appropriate udev rules. This is from the LFS guide but should apply equally well to any linux: linuxfromscratch.org/blfs/view/development/chapter07/…
    • rubber boots
      rubber boots about 11 years
      @goldilocks this looks promising. Thank you, can you put up "a regular answer", I will honour it then ;-) -- BTW, it looks like udev/systemd makes the admin's work more PITA than ever ...
    • rubber boots
      rubber boots about 11 years
      @goldilocks I checked the udev rule and the said NIC is correctly given eth0 already. But: eventually it gets eth1 assigned if another NIC is present (PCIe) which is also correctly named eth1 in the udev rule. Seems 12.3 w/systemd/udev is unfit for server config?
    • goldilocks
      goldilocks about 11 years
      Try (temporarily) changing the udev rules that are there slightly to give the interfaces names other than the standard ethN, and reboot to see if they are actually being applied at all (eg. there could be another rule that's superseding them). Use the MAC addresses in the rule and not the pci bus position.
    • goldilocks
      goldilocks about 11 years
      [con't] BTW, systemd is not really related to udev. They both take some playing with to get used to though. Unfortunately udev has evolved and some of the online material is outdated, which that link may be too (it seems to be dated 2007). I have not done this with NIC's so can't say one way or the other. You might want to put together another question, something like "How to configure a NIC using udev rules". The distro should not make any difference in this regard, udev is universal on linux.
    • kmacdonald
      kmacdonald about 11 years
      Which version of udev are you running? Recent versions of udev dropped support for swapping interface names (for example eth1 <-> eth0). If you want to get persistent names, you need to give them names outside of ethX.
    • rubber boots
      rubber boots about 11 years
      @njsg - thats it. I gave up on this and have to accept that, I'd guess. Thanks.
  • Pavel Šimerda
    Pavel Šimerda about 10 years
    I'm not sure about the temporary nature of the problem as the eth0/eth1 swapping (and all other renaming to a name normally allocated by kernel) has been deprecated by udev/systemd upstrem and is now unsupported. It would be nice if you could back up the claim. Will up the answer nevertheless as it provides a solution (in the example section).