VXLAN: BGP EVPN with FRR

Vincent Bernat

VXLAN is an over­lay net­work to en­cap­su­late Eth­er­net traf­fic over an ex­ist­ing (highly avail­able and scal­able, pos­si­bly the In­ter­net) IP net­work while ac­com­mo­dat­ing a very large num­ber of ten­ants. It is de­fined in RFC 7348. For an un­cut in­tro­duc­tion on its use with Linux, have a look at my “VXLAN & Linux” post.

VXLAN deployment
VXLAN deployment example with hypervisors acting as VTEPs

In the above ex­am­ple, we have hy­per­vi­sors host­ing vir­tual ma­chines from dif­fer­ent ten­ants. Each vir­tual ma­chine is given ac­cess to a ten­ant-spe­cific vir­tual Eth­er­net seg­ment. Users are ex­pect­ing clas­sic Eth­er­net seg­ments: no MAC re­stric­tions,1 to­tal con­trol over the IP ad­dress­ing scheme they use and avail­abil­ity of multicast.

In a large VXLAN de­ploy­ment, two as­pects need at­tention:

  1. dis­cov­ery of other end­points (VTEPs) shar­ing the same VXLAN seg­ments, and
  2. avoid­ance of BUM frames (broad­cast, un­known uni­cast and mul­ti­cast) as they have to be for­warded to all VTEPs.

A typ­i­cal so­lu­tion for the first point is us­ing mul­ti­cast. For the sec­ond point, this is source-ad­dress learning.

Introduction to BGP EVPN#

BGP EVPN (RFC 7432 and RFC 8365 for its ap­pli­ca­tion to VXLAN) is a stan­dard con­trol pro­to­col to ef­fi­ciently solve these two as­pects with­out re­ly­ing on mul­ti­cast nor source-ad­dress learning.

BGP EVPN re­lies on BGP (RFC 4271) and its MP-BGP ex­ten­sions (RFC 4760). BGP is the rout­ing pro­to­col pow­er­ing the In­ter­net. It is highly scal­able and in­ter­op­er­a­ble. It is also ex­ten­si­ble and one of its ex­ten­sions is MP-BGP. This ex­ten­sion can carry reach­a­bil­ity in­for­ma­tion (NLRI) for mul­ti­ple pro­to­cols (IPv4, IPv6, L3VPN and in our case EVPN). EVPN is a spe­cial fam­ily to ad­ver­tise MAC ad­dresses and the re­mote de­vices they are at­tached to.

There are two kinds of reach­a­bil­ity in­for­ma­tion a VTEP sends through BGP EVPN:

  1. the VNIs they have in­ter­est in (type 3 routes), and
  2. for each VNI, the lo­cal MAC ad­dresses (type 2 routes).

The pro­to­col also cov­ers other as­pects of vir­tual Eth­er­net seg­ments (L3 reach­a­bil­ity in­for­ma­tion from ARP/ND caches, MAC mo­bil­ity and multi-hom­ing2) but we won’t de­scribe them here.

To de­ploy BGP EVPN, a typ­i­cal so­lu­tion is to use sev­eral route re­flec­tors (both for re­dun­dancy and scal­a­bil­ity), like in the pic­ture be­low. Each VTEP opens a BGP ses­sion to at least two route re­flec­tors, sends its in­for­ma­tion (MACs and VNIs) and re­ceives oth­ers’. This re­duces the num­ber of BGP ses­sions to configure.

VXLAN deployment with route reflectors
VXLAN deployment example with hypervisors using BGP EVPN with route reflectors

Com­pared to other so­lu­tions to de­ploy VXLAN, BGP EVPN has three main ad­vantages:

  • in­ter­op­er­abil­ity with other ven­dors (no­tably Ju­niper and Cisco);
  • proven scal­a­bil­ity (a typ­i­cal BGP routers han­dle sev­eral mil­lions of routes); and
  • pos­si­bil­ity to en­force fine-grained policies.

On Linux, FRR is a fairly com­plete im­ple­men­ta­tion of BGP EVPN (type 3 routes for VTEP dis­cov­ery, type 2 routes with MAC or IP ad­dresses, MAC mo­bil­ity when a host changes from one VTEP to an­other one) which re­quires very lit­tle con­fig­u­ra­tion. This is a fork of Quagga and is used in Cu­mu­lus Linux, a net­work op­er­at­ing sys­tem based on De­bian pow­er­ing switches from var­i­ous brands.3

Up­date (2020-11)

Ini­tially, this ar­ti­cle was about Cu­mu­lus Quagga. EVPN sup­port was added in FRR 4.0. On Cu­mu­lus Linux, FRR has re­placed Cu­mu­lus Quagga since ver­sion 3.4.0. I have up­dated this ar­ti­cle to re­place men­tions of Cu­mu­lus Quagga by FRR to avoid confusion.

Route reflector setup#

Be­fore con­fig­ur­ing each VTEP, we need to con­fig­ure two or more route re­flec­tors. There are many so­lu­tions. I will present three of them:

  • using FRR;
  • us­ing GoBGP, an im­ple­men­ta­tion of BGP in Go; and
  • us­ing Ju­niper Junos.

For re­li­a­bil­ity pur­poses, it is pos­si­ble (and easy) to use one im­ple­men­ta­tion for some route re­flec­tors and an­other im­ple­men­ta­tion for the other ones.

The pro­posed con­fig­u­ra­tions are quite min­i­mal. How­ever, it is pos­si­ble to cen­tral­ize poli­cies on the route re­flec­tors (e.g. routes tagged with some com­mu­nity can only be read­ver­tised to some group of VTEPs).

Using FRR#

The con­fig­u­ra­tion is pretty sim­ple. We sup­pose the con­fig­ured route re­flec­tor has 203.0.113.254 con­fig­ured as a loopback IP.

router bgp 65000
  bgp router-id 203.0.113.254
  bgp cluster-id 203.0.113.254
  bgp log-neighbor-changes
  no bgp default ipv4-unicast
  neighbor fabric peer-group
  neighbor fabric remote-as 65000
  neighbor fabric capability extended-nexthop
  neighbor fabric update-source 203.0.113.254
  bgp listen range 203.0.113.0/24 peer-group fabric
  !
  address-family l2vpn evpn
   neighbor fabric activate
   neighbor fabric route-reflector-client
  exit-address-family
  !
!

A peer group fabric is de­fined and we lever­age the dy­namic neigh­bor fea­ture of FRR: we do not have to ex­plic­itly de­fine each neigh­bor. Any client from 203.0.113.0/24 and pre­sent­ing it­self as part of AS 65000 can con­nect. All sent EVPN routes will be ac­cepted and re­flected to the other clients.

You do not need to run Ze­bra, the route en­gine talk­ing with the ker­nel. In­stead, start bgpd with the --no_​kernel flag.

Up­date (2018-04)

If you need to sup­port sev­eral im­ple­men­ta­tions of BGP EVPN, it is safer to not use FRR as a route re­flec­tor: it may man­gle the re­ceived routes.

Using GoBGP#

GoBGP is a clean im­ple­men­ta­tion of BGP in Go.4 It ex­poses an RPC API for con­fig­u­ra­tion (but ac­cepts a con­fig­u­ra­tion file and comes with a com­mand-line client). Here is a con­fig­u­ra­tion sim­i­lar to the FRR one:

global:
  config:
    as: 65000
    router-id: 203.0.113.254
    local-address-list:
      - 203.0.113.254
peer-groups:
  - config:
      peer-group-name: rr-client
      peer-as: 65000
    afi-safis:
      - config:
          afi-safi-name: l2vpn-evpn
    route-reflector:
      config:
        route-reflector-client: true
        route-reflector-cluster-id: 203.0.113.254
dynamic-neighbors:
  - config:
      peer-group: rr-client
      prefix: 203.0.113.0/24

GoBGP will not try to in­ter­act with the ker­nel which is fine as a route re­flector.

Using Juniper Junos#

A va­ri­ety of Ju­niper prod­ucts can be a BGP route re­flec­tor, notably:

The main fac­tor is the CPU and the mem­ory. The QFX5100 is low on mem­ory and won’t sup­port large de­ploy­ments with­out some ad­di­tional policing.

Here is a con­fig­u­ra­tion sim­i­lar to the FRR one:

interfaces {
    lo0 {
        unit 0 {
            family inet {
                address 203.0.113.254/32;
            }
        }
    }
}

protocols {
    bgp {
        group fabric {
            family evpn {
                signaling {
                    /* Do not try to install EVPN routes */
                    no-install;
                }
            }
            type internal;
            cluster 203.0.113.254;
            local-address 203.0.113.254;
            allow 203.0.113.0/24;
        }
    }
}

routing-options {
    router-id 203.0.113.254;
    autonomous-system 65000;
}

VTEP setup#

The next step is to con­fig­ure each VTEP/hypervisor. Each VXLAN is lo­cally con­fig­ured us­ing a bridge for lo­cal vir­tual in­ter­faces, like il­lus­trated in the schema be­low. The bridge is tak­ing care of the lo­cal MAC ad­dresses (no­tably, us­ing source-ad­dress learn­ing) and the VXLAN in­ter­face takes care of the re­mote MAC ad­dresses (re­ceived with BGP EVPN).

Bridged VXLAN device
VXLAN device attached to a Linux bridge

VXLANs can be pro­vi­sioned with the fol­low­ing script. Source-ad­dress learn­ing is dis­abled as we will rely solely on BGP EVPN to syn­chro­nize FDBs be­tween the hy­pervisors.

for vni in 100 200; do
    # Create VXLAN interface
    ip link add vxlan${vni} type vxlan
        id ${vni} \
        dstport 4789 \
        local 203.0.113.2 \
        nolearning
    # Create companion bridge
    brctl addbr br${vni}
    brctl addif br${vni} vxlan${vni}
    brctl stp br${vni} off
    ip link set up dev br${vni}
    ip link set up dev vxlan${vni}
done
# Attach each VM to the appropriate segment
brctl addif br100 vnet10
brctl addif br100 vnet11
brctl addif br200 vnet12

The con­fig­u­ra­tion of FRR is sim­i­lar to the one used for a route re­flec­tor, ex­cept we use the advertise-all-vni di­rec­tive to pub­lish all lo­cal VNIs.

router bgp 65000
  bgp router-id 203.0.113.2
  no bgp default ipv4-unicast
  neighbor fabric peer-group
  neighbor fabric remote-as 65000
  neighbor fabric capability extended-nexthop
  ! BGP sessions with route reflectors
  neighbor 203.0.113.253 peer-group fabric
  neighbor 203.0.113.254 peer-group fabric
  !
  address-family l2vpn evpn
   neighbor fabric activate
   advertise-all-vni
  exit-address-family
  !
!

If ev­ery­thing works as ex­pected, the in­stances shar­ing the same VNI should be able to ping each other. If IPv6 is en­abled on the VMs, the ping com­mand shows if ev­ery­thing is in order:

$ ping -c10 -w1 -t1 ff02::1%eth0
PING ff02::1%eth0(ff02::1%eth0) 56 data bytes
64 bytes from fe80::5254:33ff:fe00:8%eth0: icmp_seq=1 ttl=64 time=0.016 ms
64 bytes from fe80::5254:33ff:fe00:b%eth0: icmp_seq=1 ttl=64 time=4.98 ms (DUP!)
64 bytes from fe80::5254:33ff:fe00:9%eth0: icmp_seq=1 ttl=64 time=4.99 ms (DUP!)
64 bytes from fe80::5254:33ff:fe00:a%eth0: icmp_seq=1 ttl=64 time=4.99 ms (DUP!)

--- ff02::1%eth0 ping statistics ---
1 packets transmitted, 1 received, +3 duplicates, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.016/3.745/4.991/2.152 ms

Verification#

Step by step, let’s check how ev­ery­thing comes together.

Getting VXLAN information from the kernel#

On each VTEP, FRR should be able to re­trieve the in­for­ma­tion about con­fig­ured VXLANs. This can be checked with vtysh:

# show interface vxlan100
Interface vxlan100 is up, line protocol is up
  Link ups:       1    last: 2017/04/29 20:01:33.43
  Link downs:     0    last: (never)
  PTM status: disabled
  vrf: Default-IP-Routing-Table
  index 11 metric 0 mtu 1500
  flags: <UP,BROADCAST,RUNNING,MULTICAST>
  Type: Ethernet
  HWaddr: 62:42:7a:86:44:01
  inet6 fe80::6042:7aff:fe86:4401/64
  Interface Type Vxlan
  VxLAN Id 100
  Access VLAN Id 1
  Master (bridge) ifindex 9 ifp 0x56536e3f3470

The im­por­tant points are:

  • the VNI is 100; and
  • the bridge de­vice was cor­rectly detected.

FRR should also be able to re­trieve in­for­ma­tion about the lo­cal MAC ad­dresses:

# show evpn mac vni 100
Number of MACs (local and remote) known for this VNI: 2
MAC               Type   Intf/Remote VTEP      VLAN
50:54:33:00:00:0a local  eth1.100
50:54:33:00:00:0b local  eth2.100

BGP sessions#

Each VTEP has to es­tab­lish a BGP ses­sion to the route re­flec­tors. On the VTEP, this can be checked by run­ning vtysh:

# show bgp neighbors 203.0.113.254
BGP neighbor is 203.0.113.254, remote AS 65000, local AS 65000, internal link
 Member of peer-group fabric for session parameters
  BGP version 4, remote router ID 203.0.113.254
  BGP state = Established, up for 00:00:45
  Neighbor capabilities:
    4 Byte AS: advertised and received
    AddPath:
      L2VPN EVPN: RX advertised L2VPN EVPN
    Route refresh: advertised and received(new)
    Address family L2VPN EVPN: advertised and received
    Hostname Capability: advertised
    Graceful Restart Capabilty: advertised
[…]
 For address family: L2VPN EVPN
  fabric peer-group member
  Update group 1, subgroup 1
  Packet Queue length 0
  Community attribute sent to this neighbor(both)
  8 accepted prefixes

  Connections established 1; dropped 0
  Last reset never
Local host: 203.0.113.2, Local port: 37603
Foreign host: 203.0.113.254, Foreign port: 179

The out­put in­cludes the fol­low­ing in­formation:

  • the BGP state is Established;
  • the ad­dress fam­ily L2VPN EVPN is cor­rectly ad­ver­tised; and
  • 8 routes are re­ceived from this route re­flector.

The state of the BGP ses­sions can also be checked from the route re­flec­tors. With GoBGP, use the fol­low­ing command:

# gobgp neighbor 203.0.113.2
BGP neighbor is 203.0.113.2, remote AS 65000, route-reflector-client
  BGP version 4, remote router ID 203.0.113.2
  BGP state = established, up for 00:04:30
  BGP OutQ = 0, Flops = 0
  Hold time is 9, keepalive interval is 3 seconds
  Configured hold time is 90, keepalive interval is 30 seconds
  Neighbor capabilities:
    multiprotocol:
        l2vpn-evpn:     advertised and received
    route-refresh:      advertised and received
    graceful-restart:   received
    4-octet-as: advertised and received
    add-path:   received
    UnknownCapability(73):      received
    cisco-route-refresh:        received
[…]
  Route statistics:
    Advertised:             8
    Received:               5
    Accepted:               5

With Junos, use the be­low command:

> show bgp neighbor 203.0.113.2
Peer: 203.0.113.2+38089 AS 65000 Local: 203.0.113.254+179 AS 65000
  Group: fabric                Routing-Instance: master
  Forwarding routing-instance: master
  Type: Internal    State: Established
  Last State: OpenConfirm   Last Event: RecvKeepAlive
  Last Error: None
  Options: <Preference LocalAddress Cluster AddressFamily Rib-group Refresh>
  Address families configured: evpn
  Local Address: 203.0.113.254 Holdtime: 90 Preference: 170
  NLRI evpn: NoInstallForwarding
  Number of flaps: 0
  Peer ID: 203.0.113.2     Local ID: 203.0.113.254     Active Holdtime: 9
  Keepalive Interval: 3          Group index: 0    Peer index: 2
  I/O Session Thread: bgpio-0 State: Enabled
  BFD: disabled, down
  NLRI for restart configured on peer: evpn
  NLRI advertised by peer: evpn
  NLRI for this session: evpn
  Peer supports Refresh capability (2)
  Stale routes from peer are kept for: 300
  Peer does not support Restarter functionality
  NLRI that restart is negotiated for: evpn
  NLRI of received end-of-rib markers: evpn
  NLRI of all end-of-rib markers sent: evpn
  Peer does not support LLGR Restarter or Receiver functionality
  Peer supports 4 byte AS extension (peer-as 65000)
  NLRI's for which peer can receive multiple paths: evpn
  Table bgp.evpn.0 Bit: 20000
    RIB State: BGP restart is complete
    RIB State: VPN restart is complete
    Send state: in sync
    Active prefixes:              5
    Received prefixes:            5
    Accepted prefixes:            5
    Suppressed due to damping:    0
    Advertised prefixes:          8
  Last traffic (seconds): Received 276  Sent 170  Checked 276
  Input messages:  Total 61     Updates 3       Refreshes 0     Octets 1470
  Output messages: Total 62     Updates 4       Refreshes 0     Octets 1775
  Output Queue[1]: 0            (bgp.evpn.0, evpn)

If a BGP ses­sion can­not be es­tab­lished, the logs of each BGP dae­mon should men­tion the cause.

Sent routes#

From each VTEP, FRR needs to send:

  • one type 3 route for each lo­cal VNI; and
  • one type 2 route for each lo­cal MAC address.

The best place to check the re­ceived routes is on one of the route re­flec­tors. If you are us­ing Junos, the fol­low­ing com­mand will dis­play the re­ceived routes from the pro­vided VTEP:

> show route table bgp.evpn.0 receive-protocol bgp 203.0.113.2

bgp.evpn.0: 10 destinations, 10 routes (10 active, 0 holddown, 0 hidden)
  Prefix                  Nexthop              MED     Lclpref    AS path
  2:203.0.113.2:100::0::50:54:33:00:00:0a/304 MAC/IP
*                         203.0.113.2                  100        I
  2:203.0.113.2:100::0::50:54:33:00:00:0b/304 MAC/IP
*                         203.0.113.2                  100        I
  3:203.0.113.2:100::0::203.0.113.2/304 IM
*                         203.0.113.2                  100        I
  3:203.0.113.2:200::0::203.0.113.2/304 IM
*                         203.0.113.2                  100        I

There is one type 3 route for VNI 100 and an­other one for VNI 200. There are also two type 2 routes for two MAC ad­dresses on VNI 100. To get more in­for­ma­tion, you can add the key­word extensive. Here is a type 3 route ad­ver­tis­ing 203.0.113.2 as a VTEP for VNI 100:8

> show route table bgp.evpn.0 receive-protocol bgp 203.0.113.2 extensive

bgp.evpn.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden)
* 3:203.0.113.2:100::0::203.0.113.2/304 IM (1 entry, 1 announced)
     Accepted
     Route Distinguisher: 203.0.113.2:100
     Nexthop: 203.0.113.2
     Localpref: 100
     AS path: I
     Communities: target:65000:268435556 encapsulation:vxlan(0x8)
[…]

Here is a type 2 route an­nounc­ing the lo­ca­tion of the 50:54:33:00:00:0a MAC ad­dress for VNI 100:

> show route table bgp.evpn.0 receive-protocol bgp 203.0.113.2 extensive

bgp.evpn.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden)
* 2:203.0.113.2:100::0::50:54:33:00:00:0a/304 MAC/IP (1 entry, 1 announced)
     Accepted
     Route Distinguisher: 203.0.113.2:100
     Route Label: 100
     ESI: 00:00:00:00:00:00:00:00:00:00
     Nexthop: 203.0.113.2
     Localpref: 100
     AS path: I
     Communities: target:65000:268435556 encapsulation:vxlan(0x8)
[…]

With FRR, you can get a sim­i­lar out­put with vtysh:

# show bgp l2vpn evpn route
BGP table version is 0, local router ID is 203.0.113.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
EVPN type-2 prefix: [2]:[ESI]:[EthTag]:[MAClen]:[MAC]
EVPN type-3 prefix: [3]:[EthTag]:[IPlen]:[OrigIP]

   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 203.0.113.2:100
*>i[2]:[0]:[0]:[48]:[50:54:33:00:00:0a]
                    203.0.113.2                   100      0 i
*>i[2]:[0]:[0]:[48]:[50:54:33:00:00:0b]
                    203.0.113.2                   100      0 i
*>i[3]:[0]:[32]:[203.0.113.2]
                    203.0.113.2                   100      0 i
Route Distinguisher: 203.0.113.2:200
*>i[3]:[0]:[32]:[203.0.113.2]
                    203.0.113.2                   100      0 i
[…]

With GoBGP, use the fol­low­ing command:

# gobgp global rib -a evpn | grep rd:203.0.113.2:200
    Network  Next Hop             AS_PATH              Age        Attrs
*>  [type:macadv][rd:203.0.113.2:100][esi:single-homed][etag:0][mac:50:54:33:00:00:0a][ip:<nil>][labels:[100]]203.0.113.2                               00:00:17   [{Origin: i} {LocalPref: 100} {Extcomms: [VXLAN], [65000:268435556]}]
*>  [type:macadv][rd:203.0.113.2:100][esi:single-homed][etag:0][mac:50:54:33:00:00:0b][ip:<nil>][labels:[100]]203.0.113.2                               00:00:17   [{Origin: i} {LocalPref: 100} {Extcomms: [VXLAN], [65000:268435556]}]
*>  [type:macadv][rd:203.0.113.2:200][esi:single-homed][etag:0][mac:50:54:33:00:00:0a][ip:<nil>][labels:[200]]203.0.113.2                               00:00:17   [{Origin: i} {LocalPref: 100} {Extcomms: [VXLAN], [65000:268435656]}]
*>  [type:multicast][rd:203.0.113.2:100][etag:0][ip:203.0.113.2]203.0.113.2                               00:00:17   [{Origin: i} {LocalPref: 100} {Extcomms: [VXLAN], [65000:268435556]}]
*>  [type:multicast][rd:203.0.113.2:200][etag:0][ip:203.0.113.2]203.0.113.2                               00:00:17   [{Origin: i} {LocalPref: 100} {Extcomms: [VXLAN], [65000:268435656]}]

Received routes#

Each VTEP should have re­ceived the type 2 and type 3 routes from its fel­low VTEPs, through the route re­flec­tors. You can check with the show bgp l2vpn evpn route com­mand of vtysh.

Does FRR cor­rectly un­der­stand the re­ceived routes? The type 3 routes are trans­lated to an as­so­ci­a­tion be­tween the re­mote VTEPs and the VNIs:

# show evpn vni
Number of VNIs: 2
VNI        VxLAN IF              VTEP IP         # MACs   # ARPs   Remote VTEPs
100        vxlan100              203.0.113.2     4        0        203.0.113.3
                                                                   203.0.113.1
200        vxlan200              203.0.113.2     3        0        203.0.113.3
                                                                   203.0.113.1

The type 2 routes are trans­lated to an as­so­ci­a­tion be­tween the re­mote MACs and the re­mote VTEPs:

# show evpn mac vni 100
Number of MACs (local and remote) known for this VNI: 4
MAC               Type   Intf/Remote VTEP      VLAN
50:54:33:00:00:09 remote 203.0.113.1
50:54:33:00:00:0a local  eth1.100
50:54:33:00:00:0b local  eth2.100
50:54:33:00:00:0c remote 203.0.113.3

FDB configuration#

The last step is to en­sure FRR has cor­rectly pro­vided the re­ceived in­for­ma­tion to the ker­nel. This can be checked with the bridge command:

# bridge fdb show dev vxlan100 | grep dst
00:00:00:00:00:00 dst 203.0.113.1 self permanent
00:00:00:00:00:00 dst 203.0.113.3 self permanent
50:54:33:00:00:0c dst 203.0.113.3 self
50:54:33:00:00:09 dst 203.0.113.1 self

All good! The first two lines are the trans­la­tion of the type 3 routes (any BUM frame will be sent to both 203.0.113.1 and 203.0.113.3) and the two last ones are the trans­la­tion of the type 2 routes.

Interoperability#

One of the strengths of BGP EVPN is the in­ter­op­er­abil­ity with other net­work ven­dors. To demon­strate it works as ex­pected, we will con­fig­ure a Ju­niper vMX 16.1R1.7 to act as a VTEP.

Up­date (2018-04)

You need to add the fol­low­ing patches for FRR un­less you use ver­sion 6.0 or later: bgpd: add an op­tion for RT auto-deriva­tion to use RFC 8635 and bgpd: add ba­sic sup­port for ETI and ESI for BGP EVPN. You also need to en­able the autort rfc8365-compatible flag in FRR.

First, we need to con­fig­ure the phys­i­cal bridge.9 This is sim­i­lar to the use of ip link and brctl with Linux. We only con­fig­ure one phys­i­cal in­ter­face with two old-school VLANs paired with match­ing VNIs.

interfaces {
    ge-0/0/1 {
        unit 0 {
            family bridge {
                interface-mode trunk;
                vlan-id-list [ 100 200 ];
            }
        }
    }
}
routing-instances {
    switch {
        instance-type virtual-switch;
        interface ge-0/0/1.0;
        bridge-domains {
            vlan100 {
                domain-type bridge;
                vlan-id 100;
                no-arp-suppression;
                vxlan {
                    vni 100;
                    # Do not enable "ingress-node-replication"
                }
            }
            vlan200 {
                domain-type bridge;
                vlan-id 200;
                no-arp-suppression;
                vxlan {
                    vni 200;
                    # Do not enable "ingress-node-replication"
                }
            }
        }
    }
}

Then, we con­fig­ure BGP EVPN to ad­ver­tise all known VNIs. The con­fig­u­ra­tion is quite sim­i­lar to the one we did with FRR:

protocols {
    bgp {
        group fabric {
            type internal;
            multihop;
            family evpn signaling;
            local-address 203.0.113.3;
            neighbor 203.0.113.253;
            neighbor 203.0.113.254;
        }
    }
}

routing-instances {
    switch {
        vtep-source-interface lo0.0;
        route-distinguisher 203.0.113.3:1; # ❶
        vrf-target {
            target:65000:1;
            auto;
        }
        protocols {
            evpn {
                encapsulation vxlan;
                extended-vni-list all;
                multicast-mode ingress-replication;
            }
        }
    }
}

routing-options {
    router-id 203.0.113.3;
    autonomous-system 65000;
}

The routes sent by this con­fig­u­ra­tion are very sim­i­lar to the routes sent by FRR. The main dif­fer­ences are:

  • on Junos, the route dis­tin­guisher is con­fig­ured stat­i­cally (in ❶); and
  • on Junos, the VNI is also en­coded as an Eth­er­net tag ID.

Here is a type 3 route, as sent by Junos:

> show route table bgp.evpn.0 receive-protocol bgp 203.0.113.3 extensive

bgp.evpn.0: 13 destinations, 13 routes (13 active, 0 holddown, 0 hidden)
* 3:203.0.113.3:1::100::203.0.113.3/304 IM (1 entry, 1 announced)
     Accepted
     Route Distinguisher: 203.0.113.3:1
     Nexthop: 203.0.113.3
     Localpref: 100
     AS path: I
     Communities: target:65000:268435556 encapsulation:vxlan(0x8)
     PMSI: Flags 0x0: Label 6: Type INGRESS-REPLICATION 203.0.113.3
[…]

Here is a type 2 route:

> show route table bgp.evpn.0 receive-protocol bgp 203.0.113.3 extensive

bgp.evpn.0: 13 destinations, 13 routes (13 active, 0 holddown, 0 hidden)
* 2:203.0.113.3:1::200::50:54:33:00:00:0f/304 MAC/IP (1 entry, 1 announced)
     Accepted
     Route Distinguisher: 203.0.113.3:1
     Route Label: 200
     ESI: 00:00:00:00:00:00:00:00:00:00
     Nexthop: 203.0.113.3
     Localpref: 100
     AS path: I
     Communities: target:65000:268435656 encapsulation:vxlan(0x8)
[…]

We can check that the vMX is able to make sense of the routes it re­ceives from its peers run­ning FRR:

> show evpn database l2-domain-id 100
Instance: switch
VLAN  DomainId  MAC address        Active source                  Timestamp        IP address
     100        50:54:33:00:00:0c  203.0.113.1                    Apr 30 12:46:20
     100        50:54:33:00:00:0d  203.0.113.2                    Apr 30 12:32:42
     100        50:54:33:00:00:0e  203.0.113.2                    Apr 30 12:46:20
     100        50:54:33:00:00:0f  ge-0/0/1.0                     Apr 30 12:45:55

On the other end, if we look at one of the FRR-based VTEP, we can check the re­ceived routes are cor­rectly un­derstood:

# show evpn vni 100
VNI: 100
 VxLAN interface: vxlan100 ifIndex: 9 VTEP IP: 203.0.113.1
 Remote VTEPs for this VNI:
  203.0.113.3
  203.0.113.2
 Number of MACs (local and remote) known for this VNI: 4
 Number of ARPs (IPv4 and IPv6, local and remote) known for this VNI: 0
# show evpn mac vni 100
Number of MACs (local and remote) known for this VNI: 4
MAC               Type   Intf/Remote VTEP      VLAN
50:54:33:00:00:0c local  eth1.100
50:54:33:00:00:0d remote 203.0.113.2
50:54:33:00:00:0e remote 203.0.113.2
50:54:33:00:00:0f remote 203.0.113.3

Get in touch if you have some suc­cess with other vendors!

Up­date (2018-03)

BGP EVPN is also able to han­dle mul­ti­homed Eth­er­net seg­ments: a link ag­gre­gate can span over sev­eral VTEPs. While this is sup­ported by Ju­niper, FRR does not sup­port such setup and ig­nores re­mote mul­ti­homed seg­ments. For more de­tails about a com­plete Ju­niper setup, have a look at Alexan­der Grig­orenko’s “EVPN-VXLAN lab” se­ries as well as the whitepa­per from Juniper.

Up­date (2020-11)

Ini­tial sup­port for mul­ti­hom­ing has been added to FRR 7.5. I would ad­vise wait­ing for a cou­ple of re­leases for the fea­ture set to be complete.