interface name is different
i tried creating a ova file for cent os 7 and deploy it in Vmware fusion. the ifconfig -a and /etc/sysconfig/network-scripts/ifcfg-enxXX are showing different interface name.
Kindly help me this. |
Please show us what each is showing...
|
# ifconfig -a
ens32: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.234.48.9 netmask 255.255.255.0 broadcast 10.234.48.255 inet6 fe80::250:56ff:feae:d263 prefixlen 64 scopeid 0x20<link> ether 00:50:56:ae:d2:63 txqueuelen 1000 (Ethernet) RX packets 40937 bytes 5741443 (5.4 MiB) RX errors 0 dropped 151 overruns 0 frame 0 TX packets 10478 bytes 756552 (738.8 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 and the file name in /etc/sysconfig/network-config/ifcfg-ens33 |
What the boot up sees and what you wrote are two different things. Not sure what the most easy way could be but when you transport Fedora/RH/Centos between machines the network naming is usually changed.
You could either fix the name to match predictive naming or go back to generic naming of eth0 deal maybe. I'd guess there are ways to automate it upon moves and clones. Even cloning between exactly the same systems causes this issue. |
When I migrated from CentOS 5.11 to CentOS 7.4, I opted to copy over the files in /etc/sysconfig/network-scripts/, which used the eth0* naming.
I don't see a /etc/sysconfig/network-config/ in the new installation, however. Oh! I see you used /etc/sysconfig/network-scripts/ in your OP, so maybe network-config in #3 is just a typo... I also built a backup/test server at home that uses the new naming... Code:
enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 On that server, I didn't copy the files, so the naming changed, as jefro suggested. Is the ifcfg-ens33 the only ifcfg* file in /etc/sysconfig/network-scripts/ ? Is there also a file for ifcfg-ens32 ? I learned recently that all ifcfg files will be loaded at boot, so any saved or backup copies in /etc/sysconfig/network-scripts/ must not start with ifcfg. Confirm that there is only one ifcfg file in /etc/sysconfig/network-scripts/, and that it has the correct name. |
yes I am seeing only one ifcfg-ens33 file . How its is chosing the interface name?
|
This is a virtual host? You mentioned Vmware fusion.
What is the distro/configuration of the hosting 'puter? (I know very little about virtual machines) |
I believe that one of the startup-routines remaps the names.
In large installations, it turned out to be a problem to simply "sequentially number" the interfaces. The new nomenclature names the interfaces according to where they are, which makes for more consistency across "many systems." (And some shops have racks full of "systems.") |
is there any way to fix the name of the interface file in /etc/sysconfig/network-config/ifcfg-ens33 ?
|
Quote:
/etc/sysconfig/network-scripts/ There is no /etc/sysconfig/network-config/ Is that just a typo here? If not, please see what's in the /etc/sysconfig/network-scripts/ directory. AFAIK, you can just rename the file. It's not the name of the file that controls what the NIC is called. That's specified on the DEVICE line in the file: Code:
more /etc/sysconfig/network-scripts/ifcfg-enp3s0 |
Yes sorry that was an typo . Even in the Device name , I am seeing ens33.
service network status Configured devices: lo ens33 Currently active devices: lo ens192 |
Good...
Again: What is DEVICE set to in your ifcfg-ens33?? The value of DEVICE in the ifcfg-* file is what controls the name of the device as seen with ifconfig or service network status. Try Code:
more /etc/sysconfig/network-scripts/ifcfg-ens33 Code:
mv /etc/sysconfig/network-scripts/ifcfg-ens33 /etc/sysconfig/network-scripts/ifcfg-ens32 |
how to get the same name in the Device name ?
[root@splunk-jump ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens33 DEVICE="ens33" ONBOOT=yes BOOTPROTO=static TYPE=Ethernet IPADDR=10.234.28.56 NETMASK=255.255.255.0 [root@test ~]# ifconfig -a ens192: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.234.28.56 netmask 255.255.255.0 broadcast 10.234.28.255 inet6 fe80::250:56ff:feae:600 prefixlen 64 scopeid 0x20<link> ether 00:50:56:ae:06:00 txqueuelen 1000 (Ethernet) RX packets 8800712 bytes 9874648658 (9.1 GiB) RX errors 0 dropped 381 overruns 0 frame 0 |
my question here is how to get the same interface name in both the Device name and ifconfig output?
|
OK. Now I'm officially stumped!
I only have two servers to look at. Both show the same names with ifconfig as are specified for DEVICE in the ifcfg-* files. Your example in your last post shows a still different name (ens192 instead of ens32), so something else is managing that. Are you using the Network Manager GUI? [I don't...one server is headless, even]. Again, stumped...sorry... |
All times are GMT -5. The time now is 03:41 AM. |