]>
Commit | Line | Data |
---|---|---|
1556b768 AD |
1 | [[chapter_pvesdn]] |
2 | Software Defined Network | |
3 | ======================== | |
4 | ifndef::manvolnum[] | |
5 | :pve-toplevel: | |
6 | endif::manvolnum[] | |
7 | ||
ee6e18c4 TL |
8 | The **S**oftware **D**efined **N**etwork (SDN) feature allows one to create |
9 | virtual networks (vnets) at datacenter level. | |
1556b768 | 10 | |
ee6e18c4 TL |
11 | WARNING: SDN is currently an **experimental feature** in {pve}. This |
12 | Documentation for it is also still under development, ask on our | |
13 | xref:getting_help[mailing lists or in the forum] for questions and feedback. | |
14 | ||
15 | ||
4e652aba | 16 | [[pvesdn_installation]] |
ee6e18c4 TL |
17 | Installation |
18 | ------------ | |
19 | ||
20 | To enable the experimental SDN integration, you need to install | |
21 | "libpve-network-perl" package | |
1556b768 AD |
22 | |
23 | ---- | |
24 | apt install libpve-network-perl | |
25 | ---- | |
26 | ||
ee6e18c4 TL |
27 | You need to have `ifupdown2` package installed on each node to manage local |
28 | configuration reloading without reboot: | |
1556b768 AD |
29 | |
30 | ---- | |
31 | apt install ifupdown2 | |
32 | ---- | |
33 | ||
ee6e18c4 TL |
34 | Basic Overview |
35 | -------------- | |
36 | ||
37 | The {pve} SDN allows separation and fine grained control of Virtual Guests | |
38 | networks, using flexible software controlled configurations. | |
39 | ||
40 | Separation consists of zones, a zone is it's own virtual separated area. | |
41 | A Zone can be used by one or more 'VNets'. A 'VNet' is virtual network in a | |
42 | zone. Normally it shows up as a common Linux bridge with either a VLAN or | |
43 | 'VXLAN' tag, or using layer 3 routing for control. | |
44 | The 'VNets' are deployed locally on each node, after configuration was commited | |
45 | from the cluster wide datacenter level. | |
46 | ||
47 | ||
1556b768 AD |
48 | Main configuration |
49 | ------------------ | |
50 | ||
ee6e18c4 TL |
51 | The configuration is done at datacenter (cluster-wide) level, it will be saved |
52 | in configuration files located in the shared configuration file system: | |
53 | `/etc/pve/sdn` | |
1556b768 | 54 | |
ee6e18c4 | 55 | On the web-interface SDN feature have 4 main sections for the configuration |
1556b768 | 56 | |
ee6e18c4 | 57 | * SDN: a overview of the SDN state |
1556b768 | 58 | |
ee6e18c4 | 59 | * Zones: Create and manage the virtual separated network Zones |
1556b768 | 60 | |
ee6e18c4 | 61 | * VNets: The per-node building block to provide a Zone for VMs |
1556b768 | 62 | |
ee6e18c4 | 63 | * Controller: |
1556b768 AD |
64 | |
65 | ||
4e652aba | 66 | [[pvesdn_config_main_sdn]] |
1556b768 AD |
67 | SDN |
68 | ~~~ | |
69 | ||
ee6e18c4 TL |
70 | This is the main status panel. Here you can see deployment status of zones on |
71 | different nodes. | |
1556b768 | 72 | |
ee6e18c4 TL |
73 | There is an 'Apply' button, to push and reload local configuration on all |
74 | cluster nodes nodes. | |
1556b768 AD |
75 | |
76 | ||
4e652aba | 77 | [[pvesdn_config_zone]] |
1556b768 AD |
78 | Zones |
79 | ~~~~~ | |
80 | ||
ee6e18c4 | 81 | A zone will define a virtually separated network. |
1556b768 | 82 | |
ee6e18c4 | 83 | It can use different technologies for separation: |
1556b768 | 84 | |
ee6e18c4 | 85 | * VLAN: Virtual LANs are the classic method to sub-divide a LAN |
1556b768 | 86 | |
ee6e18c4 | 87 | * QinQ: stacked VLAN (formally known as `IEEE 802.1ad`) |
1556b768 | 88 | |
ee6e18c4 | 89 | * VXLAN: (layer2 vxlan) |
1556b768 | 90 | |
ee6e18c4 | 91 | * bgp-evpn: vxlan using layer3 border gateway protocol routing |
1556b768 AD |
92 | |
93 | You can restrict a zone to specific nodes. | |
94 | ||
ee6e18c4 TL |
95 | It's also possible to add permissions on a zone, to restrict user to use only a |
96 | specific zone and only the VNets in that zone | |
1556b768 | 97 | |
4e652aba | 98 | [[pvesdn_config_vnet]] |
ee6e18c4 | 99 | VNets |
1556b768 AD |
100 | ~~~~~ |
101 | ||
ee6e18c4 TL |
102 | A `VNet` is in its basic form just a Linux bridge that will be deployed locally |
103 | on the node and used for Virtual Machine communication. | |
1556b768 | 104 | |
ee6e18c4 | 105 | VNet properties are: |
1556b768 | 106 | |
ee6e18c4 | 107 | * ID: a 8 characters ID to name and identify a VNet |
1556b768 | 108 | |
ee6e18c4 | 109 | * Alias: Optional longer name, if the ID isn't enough |
1556b768 | 110 | |
ee6e18c4 | 111 | * Zone: The associated zone for this VNet |
1556b768 | 112 | |
ee6e18c4 | 113 | * Tag: The unique VLAN or VXLAN id |
1556b768 | 114 | |
ee6e18c4 TL |
115 | * IPv4: an anycast IPv4 address, it will be configured on the underlying bridge |
116 | on each node part of the Zone. It's only useful for `bgp-evpn` routing. | |
1556b768 | 117 | |
ee6e18c4 TL |
118 | * IPv6: an anycast IPv6 address, it will be configured on the underlying bridge |
119 | on each node part of the Zone. It's only useful for `bgp-evpn` routing. | |
1556b768 AD |
120 | |
121 | ||
4e652aba | 122 | [[pvesdn_config_controllers]] |
1556b768 AD |
123 | Controllers |
124 | ~~~~~~~~~~~ | |
125 | ||
4e652aba TL |
126 | Some zone types need an external controller to manage the VNet control-plane. |
127 | Currently this is only required for the `bgp-evpn` zone plugin. | |
1556b768 AD |
128 | |
129 | ||
4e652aba | 130 | [[pvesdn_zone_plugins]] |
1556b768 AD |
131 | Zones Plugins |
132 | ------------- | |
1556b768 | 133 | |
ee6e18c4 TL |
134 | Common options |
135 | ~~~~~~~~~~~~~~ | |
1556b768 | 136 | |
4e652aba TL |
137 | nodes:: Deploy and allow to use a VNets configured for this Zone only on these |
138 | nodes. | |
1556b768 | 139 | |
4e652aba | 140 | [[pvesdn_zone_plugin_vlan]] |
ee6e18c4 TL |
141 | VLAN Zones |
142 | ~~~~~~~~~~ | |
1556b768 | 143 | |
ee6e18c4 TL |
144 | This is the simplest plugin, it will reuse an existing local Linux or OVS |
145 | bridge, and manage VLANs on it. | |
146 | The benefit of using SDN module, is that you can create different zones with | |
147 | specific VNets VLAN tag, and restrict Virtual Machines to separated zones. | |
1556b768 | 148 | |
ee6e18c4 | 149 | Specific `VLAN` configuration options: |
1556b768 | 150 | |
ee6e18c4 TL |
151 | bridge:: Reuse this local VLAN-aware bridge, or OVS interface, already |
152 | configured on *each* local node. | |
1556b768 | 153 | |
4e652aba | 154 | [[pvesdn_zone_plugin_qinq]] |
ee6e18c4 TL |
155 | QinQ Zones |
156 | ~~~~~~~~~~ | |
1556b768 | 157 | |
ee6e18c4 TL |
158 | QinQ is stacked VLAN. The first VLAN tag defined for the zone |
159 | (so called 'service-vlan'), and the second VLAN tag defined for the vnets | |
1556b768 | 160 | |
ee6e18c4 | 161 | NOTE: Your physical network switchs must support stacked VLANs! |
1556b768 | 162 | |
ee6e18c4 | 163 | Specific QinQ configuration options: |
1556b768 | 164 | |
4e652aba TL |
165 | bridge:: A local VLAN-aware bridge already configured on each local node |
166 | ||
167 | service vlan:: The main VLAN tag of this zone | |
168 | ||
ee6e18c4 TL |
169 | mtu:: Due to the double stacking of tags you need 4 more bytes for QinQ VLANs. |
170 | For example, you reduce the MTU to `1496` if you physical interface MTU is | |
171 | `1500`. | |
1556b768 | 172 | |
4e652aba | 173 | [[pvesdn_zone_plugin_vxlan]] |
ee6e18c4 TL |
174 | VXLAN Zones |
175 | ~~~~~~~~~~~ | |
1556b768 | 176 | |
ee6e18c4 TL |
177 | The VXLAN plugin will establish a tunnel (named overlay) on top of an existing |
178 | network (named underlay). It encapsulate layer 2 Ethernet frames within layer | |
179 | 4 UDP datagrams, using `4789` as the default destination port. You can, for | |
180 | example, create a private IPv4 VXLAN network on top of public internet network | |
181 | nodes. | |
182 | This is a layer2 tunnel only, no routing between different VNets is possible. | |
1556b768 | 183 | |
ee6e18c4 | 184 | Each VNet will have use specific VXLAN id from the range (1 - 16777215). |
1556b768 | 185 | |
ee6e18c4 | 186 | Specific EVPN configuration options: |
1556b768 | 187 | |
4e652aba TL |
188 | peers address list:: A list of IPs from all nodes through which you want to |
189 | communicate. Can also be external nodes. | |
190 | ||
191 | mtu:: Because VXLAN encapsulation use 50bytes, the MTU need to be 50 bytes | |
192 | lower than the outgoing physical interface. | |
1556b768 | 193 | |
4e652aba | 194 | [[pvesdn_zone_plugin_evpn]] |
ee6e18c4 TL |
195 | EVPN Zones |
196 | ~~~~~~~~~~ | |
1556b768 | 197 | |
ee6e18c4 | 198 | This is the most complex of all supported plugins. |
1556b768 | 199 | |
ee6e18c4 TL |
200 | BGP-EVPN allows one to create routable layer3 network. The VNet of EVPN can |
201 | have an anycast IP-address and or MAC-address. The bridge IP is the same on each | |
202 | node, with this a virtual guest can use that address as gateway. | |
1556b768 | 203 | |
ee6e18c4 TL |
204 | Routing can work across VNets from different zones through a VRF (Virtual |
205 | Routing and Forwarding) interface. | |
1556b768 | 206 | |
ee6e18c4 | 207 | Specific EVPN configuration options: |
1556b768 | 208 | |
ee6e18c4 TL |
209 | VRF VXLAN Tag:: This is a vxlan-id used for routing interconnect between vnets, |
210 | it must be different than VXLAN-id of VNets | |
1556b768 | 211 | |
ee6e18c4 TL |
212 | controller:: an EVPN-controller need to be defined first (see controller |
213 | plugins section) | |
1556b768 | 214 | |
ee6e18c4 TL |
215 | mtu:: because VXLAN encapsulation use 50bytes, the MTU need to be 50 bytes |
216 | lower than the outgoing physical interface. | |
1556b768 AD |
217 | |
218 | ||
4e652aba | 219 | [[pvesdn_controller_plugins]] |
1556b768 AD |
220 | Controllers Plugins |
221 | ------------------- | |
222 | ||
4e652aba | 223 | [[pvesdn_controller_plugin_evpn]] |
ee6e18c4 TL |
224 | EVPN Controller |
225 | ~~~~~~~~~~~~~~~ | |
1556b768 | 226 | |
ee6e18c4 TL |
227 | For `BGP-EVPN`, we need a controller to manage the control plane. |
228 | The currently supported software controller is the "frr" router. | |
229 | You may need to install it on each node where you want to deploy EVPN zones. | |
1556b768 AD |
230 | |
231 | ---- | |
232 | apt install frr | |
233 | ---- | |
234 | ||
ee6e18c4 | 235 | Configuration options: |
1556b768 | 236 | |
4e652aba | 237 | asn:: A unique BGP ASN number. It's highly recommended to use private ASN |
ee6e18c4 TL |
238 | number (64512 – 65534, 4200000000 – 4294967294), as else you could end up |
239 | breaking, or get broken, by global routing by mistake. | |
1556b768 | 240 | |
4e652aba | 241 | peers:: An ip list of all nodes where you want to communicate (could be also |
ee6e18c4 | 242 | external nodes or route reflectors servers) |
1556b768 | 243 | |
ee6e18c4 TL |
244 | Additionally, if you want to route traffic from a SDN BGP-EVPN network to |
245 | external world: | |
1556b768 | 246 | |
ee6e18c4 TL |
247 | gateway-nodes:: The proxmox nodes from where the bgp-evpn traffic will exit to |
248 | external through the nodes default gateway | |
1556b768 | 249 | |
4e652aba TL |
250 | gateway-external-peers:: If you want that gateway nodes don't use the default |
251 | gateway, but, for example, sent traffic to external BGP routers, which handle | |
252 | (reverse) routing then dynamically you can use. For example | |
253 | `192.168.0.253,192.168.0.254' | |
1556b768 AD |
254 | |
255 | ||
4e652aba | 256 | [[pvesdn_local_deployment_monitoring]] |
ee6e18c4 | 257 | Local Deployment Monitoring |
1556b768 AD |
258 | --------------------------- |
259 | ||
ee6e18c4 TL |
260 | After applying the configuration through the main SDN web-interface panel, |
261 | the local network configuration is generated locally on each node in | |
262 | `/etc/network/interfaces.d/sdn`, and with ifupdown2 reloaded. | |
1556b768 | 263 | |
ee6e18c4 | 264 | You can monitor the status of local zones and vnets through the main tree. |
1556b768 | 265 | |
1556b768 | 266 | |
4e652aba | 267 | [[pvesdn_setup_example_vlan]] |
ee6e18c4 TL |
268 | VLAN Setup Example |
269 | ------------------ | |
1556b768 | 270 | |
ee6e18c4 TL |
271 | TIP: While we show plain configuration content here, almost everything should |
272 | be configurable using the web-interface only. | |
273 | ||
274 | Node1: /etc/network/interfaces | |
1556b768 | 275 | |
1556b768 AD |
276 | ---- |
277 | auto vmbr0 | |
278 | iface vmbr0 inet manual | |
ee6e18c4 TL |
279 | bridge-ports eno1 |
280 | bridge-stp off | |
281 | bridge-fd 0 | |
1556b768 AD |
282 | bridge-vlan-aware yes |
283 | bridge-vids 2-4094 | |
284 | ||
285 | #management ip on vlan100 | |
286 | auto vmbr0.100 | |
287 | iface vmbr0.100 inet static | |
288 | address 192.168.0.1/24 | |
289 | ||
290 | source /etc/network/interfaces.d/* | |
1556b768 AD |
291 | ---- |
292 | ||
ee6e18c4 | 293 | Node2: /etc/network/interfaces |
1556b768 AD |
294 | |
295 | ---- | |
296 | auto vmbr0 | |
297 | iface vmbr0 inet manual | |
ee6e18c4 TL |
298 | bridge-ports eno1 |
299 | bridge-stp off | |
300 | bridge-fd 0 | |
1556b768 AD |
301 | bridge-vlan-aware yes |
302 | bridge-vids 2-4094 | |
303 | ||
304 | #management ip on vlan100 | |
305 | auto vmbr0.100 | |
306 | iface vmbr0.100 inet static | |
307 | address 192.168.0.2/24 | |
308 | ||
309 | source /etc/network/interfaces.d/* | |
310 | ---- | |
311 | ||
ee6e18c4 | 312 | Create a VLAN zone named `myvlanzone': |
1556b768 AD |
313 | |
314 | ---- | |
ee6e18c4 | 315 | id: myvlanzone |
1556b768 AD |
316 | bridge: vmbr0 |
317 | ---- | |
318 | ||
ee6e18c4 TL |
319 | Create a VNet named `myvnet1' with `vlan-id` `10' and the previously created |
320 | `myvlanzone' as it's zone. | |
1556b768 AD |
321 | |
322 | ---- | |
323 | id: myvnet1 | |
324 | zone: myvlanzone | |
325 | tag: 10 | |
326 | ---- | |
327 | ||
ee6e18c4 TL |
328 | Apply the configuration through the main SDN panel, to create VNets locally on |
329 | each nodes. | |
1556b768 | 330 | |
ee6e18c4 | 331 | Create a Debian-based Virtual Machine (vm1) on node1, with a vNIC on `myvnet1'. |
1556b768 | 332 | |
ee6e18c4 | 333 | Use the following network configuration for this VM: |
1556b768 AD |
334 | |
335 | ---- | |
336 | auto eth0 | |
337 | iface eth0 inet static | |
ee6e18c4 | 338 | address 10.0.3.100/24 |
1556b768 AD |
339 | ---- |
340 | ||
ee6e18c4 TL |
341 | Create a second Virtual Machine (vm2) on node2, with a vNIC on the same VNet |
342 | `myvnet1' as vm1. | |
343 | ||
344 | Use the following network configuration for this VM: | |
345 | ||
1556b768 AD |
346 | ---- |
347 | auto eth0 | |
348 | iface eth0 inet static | |
ee6e18c4 | 349 | address 10.0.3.101/24 |
1556b768 AD |
350 | ---- |
351 | ||
ee6e18c4 | 352 | Then, you should be able to ping between both VMs over that network. |
1556b768 AD |
353 | |
354 | ||
4e652aba TL |
355 | [[pvesdn_setup_example_qinq]] |
356 | QinQ Setup Example | |
1556b768 | 357 | ------------------ |
ee6e18c4 TL |
358 | |
359 | TIP: While we show plain configuration content here, almost everything should | |
360 | be configurable using the web-interface only. | |
361 | ||
362 | Node1: /etc/network/interfaces | |
363 | ||
1556b768 AD |
364 | ---- |
365 | auto vmbr0 | |
366 | iface vmbr0 inet manual | |
ee6e18c4 TL |
367 | bridge-ports eno1 |
368 | bridge-stp off | |
369 | bridge-fd 0 | |
1556b768 AD |
370 | bridge-vlan-aware yes |
371 | bridge-vids 2-4094 | |
372 | ||
373 | #management ip on vlan100 | |
374 | auto vmbr0.100 | |
375 | iface vmbr0.100 inet static | |
376 | address 192.168.0.1/24 | |
377 | ||
378 | source /etc/network/interfaces.d/* | |
379 | ---- | |
380 | ||
ee6e18c4 | 381 | Node2: /etc/network/interfaces |
1556b768 AD |
382 | |
383 | ---- | |
384 | auto vmbr0 | |
385 | iface vmbr0 inet manual | |
ee6e18c4 TL |
386 | bridge-ports eno1 |
387 | bridge-stp off | |
388 | bridge-fd 0 | |
1556b768 AD |
389 | bridge-vlan-aware yes |
390 | bridge-vids 2-4094 | |
391 | ||
392 | #management ip on vlan100 | |
393 | auto vmbr0.100 | |
394 | iface vmbr0.100 inet static | |
395 | address 192.168.0.2/24 | |
396 | ||
397 | source /etc/network/interfaces.d/* | |
398 | ---- | |
399 | ||
ee6e18c4 | 400 | Create an QinQ zone named `qinqzone1' with service VLAN 20 |
1556b768 AD |
401 | |
402 | ---- | |
403 | id: qinqzone1 | |
404 | bridge: vmbr0 | |
405 | service vlan: 20 | |
406 | ---- | |
407 | ||
ee6e18c4 | 408 | Create another QinQ zone named `qinqzone2' with service VLAN 30 |
1556b768 AD |
409 | |
410 | ---- | |
411 | id: qinqzone2 | |
412 | bridge: vmbr0 | |
413 | service vlan: 30 | |
414 | ---- | |
415 | ||
ee6e18c4 TL |
416 | Create a VNet named `myvnet1' with customer vlan-id 100 on the previously |
417 | created `qinqzone1' zone. | |
1556b768 AD |
418 | |
419 | ---- | |
420 | id: myvnet1 | |
421 | zone: qinqzone1 | |
422 | tag: 100 | |
423 | ---- | |
424 | ||
ee6e18c4 TL |
425 | Create a `myvnet2' with customer VLAN-id 100 on the previously created |
426 | `qinqzone2' zone. | |
1556b768 AD |
427 | |
428 | ---- | |
429 | id: myvnet2 | |
430 | zone: qinqzone1 | |
431 | tag: 100 | |
432 | ---- | |
433 | ||
ee6e18c4 TL |
434 | Apply the configuration on the main SDN web-interface panel to create VNets |
435 | locally on each nodes. | |
1556b768 | 436 | |
ee6e18c4 | 437 | Create a Debian-based Virtual Machine (vm1) on node1, with a vNIC on `myvnet1'. |
1556b768 | 438 | |
ee6e18c4 | 439 | Use the following network configuration for this VM: |
1556b768 AD |
440 | |
441 | ---- | |
442 | auto eth0 | |
443 | iface eth0 inet static | |
444 | address 10.0.3.100/24 | |
445 | ---- | |
446 | ||
ee6e18c4 TL |
447 | Create a second Virtual Machine (vm2) on node2, with a vNIC on the same VNet |
448 | `myvnet1' as vm1. | |
449 | ||
450 | Use the following network configuration for this VM: | |
451 | ||
1556b768 AD |
452 | ---- |
453 | auto eth0 | |
454 | iface eth0 inet static | |
455 | address 10.0.3.101/24 | |
456 | ---- | |
457 | ||
ee6e18c4 TL |
458 | Create a third Virtual Machine (vm3) on node1, with a vNIC on the other VNet |
459 | `myvnet2'. | |
460 | ||
461 | Use the following network configuration for this VM: | |
1556b768 AD |
462 | |
463 | ---- | |
464 | auto eth0 | |
465 | iface eth0 inet static | |
466 | address 10.0.3.102/24 | |
467 | ---- | |
468 | ||
ee6e18c4 TL |
469 | Create another Virtual Machine (vm4) on node2, with a vNIC on the same VNet |
470 | `myvnet2' as vm3. | |
471 | ||
472 | Use the following network configuration for this VM: | |
473 | ||
1556b768 AD |
474 | ---- |
475 | auto eth0 | |
476 | iface eth0 inet static | |
477 | address 10.0.3.103/24 | |
478 | ---- | |
479 | ||
ee6e18c4 TL |
480 | Then, you should be able to ping between the VMs 'vm1' and 'vm2', also |
481 | between 'vm3' and 'vm4'. But, none of VMs 'vm1' or 'vm2' can ping the VMs 'vm3' | |
482 | or 'vm4', as they are on a different zone with different service-vlan. | |
1556b768 | 483 | |
1556b768 | 484 | |
4e652aba | 485 | [[pvesdn_setup_example_vxlan]] |
ee6e18c4 | 486 | VXLAN Setup Example |
1556b768 | 487 | ------------------- |
ee6e18c4 | 488 | |
4e652aba TL |
489 | TIP: While we show plain configuration content here, almost everything should |
490 | be configurable using the web-interface only. | |
491 | ||
1556b768 | 492 | node1: /etc/network/interfaces |
ee6e18c4 | 493 | |
1556b768 AD |
494 | ---- |
495 | auto vmbr0 | |
496 | iface vmbr0 inet static | |
497 | address 192.168.0.1/24 | |
498 | gateway 192.168.0.254 | |
ee6e18c4 TL |
499 | bridge-ports eno1 |
500 | bridge-stp off | |
501 | bridge-fd 0 | |
1556b768 AD |
502 | mtu 1500 |
503 | ||
504 | source /etc/network/interfaces.d/* | |
505 | ---- | |
506 | ||
507 | node2: /etc/network/interfaces | |
508 | ||
509 | ---- | |
510 | auto vmbr0 | |
511 | iface vmbr0 inet static | |
512 | address 192.168.0.2/24 | |
513 | gateway 192.168.0.254 | |
ee6e18c4 TL |
514 | bridge-ports eno1 |
515 | bridge-stp off | |
516 | bridge-fd 0 | |
1556b768 AD |
517 | mtu 1500 |
518 | ||
519 | source /etc/network/interfaces.d/* | |
520 | ---- | |
521 | ||
522 | node3: /etc/network/interfaces | |
523 | ||
524 | ---- | |
525 | auto vmbr0 | |
526 | iface vmbr0 inet static | |
527 | address 192.168.0.3/24 | |
528 | gateway 192.168.0.254 | |
ee6e18c4 TL |
529 | bridge-ports eno1 |
530 | bridge-stp off | |
531 | bridge-fd 0 | |
1556b768 AD |
532 | mtu 1500 |
533 | ||
534 | source /etc/network/interfaces.d/* | |
535 | ---- | |
536 | ||
ee6e18c4 TL |
537 | Create an VXLAN zone named `myvxlanzone', use the lower MTU to ensure the extra |
538 | 50 bytes of the VXLAN header can fit. Add all previously configured IPs from | |
539 | the nodes as peer address list. | |
1556b768 AD |
540 | |
541 | ---- | |
542 | id: myvxlanzone | |
543 | peers address list: 192.168.0.1,192.168.0.2,192.168.0.3 | |
544 | mtu: 1450 | |
545 | ---- | |
546 | ||
ee6e18c4 TL |
547 | Create a VNet named `myvnet1' using the VXLAN zone `myvxlanzone' created |
548 | previously. | |
1556b768 AD |
549 | |
550 | ---- | |
551 | id: myvnet1 | |
552 | zone: myvxlanzone | |
553 | tag: 100000 | |
554 | ---- | |
555 | ||
ee6e18c4 TL |
556 | Apply the configuration on the main SDN web-interface panel to create VNets |
557 | locally on each nodes. | |
1556b768 | 558 | |
ee6e18c4 | 559 | Create a Debian-based Virtual Machine (vm1) on node1, with a vNIC on `myvnet1'. |
1556b768 | 560 | |
ee6e18c4 | 561 | Use the following network configuration for this VM, note the lower MTU here. |
1556b768 AD |
562 | |
563 | ---- | |
564 | auto eth0 | |
565 | iface eth0 inet static | |
566 | address 10.0.3.100/24 | |
567 | mtu 1450 | |
568 | ---- | |
569 | ||
ee6e18c4 TL |
570 | Create a second Virtual Machine (vm2) on node3, with a vNIC on the same VNet |
571 | `myvnet1' as vm1. | |
572 | ||
573 | Use the following network configuration for this VM: | |
574 | ||
1556b768 AD |
575 | ---- |
576 | auto eth0 | |
577 | iface eth0 inet static | |
578 | address 10.0.3.101/24 | |
579 | mtu 1450 | |
580 | ---- | |
581 | ||
ee6e18c4 | 582 | Then, you should be able to ping between between 'vm1' and 'vm2'. |
1556b768 AD |
583 | |
584 | ||
4e652aba TL |
585 | [[pvesdn_setup_example_evpn]] |
586 | EVPN Setup Example | |
1556b768 | 587 | ------------------ |
ee6e18c4 | 588 | |
1556b768 AD |
589 | node1: /etc/network/interfaces |
590 | ||
591 | ---- | |
592 | auto vmbr0 | |
593 | iface vmbr0 inet static | |
594 | address 192.168.0.1/24 | |
595 | gateway 192.168.0.254 | |
596 | bridge-ports eno1 | |
597 | bridge-stp off | |
598 | bridge-fd 0 | |
599 | mtu 1500 | |
600 | ||
601 | source /etc/network/interfaces.d/* | |
602 | ---- | |
603 | ||
604 | node2: /etc/network/interfaces | |
605 | ||
606 | ---- | |
607 | auto vmbr0 | |
608 | iface vmbr0 inet static | |
609 | address 192.168.0.2/24 | |
610 | gateway 192.168.0.254 | |
611 | bridge-ports eno1 | |
612 | bridge-stp off | |
613 | bridge-fd 0 | |
614 | mtu 1500 | |
615 | ||
616 | source /etc/network/interfaces.d/* | |
617 | ---- | |
618 | ||
619 | node3: /etc/network/interfaces | |
620 | ||
621 | ---- | |
622 | auto vmbr0 | |
623 | iface vmbr0 inet static | |
624 | address 192.168.0.3/24 | |
625 | gateway 192.168.0.254 | |
626 | bridge-ports eno1 | |
627 | bridge-stp off | |
628 | bridge-fd 0 | |
629 | mtu 1500 | |
630 | ||
631 | source /etc/network/interfaces.d/* | |
632 | ---- | |
633 | ||
ee6e18c4 TL |
634 | Create a EVPN controller, using a private ASN number and above node addreesses |
635 | as peers. Define 'node1' and 'node2' as gateway nodes. | |
1556b768 AD |
636 | |
637 | ---- | |
638 | id: myevpnctl | |
639 | asn: 65000 | |
640 | peers: 192.168.0.1,192.168.0.2,192.168.0.3 | |
641 | gateway nodes: node1,node2 | |
642 | ---- | |
643 | ||
ee6e18c4 TL |
644 | Create an EVPN zone named `myevpnzone' using the previously created |
645 | EVPN-controller. | |
1556b768 AD |
646 | |
647 | ---- | |
648 | id: myevpnzone | |
649 | vrf vxlan tag: 10000 | |
650 | controller: myevpnctl | |
651 | mtu: 1450 | |
652 | ---- | |
653 | ||
ee6e18c4 TL |
654 | Create the first VNet named `myvnet1' using the EVPN zone `myevpnzone', a IPv4 |
655 | CIDR network and a random MAC address. | |
1556b768 AD |
656 | |
657 | ---- | |
658 | id: myvnet1 | |
659 | zone: myevpnzone | |
660 | tag: 11000 | |
661 | ipv4: 10.0.1.1/24 | |
662 | mac address: 8C:73:B2:7B:F9:60 #random generate mac addres | |
663 | ---- | |
664 | ||
ee6e18c4 TL |
665 | Create the second VNet named `myvnet2' using the same EVPN zone `myevpnzone', a |
666 | different IPv4 CIDR network and a different random MAC address than `myvnet1'. | |
1556b768 AD |
667 | |
668 | ---- | |
669 | id: myvnet2 | |
670 | zone: myevpnzone | |
671 | tag: 12000 | |
672 | ipv4: 10.0.2.1/24 | |
673 | mac address: 8C:73:B2:7B:F9:61 #random mac, need to be different on each vnet | |
674 | ---- | |
675 | ||
ee6e18c4 TL |
676 | Apply the configuration on the main SDN web-interface panel to create VNets |
677 | locally on each nodes and generate the FRR config. | |
1556b768 AD |
678 | |
679 | ||
ee6e18c4 | 680 | Create a Debian-based Virtual Machine (vm1) on node1, with a vNIC on `myvnet1'. |
1556b768 | 681 | |
ee6e18c4 | 682 | Use the following network configuration for this VM: |
1556b768 AD |
683 | |
684 | ---- | |
685 | auto eth0 | |
686 | iface eth0 inet static | |
687 | address 10.0.1.100/24 | |
688 | gateway 10.0.1.1 #this is the ip of the vnet1 | |
689 | mtu 1450 | |
690 | ---- | |
691 | ||
ee6e18c4 TL |
692 | Create a second Virtual Machine (vm2) on node2, with a vNIC on the other VNet |
693 | `myvnet2'. | |
694 | ||
695 | Use the following network configuration for this VM: | |
696 | ||
1556b768 AD |
697 | ---- |
698 | auto eth0 | |
699 | iface eth0 inet static | |
700 | address 10.0.2.100/24 | |
701 | gateway 10.0.2.1 #this is the ip of the vnet2 | |
702 | mtu 1450 | |
703 | ---- | |
704 | ||
705 | ||
706 | Then, you should be able to ping vm2 from vm1, and vm1 from vm2. | |
707 | ||
ee6e18c4 TL |
708 | If you ping an external IP from 'vm2' on the non-gateway 'node3', the packet |
709 | will go to the configured 'myvnet2' gateway, then will be routed to gateway | |
710 | nodes ('node1' or 'node2') and from there it will leave those nodes over the | |
711 | default gateway configured on node1 or node2. | |
1556b768 | 712 | |
ee6e18c4 TL |
713 | NOTE: Of course you need to add reverse routes for the '10.0.1.0/24' and |
714 | '10.0.2.0/24' network to node1, node2 on your external gateway, so that the | |
715 | public network can reply back. | |
1556b768 | 716 | |
ee6e18c4 TL |
717 | If you have configured an external BGP router, the BGP-EVPN routes (10.0.1.0/24 |
718 | and 10.0.2.0/24 in this example), will be announced dynamically. |