I pushed some code to https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+ref/bond_name that i think is working. the rendered ENI looks like:
auto lo iface lo inet loopback dns-nameservers 1.1.1.191 1.1.1.4
auto oeth0 iface oeth0 inet manual bond-master bond0 bond_miimon 100 bond_mode 4 bond_xmit_hash_policy layer3+4 mtu 1500
auto oeth1 iface oeth1 inet manual bond-master bond0 bond_miimon 100 bond_mode 4 bond_xmit_hash_policy layer3+4 mtu 1500
iface bond0 inet manual bond-slaves none bond_miimon 100 bond_mode 4 bond_xmit_hash_policy layer3+4
auto bond0.602 iface bond0.602 inet static address 2.2.2.13 netmask 255.255.255.248 hwaddress fa:16:3e:b3:72:30 vlan-raw-device bond0 vlan_id 602 post-up route add default gw 2.2.2.9 || true pre-down route del default gw 2.2.2.9 || true
auto bond0.612 iface bond0.612 inet static address 10.0.1.5 netmask 255.255.255.248 hwaddress fa:16:3e:66:ab:a6 vlan-raw-device bond0 vlan_id 612 post-up route add -net 192.168.1.0 netmask 255.255.255.255 gw 10.0.1.1 || true pre-down route del -net 192.168.1.0 netmask 255.255.255.255 gw 10.0.1.1 || true
I pushed some code to /code.launchpad .net/~smoser/ cloud-init/ +git/cloud- init/+ref/ bond_name
https:/
that i think is working. the rendered ENI looks like:
auto lo
iface lo inet loopback
dns-nameservers 1.1.1.191 1.1.1.4
auto oeth0 xmit_hash_ policy layer3+4
iface oeth0 inet manual
bond-master bond0
bond_miimon 100
bond_mode 4
bond_
mtu 1500
auto oeth1 xmit_hash_ policy layer3+4
iface oeth1 inet manual
bond-master bond0
bond_miimon 100
bond_mode 4
bond_
mtu 1500
iface bond0 inet manual xmit_hash_ policy layer3+4
bond-slaves none
bond_miimon 100
bond_mode 4
bond_
auto bond0.602
iface bond0.602 inet static
address 2.2.2.13
netmask 255.255.255.248
hwaddress fa:16:3e:b3:72:30
vlan-raw-device bond0
vlan_id 602
post-up route add default gw 2.2.2.9 || true
pre-down route del default gw 2.2.2.9 || true
auto bond0.612
iface bond0.612 inet static
address 10.0.1.5
netmask 255.255.255.248
hwaddress fa:16:3e:66:ab:a6
vlan-raw-device bond0
vlan_id 612
post-up route add -net 192.168.1.0 netmask 255.255.255.255 gw 10.0.1.1 || true
pre-down route del -net 192.168.1.0 netmask 255.255.255.255 gw 10.0.1.1 || true