use strict;
-my $ip = '192.168.0.100';
-my $nm = '255.255.255.0';
+my $ip = '192.168.0.100/24';
my $gw = '192.168.0.1';
# replace proc_net_dev with one with a bunch of interfaces
new_iface('vmbr0', 'OVSBridge',
[ { family => 'inet',
address => $ip,
- netmask => $nm,
gateway => $gw } ],
autostart => 1);
iface eth3 inet manual
-auto vmbr0
+allow-ovs vmbr0
iface vmbr0 inet static
- address $ip
- netmask $nm
- gateway $gw
+ address $ip
+ gateway $gw
ovs_type OVSBridge
/etc/network/interfaces
-# Adding an interface to the bridge needs to add allow- lines:
+# Adding an interface to the bridge needs to add allow- lines and remove
+# its autostart property.
update_iface('vmbr0', [], ovs_ports => 'eth1 eth2');
expect load('loopback') . <<"/etc/network/interfaces";
auto eth0
iface eth0 inet manual
-auto eth1
allow-vmbr0 eth1
iface eth1 inet manual
ovs_type OVSPort
ovs_bridge vmbr0
-auto eth2
allow-vmbr0 eth2
iface eth2 inet manual
ovs_type OVSPort
iface eth3 inet manual
-auto vmbr0
+allow-ovs vmbr0
iface vmbr0 inet static
- address $ip
- netmask $nm
- gateway $gw
+ address $ip
+ gateway $gw
ovs_type OVSBridge
ovs_ports eth1 eth2
iface eth2 inet manual
-auto vmbr0
+allow-ovs vmbr0
iface vmbr0 inet static
- address $ip
- netmask $nm
- gateway $gw
+ address $ip
+ gateway $gw
ovs_type OVSBridge
ovs_ports eth1