[SOLVED] CentOS 7 and IPv6

At least with the London data center, there seems to now be an issue with the CentOS 7 image and how it obtains the IPv6 address.

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

I am rather frustrated, I have been a Linode customer for years and years and years (CentOS 5 was new when I first signed up) and have referred a lot of business and never have I had an issue like this where Linode infrastructure seems to be unfriendly to CentOS VMs, it puzzles me that this has become an issue.

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.

It's not that Linode's infrastructure is unfriendly so much as people deciding "privacy extensions must be on by default!" which is not a good thing in a hosting environment (or even a server environment in general). I haven't touched CentOS in a while, but putting this line in /etc/sysctl.d/99-ipv6.conf (create this file) might fix it:

net.ipv6.conf.all.use_tempaddr = 0

Hopefully soon Linode will fix the CentOS template so that this is no longer an issue.

Well I added that and rebooted the linode and it still is grabbing the wrong IPv6 address so it is something else.

After the boot -

[root@li354-217 ~]# cat /etc/sysctl.d/99-ipv6.conf 
net.ipv6.conf.all.use_tempaddr = 0
[root@li354-217 ~]#

Paste the output of 'sysctl -a | grep net.ipv6' If it's too much for you to copy easily, do "sysctl -a | grep net.ipv6 | curl -F 'sprunge=<-' http://sprunge.us" and just provide the URL that outputs.

https://librelamp.com/sysctl.txt

This is from /sbin.ifconfig -a one one of my servers that is working properly :

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.

Here's what's interesting - all of my linodes are CentOS 7

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.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct