Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
1  
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/… –  goldilocks Mar 29 '13 at 16:21
    
@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 Mar 29 '13 at 16:26
1  
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 Mar 29 '13 at 19:16
1  
[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. –  goldilocks Mar 29 '13 at 19:17
1  
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. –  njsg Mar 30 '13 at 7:55
show 2 more comments

1 Answer

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|improve this answer
    
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). –  Pavel Šimerda Mar 28 at 22:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.