University of Windsor, Ontario Canada
88-556 Assignment No2 Computer Networks – Dr. Kemal Tepe
Carlos Eduardo Palacio 2/26/2008
88-556 Assignment No2 February 26, 2008
Table of Contents Figures .................................................................................................................................... 2 Tables ...................................................................................................................................... 2 Assignment Questionnaire ..................................................................................................... 3 Answers .................................................................................................................................. 4
Figures Figure 1 Four Way Handshake ................................................................................................ 7 Figure 2 Four Way Handshake optimized Host B ready ......................................................... 7
Tables Table 1 Packet Segmentation IP Header Data Length, Segment Offset, More Filed ............. 4 Table 2 IP 137.207.1.17/24 in Binary Octet............................................................................ 4 Table 3 Subnet 1 with 125 Hosts ............................................................................................ 4 Table 4 Subnet 2 with 60 Hosts .............................................................................................. 5 Table 5 Subnet 3 with 60 Hosts .............................................................................................. 5 Table 6 TCP Slow Start Tahoe with Threshold 16 ................................................................... 6 Table 7 TCP Slow Tahoe with no Threshold ........................................................................... 6 Table 8 Estimated RTT and Possible Time Out base on Sampled RTT.................................... 7
Page 2
88-556 Assignment No2 February 26, 2008
Assignment Questionnaire 1. Consider a router needs to send 3000 byte datagram into a link whose MTU is 500 Bytes. If the original datagram’s ID is 422, please find data length, segment offset and more field of IP header of each datagram after fragmentation? 2. Consider a router that interconnects three subnets. The administrator of the network has 137.207.1.17/24 as network address. If the first subnet has 125 hosts, and second and third have 60 hosts. Provide network addresses ranges of these three sub networks and their subnet masks? 3. Consider sending a large file from host A to host B. Assume the maximum segment size (MSS) is 1454 Bytes. a. What is the maximum value of the file that TCP sequence numbers are not exhausted? b. How long does it take to send this file over 1 mega bit per second (Mbps) link? (Do not consider about flow control problems). 4. If there are 100 segments that need to be transferred from host A to host B, and TCP employs slow-start Tahoe congestion control with threshold of 16 segments. Assuming there are no missed ACKs, how long does it take to transfer the segments from host A to host B if: a. RTT is 2 sec, and segment transmission time is 0.25 seconds? b. If there is no threshold in the congestion scheme? c. Instead of dynamic congestion window, TCP employs static congestion window of 2? 5. If the sampled RTTs in the host are (1.6, 2.0, 2.2., 1.5, 1.8) milliseconds (ms). Find the estimated RTT and possible timeout periods for α=0.875 6. Explain how four-way handshake works in the TCP connection termination?
Page 3
88-556 Assignment No2 February 26, 2008
Answers 1. The original datagram = 3000 Bytes, this means that there is already one header but is not include n the datagram. Is important that we will have to include headers for each segment that means that the capacity of data will be reduce by 20 octet o 20 Bytes. The MTU (maximum transmission unit) = 500 Bytes.
Table 1 Packet Segmentation IP Header Data Length, Segment Offset, More Filed
Packet Number 1 2 3 4 5 6 7
Data Length (octets)
Header Length
480 octets 480 octets 480 octets 480 octets 480 octets 480 octets 120 octets
Segment Offset
20 octets 20 octets 20 octets 20 octets 20 octets 20 octets 20 octets
More Field
0 60 *64 bit 120*64 bit 180*64 bit 240*64 bit 300*64 bit 360*64 bit
Bytes of the Datagram Left
1 1 1 1 1 1 0
2520 2040 1560 1080 600 120 0
2. Router interconnects three subnets and the Administrator have a network address IP 137.207.1.17/24. First subnet will have 125 hosts, Second and Third 60 hosts. Table 2 IP 137.207.1.17/24 in Binary Octet
.
.
137
.
207
1
0
0
0 1
0 0
1
1
2
3
4 5
6 7
8
.
1 9
1 1 0
0 1 1
0 1 2
1
1 1 3
1 1 4
1 1 5
1 1 6
.
0 1 7
0 1 8
0 1 9
0 2 0
17 0 2 1
Network ID
Number of Hosts IP Range for the Host Subnet Mask Gateway Broadcast
0 2 3
1 2 4
.
0
0
0
1
0
Host ID
Table 3 Subnet 1 with 125 Hosts
Subnet
0 2 2
1 125 137.207.1.1 137.207.1.126 255.255.255.128 137.207.1.0 137.207.1.127
Page 4
0
0
1
88-556 Assignment No2 February 26, 2008 Table 4 Subnet 2 with 60 Hosts
Subnet
2
Number of Hosts
60
IP Range for the Host Subnet Mask
137.207.1.129 137.207.1.190 255.255.255.192
Gateway
137.207.1.128
Broadcast
137.207.1.191
Table 5 Subnet 3 with 60 Hosts
Subnet Number of Hosts IP Range for the Host Subnet Mask
2 60 137.207.1.193 137.207.1.254 255.255.255.128
Gateway
137.207.1.192
Broadcast
137.207.1.255
3. Consider sending a large file and the Maximum segment size (MSS) is 1454 Bytes. a. Maximum Value of File that TCP sequence numbers are not exhausted, is related with the sequence number capacity in the TCP header that is 2 . That in terms of how many numbers can generate starting from 0 is 2 42,94,967,296 and how big should be the file if we want to use all the sequence numbers will be 2 1454 6,244,882,448,384 b. Link of 1 Mbps (mega per second) = 1024 bits per second, and the MSS in bits is 1454 8 11632 for 1 MSS we have 11632 11,36 1024 / But we need to transfer 2 MSS that will be the same if we say that we need to 6,244,882,448,384 42,94,967,296 !"" 11,36 48,790,828,482.56 1547.14 years 4. 100 segments to transfer from ) * TCP Slow start using Tahoe with Threshold 16 segments. a. RTT is 2 seconds and Segment transmission time is 0.25 seconds.
Page 5
88-556 Assignment No2 February 26, 2008 Table 6 TCP Slow Start Tahoe with Threshold 16
Window
Packets Send
Packets to Send
2 4 8 16 17 18 19 20
2 6 14 30 47 65 84 100
Comment
98 94 86 70 Threshold 53 35 16 0 Window is 20 but only 16 used
Time RTT
Segment Transmission
Total Time
2 2 2 2 2 2 2 2
0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25
2.25 4.5 6.75 9 11.25 13.5 15.75 18
Time RTT
Segment Transmission
Total Time
2 2 2 2 2 2
0.25 0.25 0.25 0.25 0.25 0.25
2.25 4.5 6.75 9 11.25 13.5
b. No threshold Table 7 TCP Slow Tahoe with no Threshold
Window
Packets Send
Packets to Send
2 4 8 16 32 64
2 6 14 30 62 100
Comment
98 94 86 70 38 0 Window is 64 but only 38 used
c. Static Window = 2 This means 100 packets and you send 2 each time = 50 transmissions +50 ,-. +2 / 0.25 00 112.5 5. If the Sampled RTT in the host are (1.6, 2.0, 2.2, 1.5, 1.8) α= 0.875 1.233456 7α Estimated>??@AB C / ++1 D α0 Sample>?? 0
HIJKL M+1 D N 0 HI233O P / +N Q".R233 D 1.233 Q0 ,. S -I 1.233 / +4 HI233 0
Page 6
88-556 Assignment No2 February 26, 2008 Table 8 Estimated RTT and Possible Time Out base on Sampled RTT
Sample 1 2 3 4 5
T
U
0.875 0.875 0.875 0.875 0.875
0.25 0.25 0.25 0.25 0.25
Sample RTT
Estimated RTT Old
1.6 2 2.2 1.5 1.8
0.0000 0.2000 0.4250 0.6469 0.7535
Estimated RTT New 0.2000 0.4250 0.6469 0.7535 0.8843
Dev(K) Dev(K+1) 0.0000 0.3500 0.6563 0.8805 0.8470
0.3500 0.6563 0.8805 0.8470 0.8641
Time out Interval 1.6000 3.0500 4.1688 4.1414 4.3409
6. Four way Handshake algorithm • Host A Send Termination i request to Host B. • Host B Send ACK for the i request to Host A. • Host B Send Termination j request to Host A. • Host A Send ACK for the j request to Host B.
Figure 1 Four Way Handshake
Figure 2 Four Way Handshake optimized Host B ready
Page 7