Using Mikrotik MPLS with VPLS to connect two offices

In this demonstration, I will share with us on how to connect two offices together using Mikrotik MPLS with VPLS. This demonstration has been simplified to give readers the foundation they need to delve into the exciting world of Mikrotik MPLS with vpls.

Mikrotik MPLS with VPLS configuration, as used in this demonstration, will allow the use of mpls for packet-switching and vpls for transparent layer 2 commnunication between our branches. A lable-switching path (LSP) comprising of three Mikrotik routers will be created with OSPF as the igp. In a nutshell, this demonstration on how to setup a layer 2 mpls to connect two branch offices.

The objective of this lab is to allow transparent connection from PC1 to PC2. The customer does not need to see hops between branches.

Network Topology

mikrotik mpls with vpls

On P router

On the provider router, we assign IP addresses to interfaces, configure ospf for reachability, and finally, enable mpls and mpls ldp on participating interfaces. Let’s jump in!

Also read: How to implement Cisco L3 MPLS to connect four customer branches

Create a bridge for mpls ldp peering and assign IP addresses to interfaces.

/int bridge add name=loopback1

/ip add add address=1.1.1.1/32 interface=loopback1

add add address=192.168.10.1/30 interface=ether1

add add address=192.168.20.1/30 interface=ether2

Enable OSPF to advertise loopback and physical IP addresses

/routing ospf instance set [ find default=yes ] router-id=1.1.1.1

/routing ospf network

add area=backbone network=1.1.1.1/32

add area=backbone network=192.168.10.0/30

add area=backbone network=192.168.20.0/30

Enable mpls and mpls ldp on interfaces connecting to provider edge routers.

/mpls interface

set [ find default=yes ] interface=ether1

add interface=ether2

/mpls ldp set enabled=yes lsr-id=1.1.1.1 transport-address=1.1.1.1

/mpls ldp interface

add interface=ether1

add interface=ether2

/mpls ldp neighbor

add transport=2.2.2.2

add transport=3.3.3.3

 

On PE1 router

On the provider Edge 1 router, we will assign IP addresses, enable ospf, and setup mpls and mpls ldp. See commands below:

/int bridge add name=loopback1

/ip add add address=2.2.2.2/32 interface=loopback1

/ip add add address=192.168.10.2/30 interface=ether1

 

Enable OSPF to advertise loopback and physical IP addresses.

 

/routing ospf instance set [ find default=yes ] router-id=2.2.2.2

/routing ospf network

add area=backbone network=2.2.2.2/32

add area=backbone network=192.168.10.0/30

Enable mpls and mpls ldp on interfaces connecting to provider edge routers.

/mpls interface

set [ find default=yes ] interface=ether1

/mpls ldp set enabled=yes lsr-id=2.2.2.2 transport-address=2.2.2.2

/mpls ldp interface

add interface=ether1

/mpls ldp neighbor

add transport=1.1.1.1

 

On PE2 router

On the provider Edge 2 router, we will enter configuration commands similar to those of PE1 router. See commands below:

/int bridge add name=loopback1

/ip add add address=3.3.3.3/32 interface=loopback1

/ip add add address=192.168.20.2/30 interface=ether1

 

Enable OSPF to advertise loopback and physical IP addresses.

 

/routing ospf instance set [ find default=yes ] router-id=3.3.3.3

/routing ospf network

add area=backbone network=3.3.3.3/32

add area=backbone network=192.168.20.0/30

Enable mpls and mpls ldp on interfaces connecting to provider edge routers.

/mpls interface

set [ find default=yes ] interface=ether1

/mpls ldp set enabled=yes lsr-id=3.3.3.3 transport-address=3.3.3.3

/mpls ldp interface

add interface=ether1

/mpls ldp neighbor

add transport=1.1.1.1

At this point, our lsp is fully established with labels to advertised destinations. Let’s see the mpls forwarding-table of PE1 router.

mikrotik mpls with vpls

The image above shows the labels that have been assigned to reach networks 1.1.1.1/32, 192.168.20.0/30 and 3.3.3.3/32. All three networks are reachable through ether1. Everything looks good. Now, let’s enable vpls on PE1 and PE2 routers to enable PC1 and PC1 establish transparent connection to each other.

On PE1 router

We will first of all create a vpls interface, then create a bridge interface and add both the vpls interface and the interface faccing PC1 to the bridge. Note that no IP address was configured on the interface connecting the customer. See commands below:

/interface vpls

add comment="INEC-PHC" disabled=no l2mtu=1500 name="INEC-PHC" remote-peer=3.3.3.3 vpls-id=10:0

/interface bridge add name=INEC-VPLS

/interface bridge port

add bridge="INEC-VPLS" interface=ether2

add bridge="INEC-VPLS" interface="INEC-PHC"

On PE2 router

/interface vpls

add comment="INEC-LAG" disabled=no l2mtu=1500 name="INEC-PHC" remote-peer=2.2.2.2 vpls-id=10:0

/interface bridge add name=INEC-VPLS

/interface bridge port

add bridge="INEC-VPLS" interface=ether2

add bridge="INEC-VPLS" interface="INEC-LAG"

 

Verification

To verify this configuration, we will assign IP addresses from the same network to PC1 and PC2 and try to ping across. PC1 has been assigned the IP 192.168.1.1/24 while PC2 has been assigned 192.168.1.2/24. Let’s verify.

mikrotik mpls with vpls

From the image above, we can see that the IP on PC1 is 192.168.1.1. We can also see the results of traceroute and ping tests to PC2.

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

Spread the love

3 thoughts on “Using Mikrotik MPLS with VPLS to connect two offices

  • April 23, 2019 at 8:27 am
    Permalink

    Hello Sir,

    Can you tell how to use two internet line in Mikrotrik CCR router . i am looking for my office using two different internet line.

    Reply
    • April 23, 2019 at 11:55 am
      Permalink

      In what mode? Automatic failover or load-balancing?

      Reply

Leave a Reply

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