]> git.proxmox.com Git - pve-docs.git/blame - pvesdn.adoc
ceph: section language fixup
[pve-docs.git] / pvesdn.adoc
CommitLineData
1556b768
AD
1[[chapter_pvesdn]]
2Software Defined Network
3========================
4ifndef::manvolnum[]
5:pve-toplevel:
6endif::manvolnum[]
7
ee6e18c4
TL
8The **S**oftware **D**efined **N**etwork (SDN) feature allows one to create
9virtual networks (vnets) at datacenter level.
1556b768 10
ee6e18c4
TL
11WARNING: SDN is currently an **experimental feature** in {pve}. This
12Documentation for it is also still under development, ask on our
13xref:getting_help[mailing lists or in the forum] for questions and feedback.
14
15
4e652aba 16[[pvesdn_installation]]
ee6e18c4
TL
17Installation
18------------
19
20To enable the experimental SDN integration, you need to install
21"libpve-network-perl" package
1556b768
AD
22
23----
24apt install libpve-network-perl
25----
26
ee6e18c4
TL
27You need to have `ifupdown2` package installed on each node to manage local
28configuration reloading without reboot:
1556b768
AD
29
30----
31apt install ifupdown2
32----
33
a6af82c7
AD
34You need to add
35----
36source /etc/network/interfaces.d/*
37----
38at the end of /etc/network/interfaces to have the sdn config included
39
40
ee6e18c4
TL
41Basic Overview
42--------------
43
44The {pve} SDN allows separation and fine grained control of Virtual Guests
45networks, using flexible software controlled configurations.
46
8ac25ffe
TL
47Separation consists of zones, a zone is it's own virtual separated network area.
48A 'VNet' is a type of a virtual network connected to a zone. Depending on which
49type or plugin the zone uses it can behave differently and offer different
50features, advantages or disadvantages.
51Normally a 'VNet' shows up as a common Linux bridge with either a VLAN or
52'VXLAN' tag, but some can also use layer 3 routing for control.
53The 'VNets' are deployed locally on each node, after configuration was committed
60ed554f 54from the cluster-wide datacenter SDN administration interface.
ee6e18c4
TL
55
56
1556b768 57Main configuration
a6af82c7 58~~~~~~~~~~~~~~~~~~
1556b768 59
ee6e18c4
TL
60The configuration is done at datacenter (cluster-wide) level, it will be saved
61in configuration files located in the shared configuration file system:
62`/etc/pve/sdn`
1556b768 63
a6af82c7 64On the web-interface SDN feature have 3 main sections for the configuration
1556b768 65
ee6e18c4 66* SDN: a overview of the SDN state
1556b768 67
ee6e18c4 68* Zones: Create and manage the virtual separated network Zones
1556b768 69
a6af82c7
AD
70* VNets: Create virtual network bridges + subnets management.
71
72And some options:
1556b768 73
8ac25ffe 74* Controller: For complex setups to control Layer 3 routing
1556b768 75
3093e62d 76* Sub-nets: Used to defined ip networks on VNets.
a6af82c7 77
3093e62d 78* IPAM: Allow to use external tools for IP address management (guest IPs)
a6af82c7 79
3093e62d
TL
80* DNS: Allow to define a DNS server api for registering a virtual guests
81 hostname and IP-addresses
1556b768 82
4e652aba 83[[pvesdn_config_main_sdn]]
a6af82c7 84
1556b768
AD
85SDN
86~~~
87
ee6e18c4
TL
88This is the main status panel. Here you can see deployment status of zones on
89different nodes.
1556b768 90
ee6e18c4 91There is an 'Apply' button, to push and reload local configuration on all
60ed554f 92cluster nodes.
1556b768
AD
93
94
a6af82c7
AD
95[[pvesdn_local_deployment_monitoring]]
96Local Deployment Monitoring
97~~~~~~~~~~~~~~~~~~~~~~~~~~~
98
99After applying the configuration through the main SDN web-interface panel,
100the local network configuration is generated locally on each node in
101`/etc/network/interfaces.d/sdn`, and with ifupdown2 reloaded.
102
103You can monitor the status of local zones and vnets through the main tree.
104
105
4e652aba 106[[pvesdn_config_zone]]
1556b768 107Zones
a6af82c7 108-----
1556b768 109
ee6e18c4 110A zone will define a virtually separated network.
1556b768 111
ee6e18c4 112It can use different technologies for separation:
1556b768 113
ee6e18c4 114* VLAN: Virtual LANs are the classic method to sub-divide a LAN
1556b768 115
ee6e18c4 116* QinQ: stacked VLAN (formally known as `IEEE 802.1ad`)
1556b768 117
ee6e18c4 118* VXLAN: (layer2 vxlan)
1556b768 119
a6af82c7
AD
120* Simple: Isolated Bridge, simple l3 routing bridge (NAT)
121
ee6e18c4 122* bgp-evpn: vxlan using layer3 border gateway protocol routing
1556b768
AD
123
124You can restrict a zone to specific nodes.
125
ee6e18c4
TL
126It's also possible to add permissions on a zone, to restrict user to use only a
127specific zone and only the VNets in that zone
1556b768 128
a6af82c7
AD
129Common options
130~~~~~~~~~~~~~~
1556b768 131
3093e62d
TL
132The following options are available for all zone types.
133
a6af82c7
AD
134nodes:: Deploy and allow to use a VNets configured for this Zone only on these
135nodes.
9e773815 136
3093e62d 137ipam:: Optional, if you want to use an ipam tool to manage ips in this zone
1556b768 138
3093e62d 139dns:: Optional, dns api server.
1556b768 140
3093e62d 141reversedns:: Optional, reverse dns api server.
1556b768 142
3093e62d
TL
143dnszone:: Optional, dns domain name. Use to register hostname like
144`<hostname>.<domain>`. The dns zone need to be already existing in dns server.
1556b768
AD
145
146
a6af82c7
AD
147[[pvesdn_zone_plugin_simple]]
148Simple Zones
149~~~~~~~~~~~~
1556b768 150
a6af82c7
AD
151This is the simplest plugin, it will create an isolated vnet bridge.
152This bridge is not linked to physical interfaces, VM traffic is only
153local to the node(s).
154It can be also used for NAT or routed setup.
1556b768 155
4e652aba 156[[pvesdn_zone_plugin_vlan]]
ee6e18c4
TL
157VLAN Zones
158~~~~~~~~~~
1556b768 159
a6af82c7
AD
160This plugin will reuse an existing local Linux or OVS bridge,
161and manage VLANs on it.
ee6e18c4
TL
162The benefit of using SDN module, is that you can create different zones with
163specific VNets VLAN tag, and restrict Virtual Machines to separated zones.
1556b768 164
ee6e18c4 165Specific `VLAN` configuration options:
1556b768 166
a91b3e7f 167bridge:: Reuse this local bridge or OVS switch, already
ee6e18c4 168configured on *each* local node.
1556b768 169
4e652aba 170[[pvesdn_zone_plugin_qinq]]
ee6e18c4
TL
171QinQ Zones
172~~~~~~~~~~
1556b768 173
ee6e18c4
TL
174QinQ is stacked VLAN. The first VLAN tag defined for the zone
175(so called 'service-vlan'), and the second VLAN tag defined for the vnets
1556b768 176
8ac25ffe 177NOTE: Your physical network switches must support stacked VLANs!
1556b768 178
ee6e18c4 179Specific QinQ configuration options:
1556b768 180
4e652aba
TL
181bridge:: A local VLAN-aware bridge already configured on each local node
182
183service vlan:: The main VLAN tag of this zone
184
ee6e18c4
TL
185mtu:: Due to the double stacking of tags you need 4 more bytes for QinQ VLANs.
186For example, you reduce the MTU to `1496` if you physical interface MTU is
187`1500`.
1556b768 188
4e652aba 189[[pvesdn_zone_plugin_vxlan]]
ee6e18c4
TL
190VXLAN Zones
191~~~~~~~~~~~
1556b768 192
ee6e18c4
TL
193The VXLAN plugin will establish a tunnel (named overlay) on top of an existing
194network (named underlay). It encapsulate layer 2 Ethernet frames within layer
1954 UDP datagrams, using `4789` as the default destination port. You can, for
196example, create a private IPv4 VXLAN network on top of public internet network
197nodes.
198This is a layer2 tunnel only, no routing between different VNets is possible.
1556b768 199
ee6e18c4 200Each VNet will have use specific VXLAN id from the range (1 - 16777215).
1556b768 201
ee6e18c4 202Specific EVPN configuration options:
1556b768 203
4e652aba
TL
204peers address list:: A list of IPs from all nodes through which you want to
205communicate. Can also be external nodes.
206
207mtu:: Because VXLAN encapsulation use 50bytes, the MTU need to be 50 bytes
208lower than the outgoing physical interface.
1556b768 209
4e652aba 210[[pvesdn_zone_plugin_evpn]]
ee6e18c4
TL
211EVPN Zones
212~~~~~~~~~~
1556b768 213
ee6e18c4 214This is the most complex of all supported plugins.
1556b768 215
ee6e18c4
TL
216BGP-EVPN allows one to create routable layer3 network. The VNet of EVPN can
217have an anycast IP-address and or MAC-address. The bridge IP is the same on each
218node, with this a virtual guest can use that address as gateway.
1556b768 219
ee6e18c4
TL
220Routing can work across VNets from different zones through a VRF (Virtual
221Routing and Forwarding) interface.
1556b768 222
ee6e18c4 223Specific EVPN configuration options:
1556b768 224
ee6e18c4
TL
225VRF VXLAN Tag:: This is a vxlan-id used for routing interconnect between vnets,
226it must be different than VXLAN-id of VNets
1556b768 227
ee6e18c4
TL
228controller:: an EVPN-controller need to be defined first (see controller
229plugins section)
1556b768 230
a6af82c7
AD
231
232Exit Nodes:: This is used if you want to defined some proxmox nodes, as
233 exit gateway from evpn network through real network. This nodes
234 will announce a default route in the evpn network.
235
ee6e18c4
TL
236mtu:: because VXLAN encapsulation use 50bytes, the MTU need to be 50 bytes
237lower than the outgoing physical interface.
1556b768
AD
238
239
a6af82c7
AD
240[[pvesdn_config_vnet]]
241VNets
242-----
243
244A `VNet` is in its basic form just a Linux bridge that will be deployed locally
245on the node and used for Virtual Machine communication.
246
247VNet properties are:
248
249ID:: a 8 characters ID to name and identify a VNet
250
251Alias:: Optional longer name, if the ID isn't enough
252
253Zone:: The associated zone for this VNet
254
255Tag:: The unique VLAN or VXLAN id
256
257VLAN Aware:: Allow to add an extra VLAN tag in the virtual machine or
258 container vNIC configurations or allow the guest OS to manage the VLAN's tag.
259
260[[pvesdn_config_subnet]]
261
3093e62d
TL
262Sub-Nets
263~~~~~~~~
264
265A sub-network (subnet or sub-net) allows you to define a specific IP network
266(IPv4 or IPv6). For each VNET, you can define one or more subnets.
1556b768 267
3093e62d 268A subnet can be used to:
a6af82c7 269
3093e62d
TL
270* restrict IP-addresses you can define on a specific VNET
271* assign routes/gateway on a VNET in layer 3 zones
272* enable SNAT on a VNET in layer 3 zones
273* auto assign IPs on virtual guests (VM or CT) through IPAM plugin
274* DNS registration through DNS plugins
a6af82c7 275
3093e62d
TL
276If an IPAM server is associated to the subnet zone, the subnet prefix will be
277automatically registered in the IPAM.
a6af82c7
AD
278
279
280Subnet properties are:
281
282ID:: a cidr network address. Ex: 10.0.0.0/8
283
284Gateway:: ip address for the default gateway of the network.
3093e62d
TL
285 On layer3 zones (simple/evpn plugins), it'll be deployed on the vnet.
286
a6af82c7 287Snat:: Optional, Enable Snat for layer3 zones (simple/evpn plugins) for this subnet.
3093e62d
TL
288 The subnet source ip will be natted to server outgoing interface/ip.
289 On evpn zone, it's done only on evpn gateway-nodes.
a6af82c7
AD
290
291Dnszoneprefix:: Optional, add a prefix to domain registration, like <hostname>.prefix.<domain>
292
293
a6af82c7
AD
294[[pvesdn_config_controllers]]
295Controllers
296-----------
297
298Some zone types need an external controller to manage the VNet control-plane.
299Currently this is only required for the `bgp-evpn` zone plugin.
8ac25ffe 300
4e652aba 301[[pvesdn_controller_plugin_evpn]]
ee6e18c4
TL
302EVPN Controller
303~~~~~~~~~~~~~~~
1556b768 304
ee6e18c4
TL
305For `BGP-EVPN`, we need a controller to manage the control plane.
306The currently supported software controller is the "frr" router.
307You may need to install it on each node where you want to deploy EVPN zones.
1556b768
AD
308
309----
a6af82c7 310apt install frr frr-pythontools
1556b768
AD
311----
312
ee6e18c4 313Configuration options:
1556b768 314
4e652aba 315asn:: A unique BGP ASN number. It's highly recommended to use private ASN
ee6e18c4
TL
316number (64512 – 65534, 4200000000 – 4294967294), as else you could end up
317breaking, or get broken, by global routing by mistake.
1556b768 318
a6af82c7 319peers:: An ip list of all nodes where you want to communicate for the EVPN (could be also
ee6e18c4 320external nodes or route reflectors servers)
1556b768 321
1556b768 322
a6af82c7
AD
323[[pvesdn_controller_plugin_BGP]]
324BGP Controller
325~~~~~~~~~~~~~~~
1556b768 326
a6af82c7
AD
327The bgp controller is not used directly by a zone.
328You can used it to configure frr to manage bgp peers.
1556b768 329
3093e62d 330For BGP-evpn, it can be use to define a different ASN by node, so doing EBGP.
1556b768 331
a6af82c7 332Configuration options:
1556b768 333
a6af82c7 334asn:: A unique BGP ASN number. It's highly recommended to use private ASN
3093e62d
TL
335 number from the range (64512 - 65534) or (4200000000 - 4294967294), as else
336 you could end up breaking, or get broken, by global routing by mistake.
a6af82c7 337
3093e62d
TL
338peers:: An IP list of peers you want to communicate with for the underlying
339 BGP network.
a6af82c7 340
3093e62d 341ebgp:: If your peer's remote-AS is different, it's enabling EBGP.
a6af82c7 342
3093e62d 343node:: The node of this BGP controller
a6af82c7 344
3093e62d
TL
345loopback:: If you want to use a loopback or dummy interface as source for the
346 evpn network. (for multipath)
a6af82c7
AD
347
348
349[[pvesdn_config_ipam]]
3093e62d 350IPAMs
a6af82c7
AD
351-----
352IPAM (IP address management) tools, are used to manage/assign ips on your devices on the network.
353It can be used to find free ip address when you create a vm/ct for example (not yet implemented).
354
355An IPAM is associated to 1 or multiple zones, to provide ip addresses for all subnets defined in this zone.
356
357
358[[pvesdn_ipam_plugin_pveipam]]
3093e62d
TL
359{pve} IPAM plugin
360~~~~~~~~~~~~~~~~~
a6af82c7 361
3093e62d
TL
362This is the default internal IPAM for your proxmox cluster if you don't have
363external ipam software
a6af82c7
AD
364
365[[pvesdn_ipam_plugin_phpipam]]
3093e62d 366phpIPAM plugin
a6af82c7
AD
367~~~~~~~~~~~~~~
368https://phpipam.net/
369
3093e62d
TL
370You need to create an application in phpipam, and add an api token with admin
371permission
a6af82c7 372
3093e62d 373phpIPAM properties are:
a6af82c7 374
3093e62d
TL
375url:: The REST-API endpoint: `http://phpipam.domain.com/api/<appname>/`
376token:: An API access token
377section:: An integer ID. Sections are group of subnets in phpIPAM. Default
378 installations use `sectionid=1` for customers.
a6af82c7
AD
379
380[[pvesdn_ipam_plugin_netbox]]
3093e62d 381Netbox IPAM plugin
a6af82c7 382~~~~~~~~~~~~~~~~~~
3093e62d
TL
383
384NetBox is an IP address management (IPAM) and data center infrastructure
385management (DCIM) tool, see the source code repository for details:
a6af82c7
AD
386https://github.com/netbox-community/netbox
387
3093e62d 388You need to create an api token in netbox
a6af82c7
AD
389https://netbox.readthedocs.io/en/stable/api/authentication
390
3093e62d 391NetBox properties are:
a6af82c7 392
3093e62d
TL
393url:: The REST API endpoint: `http://yournetbox.domain.com/api`
394token:: An API access token
a6af82c7
AD
395
396[[pvesdn_config_dns]]
3093e62d 397DNS
a6af82c7 398---
3093e62d
TL
399
400The DNS plugin in {pve} SDN is used to define a DNS API server for registration
401of your hostname and IP-address. A DNS configuration is associated with one or
402more zones, to provide DNS registration for all the sub-net IPs configured for
403a zone.
a6af82c7
AD
404
405[[pvesdn_dns_plugin_powerdns]]
3093e62d 406PowerDNS plugin
a6af82c7
AD
407~~~~~~~~~~~~~~~
408https://doc.powerdns.com/authoritative/http-api/index.html
409
3093e62d 410You need to enable the webserver and the API in your PowerDNS config:
1556b768 411
40f4dfc2 412----
a6af82c7
AD
413api=yes
414api-key=arandomgeneratedstring
415webserver=yes
416webserver-port=8081
40f4dfc2 417----
40f4dfc2 418
a6af82c7
AD
419Powerdns properties are:
420
3093e62d
TL
421url:: The REST API endpoint: http://yourpowerdnserver.domain.com:8081/api/v1/servers/localhost
422key:: An API access key
423ttl:: The default TTL for records
1556b768 424
1556b768 425
a6af82c7
AD
426Examples
427--------
428
4e652aba 429[[pvesdn_setup_example_vlan]]
ee6e18c4 430VLAN Setup Example
a6af82c7 431~~~~~~~~~~~~~~~~~~
1556b768 432
ee6e18c4
TL
433TIP: While we show plain configuration content here, almost everything should
434be configurable using the web-interface only.
435
436Node1: /etc/network/interfaces
1556b768 437
1556b768
AD
438----
439auto vmbr0
440iface vmbr0 inet manual
ee6e18c4
TL
441 bridge-ports eno1
442 bridge-stp off
443 bridge-fd 0
1556b768
AD
444 bridge-vlan-aware yes
445 bridge-vids 2-4094
446
447#management ip on vlan100
448auto vmbr0.100
449iface vmbr0.100 inet static
450 address 192.168.0.1/24
451
452source /etc/network/interfaces.d/*
1556b768
AD
453----
454
ee6e18c4 455Node2: /etc/network/interfaces
1556b768
AD
456
457----
458auto vmbr0
459iface vmbr0 inet manual
ee6e18c4
TL
460 bridge-ports eno1
461 bridge-stp off
462 bridge-fd 0
1556b768
AD
463 bridge-vlan-aware yes
464 bridge-vids 2-4094
465
466#management ip on vlan100
467auto vmbr0.100
468iface vmbr0.100 inet static
469 address 192.168.0.2/24
470
471source /etc/network/interfaces.d/*
472----
473
ee6e18c4 474Create a VLAN zone named `myvlanzone':
1556b768
AD
475
476----
ee6e18c4 477id: myvlanzone
1556b768
AD
478bridge: vmbr0
479----
480
ee6e18c4
TL
481Create a VNet named `myvnet1' with `vlan-id` `10' and the previously created
482`myvlanzone' as it's zone.
1556b768
AD
483
484----
485id: myvnet1
486zone: myvlanzone
487tag: 10
488----
489
ee6e18c4
TL
490Apply the configuration through the main SDN panel, to create VNets locally on
491each nodes.
1556b768 492
ee6e18c4 493Create a Debian-based Virtual Machine (vm1) on node1, with a vNIC on `myvnet1'.
1556b768 494
ee6e18c4 495Use the following network configuration for this VM:
1556b768
AD
496
497----
498auto eth0
499iface eth0 inet static
ee6e18c4 500 address 10.0.3.100/24
1556b768
AD
501----
502
ee6e18c4
TL
503Create a second Virtual Machine (vm2) on node2, with a vNIC on the same VNet
504`myvnet1' as vm1.
505
506Use the following network configuration for this VM:
507
1556b768
AD
508----
509auto eth0
510iface eth0 inet static
ee6e18c4 511 address 10.0.3.101/24
1556b768
AD
512----
513
ee6e18c4 514Then, you should be able to ping between both VMs over that network.
1556b768
AD
515
516
4e652aba
TL
517[[pvesdn_setup_example_qinq]]
518QinQ Setup Example
a6af82c7 519~~~~~~~~~~~~~~~~~~
ee6e18c4
TL
520
521TIP: While we show plain configuration content here, almost everything should
522be configurable using the web-interface only.
523
524Node1: /etc/network/interfaces
525
1556b768
AD
526----
527auto vmbr0
528iface vmbr0 inet manual
ee6e18c4
TL
529 bridge-ports eno1
530 bridge-stp off
531 bridge-fd 0
1556b768
AD
532 bridge-vlan-aware yes
533 bridge-vids 2-4094
534
535#management ip on vlan100
536auto vmbr0.100
537iface vmbr0.100 inet static
538 address 192.168.0.1/24
539
540source /etc/network/interfaces.d/*
541----
542
ee6e18c4 543Node2: /etc/network/interfaces
1556b768
AD
544
545----
546auto vmbr0
547iface vmbr0 inet manual
ee6e18c4
TL
548 bridge-ports eno1
549 bridge-stp off
550 bridge-fd 0
1556b768
AD
551 bridge-vlan-aware yes
552 bridge-vids 2-4094
553
554#management ip on vlan100
555auto vmbr0.100
556iface vmbr0.100 inet static
557 address 192.168.0.2/24
558
559source /etc/network/interfaces.d/*
560----
561
ee6e18c4 562Create an QinQ zone named `qinqzone1' with service VLAN 20
1556b768
AD
563
564----
565id: qinqzone1
566bridge: vmbr0
567service vlan: 20
568----
569
ee6e18c4 570Create another QinQ zone named `qinqzone2' with service VLAN 30
1556b768
AD
571
572----
573id: qinqzone2
574bridge: vmbr0
575service vlan: 30
576----
577
ee6e18c4
TL
578Create a VNet named `myvnet1' with customer vlan-id 100 on the previously
579created `qinqzone1' zone.
1556b768
AD
580
581----
582id: myvnet1
583zone: qinqzone1
584tag: 100
585----
586
ee6e18c4
TL
587Create a `myvnet2' with customer VLAN-id 100 on the previously created
588`qinqzone2' zone.
1556b768
AD
589
590----
591id: myvnet2
99a0bbe4 592zone: qinqzone2
1556b768
AD
593tag: 100
594----
595
ee6e18c4
TL
596Apply the configuration on the main SDN web-interface panel to create VNets
597locally on each nodes.
1556b768 598
ee6e18c4 599Create a Debian-based Virtual Machine (vm1) on node1, with a vNIC on `myvnet1'.
1556b768 600
ee6e18c4 601Use the following network configuration for this VM:
1556b768
AD
602
603----
604auto eth0
605iface eth0 inet static
606 address 10.0.3.100/24
607----
608
ee6e18c4
TL
609Create a second Virtual Machine (vm2) on node2, with a vNIC on the same VNet
610`myvnet1' as vm1.
611
612Use the following network configuration for this VM:
613
1556b768
AD
614----
615auto eth0
616iface eth0 inet static
617 address 10.0.3.101/24
618----
619
ee6e18c4
TL
620Create a third Virtual Machine (vm3) on node1, with a vNIC on the other VNet
621`myvnet2'.
622
623Use the following network configuration for this VM:
1556b768
AD
624
625----
626auto eth0
627iface eth0 inet static
628 address 10.0.3.102/24
629----
630
ee6e18c4
TL
631Create another Virtual Machine (vm4) on node2, with a vNIC on the same VNet
632`myvnet2' as vm3.
633
634Use the following network configuration for this VM:
635
1556b768
AD
636----
637auto eth0
638iface eth0 inet static
639 address 10.0.3.103/24
640----
641
ee6e18c4
TL
642Then, you should be able to ping between the VMs 'vm1' and 'vm2', also
643between 'vm3' and 'vm4'. But, none of VMs 'vm1' or 'vm2' can ping the VMs 'vm3'
644or 'vm4', as they are on a different zone with different service-vlan.
1556b768 645
1556b768 646
4e652aba 647[[pvesdn_setup_example_vxlan]]
ee6e18c4 648VXLAN Setup Example
a6af82c7 649~~~~~~~~~~~~~~~~~~~
ee6e18c4 650
4e652aba
TL
651TIP: While we show plain configuration content here, almost everything should
652be configurable using the web-interface only.
653
1556b768 654node1: /etc/network/interfaces
ee6e18c4 655
1556b768
AD
656----
657auto vmbr0
658iface vmbr0 inet static
659 address 192.168.0.1/24
660 gateway 192.168.0.254
ee6e18c4
TL
661 bridge-ports eno1
662 bridge-stp off
663 bridge-fd 0
1556b768
AD
664 mtu 1500
665
666source /etc/network/interfaces.d/*
667----
668
669node2: /etc/network/interfaces
670
671----
672auto vmbr0
673iface vmbr0 inet static
674 address 192.168.0.2/24
675 gateway 192.168.0.254
ee6e18c4
TL
676 bridge-ports eno1
677 bridge-stp off
678 bridge-fd 0
1556b768
AD
679 mtu 1500
680
681source /etc/network/interfaces.d/*
682----
683
684node3: /etc/network/interfaces
685
686----
687auto vmbr0
688iface vmbr0 inet static
689 address 192.168.0.3/24
690 gateway 192.168.0.254
ee6e18c4
TL
691 bridge-ports eno1
692 bridge-stp off
693 bridge-fd 0
1556b768
AD
694 mtu 1500
695
696source /etc/network/interfaces.d/*
697----
698
ee6e18c4
TL
699Create an VXLAN zone named `myvxlanzone', use the lower MTU to ensure the extra
70050 bytes of the VXLAN header can fit. Add all previously configured IPs from
701the nodes as peer address list.
1556b768
AD
702
703----
704id: myvxlanzone
705peers address list: 192.168.0.1,192.168.0.2,192.168.0.3
706mtu: 1450
707----
708
ee6e18c4
TL
709Create a VNet named `myvnet1' using the VXLAN zone `myvxlanzone' created
710previously.
1556b768
AD
711
712----
713id: myvnet1
714zone: myvxlanzone
715tag: 100000
716----
717
ee6e18c4
TL
718Apply the configuration on the main SDN web-interface panel to create VNets
719locally on each nodes.
1556b768 720
ee6e18c4 721Create a Debian-based Virtual Machine (vm1) on node1, with a vNIC on `myvnet1'.
1556b768 722
ee6e18c4 723Use the following network configuration for this VM, note the lower MTU here.
1556b768
AD
724
725----
726auto eth0
727iface eth0 inet static
728 address 10.0.3.100/24
729 mtu 1450
730----
731
ee6e18c4
TL
732Create a second Virtual Machine (vm2) on node3, with a vNIC on the same VNet
733`myvnet1' as vm1.
734
735Use the following network configuration for this VM:
736
1556b768
AD
737----
738auto eth0
739iface eth0 inet static
740 address 10.0.3.101/24
741 mtu 1450
742----
743
ee6e18c4 744Then, you should be able to ping between between 'vm1' and 'vm2'.
1556b768
AD
745
746
4e652aba
TL
747[[pvesdn_setup_example_evpn]]
748EVPN Setup Example
a6af82c7 749~~~~~~~~~~~~~~~~~~
ee6e18c4 750
1556b768
AD
751node1: /etc/network/interfaces
752
753----
754auto vmbr0
755iface vmbr0 inet static
756 address 192.168.0.1/24
757 gateway 192.168.0.254
758 bridge-ports eno1
759 bridge-stp off
760 bridge-fd 0
761 mtu 1500
762
763source /etc/network/interfaces.d/*
764----
765
766node2: /etc/network/interfaces
767
768----
769auto vmbr0
770iface vmbr0 inet static
771 address 192.168.0.2/24
772 gateway 192.168.0.254
773 bridge-ports eno1
774 bridge-stp off
775 bridge-fd 0
776 mtu 1500
777
778source /etc/network/interfaces.d/*
779----
780
781node3: /etc/network/interfaces
782
783----
784auto vmbr0
785iface vmbr0 inet static
786 address 192.168.0.3/24
787 gateway 192.168.0.254
788 bridge-ports eno1
789 bridge-stp off
790 bridge-fd 0
791 mtu 1500
792
793source /etc/network/interfaces.d/*
794----
795
ee6e18c4 796Create a EVPN controller, using a private ASN number and above node addreesses
a6af82c7 797as peers.
1556b768
AD
798
799----
800id: myevpnctl
801asn: 65000
802peers: 192.168.0.1,192.168.0.2,192.168.0.3
1556b768
AD
803----
804
ee6e18c4 805Create an EVPN zone named `myevpnzone' using the previously created
a6af82c7
AD
806EVPN-controller Define 'node1' and 'node2' as exit nodes.
807
1556b768
AD
808
809----
810id: myevpnzone
811vrf vxlan tag: 10000
812controller: myevpnctl
813mtu: 1450
a6af82c7 814exitnodes: node1,node2
1556b768
AD
815----
816
a6af82c7 817Create the first VNet named `myvnet1' using the EVPN zone `myevpnzone'.
1556b768
AD
818----
819id: myvnet1
820zone: myevpnzone
821tag: 11000
8ac25ffe 822mac address: 8C:73:B2:7B:F9:60 #random generate mac address
1556b768
AD
823----
824
a6af82c7
AD
825Create a subnet 10.0.1.0/24 with 10.0.1.1 as gateway
826----
827id: 10.0.1.0/24
828gateway: 10.0.1.1
829----
830
ee6e18c4
TL
831Create the second VNet named `myvnet2' using the same EVPN zone `myevpnzone', a
832different IPv4 CIDR network and a different random MAC address than `myvnet1'.
1556b768
AD
833
834----
835id: myvnet2
836zone: myevpnzone
837tag: 12000
1556b768
AD
838mac address: 8C:73:B2:7B:F9:61 #random mac, need to be different on each vnet
839----
840
a6af82c7
AD
841Create a different subnet 10.0.2.0/24 with 10.0.2.1 as gateway
842----
843id: 10.0.2.0/24
844gateway: 10.0.2.1
845----
846
847
ee6e18c4
TL
848Apply the configuration on the main SDN web-interface panel to create VNets
849locally on each nodes and generate the FRR config.
1556b768
AD
850
851
ee6e18c4 852Create a Debian-based Virtual Machine (vm1) on node1, with a vNIC on `myvnet1'.
1556b768 853
ee6e18c4 854Use the following network configuration for this VM:
1556b768
AD
855
856----
857auto eth0
858iface eth0 inet static
859 address 10.0.1.100/24
860 gateway 10.0.1.1 #this is the ip of the vnet1
861 mtu 1450
862----
863
ee6e18c4
TL
864Create a second Virtual Machine (vm2) on node2, with a vNIC on the other VNet
865`myvnet2'.
866
867Use the following network configuration for this VM:
868
1556b768
AD
869----
870auto eth0
871iface eth0 inet static
872 address 10.0.2.100/24
873 gateway 10.0.2.1 #this is the ip of the vnet2
874 mtu 1450
875----
876
877
878Then, you should be able to ping vm2 from vm1, and vm1 from vm2.
879
ee6e18c4 880If you ping an external IP from 'vm2' on the non-gateway 'node3', the packet
a6af82c7 881will go to the configured 'myvnet2' gateway, then will be routed to the exit
ee6e18c4
TL
882nodes ('node1' or 'node2') and from there it will leave those nodes over the
883default gateway configured on node1 or node2.
1556b768 884
ee6e18c4
TL
885NOTE: Of course you need to add reverse routes for the '10.0.1.0/24' and
886'10.0.2.0/24' network to node1, node2 on your external gateway, so that the
887public network can reply back.
1556b768 888
ee6e18c4
TL
889If you have configured an external BGP router, the BGP-EVPN routes (10.0.1.0/24
890and 10.0.2.0/24 in this example), will be announced dynamically.