0

How many secondary IPv6 addresses are allowed on a VLAN subinterface in CentOS 7? With the config below I only get the former IPv6 address successfully assiged to ens224.2015 while the latter IPv6 address assignment fails with "network: ERROR : [/etc/sysconfig/network-scripts/ifup-aliases] error in ifcfg-ens224.2015:2: already seen ipaddr in ifcfg-ens224.2015:1". Is that because I'm trying to allocate them from the same /64 subnet?

Many thanks in advance!

[root@tools-centos7 network-scripts]# cat ifcfg-ens224.2015:1
DEVICE=ens224.2015:1
BOOTPROTO=none
ONBOOT=yes
IPV6INIT="yes"
IPV6_DEFROUTE="no"
IPV6ADDR=240b:c0d0:101:27df::1:229/64
PEERDNS=no
NM_CONTROLLED="no"
VLAN=yes
[root@tools-centos7 network-scripts]#
[root@tools-centos7 network-scripts]#
[root@tools-centos7 network-scripts]# cat ifcfg-ens224.2015:2
DEVICE=ens224.2015:2
BOOTPROTO=none
ONBOOT=yes
IPV6INIT="yes"
IPV6_DEFROUTE="no"
IPV6ADDR=240b:c0d0:101:27df::2:229/64
PEERDNS=no
NM_CONTROLLED="no"
VLAN=yes
[root@tools-centos7 network-scripts]#
  • 1
    I recommend you not use alias interfaces. Linux supports multiple IP (v4 and v6) addresses on the same interface natively. – Daniel B May 25 at 11:20
  • Daniel B: Thank you - any chance to share the recommended syntax for that? – dandreye May 25 at 11:58
  • I’m not familiar with CentOS, sorry. You’ll have to find out how that works with the CentOS network configuration method, if at all. – Daniel B May 25 at 12:55
  • Daniel B: I've just digged it out and posted as an answer - thanks for the hint! – dandreye May 25 at 21:30
1

Following Daniel B's hint I got it working by means of adding IPV6ADDR_SECONDARIES with them into ens224.2015 itself alongside IPV6ADDR (instead of using ens224.2015:1 and ens224.2015:2):

[root@tools-centos7 network-scripts]# cat ifcfg-ens224.2015
DEVICE=ens224.2015
BOOTPROTO=none
ONBOOT=yes
IPV6INIT="yes"
IPV6_DEFROUTE="no"
IPV6ADDR=240b:c0d0:101:27df::229/64
IPV6ADDR_SECONDARIES="240b:c0d0:101:27df::1:229/64 240b:c0d0:101:27df::2:229/64"
PEERDNS=no
NM_CONTROLLED="no"
VLAN=yes
[root@tools-centos7 network-scripts]#
[root@tools-centos7 network-scripts]# service network restart
Restarting network (via systemctl):                        [  OK  ]
[root@tools-centos7 network-scripts]#
[root@tools-centos7 network-scripts]# ifconfig ens224.2015 | grep 229
        inet6 240b:c0d0:101:27df::229  prefixlen 64  scopeid 0x0<global>
        inet6 240b:c0d0:101:27df::1:229  prefixlen 64  scopeid 0x0<global>
        inet6 240b:c0d0:101:27df::2:229  prefixlen 64  scopeid 0x0<global>
[root@tools-centos7 network-scripts]#
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.