4 This is currently not included, because
5 - it requires ifupdown2
6 - routing needs more documentation
11 VXLAN layer2 with vlan unware linux bridges
12 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 VXLAN is an overlay network to carry Ethernet traffic over an existing IP network
15 while accommodating a very large number of tenants. It is defined in RFC 7348.
16 Each overlay network is known as a VXLAN Segment and identified by a unique
17 24-bit segment ID called a VXLAN Network Identifier (VNI).
19 For BUM traffic (broadcast / unknown unicast traffic, multicast),
20 we have 3 differents vxlan setup modes : multicast, unicast, bgp-evpn
22 image::images/vxlan-l2-vlanunaware.svg["vxlan l2 bridge vlan unaware",align="center"]
27 This scenario relies in head end replication, meaning that end host in case
28 of not having any entry for the destination MAC address will send out an ARP
29 to other devices / VTEPs in the VXLAN network.
30 This is done by sending the request to the VXLAN multicast group,
31 remote VTEPs will get the packet and answer accordingly direct to the originating VTEP.
38 iface eno1 inet manual
41 iface vmbr0 inet static
49 iface vxlan2 inet manual
50 vxlan-svcnodeip 225.20.1.1
54 iface vmbr2 inet manual
60 iface vxlan3 inet manual
61 vxlan-svcnodeip 225.20.1.1
65 iface vmbr3 inet manual
76 iface eno1 inet manual
79 iface vmbr0 inet static
87 iface vxlan2 inet manual
88 vxlan-svcnodeip 225.20.1.1
92 iface vmbr2 inet manual
99 iface vxlan3 inet manual
100 vxlan-svcnodeip 225.20.1.1
104 iface vmbr3 inet manual
115 iface eno1 inet manual
118 iface vmbr0 inet static
120 netmask 255.255.255.0
126 iface vxlan2 inet manual
127 vxlan-svcnodeip 225.20.1.1
131 iface vmbr2 inet manual
138 iface vxlan3 inet manual
139 vxlan-svcnodeip 225.20.1.1
143 iface vmbr3 inet manual
153 We can replace multicast by head-end replication of BUM frames to a statically configured lists of remote VTEPs.
154 The VXLAN is defined without a remote multicast group.
155 Instead, all the remote VTEPs are associated with the all-zero address:
156 a BUM frame will be duplicated to all these destinations.
157 The VXLAN device will still learn remote addresses automatically using source-address learning.
163 iface eno1 inet manual
166 iface vmbr0 inet static
168 netmask 255.255.255.0
175 iface vxlan2 inet manual
176 vxlan_remoteip 192.168.0.2
177 vxlan_remoteip 192.168.0.3
181 iface vmbr2 inet manual
188 iface vxlan2 inet manual
189 vxlan_remoteip 192.168.0.2
190 vxlan_remoteip 192.168.0.3
194 iface vmbr3 inet manual
205 iface eno1 inet manual
208 iface vmbr0 inet static
210 netmask 255.255.255.0
216 iface vxlan2 inet manual
217 vxlan_remoteip 192.168.0.1
218 vxlan_remoteip 192.168.0.3
223 iface vmbr2 inet manual
229 iface vxlan2 inet manual
230 vxlan_remoteip 192.168.0.1
231 vxlan_remoteip 192.168.0.3
235 iface vmbr3 inet manual
246 iface eno1 inet manual
249 iface vmbr0 inet static
251 netmask 255.255.255.0
257 iface vxlan2 inet manual
258 vxlan_remoteip 192.168.0.2
259 vxlan_remoteip 192.168.0.3
264 iface vmbr2 inet manual
270 iface vxlan2 inet manual
271 vxlan_remoteip 192.168.0.2
272 vxlan_remoteip 192.168.0.3
276 iface vmbr3 inet manual
286 VTEPs use control plane learning/distribution via BGP for remote MAC addresses instead of data plane learning.
287 VTEPs have the ability to suppress ARP flooding over VXLAN tunnels.
289 The control plane used here is FRR, a bgp routing software.
290 Each node in the proxmox cluster peer with each others nodes.
291 For bigger networks, or multiple proxmox clusters,
292 it's possible to use external bgp route reflector servers.
298 iface eno1 inet manual
301 iface vmbr0 inet static
303 netmask 255.255.255.0
309 iface vxlan2 inet manual
310 vxlan-local-tunnelip 192.168.0.1
312 bridge-arp-nd-suppress on
313 bridge-unicast-flood off
314 bridge-multicast-flood off
318 iface vmbr2 inet manual
325 iface vxlan3 inet manual
326 vxlan-local-tunnelip 192.168.0.1
328 bridge-arp-nd-suppress on
329 bridge-unicast-flood off
330 bridge-multicast-flood off
334 iface vmbr3 inet manual
345 no bgp default ipv4-unicast
347 neighbor 192.168.0.2 remote-as 1234
348 neighbor 192.168.0.3 remote-as 1234
350 address-family l2vpn evpn
351 neighbor 192.168.0.2 activate
352 neighbor 192.168.0.3 activate
365 iface eno1 inet manual
368 iface vmbr0 inet static
370 netmask 255.255.255.0
376 iface vxlan2 inet manual
377 vxlan-local-tunnelip 192.168.0.2
379 bridge-arp-nd-suppress on
380 bridge-unicast-flood off
381 bridge-multicast-flood off
385 iface vmbr2 inet manual
391 iface vxlan3 inet manual
392 vxlan-local-tunnelip 192.168.0.2
394 bridge-arp-nd-suppress on
395 bridge-unicast-flood off
396 bridge-multicast-flood off
400 iface vmbr3 inet manual
411 no bgp default ipv4-unicast
413 neighbor 192.168.0.1 remote-as 1234
414 neighbor 192.168.0.3 remote-as 1234
416 address-family l2vpn evpn
417 neighbor 192.168.0.1 activate
418 neighbor 192.168.0.3 activate
431 iface eno1 inet manual
434 iface vmbr0 inet static
436 netmask 255.255.255.0
442 iface vxlan2 inet manual
443 vxlan-local-tunnelip 192.168.0.3
445 bridge-arp-nd-suppress on
446 bridge-unicast-flood off
447 bridge-multicast-flood off
451 iface vmbr2 inet manual
457 iface vxlan3 inet manual
458 vxlan-local-tunnelip 192.168.0.3
460 bridge-arp-nd-suppress on
461 bridge-unicast-flood off
462 bridge-multicast-flood off
466 iface vmbr3 inet manual
478 no bgp default ipv4-unicast
480 neighbor 192.168.0.1 remote-as 1234
481 neighbor 192.168.0.2 remote-as 1234
483 address-family l2vpn evpn
484 neighbor 192.168.0.1 activate
485 neighbor 192.168.0.2 activate
494 VXLAN layer2 with vlan aware linux bridges
495 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
497 We use 1 vmbr bridge, each vxlan is mapped to a vlan
499 image::images/vxlan-l2-vlanaware.svg["vxlan l2 bridge vlan aware",align="center"]
508 iface eno1 inet manual
511 iface vmbr0 inet static
513 netmask 255.255.255.0
514 bridge_ports eno1 vxlan2 vxlan3
517 bridge_vlan_aware yes
520 iface vxlan2 inet manual
521 vxlan-svcnodeip 225.20.1.1
526 iface vxlan3 inet manual
527 vxlan-svcnodeip 225.20.1.1
537 iface eno1 inet manual
540 iface vmbr0 inet static
542 netmask 255.255.255.0
543 bridge_ports eno1 vxlan2 vxlan3
546 bridge_vlan_aware yes
549 iface vxlan2 inet manual
550 vxlan-svcnodeip 225.20.1.1
555 iface vxlan3 inet manual
556 vxlan-svcnodeip 225.20.1.1
566 iface eno1 inet manual
569 iface vmbr0 inet static
571 netmask 255.255.255.0
572 bridge_ports eno1 vxlan2 vxlan3
575 bridge_vlan_aware yes
578 iface vxlan2 inet manual
579 vxlan-svcnodeip 225.20.1.1
584 iface vxlan3 inet manual
585 vxlan-svcnodeip 225.20.1.1
598 iface eno1 inet manual
601 iface vmbr0 inet static
603 netmask 255.255.255.0
604 bridge_ports eno1 vxlan2 vxlan3
607 bridge_vlan_aware yes
610 iface vxlan2 inet manual
611 vxlan_remoteip 192.168.0.2
612 vxlan_remoteip 192.168.0.3
616 iface vxlan3 inet manual
617 vxlan_remoteip 192.168.0.2
618 vxlan_remoteip 192.168.0.3
627 iface eno1 inet manual
630 iface vmbr0 inet static
632 netmask 255.255.255.0
633 bridge_ports eno1 vxlan2 vxlan3
636 bridge_vlan_aware yes
639 iface vxlan2 inet manual
640 vxlan_remoteip 192.168.0.1
641 vxlan_remoteip 192.168.0.3
645 iface vxlan3 inet manual
646 vxlan_remoteip 192.168.0.1
647 vxlan_remoteip 192.168.0.3
656 iface eno1 inet manual
659 iface vmbr0 inet static
661 netmask 255.255.255.0
662 bridge_ports eno1 vxlan2 vxlan3
665 bridge_vlan_aware yes
668 iface vxlan2 inet manual
669 vxlan_remoteip 192.168.0.2
670 vxlan_remoteip 192.168.0.3
674 iface vxlan3 inet manual
675 vxlan_remoteip 192.168.0.2
676 vxlan_remoteip 192.168.0.3
684 Note: currently FRR is working only with 1 vlan aware bridge
691 iface eno1 inet manual
694 iface vmbr0 inet static
696 netmask 255.255.255.0
697 bridge_ports eno1 vxlan2 vxlan3
700 bridge_vlan_aware yes
703 iface vxlan0 inet manual
704 vxlan-local-tunnelip 192.168.0.1
706 bridge-arp-nd-suppress on
707 bridge-unicast-flood off
708 bridge-multicast-flood off
713 iface vxlan3 inet manual
714 vxlan-local-tunnelip 192.168.0.1
716 bridge-arp-nd-suppress on
717 bridge-unicast-flood off
718 bridge-multicast-flood off
727 no bgp default ipv4-unicast
729 neighbor 192.168.0.2 remote-as 1234
730 neighbor 192.168.0.3 remote-as 1234
732 address-family l2vpn evpn
733 neighbor 192.168.0.2 activate
734 neighbor 192.168.0.3 activate
747 iface eno1 inet manual
750 iface vmbr0 inet static
752 netmask 255.255.255.0
753 bridge_ports eno1 vxlan2 vxlan3
756 bridge_vlan_aware yes
759 iface vxlan0 inet manual
760 vxlan-local-tunnelip 192.168.0.2
762 bridge-arp-nd-suppress on
763 bridge-unicast-flood off
764 bridge-multicast-flood off
769 iface vxlan3 inet manual
770 vxlan-local-tunnelip 192.168.0.2
772 bridge-arp-nd-suppress on
773 bridge-unicast-flood off
774 bridge-multicast-flood off
783 no bgp default ipv4-unicast
785 neighbor 192.168.0.1 remote-as 1234
786 neighbor 192.168.0.3 remote-as 1234
788 address-family l2vpn evpn
789 neighbor 192.168.0.1 activate
790 neighbor 192.168.0.3 activate
803 iface eno1 inet manual
806 iface vmbr0 inet static
808 netmask 255.255.255.0
809 bridge_ports eno1 vxlan2 vxlan3
812 bridge_vlan_aware yes
815 iface vxlan0 inet manual
816 vxlan-local-tunnelip 192.168.0.3
818 bridge-arp-nd-suppress on
819 bridge-unicast-flood off
820 bridge-multicast-flood off
825 iface vxlan3 inet manual
826 vxlan-local-tunnelip 192.168.0.3
828 bridge-arp-nd-suppress on
829 bridge-unicast-flood off
830 bridge-multicast-flood off
838 no bgp default ipv4-unicast
840 neighbor 192.168.0.1 remote-as 1234
841 neighbor 192.168.0.2 remote-as 1234
843 address-family l2vpn evpn
844 neighbor 192.168.0.1 activate
845 neighbor 192.168.0.2 activate
853 VXLAN layer3 routing with anycast gateway
854 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
856 With this need, each vmbr bridge will be the gateway for the vm.
857 Same vmbr on different node, will have same ip address and same mac address,
858 to have working vm live migration and no network disruption.
860 VXLAN layer3 routing only work with FRR and non-aware bridge.
861 (vlan aware bridge support is buggy currently).
868 net.ipv4.ip_forward=1
869 net.ipv6.conf.all.forwarding=1
870 #disable reverse path filtering
871 net.ipv4.conf.default.rp_filter=0
872 net.ipv4.conf.all.rp_filter=0
873 #allow frr to work with vrf
874 net.ipv4.tcp_l3mdev_accept=1
880 This is the simplest mode. To get it work, all vxlan need to be defined on all nodes.
882 The asymmetric model allows routing and bridging on the VXLAN tunnel ingress,
883 but only bridging on the egress.
884 This results in bi-directional VXLAN traffic traveling on different VNIs
885 in each direction (always the destination VNI) across the routed infrastructure.
887 image::images/vxlan-l3-asymmetric.svg["vxlan l3 asymmetric",align="center"]
894 iface eno1 inet manual
897 iface vmbr0 inet static
899 netmask 255.255.255.0
905 iface vxlan2 inet manual
906 vxlan-local-tunnelip 192.168.0.1
908 bridge-arp-nd-suppress on
909 bridge-unicast-flood off
910 bridge-multicast-flood off
914 iface vmbr2 inet static
916 netmask 255.255.255.0
917 hwaddress 44:39:39:FF:40:94
924 iface vxlan3 inet manual
925 vxlan-local-tunnelip 192.168.0.1
927 bridge-arp-nd-suppress on
928 bridge-unicast-flood off
929 bridge-multicast-flood off
933 iface vmbr3 inet static
935 netmask 255.255.255.0
936 hwaddress 44:39:39:FF:40:94
947 bgp router-id 192.168.0.1
948 no bgp default ipv4-unicast
950 neighbor 192.168.0.2 remote-as 1234
951 neighbor 192.168.0.3 remote-as 1234
953 address-family l2vpn evpn
954 neighbor 192.168.0.2 activate
955 neighbor 192.168.0.3 activate
968 iface eno1 inet manual
971 iface vmbr0 inet static
973 netmask 255.255.255.0
979 iface vxlan2 inet manual
980 vxlan-local-tunnelip 192.168.0.2
982 bridge-arp-nd-suppress on
983 bridge-unicast-flood off
984 bridge-multicast-flood off
988 iface vmbr2 inet static
990 netmask 255.255.255.0
991 hwaddress 44:39:39:FF:40:94
998 iface vxlan3 inet manual
999 vxlan-local-tunnelip 192.168.0.2
1001 bridge-arp-nd-suppress on
1002 bridge-unicast-flood off
1003 bridge-multicast-flood off
1007 iface vmbr3 inet static
1009 netmask 255.255.255.0
1010 hwaddress 44:39:39:FF:40:94
1021 bgp router-id 192.168.0.2
1022 no bgp default ipv4-unicast
1024 neighbor 192.168.0.1 remote-as 1234
1025 neighbor 192.168.0.3 remote-as 1234
1027 address-family l2vpn evpn
1028 neighbor 192.168.0.1 activate
1029 neighbor 192.168.0.3 activate
1042 iface eno1 inet manual
1045 iface vmbr0 inet static
1047 netmask 255.255.255.0
1053 iface vxlan2 inet manual
1054 vxlan-local-tunnelip 192.168.0.3
1056 bridge-arp-nd-suppress on
1057 bridge-unicast-flood off
1058 bridge-multicast-flood off
1062 iface vmbr2 inet static
1064 netmask 255.255.255.0
1065 hwaddress 44:39:39:FF:40:94
1072 iface vxlan3 inet manual
1073 vxlan-local-tunnelip 192.168.0.3
1075 bridge-arp-nd-suppress on
1076 bridge-unicast-flood off
1077 bridge-multicast-flood off
1081 iface vmbr3 inet static
1083 netmask 255.255.255.0
1084 hwaddress 44:39:39:FF:40:94
1095 bgp router-id 192.168.0.3
1096 no bgp default ipv4-unicast
1098 neighbor 192.168.0.1 remote-as 1234
1099 neighbor 192.168.0.2 remote-as 1234
1101 address-family l2vpn evpn
1102 neighbor 192.168.0.1 activate
1103 neighbor 192.168.0.2 activate
1115 With this model, you don't need to have all vxlan on all nodes.
1116 This model will also be needed to route traffic to an external router.
1118 The symmetric model routes and bridges on both the ingress and the egress leafs.
1119 This results in bi-directional traffic being able to travel on the same VNI, hence the symmetric name.
1120 However, a new specialty transit VNI is used for all routed VXLAN traffic, called the L3VNI.
1121 All traffic that needs to be routed will be routed onto the L3VNI, tunneled across the layer 3 Infrastructure,
1122 routed off the L3VNI to the appropriate VLAN and ultimately bridged to the destination.
1124 A vrf is needed for the L3VNI, so all vmbr bridge need to be in the vrf if they want to be able to reach each others.
1126 image::images/vxlan-l3-symmetric.svg["vxlan l3 symmetric",align="center"]
1137 iface eno1 inet manual
1140 iface vmbr0 inet static
1142 netmask 255.255.255.0
1148 iface vxlan2 inet manual
1149 vxlan-local-tunnelip 192.168.0.1
1151 bridge-arp-nd-suppress on
1152 bridge-unicast-flood off
1153 bridge-multicast-flood off
1156 iface vmbr2 inet static
1161 netmask 255.255.255.0
1162 hwaddress 44:39:39:FF:40:94 #must be same on each node vmbr2
1166 iface vxlan3 inet manual
1167 vxlan-local-tunnelip 192.168.0.1
1169 bridge-arp-nd-suppress on
1170 bridge-unicast-flood off
1171 bridge-multicast-flood off
1174 iface vmbr3 inet static
1179 netmask 255.255.255.0
1180 hwaddress 44:39:39:FF:40:94 #must be same on each node vmbr3
1183 #interconnect vxlan-vfr l3vni
1185 iface vxlan4000 inet manual
1186 vxlan-local-tunnelip 192.168.0.1
1188 bridge-arp-nd-suppress on
1189 bridge-unicast-flood off
1190 bridge-multicast-flood off
1194 iface vmbr4000 inet manual
1195 bridge_ports vxlan4000
1198 hwaddress 44:39:39:FF:40:90 #must be different on each node
1209 bgp router-id 192.168.0.1
1210 no bgp default ipv4-unicast
1212 neighbor 192.168.0.2 remote-as 1234
1213 neighbor 192.168.0.3 remote-as 1234
1215 address-family l2vpn evpn
1216 neighbor 192.168.0.2 activate
1217 neighbor 192.168.0.3 activate
1221 router bgp 1234 vrf vrf1
1223 bgp router-id 192.168.0.1
1225 address-family ipv4 unicast
1226 redistribute connected
1229 address-family l2vpn evpn
1230 advertise ipv4 unicast
1246 iface eno1 inet manual
1249 iface vmbr0 inet static
1251 netmask 255.255.255.0
1257 iface vxlan2 inet manual
1258 vxlan-local-tunnelip 192.168.0.2
1260 bridge-arp-nd-suppress on
1261 bridge-unicast-flood off
1262 bridge-multicast-flood off
1265 iface vmbr2 inet static
1270 netmask 255.255.255.0
1271 hwaddress 44:39:39:FF:40:94 #must be same on each node vmbr2
1275 iface vxlan3 inet manual
1276 vxlan-local-tunnelip 192.168.0.2
1278 bridge-arp-nd-suppress on
1279 bridge-unicast-flood off
1280 bridge-multicast-flood off
1283 iface vmbr3 inet static
1288 netmask 255.255.255.0
1289 hwaddress 44:39:39:FF:40:94 #must be same on each node vmbr3
1292 #interconnect vxlan-vfr l3vni
1294 iface vxlan4000 inet manual
1295 vxlan-local-tunnelip 192.168.0.2
1297 bridge-arp-nd-suppress on
1298 bridge-unicast-flood off
1299 bridge-multicast-flood off
1303 iface vmbr4000 inet manual
1304 bridge_ports vxlan4000
1307 hwaddress 44:39:39:FF:40:91 #must be different on each node
1319 bgp router-id 192.168.0.2
1320 no bgp default ipv4-unicast
1322 neighbor 192.168.0.1 remote-as 1234
1323 neighbor 192.168.0.3 remote-as 1234
1325 address-family l2vpn evpn
1326 neighbor 192.168.0.1 activate
1327 neighbor 192.168.0.3 activate
1331 router bgp 1234 vrf vrf1
1333 bgp router-id 192.168.0.2
1335 address-family ipv4 unicast
1336 redistribute connected
1339 address-family l2vpn evpn
1340 advertise ipv4 unicast
1356 iface eno1 inet manual
1359 iface vmbr0 inet static
1361 netmask 255.255.255.0
1367 iface vxlan2 inet manual
1368 vxlan-local-tunnelip 192.168.0.3
1370 bridge-arp-nd-suppress on
1371 bridge-unicast-flood off
1372 bridge-multicast-flood off
1375 iface vmbr2 inet static
1380 netmask 255.255.255.0
1381 hwaddress 44:39:39:FF:40:94 #must be same on each node vmbr2
1385 iface vxlan3 inet manual
1386 vxlan-local-tunnelip 192.168.0.3
1388 bridge-arp-nd-suppress on
1389 bridge-unicast-flood off
1390 bridge-multicast-flood off
1393 iface vmbr3 inet static
1398 netmask 255.255.255.0
1399 hwaddress 44:39:39:FF:40:94 #must be same on each node vmbr3
1402 #interconnect vxlan-vfr l3vni
1404 iface vxlan4000 inet manual
1405 vxlan-local-tunnelip 192.168.0.3
1407 bridge-arp-nd-suppress on
1408 bridge-unicast-flood off
1409 bridge-multicast-flood off
1413 iface vmbr4000 inet manual
1414 bridge_ports vxlan4000
1417 hwaddress 44:39:39:FF:40:92 #must be different on each node
1429 bgp router-id 192.168.0.3
1430 no bgp default ipv4-unicast
1432 neighbor 192.168.0.1 remote-as 1234
1433 neighbor 192.168.0.2 remote-as 1234
1435 address-family l2vpn evpn
1436 neighbor 192.168.0.1 activate
1437 neighbor 192.168.0.2 activate
1441 router bgp 1234 vrf vrf1
1443 bgp router-id 192.168.0.3
1445 address-family ipv4 unicast
1446 redistribute connected
1449 address-family l2vpn evpn
1450 advertise ipv4 unicast