Friday, October 7, 2016

mpls and vpls on mikrotik

1- network diagram
              ---------------- ------------------vpls---------------------------
              |                                                                                 |
client1---|----> (e2)R1(e1) -----(e1)R2(e2) -----(e1)R3(e2) <--|--- client2
                                     -------------mpls--------------             


r1: 10.0.0.0/30
r2: 10.0.0.0/30, 10.0.1.0/30
r3: 10.0.1.0/30
client1 and client2: 192.168.200.0/24


***R1

/ interface bridge add name="lo"

/ ip address add address=10.0.1.251/32 interface=lo
/ ip address add address=10.0.0.1/30 interface=ether1

/ routing ospf network add network=10.0.0.0/23 area=backbone

/ mpls ldp set lsr-id=10.0.1.251 transport-address=10.0.1.251 enabled=yes
/ mpls ldp interface add interface=ether1 

/ interface vpls add name=vpls1 remote-peer=10.0.1.253 mac-address=00:00:00:00:00:01 vpls-id=0:2 disabled=no

/ interface bridge add name="c1"
/ interface bridge port add interface=ether2 bridge=c1 
/ interface bridge port add interface=vpls1 bridge=c1



***R2
/ interface bridge add name="lo"

/ ip address add address=10.0.1.252/32 interface=lo
/ ip address add address=10.0.0.2/30 interface=ether1
/ ip address add address=10.0.1.2/30 interface=ether1

/ routing ospf network add network=10.0.0.0/23 area=backbone

/ mpls ldp set lsr-id=10.0.1.252 transport-address=10.0.1.252 enabled=yes
/ mpls ldp interface add interface=ether1 
/ mpls ldp interface add interface=ether2 


***R3
/ interface bridge add name="lo"

/ ip address add address=10.0.1.253/32 interface=lo
/ ip address add address=10.0.1.1/30 interface=ether1

/ routing ospf network add network=10.0.0.0/23 area=backbone

/ mpls ldp set lsr-id=10.0.1.253 transport-address=10.0.1.253 enabled=yes
/ mpls ldp interface add interface=ether1 

/ interface vpls add name=vpls1 remote-peer=10.0.1.251 mac-address=00:00:00:00:00:03 vpls-id=0:2 disabled=no

/ interface bridge add name="c1"
/ interface bridge port add interface=ether2 bridge=c1 
/ interface bridge port add interface=vpls1 bridge=c1 



Now correct client1 to R1, ether2 and client2 to R3, ether2, and assign ip in subnet 192,168.200.0/24, they both will be able to communicate with each other as if they both on the same ethernet networks,


*** Note
- if you test on virtualbox,  use udp tunnel networking on the network that connect from client1 to R1, and client2 to R3, follow the link below for setup udp tunneling
http://www.atechnote.com/2016/10/configure-virtual-box-to-using-udp.html


- vmware seems not work.



No comments:

Post a Comment