Final answer:
When in COOKIE-WAIT state, an SCTP association needs to send a COOKIE-ECHO chunk in response to an INIT chunk.
Step-by-step explanation:
When an SCTP association is in the COOKIE-WAIT state and it receives an INIT chunk, it needs to do the following:
- Send a COOKIE-ECHO chunk in response to the INIT chunk.
- Generate a Cookie Parameter containing the state of the association, the source and destination IP addresses, and the verification tag of the INIT chunk.
- Add the generated Cookie Parameter to the COOKIE-ECHO chunk.
The COOKIE-ECHO chunk is then sent back to the peer, which will eventually lead to the association transitioning out of the COOKIE-WAIT state.
When an SCTP (Stream Control Transmission Protocol) association is in the COOKIE-WAIT state and it receives an INIT chunk, the endpoint should resend the INIT-ACK with the State Cookie it had previously transmitted. According to the SCTP protocol specification (RFC 4960), in the COOKIE-WAIT state, the endpoint is waiting for a COOKIE ECHO chunk in response to the INIT-ACK it has sent after receiving the initial INIT chunk from its peer.
If it receives another INIT instead, this typically indicates that the INIT-ACK may have been lost or the peer did not receive it; therefore, the endpoint should retransmit the INIT-ACK including the cookie. This ensures the robustness of the SCTP handshake process and helps to establish the association reliably.