I’ve just installed Centos 7 and I am trying to create vlans in this new setup. Since this is Centos 7, it uses
ifcfg-ens3 instead of the eth0 device we’re used to.
So now I’m trying to create a VLAN like below:
ifcfg-ens3:10 VLAN=yes DEVICE=ens3:10 NM_CONTROLLED=no BOOTPROTO=static ONBOOT=yes TYPE=Ethernet IPADDR=x.x.x.x NETMASK=255.255.255.0
But I get this error:
ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Error, some other host already uses address x.x.x.x
In Centos 6.2 I was able to create vlans similar to the above to replace an older server without any problems but I seem to be stuck here with Centos7. Thanks in advance!
You have a typo in your configuration:
Your device name should be
ens3:10. This applies both to the filename, and to the device name within the file.
The former indicates VLAN 10, the latter is an old-style interface alias name which has been deprecated for years and is no longer supported in CentOS 7 (and in particular doesn’t indicate a VLAN).
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.