NPR Tutorial >> The Remote Laboratory Interface | TOC |
If we try to send traffic from n1p3 to n2p2 using the configuration we just committed in the preceding page The Remote Laboratory Interface => Configuring Topology, NPR 1 (the left router) will drop the packets because no routes have been installed; i.e., all of its route tables are empty. This page explains conceptually how an NPR route table is used to forward packets from an input port to an output port and shows you how to install route tables.
An example based on some of the concepts discussed on this page is given in NPR Tutorial => Examples => The_Remote_Laboratory_Interface. The sections in this page are:
The most basic activity of a router is to transmit incoming packets out the output port designated by the best matching entry in its route (or forwarding) table. Conceptually, each port of an NPR has a route table in which each entry has three fields:
In order for both NPRs to forward traffic between all hosts and between the two NPRs, we need to install route tables at the inputs that have attached links; i.e., ports 1.2, 1.3, 1.4, 2.1, 2.2, and 2.3 (the notation X.Y refers to NPR X, port Y).
The figure (right) shows route tables that could be used at ports 1.3, 2.1, 2.2 and 1.4 to forward packets flowing from n1p3 to n2p2 and back to n1p3. They have been arranged to show which entries would be used to forward the packets.
Recall: The nXpY network interface is assigned the IP address 192.168.X.Z where Z = 16 x (Y+1); e.g., n2p2 has the IP address 192.168.2.48.The packets flowing from n1p3 to n2p2 (192.168.2.48) will match the prefix/mask fields 192.168.2.0/24 and 192.168.2.48/28 at ports 1.3 and 2.1 respectively. The packets flowing in the reverse direction from n2p2 to n1p3 (192.168.1.64) will match the prefix/mask fields 192.168.1.0/24 and 192.168.1.64/28 at ports 2.2 and 1.4 respectively.
So, packets flowing to n2p2 will have a destination IP address of 192.168.2.48 in its header.
The easiest way to generate the route tables we need is to generate default route tables at every port (including ones without attached hosts):
You can verify that the route tables are correct. For example, look at the routing table at port 1.3 by enterring (not shown):
The route table at port 1.3 will appear. It should look like the figure (right).
The last (P, N, S) entry (192.168.2.0/24, 4, 49) forwards packets destined to hosts connected to NPR 2 and will forward those packets out port 4. The RLI generated that entry automatically because it could tell that there is only one route to the hosts attached to NPR 2.
But even when if there were multiple paths to NPR 2, the RLI would have inserted an arbitrary entry for packets destined for NPR 2.
Watch Out!!! If there are multiple paths, the output port chosen by the RLI may not be the one you want. So, check router-to-router entries in route tables.
You can examine the route table at a single port.
In the figure (right), we are about to open the NPR.1:port 3
(port 1.3) route table window.
The route table window
has a Route Table => Edit menu that allows the user
to add a route, delete a route,
stop statistics and generate local default routes.
Also, you can modify a route table entry by selecting an entry field
and changing only that field (e.g., next hop).
You must select File => Commit before the changes take effect.
The Add Route and Delete Route menu items are straightforward to use. Note also that you can delete a block of entries (shown right):
The Generate Local Default Routes menu item allows you to generate a route table that assumes the 192.168.X.Z/28 subnetting described earlier. Here is how you would use this menu item to install a route table at port 1.3 that is identical to the one generated earlier by the Topology => Generate Default Routes menu item in the main RLI window:
The route table will be populated with the five entries for ports 0 to 4 for the NPR. But we need another entry for packets going to NPR 2.
A default entry with prefix/mask 0.0.0.0/0 and next hop 0 will be added.
All of the route entries have used non-overlapping prefix/mask entries. But we can construct a route table using the fact that route lookup uses the LPM algorithm.
You can verify that packets from one host can reach another one by using the ping command. For example, if you want to see if packets can be sent from n1p3 to n2p2 (and back), ping n2p2 from host n1p3 by enterring:
onlusr> source ~onl/.topology # add control network IP addresses to env onlusr> ssh $n1p3 # ssh to host n1p3 through control network $n1p3> ping n2p2 # send ping packets to n2p2 from $n1p3 ^C # enter ctrl-c to terminate the ping command
This provides a simple test that there is network connectivity between the sender and receiver.
Watch Out!! A common mistake is to enter "ping $n2p2" when you meant "ping n2p2". The first form attempts to send five ping packets to the control network interface, not the data network interface, attached to the n2p2 host.
The figure above shows that we have used ping to send five ping packets to n2p2 from n1p3 (onl029). The -c 5 limits ping to sending five packets instead of a continuous stream of packets.
When a user enters the ping command, the sending host sends one ICMP echo request packet to the destination once per second. When the receiver gets the ICMP echo request packet, it sends back an ICMP echo reply packet to the original sender. As each response is received, ping outputs information indicating the sequence number and the round-trip time (RTT). After ping terminates, it outputs a report indicating packet loss and RTT statistics (minimum, average, maximum, standard deviation). The ping command is a simple tool for general network troubleshooting. And a successful test (right) is a good indicator that you will likely be able to send packets between the two hosts participating in the ping.
Revised: Wed, Aug 6, 2008
NPR Tutorial >> The Remote Laboratory Interface | TOC |