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
SUSE Linux Enterprise Desktop 11 Service Pack 1
SUSE Linux Enterprise Desktop 11
Situation
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
Follow the steps below to implement the solution.
- 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 - 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> - 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> - Install using the profile
- 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"
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
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com