|In this example, LANforge is used to emulate a live routed network by using multiple virtual routers to form a working multi-hop network. Each virtual router has its own routing table and can be configured to use one of many different routing protocols. OSPF will be used in this example and traceroute will be used to demonstrate the traversal of each hop.|
Use Netsmith to create five OSPF virtual routers.
From the Status tab, select the Netsmith button.
Right-click in the Netsmith window and select New Router.
Select the Use OSPF checkbox.
Select OK, then create four more OSPF virtual routers.
After creating five OSPF virtual routers, select Apply.
For more information see LANforge-GUI User Guide: Netsmith
Create four Netsmith connections to link all of the OSPF virtual routers.
Right-click in the Netsmith window and select New Connection.
Leave all the default settings and select OK.
Create three more Netsmith connections.
After creating four Netsmith connections, select Apply.
Assign IP addresses to either end of each of the four Netsmith connections.
Right-click on rddVR0 and select Modify Port.
Set rddVR0 to 10.0.0.1/30 and select OK.
Right-click on rddVR1 and select Modify Port.
Set rddVR1 to 10.0.0.2/30 and select OK.
Repeat the steps above to complete the following:
rddVR2 is 126.96.36.199/30 and rddVR3 is 188.8.131.52/30
rddVR4 is 184.108.40.206/30 and rddVR5 is 220.127.116.11/30
rddVR6 is 18.104.22.168/30 and rddVR7 is 22.214.171.124/30
Drag each end of a Netsmith connection into a virtual router to setup the network.
A: Setup the following by dragging the interfaces into the specified virtual routers:
rddVR0 in R0 and rddVR1 in R1
rddVR2 in R1 and rddVR3 in R2
rddVR4 in R2 and rddVR5 in R3
rddVR6 in R3 and rddVR7 in R4
B: Right-click on each Wanlink (red bar) and select Toggle Wanlink (change to green bar).
Note: If you wanted to emulate an /impaired/ multi-hop network, you could modify each Wanlink to have any LANforge impairment such as latency, jitter, dropped packets, etc...
After all interfaces are moved and Wanlinks started, select Apply in the Netsmith window.
Assign IP addresses and Default Gateways to each of four physical interfaces.
Right-click on each interface and select Modify Port.
Setup the following IP addresses and Default Gateways:
eth1 IP address is 172.16.0.101/24 and Default GW is 172.16.0.1
eth2 IP address is 172.16.0.1/24 and Default GW is 172.16.0.1
eth3 IP address is 192.168.0.1/24 and Default GW is 192.168.0.1
eth4 IP address is 192.168.0.104/24 and Default GW is 192.168.0.1
Drag eth2 into R0 and eth3 into R4, then Apply changes.
Note: In this example, four physical interfaces are used. eth1 and eth2 are physically connected with a cable, as are eth3 and eth4. This allows us to use eth1 and eth4 to generate traffic to each other through the network interfaced by eth2 and eth3.
Apply all changes in Netsmith, allow OSPF time to converge, and observe routing tables.
After applying all Netsmith changes, right-click on a virtual router and select Show Routing Table. (Before OSPF converges, only the directly connected networks are shown.)
After OSPF converges, each virtual router has a complete routing table for the entire network.
Note: If you select Netsmith Apply again, this will restart all virtual routers and OSPF will need time to converge again.
Alternative method to observe routing tables of each virtual router.
With OSPF virtual routers, you can right-click on a virtual router and select Virtual Router Console to bring up the underlying xorp shell for the virtual router.
Once at the xorp shell prompt, type the following to display the routing table information:
show route table ipv4 unicast final
Use traceroute to traverse all five hops.
Open a terminal window in the LANforge system.
Type the following command at the prompt:
traceroute -i eth1 126.96.36.199
Note: -i eth1 forces the traceroute program to use eth1 as its outgoing interface.
Observe the results of each hop in the network.
Traceroute from eth4.
traceroute -i eth4 10.0.0.1
Generate LANforge traffic through the multi-hop network.
Go to the Layer-3 tab and select Create.
Set Endpoint-A to use eth1 and Endpoint-B to use eth4.
Start the Layer-3 connection.
Traffic flowing through the multi-hop network.