VxLAN over MPLS in GNS3

undefinednetworking
3 min readDec 3, 2018

This article provides a quick guide on how to setup VxLAN over MPLS in GNS3.

Topology for the lab is as shown below -

VxLAN over MPLS lab

To get started check that you have pre-reuisites installed /downloaded

  1. GNS3 installation
  2. Virtualbox installation
  3. mininet virtualbox image
  4. wireshark

Once you have got the basic installations complete —

  1. Start the mininet VM with interface in NAT/Bridged Adapter mode and download the mininet VXlan demo topology from dropbox into the mininet VM.
  2. Clone the VM.
  3. Change the network setting of mininet VM to not attached. Configure static ip address to 192.168.10.2 on first VM and set the default gateway to 192.168.10.1
  4. Change the Network setting of the mininet clone Vm to not attached. Configure static ip address to 192.168.50.2 on first VM and set the default gateway to 192.168.50.5
ifconfig eth0 192.168.50.2 netmask 255.255.255.0
route add default gw 192.168.50.5 eth0

5. Get the gns3 working with image c3640-jk9s-mz.124–16.image.

6. Clone the vxlangnsdemo git repository

7. Import the gns3 project into the gns3

8. Import the mininet and mininet clone virtual box into the gns3 and attach them to int1/0 on HQ2 and Branch2 routers.

9. Start all the servers. Give it few minutes to let the MPLS converge.

10. start console on HQ2 and test the ping connectivity from 1.1.1.1 to 5.5.5.5 (Branch2)

HQ2#ping 5.5.5.5Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 92/130/180 msHQ2#

11. ping from mininet VM to mininet clone VM ip addresses (192.168.10.2 to 192.168.50.2)

12. start the python VXexample2.py topology in mininet VM and VXexample2.py in mininet clone VM.

sudo python VXeample1.py

13. Load the flows1.txt in mininet VM and flows2.txt in mininet clone VM.

In mininet VM

sh ovs-ofctl add-flows s1 flows1.txt

in mininet clone VM

sh ovs-ofctl add-flows s2 flows2.txt

14. Setup VxLAN between s1 in mininet VM to s2 in mininet clone VM by adding vtep port in s1 switch of mininet VM and vtep port in s2 switch of mininet clone VM.

sh ovs-vsctl add-port s1 vtep -- set interface vtep type=vxlan option:remote_ip=192.168.50.2 option:key=flow ofport_request=10

in mininet clone ->

sh ovs-vsctl add-port s2 vtep -- set interface vtep type=vxlan option:remote_ip=192.168.10.2 option:key=flow ofport_request=10

15. ping from red1 to 10.0.0.2 and blue1 to 10.0.0.2

16. Start wireshark in GNS3 to observe the traffic.

Note the topology complexities created to explain the different scenarios of hiding different organization across different combinations

  • Service Provider is supporting 2 MPLS VPN having same ip addresses for HQ1 and HQ2. Similarly Branch1 and Brach2 have same ip addresses.
  • Red1 and Blue1 in mininet VM have same ipaddress and same mac address, just in different VLAN.
  • red2 and blue2 in mininet clone VM have same ipaddress and same mac address, just in different VLAN.
Lab Demo

This lab combines two different labs and makes it into one common story for creating VxLAN over MPLS.

Basic MPLS VPN setup is very nicely explained in the gns3vault site

VxLAN setup using Mininet. Firstly a great explanation by David Mahler in VXLAN overlay networks with Open vSwitch and similar lab also recreated with some useful python code for creation of mininet topology explained in Mininet VXLAN example video.

--

--