INTRODUCTION
With Udev and modular network drivers, the network interface numbering is not persistent across reboots by default. This is due to drivers being loaded in parallel and thus network devices show up in random order.
Example: On a computer having two network cards made by Intel and Realtek, the network card manufactured by Intel may become eth0
and the Realtek card becomes eth1
In some cases, after a reboot the cards get renumbered the other way around. To avoid this, Udev comes with a script and some rules to assign stable names to network cards based on their MAC address
PROBLEM
Hyperflex Storage Controller VM (SCVM) may not connect to the network after changes are made in the VMX file (e.g., uuid.bios parameter) after reboot because its MAC addresses are getting jumbled up in the file 70-persistent-net.rules
SOLUTION
Step 1: Map the ATTR{address} Field with the NAME Field
SSH to the SCVM
Type cat /etc/udev/rules.d/70-persistent-net.rules
root@SpringpathControllerABCDE01234:~# cat /etc/udev/rules.d/70-persistent-net.rules
# This file has been auto-generated during Springpath controller deployment.
SUBSYSTEM=="net" ACTION=="add" ATTR{address}=="00:50:56:8b:af:33" ATTR{dev_id}=="0x0" ATTR{type}=="1" NAME="mgmt-if"
SUBSYSTEM=="net" ACTION=="add" ATTR{address}=="00:50:56:8b:ac:45" ATTR{dev_id}=="0x0" ATTR{type}=="1" NAME="data-if"
SUBSYSTEM=="net" ACTION=="add" ATTR{address}=="00:50:56:8b:cf:00" ATTR{dev_id}=="0x0" ATTR{type}=="1" NAME="repl-if"
Step 2: Enter the SCVM VM Settings
Login to vCenter
Locate the SCVM
Right click it and select Edit Settings...
Step 3a: Identify the SCVM Network Adapter MAC Addresses from vCenter settings
In Edit Settings window, expand all network adapters and make a note of their MAC addresses
Step 3b: Identify the SCVM Network Adapter MAC Addresses from SCVM shell.
From SCVM shell issue "ifconfig -a". eth0 points to the management network interface, eth1 points to data storage network interface and eth1 points to the replication network interface. Make a note of these MAC addresses.
root@help:~# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:50:56:8b:ae:b7 <<<< mgmt-if
inet addr:10.197.252.81 Bcast:10.197.252.95 Mask:255.255.255.224
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2919331 errors:0 dropped:77 overruns:0 frame:0
TX packets:1186365 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:912923504 (912.9 MB) TX bytes:1169716469 (1.1 GB)
eth1 Link encap:Ethernet HWaddr 00:50:56:8b:bd:41 <<<< data-if
inet addr:10.197.252.100 Bcast:10.197.252.127 Mask:255.255.255.224
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:152529984 errors:0 dropped:416 overruns:0 frame:0
TX packets:132458793 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:242676663088 (242.6 GB) TX bytes:224531042730 (224.5 GB)
...
eth2 Link encap:Ethernet HWaddr 00:50:56:8b:cf:f3 <<< repl-if
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:1671340 errors:0 dropped:131 overruns:0 frame:0
TX packets:3340062 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:164403101 (164.4 MB) TX bytes:300665525 (300.6 MB)
...
Step 4: Update the 70-persistent-net.rules with the MAC Addresses from Previous Step
Type vi /etc/udev/rules.d/70-persistent-net.rules
Input the MAC addresses from the previous step in the ATTR{address} section and save changes
root@SpringpathControllerABCDE01234:~# vi /etc/udev/rules.d/70-persistent-net.rules
# This file has been auto-generated during Springpath controller deployment.
SUBSYSTEM=="net" ACTION=="add" ATTR{address}=="00:50:56:8b:ae:b7" ATTR{dev_id}=="0x0" ATTR{type}=="1" NAME="mgmt-if"
SUBSYSTEM=="net" ACTION=="add" ATTR{address}=="00:50:56:8b:bd:41" ATTR{dev_id}=="0x0" ATTR{type}=="1" NAME="data-if"
SUBSYSTEM=="net" ACTION=="add" ATTR{address}=="00:50:56:8b:cf:f3" ATTR{dev_id}=="0x0" ATTR{type}=="1" NAME="repl-if"
Step 5: Reboot SCVM
Type reboot to restart the SCVM
Once SCVM comes back up, it should be able to connect to the network just fine
root@SpringpathControllerABCDE01234:~# reboot