Configuring static networking + IPv6 on CentOS 7

edited August 2014 in Proposed How-Tos
EDIT: After some changes were made at Vultr's end everything should now work fine 'out of the box' with NetworkManager enabled. Should you wish to disable NetworkManager, the steps below might still be useful.

I spent quite some time getting IPv6 to work on CentOS 7, so I'm sharing my /etc/sysconfig/network-scripts/ifcfg-eth0 hoping it's of any use for anyone facing similar issues.

I couldn't get NetworkManager to properly handle RAs, resulting in the default gateway not being set most of the time (yet sometimes it did get set - race condition in the window between bootup and NM starting up?)

Alas, the followng template configures IPv4/IPv6 statically and allows NM to be disabled. Copy DNS/HWADDR/IPADDR/GATEWAY/IPV6ADDR from your existing configuration.

DNS1=123.123.123.123
ONBOOT=yes
BOOTPROTO=static
DEVICE=eth0
HWADDR=52:54:00:00:00:00
IPADDR=123.123.123.123
PREFIX=23
GATEWAY=123.123.123.123
DEFROUTE=yes
NM_CONTROLLED=no
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6ADDR="2001:1234:1234:1234::64/64"
IPV6_AUTOCONF=yes
IPV6_FAILURE_FATAL=no
Then, disable NetworkManager and restart networking:

systemctl stop NetworkManager
systemctl disable NetworkManager
systemctl restart network
Don't forget, should you lose access to your box you can use the VNC console from the control panel.

Comments

  • In case anyone else experiences this: We've located a configuration issue on a few of our routers that was confusing NetworkManager. We've rolled out a change to correct this issue.
Sign In or Register to comment.