SUSE Support

Here When You Need Us

How to ensure predictable network device names with AutoYaST

This document (7006937) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 11 Service Pack 1
SUSE Linux Enterprise Server 11
SUSE Linux Enterprise Desktop 11 Service Pack 1
SUSE Linux Enterprise Desktop 11

Situation

When mass installing SUSE Linux Enterprise (SLE) 11 and newer versions on hardware with similar hardware configuration including more than one network interface card (NIC), the enumeration of eth? devices may be inconsistent across machines. This can be due to minor differences in the hardware like which NIC that answers first etc.
As an example an on-board NIC may be named eth0 in one host, while an extra NIC gets assigned eth0 and the on-board is eth1 in another host.

Resolution

This can create a variety of problems, but can be avoided by defining <net-udev> rules based on the PCI bus IDs of the NICs in the AutoYaST profile that is being used to install the machines.

Follow the steps below to implement the solution.
  1. Determine the PCI IDs of the different NICs in an already installed system. This is the value of "SysFS BusID" for each of the NICS in the output of the command
    # hwinfo --netcard
    e.g. 0000:04:01.0
  2. Make sure there is an interface definition for each of the NICs in the <interfaces> section in the AutoYaST profile. E.g. :
         <interface>
           <bootproto>dhcp4</bootproto>
           <device>eth0</device>
           <startmode>auto</startmode>
         </interface>
         <interface>
           <bootproto>dhcp4</bootproto>
           <device>eth1</device>
           <startmode>auto</startmode>
         </interface>
  3. Define a rule for each NIC in a <net-udev> subsection of<networking> like below :
       <net-udev config:type="list">
         <rule>
           <name>eth0</name>
           <rule>ID</rule>
           <value>0000:04:04.0</value>
         </rule>
         <rule>
           <name>eth1</name>
           <rule>ID</rule>
           <value>0000:04:01.0</value>
         </rule>
          ...
       </net-udev>
  4. Install using the profile
  5. After the installation the eth devices should be defined as expected based on rules created in /etc/udev/rules.d/70-persistent-net.rules.
    The example above would lead to a rules file with the following content :
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ID=="0000:04:04.0", NAME="eth0"
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ID=="0000:04:01.0", NAME="eth1"
It is of course also possible to base the rules on other sysfs attributes, but detailing that is beyond the scope of this document.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7006937
  • Creation Date: 28-Sep-2010
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Desktop
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.