]>
git.proxmox.com Git - pve-common.git/blob - test/etc_network_interfaces/t.create_network.pl
8f4974acc1d7555f3ce056383ec136b09a3d1be9
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
} = {
44 slaves
=> 'eth2 eth3',
45 bond_mode
=> '802.3ad',
46 bond_xmit_hash_policy
=> 'layer3+4',
53 $config->{ifaces
}->{vmbr1
} = {
60 bridge_ports
=> vxlan1
,
61 bridge_vlan_aware
=> yes
,
65 $config->{ifaces
}->{vmbr2
} = {
71 bridge_ports
=> vxlan2
,
75 $config->{ifaces
}->{vmbr3
} = {
81 bridge_ports
=> vxlan3
,
82 bridge_vlan_aware
=> yes
,
83 bridge_vids
=> '2-10',
87 $config->{ifaces
}->{vxlan1
} = {
92 'vxlan-svcnodeip' => $svcnodeip,
93 'vxlan-physdev' => $physdev,
97 $config->{ifaces
}->{vxlan2
} = {
100 families
=> ['inet'],
102 'vxlan-local-tunnelip' => $ip,
103 'bridge-learning' => 'off',
104 'bridge-arp-nd-suppress' => 'on',
105 'bridge-unicast-flood' => 'off',
106 'bridge-multicast-flood' => 'off',
110 $config->{ifaces
}->{vxlan3
} = {
113 families
=> ['inet'],
115 'vxlan-remoteip' => [$remoteip1, $remoteip2],
116 'bridge-access' => 3,
120 $config->{ifaces
}->{'vmbr1.100'} = {
124 families
=> ['inet'],
128 $config->{ifaces
}->{'bond0.100'} = {
132 families
=> ['inet'],
136 $config->{ifaces
}->{'eth1.100'} = {
140 families
=> ['inet'],
144 expect load
('loopback') . <<"CHECK";
145 source-directory interfaces.d
147 iface eth0 inet manual
150 iface eth1 inet static
156 iface eth2 inet manual
159 iface eth3 inet manual
162 iface eth1.100 inet manual
166 iface bond0 inet manual
167 bond-slaves eth2 eth3
170 bond-xmit-hash-policy layer3+4
174 iface bond0.100 inet manual
178 iface vmbr0 inet static
180 netmask 255.255.255.0
187 iface vmbr1 inet manual
191 bridge-vlan-aware yes
196 iface vmbr2 inet manual
202 iface vmbr3 inet manual
206 bridge-vlan-aware yes
210 iface vmbr1.100 inet manual
214 iface vxlan1 inet manual
216 vxlan-svcnodeip $svcnodeip
217 vxlan-physdev $physdev
220 iface vxlan2 inet manual
222 vxlan-local-tunnelip $ip
223 bridge-arp-nd-suppress on
225 bridge-multicast-flood off
226 bridge-unicast-flood off
229 iface vxlan3 inet manual
231 vxlan-remoteip $remoteip1
232 vxlan-remoteip $remoteip2
247 $config->{ifaces
}->{eth1
} = {
253 families
=> ['inet6'],
258 expect load
('loopback') . <<"CHECK";
259 source-directory interfaces.d
261 iface eth0 inet manual
264 iface eth1 inet6 static
270 iface vmbr0 inet static
272 netmask 255.255.255.0