Two Sites, Two Clusters, One Network

You have two sites a few kilometres apart and a 25GbE metro link between them. Each site runs its own Proxmox cluster with its own Ceph. What you want is for a guest network to exist at both ends: the same subnet, the same gateway address, so a guest can sit at either end, or be rebuilt at the other one, and keep its IP.

The usual answer is to stretch a VLAN across the metro. That puts one broadcast domain across two buildings and one spanning tree across a link you may well be renting from somebody else, which leaves you one loop, one misbehaving switch or one carrier change window away from losing both sites at once. Ask anybody who has had a metro Ethernet provider leak a loop back at them how that went.

EVPN does the same job without the stretched layer 2. The metro stays a routed link. Guest frames cross it inside VXLAN, and BGP tells every host which MAC and IP lives behind which other host, so there is no flooding to learn it. Proxmox has done this in its SDN stack since version 7, using FRR as the BGP speaker1.

What the documentation does not walk you through is the two-cluster case. SDN configuration lives in /etc/pve/sdn, and /etc/pve belongs to one cluster. Two clusters means two copies of the EVPN definition, and nothing keeps them the same. Most of this post is about the settings that have to match, because that is where it breaks.

The other half is the switches. At some point a thing that is not a Proxmox guest wants to be on one of these networks: a firewall, a bare-metal database, a storage head. The FS N8560-32C does EVPN-VXLAN in hardware2. Each site has two of them in an MLAG pair, and the second half of the post gives the four switches three jobs in the same EVPN as the Proxmox nodes: VTEP for kit that is not a guest, route reflector so the nodes stop peering with each other, and exit node, routing the zone in and out of the rest of the network. Five guest networks run over it, and all of it is dual stack, IPv4 and IPv6.

Everything here was built and broken on Proxmox VE 9.2 (pve-manager 9.2.32, libpve-network-perl 1.6.10, FRR 10.6.1), and the code quoted is the code on those nodes.

What Gets Built

Two sites, two clusters, one routed metroSite A: cluster site-apve-a1 .11pve-a2 .12pve-a3 .132× FS N8560-32CMLAG pair, VTEPsCeph A, corosync Astay inside site A10.101.0.0/24Site B: cluster site-bpve-b1 .21pve-b2 .22pve-b3 .232× FS N8560-32CMLAG pair, VTEPsCeph B, corosync Bstay inside site B10.102.0.0/2425GbE metrorouted, MTU 9000VXLAN UDP 4789BGP TCP 179, BFDVNet web, VNI 10010, 172.16.10.0/24gateway 172.16.10.1 answered by every node at both sites
Each site keeps its own Ceph and corosync. The metro carries VXLAN and BGP, and one VNet with one gateway address exists at both ends.
Site ASite B
Proxmox clustersite-a, 3 nodessite-b, 3 nodes
Underlay subnet10.101.0.0/2410.102.0.0/24
Node VTEP addresses.11, .12, .13.21, .22, .23
Switches2× FS N8560-32C, MLAG pair, .2 and .32× FS N8560-32C, MLAG pair, .2 and .3
Node uplinksLACP bond, one leg to each switchLACP bond, one leg to each switch
Guest networksweb, app, db, ops, backupthe same five, same VNIs
Cephown cluster, own poolsown cluster, own pools
Corosyncsite-local onlysite-local only
Metrorouted, 25GbE, MTU 9000routed, 25GbE, MTU 9000
EVPNASN 65000, one zone, same VNIsASN 65000, one zone, same VNIs

Three things never cross the metro, and that is deliberate.

Ceph stays at home. Each site’s Ceph has its own monitors and its own placement. A stretched Ceph across a metro is a different design with its own rules about latency and a tie-breaker site, and it is not what this is.

Corosync stays at home. Two clusters, not one cluster split across two buildings, and as such a cut metro cannot cost either site quorum.

Nothing at layer 2 crosses the metro outside a VXLAN tunnel. The metro carries UDP on port 47893 and BGP on TCP 179, and that is all it needs to.

The lab is six nested Proxmox nodes on one host, with a router between the two site subnets adding a millisecond each way. Across a site the underlay answers in 0.22 ms; across the metro, 2.65 ms. The router cannot simulate 25GbE and does not try to. What it reproduces is the thing that matters to EVPN: the two sites only reach each other by routing, and a full 9000-byte frame gets across. The four switches are FRR containers, because there is no FSOS image to run, and each lab node has one NIC on its site’s network rather than a bond across two switches, because MLAG cannot be emulated in a container. Everything above the bond is measured; the bond and the pair’s own failover are the production configuration and FS’s documentation.

One ASN and a Full Mesh

There are three ways to join two EVPN sites: a full iBGP mesh in one ASN, a route reflector per site, or a separate ASN per site with eBGP across the metro. This build is the first one, on purpose. It uses nothing outside Proxmox SDN, and at six nodes it is the least to get wrong.

What the controller does with that is plain in the source4. The EVPN controller takes a peers list, finds which of those addresses is its own, and puts every other address into one BGP peer group called VTEP, with BFD switched on:

my @vtep_ips = grep { $_ ne $ifaceip } @peers;

my $neighbor_group = {
    name => $peer_group_name,
    bfd => 1,
    remote_as => $ebgp ? "external" : $asn,
    ips => \@vtep_ips,

So the same peers list on every node produces a full mesh. Every node talks to every other. Put all six nodes in the list in both clusters, and site A’s nodes peer with site B’s exactly as they peer with each other.

The full mesh one peers list buildsSite ASite Bmetropve-a1pve-a2pve-a3pve-b1pve-b2pve-b33 sessions inside each site9 cross the metro15 in all, every one with BFD
One peers list on six nodes gives fifteen iBGP sessions. Nine of them cross the metro, and all fifteen run BFD.
SpeakersSessionsCrossing the metro
6 nodes159
6 nodes + 2 FS switches2816
10 nodes + 2 switches, 5 per site6636

Sessions grow with the square of the speaker count, n(n−1)/2. At six or eight nobody cares. At twenty it is 190 sessions and every one of them runs BFD, which is where route reflectors start to earn their place. The FS switches can be those reflectors, and further down they are.

What Has to Match, and Nothing Makes It Match

Each cluster has its own /etc/pve/sdn. When you press Apply in site A, site B knows nothing about it. When the two disagree, which one is right? Neither, and nothing in either cluster will tell you they disagree. These have to be set identically in both, by hand:

SettingWhereWhy it has to match
ASNcontroller asniBGP needs one AS, and the automatic route targets are built from it
Peerscontroller peersfull mesh: the same full list in both; with reflectors, each cluster lists its own site’s pair, the one setting meant to differ
VRF VXLANzone vrf-vxlanthe layer 3 VNI, used for routing between subnets across sites
Anycast MACzone macsee the next section
VNet VNIvnet tagthe layer 2 VNI; same tag, same segment
Subnet and gatewaysubnetthe gateway address every node answers on
MTUzone mtua VXLAN segment with two MTUs drops the big packets
Two copies of one EVPN, kept equal by handsite-a: /etc/pve/sdnsite-b: /etc/pve/sdnasn 65000asn 65000peers: all 6 VTEPspeers: all 6 VTEPsvrf-vxlan 10000vrf-vxlan 10000mac 02:00:00:65:00:01mac 02:00:00:65:00:01vnet tag 10010vnet tag 10010gateway 172.16.10.1gateway 172.16.10.1mtu 8950mtu 8950=======Nothing copies these between clusters, and nothing compares them.
Seven settings, two copies, no link between them. Each cluster only knows what was typed into it.

Zone and VNet names do not have to match, because they never leave the node. VNIs and route targets do. Match the names anyway, because the person debugging this at two in the morning should not have to remember that web in one cluster is www in the other.

The automatic route target is ASN:VNI in FRR and in FSOS alike, as long as the ASN fits in two bytes5. Past two bytes they part company, and I set a four-byte ASN on site A to see how:

Controller ASNFRR automatic route target for VNI 10010
6500065000:10010
420000000159905:10010

FRR quietly keeps the bottom 16 bits of the ASN, and 4,200,000,001 becomes 59,905. FS’s guide says a four-byte AS “is split” across both halves of the value5. Neither matches the other, and neither tells you. That is the whole reason this build uses 65000.

The Anycast Gateway MAC Nobody Sets

Every node in an EVPN zone is the gateway for every subnet in it. Same IP on every node, same MAC on every node, so a guest that moves never has to ARP again. That is the anycast gateway, and it only works if the MAC is the same everywhere.

Within one cluster it is. Across two, it is not, unless you set it. If the zone’s mac is left empty, Proxmox generates one when the zone is created:

if (!defined($zone_cfg->{ids}->{$zoneid}->{'mac'})) {
    $zone_cfg->{ids}->{$zoneid}->{'mac'} = PVE::Tools::random_ether_addr($dc->{mac_prefix});

Random, per cluster. I created the zone in both clusters with identical commands and no --mac, which is what you get if the field is left empty, and got this:

ClusterGateway MAC for 172.16.10.1
site-aBC:24:11:8F:D4:57
site-bBC:24:11:2E:28:BC

One gateway IP, two MACs. A guest that lives its whole life at one site never notices. A guest that moves from site A to site B does, because it arrives with site A’s gateway MAC in its ARP cache.

I expected that to break. It does something worse. The test guest moved to site B and talked to a neighbour at site B, which on a correct fabric answers in 0.26 ms:

Gateway MAC in the moved guest’s cacheResult
site A’s, zones left at their random MACs6 pings, 16 replies, 2.4 ms
the shared MAC, set on both zones6 pings, 6 replies, 0.26 ms
A moved guest, with and without a shared gateway MACRandom MAC per clusterguest, now at site B, gateway cached asBC:24:11:8F:D4:57 (site A's)pve-b3: MAC unknown, not in EVPNflood to all 5 VTEPspve-a1pve-a2pve-a3each owns that MAC, each routes a copyneighbour at site B, three times overacross the metro and back6 pings, 16 replies, 2.4 msOne MAC set on both zonesguest, now at site B, gateway cached as02:00:00:65:00:01pve-b3 owns the same MACroutes it locallynothing crosses the metroneighbour at site B, once6 pings, 6 replies, 0.26 ms
Same guest, same move, same neighbour. The only difference is whether both zones were given the same mac before the first Apply.

No node at site B owns site A’s gateway MAC and EVPN does not advertise it, so every routed packet is flooded to all five other VTEPs as unknown unicast, and because all three site A nodes do own that MAC, all three of them route a copy back across the metro to a neighbour that was sitting next to the guest all along. Ten duplicates in six pings. Nothing alarms, because the traffic works. On a quiet link that is a curiosity. On a busy one it is your metro carrying every routed frame three times.

The fix is one line, and it goes in before the first Apply: pick a locally administered MAC and set it as mac on the zone in both clusters. The FS switches have the same setting under another name, fabric anycast-gateway-mac, and it has to be that same address there too5.

Before the first Apply matters. Change mac on a live zone and every running guest is left holding a gateway MAC that has stopped existing. A Linux guest on default timers lost routed traffic for 52.4 seconds before it gave up on the cached entry and asked again. That is one run, and the exact figure depends on where the guest’s randomised reachable timer happened to be, but it is a minute of every guest in the zone not routing.

MTU on a 25GbE Metro

VXLAN costs 50 bytes of the underlay’s MTU over IPv4: 20 of outer IP, 8 of UDP, 8 of VXLAN header, and the guest’s own 14-byte Ethernet header, which now rides inside the packet instead of on the wire3. A guest at MTU 1500 needs an underlay of at least 1550, end to end, through every hop including the metro.

Own the metro? Run the underlay at 9000 and give the zone 8950. On a metro you rent, ask the carrier what MTU they actually pass, and then test it, because the answer on the order form and the answer on the wire are not always the same thing.

Across the lab’s metro, from a guest at site A to one at site B:

Guest NIC MTUPacketResult
8950, as the zone says8950 bytesdelivered
8950, as the zone says8951 bytesrefused at the sender, Message too long
9000, guest set by hand8988 bytesgone, no error
9000, guest set by hand9000 bytesgone, no error

The first two rows are the system working: the guest knows its limit and says so. The last two are what an MTU mismatch looks like in production. The guest believes it can send 9000, the VXLAN interface at 8950 drops anything bigger without a word, and small packets carry on fine. Ping works. SSH works. The backup job hangs.

Where the 50 bytes gounderlay MTU 900050 bytes of overheadouterEthernet 14outer IP20UDP 47898VXLAN8guestEthernet 14guest IP packetup to 8950outside the MTUGuest NIC at 89508950 bytes: delivered across the metro8951 bytes: refused at the sender,Message too longGuest NIC set to 90008988 and 9000 bytes: dropped at theVXLAN interface, no error anywheresmall packets still work
The outer Ethernet header is outside the MTU. Everything else, including the guest’s own Ethernet header, has to fit in 9000.

IPv6 Needs One Switch That SDN Does Not Flip

Give the VNets an IPv6 subnet and Proxmox does the rest of the EVPN side for you: it writes advertise ipv6 unicast into FRR and puts ip6-forward on on every VNet bridge. The guest gets an IPv6 gateway that answers its pings. And then nothing routes.

Node stateIPv6 flows out of the zone
as installed, net.ipv6.conf.all.forwarding = 00 of 8, from either site
net.ipv6.conf.all.forwarding = 18 of 8

IPv4 honours the per-interface setting SDN writes. IPv6 does not, and the kernel says so plainly: conf/all/forwarding will “Enable global IPv6 forwarding between all interfaces. IPv4 and IPv6 work differently here”6. Proxmox does document it, to be fair, but under SDN fabrics, not EVPN zones: “Currently there isn’t an easy way to enable IPv6 forwarding per-interface like with IPv4, so it has to be enabled globally”1. Build an EVPN zone without reading the fabrics chapter and you will not find it. One line in /etc/sysctl.d on every node, both clusters, before anything else.

Building It

Do this in site A, then the identical thing in site B. The underlay first: each node needs an address on the site network and a route to the other site’s subnet over the metro, and nothing else. Each node has two 25G ports, one to each switch of its site’s pair, bonded with LACP; the pair presents itself as one partner through VAP, FS’s MLAG5. On pve-a1:

auto bond0
iface bond0 inet static
	address 10.101.0.11/24
	bond-slaves ens19 ens20
	bond-mode 802.3ad
	bond-miimon 100
	bond-xmit-hash-policy layer3+4
	mtu 9000
	post-up ip route add 10.102.0.0/24 via 10.101.0.1

layer3+4 is the line that matters. VXLAN puts a hash of the inner frame into the outer UDP source port, “to enable a level of entropy for the ECMP/load-balancing”3, and the bond can only use that if it hashes on ports7. Leave it at the default and every VXLAN packet between the same two nodes takes the same leg, however many guests are talking. 10.101.0.1 is the site’s underlay gateway, on the pair.

SDN needs FRR running, and a fresh 9.2 install ships it disabled, so systemctl enable frr on every node first, along with the IPv6 forwarding line from the section above:

systemctl enable frr
echo "net.ipv6.conf.all.forwarding = 1" > /etc/sysctl.d/90-evpn-ipv6.conf
sysctl -p /etc/sysctl.d/90-evpn-ipv6.conf

Then the SDN, from the shell so both clusters get exactly the same thing:

pvesh create /cluster/sdn/controllers --controller metro --type evpn --asn 65000 \
  --peers 10.101.0.11,10.101.0.12,10.101.0.13,10.102.0.21,10.102.0.22,10.102.0.23

pvesh create /cluster/sdn/zones --zone metro --type evpn --controller metro \
  --vrf-vxlan 10000 --mac 02:00:00:65:00:01 --mtu 8950 --advertise-subnets 1

for v in web:10 app:20 db:30 ops:40 backup:50; do
  n=${v%:*}; s=${v#*:}
  pvesh create /cluster/sdn/vnets --vnet $n --zone metro --tag 100${s}
  pvesh create /cluster/sdn/vnets/$n/subnets --subnet 172.16.$s.0/24 --type subnet --gateway 172.16.$s.1
  pvesh create /cluster/sdn/vnets/$n/subnets --subnet 2001:db8:16:$s::/64 --type subnet --gateway 2001:db8:16:$s::1
done

pvesh set /cluster/sdn

Five VNets, each with an IPv4 and an IPv6 subnet:

VNetVNIIPv4IPv6
web10010172.16.10.0/242001:db8:16:10::/64
app10020172.16.20.0/242001:db8:16:20::/64
db10030172.16.30.0/242001:db8:16:30::/64
ops10040172.16.40.0/242001:db8:16:40::/64
backup10050172.16.50.0/242001:db8:16:50::/64

All five sit in the one zone and so the one VRF, routed to each other on every node through the layer 3 VNI 10000. Every IPv4 subnet falls inside 172.16.0.0/16 and every IPv6 one inside 2001:db8:16::/48, which is what lets the exits further down hand the core two aggregates instead of ten routes. The IPv6 prefixes are from the documentation range; use your own. The last line is the Apply. Run the same block on one node of each cluster and the two halves find each other without anything else being touched. This peers list is the full mesh; the reflector section later swaps it for the two switches of the node’s own site. The same objects are under Datacenter, SDN in the web interface, but typing it twice into a GUI is how the two clusters end up different.

The zone takes more options than the four set above, and on this design most of them stay off. Each one is still a decision, so here is the reasoning:

Zone optionSet toWhy
exitnodesemptythe switches are the exits, further down
exitnodes-local-routing, exitnodes-primaryunsetonly mean anything with Proxmox exit nodes
advertise-subnets1announces the whole subnet, so a guest that never speaks is still reachable1
disable-arp-nd-suppressionunsetsuppression lets a node answer ARP and ND from what BGP told it, instead of flooding the question over the metro; turn it off only for floating IPs1
rt-importunsetthe docs offer it for cross-DC links1; one ASN means the automatic route targets already match
vxlan-portunset, 4789change it and every VTEP, switches included, has to change with it
nodesunsetevery node in each cluster is a VTEP
mtu8950the MTU section above

What the Apply Writes

pvesh writes four small files under /etc/pve/sdn/. /etc/pve is the cluster filesystem, so every node in a cluster reads the same four, and they are the whole of the shared configuration:

# /etc/pve/sdn/zones.cfg
evpn: metro
	controller metro
	vrf-vxlan 10000
	advertise-subnets 1
	mac 02:00:00:65:00:01
	mtu 8950

# /etc/pve/sdn/subnets.cfg (one of ten)
subnet: metro-2001:db8:16:10::-64
	vnet web
	gateway 2001:db8:16:10::1

Those four files are also the thing to compare between the two clusters. diff them across sites and the table of what has to match is checked in one command.

Apply turns them into two files on each node, and neither of those is shared. The first is /etc/network/interfaces.d/sdn, which ifupdown2 brings up. For VNet web on pve-a1:

auto web
iface web
	address 172.16.10.1/24
	address 2001:db8:16:10::1/64
	hwaddress 02:00:00:65:00:01
	bridge_ports vxlan_web
	bridge_stp off
	bridge_fd 0
	mtu 8950
	ip-forward on
	ip6-forward on
	arp-accept on
	vrf vrf_metro

auto vxlan_web
iface vxlan_web
	vxlan-id 10010
	vxlan-local-tunnelip 10.101.0.11
	bridge-learning off
	bridge-arp-nd-suppress on
	mtu 8950

auto vrf_metro
iface vrf_metro
	vrf-table auto
	post-up ip route add vrf vrf_metro unreachable default metric 4278198272
LineWhat it does
address ×2the gateway, IPv4 and IPv6, on every node at both sites
hwaddressthe zone’s mac, the anycast gateway MAC
vxlan-local-tunnelipthis node’s VTEP source, its underlay address
bridge-learning offMACs come from BGP, never from flooded frames
bridge-arp-nd-suppress onthe bridge answers ARP and ND locally
ip6-forward onper-interface IPv6 forwarding, which is not enough on its own
vrf vrf_metrothe gateway sits in the tenant VRF, not the host’s table
unreachable defaultwith no exit, a guest gets an ICMP unreachable from its own node instead of silence

The second is /etc/frr/frr.conf. The tenant VRF half is where the routing lives:

router bgp 65000 vrf vrf_metro
 bgp router-id 10.101.0.11
 !
 address-family ipv4 unicast
  redistribute connected
 exit-address-family
 !
 address-family ipv6 unicast
  redistribute connected
 exit-address-family
 !
 address-family l2vpn evpn
  advertise ipv4 unicast
  advertise ipv6 unicast
 exit-address-family

That is advertise-subnets turned into FRR. The IPv6 lines are there because a subnet is IPv6; nobody had to ask for them.

Do not edit either file by hand, because the next Apply on any node rewrites both. Anything FRR needs that SDN does not generate goes in /etc/frr/frr.conf.local, which the SDN code reads and merges into what it writes on every Apply4. This design never needed it. The locality policy further down lives on the switches, not in a local file on every hypervisor.

Plugging a Guest In

A VNet is a bridge on every node, so a guest uses it like any other bridge:

qm set 101 --net0 virtio,bridge=web,mtu=1

mtu=1 tells VirtIO to “use the bridge MTU”8, so the guest is offered 8950 and a Linux guest takes it. Leave it out and the guest sits at 1500, which works and wastes the jumbo underlay. Never type 9000 into a guest; the MTU section shows where that goes.

Inside the guest it is a plain static address, and the gateway is the same at either site:

auto eth0
iface eth0 inet static
	address 172.16.10.11/24
	gateway 172.16.10.1

iface eth0 inet6 static
	address 2001:db8:16:10::11/64
	gateway 2001:db8:16:10::1

Whoever builds guests needs SDN.Use on the VNet, the same privilege a plain bridge takes, which the docs describe as “access SDN vnets and local network bridges”9. EVPN zones get no DHCP from Proxmox, since “Currently only Simple Zones have support for automatic DHCP”1, so addresses come from your own IPAM or DHCP relay, or are static as above.

Proving It Crosses the Metro

From pve-a1, the mesh, three of whose five sessions cross the metro:

BGP router identifier 10.101.0.11, local AS number 65000 VRF default vrf-id 0
Neighbor            V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt
pve-a2(10.101.0.12) 4      65000        38        35        3    0    0 00:01:09            4        4
pve-a3(10.101.0.13) 4      65000        37        40        3    0    0 00:01:13            4        4
pve-b1(10.102.0.21) 4      65000        30        31        3    0    0 00:00:55            4        4
pve-b2(10.102.0.22) 4      65000        31        28        3    0    0 00:00:46            4        4
pve-b3(10.102.0.23) 4      65000        32        29        3    0    0 00:00:51            4        4

Every layer 2 VNI sees five remote VTEPs, which is the whole of the other cluster plus the rest of its own. With all five networks up and a test guest on each, on every node:

VNI        Type VxLAN IF              # MACs   # ARPs   # Remote VTEPs  Tenant VRF
10040      L2   vxlan_ops             6        18       5               vrf_metro
10010      L2   vxlan_web             6        20       5               vrf_metro
10030      L2   vxlan_db              6        18       5               vrf_metro
10050      L2   vxlan_backup          6        18       5               vrf_metro
10020      L2   vxlan_app             6        18       5               vrf_metro
10000      L3   vrfvx_metro           9        18       n/a             vrf_metro

And a guest at site B is a MAC behind a site B VTEP, learned from BGP, not from flooding:

MAC               Type   Flags Intf/Remote ES/VTEP                     VLAN  Seq #'s
02:bb:00:00:00:21 remote       10.102.0.21                                   1/0
02:aa:00:00:00:11 local        v-ha1                                         0/0

The route targets on those routes are 65000:10010 through 65000:10050 and 65000:10000, the automatic ASN:VNI from earlier.

The test guests are network namespaces plugged into the VNet bridges, which is the cheapest thing that behaves like a guest NIC.

From site A guestToPathRound trip
172.16.10.11172.16.10.21, same subnet, site Bbridged over VXLAN2.8 ms
172.16.10.11172.16.20.22, other subnet, site Blocal gateway, then the layer 3 VNI2.36 ms
Routing between subnets across sites: two hopsSite A, pve-a1Site B, pve-b2guest172.16.10.11hop 1: gateway172.16.10.1vrf_metroon pve-b2hop 3: guest172.16.20.22L3 VNI 10000over the metrothe gateway is on the guest's own nodehost route learned from EVPN type 2both ends route, 2.36 ms round trip, no central router
Symmetric routing through the layer 3 VNI. The guest’s own node routes, the far node delivers, and nothing in between makes a decision.

The traceroute for the second is three lines: the gateway on the guest’s own node, a hop that never answers, then the destination. Symmetric routing means both ends route, so the packet’s TTL drops twice; the silent line is the far node routing it off the layer 3 VNI into the destination’s network, and it gave no answer in three probes, in either family. There is no detour through a central router, because every node is the router.

The first routed ping had a 63 ms reply and two duplicates, before anything had learned where the destination lived. From the second run on, 20 pings, 20 replies, no duplicates.

Then every network to every network. A guest on each of the five VNets on pve-a1 pinged a guest on each of the five on pve-a2, in the same building, and on pve-b1, across the metro, twice each over IPv4 and twice over IPv6:

From pve-a1To pve-a2, same siteTo pve-b1, other site
5 VNets × 5 VNets, IPv425 of 25 pairs, 50 of 50 replies25 of 25 pairs, 50 of 50 replies
5 VNets × 5 VNets, IPv625 of 25 pairs, 50 of 50 replies25 of 25 pairs, 50 of 50 replies

Same VNet is bridged over VXLAN; different VNets are routed through the layer 3 VNI. Each node then held 449 EVPN routes for 30 guests on five networks, which is nowt for FRR.

Where Each Ping Goes

Reachability says the pings arrive. It does not say which way they went, so the next run traced each kind of ping from the web guest on pve-a1 and captured its echo request on pve-a1’s underlay, where the VXLAN header shows which VTEP it was sent to and on which VNI. This was with the switches in place as reflectors and exits, which the sections after this one build.

Ping from web on pve-a1 toWhat traceroute showsSent on the underlay toVNI
web on pve-a2, same sitethe guest, one hop10.101.0.12, pve-a210010
db on pve-a2, same sitegateway, silent hop, guest10.101.0.12, pve-a210000
web on pve-b1, other sitethe guest, one hop10.102.0.21, pve-b110010
db on pve-b1, other sitegateway, silent hop, guest10.102.0.21, pve-b110000
outside, IPv4gateway, 10.103.0.4 on sw-a2, 203.0.113.110.101.0.3, sw-a210000
outside, IPv6gateway, silent hop, 2001:db8:ffff::110.101.0.2, sw-a110000

IPv6 took exactly the same VTEP and VNI as IPv4 in all four node-to-node cases.

Where a ping from pve-a1 is sentSite ASite Bmetropve-a1guest on webpve-a2pve-b1sw-a1, sw-a2coreVNI 10010 or 10000same VNIs, node to nodeoutside: 10000routedThe switches route the outer packet between nodes and never open it.
Where a ping from pve-a1 is sent. Guest to guest, the VXLAN goes node to node and the switches only route the outer packet. Only traffic for the outside has a switch as its VTEP.

The underlay the VXLAN rides, traced from pve-a1 itself:

pve-a1 -> 10.101.0.12 (pve-a2)   1  10.101.0.12  0.177 ms
pve-a1 -> 10.102.0.21 (pve-b1)   1  10.101.0.1   1.101 ms
                                 2  10.102.0.21  2.174 ms
pve-a1 -> 10.101.0.3  (sw-a2)    1  10.101.0.3   0.109 ms

Guest traffic between nodes is a VXLAN packet from one node’s address to the other’s. Across the metro the underlay gateway routes the outer packet and never opens it; in the lab that is the metro router, in production it is the pair. The two ends of every tunnel between guests are hypervisors.

A switch is a tunnel end only for traffic leaving the zone, and then it is whichever switch of the local pair the flow hashed to: sw-a2 for the IPv4 ping in this run, sw-a1 for the IPv6 one. The reflectors carry routes and nothing else, and this table is the proof.

Putting the FS N8560-32C in the Fabric

The N8560-32C is 32 ports of 100G QSFP28 that break out to 128 of 25G, with a Broadcom chip, FSOS, and EVPN-VXLAN listed among its features, at £5,279.00 ex VAT on the day I looked2. In this design two of them at each site, in an MLAG pair, do two jobs: the leaf pair the Proxmox nodes bond into, and the end of the metro. The jobs after that are the interesting ones: VTEP, route reflector and exit.

There is no virtual FSOS image to lab against, so this section is from FS’s own configuration guide5, mapped onto what Proxmox builds. The Proxmox side of every row is from the lab. Credit to FS here: the guide runs to 2,608 pages and its distributed-gateway example is complete enough to map setting by setting, which is more than most vendors manage.

WhatProxmox zone and controllerFSOS
BGP AScontroller asn 65000router bgp 65000
Who to peer withcontroller peersneighbor … remote-as 65000, update-source loopback 1
EVPN address familygeneratedaddress-family l2vpn evpn, neighbor … activate
Layer 2 VNIvnet tag 10010vxlan 10010, extend-vlan, evpn → vni 10010
Route targetautomatic 65000:10010route-target both auto
Layer 3 VNIzone vrf-vxlan 10000vxlan 10000 with symmetric
Tenant VRFvrf_metroip vrf, route-target both 65000:10000
Gateway IPsubnet gatewayinterface OverlayRouter, ip address, anycast-gateway
Gateway MACzone macfabric anycast-gateway-mac
VTEP sourcenode’s underlay addressvtep → source loopback 1
Node uplinksbond0, 802.3adan aggregate port on each switch, joined into one VAP across the pair
Route reflectornothing, Proxmox is the clientneighbor … route-reflector-client, one bgp cluster-id per pair
Site and exit tagsnothingip community-list, set community, match community
Exit to the networkzone exitnodes left emptyaddress-family ipv4 vrf …, then advertise ipv4 unicast and advertise ipv6 unicast under l2vpn evpn

Four things in FS’s guides matter more than the rest.

No EVPN multihoming. FSOS says outright: “At present, Ethernet Auto-discovery Route and Ethernet Segment Route are not supported”5. Those are route types 1 and 4, the ones a server uses to dual-home into two switches through EVPN. FSOS does dual-homing through its own MLAG, VAP, instead, and that is what the Proxmox nodes’ bonds land on. VAP is layer 2 only: “only layer-2 APs are supported”5, which suits a bond carrying an underlay VLAN. Proxmox does not use ESI either, so nothing on the Proxmox side misses it. For a bare-metal server that is itself on a VNet, the guide only shows VAP with VXLAN in its centralised-gateway scenario, so single-home that kind of kit, or prove the pair’s behaviour before you rely on it.

Keep the nodes off VXLAN access ports. A Proxmox node sends VXLAN of its own, and FSOS will not carry a host’s VXLAN packets in through a VXLAN access port by default: it “cannot encapsulate, via VXLAN, common IP packets that carry the destination UDP port number (4789 by default)” unless port vxlan mode access is set, and with MLAG it must be on the peer-link as well10. Put the nodes’ bonds in a plain routed underlay VLAN that is not mapped to any VNI, as here, and the question never comes up.

The guide’s examples turn off MAC-only routes. The distributed-gateway example sets evpn mac advertise disable and evpn mac inactive on every VXLAN5, to save hardware table space. Copy that into a fabric where Proxmox nodes are VTEPs and the switch stops telling them about MACs it only knows at layer 2. FRR still installs a MAC it learns from a MAC-IP route, so a chatty host is found. The quiet ones are not. Leave those two lines out.

Route targets have to line up before routes move at all. FS’s reference for advertise ipv4 unicast lists the conditions, and one of them is that routes are only redistributed “after the route-target import attribute of EVI instance matches the route-target attribute of VRF”10. That is the matching discipline from earlier, enforced by the switch.

Here the switches are VTEPs in their own right anyway, because they are the reflectors and the exits; the next sections build both.

A switch as a VTEP: kit that is not a guest joins the VNetSite ASite Bbare-metal serverVLAN 10, accessFS N8560-32Cvxlan 10010extend-vlan 10pve-b1vxlan_webVNI 10010guest onVNet webVXLANFor this to work, three things on the switch equal the zone:the switch peers with its own site's nodes and the other three switchesfabric anycast-gateway-mac equals the zone's macroute targets are 65000:VNI on both sides, so a 2-byte ASNAnd leave evpn mac advertise disable out, or quiet hosts vanish from the Proxmox side.
The switch maps a VLAN onto the VNI and joins the mesh like a seventh node. From the guest at site B, the bare-metal server is a neighbour on the same segment.

The Switches as Route Reflectors

The full mesh puts every node in a BGP session with every other node, across the metro included. A route reflector breaks that: each node peers with the reflector, and the reflector passes on what it hears. FS’s guide calls it “a method for reducing IBGP peer connections within an AS”5, and the N8560 does it with neighbor … route-reflector-client.

The Proxmox side is one field. The controller’s peers list stops naming every node and names the switches instead. The code copes with a list that does not contain the node itself: it looks for its own address first and, failing that, “if peer is remote, find source with ip route”4. The node keeps its own underlay address as its VXLAN source and still sees every other node as a remote VTEP, all of it learned through the switches.

There is no FSOS image, so in the lab four FRR containers, one per switch, run the reflector configuration FS documents. That makes the Proxmox half measured and the switch half a faithful copy of the vendor’s own example, not the vendor’s code.

Before the second switch went in at each site, I measured the ways one switch per site can be used, because the failure that rules out the cheap one is why the pair matters.

BGP sessions with and without route reflectorsFull mesh15 sessions, 9 crossno reflectorOne per siteAB7 sessions, 1 crossesA stops: site A downOne per site, bothAB13 sessions, 7 crossA stops: no lossPair per siteA1A2B1B218 sessions, 4 crossA1 off: no loss
The same six nodes four ways. The reflectors only carry routes; guest traffic still goes node to node in every one.
DesignSessionsAcross the metroLose one site A switch for 30 s
full mesh159not applicable
one switch per site, each site peers with its own71site A down, even node to node inside site A
one switch per site, every node peers with both137no loss, 0 of 340 probes, BGP stopped
two per site, each site peers with its own pair184no loss, 0 of 400 probes on four paths, switch powered off

Row two is the tempting one. Seven sessions, one of them across the metro. Then the reflector stops and FRR on every site A node withdraws everything it learned from its only BGP session. Routed traffic between two site A nodes went down 1.7 seconds after the stop and stayed down until 3.9 seconds after the restart. The reflector carries no guest traffic, but the nodes forget where everything is without it.

Row three fixes that by sending every node across the metro to the other site’s switch as well. It works, and half its sessions cross the metro to do it.

The pair is the better answer, and it was going to be there anyway. Two switches per site is how the nodes get two uplinks; making both of them reflectors costs nothing extra. Each node peers with its own site’s two switches and nothing else, the four switches peer with each other, and only those four switch-to-switch sessions cross the metro. A node’s session count stays at two however big the other site grows. At twenty nodes, ten a site, it is 46 sessions against the mesh’s 190.

The Proxmox change is per cluster, and this is the one place where the two clusters’ SDN configuration is meant to differ:

# on one node of site A
pvesh set /cluster/sdn/controllers/metro --peers 10.101.0.2,10.101.0.3
pvesh set /cluster/sdn

# on one node of site B
pvesh set /cluster/sdn/controllers/metro --peers 10.102.0.2,10.102.0.3
pvesh set /cluster/sdn

The generated frr.conf now carries two neighbours in the VTEP peer group where it had five, and the summary on pve-a1 agrees:

 neighbor VTEP peer-group
 neighbor VTEP remote-as 65000
 neighbor VTEP bfd
 neighbor 10.101.0.2 peer-group VTEP
 neighbor 10.101.0.3 peer-group VTEP

Neighbor               V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt
evpn-sw-a1(10.101.0.2) 4      65000      4256      3180      216    0    0 00:10:33          207       35
evpn-sw-a2(10.101.0.3) 4      65000      1221       783      216    0    0 00:37:10          207       35

Nothing else in Proxmox changes. The zone, the VNets, the generated bridges and the guests neither know nor care that the nodes have stopped talking to each other.

On the switches it is two peer groups. This is sw-a1; sw-a2 differs only in its own address:

router bgp 65000
 bgp router-id 10.101.0.2
 no bgp default ipv4-unicast
 bgp cluster-id 10.0.0.1
 neighbor SITE peer-group
 neighbor SITE remote-as 65000
 neighbor SITE bfd
 neighbor SWITCHES peer-group
 neighbor SWITCHES remote-as 65000
 neighbor SWITCHES bfd
 neighbor 10.101.0.11 peer-group SITE
 neighbor 10.101.0.12 peer-group SITE
 neighbor 10.101.0.13 peer-group SITE
 neighbor 10.101.0.3 peer-group SWITCHES
 neighbor 10.102.0.2 peer-group SWITCHES
 neighbor 10.102.0.3 peer-group SWITCHES
 !
 address-family l2vpn evpn
  neighbor SITE activate
  neighbor SITE route-reflector-client
  neighbor SWITCHES activate
  advertise-all-vni
 exit-address-family
LineWhat it does
SITEthis site’s three nodes, the reflector’s clients
SWITCHESthe other three switches, plain iBGP, not clients
route-reflector-clientwhat a node sends is passed to the other switches; what the switches send is passed to the nodes
bgp cluster-id 10.0.0.1the same on both switches of a pair, because FS is explicit that “If multiple route reflectors are configured for a cluster, you must configure a cluster ID for the cluster”5; site B’s pair uses 10.0.0.2

Nothing a node says crosses the metro except through a switch. The data plane does not move, because the reflectors only carry routes: node to node inside a site measured 0.31 ms and across the metro 2.31 ms, the same as with the full mesh.

The Switches as Exit Nodes

An EVPN zone is a closed room until something routes it to the rest of the network. Proxmox’s own answer is exit nodes: you name some Proxmox nodes, they route between the zone and the outside, and there is a SNAT option for when the outside cannot route back1. That puts north-south traffic through hypervisors, and with two sites it puts it through one site’s hypervisors unless you build a second set. The switches are already the edge of each building, so all four are exits, and the zone’s exitnodes stays empty.

The rule this design is built to, and measured against, is one line. A guest leaves the zone through its own building’s pair, and replies come back through it. Either switch of the pair will do, and the metro carries exit traffic only when a building’s pair has gone.

FS’s guide describes the role. Its border devices sit in the tenant VRF on the layer 3 VNI and “import network routes to the TOR switches through the symmetric VXLAN”5. Here the Proxmox nodes are the TORs, and each switch holds an eBGP session from inside the VRF to a core router, takes a default route in, and hands the guest networks out. No NAT anywhere: the core is told where the guests are and routes to them.

sw-a1sw-a2sw-b1sw-b2Core
AS6500065000650006500065100
VTEP10.101.0.210.101.0.310.102.0.210.102.0.3none
Transit IPv410.103.0.210.103.0.410.103.0.310.103.0.510.103.0.1
Transit IPv62001:db8:103::2::4::3::5::1
Guest tag65000:10165000:10165000:10265000:102none
Exit tag65000:20165000:20165000:20265000:202none

The outside test addresses are 203.0.113.1 to .8 and 2001:db8:ffff::1 to ::8, all behind the core. The two tags do all the locality work, and the next three sections are what they are for.

Building the Border

The border’s half of the zone lives in the tenant VRF. This is sw-a1; the other three differ in their own addresses and their site’s tags:

vrf vrf_metro
 vni 10000
exit-vrf
!
router bgp 65000 vrf vrf_metro
 bgp router-id 10.101.0.2
 neighbor 10.103.0.1 remote-as 65100
 neighbor 2001:db8:103::1 remote-as 65100
 !
 address-family ipv4 unicast
  aggregate-address 172.16.0.0/16
  neighbor 10.103.0.1 route-map FROM-CORE in
  neighbor 10.103.0.1 route-map TO-CORE out
  no neighbor 2001:db8:103::1 activate
 exit-address-family
 !
 address-family ipv6 unicast
  aggregate-address 2001:db8:16::/48
  neighbor 2001:db8:103::1 activate
  neighbor 2001:db8:103::1 route-map FROM-CORE in
  neighbor 2001:db8:103::1 route-map TO-CORE6 out
 exit-address-family
 !
 address-family l2vpn evpn
  advertise ipv4 unicast
  advertise ipv6 unicast
 exit-address-family
LineWhat it does
vni 10000ties the VRF to the zone’s vrf-vxlan, the layer 3 VNI every Proxmox node uses
neighbor 10.103.0.1 remote-as 65100eBGP to the core, from inside the tenant VRF, not the switch’s own table
no neighbor 2001:db8:103::1 activateeach core session carries one family; activating both on both sessions tripped an FRR error in the lab
aggregate-addressone covering route per family for all five networks, without summary-only, so host routes still go out beside it
route-map FROM-CORE intags everything from the core with this site’s exit tag; the way out, below
route-map TO-CORE outsets MED on the way to the core; the way back in, below
advertise ipv4 unicast, advertise ipv6 unicastturns what the core sends, the default route included, into type 5 routes for the Proxmox nodes

The core needs only to originate a default to all four switches: neighbor 10.103.0.2 default-originate, and the same for .3, .4, .5 and the four IPv6 neighbours.

On FSOS every one of those has a documented command: address-family ipv4 vrf and address-family ipv6 vrf, aggregate-address, neighbor … default-originate, and advertise ipv4 unicast and advertise ipv6 unicast under the EVPN address family10. FS’s reference has one copy and paste fault worth knowing about: its advertise ipv6 unicast entry describes itself as “IPv4 VRF re-distribution”, although the rest of the entry is plainly about IPv6. The limitations it lists are the ones that bite, and the third is the matching rule from earlier: routes only move “after the route-target import attribute of EVI instance matches the route-target attribute of VRF”10.

On the Proxmox side there is nothing to configure. exitnodes stays empty, and what the switches announce arrives in each node’s tenant VRF as ordinary BGP routes. In the finished state, on pve-a1:

default nhid 637 proto bgp metric 20
	nexthop via 10.101.0.2 dev vrfbr_metro weight 1 onlink
	nexthop via 10.101.0.3 dev vrfbr_metro weight 1 onlink

default nhid 638 proto bgp metric 20 pref medium
	nexthop via ::ffff:10.101.0.2 dev vrfbr_metro weight 1 onlink
	nexthop via ::ffff:10.101.0.3 dev vrfbr_metro weight 1 onlink

Two next hops per family, both switches of its own pair, and nothing at the other site. The IPv6 next hops are the switches’ IPv4 VTEP addresses written as IPv6, because the IPv6 routes ride the same IPv4 VXLAN underlay; there is no IPv6 underlay to build.

Before the locality work, that table was wrong in both directions.

Keeping each site's traffic on its own exitAs it comesmetrocore routersite A pairsite B pairguest, site A14 of 24 flows left via Breplies come back either wayExit tag out, guest tag inmetrocore routersite A pairsite B pairguest, site Aevery packet leaves via Areplies come back via A
Left as it comes, all four switches are equal and traffic crosses the metro both ways. A site tag on the way out and a guest tag on the way in keep each building’s traffic on its own pair.

Leaving Through Your Own Building

All four switches originate the same default route, and when it reaches a Proxmox node nothing tells the copies apart. Same local preference, same AS path, same origin, same MED. FRR treats them as equal and installs all four, and the kernel on pve-a2 showed it:

default nhid 551 proto bgp metric 20
	nexthop via 10.101.0.2 dev vrfbr_metro weight 1 onlink
	nexthop via 10.102.0.2 dev vrfbr_metro weight 1 onlink
	nexthop via 10.101.0.3 dev vrfbr_metro weight 1 onlink
	nexthop via 10.102.0.3 dev vrfbr_metro weight 1 onlink

Four next hops, two of them in the other building, and the kernel hashes each flow onto one. A guest on every node traced eight outside addresses:

NodeFlows out via own pairVia the other site’s pair
pve-a135
pve-a226
pve-a353
pve-b126
pve-b226
pve-b344

Thirty of 48 flows left through the wrong building. Every one of them crossed the metro twice, once out and once back, and paid a millisecond for it.

The tiebreaker is local preference, and the question is where to set it. Not at the switch when it originates the route: local preference is carried to every iBGP speaker unchanged, so setting 200 there makes that switch preferred at both sites, which moves the problem rather than fixing it. It has to differ by audience, site A’s nodes seeing their own pair high and site B’s seeing theirs.

The reflectors already know the audience. Each switch holds its own site’s nodes in the SITE peer group, so a route-map applied outbound to that group touches only that site’s nodes. What it needs to know is which routes are its own pair’s exits.

The first attempt matched the next hop, the pair’s two VTEP addresses in a prefix list. FRR ran that route-map 518 times in the lab and set local preference on none of them, because it did not match an EVPN next hop against a prefix list. FSOS would not rescue it either: its match ip next-hop takes an access list or a prefix list, not a bare address5.

So the switches tag instead. Each one marks everything it learns from the core with its site’s exit tag, the tag rides into the type 5 route, and each reflector sets 200 on its own site’s tag on the way to its own nodes:

bgp community-list standard SITE-EXIT seq 5 permit 65000:201
!
route-map FROM-CORE permit 10
 set community 65000:201 additive
!
route-map LOCAL-EXIT permit 10
 match community SITE-EXIT
 set local-preference 200
route-map LOCAL-EXIT permit 20
!
router bgp 65000
 address-family l2vpn evpn
  neighbor SITE route-map LOCAL-EXIT out

Both site A switches carry exactly that; site B’s pair uses 65000:202. The empty permit 20 is not decoration. A route-map denies whatever no entry matches, so without it every other route the reflector sends its site, the guests’ MACs included, would vanish.

FS documents all three pieces, ip community-list, set community and match community, with set community … additive in its own route-map examples5. Its CLI reference adds that set community “is only used to configure policy-based routing”10, which its own configuration guide contradicts; the guide is the one with the BGP examples.

The default route as pve-a1 receives itsw-a1reflector and exitsw-a2reflector and exitpve-a1installs both 200s:sw-a1 and sw-a2sw-a1's own exit, 200a2, b1, b2 exits, 100sw-a2's own exit, 200a1, b1, b2 exits, 100A reflected exit keeps 100: FRR does not apply outbound policy to reflected routes.
The default route as pve-a1 receives it from its own pair. Each switch sends its own exit at 200 and passes on the other three at 100, so the node splits between the two at 200.

pve-a1 hears the default eight ways, four switches through two reflectors, and BGP prints why it chose:

    10.101.0.2(evpn-sw-a1) from evpn-sw-a1(10.101.0.2) (10.101.0.2) announce-nh-self
      Origin IGP, metric 0, localpref 200, valid, internal, multipath, best (Router ID)
      Community: 65000:201
    10.101.0.3(evpn-sw-a2) from evpn-sw-a2(10.101.0.3) (10.101.0.3) announce-nh-self
      Origin IGP, metric 0, localpref 200, valid, internal, multipath
      Community: 65000:201
    10.101.0.2(evpn-sw-a2) from evpn-sw-a2(10.101.0.3) (10.101.0.2) announce-nh-self
      Origin IGP, metric 0, localpref 100, valid, internal
      Community: 65000:201
      Originator: 10.101.0.2, Cluster list: 10.0.0.1
    10.102.0.2(evpn-sw-a2) from evpn-sw-a2(10.101.0.3) (10.102.0.2) announce-nh-self
      Origin IGP, metric 0, localpref 100, valid, internal
      Community: 65000:202

The third path is worth a second look. It is sw-a1’s exit, carrying site A’s tag, passed on by sw-a2, and it arrives at 100, not 200. FRR does not apply an outbound route-map’s changes to reflected routes unless told to: “By default, attribute modification via route-map policy out is not reflected on reflected routes”11. Here that costs nothing, because every node peers with both switches of its pair and hears each one’s own exit at 200 directly. Build it with nodes peering to only one switch of the pair and it would matter, which is another reason not to.

The Proxmox controller does have route-map-in and route-map-out options of its own4, and you could do this on the nodes instead. That is the same policy written on every node, in two clusters that do not share configuration. Four times, on four switches, is the better trade.

Coming Back Through Your Own Building

Fixing the way out fixed half of it. Measured before the second switches went in, the core learned 172.16.0.0/16 from both sites equally and spread replies across them, so traffic left site A through its own switch and came back through the other building’s:

core -> 172.16.10.12: first hop 10.103.0.3
core -> 172.16.10.21: first hop 10.103.0.2

172.16.10.12 lives at site A and its replies arrived through site B; .21 lives at site B and came in through A. An aggregate cannot fix that, however it is weighted, because the same subnets exist at both sites. Only a host route says which building a guest is in.

The switches have the host routes already. Every guest’s address arrives as a type 2 route with its MAC, and each switch installs it in the VRF as a /32 or /128. Leaving summary-only off the aggregate sends them to the core alongside it.

That alone gives the core four equal host routes for every guest, which is no better. The tiebreaker on this side is MED, because all four switches are in the same neighbouring AS and the core compares MED between them by default. A switch should send MED 10 for a guest in its own building and 100 for the rest.

The obvious test is the next hop again, the guest’s node, and it has the same two problems as before plus one of its own. An IPv6 host route’s next hop is the node’s IPv4 VTEP written as ::ffff:10.101.0.11, so an IPv4 match never fires on it, and FS’s CLI reference documents match ip next-hop with no IPv6 form at all10.

So the guest’s route is tagged where it enters, and that is the switch that knows it best. Each switch marks every route arriving from its own site’s nodes with its site’s guest tag, and marks MED on that tag on the way to the core:

bgp community-list standard SITE-LOCAL seq 5 permit 65000:101
!
route-map SITE-IN permit 10
 set community 65000:101 additive
!
route-map TO-CORE permit 10
 match community SITE-LOCAL
 set metric 10
route-map TO-CORE permit 20
 set metric 100
! TO-CORE6 is identical
!
router bgp 65000
 address-family l2vpn evpn
  neighbor SITE route-map SITE-IN in

A tag does not care which family the route is, so one rule covers IPv4 and IPv6 and needs no next-hop match anywhere. sw-a2 tags the same routes from the same three nodes, so both switches of a pair agree on which guests are home.

With both route-maps in place the core sees every guest at MED 10 through both switches of its own pair and 100 through the other pair, in both families. All twelve host routes, six guests in two families, came out the same shape:

Guestsw-a1sw-a2sw-b1sw-b2Core uses
172.16.10.111, site A1010100100sw-a1
2001:db8:16:10::112, site A1010100100sw-a2
172.16.10.121, site B1001001010sw-b1
2001:db8:16:10::123, site B1001001010sw-b1

The core picks one of the two MED 10 paths, the older one, and does not split between them unless it is told to. Either is in the right building, which is the rule.

The aggregates stay, at MED 100 from all four, to cover a guest that has not spoken yet and so has no host route. The lab produced one: a test guest left silent for a few minutes aged out of one switch’s table and its replies briefly lost their preference until it sent a frame. That is the trade a host-route design makes, and the aggregate is what keeps it a slower path rather than no path.

Proving Every Node Uses Its Own Exit

One guest per site proves the policy works for one guest. The claim is about every node, so a dual-stack guest on each of the six nodes pinged eight IPv4 and eight IPv6 outside addresses three times each, and every packet leaving each switch for the core was counted. For the way back, the core traced to each guest and the first hop names the switch it chose.

NodeIPv4 packets out, a1 / a2 / b1 / b2IPv6 packets out, a1 / a2 / b1 / b2Replies come back through
pve-a118 / 6 / 0 / 06 / 18 / 0 / 0sw-a1, sw-a2 for IPv6
pve-a212 / 12 / 0 / 018 / 6 / 0 / 0sw-a1
pve-a312 / 12 / 0 / 018 / 6 / 0 / 0sw-a1
pve-b10 / 0 / 9 / 150 / 0 / 9 / 15sw-b1
pve-b20 / 0 / 6 / 180 / 0 / 3 / 21sw-b1
pve-b30 / 0 / 15 / 90 / 0 / 12 / 12sw-b1

Not one packet left through the other building, and not one reply came back through it. Both switches of each pair carried traffic, split by flow.

Then all five networks. Every guest on every VNet at one site, fifteen of them, pinged the outside in both families while the switches counted:

SiteAnsweredIPv4 packets out, a1 / a2 / b1 / b2IPv6 packets out, a1 / a2 / b1 / b2
A30 of 3027 / 18 / 0 / 015 / 30 / 0 / 0
B30 of 300 / 0 / 21 / 240 / 0 / 27 / 18

The tags work per site, not per network, so a sixth VNet needs nothing on the switches at all.

Losing a Switch

The point of a pair is the other one. Powering sw-a1 off for 30 seconds takes out a reflector and an exit at once, which is the worst single switch failure this design has.

What should happen: BFD drops site A’s sessions to sw-a1; its 200 default goes with them; site A’s nodes keep sw-a2’s, which is also at 200, so there is nothing to fail over to, only one of two next hops to drop; and the core withdraws sw-a1’s MED 10 host routes and uses sw-a2’s. Nothing crosses the metro that did not before.

A site A guest probed four paths at once, every 0.15 seconds, through the power-off and the restart:

From a site A guest toProbesLost
a site A guest on another VNet, routed4000
a site B guest on the same VNet, bridged4000
the outside, IPv44000
the outside, IPv64000

The container was really gone: Proxmox logged it stopped and started 33 seconds apart, and sw-a1 came back with all six of its sessions.

What the lab cannot show is the bond. On real kit a dead switch also takes one leg of every node’s bond with it, and the bond notices on its own schedule, bond-miimon 100 being a link check every 100 milliseconds7. That is the half of this failure that belongs to MLAG rather than EVPN, and the half to test on the real pair before it goes live.

Losing both switches of a pair is a different thing. The nodes’ uplinks go with them, the site is off the network, and there is no EVPN path to fail over to because there is no underlay to carry it. That is what the second building is for, not the second switch.

When the Metro Goes Down

This was measured with the full mesh, before the switches took on any of the above. I cut the metro for 30 seconds by dropping every packet through the router, with two pings running from a guest at site A: one to another site A guest on a different subnet, one to a guest at site B.

WhatWhen
BFD on pve-a2 drops all three site B sessions1.16 to 1.32 s after the cut
site A guest to site A guest, routed between subnets362 replies, no gap at all
site A guest to site B guestdown from the cut until restore
BGP sessions to site B back up2.1 s after restore
End-of-RIB from all three site B nodes3.1 s after restore
site A guest to site B guest, replying again3.2 s after restore

The BFD figure is the default doing its job: 300 ms intervals, three missed, gone in a second. The routing inside site A never noticed. Nothing inside site A depends on site B.

Thirty seconds without the metroinside site Asite A to BcutrestoreBFD drops site Bat +1.2 sBGP +2.1 sroutes +3.1 spings +3.2 s0 s10 s20 s30 s40 s362 replies inside site A with no gap. Site B traffic is the only thing the cut touched.
Measured on pve-a2. The local routing line has no gap in it, and the gap in the cross-site line is the cut plus 3.2 seconds.

This is where two clusters earn their keep. Stretch one cluster across the same metro and a cut becomes a quorum question, a Ceph placement question and a fencing question all at once, whereas here nobody loses quorum, nobody’s Ceph goes read-only, and the only thing broken is the thing that was actually cut.

Where This Stops

The MAC that differed, the frames that vanished and the route target that was valid and wrong have one thing in common. None of them raised an alarm. Each was a system doing exactly what it was told, by two copies of a configuration nobody had compared.

That is the real cost of two clusters sharing one network. Not the BGP, not the VXLAN, which are old, standard and well-behaved. It is that the only thing keeping site A and site B in agreement is the person who typed it twice, and there is no tool in the box that will tell them when they stop agreeing.

So treat the shared settings as one thing that happens to be deployed twice. One file, in version control, pushed to both clusters by the same script, and diffed between them on a schedule. The table in this post is the list of what goes in it. Nowt clever, and nobody will thank you for it, but it is the difference between a fabric you understand and one that works until the day it quietly does not.


  1. Proxmox VE Administration Guide, Software-Defined Network — EVPN zone and controller options. ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎

  2. FS N8560-32C product page — 32× 100G QSFP28, breakout to 128× 25/10G, “Support MLAG/Stacking, BGP4/BGP4+, EVPN-VXLAN”, £5,279.00 ex VAT on 24th November 2026. ↩︎ ↩︎

  3. RFC 7348, Virtual eXtensible Local Area Network (VXLAN) — frame format and UDP port 4789. ↩︎ ↩︎ ↩︎

  4. pve-network source, git.proxmox.com — src/PVE/Network/SDN/Controllers/EvpnPlugin.pm, Zones/EvpnPlugin.pm and Frr.pm (the frr.conf.local merge), as shipped in libpve-network-perl 1.6.10. ↩︎ ↩︎ ↩︎ ↩︎

  5. FS, N5860, N8560, N9510 and NC8200 Series Switches Configuration Guide — section 7.3.2 Configuring a BGP Route Reflector, 7.3.9 Configuring the Route Attributes of BGP (MED and LOCAL_PREF), 7.3.37 Configuring BGP EVPN, 7.4.11 configuration reference, and the VXLAN chapter’s distributed and single-tenant routing scenarios with border devices. ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎

  6. Linux kernel documentation, IP sysctl — conf/all/forwarding for IPv6, “IPv4 and IPv6 work differently here”. ↩︎

  7. Linux kernel documentation, bonding — xmit_hash_policy layer3+4 and miimon. ↩︎ ↩︎

  8. Proxmox VE, qm(1) manual — net[n] option mtu: “Setting to 1 or empty will use the bridge MTU”. ↩︎

  9. Proxmox VE Administration Guide, User Management — privilege list, SDN.Use. ↩︎

  10. FS, N8560 Series Switches CLI Reference Guide — entries 5.12 advertise ipv4 unicast and 5.13 advertise ipv6 unicast, and their usage limitations. ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎

  11. FRRouting user guide, BGP — bgp route-reflector allow-outbound-policy: “By default, attribute modification via route-map policy out is not reflected on reflected routes”. ↩︎