]>
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
,
63 $config->{ifaces
}->{vmbr2
} = {
69 bridge_ports
=> vxlan2
,
73 $config->{ifaces
}->{vmbr3
} = {
79 bridge_ports
=> vxlan3
,
80 bridge_vlan_aware
=> yes
,
81 bridge_vids
=> '2-10',
85 $config->{ifaces
}->{vxlan1
} = {
90 'vxlan-svcnodeip' => $svcnodeip,
91 'vxlan-physdev' => $physdev,
95 $config->{ifaces
}->{vxlan2
} = {
100 'vxlan-local-tunnelip' => $ip,
101 'bridge-learning' => 'off',
102 'bridge-arp-nd-suppress' => 'on',
103 'bridge-unicast-flood' => 'off',
104 'bridge-multicast-flood' => 'off',
108 $config->{ifaces
}->{vxlan3
} = {
111 families
=> ['inet'],
113 'vxlan-remoteip' => [$remoteip1, $remoteip2],
114 'bridge-access' => 3,
118 $config->{ifaces
}->{'vmbr1.100'} = {
121 families
=> ['inet'],
125 $config->{ifaces
}->{'bond0.100'} = {
128 families
=> ['inet'],
132 $config->{ifaces
}->{'eth1.100'} = {
135 families
=> ['inet'],
139 expect load
('loopback') . <<"CHECK";
140 source-directory interfaces.d
142 iface eth0 inet manual
145 iface eth1 inet static
151 iface eth2 inet manual
154 iface eth3 inet manual
157 iface eth1.100 inet manual
160 iface bond0 inet manual
161 bond-slaves eth2 eth3
164 bond-xmit-hash-policy layer3+4
167 iface bond0.100 inet manual
170 iface vmbr0 inet static
172 netmask 255.255.255.0
179 iface vmbr1 inet manual
183 bridge-vlan-aware yes
187 iface vmbr2 inet manual
193 iface vmbr3 inet manual
197 bridge-vlan-aware yes
201 iface vmbr1.100 inet manual
204 iface vxlan1 inet manual
206 vxlan-svcnodeip $svcnodeip
207 vxlan-physdev $physdev
210 iface vxlan2 inet manual
212 vxlan-local-tunnelip $ip
213 bridge-arp-nd-suppress on
215 bridge-multicast-flood off
216 bridge-unicast-flood off
219 iface vxlan3 inet manual
221 vxlan-remoteip $remoteip1
222 vxlan-remoteip $remoteip2
237 $config->{ifaces
}->{eth1
} = {
243 families
=> ['inet6'],
248 expect load
('loopback') . <<"CHECK";
249 source-directory interfaces.d
251 iface eth0 inet manual
254 iface eth1 inet6 static
260 iface vmbr0 inet static
262 netmask 255.255.255.0