What Is Dead Peer Detection (DPD)?
Dead Peer Detection (DPD) is a method of detecting whether the peer is alive. The local end sends DPD request packets to the peer end to detect whether the peer end is alive.
- If the local end does not receive a DPD response packet from the peer end within the DPD packet retransmission interval, the local end retransmits the DPD request packet. If the local end still does not receive a DPD response packet from the peer end after having made the maximum number of retransmission attempts, it considers the peer already dead, clears the IKE SAs and the IPsec SAs established with the peer end, and notifies the peer end about clearing the SAs.
- A DPD packet is a bidirectional message, which contains the notify and hash payloads.
DPD requests are sent as R-U-THERE messages, which correspond to HELLO packets, and DPD responses are sent as R-U-THERE-ACK messages, which correspond to ACK packets.
The default sequence of payloads in DPD packets sent by different devices may be different. The sequence of payloads in DPD packets sent by IKE peers at both ends must be the same. Otherwise, DPD will not take effect.
During IPsec communication between IKE peers, only the sequence of payloads in DPD packets needs to be matched. If IPsec traffic is transmitted between IKE peers in a normal way, no DPD message will be sent. A DPD message is sent only when no IPsec packet is received from the peer end within a period of time.
DPD Configurations
DPD configurations include the detection mode, detection time, and packet format. For example, on a Huawei device, DPD can be configured globally or on an IKE peer. During IPsec communication, the DPD configuration parameters on the IKE peer are preferentially used. If DPD is not configured on the IKE peer, the global DPD configuration is used.
- Detection modes: on-demand detection and periodic detection. By default, Huawei devices do not support the global detection mode. Huawei devices decide whether to use DPD or not based on whether the peer end uses DPD or not.
On-demand detection mode: If the local end needs to send IPsec packets to the peer end, it checks the time the last IPsec packet was received from the peer end. If the interval exceeds the DPD idle time, DPD detection is triggered and the local end sends DPD request packets to the peer end.
Periodic detection mode: If the local end needs to send IPsec packets to the peer end, it checks the time the last IPsec packet was received from the peer end. If the interval exceeds the DPD idle time, the local end sends DPD request packets to the peer end.
- DPD configuration parameters: includes the DPD idle time, DPD packet retransmission interval, and number of retransmission times. By default, the DPD idle time is 30s, the DPD packet retransmission interval is 15s, and the maximum number of DPD packet retransmissions is 3 on Huawei devices.
- Packet formats: seq-hash-notify and seq-notify-hash. By default, the sequence of the payload in DPD packets is seq-hash-notify.
If DPD packets are not configured at both ends of an IPsec tunnel and no traffic is transmitted over the tunnel, the local and peer ends wait for the SA lifetime to expire. Before the SA lifetime expires, hard negotiation is initiated. If the negotiation fails, the local end tears down the SA and notifies the peer end about clearing the SA. The SA can be restored only after the next data flow triggers negotiation.
If the SA is torn down on one end but not on the other end due to network faults, service traffic cannot be forwarded. In this case, wait until the SA lifetime expires or manually clear the SA.
HUAWEI CLOUD DPD Configurations
Detection mode: on-demand
Detection time: The idle time is 30s, the retransmission interval is 15s, and the maximum number of retransmissions is 3.
Packet format: seq-hash-notify
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.