Lab 1: Measuring Throughput Across a Network, Ping, and Traceroute

Name:

Purpose Of The Lab

In this lab you will measure the data throughput rate between two computers that are connected to a single network. Also you will use ping and traceroute.

Overview

A utility program named ttcp (Test TCP) is used for measuring the throughput that can be achieved between two computers that are connected by a network. Two instances of ttcp are required - one runs on each of the two computers. One instance is started and placed in ``receive'' mode, and then the second instance is started in ``transmit'' mode. The instance in transmit mode must be given arguments that specify the exact location of the instance in receive mode and the amount of data to send. The transmitter contacts the receiver, generates the specified volume of data, sends it to the receiver, and then reports the throughput rate achieved. The receiver accepts the incoming data and (as a double check) also calculates and prints the data throughput rate.

Ttcp reports the amount of data transferred, the transfer time, and the approximate throughput. The reported rate is approximate because many factors can cause variations. For example, other traffic on the network, or other programs using the computers' CPUs or memory can slow down transmission. By comparing the measured throughput to the bandwidth of the network between the computers, you will be able to tell whether data is being transferred near the rated speed of the network.

Part 1. Measuring Throughput

Step 1.

You will obtain the following measurements in teams of two people. However, the lab reports will be individual. Each team will use a pair of adjacent computers, where one will run ttcp in receive mode and the other one will run ttcp in transmit mode.  Type the following commands in each of the two machines to find out their IP addresses:
/usr/sbin/ifconfig -a
Each computer is connected to two Ethernets. You have to write down the following for each machine because you will need that information later:

Step 2.

Make sure that the two computers are connected to the same hub, and that the hub is in 10Mbps mode.

Step 3.

Start ttcp in receive mode in one of the machines. When using ttcp, you will specify the number of packets to be sent, the packet size, the port number and several other arguments (to obtain information about its parameters, run ttcp without any arguments). ttcp is located in /u/u3/422/bin/ttcp. Start ttcp in receive mode using the following command:

/u/u3/422/bin/ttcp -r -s -fK -v -T

Step 4.

Start ttcp in transmit mode on the other machine using the following command:

/u/u3/422/bin/ttcp -t -s -fK -v -n<#data-units> host

where:

You will take four sets of measurements:
 

10Mbps Ethernet using private network 

Use the receiver's 10.0.0.X IP address. Hub is in 10Mbps mode
#data-units Bytes transmitted Throughput KBytes/Sec
1000    
5000    
8000    
10000    

 
 

100Mbps Ethernet using private network 

Use the receiver's 10.0.0.X IP address. Hub is in 100Mbps mode
#data-units Bytes transmitted Throughput KBytes/Sec
1000    
5000    
8000    
10000    

 
 

100Mbps Ethernet using lab network 

Use the receiver's 128.10.26.X IP address. Hub is in 100Mbps mode
#data-units Bytes transmitted Throughput KBytes/Sec
1000    
5000    
8000    
10000    

 
 

IP loop-back address

Use the loop-back IP address. Run both receiver and transmitter in the same machine. Use the receiver's loop-back address.
#data-units Bytes transmitted Throughput KBytes/Sec
1000    
5000    
8000    
10000    

In the following lab you will turn in the tables and the following:

1. What is the maximum theoretical throughput in Kbytes/sec in each case: ( Assume that he maximum theoretical throughput in the loop-back address tends to infinite).

10Mbps Ethernet using private network?

100Mbps Ethernet using private network?

100Mbps Ethernet using lab network?

IP loop-back address?
2. What is the efficiency as the percentage of the real throughput divided by the maximum throughput?

3. Why was the maximum throughput not accomplished?

4. Is the maximum throughput(practically) dependent on the number of bytes being transferred?

Part 2. Using ping

Ping is a command that is used to determine if a machine is connected to the network and to measure the roundtrip time.

Try the following commands and turn in the output. Type ctrl-c to stop the comand.

Hint. Redirect the output of ping and trace route to a file and copy and paste it.

/usr/sbin/ping -s lisa.cs.purdue.edu
 
 

/usr/sbin/ping -s expert.cc.purdue.edu
 
 

/usr/sbin/ping -s www.mit.edu
 
 

/usr/sbin/ping -s www.amazon.com
 
 

From these commands what host has the shortest and the longest round-trip time?
 
 

Part 3. Using traceroute

Traceroute is a command used to find the intermediate hosts (hops) in the route to a host.

Type the following commands and turn in the output.

/usr/local/etc/traceroute  lisa.cs.purdue.edu
 
 

/usr/local/etc/traceroute expert.cc.purdue.edu
 
 

/usr/local/etc/traceroute www.hp.com
 
 

/usr/local/etc/traceroute www.mit.edu
 

Part 4: Comparing TCP and UDP

The files for this part of the lab is available at /u/u3/422/Spring2002/lab1/lab1.tar or http://www.cs.purdue.edu/homes/yau/cs422/labs/lab1/lab1.tar. The usage is as follows:

udpserver <portno> <size>

udpclient <IP-addr of server> <portno> <size>

size Specifies the number of bytes to be sent to the server. Maximum size = 64 KB. Also, the size specified in the server and the client should have the same value.

The client will print out the amount of time taken for the data to be received by the server and for the acknowledgement to be received by the client.

Run the udpserver on machine A and the udpclient on machine B. Observe the time taken for data sizes 10, 100, 1000,10000, 60000 bytes

tcpclient,tcpserver can also be used in a similar manner.

Your Observations:

Based on the observations, which client (tcp client or udp client) shows less roundtrip time when
  1) less number of bytes (10 or 100) are sent
  2) more number of bytes (10000,64000,..) are sent

If you don't observe any real difference in time between the two clients,specify that in your answer.

Turning in this lab

You need to turn in this lab in HTML format. Copy this handout in html format and add your answers using a red font.
Hint: Use an html editor such as netscape or frontpage.

Follow these instructions to turn in your lab:
 

  1. Login to one of the lab machines.
  2. Rename the name of your lab html file to index.html
  3. Change directory to the place where index.html is found.
  4. Type "turnin -c cs422 -p lab1 index.html"
  5. To verify your submission type "turnin  -c cs422 -p lab1 -v"


Submit your lab using turnin at the end of your PSO on Wednesday, Jan 22, 2003.

If you submitted this lab by e-mail you will need to submit it again using the procedure described above.