I have this annoying problem that every time I restart my CentOS7.3, my interface name changes (all of them). Here is how I use my CentOS7.3:
Host Machine: CentOS7.0
VM: CentOS7.3 (recently updated, run via kvm)
Here is the background. I recently updated my VM that has CentOS7.0 to CentOS7.3 via
yum update (offline upgrade via ISO). All was working in CentOS7.0, I did not have any persistent rules in
/usr/lib/udev/rules.d. But when I updated it to CentOS7.3, the problem started. Every time I reboot the VM, the interface name changes from ethX to lanX. This happens every time I reboot (soft reboot/hard reboot). I found some article in RedHat that says refer to this article. Somewhat resembles my problem but not entirely the same, just went on and tried the fix but still the problem is there. Interface name still changes from ethX to lanX on every reboot.
I tried to single out the problem and arrived at
NetworkManager. What I did was I added a field
NM_CONTROLLEDon each of the
ifcfg-ethX and set to
no and it fixed the problem. But I need it to be managed by NetworkManager.
Is there any issue with NetworkManager in CentOS7.3?
Additional Info: NetworkManager-1.4.0-12 ← this is my version of NM
After trying the answer of @Sagar, it somewhat cleared things but did not fix the problem. Interface name still changes every reboot. But it did point me to Consistent Network Device Naming wherein it tells you the details of the naming scheme of red hat. Makes sense though as what @Sagar is saying you need to put
net.ifnames=0 biosdevname=0on the kernel command line to revert back to old naming convention. As mention on that article, RHEL has some new name scheme being implemented. But still i can't seem to revert back to the old naming scheme. Any more inputs about the naming convention?