]>
git.proxmox.com Git - pve-common.git/blob - test/etc_network_interfaces/t.create_network.pl
1 save
('proc_net_dev', <<'/proc/net/dev');
8 my $ip = '192.168.0.2';
9 my $nm = '255.255.255.0';
10 my $gw = '192.168.0.1';
11 my $svcnodeip = '239.192.105.237';
13 my $remoteip1 = '192.168.0.3';
14 my $remoteip2 = '192.168.0.4';
17 $config->{ifaces
}->{eth1
} = {
27 $config->{ifaces
}->{eth2
} = {
34 $config->{ifaces
}->{eth3
} = {
41 $config->{ifaces
}->{bond0
} = {
43 slaves
=> 'eth2 eth3',
44 bond_mode
=> '802.3ad',
45 bond_xmit_hash_policy
=> 'layer3+4',
52 $config->{ifaces
}->{vmbr1
} = {
58 bridge_ports
=> vxlan1
,
59 bridge_vlan_aware
=> yes
,
64 $config->{ifaces
}->{vmbr2
} = {
70 bridge_ports
=> vxlan2
,
74 $config->{ifaces
}->{vmbr3
} = {
80 bridge_ports
=> vxlan3
,
81 bridge_vlan_aware
=> yes
,
82 bridge_vids
=> '2-10',
86 $config->{ifaces
}->{vxlan1
} = {
91 'vxlan-svcnodeip' => $svcnodeip,
92 'vxlan-physdev' => $physdev,
96 $config->{ifaces
}->{vxlan2
} = {
101 'vxlan-local-tunnelip' => $ip,
102 'bridge-learning' => 'off',
103 'bridge-arp-nd-suppress' => 'on',
104 'bridge-unicast-flood' => 'off',
105 'bridge-multicast-flood' => 'off',
109 $config->{ifaces
}->{vxlan3
} = {
112 families
=> ['inet'],
114 'vxlan-remoteip' => [$remoteip1, $remoteip2],
115 'bridge-access' => 3,
120 expect load
('loopback') . <<"CHECK";
121 source-directory interfaces.d
123 iface eth0 inet manual
126 iface eth1 inet static
132 iface eth2 inet manual
135 iface eth3 inet manual
138 iface bond0 inet manual
139 bond-slaves eth2 eth3
142 bond-xmit-hash-policy layer3+4
145 iface vmbr0 inet static
147 netmask 255.255.255.0
154 iface vmbr1 inet manual
158 bridge-vlan-aware yes
162 iface vmbr2 inet manual
168 iface vmbr3 inet manual
172 bridge-vlan-aware yes
176 iface vxlan1 inet manual
178 vxlan-svcnodeip $svcnodeip
179 vxlan-physdev $physdev
182 iface vxlan2 inet manual
184 vxlan-local-tunnelip $ip
185 bridge-arp-nd-suppress on
187 bridge-multicast-flood off
188 bridge-unicast-flood off
191 iface vxlan3 inet manual
193 vxlan-remoteip $remoteip1
194 vxlan-remoteip $remoteip2
209 $config->{ifaces
}->{eth1
} = {
215 families
=> ['inet6'],
220 expect load
('loopback') . <<"CHECK";
221 source-directory interfaces.d
223 iface eth0 inet manual
226 iface eth1 inet6 static
232 iface vmbr0 inet static
234 netmask 255.255.255.0