===== Step 4: Option 1: Cloud-init / Metadata ===== #cloud-config bootcmd: - /usr/sbin/ifdown eth0 - /usr/sbin/ifup eth0 - /usr/sbin/ifdown eth1 - /usr/sbin/ifup eth1 - setenforce 0 - /sbin/sysctl -w net.ipv6.conf.all.forwarding=1 - /sbin/sysctl -w net.ipv6.conf.eth0.accept_ra=2 - /sbin/sysctl -w net.ipv6.conf.eth0.accept_ra_defrtr=1 - /sbin/sysctl -w net.ipv6.conf.eth0.router_solicitations=1 packages: - radvd runcmd: - /usr/sbin/ifdown eth1 - /usr/sbin/ifup eth1 - /usr/bin/systemctl disable NetworkManager - /usr/bin/systemctl start radvd - echo 'complete' >> /tmp/cloud-config.log write_files: - content: | TYPE="Ethernet" BOOTPROTO="dhcp" DEFROUTE="yes" PEERDNS="yes" PEERROUTES="yes" IPV4_FAILURE_FATAL="no" IPV6INIT="yes" IPV6_AUTOCONF="yes" IPV6_DEFROUTE="yes" IPV6_PEERROUTES="yes" IPV6_PEERDNS="yes" IPV6_FAILURE_FATAL="no" NAME="eth0" DEVICE="eth0" ONBOOT="yes" path: /etc/sysconfig/network-scripts/ifcfg-eth0 permissions: '0755' owner: root:root - content: | TYPE="Ethernet" BOOTPROTO=static IPV6INIT=yes IPV6ADDR="2001:db8:0:2::1/64" NAME=eth1 DEVICE=eth1 ONBOOT=yes NM_CONTROLLED=no path: /etc/sysconfig/network-scripts/ifcfg-eth1 permissions: '0755' owner: root:root - content: | interface eth1 { AdvSendAdvert on; MinRtrAdvInterval 3; MaxRtrAdvInterval 10; AdvHomeAgentFlag off; AdvManagedFlag on; AdvOtherConfigFlag on; prefix 2001:db8:0:2::/64 { AdvOnLink on; ### On link tells the host that the default router is on the same "link" as it is AdvAutonomous on; AdvRouterAddr off; }; }; path: /etc/radvd.conf permissions: '0644' owner: root:root - content: | IPV6FORWARDING=yes path: /etc/sysconfig/network permissions: '0644' owner: root:root