]> git.proxmox.com Git - pve-docs.git/blobdiff - vxlan-and-evpn.adoc
backup: clarify that CLI means FS-level and highlight retention-note
[pve-docs.git] / vxlan-and-evpn.adoc
index e1dfe879b1b7be8e326d017262758848ef82474a..12bcea90f64e9490e0edd42b76d6457ad3463a9d 100644 (file)
@@ -20,7 +20,7 @@ VXLAN encapsulation add 50bytes overhead, so you need to increase mtu on your ho
 physical interfaces to 1550 at minimum. (or decrease mtu inside your vms to 1450)
 
 For BUM traffic (broadcast / unknown unicast traffic, multicast),
-we have 3 differents vxlan setup modes : multicast, unicast, bgp-evpn
+we have 3 different VXLAN setup modes : multicast, unicast, bgp-evpn
 
 image::images/vxlan-l2-vlanunaware.svg["vxlan l2 bridge vlan unaware",align="center"]
 
@@ -367,7 +367,6 @@ iface vmbr3 inet manual
 ----
 router bgp 1234
  no bgp default ipv4-unicast
- no bgp default ipv6-unicast
  coalesce-time 1000
  neighbor 192.168.0.2 remote-as 1234
  neighbor 192.168.0.3 remote-as 1234
@@ -437,7 +436,6 @@ iface vmbr3 inet manual
 ----
 router bgp 1234
  no bgp default ipv4-unicast
- no bgp default ipv6-unicast
  coalesce-time 1000
  neighbor 192.168.0.1 remote-as 1234
  neighbor 192.168.0.3 remote-as 1234
@@ -508,7 +506,6 @@ iface vmbr3 inet manual
 ----
 router bgp 1234
  no bgp default ipv4-unicast
- no bgp default ipv6-unicast
  coalesce-time 1000
  neighbor 192.168.0.1 remote-as 1234
  neighbor 192.168.0.2 remote-as 1234
@@ -612,7 +609,6 @@ frr.conf
 router bgp 1234
  bgp router-id 192.168.0.1
  no bgp default ipv4-unicast
- no bgp default ipv6-unicast
  coalesce-time 1000
  neighbor 192.168.0.2 remote-as 1234
  neighbor 192.168.0.3 remote-as 1234
@@ -696,7 +692,6 @@ frr.conf
 router bgp 1234
  bgp router-id 192.168.0.2
  no bgp default ipv4-unicast
- no bgp default ipv6-unicast
  coalesce-time 1000
  neighbor 192.168.0.1 remote-as 1234
  neighbor 192.168.0.3 remote-as 1234
@@ -778,7 +773,6 @@ frr.conf
 router bgp 1234
  bgp router-id 192.168.0.3
  no bgp default ipv4-unicast
- no bgp default ipv6-unicast
  coalesce-time 1000
  neighbor 192.168.0.1 remote-as 1234
  neighbor 192.168.0.2 remote-as 1234
@@ -902,7 +896,6 @@ vrf vrf1
 router bgp 1234
  bgp router-id 192.168.0.1
  no bgp default ipv4-unicast
- no bgp default ipv6-unicast
  coalesce-time 1000
  neighbor 192.168.0.2 remote-as 1234
  neighbor 192.168.0.3 remote-as 1234
@@ -1011,7 +1004,6 @@ vrf vrf1
 router bgp 1234
  bgp router-id 192.168.0.2
  no bgp default ipv4-unicast
- no bgp default ipv6-unicast
  coalesce-time 1000
  neighbor 192.168.0.1 remote-as 1234
  neighbor 192.168.0.3 remote-as 1234
@@ -1120,7 +1112,6 @@ vrf vrf1
 router bgp 1234
  bgp router-id 192.168.0.3
  no bgp default ipv4-unicast
- no bgp default ipv6-unicast
  coalesce-time 1000
  neighbor 192.168.0.1 remote-as 1234
  neighbor 192.168.0.2 remote-as 1234
@@ -1135,8 +1126,8 @@ line vty
 !
 ----
 
-VXLAN layer3 routing with anycast gateway + routing to outside with external router
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+VXLAN layer3 routing with anycast gateway + routing to outside with external router with static default gw
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Routing to outside need the symmetric model.
 
 1 gateway node
@@ -1240,7 +1231,6 @@ vrf vrf1
 router bgp 1234
  bgp router-id 192.168.0.1
  no bgp default ipv4-unicast
- no bgp default ipv6-unicast
  coalesce-time 1000
  neighbor 192.168.0.2 remote-as 1234
  neighbor 192.168.0.3 remote-as 1234
@@ -1249,6 +1239,10 @@ router bgp 1234
   import vrf vrf1
  exit-address-family
  !
+ address-family ipv6 unicast
+  import vrf vrf1
+ exit-address-family
+ !
  address-family l2vpn evpn
   neighbor 192.168.0.2 activate
   neighbor 192.168.0.3 activate
@@ -1261,8 +1255,13 @@ router bgp 1234 vrf vrf1
   redistribute connected
  exit-address-family
  !
+ address-family ipv6 unicast
+  redistribute connected
+ exit-address-family
+ !
  address-family l2vpn evpn
   default-originate ipv4
+  default-originate ipv6
  exit-address-family
 !
 line vty
@@ -1363,7 +1362,6 @@ vrf vrf1
 router bgp 1234
  bgp router-id 192.168.0.2
  no bgp default ipv4-unicast
- no bgp default ipv6-unicast
  coalesce-time 1000
  neighbor 192.168.0.1 remote-as 1234
  neighbor 192.168.0.3 remote-as 1234
@@ -1472,7 +1470,6 @@ vrf vrf1
 router bgp 1234
  bgp router-id 192.168.0.3
  no bgp default ipv4-unicast
- no bgp default ipv6-unicast
  coalesce-time 1000
  neighbor 192.168.0.1 remote-as 1234
  neighbor 192.168.0.2 remote-as 1234
@@ -1496,6 +1493,16 @@ The external router have ecmp routes to all proxmox nodes.(balancing).
 If the router send the packet to a wrong node (vm is not on this node), this node will route through
 vxlan the packet to final destination.
 
+If you have multiple gateway nodes, disable rp_filter as packet could incoming in a 1 node, and outgoing
+to another node.
+
+sysctl.conf tuning
+-----
+net.ipv4.conf.default.rp_filter=0
+net.ipv4.conf.all.rp_filter=0
+-----
+
+
 *node1
 
 ----
@@ -1591,7 +1598,6 @@ vrf vrf1
 router bgp 1234
  bgp router-id 192.168.0.1
  no bgp default ipv4-unicast
- no bgp default ipv6-unicast
  coalesce-time 1000
  neighbor 192.168.0.2 remote-as 1234
  neighbor 192.168.0.3 remote-as 1234
@@ -1600,6 +1606,10 @@ router bgp 1234
   import vrf vrf1
  exit-address-family
  !
+ address-family ipv6 unicast
+  import vrf vrf1
+ exit-address-family
+ !
  address-family l2vpn evpn
   neighbor 192.168.0.2 activate
   neighbor 192.168.0.3 activate
@@ -1612,8 +1622,13 @@ router bgp 1234 vrf vrf1
   redistribute connected
  exit-address-family
  !
+ address-family ipv6 unicast
+  redistribute connected
+ exit-address-family
+ !
  address-family l2vpn evpn
   default-originate ipv4
+  default-originate ipv6
  exit-address-family
 !
 line vty
@@ -1717,7 +1732,6 @@ vrf vrf1
 router bgp 1234
  bgp router-id 192.168.0.2
  no bgp default ipv4-unicast
- no bgp default ipv6-unicast
  coalesce-time 1000
  neighbor 192.168.0.1 remote-as 1234
  neighbor 192.168.0.3 remote-as 1234
@@ -1726,6 +1740,10 @@ router bgp 1234
   import vrf vrf1
  exit-address-family
  !
+ address-family ipv6 unicast
+  import vrf vrf1
+ exit-address-family
+ !
  address-family l2vpn evpn
   neighbor 192.168.0.1 activate
   neighbor 192.168.0.3 activate
@@ -1736,8 +1754,13 @@ router bgp 1234
   redistribute connected
  exit-address-family
  !
+ address-family ipv6 unicast
+  redistribute connected
+ exit-address-family
+ !
  address-family l2vpn evpn
   default-originate ipv4
+  default-originate ipv6
  exit-address-family
 !
 line vty
@@ -1841,7 +1864,6 @@ vrf vrf1
 router bgp 1234
  bgp router-id 192.168.0.3
  no bgp default ipv4-unicast
- no bgp default ipv6-unicast
  coalesce-time 1000
  neighbor 192.168.0.1 remote-as 1234
  neighbor 192.168.0.2 remote-as 1234
@@ -1850,6 +1872,10 @@ router bgp 1234
   import vrf vrf1
  exit-address-family
  !
+ address-family ipv6 unicast
+  import vrf vrf1
+ exit-address-family
+ !
  address-family l2vpn evpn
   neighbor 192.168.0.1 activate
   neighbor 192.168.0.2 activate
@@ -1862,8 +1888,13 @@ router bgp 1234 vrf vrf1
   redistribute connected
  exit-address-family
  !
+ address-family ipv6 unicast
+  redistribute connected
+ exit-address-family
+ !
  address-family l2vpn evpn
   default-originate ipv4
+  default-originate ipv6
  exit-address-family
 !
 line vty
@@ -1916,6 +1947,91 @@ iface vmbr0 inet static
 ----
 
 
+
+gateway node(s) with a upstream bgp router
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Setup is almost the same than with a static gateway, but we'll connect to an upstream bgp router.
+
+example with node1 as gateway (192.168.0.1) for evpn-bgp, and an upstream bgp router (running frr too) 192.168.0.254.
+
+* node1
+
+frr.conf
+----
+vrf vrf1
+ vni 4000
+ exit-vrf
+!
+router bgp 1234
+ bgp router-id 192.168.0.1
+ no bgp default ipv4-unicast
+ coalesce-time 1000
+ neighbor 192.168.0.2 remote-as 1234
+ neighbor 192.168.0.3 remote-as 1234
+ neighbor 192.168.0.254 remote-as external
+ !
+ address-family ipv4 unicast
+  import vrf vrf1
+  neighbor 192.168.0.254 activate
+ exit-address-family
+ !
+ address-family ipv6 unicast
+  import vrf vrf1
+  neighbor 192.168.0.254 activate
+ exit-address-family
+ !
+ address-family l2vpn evpn
+  neighbor 192.168.0.1 activate
+  neighbor 192.168.0.2 activate
+  neighbor 192.168.0.254 activate
+  advertise-all-vni
+ exit-address-family
+!
+router bgp 1234 vrf vrf1
+!
+ address-family ipv4 unicast
+  redistribute connected
+ exit-address-family
+ !
+ address-family ipv6 unicast
+  redistribute connected
+ exit-address-family
+ !
+ address-family l2vpn evpn
+  default-originate ipv4
+  default-originate ipv6
+ exit-address-family
+!
+line vty
+!
+----
+
+* bgp router
+
+frr.conf
+----
+ip prefix-list NO32 seq 10 permit 0.0.0.0/0 ge 8 le 24
+ip prefix-list NO32 seq 20 deny any
+!
+router bgp 25253
+ bgp router-id 192.168.0.254
+ bgp bestpath as-path multipath-relax
+ neighbor 192.168.0.1 remote-as external
+ neighbor 192.168.0.1 capability extended-nexthop
+ !
+ address-family ipv4 unicast
+  neighbor 192.168.0.1 default-originate
+  neighbor 192.168.0.1 prefix-list NO32 in #don't import /32 route from evpn
+ exit-address-family
+ !
+ address-family ipv6 unicast
+  neighbor 192.168.0.1 default-originate
+  neighbor 192.168.0.1 prefix-list NO32 in #don't import /32 route from evpn
+ exit-address-family
+ !
+!
+---
+
 Route Reflectors
 ^^^^^^^^^^^^^^^^
 If you have a lot of proxmox nodes, or multiple proxmox clusters, you may want
@@ -1934,7 +2050,6 @@ router bgp 1234
   bgp cluster-id 1.1.1.1  #cluster-id must be the same on each route reflector
   bgp log-neighbor-changes
   no bgp default ipv4-unicast
-  no bgp default ipv6-unicast
   neighbor fabric peer-group
   neighbor fabric remote-as 1234
   neighbor fabric capability extended-nexthop
@@ -1958,7 +2073,6 @@ router bgp 1234
   bgp cluster-id 1.1.1.1
   bgp log-neighbor-changes
   no bgp default ipv4-unicast
-  no bgp default ipv6-unicast
   neighbor fabric peer-group
   neighbor fabric remote-as 1234
   neighbor fabric capability extended-nexthop
@@ -1980,7 +2094,6 @@ proxmoxnode(s)
 router bgp 1234
  bgp router-id 192.168.0.x
  no bgp default ipv4-unicast
- no bgp default ipv6-unicast
  coalesce-time 1000
  neighbor 192.168.0.200 remote-as 1234
  neighbor 192.168.0.201 remote-as 1234
@@ -1992,5 +2105,3 @@ router bgp 1234
  exit-address-family
 !
 ----
-
-#TODO : Documentation with bgp upstream router.