Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
124 lines (89 sloc) 2.29 KB

vagrant-evpn-vxlan

Vagrantfile for playing EVPN-VXLAN using gobgp and goplane.

Topology

+---------+ +---------+ +---------+
|  netns  | |  netns  | |  netns  | (Network Namespaces)
+----|----+ +----|----+ +----|----+
+----|----+ +----|----+ +----|----+
| gobgp1  | | gobgp2  | | gobgp3  | (Virtualbox VMs)
+----|----+ +----|----+ +----|----+
     +-----------+-----------+
+----------------|----------------+
|             host OS             | (host OS)
+---------------------------------+

this vagrant file creates 3 virtual macines, which are working as PC router, and inside VMs, netns will created for playing vxlan.

How to play

You need to install vagrant before playing vagrant evpn-vxlan. This Vagrantfile creates two virtual machine.

Common

git clone https://github.com/skjune12/vagrant-evpn-vxlan
cd vagrant-evpn-vxlan
vagrant up

vagrant up takes long time for install dependencies. So please wait for a while.

Setup gobgp1

Create netns and configure interfaces

vagrant ssh gobgp1
sudo -i
~/config/config-interface.sh

Running goplane

vagrant ssh gobgp1
sudo -i
goplane -f ~/config/multiple-sites.conf

ip netns exec vxlan ping -c 5 192.168.1.4

Setup gobgp2

Create netns and configure interfaces

vagrant ssh gobgp2
sudo -i
~/config/config-interface.sh

Running goplane

vagrant ssh gobgp2
sudo -i
goplane -f ~/config/multiple-sites.conf

Setup gobgp3

Create netns and configure interfaces

vagrant ssh gobgp3
sudo -i
~/config/config-interface.sh

Running goplane

vagrant ssh gobgp3
sudo -i
goplane -f ~/config/multiple-sites.conf

Let's play

Check BGP status

Check whether bgp is established or not.

gobgp neigh

Check vtep status

gobgp global rib -a evpn

Send ICMP message

Please open the new window if you need.

from gobgp1 to gobgp2

ip netns exec vxlan ping -c 5 192.168.1.4

from gobgp1 to gobgp3

ip netns exec vxlan ping -c 5 192.168.1.6

Note

  • ~/config/two-sites.conf connects 2 VMs (gobgp1 and gobgp2). This file is stored in gobgp1 and gobgp2.
  • On the other hands, ~/config/multiple-sites connects all VMs (gobgp1, gobgp2, and gobgp3)