For most enterprises with many distributed remote offices/outlets, the remote sites are usually connected back to the HQ/DC network via layer-3 IP networks, either through the public Internet, 4G/5G, MPLS, or private leased-line, etc.
Traditional SD-WAN solutions are optimized for Layer-3 (IP) connectivity. However, some deployments require Layer-2 extension across geographically distributed sites, such as:
Extending VLANs across branches
Preserving broadcast-based services (DHCP, legacy protocols)
Supporting VM mobility or industrial automation networks
"L2 over SD-WAN" (aka "L2VPN over SD-WAN") addresses this type of requirements, by encapsulating Ethernet frames inside VXLAN tunnels, while using MP-BGP EVPN as the control plane to dynamically distribute MAC and VLAN reachability information. It also creates traffic isolation and enhances network security, so that the WAN links can make use of default routing table/underlay for establishing tunnel connectivity, while the LAN devices (together with tunnels) are communicating directly through a private VLAN, isolating from external reachability (similar to "VRF over SD-WAN" but in layer-2 mode).
Common use cases for "L2 over SD-WAN" include:
Factory automation networks
Retail chains with centralized services
Maritime / transportation systems
VM or container mobility across sites
We will use below topology to elaborate the configuration guide.
In this scenario, we will
Use system default routing table to establish VPN tunnels. Configure WAN failover between links, if there's redundancy.
Bridge VPN tunnel to LAN interface.
Permit Any-to-Any access between branches (note traffic will still route through gateway side).
Underlying technologies:
Use multipoint VXLAN as the encapsulation tunnel for layer-2 LAN extension.
Use multipoint GRE tunnel for BGP peering.
Use BGP-EVPN to exchange MAC/VLAN mapping.
Use WireGuard tunnel for outer layer encryption.
As per typical RansNet SD-WAN configuration, must of the settings are done on the gateway and just assign branch to the VPN instance to auto push configurations to all devices. CLI sample snips are for references and expert mode only.
Step 1: Prepare and enable LAN interfaces for all routers (gateway and branch). In this case we use VLAN1 for the LAN segment. There's no need to configure any other setting since it's just a layer-2 interface and it will be bridged to VPN later.
Step 2: Configure SD-WAN --> VPN Instance. Set SD-WAN parameters, and bridge the VXLAN (tunnel) interface to the LAN interface.
Step 3: Assign branch routers to the VPN instance
CLI Configuration Snip (on the gateway)
Below are the relevant gateway CLI configs (generated by mfusion).
NOTE: For testing & verification purpose, we configured IP on the br1 interface so that we can ping routers directly using bridge interface. In real life deployment, this is not necessary. You just need to configure LAN devices to be in the same subnet (can be any IP/network), and they'll be able to communicate directly, as if they're attached to a large virtual layer-2 switch.
Verifications
On the branch router, we just need to prepare VLAN1 interface (as per Step #1 above), and ensure the necessary network and firewall settings are in place.
All other related VPN/SD-WAN configs will be auto generated from previous gateway configuration steps.
CLI Configuration Snip
Verifications
Some customers may require IPSec as the encryption protocol for compliance reasons. You just need to choose "IPSec" as the VPN protocol in step #2 above, then mfusion will auto generate the respective configurations using IPSec.
Below is a CLI snip for the gateway
interface eth0 description "Default connection to WAN" enable ip address dhcp!interface gre1 tunnel local 10.1.168.1 enable ip address 10.1.172.1/22 ip map 10.1.172.2 10.1.168.2 ip map 10.1.172.3 10.1.168.3!interface lo enable ip address 10.1.168.1/32!interface vxlan1 description "Auto Interface from VPN (1)" vx-local 10.1.172.1 enable bridge-group 1!interface vlan 1 1 enable bridge-group 1!interface bridge br1 description "Auto Interface from IPSec VPN (1)" enable!ipsec ike-policy 1 authentication psk policy AES SHA 5!ipsec esp-policy 1 policy AES SHA 5!ipsec peer b0-bb-8b-00-e7-a8 local-net 10.1.168.1/32 remote-id b0-bb-8b-00-e7-a8 remote-ip any remote-net 10.1.168.2/32 policy ike 1 esp 1 psk xxx!ipsec peer b0-bb-8b-00-ea-20 local-net 10.1.168.1/32 remote-id b0-bb-8b-00-ea-20 remote-ip any remote-net 10.1.168.3/32 policy ike 1 esp 1 psk xxx!router bgp 65051 bgp timer 5 15 neighbor 0168_RansNet_SSL2IPSEC_1 as-peer neighbor 0168_RansNet_SSL2IPSEC_1 as-remote 65051 neighbor 0168_RansNet_SSL2IPSEC_1 next-hop-self neighbor 0168_RansNet_SSL2IPSEC_1 route-reflector-client neighbor 0168_RansNet_SSL2IPSEC_1 soft-reconfiguration neighbor 0168_RansNet_SSL2IPSEC_1 weight 0 neighbor range 10.1.172.0/22 as-peer 0168_RansNet_SSL2IPSEC_1 address-family-l2vpn advertise-all-vni neighbor 0168_RansNet_SSL2IPSEC_1 activate neighbor 0168_RansNet_SSL2IPSEC_1 route-reflector-client neighbor 0168_RansNet_SSL2IPSEC_1 soft-reconfiguration!Below is a CLI snip for the branch
!interface gre1 tunnel local 10.1.168.2 remote 10.1.168.1 enable ip address 10.1.172.2/22!interface lo enable ip address 10.1.168.2/32!interface vxlan1 description "Auto Interface from VPN (1)" vx-local 10.1.172.2 enable bridge-group 1!interface vlan 1 1 description "Default VLAN for all LAN ports" enable bridge-group 1!interface bridge br1 description "Auto Interface from IPSec VPN (1)" bridge enable!ipsec ike-policy 1 authentication psk policy AES SHA 5!ipsec esp-policy 1 policy AES SHA 5!ipsec peer 10.18.18.194 local-id b0-bb-8b-00-e7-a8 local-net 10.1.168.2/32 remote-net 10.1.168.1/32 policy ike 1 esp 1 psk xxx!router bgp 65051 bgp timer 5 15 neighbor 0168_RansNet_SSL2IPSEC_1 as-peer neighbor 0168_RansNet_SSL2IPSEC_1 as-remote 65051 neighbor 0168_RansNet_SSL2IPSEC_1 next-hop-self neighbor 0168_RansNet_SSL2IPSEC_1 soft-reconfiguration neighbor 0168_RansNet_SSL2IPSEC_1 weight 0 neighbor 0168_RansNet_SSL2IPSEC_11 as-peer neighbor 0168_RansNet_SSL2IPSEC_11 as-remote 65051 neighbor 0168_RansNet_SSL2IPSEC_11 next-hop-self neighbor 0168_RansNet_SSL2IPSEC_11 soft-reconfiguration neighbor 0168_RansNet_SSL2IPSEC_11 weight 0 neighbor 10.1.172.1 as-peer 0168_RansNet_SSL2IPSEC_1 address-family-l2vpn advertise-all-vni neighbor 0168_RansNet_SSL2IPSEC_1 activate neighbor 0168_RansNet_SSL2IPSEC_1 route-reflector-client neighbor 0168_RansNet_SSL2IPSEC_1 soft-reconfiguration!