📝 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.
📝 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?
📖 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?
📖 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 . If the sender has already transmitted packets 0‑5 and receives an ACK for packet 2, what is the next packet it may transmit?
📖 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?
📖 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?
📖 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 and the receiver has already buffered packets 5‑9, which of the following incoming packets will be discarded?
📖 Explanation: The receive window spans consecutive sequence numbers starting at the next expected packet. If packets 5‑9 are already stored, the window currently covers packets 5 through . Assuming , 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?
📖 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?
📖 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?
📖 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?
📖 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 and the receiver’s window is , what is the maximum number of out‑of‑order packets that can be buffered before the receiver must discard new arrivals?
📖 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?
📖 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?
📖 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?
📖 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 , where 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?
📖 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?
📖 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?
📖 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?
📖 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?
📖 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?
📖 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?
📖 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?
📖 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.