The ONL NPR Tutorial

NPR Tutorial >> The Remote Laboratory Interface TOC

New Window?

Configuring Topology

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:

 

Adding a Router

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! [[ add-npr.png Figure ]]

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.

 

Moving Icons and Spinning a Router

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. [[ add-2nd-npr.png Figure ]]

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.
[[ spin-handle-resize.png Figure ]]

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.

 

Adding Hosts and Links

[[ add-link.png Figure ]]

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 Your Work

[[ save-as-menu.png Figure ]]

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. [[ save-as-dialogue-resize.png Figure ]]

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):

Note that you can always get back to the .onldir directory by selecting the Home (second) icon.
[[ save-as-dialogue-npr-resize.png Figure ]]

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.

 

Reserving Resources

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:

Note however, that the reservation daemon may impose a limit on resource demands especially for course work. The most important one that is sometimes imposed is that each student is allowed only four router-hours per reservation (e.g., one router for four hours; two routers for two hours; or four routers for one hour). Students just beginning their laboratory exercises are usually asked to reserve only one or two routers for one hour since there is no non-exclusive time-sharing mechanism.

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. [[ Make Reservation Figure ]]

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.

 

Committing Resources

[[ commit.png Figure ]]

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."

[[ commit-done-resize.png Figure ]]

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.

 

Watching The Commit Progress

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).

[[ testbed-status-resize.png Figure ]]

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.

 

Running Commands on a Host

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
Here is an explanation of each line:
  1. You can only ssh to the hostname onl.arl.wustl.edu from outside of the ONL testbed environment. The name onl.arl.wustl.edu is really an external name that is mapped to the actual ONL host providing a desired service (ssh in this case). Although we have shown how to login using a command line, you can use any ssh client tool.
    You will end up on the host with name onlusr, the gateway host. Note that even though you used the name onl.arl.wustl.edu, you end up on the host onlusr. You can login to ONL's gateway host at any time: You don't have to have an active experiment running.
  2. From the gateway host, you can ssh to any of the hosts that have been committed to your experiment without a password prompt. Note that you can use the abbreviated hostname that omits the suffix ".arl.wustl.edu"; e.g. onl024 in place of onl024.arl.wustl.edu. Furthermore, you will NOT be prompted for a password.
  3. In this example, onl024 is the abbreviated DNS name of the control network interface to the host logically shown as n2p2. In reality, n2p2 is the name of the internal interface which is attached to port 2 on NPR 2. The netstat command shows the network interfaces of every network interface where the command is run.
Keep in mind that a firewall prevents you from initiating a new connection from within the ONL testbed to a remote host. One implication is that if you want to transfer a file on the onlusr host to a remote host, you must do it from the remote host. Also, keep in mind that ONL hosts run the Linux operating system, and the default command interpreter is the bash shell.

[[ netstat-i.png Figure ]]

The figure (above) shows that there are three network interfaces on onl024:

In particular, the RX-OK and TX-OK columns indicate the number of bytes received and transmitted respectively over each interface. See the man page for the netstat command for more details about the output. As expected many packets have been received and transmitted over the control network after a commit, but the data network has hardly been used.

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
Line 2a defines environment variables of the form $nXpY for all control network interfaces that have been committed to the user. In our example, $n2p2 will evaluate to onl024 in Unix command lines since it is the control network interface corresponding to the host labeled n2p2 in the RLI. This allows you to write shell scripts that survive experiment shutdowns, and reduce the need for clicking on hosts in the RLI to discover their control network interface names. The command "source ~onl/.topology" can also be used on hosts other than onlusr.

[[ ifconfig-eth1.png Figure ]]

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.)

 

Recap


 Revised:  Fri, Aug 14, 2009 

  
  

NPR Tutorial >> The Remote Laboratory Interface TOC