dual stack IPv4/IPv6 configuration via config drive broken for RHEL7

Bug #1679817 reported by Alain Swanson
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fix Released
Andreas Karis

Bug Description

Currently, if a network interface has both IPv4 and IPv6 configuration information (via network_data.json), cloud-init creates separate aliases files for IPv4 (i.e. ifcfg-eth0:0) and IPv6 (ifcfg-eth0:1) network configuration information. This results in an error when attempting to ifup eth0:

/etc/sysconfig/network-scripts/ifup-aliases: error in ifcfg-eth0:1: didn't specify device or ipaddr

I believe this error is occurring because RHEL expects/requires an IPv4 address within any aliases file.

Red Hat documentation (https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s2-networkscripts-interfaces-alias.html) seems to indicate that alias files are supported only for IPv4 information and even then secondary addresses within the primary interface file is the preferred method.

Furthermore, it appears that multiple IPv6 addresses on the same interface should use the IPV6ADDR_SECONDARIES parameter in the primary interface file rather than using IP alias files (see here: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s1-networkscripts-interfaces.html).

I believe this issue can be resolved by eliminating the use of alias files and instead configuring IPv4 and IPv6 within the primary interface file (i.e. ifcfg-eth0). Here's an example:

# Created by cloud-init on instance boot automatically, do not edit.

Related branches

Andreas Karis (akaris)
Changed in cloud-init:
assignee: nobody → Andreas Karis (akaris)
Revision history for this message
Andreas Karis (akaris) wrote :

IPv6 routes are created in route- and handled the same as IPv4 routes. Bad syntax according to /usr/share/doc/initscripts-9.49.37/sysconfig.txt and hence IPv6 routes are not created.


  Contains lines that specify additional routes that should be added when the
  associated interface is brought up.

  The files are processed by the ifup-routes script and uses the /sbin/ipcalc
  utility for all network masks and numbers. Routes are specified using the

    NETMASKn=<network/prefix mask>
    GATEWAYn=<next-hop router/gateway IP address>

  The "n" is expected to be consecutive positive integers starting from 0.
  For example:


  adds a network route to the network via the gateway at Since you must already have a route to the network of the
  gateway, there is no need to specify a device.

  Note: The ifup-routes script also supports an older syntax designed to be
  used directly as an argument to "/sbin/ip route add".
  If no "ADDRESSn" lines are found the following will still
  work: dev ppp0

  adds a network route to the network through ppp0.


  Contains lines that are arguments to "/sbin/ip -6 route add"
  For example:

  site-local route for network fec0:0:0:2::/64
   via gateway fec0:0:0:1:0:0:0:20 (e.g. on eth0):

  fec0:0:0:2::/64 via fec0:0:0:1:0:0:0:20

  additional prefix configured to be on-link on eth0:

  3ffe:fffe:1:2::/64 dev eth0

  6to4 route for network 3ffe:ffff:1::/48, either:

  3ffe:ffff:1::/48 via ::

  Note the special case of 6to4 interface: 'via [relay]' is
  automatically added if explicit 'via' wasn't specified.

BOOTPROTO=static should be BOOTPROTO=none according to documentation

      'bootp' or 'dhcp' cause a DHCP client to run on the device. Any other
      value causes any static configuration in the file to be applied.

Scott Moser (smoser)
Changed in cloud-init:
status: New → Confirmed
importance: Undecided → Medium
Scott Moser (smoser)
Changed in cloud-init:
status: Confirmed → Fix Committed
Revision history for this message
Scott Moser (smoser) wrote : Fixed in Cloud-init 17.1

This bug is believed to be fixed in cloud-init in 17.1. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.