+auto eth1
+allow-bond eth1
+iface eth1 inet manual
+ bond-master bond0
+
+auto bond0
+iface bond0 inet static
+ bond-slaves none
+ bond-mode 0
+ bond-miimon 100
+ address $internal_ip
+ pre-up ip link add link bond0 name macvtap-bond0 type macvtap mode bridge
+# no iptables files exist yet
+# post-up iptables-restore < /etc/default/iptables ; ip6tables-restore < /etc/default/ip6tables || :
+
+auto macvtap-bond0
+iface macvtap-bond0 inet static
+ address $CIDR
+ gateway $GATEWAYS
+ post-up ip a add $internal_ip broadcast 10.0.255.255 dev macvtap-bond0
+
+EOF
+
+ # I'm not sure ipv6 works well with the macvtap stuff. todo: research.
+ # anyways, other kvm hosts dont have it enabled.
+ if false && [[ $ip6 ]]; then
+ cat >>$target/etc/network/interfaces <<EOF
+iface bond0 inet6 static
+ pre-up echo 0 > /proc/sys/net/ipv6/conf/bond0/accept_dad