TCP Sequence and Acknowledgment Number Flashcards
Predict TCP Seq and Ack from short original traces. Work through byte ranges, SYN and FIN arithmetic, cumulative ACKs, and Wireshark relative numbers.
ఈ డెక్ గురించి
A TCP receiver gets 24 in-order data bytes starting at Seq=6100. Which byte comes next? These 38 flashcards give networking students and beginners short, original traces to work through one question at a time.
Start by turning a starting Seq and a payload length into byte positions, the sender's next Seq, and the receiver's next Ack. Work backwards from ACKs to find which bytes they cover and where a gap begins. Then follow the two directions of a TCP connection through data, ACK-only segments, a three-way handshake, and FIN. Later traces ask how a gap holds the cumulative ACK and what happens when the missing bytes arrive, which Seq a retransmission reuses, and how to read or convert Wireshark's relative numbers when the capture includes the handshake.
These are byte-position drills. ACK and retransmission timing, SACK blocks, window sizes, and sequence number wraparound each need rules beyond the byte arithmetic used here.
The traces follow RFC 9293 and use Wireshark's relative sequence number display. The original questions, answers, arrangement, and description are available under CC0 1.0 to the extent rights apply.
ఈ డెక్లోని కార్డులు
కార్డు 1
ప్రశ్న
A TCP data segment has
Seq=6400and 37 payload bytes, with no SYN or FIN. What sequence number does its last payload byte occupy?సమాధానం
6436. The first byte is6400, so the last is6400 + 37 - 1.కార్డు 2
ప్రశ్న
B expects TCP byte
1800from A and has nothing buffered beyond it. B accepts 64 payload bytes starting there, with no FIN. What Ack does B send?సమాధానం
Ack=1864. B has bytes1800–1863in order and expects1864next.కార్డు 3
ప్రశ్న
A sends 35 new TCP payload bytes at
Seq=4210, with no SYN or FIN. What Seq does A use when it next sends new data on this connection?సమాధానం
Seq=4245. The 35 bytes occupied positions4210–4244in A's stream.కార్డు 4
ప్రశ్న
A TCP segment from B to A has the ACK flag set and shows
Seq=9142, Ack=2768. Whose byte stream does the Ack refer to?సమాధానం
A's stream, from A to B. B puts its own sequence position in Seq and its next expected position from A in Ack.
కార్డు 5
ప్రశ్న
A TCP segment covers payload byte positions
3092through3122, inclusive. How many payload bytes does it carry?సమాధానం
31bytes. Count both endpoints, so3122 - 3092 + 1 = 31.కార్డు 6
ప్రశ్న
B has received some of A's TCP payload in order and sends
Ack=6731. No FIN has arrived. What is the last contiguous payload byte position of A's stream that this ACK covers?సమాధానం
6730. The ACK points one position beyond the contiguous data.కార్డు 7
ప్రశ్న
A sends an ordinary TCP ACK-only segment with
Seq=7350, Ack=1906. What Seq does A use when it sends its first new data after that ACK?సమాధానం
Seq=7350, the same as the ACK-only segment. An ACK with no payload, SYN or FIN uses no sequence space.కార్డు 8
ప్రశ్న
B expects TCP byte
3500from A. It receives 42 payload bytes atSeq=3500, then 23 more atSeq=3542. Neither segment carries a FIN and B has no later bytes buffered. What Ack would cover both segments?సమాధానం
Ack=3565. B has one continuous run of42 + 23bytes from3500.కార్డు 9
ప్రశ్న
The first TCP handshake segment is a SYN with the ACK flag clear. A trace shows a raw acknowledgment field of
0. What has this segment acknowledged?సమాధానం
It carries no acknowledgment. The ACK flag must be set for the acknowledgment field to have meaning.
కార్డు 10
ప్రశ్న
B expects TCP byte
8150from A and has no later bytes buffered. B accepts one complete data segment from8150with no FIN and replies withAck=8226. How many payload bytes did that segment carry?సమాధానం
76bytes. The entire segment was received in order, so its payload length is8226 - 8150.కార్డు 11
ప్రశ్న
B's next TCP send position is
5521. A sends B 80 bytes, which B receives in order. B now sends a data reply. What Seq does B use?సమాధానం
Seq=5521. Receiving A's data moves B's acknowledgment of A, while B's Seq starts at B's own send position.కార్డు 12
ప్రశ్న
B's TCP Ack for A advances from
2301to2397during a data-only exchange. Can you tell from those two values how many segments carried the newly acknowledged bytes?సమాధానం
No. The ACK advance covers 96 bytes of A's stream, and those bytes could have arrived in one segment or several.
కార్డు 13
ప్రశ్న
A opens a TCP connection with a SYN at
Seq=4260and no payload. What Ack does B send in the SYN-ACK?సమాధానం
Ack=4261. The SYN takes one position in A's sequence space.కార్డు 14
ప్రశ్న
A sends two TCP data segments, 40 bytes at
Seq=7100and 30 bytes atSeq=7140, with no FIN. B sendsAck=7154. How many bytes of the second segment does that ACK cover?సమాధానం
14bytes. The ACK covers positions7140–7153of the second segment.కార్డు 15
ప్రశ్న
B sends an ordinary TCP ACK-only segment at
Seq=6024. B then receives more in-order data from A and sends another ACK-only segment, with no sends in between. What Seq does B use for the second ACK?సమాధానం
Seq=6024. B has sent no new payload or sequence-consuming control since the first ACK.కార్డు 16
ప్రశ్న
B expects TCP position
9180from A and accepts an in-order FIN withSeq=9180and no payload. What Ack does B send for it?సమాధానం
Ack=9181. The FIN occupies one position even with zero payload bytes.కార్డు 17
ప్రశ్న
A starts a TCP handshake with a SYN at
Seq=6820and B replies with a SYN-ACK atSeq=12400. The handshake carries no payload. What is A's Seq on the final ACK?సమాధానం
Seq=6821. A's SYN used one position in A's own sequence space.కార్డు 18
ప్రశ్న
B expects TCP byte
5800from A. Before it gets that byte, B receives and buffers 28 payload bytes starting atSeq=5840. If B sends an ACK before it accepts any more data, what Ack does it carry?సమాధానం
Ack=5800. The later bytes are buffered, and5800is still the first missing byte.కార్డు 19
ప్రశ్న
B has been sending
Ack=4080for A on an open TCP connection. B now sends 32 bytes of its own data atSeq=7400with the ACK flag set. B has received no new bytes or FIN from A. What Ack goes on B's data segment?సమాధానం
Ack=4080. B's payload uses B's sequence space, while B's Ack still tracks what B expects from A.కార్డు 20
ప్రశ్న
A full TCP handshake in Wireshark shows both peers' SYNs at
Seq=0with relative sequence numbers enabled. What does the displayed zero mark for each peer?సమాధానం
That peer's initial sequence number, shown as zero. Each direction has its own starting point.
కార్డు 21
ప్రశ్న
A sends a SYN at
Seq=2610and receives B's SYN-ACK atSeq=15390. Neither carries payload. What Ack does A put in its final TCP handshake segment?సమాధానం
Ack=15391. A is acknowledging B's SYN, which occupied position15390in B's stream.కార్డు 22
ప్రశ్న
A's TCP data segment carrying bytes
7408–7440fails to reach B. A later retransmits exactly those 33 bytes in a segment with no SYN or FIN. What Seq does the retransmission carry?సమాధానం
Seq=7408. The same bytes keep their original sequence numbers.కార్డు 23
ప్రశ్న
On an established TCP connection, A sends a segment at
Seq=4860with 19 payload bytes and a FIN. Which sequence position does the FIN occupy?సమాధానం
4879. The payload occupies4860–4878, and the FIN comes immediately after it in sequence space.కార్డు 24
ప్రశ్న
B sends TCP
Ack=3104to A and has buffered all bytes3140–3168. Those are the first bytes B has beyond the gap. Which byte positions are missing between the contiguous data and that buffered block?సమాధానం
3104–3139, inclusive. The gap starts at Ack and ends just before the first buffered byte.కార్డు 25
ప్రశ్న
With the complete TCP handshake captured, Wireshark shows A's SYN at relative
Seq=0. Its raw Seq is43160. What relative Seq will Wireshark show for a later A segment with rawSeq=43373?సమాధానం
Seq=213. Subtract A's raw SYN position,43373 - 43160.కార్డు 26
ప్రశ్న
B initially sends TCP
Ack=4608to A. B later sendsAck=4763. Only data advances A's sequence space between those two points. Which byte positions did the second ACK newly cover?సమాధానం
4608–4762, inclusive. Start at the old Ack and stop one before the new Ack.కార్డు 27
ప్రశ్న
An established TCP connection carries these two data segments. A expects TCP byte
9040from B and accepts B's entire reply. Neither segment carries a FIN, and A has no later bytes from B buffered.A → B Seq=1120 72 payload bytes B → A Seq=9040 Ack=1192 58 payload bytesWhat Ack does A send back?
సమాధానం
Ack=9098. Add the 58 in-order bytes to B's starting Seq of9040.కార్డు 28
ప్రశ్న
B expects TCP byte
2700from A and has kept all bytes2790–2829in its buffer. B now receives and accepts 55 payload bytes atSeq=2700. What Ack does B send?సమాధానం
Ack=2755. The new bytes fill2700–2754and leave a gap before the buffered block.కార్డు 29
ప్రశ్న
B has sent TCP data through byte
3962. A sends a FIN and B acknowledges it with an ACK-only segment. B stays open for sending. What Seq does B use for its next new payload?సమాధానం
Seq=3963. A's FIN takes a position in A's stream, and B's ACK-only reply uses none of B's positions.కార్డు 30
ప్రశ్న
B expects TCP byte
6240from A. B receives a duplicate copy of bytes6200–6239, which it already has. If B sends an ACK for this arrival, what Ack does it carry?సమాధానం
Ack=6240. The duplicate covers only positions B had already received in order.కార్డు 31
ప్రశ్న
B expects TCP position
5540from A. It accepts a segment there with 27 payload bytes and a FIN. What Ack does B send after accepting both the data and the FIN?సమాధానం
Ack=5568. Add 27 for the payload and one for the FIN.కార్డు 32
ప్రశ్న
B expects TCP byte
4800from A. B keeps bytes4840–4874and4875–4903in its out-of-order buffer. It then receives and accepts all of4800–4839. What cumulative Ack does B send now?సమాధానం
Ack=4904. The newly received bytes join both buffered blocks into one continuous run through4903.కార్డు 33
ప్రశ్న
Wireshark captured both TCP SYNs. A's raw SYN Seq is
51000and B's is87000. A later sends B a segment that Wireshark shows with relativeAck=97. What raw Ack is in A's segment?సమాధానం
Ack=87097. A's Ack refers to B's stream, so add 97 to B's raw SYN position.కార్డు 34
ప్రశ్న
During a TCP data exchange, B sends A the same cumulative
Ack=6900after two successive arrivals. Did B's in-order byte range from A grow between those ACKs?సమాధానం
No. Both ACKs still point to
6900, the next byte B expects from A.కార్డు 35
ప్రశ్న
A opens a TCP connection with a SYN. B replies with a SYN-ACK. Whose initial sequence number goes in the Seq field of B's reply?
సమాధానం
B's. Each peer announces its own initial sequence number in its SYN.
కార్డు 36
ప్రశ్న
B expects TCP byte
5600from A. Bytes5650–5699arrive out of order and B discards them. B then accepts bytes5600–5649, and no other data arrives. What Ack does B send?సమాధానం
Ack=5650. B has the first block in order. The discarded block is still missing at5650.కార్డు 37
ప్రశ్న
A and B have an established TCP connection. A sends the new data shown below. Before it reaches B, A also receives the segment shown from B.
A → B Seq=2240 36 payload bytes B → A Seq=9480 Ack=2240 20 payload bytesNeither segment carries a FIN. A was expecting byte
9450from B, so it buffers B's later bytes. A's next segment is a pure ACK. What Seq does A use on that ACK?సమాధానం
Seq=2276. A's send position advanced by 36 bytes. The gap in B's stream affects A's Ack field.కార్డు 38
ప్రశ్న
B sends a TCP ACK with
Ack=7794after accepting A's FIN in order. This ACK covers A's stream exactly through the FIN. What sequence position did A's FIN occupy?సమాధానం
7793. The FIN occupied the position just before B's next expected sequence number.
38 కార్డులు
TCP Sequence and Acknowledgment Number Flashcards
అధ్యయనం మొదలుపెట్టడానికి Nibomo తెరుచుకుంటుంది.