CS 457
Lab
Working with EmuLab
(Adapted from Dr Donahoo’s lab of Baylor University)
Example Network Topology Creation
- Log on to your account in emulab.
- Go to net build GUI page Say we want two nodes –
a client and a server connected through a router.
- To create a client (a node),
drag the node icon in the main drawing area. At this point you can see
this node's properties on the right side panel. Change the name of the node
from node0 to client. You can leave the hardware and O.S to <auto>.
- Repeat this process for the server. At this point
you should have 2 nodes in the drawing area.
- Now drag the new LAN icon and place it in between
above created nodes to form a star topology.
- Set this LAN's properties, say name = router1,
bandwidth = 100Mb/s, latency(delay) = 10ms.,
loss-rate = 0.1(meaning 10% of packets going through this router are
dropped. Don't worry if you don't know how much to set these values. You
can always change these values afterwards, so for the moment you can
select default values.)
- Now create links between the client and server
through router1.
- All set to go, click on create experiment tab on
lower right side.
- This opens a new web page "Begin testbed experiment".
- Select project group (by default it should be CS457)
- Provide a name to the experiment and a brief
description of the project. Leave other values to default and click on
submit button.
- At this point a new web page will open saying
that your experiment is being configured, and this should ideally take
less than 10 minutes. Once done you will receive an email stating that
your experiment is configured and giving you alloted
nodes details so that you can ssh
into those machines and upload your program.
- The topology building process is now complete and
you are ready to upload your programs and run the experiment.
Example Running an Experiment
To get you started with your
first experiment, a code sample of a client/server program is provided on the
class homepage. This is an example of an echo client/server example where a client
sends text to a server and the server responds by echoing that text back to the
client.
- After completing the topology building process,
you can directly ssh
into the machines at emulab. To get the
address/name of the machines look in the received email and locate for the
Qualified Names. For the above topology your Qualified Name section should
look something like:
a. client.emulabTest.CS457.emulab.net
b. server.emulabTest.CS457.emulab.net
- With ssh,
terminal into these three machines with your emulab
user name and password. At this point upload the program files. At the
clients, upload the following:
a.
ResolveName.c
b.
DieWithError.c
c.
TCPEchoClient.c
At
the server, upload these files:
a.
DieWithError.c
b.
TCPEchoServer.c
c.
HandleTCPClient.c
- Now compile these programs by executing 'sh make.src'. The default
executable names for the client and server programs are client
and server.
- Run the client and server programs, you can play
around with various network properties like changing the latency, loss
rate and see the effect of these on the program.
- To change these properties go the project
homepage on emulab website and then click on the
current experiment's name. This will bring the current experiment page and
somewhere on left side under "Experiment Options" you can see
link – 'traffic shaping', click on this link, change some parameters, save
your settings, and run the experiment again.
- Experiment by changing different variables, and
observe the effects on your testbed.