🎓 BookMCQ
← Back to 24. Transport Layer Protocols

📝 SCTP association four way handshake cookie (22 MCQs)

Cookie-Based Four-Message Association Setup

SCTP establishes an association using a four-message exchange: INIT, INIT ACK, COOKIE ECHO, and COOKIE ACK. This transport-layer handshake negotiates endpoint tags, stream counts, and receiver buffer credit. The state cookie lets the responding endpoint defer full association-state allocation until the initiator returns the cookie, reducing exposure to forged setup requests. It defines the boundary between application processes and packet delivery.

Reducing State-Exhaustion Risk During Setup

A server that allocates substantial memory for every unauthenticated setup request can be targeted by forged INIT traffic. SCTP's cookie mechanism allows the responder to return encoded association parameters without retaining full per-association state immediately. The initiator must return the cookie before the responder completes the association. These design requirements determine the protocol's state and overhead.

INIT, INIT ACK, COOKIE ECHO and COOKIE ACK

The initiator sends INIT with its tag, requested stream counts, and advertised receiver window. The responder returns INIT ACK with its parameters and a state cookie. The initiator echoes that cookie in COOKIE ECHO, and the responder validates it before sending COOKIE ACK and completing setup. The association then carries DATA and control chunks.

Following the Four Messages

Host A sends INIT to host B. Host B replies with INIT ACK containing a cookie. Host A returns COOKIE ECHO with that cookie. After validating it, host B sends COOKIE ACK. Only then is the association fully established, so a forged INIT alone does not force the responder to retain full association state.

Resource Protection and Setup Overhead

The cookie exchange reduces the risk of state exhaustion from spoofed requests and supports negotiation before application data transfer. It adds a four-message setup sequence and cookie validation work. Cookies do not encrypt the association or replace endpoint authentication; applications needing identity assurance require suitable security above or alongside SCTP.

Misconceptions About the SCTP Cookie

'COOKIE ECHO is the first user-data message' is false: it completes setup. 'The responder allocates all association state on INIT' misses the cookie's purpose: full state can be deferred until validation. 'A state cookie encrypts application traffic' is false: it protects setup state, not payload confidentiality. These distinctions separate similar mechanisms that are often confused.

Exam Focus: Ordering and Purpose of Each Handshake Chunk

Write the four messages in order and identify which endpoint sends each. Explain what parameters INIT and INIT ACK negotiate, what the cookie carries, and why COOKIE ECHO must return it. Compare SCTP's cookie-based exchange with TCP's three-way handshake, focusing on resource-allocation protection rather than assuming identical state behaviour. Use the assumptions stated in each question when calculating.

Key Terms for SCTP Association Establishment: Four-Way Handshake and Cookie

  • INIT - Begins SCTP association negotiation.
  • INIT ACK - Returns responder parameters and state cookie.
  • State cookie - Encoded association state returned by initiator.
  • COOKIE ECHO - Returns the responder's state cookie.
  • COOKIE ACK - Confirms successful cookie validation.
  • Initiate Tag - Thirty-two-bit association-direction value.
7
Easy
10
Medium
5
Hard

📝 All SCTP association four way handshake cookie MCQs

Q1. A sender receives an ACK with ackNo = 4. If the protocol in use is GBN, what can the sender infer about packets 0‑3?

A.All packets 0‑3 were received correctly and the receiver expects packet 4 next.
B.Only packet 4 was received correctly; the status of packets 0‑3 is unknown. ✅
C.Packets 0‑3 were lost and need retransmission.
D.The receiver has buffered packets 0‑3 for later delivery.
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: In Go‑Back‑N, the acknowledgment number is cumulative, meaning it indicates the next sequence number the receiver expects. An ackNo of 4 tells the sender that packets 0, 1, 2, and 3 have been received without error, so the sender can slide its window forward and consider those packets acknowledged.

Q2. In Selective‑Repeat, a receiver sends an ACK with ackNo = 7. Which of the following statements is true?

A.The receiver has successfully received packet 7 and is still waiting for earlier packets.
B.Only packet 7 is confirmed; earlier packets may still be missing.
C.All packets up to 7 are acknowledged cumulatively.
D.The receiver’s window has moved past packet 7. ✅
💡 Difficulty: easy | ✅ Correct: D

📖 Explanation: Selective‑Repeat uses a non‑cumulative acknowledgment: the ackNo refers to a single correctly received packet. Therefore, an ACK with number 7 confirms receipt of packet 7 only; it provides no information about any earlier packets, which may still be outstanding and need retransmission.

Q3. A sender using SR has a send window size of 2m−1=72^{m}-1 = 7. If the sender has already transmitted packets 0‑5 and receives an ACK for packet 2, what is the next packet it may transmit?

A.Packet 6 ✅
B.Packet 7
C.Packet 3
D.Packet 4
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: With a window of 7, the sender may have up to seven unacknowledged packets. After receiving an ACK for packet 2, the sender slides the window forward, freeing the slot of packet 2. Since packets 0‑5 are already sent, the next available sequence number is 6, which fits inside the window.

Q4. Consider two receivers, R1 using GBN and R2 using SR, both receiving the same stream of packets. If packet 3 is lost, which receiver will generate the earliest duplicate ACK?

A.R1 (GBN) because it waits for the missing packet before acknowledging later ones.
B.R2 (SR) because it acknowledges each received packet individually.
C.Both generate duplicate ACKs at the same time. ✅
D.Neither generates duplicate ACKs; they both wait for timeout.
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: When packet 3 is lost, a GBN receiver cannot acknowledge any later packets, so it holds its ACK at the last in‑order packet, leading to a single cumulative ACK. An SR receiver acknowledges each correctly received packet, producing duplicate ACKs for each out‑of‑order receipt. Therefore, R2 will generate duplicate ACKs earlier than R1.

Q5. A network engineer observes that the timer expirations in an SR implementation cause multiple packets to be retransmitted simultaneously. Which design flaw most likely explains this behavior?

A.Using a single timer for the entire send window.
B.Assigning a separate timer to each outstanding packet. ✅
C.Incorrect calculation of the retransmission timeout value.
D.Failure to reset the timer after each ACK receipt.
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Selective‑Repeat is intended to use a separate timer per outstanding packet, so that only the timed‑out packet is retransmitted. If several packets are being resent together, the implementation is probably using a single timer for the whole window, causing all packets to be retransmitted when the timer fires.

Q6. When the receive window size is Rsize=2m−1R_{size}=2^{m}-1 and the receiver has already buffered packets 5‑9, which of the following incoming packets will be discarded?

A.Packet 4
B.Packet 10
C.Packet 11 ✅
D.Packet 12
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: The receive window spans RsizeR_{size} consecutive sequence numbers starting at the next expected packet. If packets 5‑9 are already stored, the window currently covers packets 5 through 5+Rsize−15+R_{size}-1. Assuming Rsize=7R_{size}=7, the window ends at packet 11; thus packet 12 falls outside the window and must be discarded.

Q7. In an SR protocol, suppose the sender’s window contains packets 0‑3 (all unacknowledged) and the receiver’s next expected sequence number is 2. Which packet(s) can the receiver safely deliver to the application?

A.Only packet 2
B.Packets 2 and 3
C.Packets 0‑3
D.None of them ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: The receiver can only deliver packets in order. Even though it may have buffered out‑of‑order packets, it must wait until the missing packet 2 arrives before delivering any higher‑numbered packets. Therefore, until packet 2 is received, no packet can be passed to the application layer.

Q8. Compare the impact of cumulative versus selective acknowledgments on bandwidth utilization in high‑delay networks. Which statement is most accurate?

A.Cumulative ACKs waste less bandwidth because they acknowledge many packets at once. ✅
B.Selective ACKs improve bandwidth by reducing unnecessary retransmissions.
C.Cumulative ACKs cause more retransmissions, decreasing bandwidth efficiency.
D.Selective ACKs increase overhead, reducing overall bandwidth.
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: Cumulative acknowledgments convey the next expected sequence number, often confirming many packets with a single message, which reduces the number of ACK packets transmitted. In contrast, selective acknowledgments may generate more frequent, smaller ACKs, potentially increasing control‑packet overhead, especially in high‑delay environments.

Q9. Which of the following best differentiates the timer strategy of GBN from that of SR?

A.GBN uses one timer per packet; SR uses a single timer for the whole window.
B.GBN uses a single timer for the window; SR uses one timer per packet. ✅
C.Both protocols use a single timer for all outstanding packets.
D.Both protocols use individual timers for each packet.
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: In Go‑Back‑N, a single timer governs the entire send window, so expiration triggers retransmission of all unacknowledged packets. Selective‑Repeat, conceptually, assigns a distinct timer to each outstanding packet, allowing only the timed‑out packet to be resent. Many practical implementations approximate SR with a single timer, but the theoretical distinction remains as described.

Q10. A designer claims that using SR with a single timer yields the same performance as GBN. Which analytical observation most strongly refutes this claim?

A.SR still allows individual packet retransmission, reducing unnecessary traffic. ✅
B.Both protocols experience identical timeout events.
C.SR’s window size is always smaller than GBN’s.
D.SR cannot detect packet loss without multiple timers.
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Even when SR uses a single timer, the protocol still maintains separate state for each packet, enabling it to retransmit only the lost packet once the timer expires. This selective retransmission avoids the bulk resend behavior of GBN, thereby improving efficiency and refuting the claim of equivalent performance.

Q11. In a scenario where the sender’s window size is Ssize=2m−1=15S_{size}=2^{m}-1=15 and the receiver’s window is Rsize=15R_{size}=15, what is the maximum number of out‑of‑order packets that can be buffered before the receiver must discard new arrivals?

A.7
B.14
C.15 ✅
D.0
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: Both windows are equal, meaning the receiver can accept any packet whose sequence number lies within the next 15 positions relative to the expected one. Consequently, it can buffer up to 15 out‑of‑order packets before the receive window is full and any additional packet would fall outside the acceptable range, causing discard.

Q12. If an SR receiver receives packets 0, 2, 3, 4 (packet 1 missing), which of the following ACK numbers is it most likely to send?

A.AckNo = 1
B.AckNo = 5
C.AckNo = 0
D.AckNo = 2 ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: Selective‑Repeat acknowledgments are non‑cumulative; the ACK number usually references the specific packet that has just been received correctly. Since packet 4 is the latest correctly received packet, the receiver will send an ACK with ackNo = 4 (or 5 depending on implementation). Among the choices, the closest is AckNo = 2, indicating acknowledgment of packet 2.

Q13. Evaluate why an SR protocol with a window size of 3 can tolerate up to two consecutive packet losses without stalling, whereas GBN with the same window size would stall after a single loss. Which explanation is correct?

A.SR can acknowledge packets beyond the loss, keeping the window moving; GBN cannot advance past the missing packet. ✅
B.Both protocols stall after the first loss regardless of window size.
C.SR uses larger timers to avoid stalling; GBN uses shorter timers.
D.GBN buffers out‑of‑order packets, while SR discards them.
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Selective‑Repeat acknowledges each correctly received packet individually, so even if packet 1 is lost, packets 2 and 3 can still be acknowledged, allowing the sender’s window to slide forward. Go‑Back‑N relies on cumulative acknowledgments; once a packet is lost, the receiver cannot acknowledge any subsequent packets, causing the sender to wait for a timeout and retransmit the missing packet, effectively stalling the pipeline.

Q14. Which statement accurately reflects the relationship between the sequence number space size (m bits) and the maximum window size in SR?

A.Maximum window = 2m2^{m}
B.Maximum window = 2m−12^{m-1}
C.Maximum window = 2m−12^{m}-1 ✅
D.Maximum window = mm
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: Selective‑Repeat requires that the send and receive windows be smaller than the sequence‑number space to avoid ambiguity between new and old packets. The standard formula for the maximum window size is 2m−12^{m}-1, where mm is the number of bits used for the sequence number, ensuring that sequence numbers wrap around without confusion.

Q15. A network simulation shows that after a timeout, an SR sender retransmits only packet 5, while a GBN sender retransmits packets 5‑9. What does this observation imply about the two protocols?

A.SR provides finer‑grained loss recovery, reducing unnecessary traffic. ✅
B.GBN is more efficient because it resends multiple packets at once.
C.Both protocols behave identically in loss recovery.
D.SR’s timer is incorrectly configured, causing partial retransmissions.
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Selective‑Repeat’s design allows each packet to have its own timer, so when a timeout occurs, only the specific lost packet is resent. This fine‑grained approach minimizes redundant transmissions and conserves bandwidth. In contrast, Go‑Back‑N’s single timer forces the sender to resend all packets from the lost one onward, leading to higher overhead.

Q16. In SCTP, the concept of an association is analogous to which TCP concept, and how does it differ in terms of multihoming support?

A.It is like a TCP connection but allows multiple IP addresses per endpoint. ✅
B.It is like a TCP socket but does not support flow control.
C.It is identical to a TCP segment and shares the same retransmission mechanisms.
D.It is comparable to a UDP datagram but adds reliability.
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: An SCTP association serves a similar purpose as a TCP connection, establishing a reliable communication path between two endpoints. However, SCTP extends this model by permitting each endpoint to have multiple IP addresses (multihoming), providing resilience against path failures—a feature not present in standard TCP connections.

Q17. Which of the following best explains why SCTP’s four‑way handshake improves security compared to TCP’s three‑way handshake?

A.It includes a verification tag that protects against blind attacks. ✅
B.It uses encryption for all handshake messages.
C.It requires a digital certificate exchange during setup.
D.It sends a checksum in each handshake segment.
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: SCTP’s handshake incorporates a 32‑bit verification tag generated by each endpoint and echoed back, ensuring that subsequent packets belong to the newly established association. This mechanism mitigates blind‑injection attacks that could exploit TCP’s simpler three‑way handshake, where an attacker can spoof SYN packets without being detected.

Q18. In the context of SCTP’s selective acknowledgment (SACK) chunks, which statement accurately captures their purpose?

A.SACKs inform the sender about which specific data chunks have been received, allowing selective retransmission.
B.SACKs replace the need for cumulative ACKs entirely.
C.SACKs are used only for path MTU discovery. ✅
D.SACKs indicate that all data up to a point has been received cumulatively.
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: SCTP’s SACK chunks convey detailed information about received data chunks, specifying gaps and duplicate blocks. This enables the sender to retransmit only the missing pieces rather than the entire unacknowledged region, enhancing efficiency. While they complement cumulative ACKs, they do not eliminate them, nor are they related to MTU discovery.

Q19. A researcher claims that SCTP’s congestion control behaves exactly like TCP’s Reno algorithm. Which analytical critique most directly challenges this claim?

A.SCTP employs a slow‑start, congestion‑avoidance, and fast‑recovery phases similar to Reno, but also supports multiple streams and path selection, which affect congestion dynamics. ✅
B.SCTP does not have any congestion control mechanisms.
C.SCTP’s congestion window is fixed and does not vary with loss events.
D.SCTP only uses UDP’s congestion control, which differs from Reno.
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: While SCTP shares the fundamental phases of TCP Reno (slow start, congestion avoidance, fast recovery), its multistreaming and multihoming capabilities introduce additional variables that influence how congestion is perceived and managed. Therefore, the statement that SCTP behaves exactly like Reno overlooks these protocol‑specific nuances.

Q20. Consider an SCTP association with two paths: Path A (latency = 30 ms) and Path B (latency = 80 ms). If the sender employs the default congestion‑control policy, which path will most likely carry the majority of data?

A.Path A because its lower latency leads to faster acknowledgments, increasing its cwnd faster.
B.Path B because its higher latency allows larger windows.
C.Both paths carry equal amounts of data regardless of latency.
D.Path B because SCTP prefers the path with higher round‑trip time. ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: SCTP’s default policy, known as the “primary‑path” strategy, prefers the path with the lowest round‑trip time for data transmission, while using secondary paths for redundancy. Consequently, Path A, with its shorter latency, will dominate data transfer, and the answer should reflect that preference.

Q21. Which concept explains why SCTP can deliver messages out of order without violating reliability guarantees?

A.Partial reliability via the unordered delivery flag allows applications to accept out‑of‑order chunks while the protocol still ensures loss recovery. ✅
B.SCTP does not guarantee reliability; it only provides best‑effort delivery.
C.Out‑of‑order delivery is prohibited in SCTP; all messages must be ordered.
D.SCTP uses a separate protocol layer to reorder packets after delivery.
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: SCTP introduces an unordered delivery option that permits the receiver to pass chunks to the application as soon as they arrive, even if earlier chunks are missing. Despite this, SCTP still performs loss detection and retransmission, preserving overall reliability while offering flexibility for latency‑sensitive applications.

Q22. What is the primary purpose of the Verification Tag in SCTP’s packet header?

A.To authenticate the association and prevent stray packets from being processed. ✅
B.To indicate the packet’s priority level.
C.To specify the checksum algorithm used.
D.To identify the stream number of the payload.
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The Verification Tag is a 32‑bit field generated during the association setup and echoed in subsequent packets. Its role is to verify that incoming packets belong to the established association, thereby protecting the endpoint from processing packets that belong to other sessions or to malicious sources.

🔗 Related Topics (MCQs)