$30
CS 3700: Computer Networks
Homework 6 (120 points)
Submission: Upload and submit it on Blackboard. If your homework is in hand-written, please try to SCAN it into a .pdf file or take
a clear photo, and then upload/submit it. (NO Paper/Hardcopy or Email submission please!)
Please 1) include your First Name and Last Name on the page(s) that you upload & submit on Blackboard
2) Name your HW file as "HW<#><LastName><FirstName>", e.g., HW6PolisJared.pdf for HW6.
Grading: I will also grade it in Adobe Acrobat and post the graded work on Blackboard for everyone who submits it.
PLEASE ORGANIZE YOUR WORK IN THE SEQUENCE GIVEN IN THE ASSIGNMENT!!!
Problem A. Consider transferring an enormous file of L bytes from Host A to Host B. Assume an MSS of 536 bytes. (hint: MSS:
Maximum Segment Size, i.e., Whe Pa[iPXP Vi]e Rf Whe Sa\ORad Rf a TCP VegPeQW, QRW iQcOXdiQg Whe TCP VegPeQW headeU. IW¶V eVVeQWiaOO\
the largest amount of application-layer data, in Bytes, that a TCP segment can carry.)
(a) What is the maximum value of L such that TCP sequence numbers are not exhausted? Recall that the TCP sequence number field
has 4 bytes.
(b) For the L you obtain in (a), find how long it takes to transmit the file. Assume that a total of 66 bytes of transport, network, and
data-link header are added to each segment before the resulting packet is sent out over a 155 Mbps link. Ignore flow control and
congestion control so A can pump out the segments back to back and continuously. (Hint: it is assumed that the window size N is
large enough such that the segments can be sent out back to back without the need to wait for the next sequence number to be
available and there is no loss of packet or ack.)
Problem B. Host A and B are communicating over a TCP connection, and Host B has already received from A all bytes up through
byte 126. Suppose Host A then sends two segments to Host B back- to- back. The first and second segments contain 80 and 40 bytes of
data, respectively. In the first segment, the sequence number is 127, the source port number is 302, and the destination port number is
80. Host B sends an acknowledgment whenever it receives a segment from Host A.
(a) In the second segment sent from Host A to B, what are the sequence number, source port number, and destination port number?
(b) If the first segment arrives before the second segment, in the acknowledgment of the first arriving segment, what is the
acknowledgment number, the source port number, and the destination port number?
(c) If the second segment arrives before the first segment, in the acknowledgment of the first arriving segment, what is the
acknowledgment number? (Hint: The reliability control used in TCP is basically a GBN approach with some variation.)
(d) Suppose the two segments sent by A arrive in order at B. The first acknowledgment is lost and the second acknowledgment arrives
after the first time-out interval. Draw a timing diagram, showing these segments and all other segments and acknowledgments
sent. (Assume there is no additional packet loss.) For each segment in your figure, provide the sequence number and the number of
bytes of data; for each acknowledgment that you add, provide the acknowledgment number. (hint: draw all the segments and
ACKs that are exchanged between Hosts A and B involved in delivering these two segments)
Problem C. Referring WR Whe SOide 38 WiWOed ³TCP FORZ CRQWURO´, if RcYBXffeU = 4096 b\WeV, 1280 b\WeV daWa iV bXffeUed,
(a) what is the rwnd value in the TCP header of the next receiver-to-sender segment?
(b) When the sender receives the above TCP segment, it has sent out 2560 bytes not yet ACKed. At most how many more bytes can
the sender send out before receiving any ACK?
Problem D. (a) List the following three TCP segments in the order of being transmitted in the TCP 3-way handshake for establishing a
TCP connection; (b) describe the sender and receiver of EACH TCP segment as client-to-server or server-to-client; (c) what is the initial
sequence number chosen by the client; (d) what is the initial sequence number chosen by the server?
TCP Segment [SYNBit = 1, Seq = 58, ACKbit = 1, ACKnum = 126]
TCP Segment [ACKbit = 1, ACKnum = 59]
TCP Segment [SYNBit = 1, Seq = 125]
Problem E. Given that the client initiates the procedure of closing a TCP connection, the last byte sent from client to server before the
FIN segment is byte #1,742, the last byte sent from server to client before the FIN segment is byte #6,029, (a) list four TCP segments
exchanged between client and server for closing a TCP connection, where EACH TCP Segment must be described in the format used
in Problem B; (b) describe the sender and receiver of EACH TCP segment as client-to-server or server-to-client.
(more on next page!)
Maxsegments.ae
MSU Denver, M&CS CS 3700: Computer Networks, Spring 2020 Dr. Weiying Zhu
Problem F. The initial ssthresh is 16, the sender experiences a 3-duplicate-ACKs event right after the 9th transmission round in both
Tahoe and Reno cases, and then the sender experiences a timeout event right after the 16th round in a TCP Tahoe case and after
right after the 19th round in a TCP Reno case, FILL the following table to illustrate the congestion window size in segments (cwnd)
and ssthresh as functions of transmission round for the time from the 1st to the 22th round if (a) TCP Tahoe is used for congestion
control; and (b) TCP Reno is used for congestion control. (Hint: be aZaUe WhaW Whe figXUe iQ Whe VOide WiWOed ³TCP: VZiWchiQg fURP VORZ
VWaUW WR CA´ iOOXVWUaWeV bRWh caVeV iQ Whe VaPe gUaSh.)
TCP Tahoo TCP Reno
Trans. Round cwnd ssthresh Trans. Round cwnd Ssthresh
1st 1st
2nd 2nd
3rd 3rd
4th 4th
5th 5th
6th 6th
7th 7th
8th 8th
9th 9th
10th 10th
11th 11th
12th 12th
13th 13th
14th 14th
15th 15th
16th 16th
17th 17th
18th 18th
19th 19th
20th 20th
21st 21st
22nd 22nd
1
Slow
start I 16 1 16
Z 2
4 4
O O G O
9 9
10 10
send 1212 6
congestionAvoidance
DuplicateAck 12 Vaclaq soupAck 12 Cwnd 55th
sendmissing timeout said 1212
y
1212 3 Sendmissing packet RxMT FASTRxMT8 l 6 RXTX 8 9 9 pkt
ssth cwndl2 BYrt 2 6 10 9
cwnd I 4 11
6 12
B
OO 14
9 15 V
Rcu Send 1612
ACK16 70 VACKIG 16 q
l 1012 5 q 8
Z 9
4 10
O
O 11
9 12
10 V B V
Problem A
a TheTCP sequencenumber field size is calculatedby
4 x 8 32 bits
232 possible sequencenumbers
The sequencenumber of bit are 232 so the maximum file
size that can be sent from Host A to B equals
32 4294967296 L possible sequencenumbers 2
10243 GB's
4GB Max file size
the sequence number increments by length or bytes of data being sent The Max file size won't depend on MSS here
b Nunn of segments
gygg
1001624 836segments x 66bytes
66107239.16 bytes
66107239 16 t 232
436107435 Total bytes xmt
Total time Tat 436107435 8 bits
155 Mbps
249 seconds
Problem B
a Thefirst segment sequencenumber is 127 the source port is 302
The destination portnumber is 80
b sequence number ofthe 1st segment length ofdatagram inbytes
2ndsegment number 127 t 80 2070
The source port and destination are the same 302,80
Also the acknowledgement number is 207 if the first segment arrives before the secondsegment
c 127 indicating that Biswaiting for bytesgreaterthan the
current sequence
Host A Host B
d
seq 122 80bytes timeout
interval Ack 207
Seq207 40 bytes
2 Ack 247
seq127 80 bytes Ack 247
timeout L
interval I
Problem C
a round Ual 4896 1280 3616 data bytes
b Sender can send a minimum of 3616 2560 1056 bytes
Problem D
a HostA sends TCP SYNpacket to HostB
B recieves A's star
B sends SYN ACK
A recieves B SYN ACK
A sends ACK
B recieves ACK
Connected
A B
b SYN Three wayhandshake
a SYN ACK
ACK 7
Connected
c 58
d 125
Problem F
Client Server
activedose byte 1742 F N M passiveclose
close Ack M
L fine N close byte 6,029
ACK Ntl
a FIN occupies one byte of thesequencenumber The ACK
of each FIN is the sequencenumber of the FuN plus one
There is a possibility For the data to Flow half closed
From the end doing a passive close to the end doing the
active close
b TCP segments the sender and reliever of each TCP
segment of client to server server to client
First The server recieves clients FIN M packet client to server
second 8 client recieves server's ACK Mtl packet server to client
third client recieves server's FINN packet server to client
fourth Server recieves clients ACK Ntl packet client to serve