Juniper MX204

Juniper MX: Simple static VXLAN configuration

Posted by

On most VXLAN deployments, you’ll want to be using EVPN to distribute MAC addresses between devices. However, if you’re doing something small such as wanting to span an L2 link across an L3 network (e.g. The Internet) then a simple static configuration is quick to do. In my case, I wanted to create an L2 circuit from a firewall, across The Internet, to a Linux based router.

Juniper MX manual VXLAN implementation uses flood-and-learn to discover MAC addresses. If a MAC address is not found in its table (show ethernet-switching table) then it will flood the packet to all statically configured VTEPs. Once it gets a packet from a particular MAC address, it will store that MAC address against the VTEP in its table and only send subsequent packets to that address. Broadcast and Multicast traffic is flooded to all VTEPs.

You’ll need to bridge a standard VLAN with a VXLAN VNI. Take the following network:

VXLAN Network

Servers are connected to a switch on VLAN 185. The switch is trunked to the MX on interface ae0. The MX’s loopback (lo0.0) IP is and you want to create a VXLAN VNI (185) to a Linux router at

First, configure your source interface as your loopback and configure your list of static VTEPs:

switch-options {
    vtep-source-interface lo0.0;
    remote-vtep-list [ ];

Next configure VLAN 185 on ae0 as a vlan-bridge interface:

interfaces {
    ae0 {
        encapsulation flexible-ethernet-services;
        unit 185 {
            description "My VXLAN";
            encapsulation vlan-bridge;
            vlan-id 185;

Now configure a bridge domain which bridges VLAN 185 on ae0 (ae0.185) with VXLAN VNI 185:

bridge-domains {
    my-vxlan {
        vlan-id 185;
        interface ae0.185;
        vxlan {
            vni 185;

And that’s it. You should now have a L2 tunnel between Servers and Linux Router.


  1. Do you know is this possible on a vMX I’m trying this and getting
    flexible-ethernet encapsulation not allowed on untagged interfaces

Leave a Reply to Wido den Hollander Cancel reply

Your email address will not be published. Required fields are marked *