auto br0 iface br0 inet static address 10.0.0.4 netmask 255.255.255.0 gateway 10.0.0.255 pre-up ip link add name $IFACE type bridge {% for i in range(1, 4) %} auto eth{{i}} iface eth{{i}} inet manual up ip link set $IFACE up post-up ip addr flush dev $IFACE post-up ip link set $IFACE master br0 {% endfor %}