Mikrotik VXLAN over OSPF implementation

Implementing VXLAN (Virtual Extensible LAN) on a Mikrotik router can be a complex task that requires a good understanding of networking concepts and Mikrotik RouterOS. VXLAN is often used for overlay network virtualization, enabling you to create virtual Layer 2 networks over an existing Layer 3 infrastructure. Just like EoIP, VXLAN allows you to extend your layer2 network over a layer3 network.

In this article, I will share a high-level guide on how to implement VXLAN on a MikroTik router for connecting two offices of a customer together. Please note that VXLAN is only available on RouterOS versions 7.0 and above and I am assuming you have a basic knowledge of Mikrotik RouterOS and networking principles.

Underlay Design

For this implementation, my layer3 network will be configured for full convergence using OSPF. The routers will be configured with IP addresses and OSPF will be configured for reachability. I will configure interface IP addresses and routing on the core, edge and Virtual endpoint routers. I will show the procedure for accomplishing this on one of the routers. Note that no IP address will be assigned to the interfaces connecting to customers. See commands below

Interface loopback0/
Ip add add add=1.1.1.1/32 interface=loopback0
Ip add add add=192.168.1.1/30 interface=ether1
Routing ospf/
instance add name=instance0
area add name=area0  area-id=0.0.0.0 instance=instance0
interface-template add interface=ether1 area=area0 network-type=ptp
interface-template add interface=loopback0 area=area0 network-type=ptp

Repeat the steps above on all the routers for full convergence and reachability.

Overlay Configuration (VXLAN)

interface vxlan/
add name=Abj_Lag vni=100
interface vxlan vteps/
add interface=Abj_Lag remote-ip=2.2.2.2
interface bridge add name=vxlan1
interface bridge port/
add interface=ether2 bridge=vxlan1
add interface=Abj_Lag bridge=vxlan1

Test for reachability

Assign IP addresses from the same subnet to the customer devices and test for reachability by simply running a ping test from one device to the other.

You may also like: Cisco layer2 MPLS with l2tpv3 implementation made easy

If you enjoyed this tutorial, please subscribe to this blog to receive my posts via email. Also subscribe to my YouTube channel, like my Facebook page and follow me on Twitter.

Spread the love

Leave a Comment