Skip to content

confignetwork_configure_consistent_devicename

Yuan Bai edited this page Dec 23, 2015 · 1 revision

1. Interface between confignetwork and getadapter:

getadapter can save data into nics table nicinfo column table, then confignetwork can use them directly.

New column named nicinfo will be added into nics table, the data format is comma-separated list of adapter information. Device name can be new network interface name. User can change <devicename> using tabedit nics or chdef command.

The value for nicinfo format is as following:

<devicename>!pci=<pci....> mac=<mac address> candidatename=<candi1,candi2...> verdor=<..> ...,

The format example:

eth0!pci=/pci0003:00/0003:00:00.0/0003:01:00.0/0003:02:09.0/0003:05:00.0 mac=34:40:b5:be:77:50 candidatename=enP3p5s0f0,enx6cae8b021250,
enP3p5s0f1!pci=/pci0003:00/0003:00:00.0/0003:01:00.0/0003:02:09.0/0003:05:00.1 mac=6cae8b021251 candidatename=enP3p5s0f1,enx6cae8b021251 vendor=Broadcom Corporation|modle=NetXtreme_BCM5719_Gigabit_Ethernet_PCIe 

2. Procedure for confignetwork to configure consistent devicename

  1. Get nicsadapter data from mypostscript

devicename and mac address, devicename will be new network interface name.

  1. Change current network interface into new network interface name.

    Find the current network interface based on mac.

    If new network interface is not existed:

    Bring down the current network interface before renaming.

    Wait for its state down.

    Rename the network interface from current name to new name.

    Rename in ifcfg configuration file.

    Bring up the network interface, after renaming.

    If new network interface is existed, it is different with current network interface name:

    Change current network interface name with new network interface name.

    Rename both network interface names.

    Backup ifcfg file with current network interface name

    Rename ifcfg configuration file using new interface name.

    Bring up new network interface after renaming.

    If new network interface is existed, it is the same name with current network interface name, do nothing.

  2. Change udev rule for target nic udev rule file name is /usr/lib/udev/rules.d/60-net.rules.

    Get the mac of target network interface.

    If the mac is existed in udev rule, update the existing record.

    Or else, create new record in udev rule.

  3. Create persistent ifcfg

    Make changes for network interface ifcfg to configure static network ip address , etc.

    Bring up interface formally.

3. Back ground information to use udev rules :

  1. A rule in /usr/lib/udev/rules.d/60-net.rules instructs the udev helper utility, /lib/udev/rename_device, to look into all /etc/sysconfig/network-scripts/ifcfg-suffix files. If it finds an ifcfg file with a HWADDR entry matching the MAC address of an interface it renames the interface to the name given in the ifcfg file by the DEVICE directive.
  2. A rule in /usr/lib/udev/rules.d/71-biosdevname.rules instructs biosdevname to rename the interface according to its naming policy, provided that it was not renamed in a previous step, biosdevname is installed, and biosdevname=0 was not given as a kernel command on the boot command line.
  3. A rule in /lib/udev/rules.d/75-net-description.rules instructs udev to fill in the internal udev device property values ID_NET_NAME_ONBOARD, ID_NET_NAME_SLOT, ID_NET_NAME_PATH, ID_NET_NAME_MAC by examining the network interface device. Note, that some device properties might be undefined.
  4. A rule in /usr/lib/udev/rules.d/80-net-name-slot.rules instructs udev to rename the interface, provided that it was not renamed in step 1 or 2, and the kernel parameter net.ifnames=0 was not given, according to the following priority: ID_NET_NAME_ONBOARD, ID_NET_NAME_SLOT, ID_NET_NAME_PATH. It falls through to the next in the list, if one is unset. If none of these are set, then the interface will not be renamed.

The doc link: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/ch-Consistent_Network_Device_Naming.html

News

History

  • Oct 22, 2010: xCAT 2.5 released.
  • Apr 30, 2010: xCAT 2.4 is released.
  • Oct 31, 2009: xCAT 2.3 released. xCAT's 10 year anniversary!
  • Apr 16, 2009: xCAT 2.2 released.
  • Oct 31, 2008: xCAT 2.1 released.
  • Sep 12, 2008: Support for xCAT 2 can now be purchased!
  • June 9, 2008: xCAT breaths life into (at the time) the fastest supercomputer on the planet
  • May 30, 2008: xCAT 2.0 for Linux officially released!
  • Oct 31, 2007: IBM open sources xCAT 2.0 to allow collaboration among all of the xCAT users.
  • Oct 31, 1999: xCAT 1.0 is born!
    xCAT started out as a project in IBM developed by Egan Ford. It was quickly adopted by customers and IBM manufacturing sites to rapidly deploy clusters.
Clone this wiki locally