]> git.proxmox.com Git - pve-common.git/blobdiff - test/etc_network_interfaces/t.create_network.pl
INotify: use cidr for address on config change
[pve-common.git] / test / etc_network_interfaces / t.create_network.pl
index e446f536b56001d9c801ce5be8b9b2024dbbea6d..dbbe3a333151d719cfbcce2f51c86451613d86e4 100644 (file)
@@ -11,8 +11,7 @@ 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';
@@ -26,8 +25,7 @@ my $remoteip2 = '192.168.0.4';
 my $vmbr0_part = <<"PART";
 auto vmbr0
 iface vmbr0 inet static
-       address  10.0.0.2
-       netmask  255.255.255.0
+       address  10.0.0.2/24
        gateway  10.0.0.1
        bridge-ports eth0
        bridge-stp off
@@ -44,7 +42,6 @@ $config->{ifaces}->{eth1} = {
     type => 'eth',
     method => 'static',
     address => $ip,
-    netmask => $nm,
     gateway => $gw,
     families => ['inet'],
     autostart => 1
@@ -54,7 +51,6 @@ my $eth1_part = <<"PART";
 auto eth1
 iface eth1 inet static
        address  $ip
-       netmask  $nm
        gateway  $gw
 PART
 chomp $eth1_part;
@@ -205,7 +201,7 @@ $config->{ifaces}->{vmbr3} = {
     families => ['inet'],
     bridge_stp => 'off',
     bridge_fd => 0,
-    bridge_ports => 'vxlan3.50',
+    bridge_ports => 'vxlan3',
     bridge_vlan_aware => 'yes',
     bridge_vids => '2-10',
     autostart => 1
@@ -229,7 +225,7 @@ iface vmbr2 inet manual
 
 auto vmbr3
 iface vmbr3 inet manual
-       bridge-ports vxlan3.50
+       bridge-ports vxlan3
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
@@ -301,6 +297,15 @@ $config->{ifaces}->{'vmbr1.100'} = {
 };
 
 $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',
@@ -316,6 +321,28 @@ $config->{ifaces}->{'eth1.100'} = {
     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
+};
+
 expect load('loopback') . <<"CHECK";
 source-directory interfaces.d
 
@@ -336,11 +363,30 @@ $bond0_part
 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
+
 auto vmbr1.100
 iface vmbr1.100 inet manual
        mtu 1300
@@ -385,7 +431,6 @@ iface eth0 inet manual
 auto eth1
 iface eth1 inet6 static
        address  $ip
-       netmask  $nm
        gateway  $gw
 
 iface eth2 inet manual
@@ -394,8 +439,7 @@ iface eth3 inet manual
 
 auto vmbr0
 iface vmbr0 inet static
-       address  10.0.0.2
-       netmask  255.255.255.0
+       address  10.0.0.2/24
        gateway  10.0.0.1
        bridge-ports eth0
        bridge-stp off