project2-sol-f08

project2-sol-f08 - ECE547 Introduction to Computer...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ECE547: Introduction to Computer Communication Networks Project2: Simulating TCP on NS Solutions Project Solutions Problem 1: Study the Window Behaviour of TCP Some comments on the TCL script tcp-window.tcl . We need to set the upper limits on both the congestion window and the receiver window large enough, to eliminate their effect on the throughput. For our network scenario, the bandwidth-RTT product is . 2 Mbps × 200 ms × 2 = 0 . 08 Mb = 10 packets The queue length is 10 packets. Hence the window sizes should be well above 20 packets. The default receiver window size in the TCP agent is limited to 20 packets. It has to be modified to suit our network scenario. Solutions to each assignment: 1. Extract the time and the sequence number of each TCP data sent and each acknowledge- ment received at node n0 . Draw a figure with x-axis being the time, and y-axis being the 1 sequence number of each TCP data and acknowledgement packet. (Answer) The file tcp-window.tr contains the time and the sequence number of each TCP data pakcet sent and each acknowledgement packet received at node n0 . Any lines in the file tcp-window.tr that start with a “+” represent packets that are enqueued. Among these lines, those with a packet type of “tcp” represent the packets sent by the TCP sender. As an example, see the line below. + 0.1 0 1 tcp 1000 ------- 0 0.0 1.0 0 0 The second field is the time of the enqueueing operation. The third and the fourth fields are the IDs of the nodes between which the enqueueing operation takes place. The fifth field is the packet type (in this case it is “tcp”). The next field is the packet size. Then, after the dashed line, the first field is the IP flow identifier, the second and the third fields are the IDs of the source and destination nodes, respectively. The fourth field is the sequence number of the packet. The last field is the unique ID assigned to the packet by NS. Similarly, to search for acknowledgement packets received at the sender, we need to look for lines in the file tcp-window.tr that start with a “-” (which represents packets that are dequeued) and with a packet type of “ack”. As an example, see the line below.- 0.24 1 0 ack 40 ------- 0 1.0 0.0 0 1 Again, the second field is the time of the dequeueing operation and the second last field is the sequence number. The following shell script ( get-seq ) can be used to extract the sequence numbers and the time. The information of the data packets is written into the file tcpseq , while that of the acknowledgement packets is written in the file ackseq . grep "^+.*tcp" tcp-window.tr > temp cut -f2,11 -d" " temp > tcpseq grep "^r.*ack" tcp-window.tr > temp cut -f2,11 -d" " temp > ackseq 2 5 10 15 50 100 150 200 250 300 350 400 Time Sequence Number ACK Packet Data Packet Figure 1: Sequence number evolution of TCP (Tahoe) We can then use gnuplot to plot Figure 1....
View Full Document

This note was uploaded on 01/27/2010 for the course ECE 547 taught by Professor Xiaojunlin during the Spring '09 term at Purdue.

Page1 / 13

project2-sol-f08 - ECE547 Introduction to Computer...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online