**Computer Networks: ARQ and TCP 10. [10 pts.] Assuming a TCP session has been i
ID: 3601373 • Letter: #
Question
**Computer Networks: ARQ and TCP
10. [10 pts.] Assuming a TCP session has been initiated between a client and a server, using the known three-way handshake with the following initial sequences: isnc = 1200, and isns = 4800. Assume the client sends has 500 bytes of data to send to the server, and that the server has 5000 bytes of data to reply back with.
a. In the third and last segment of the connection setup phase, what are the values of the following TCP header fields: (SYN, ACK) flags, the segment sequence number, and the acknowledgment number.
b. Find the value of the acknowledgment number field sent by the receiver when it receives the segment that has the last byte of data from the sender.
c. Find the value of the acknowledgment number field sent by the sender when it receives the segment that has the last byte of data from the receiver.
Explanation / Answer
TCP allows clients to run concurrent applications using different port numbers and at full-duplex thereby giving a multiplexing ability. TCP labels each octet of data with a Sequence Number and a series of octets form a Segment, the sequence number of the first octet in the segment is called the Segment Sequence Number. TCP provides reliability with ACK packets and Flow Control using the technique of a Sliding Window. During the setup of a TCP connection the maximum segment size is determined based on the lowest MTU across the network.
The TCP header looks like this:
An Initial Sequence Number (ISN) is a random Sequence Number, allocated for the first packet in a new TCP connection.
Device A sends a segment with the SYN flag set to 1, ACK flag set to 0 and an Initial Sequence Number 1200, which marks the beginning of the sequence numbers for data that device A will transmit. SYN is short for SYNchronize. SYN flag announces an attempt to open a connection.
Segment Sequence number= 1200
The SYN segment also puts the value 1200+1 in the first octet of the data.
Device B (Server) receives Device A's TCP segment and returns a TCP segment with SYN = 1, ACK = 1, ISN = 4800 (Device B's Initial Sequence Number), Acknowledgment Number = 1201 (1200 + 1, the next sequence number Device B expecting from Device A).
Acknowledgment number is increased by 1 if SYN, ACK flags are set in a received TCP packet. If the TCP packet is carrying data, the Acknowledgment number is increased according to the size of the data the packet is carrying.
b) This packet has 500 bytes of data in it then the next packet sent by this station will have the sequence number of
1200 + (500/8) + 1 = 1264.
value of the acknowledgment number field sent by the receiver when it receives the segment that has the last byte of data from the sender=1264
Host 1 receives this SYN-ACK segment and sends an ACK segment containing the next sequence number (4800+y where y is the number of octets in this particular segment), this is called Forward Acknowledgement .
Number of octets=5000/8=625
So here y=625
Acknowledgement number= 4800+625=5425
value of the acknowledgment number field sent by the sender when it receives the segment that has the last byte of data from the reciever=5425
The ACK segment is identified by the fact that the ACK field is set. Segments that are not acknowledged within a certain time span, are retransmitted.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.