What Are the Timeout Mechanism of CAPWAP Link and Timeout Period Calculation?
Timeout mechanism of CAPWAP link:
- The timeout of CAPWAP link is detected by using keepalive (UDP port 5247) and echo (UDP port 5246) packets.
- The keepalive packets detect the status of Link Layer Protocols.
- The echo packets detect the status of Link Control Protocols (LCPs).
- The AP sends the keepalive and echo packets. The AC sends response packets when receiving the keepalive and echo packets.
- After the CAPWAP enters Run state, the AP periodically sends the keepalive and echo packets at almost the same time. This interval is configured on the AC.
- If the AP does not receive response packets from the AC during a certain period of time, the CAPWAP link is considered faulty and enters Down state. This interval is the timeout period.
- If the AC does not receive the keepalive or echo packets from the AP during the timeout period, the CAPWAP link is considered faulty and enters Down state.
Timeout period calculation:
The timeout of CAPWAP link mechanism uses a timer to calculate the timeout period. A timer in the system is a countdown tool. For example, the AP sends keepalive packets at an interval of 30s. When the CAPWAP link enters the Run state, the AP immediately sends a keepalive packet and the timer starts countdown of 30s. After the 30s timer expires, the AP sends the second keepalive packet and the timer starts countdown of 30s again. Then, this process repeats.
The timeout of CAPWAP link period is also calculated using a timer. For example, when the CAPWAP link enters Run state, the AP immediately sends a keepalive packet, and the timer starts a countdown of 120s. When the AC sends a response packet, the timer restarts the countdown of 120s. The timer restarts each time the AP receives a response packet from the AC. If the timer restarts the countdown and the AP does not receive any response packet from the AC, the CAPWAP link is faulty.
The preceding part describes the keepalive timeout period on the AP. The timeout period of echo packets is calculated in the same way as the timeout period of keepalive packets. The timer is updated immediately when an echo packet is received from the AP.