Juniper Junos BGP-EVPN Signaling for VXLAN Data Center Interconnect

In this lab walkthrough, we build a dual-datacenter VXLAN overlay fabric controlled by BGP-EVPN signaling across Juniper vQFX leaf switches and vMX spine/transport routers.

Lab Topology & Data Center Interconnect Requirements

Juniper vMX and vQFX BGP-EVPN VXLAN topology: OSPF Area 0 + MPLS/LDP underlay carrying iBGP EVPN signaling and VXLAN VNI 100/200 tunnels between vQFX-RE5 and vQFX-RE6
Figure 1: Dual-DC Juniper vMX underlay and vQFX BGP-EVPN VXLAN overlay topology.

Key Design Requirements:

  • Interconnect DC-A and DC-B over a routed local-loop backbone link into a unified transport domain.
  • Stretch Layer-2 broadcast domains (cust / cust2) seamlessly across both sites while providing distributed Anycast Layer-3 IRB gateways.

Why Choose BGP-EVPN + VXLAN over VPLS or L2Circuit?

Three common technologies solve Layer-2 extension across routed cores:

  • VPLS: Capable, but full-mesh signaling overhead and split-horizon rules impose rigid topology constraints, and support varies widely across L3 switches.
  • MPLS L2Circuit (Pseudowire): Ideal for point-to-point transparent leased lines (see our Juniper Junos MPLS L2Circuit Guide), rather than multi-tenant multi-VLAN fabrics.
  • BGP-EVPN + VXLAN: Decouples the control plane (MP-BGP EVPN) from UDP-encapsulated data-plane tunnels, preserves strict VLAN/VNI tenant isolation, supports distributed Anycast IRB routing, and enjoys broad native hardware support.

1. Configuring the Underlay Network (OSPF + MPLS/LDP)

First, bring up the routed underlay with OSPF Area 0 so both VTEP loopbacks (10.0.0.1 and 10.0.0.4) are reachable. Note: Pure VXLAN only requires IP reachability in the underlay, but we also enable family mpls and LDP here to keep the lab ready for subsequent MPLS L2Circuit exercises. Remember to set physical interface MTU to 9000 (or at least > 1550 bytes) before configuring the overlay.

root> show system rollback compare 4 0
[edit]
+  interfaces {
+      ge-0/0/0 {
+          unit 0 {
+              family inet {
+                  address 192.0.2.1/24;
+              }
+              family mpls;
+          }
+      }
+      ge-0/0/1 {
+          unit 0 {
+              family inet {
+                  address 192.0.1.2/24;
+              }
+              family mpls;
+          }
+      }
+      lo0 {
+          unit 0 {
+              family inet {
+                  address 10.0.0.2/32;
+              }
+          }
+      }
+  }
+  protocols {
+      mpls {
+          interface ge-0/0/0.0;
+          interface ge-0/0/1.0;
+      }
+      ospf {
+          area 0.0.0.0 {
+              interface ge-0/0/0.0;
+              interface ge-0/0/1.0;
+              interface lo0.0;
+          }
+      }
+      ldp {
+          transport-address 10.0.0.2;
+          interface ge-0/0/0.0;
+          interface ge-0/0/1.0;
+      }
+  }
root> show system rollback compare 3 0
[edit]
+  interfaces {
+      ge-0/0/0 {
+          unit 0 { 
+              family inet {
+                  address 192.0.2.2/24;
+              }
+              family mpls;
+          }
+      }
+      ge-0/0/1 {
+          unit 0 {
+              family inet {
+                  address 192.0.3.1/24;
+              }
+              family mpls;
+          }
+      }
+      lo0 {
+          unit 0 {
+              family inet {
+                  address 10.0.0.3/32;
+              }
+          }
+      }
+  }
+  protocols {
+      mpls {
+          interface ge-0/0/0.0;
+          interface ge-0/0/1.0;
+      }
+      ospf {
+          area 0.0.0.0 {
+              interface lo0.0;
+              interface ge-0/0/0.0;
+              interface ge-0/0/1.0;
+          }
+      }
+      ldp {
+          transport-address 10.0.0.3;
+          interface ge-0/0/0.0;
+          interface ge-0/0/1.0;
+      }
+  }
root@vqfx-re> show configuration interfaces xe-0/0/0
unit 0 {
    family ethernet-switching {
        interface-mode access;
        vlan {
            members cust;
        }
    }
}

{master:0}
root@vqfx-re> show configuration interfaces xe-0/0/2
unit 0 {
    family ethernet-switching {
        interface-mode access;
        vlan {
            members cust2;
        }
    }
}

{master:0}
root@vqfx-re> show configuration interfaces lo0
unit 0 {
    family inet {
        address 10.0.0.1/32;
    }
}

{master:0}
root@vqfx-re> show configuration interfaces irb
unit 100 {
    family inet {
        address 10.10.10.253/24 {
            virtual-gateway-address 10.10.10.1;
        }
    }
}
unit 200 {
    family inet {
        address 10.10.20.253/24 {
            virtual-gateway-address 10.10.20.1;
        }
    }
}

{master:0}
root@vqfx-re> show configuration vlans
cust {
    vlan-id 100;
    l3-interface irb.100;
}
cust2 {
    vlan-id 200;
    l3-interface irb.200;
}

{master:0}
root@vqfx-re> show configuration protocols ospf
area 0.0.0.0 {
    interface xe-0/0/1.0;
    interface lo0.0;
}

{master:0}
root@vqfx-re> show configuration protocols ldp
transport-address 10.0.0.1;
interface xe-0/0/1.0;

{master:0}
root@vqfx-re> show configuration protocols mpls
interface xe-0/0/1.0;
root@vqfx-re> show configuration interfaces xe-0/0/0
unit 0 {
    family ethernet-switching {
        interface-mode access;
        vlan {
            members cust2;
        }
    }
}

{master:0}
root@vqfx-re> show configuration interfaces xe-0/0/2
unit 0 {
    family ethernet-switching {
        interface-mode access;
        vlan {
            members cust;
        }
    }
}

{master:0}
root@vqfx-re> show configuration interfaces lo0
unit 0 {
    family inet {
        address 10.0.0.4/32;
    }
}

{master:0}
root@vqfx-re> show configuration interfaces irb
unit 100 {
    family inet {
        address 10.10.10.254/24 {
            virtual-gateway-address 10.10.10.1;
        }
    }
}
unit 200 {
    family inet {
        address 10.10.20.254/24 {
            virtual-gateway-address 10.10.20.1;
        }
    }
}

{master:0}
root@vqfx-re> show configuration vlans
cust {
    vlan-id 100;
    l3-interface irb.100;
    vxlan {
        vni 100;
        ingress-node-replication;
    }
}
cust2 {
    vlan-id 200;
    l3-interface irb.200;
    vxlan {
        vni 200;
        ingress-node-replication;
    }
}

{master:0}
root@vqfx-re> show configuration protocols ospf
area 0.0.0.0 {
    interface lo0.0;
    interface xe-0/0/1.0;
}

{master:0}
root@vqfx-re> show configuration protocols ldp
transport-address 10.0.0.4;
interface xe-0/0/1.0;

{master:0}
root@vqfx-re> show configuration protocols mpls
interface xe-0/0/1.0;

Verify LDP neighbors on both vMX routers and confirm end-to-end VTEP loopback reachability from DC-A QFX (10.0.0.1) to DC-B QFX (10.0.0.4):

# DC-A vMX
root> show ldp neighbor
Address                             Interface       Label space ID     Hold time
192.0.2.2                           ge-0/0/0.0      10.0.0.3:0           10
192.0.1.1                           ge-0/0/1.0      10.0.0.1:0           14

# DC-B vMX
root> show ldp neighbor
Address                             Interface       Label space ID     Hold time
192.0.2.1                           ge-0/0/0.0      10.0.0.2:0           11
192.0.3.2                           ge-0/0/1.0      10.0.0.4:0           13

# DC-A QFX
root@vqfx-re> ping 10.0.0.4 source 10.0.0.1
PING 10.0.0.4 (10.0.0.4): 56 data bytes
64 bytes from 10.0.0.4: icmp_seq=0 ttl=62 time=133.250 ms
64 bytes from 10.0.0.4: icmp_seq=1 ttl=62 time=147.078 ms
64 bytes from 10.0.0.4: icmp_seq=2 ttl=62 time=100.059 ms
^C
--- 10.0.0.4 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 100.059/126.796/147.078/19.731 ms

2. Configuring the Overlay: BGP-EVPN Signaling & VXLAN

Now configure the iBGP EVPN session in AS 65000, enable VXLAN encapsulation under protocols evpn, assign per-VNI export route targets, and attach the import policy inside switch-options:

root@vqfx-re> show system rollback compare 2 0
[edit]
+  routing-options {
+      router-id 10.0.0.1;
+      autonomous-system 65000;
+  } // Configure BGP router-id and local ASN
[edit protocols]
+   bgp {
+       group evpn {
+           type internal;
+           local-address 10.0.0.1;
+           family evpn {
+               signaling;
+           }
+           neighbor 10.0.0.4;
+       }
+   } // Enable EVPN signaling to exchange MAC/IP routes and build VTEP tunnels
+   evpn {
+       encapsulation vxlan; // Set EVPN data-plane encapsulation to VXLAN
+       extended-vni-list all; // Advertise all VNIs (can be scoped to specific VNIs)
+       multicast-mode ingress-replication;
+       vni-options {
+           vni 100 {
+               vrf-target export target:65000:100; // Export VNI 100 routes with target:65000:100
+           }
+           vni 200 {
+               vrf-target export target:65000:200; // Export VNI 200 routes with target:65000:200
+           }
+       }
+   }
[edit]
+  policy-options {
+      policy-statement evpn-import {
+          term 100 {
+              from community v100;
+              then accept;
+          } // Import VNI 100 EVPN routes
+          term 200 {
+              from community v200;
+              then accept;
+          } // Import VNI 200 EVPN routes
+          term 999 {
+              then reject;
+          }
+      }
+      community v100 members target:65000:100;
+      community v200 members target:65000:200;
+  } // Define VXLAN Route Target communities
+  switch-options {
+      service-id 1;
+      vtep-source-interface lo0.0; // Source VXLAN VTEP tunnels from lo0.0
+      route-distinguisher 10.0.0.1:1;
+      vrf-import evpn-import; // Filter incoming EVPN routes by target policy
+      vrf-target {
+          target:65000:1;
+          auto;
+      }
+  }
[edit vlans cust]
+    vxlan {
+        vni 100;
+        ingress-node-replication;
+    } // Bind VLAN cust to VNI 100
[edit vlans cust2]
+    vxlan {
+        vni 200;
+        ingress-node-replication;
+    }
root@vqfx-re> show system rollback compare 2 0
[edit]
+  routing-options {
+      router-id 10.0.0.4;
+      autonomous-system 65000;
+  }
[edit protocols]
+   bgp {
+       group evpn {
+           type internal;
+           local-address 10.0.0.4;
+           family evpn {
+               signaling;
+           }
+           neighbor 10.0.0.1;
+       }
+   }
+   evpn {
+       encapsulation vxlan;
+       extended-vni-list all;
+       multicast-mode ingress-replication;
+       vni-options {
+           vni 100 {
+               vrf-target export target:65000:100;
+           }
+           vni 200 {
+               vrf-target export target:65000:200;
+           }
+       }
+   }
[edit]
+  policy-options {
+      policy-statement evpn-import {
+          term 100 {
+              from community v100;
+              then accept;
+          }
+          term 200 {
+              from community v200;
+              then accept;
+          }
+          term 999 {
+              then reject;
+          }
+      }
+      community v100 members target:65000:100;
+      community v200 members target:65000:200;
+  }
+  switch-options {
+      service-id 1;
+      vtep-source-interface lo0.0;
+      route-distinguisher 10.0.0.4:1;
+      vrf-import evpn-import;
+      vrf-target {
+          target:65000:1;
+          auto;
+      }
+  }
[edit vlans cust]
+    vxlan {
+        vni 100;
+        ingress-node-replication;
+    }
[edit vlans cust2]
+    vxlan {
+        vni 200;
+        ingress-node-replication;
+    }

3. Verifying MAC Tables, EVPN Routes & L2/L3 Connectivity

Inspect show ethernet-switching table on both QFX leaves—remote host MAC addresses are dynamically learned over vtep.32769 pointing to the peer VTEP loopback:

root@vqfx-DC-A> show ethernet-switching table

MAC flags (S - static MAC, D - dynamic MAC, L - locally learned, P - Persistent static
           SE - statistics enabled, NM - non configured MAC, R - remote PE MAC, O - ovsdb MAC)


Ethernet switching table : 6 entries, 6 learned
Routing instance : default-switch
   Vlan                MAC                 MAC      Logical                Active
   name                address             flags    interface              source
   cust                00:50:00:00:09:00   D        xe-0/0/0.0
   cust                00:50:00:00:0c:00   D        vtep.32769             10.0.0.4
   cust                02:05:86:71:8b:00   D        vtep.32769             10.0.0.4
   cust2               00:50:00:00:0a:00   D        vtep.32769             10.0.0.4
   cust2               00:50:00:00:0b:00   D        xe-0/0/2.0
   cust2               02:05:86:71:8b:00   D        vtep.32769             10.0.0.4

{master:0}

root@vqfx-DC-B> show ethernet-switching table

MAC flags (S - static MAC, D - dynamic MAC, L - locally learned, P - Persistent static
           SE - statistics enabled, NM - non configured MAC, R - remote PE MAC, O - ovsdb MAC)


Ethernet switching table : 6 entries, 6 learned
Routing instance : default-switch
   Vlan                MAC                 MAC      Logical                Active
   name                address             flags    interface              source
   cust                00:50:00:00:09:00   D        vtep.32769             10.0.0.1
   cust                00:50:00:00:0c:00   D        xe-0/0/2.0
   cust                02:05:86:71:ce:00   D        vtep.32769             10.0.0.1
   cust2               00:50:00:00:0a:00   D        xe-0/0/0.0
   cust2               00:50:00:00:0b:00   D        vtep.32769             10.0.0.1
   cust2               02:05:86:71:ce:00   D        vtep.32769             10.0.0.1

{master:0}

Checking bgp.evpn.0 confirms that both MAC-only and MAC+IP EVPN Type-2 routes are synchronized via BGP-EVPN:

root@vqfx-DC-A> show route evpn-mac-address 00:50:00:00:0a:00 table bgp.evpn.0

bgp.evpn.0: 14 destinations, 14 routes (14 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

2:10.0.0.4:1::200::00:50:00:00:0a:00/304
                   *[BGP/170] 02:46:16, localpref 100, from 10.0.0.4
                      AS path: I, validation-state: unverified
                    > to 192.0.1.2 via xe-0/0/1.0, Push 299808
2:10.0.0.4:1::200::00:50:00:00:0a:00::10.10.20.100/304
                   *[BGP/170] 02:46:16, localpref 100, from 10.0.0.4
                      AS path: I, validation-state: unverified
                    > to 192.0.1.2 via xe-0/0/1.0, Push 299808

root@vqfx-DC-B> show route evpn-mac-address 00:50:00:00:09:00 table bgp.evpn.0

bgp.evpn.0: 14 destinations, 14 routes (14 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

2:10.0.0.1:1::100::00:50:00:00:09:00/304
                   *[BGP/170] 02:49:18, localpref 100, from 10.0.0.1
                      AS path: I, validation-state: unverified
                    > to 192.0.3.1 via xe-0/0/1.0, Push 299808
2:10.0.0.1:1::100::00:50:00:00:09:00::10.10.10.100/304
                   *[BGP/170] 02:49:18, localpref 100, from 10.0.0.1
                      AS path: I, validation-state: unverified
                    > to 192.0.3.1 via xe-0/0/1.0, Push 299808

Finally, verify ARP resolution and end-to-end forwarding on DC-A-Linux9 for both intra-VNI L2 bridging (10.10.10.101) and inter-VNI L3 routing via the IRB gateway (10.10.20.100):

root@DC-A-Linux9:~# ip nei
10.10.10.101 dev ens3 lladdr 00:50:00:00:0c:00 STALE
10.10.10.1 dev ens3 lladdr 00:00:5e:00:01:01 REACHABLE
10.10.10.253 dev ens3 lladdr 02:05:86:71:ce:00 STALE
// ARP table populated with remote host and Anycast IRB MACs

root@DC-A-Linux9:~# ping 10.10.10.101
PING 10.10.10.101 (10.10.10.101) 56(84) bytes of data.
64 bytes from 10.10.10.101: icmp_seq=1 ttl=64 time=69.3 ms
64 bytes from 10.10.10.101: icmp_seq=2 ttl=64 time=57.10 ms
64 bytes from 10.10.10.101: icmp_seq=3 ttl=64 time=72.9 ms
--- 10.10.10.101 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 4ms
rtt min/avg/max/mdev = 57.959/66.717/72.871/6.360 ms

root@DC-A-Linux9:~# ping 10.10.20.100
PING 10.10.20.100 (10.10.20.100) 56(84) bytes of data.
64 bytes from 10.10.20.100: icmp_seq=1 ttl=63 time=71.1 ms
64 bytes from 10.10.20.100: icmp_seq=2 ttl=63 time=52.3 ms
64 bytes from 10.10.20.100: icmp_seq=3 ttl=63 time=46.3 ms
--- 10.10.20.100 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 5ms
rtt min/avg/max/mdev = 46.340/56.552/71.054/10.538 ms
// Both VXLAN L2 bridging and VXLAN L3 IRB routing pass cleanly

root@DC-A-Linux9:~# mtr --report 10.10.20.100
Start: 2019-02-18T12:13:49+0000
HOST: DC-A-Linux9                   Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- 10.10.10.253               0.0%    10   21.8  27.8  21.8  36.3   5.1
  2.|-- 10.10.20.100               0.0%    10   82.0  71.0  47.3 108.7  22.1
// Cross-VNI path traversing local IRB L3 gateway

root@DC-A-Linux9:~# mtr --report 10.10.10.101
Start: 2019-02-18T12:14:34+0000
HOST: DC-A-Linux9                   Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- 10.10.10.101               0.0%    10   66.0  67.3  44.8 111.9  18.2
// Intra-VNI path bridged natively over VXLAN

Both VXLAN L2 and L3 paths show 0% packet loss, ready for production DCI deployment.

Summary: Controlling Per-VNI Membership with Route Targets

Every overlay fabric depends on a healthy, properly MTU-sized underlay. On the BGP-EVPN control plane, VPN Route Targets act in two directions:

  • Export Target: Attached via vni-options when advertising local EVPN routes (e.g., target:65000:100 for VNI 100 and target:65000:200 for VNI 200).
  • Import Target: Matched by evpn-import policy on receiving switches—only EVPN routes matching permitted targets are installed into the local MAC/VRF tables.

Adjusting the evpn-import policy on individual leaf switches therefore gives you fine-grained control over which VNIs (VLANs) are stretched to each datacenter rack.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.