NPR Tutorial >> The Remote Laboratory Interface | TOC |
This page describes how to construct and configure a basic network topology and monitor traffic and queue length. 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:
A user begins by interactively constructing and configuring a network of routers, hosts and links using the Topology menu. Note that this phase can be done without making any resource reservations or connecting to the ONL testbed!
You can add a router using the Topology => Add NPR menu.
An NPR has five ports.
Users can attach hosts to ports 0 through 4.
In most cases, you can move icons with the left mouse button as in any other GUI by grabbing the icon and dragging it into position. You can even move a group of icons by enclosing the icons in a rectangle defined by dragging the left mouse button along the diagonal of the rectangle.
One feature peculiar to the RLI is that you can spin or rotate a router icon to improve the layout for attaching to hosts and other routers.
The figure (right) shows that we have added two NPRs and positioned
them near the center of the window.
NPR 1 (NPR 2) is on the left (right).
In anticipation of creating a dumbbell topology, we want to spin
NPR 1 clockwise and NPR 2 counterclockwise before adding four hosts
and associated links.
To rotate a router icon, select and hold on to the spin handle (pink bullet) and then rotate the NPR icon into place. Note that a spin handle can only be moved to the five angular positions shown as bullets along the outer perimeter of the icon.
Watch Out!!! A spin handle is picky about where you grab it. For best results, aim towards the southeast corner of the spin handle circle. It tells you that you have grabbed the right spot by turning itself bright red.
To add a host select Topology => Add Host and a host will appear. The host icon will appear in the upper left corner of the window. Move it into position near its attachment point on the router port. Then, select Topology => Add Link; select the host icon; and drag the left mouse button to the attachment port. Alternatively, you can drag in the opposite direction; i.e., from port to host. A dashed link will appear indicating that the hardware has not yet been allocated.
Before a host is linked to a router port, it will have a configuration name such as HST3; i.e., HSTx where x starts at 0 and is incremented for each new host. But the icon will acquire a name with the form nXpY when you link it to a router port. X will be the logical NPR number, and Y will be the port number. For example, the host name n2p3 is linked to port 3 on NPR 2.
Remember: A host name nXpY refers to the internal network interface name. This interface will also have an IP address of the form 192.168.X.Z where Z = 16 x (Y+1); e.g., n1p2 has the IP address 192.168.1.48. After resource allocation, objects get bound to other names and IP addresses. For example, a host that is labeled as n1p2 will also be bound to an external (control) network interface name and IP address. That name might be onl053.arl.wustl.edu which might have an IP address of 10.0.0.53.
The links are shown as dashed lines, and the hosts and routers are shown in a light shade to indicate that the objects have not yet been bound to actual testbed resources. When these resources get assigned actual hardware, links will become solid, and hosts and routers will darken.
Saving a configuration (even an incomplete one) allows you to resume your work from the stoppiing point and aids in recovery from unexpected interruptions. It is good habit to adopt a discipline of periodically saving your configuration as it evolves. The menu items File => Save as and File => Save allow you to save your configuration to a file. They have the same semantics as in other software tools where Save as allows you to name a file and Save assumes that you are modifying a file that was read earlier. Selecting either menu item opens up a dialogue window.
The RLI assumes that your configuration files are in the .onldir directory in your home directory (~/.onldir). A configuration can be saved at any time, even before requesting that resources be allocated for the network.
Note: Since the directory name begins with the dot character, the Unix ls command will not show this directory unless you include the -a flag (all).The figure (right) shows that our .onldir directory already has lots of configuration files. Because these files are for the older NSP routers, we will create the npr subdirectory for all of our NPR configuration files.
The five icons at the top of the dialogue window allow you to (from left to right):
The figure (right) shows that we have changed into our npr subdirectory and want to save the configuration in the ex-rli.exp file.
Remember: All of the work up to this point can be done without connecting to the ONL testbed.
Before asking ONL to give you physical resources through the File => Commit menu item, you must make a resource reservation &mdash much like making a restaurant reservation. This approach is necessary because of the limited number of routers relative to the number of users (seven NPR router pairs and four NSP routers). Reservations are made through the File => Make Reservation menu item in the main RLI window.
There are two things to consider when making a reservation:
You can check for the availability of resources through the Resource Availability link in the sidebar of the ONL website. The vertical axis of the availability chart will show the number available if you restrict the search to one type of resource (e.g., NPR). Otherwise, it will show the percentage of availability. Remember to select the Go button to refresh the graph.
To make a reservation through the RLI, you must already have an existing configuration. Then, select File => Make Reservation. A dialogue box titled "Log In" will appear. Fill out the dialogue box, and select Enter. When the Log In dialogue box appears, enter your User Name and Password. A status message will appear in a Reservation popup window once the reservation has been processed.
After a reservation has been successful, you can see the
reservation by clicking the My Reservations link
in the sidebar of the ONL webpage.
Now we are ready to ask the ONL to assign us actual resources
and implement our virtual network topology.
The menu item File => Commit starts the allocation
and initialization of physical resources.
The RLI will send a commit message to the configuration daemon
which will attempt to allocate the physical
resources and configure them to match your network description.
A progress bar is shown at the bottom.
If any error occurs, an error log window will be displayed.
The error log can also be shown at any time by selecting
the Show Error Log button at the bottom right
hand corner of the display.
While the RLI is committing resources, the Commit Needed box will be replaced by the progress bar showing the text "Committing."
When the configuration daemon has finished, a "Commit Completed" message will be shown. The links will be solid, black lines and the other objects will be in a darker blue color signalling that the components are now bound to actual hardware resources.
This commit process usually takes from one to four minutes. Because we use preemptive rejuvenation, the commit can take less than a minute when the testbed is lightly loaded. Longer than normal commit times usually occur when there are lots of users trying to configure their experiments or if there are hardware problems.
Clicking on the center of an icon shows an objects properties and menu items. The left window (above) shows that the host n1p3 has been assigned to an actual host with the control interface name onl052.arl.wustl.edu. Furthermore, the internal interface IP address is 192.168.1.64. The only host menu item is Monitoring => User Data (described later). NPR.1 has been actually assigned actual NPR 9 (since the name of the CP is nprcp09.arl.wustl.edu). NPR.1's base IP address is 192.168.1.0; i.e., hosts attached to port Y will have an IP address of the form 192.168.1.Z where Z is 16 x (Y+1).
The NPR menu items include a configuration menu and a monitoring menu (details not shown). The configuration menu contains two items: Plugin Table and Plugin Debugging (to be described later).
It is worth repeating that each host has two interfaces.
One has an internal name (e.g., n1p2) and the other an external
name (e.g., onl052.arl.wustl.edu).
Each interface also has an IP address.
The host IP address shown in the RLI display is the address assigned
to the host interface that is internal to the testbed and will
carry your data traffic.
These addresses are not externally visible, and
like the internal names are assigned algorithmically, making
it possible to repeat an experiment in different sessions
without having to modify names and addresses used in demonstration scripts.
Typically, the internal interface name (e.g., n1p2) is used in
commands that generate experiment traffic; and
the external (control) interface name (e.g., onl052.arl.wustl.edu)
is used to open SSH connections to the host for the purpose
of running applications.
You can observe the progress of the allocation and initialization process through the Testbed Status side bar link in the ONL Web page (after logging in).
The figure (above) shows a dumbbell configuration with two routers and four hosts. The RLI shows that the host with n2p2 internal network interface name has the control network interface name onl024.arl.wustl.edu and the n2p2 interface name has been assigned the IP address 192.168.2.48.
The Testbed Status Web page shows that there are two active experiments
(users that have been assigned hardware resources).
The kenw user has been assigned the hosts
onl024, onl027, onl028, and other resources.
The Web page also shows the status of all routers and hosts.
Those marked active have been assigned to users,
and those marked free have not.
Nodes can also be in a repair or testing state
indicating respectively that an error occurred or the node is
being used by developers.
When the commit is done, hardware resources have been bound to the logical resources shown in the RLI and intialized to their default settings. So far, we have accepted the default link rates (1 Gbps) and have accepted default routing within the data network. Keep in mind that at this point, the route table is empty, and therefore, all packets will be dropped by the routers. We will show how to install routes in the next page.
Once the commit has completed, you can access the hosts assigned to your experiment. Below is a simple example where we use the ssh to login to the host with internal interface n2p2.
1 client> ssh onl.arl.wustl.edu # ssh to ONL user host 2 onlusr> ssh onl024 # ssh to n1p2 host 3 onl024> netstat -i # show network interfaces
The figure (above) shows that there are three network interfaces on onl024:
Here is an alternative to the above example that uses the .topology file described in RLI Basics:
1 client> ssh onl.arl.wustl.edu # ssh to ONL user host 2a onlusr> source ~onl/.topology # use ~onl/.topology.csh if using a C-shell 2b onlusr> ssh $n2p2 # $n2p2 will evaluate to onl10 3 onl024> netstat -i # show network interfaces
The output of the ifconfig command (above) confirms that the eth1 interface has the IP address 192.168.2.48. (Note: If you get a "command not found" error message, try using /sbin/ifconfig.)
Revised: Fri, Aug 14, 2009
NPR Tutorial >> The Remote Laboratory Interface | TOC |