← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1679817] [NEW] dual stack IPv4/IPv6 configuration via config drive broken for RHEL7

 

Public bug reported:

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.
#
BOOTPROTO=static
DEVICE=eth0
HWADDR=fa:16:3e:b2:4b:d4
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
DEFROUTE=yes
GATEWAY=10.252.197.129
IPADDR=10.252.197.143
NETMASK=255.255.255.224
IPV6ADDR=2620:160:d2ff:1c07::b
IPV6INIT=yes
IPV6_DEFAULTGW=2620:160:d2ff:1c07::1

** Affects: cloud-init
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1679817

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

Status in cloud-init:
  New

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.
  #
  BOOTPROTO=static
  DEVICE=eth0
  HWADDR=fa:16:3e:b2:4b:d4
  ONBOOT=yes
  TYPE=Ethernet
  USERCTL=no
  DEFROUTE=yes
  GATEWAY=10.252.197.129
  IPADDR=10.252.197.143
  NETMASK=255.255.255.224
  IPV6ADDR=2620:160:d2ff:1c07::b
  IPV6INIT=yes
  IPV6_DEFAULTGW=2620:160:d2ff:1c07::1

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1679817/+subscriptions


Follow ups