View Issue Details

IDProjectCategoryView StatusLast Update
0015833CentOS-7cloud-initpublic2020-11-11 18:22
Status acknowledgedResolutionopen 
Product Version7.6.1810 
Target VersionFixed in Version 
Summary0015833: ipv6 router advertisements are disabled due to IPV6_AUTOCONF=no
DescriptionI tested this with an Amazon VPC with working IPv6 configuration (the amazon-ami's work fine) using cloud-init 18.2_1.

If one assigns an IPv6 address to the machine via DHCP6. Cloudinit sets up a configuration that apparently disables router advertisements due to side-effect. As a result the box has no default gateway and is unable to send IPv6 traffic (Network unreachable errors).

I found someone else mentioning this issue here and their work-around:

And it basically came down to having IPV6_AUTOCONF=no which sets the sysctl setting, net.ipv6.conf.eth0.accept_ra=0. Disabling router advertisements.

Overriding IPV6_AUTOCONF in /etc/sysconfig/network-scripts to yes enables the seemingly correct functionality. This appears to be set by cloud-init in /usr/lib/python2.7/site-packages/cloudinit/net/
Steps To Reproduce1. Verify ipv6 ip: `ip a show dev eth0`
2. Verify no default route: `ip -6 r show dev eth0`
3. Verify ping fails: `ping6 -c1`
4. Set IPV6_AUTOCONF=yes in /etc/sysconfig/network-scripts
5. Restart networking: `sudo systemctl restart network`
6. Verify default route: `ip -6 r show dev eth0 | grep default`
7. Verify ping succeeds: `ping6 -c1`
Tagscloud-init, IPv6, network


related to 0014760 new cloud-init failed and crash the server after update to CentOS 7.5 




2019-11-20 19:27

reporter   ~0035717

Hi there,

I have also came across this issue in Amazon AWS with the official CentOS 7 image, but in my case the file to edit is /etc/sysconfig/network and must manually change to IPV6_AUTOCONF=yes

I have also tried to simply add a script to /etc/cloud/cloud.cfg.d/99-net-ipv6.cfg

  version: 1
  - type: physical
    name: eth0
      - type: dhcp
      - type: dhcp6

just by adding the script mand rebooting it doesn't work. I had to go manually and edit /etc/sysconfig/network setting ipv6_autoconf to yes and has been persisting...


2019-11-20 19:44

reporter   ~0035718

Meanwhile I just verified on cloud-init bug tracker the fix has been committed 1 hour ago...


2020-01-07 07:29

administrator   ~0035948

@maverickws : myself have the issue that appeared in cloud-init from 7.7 it seems :
Commit :
It patches upstream cloud-init like this :

Have you pointer to upstream cloud-init bug tracker ? we can then have a look as I see conflicting ideas in that .patch files.

I can confirm that having the CentOS 7 AMI image deployed needs this to work fine :

sed -i 's/IPV6_AUTOCONF=no/IPV6_AUTOCONF=yes/' /usr/lib/python2.7/site-packages/cloudinit/net/

And it works so after a reboot too (as cloud-init then puts IPV6_AUTOCONF=yes in /etc/sysconfig/network)

The only "interesting" thing is that through autoconf/radvd, the centos ami gets a wrong /128 subnet, but router is reachable and connectivity works too


2020-01-07 20:17

manager   ~0035961

Last edited: 2020-01-07 20:19

View 2 revisions

I can confirm that arrfabs fix works (t2 micro instance)



2020-06-24 04:49

reporter   ~0037222

Confirm that this fix still works (and is still needed) on some CentOS images as most recent as 7.8


2020-11-11 18:22

reporter   ~0037868

The complete cloud-init configuration I'm having to use to properly get IPV6 routing working in 7.8:

  version: 1
  - type: physical
    name: eth0
      - type: dhcp4
      - type: dhcp6
  - "sed -i 's/^IPV6_AUTOCONF=.*$/IPV6_AUTOCONF=yes/g' /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network"
  - systemctl restart network

Issue History

Date Modified Username Field Change
2019-02-15 23:59 dekimsey New Issue
2019-02-15 23:59 dekimsey Tag Attached: cloud-init
2019-02-15 23:59 dekimsey Tag Attached: IPv6
2019-02-15 23:59 dekimsey Tag Attached: network
2019-11-20 19:27 maverickws Note Added: 0035717
2019-11-20 19:44 maverickws Note Added: 0035718
2020-01-07 07:25 arrfab Status new => acknowledged
2020-01-07 07:25 arrfab Relationship added related to 0001476
2020-01-07 07:25 arrfab Relationship added related to 0014760
2020-01-07 07:25 arrfab Relationship deleted related to 0001476
2020-01-07 07:29 arrfab Note Added: 0035948
2020-01-07 20:17 tigalch Note Added: 0035961
2020-01-07 20:19 tigalch Note Edited: 0035961 View Revisions
2020-06-24 04:49 wicaeed Note Added: 0037222
2020-11-11 18:22 dekimsey Note Added: 0037868