In this post post we’ll see how we can do a basic routing scenario by using the remote-lab.net virtual appliances. Below is the logical diagram of the scenario. Our objective is to esatblish connectivity between the 2 clients: host01 - 10.0.0.10 and host02 - 10.0.1.10.
Each of the hosts will be connected to a router that will be the first hop router for the hosts subnet. The 2 routers will be connected by 2 redundant links. We’ll set up OSPF as a routing protocol between the 2 routers that will be used to advertise the clients subnets.
rtr01 is an Arista vEOS and rtr02 is running Vyatta core. host01 and host02 are running Debian.
Now let’s get to the physical setup (which is actually virtual as all the components are VMs ). Each system (clients and routers) will be connected to the layer 2 switch (openvswitch running on Linux). We’ll need to set up the links that connect the routers to the switch as trunks in order to allow multiple vlans to get through. The ports that connect the clients to the switch will be set as access ports. Please note that in a real world scenario you’ll need to connect the routers by 2 different physical links across separate geographical paths to ensure rendundancy. Below is the physical diagram of the setup.
First thing we need to do is to configure the openvswitch. We’ll create a bridge that contains all the ports and set up the client ports in access mode. By default all the openvswitch ports are trunks.
Set up the client interfaces IP addresses and default routes:
Configure the vlans and SVI IP addresses on the routers:
Let’s do some connectivity tests:
Now that we have the connectivity established on the connected links let’s move forward and set up OSPF :
Once that we have the ospf configuration done we can proceed and check the OSPF neighbor status on the 2 routers. We’ll see that we have 2 equal cost paths to the hosts subnets. This means that the routers will load balance the packets through the 2 links.
What if we want to set one of the links as primary ? We need to set a higher cost for the secondary link. At this time both of the paths have a cost of 20 (10 for the network segment that connects the 2 routers + 10 for the host network segment). Let’schoose the vlan 200 as secondary and increase the cost for the secondary link to 11.
We can see that the routing table only contains the vlan 100 path. What happens if vlan 100 goes down ?
We can see that the vlan 200 path is installed in the routing table with a cost of 21 ( 11 + 10).
I hope this post is useful for getting an idea of how you can use the virtual lab. Please let me know if you any questions.