Q29.Marks: +2.0UGC NET Paper 2: Computer Sc 23rd August 2024 Shift 1
Consider the three way hand shaking process followed during TCP connection establishment between two hosts A and B. Let S and R be two random 32 - bit starting sequence numbers chosen by A and B, respectively. Suppose A sends a TCP segment having SYN bit = 1, SEQ number = S and ACK bit=0 and B accepts the connection request.
Which one of the following choices represents the information present in the TCP segment header that is sent by B to A?
1.SYN bit = 1, SEQ number = S + 1, ACK bit = 0, ACK number = R, FIN bit = 0
2.SYN bit = 0, SEQ number = R, ACK bit = 1, ACK number = S + 1, FiN bit = 0
3.SYN bit = 1, SEQ number = R, ACK bit = 1, ACK number = S + 1, FiN bit = 0✓ Correct
4.SYN bit = 1, SEQ number = R, ACK bit = 1, ACK number = S, FiN bit = 0
Solution
The correct answer is SYN bit = 1, SEQ number = R, ACK bit = 1, ACK number = S + 1, FiN bit = 0
Concept:
In TCP, for Connection Establishment 3way handshake protocol is used.
FIN bit : FIN bit is set while terminating the connection.
Syn bit : Syn bit is used for initiating the request for connection establishment.
Ack bit : Ack bit is used for indicating that the segment contains the acknowledgment.
Sequence Number : In TCP , Sequence number used for counting each byte transferred in a particular connection and in each Segment Header, Sequence number field contains the Sequence number of first byte of data part of the Segment.
Ack Number: In TCP , Ack number indicates the Sequence number of Byte expected next.
Explanation:
GIven:
Next segment will be a piggybacked Acknowledgement segment So Ack bit = 1 and Q will increment the Sequence number ( which it received from P) put this into Ack Number field. Syn = 1 as Q will also establish the connection from Q to P and Sequence number will be Y(As given in Question).
So , SYN bit = 1 SEQ Number = Y ACK bit = 1 ACK number = X+1 FIN bit = 0. Matches with Option 3.