eth1:
eth2:
eth3:
+eth4:
+eth5:
/proc/net/dev
r(load('brbase'));
# Variables used for the various interfaces:
#
-my $ip = '192.168.0.2';
-my $nm = '255.255.255.0';
+my $ip = '192.168.0.2/24';
my $gw = '192.168.0.1';
my $svcnodeip = '239.192.105.237';
my $physdev = 'eth0';
my $vmbr0_part = <<"PART";
auto vmbr0
iface vmbr0 inet static
- address 10.0.0.2
- netmask 255.255.255.0
- gateway 10.0.0.1
+ address 10.0.0.2/24
+ gateway 10.0.0.1
bridge-ports eth0
bridge-stp off
bridge-fd 0
type => 'eth',
method => 'static',
address => $ip,
- netmask => $nm,
gateway => $gw,
families => ['inet'],
autostart => 1
my $eth1_part = <<"PART";
auto eth1
iface eth1 inet static
- address $ip
- netmask $nm
- gateway $gw
+ address $ip
+ gateway $gw
PART
chomp $eth1_part;
iface eth3 inet manual
+iface eth4 inet manual
+
+iface eth5 inet manual
+
$vmbr0_part
CHECK
$eth1_part
+auto eth2
iface eth2 inet manual
+auto eth3
iface eth3 inet manual
+iface eth4 inet manual
+
+iface eth5 inet manual
+
$bond0_part
$vmbr0_part
$eth1_part
+auto eth2
iface eth2 inet manual
+auto eth3
iface eth3 inet manual
+iface eth4 inet manual
+
+iface eth5 inet manual
+
$bond0_part
$vmbr0_part
$eth1_part
+auto eth2
iface eth2 inet manual
+auto eth3
iface eth3 inet manual
+iface eth4 inet manual
+
+iface eth5 inet manual
+
$bond0_part
$vmbr0_part
};
$config->{ifaces}->{'bond0.100'} = {
+ type => 'vlan',
+ mtu => 1300,
+ method => 'manual',
+ families => ['inet'],
+ 'vlan-protocol' => '802.1ad',
+ autostart => 1
+};
+
+$config->{ifaces}->{'bond0.100.10'} = {
type => 'vlan',
mtu => 1300,
method => 'manual',
autostart => 1
};
+$config->{ifaces}->{'vmbr4'} = {
+ mtu => 1200,
+ type => 'bridge',
+ method => 'manual',
+ families => ['inet'],
+ bridge_stp => 'off',
+ bridge_fd => 0,
+ bridge_ports => 'bond0.100',
+ autostart => 1
+};
+
+$config->{ifaces}->{'vmbr5'} = {
+ mtu => 1100,
+ type => 'bridge',
+ method => 'manual',
+ families => ['inet'],
+ bridge_stp => 'off',
+ bridge_fd => 0,
+ bridge_ports => 'vmbr4.99',
+ autostart => 1
+};
+
+$config->{ifaces}->{vmbr6} = {
+ ovs_mtu => 1400,
+ type => 'OVSBridge',
+ ovs_ports => 'bond1 ovsintvlan',
+ method => 'manual',
+ families => ['inet'],
+ autostart => 1
+};
+
+$config->{ifaces}->{bond1} = {
+ ovs_mtu => 1300,
+ type => 'OVSBond',
+ ovs_bridge => 'vmbr6',
+ ovs_bonds => 'eth4 eth5',
+ ovs_options => 'bond_mode=active-backup',
+ method => 'manual',
+ families => ['inet'],
+ autostart => 1
+};
+
+$config->{ifaces}->{ovsintvlan} = {
+ ovs_mtu => 1300,
+ type => 'OVSIntPort',
+ ovs_bridge => 'vmbr6',
+ ovs_options => 'tag=14',
+ method => 'manual',
+ families => ['inet'],
+ autostart => 1
+};
+
expect load('loopback') . <<"CHECK";
source-directory interfaces.d
$eth1_part
+auto eth2
iface eth2 inet manual
+auto eth3
iface eth3 inet manual
+auto eth4
+iface eth4 inet manual
+
+auto eth5
+iface eth5 inet manual
+
auto eth1.100
iface eth1.100 inet manual
mtu 1400
+allow-vmbr6 ovsintvlan
+iface ovsintvlan inet manual
+ ovs_type OVSIntPort
+ ovs_bridge vmbr6
+ ovs_mtu 1300
+ ovs_options tag=14
+
$bond0_part
+allow-vmbr6 bond1
+iface bond1 inet manual
+ ovs_bonds eth4 eth5
+ ovs_type OVSBond
+ ovs_bridge vmbr6
+ ovs_mtu 1300
+ ovs_options bond_mode=active-backup
+
auto bond0.100
iface bond0.100 inet manual
mtu 1300
+ vlan-protocol 802.1ad
+
+auto bond0.100.10
+iface bond0.100.10 inet manual
+ mtu 1300
$vmbr0_part
$vmbr123_part
+auto vmbr4
+iface vmbr4 inet manual
+ bridge-ports bond0.100
+ bridge-stp off
+ bridge-fd 0
+ mtu 1200
+
+auto vmbr5
+iface vmbr5 inet manual
+ bridge-ports vmbr4.99
+ bridge-stp off
+ bridge-fd 0
+ mtu 1100
+
+allow-ovs vmbr6
+iface vmbr6 inet manual
+ ovs_type OVSBridge
+ ovs_ports bond1 ovsintvlan
+ ovs_mtu 1400
+
auto vmbr1.100
iface vmbr1.100 inet manual
mtu 1300
auto eth1
iface eth1 inet6 static
- address $ip
- netmask $nm
- gateway $gw
+ address $ip/$nm
+ gateway $gw
iface eth2 inet manual
iface eth3 inet manual
+iface eth4 inet manual
+
+iface eth5 inet manual
+
auto vmbr0
iface vmbr0 inet static
- address 10.0.0.2
- netmask 255.255.255.0
- gateway 10.0.0.1
+ address 10.0.0.2/24
+ gateway 10.0.0.1
bridge-ports eth0
bridge-stp off
bridge-fd 0