[SOLVED] CentOS 7 and IPv6
I have not experienced this issue with any of my other linode VMs, all running CentOS 7, but also located within the United States.
CentOS 7 uses Network Manager to obtain its dhcp IP addresses, so it is different than how other distributions do it, and I need to figure out how to configure it to get the correct IPv6 address.
Note that for over a year it was working just fine, this issue is new.
2a01:7e00::f03c:91ff:fe18:8a7e
That is the IPv6 address that it is suppose to be grabbing.
2a01:7e00::825f:e564:ad53:72fc
That is the IPv6 address that it actually is grabbing.
It was suggested that the problem is that it is using
slaac private
instead of
slaac hwaddr
within
/etc/dhcpcd.conf
however CentOS 7 does not use dhcpcd, it uses dhclient which is controlled by Network Manager.
Given that this issue is new, I have to guess that if it isn't resolved soon it will happen with other CentoOS 7 VMs as well.
Anyway have a clue as to what is the proper way to make sure my CentOS 7 linodes get the IPv6 address that is actually assigned to the account the VM is running as?
Thank you.
8 Replies
Hopefully this can be figured out so that the CentOS 7 images Linode offers to customers will have IPv6 DHCP set up to work properly.
net.ipv6.conf.all.use_tempaddr = 0
Hopefully soon Linode will fix the CentOS template so that this is no longer an issue.
After the boot -
[root@li354-217 ~]# cat /etc/sysctl.d/99-ipv6.conf
net.ipv6.conf.all.use_tempaddr = 0
[root@li354-217 ~]#
eth0: flags=4163 <up,broadcast,running,multicast>mtu 1500
inet 173.255.210.222 netmask 255.255.255.0 broadcast 173.255.210.255
inet6 2600:3c01::f03c:91ff:fe33:ddb6 prefixlen 64 scopeid 0x0 <global>inet6 fe80::f03c:91ff:fe33:ddb6 prefixlen 64 scopeid 0x20
ether f2:3c:91:33:dd:b6 txqueuelen 1000 (Ethernet)
RX packets 4331108 bytes 2106205120 (1.9 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2819008 bytes 1104371121 (1.0 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0</global></up,broadcast,running,multicast>
It's clear the IPv6 and the ether are related.
This is the problem server:
eth0: flags=4163 <up,broadcast,running,multicast>mtu 1500
inet 178.79.185.217 netmask 255.255.255.0 broadcast 178.79.185.255
inet6 fe80::a8ad:d312:4ef4:7272 prefixlen 64 scopeid 0x20
inet6 2a01:7e00::825f:e564:ad53:72fc prefixlen 64 scopeid 0x0 <global>ether f2:3c:91:18:8a:7e txqueuelen 1000 (Ethernet)
RX packets 7253 bytes 780504 (762.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 5755 bytes 831584 (812.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0</global></up,broadcast,running,multicast>
The ether address is what the IPv6 is suppose to be - but clearly isn't.
nmcli c modify "Wired connection 1" ipv6.addr-gen-mode eui64
That solved the problem.
All but one do not have a /etc/sysconfig/network-scripts/ifcfg-eth0 configuration file.
The one that does is the one created most recently, after CentOS 7.3 was released.
So it looks linode changed the CentOS 7 image so this issue won't happen with new installs, but all my others did have the issue and needed the fix above.