The ipsec sa global-duration command sets the global hard lifetime of IPSec SAs.
The undo ipsec sa global-duration command restores the default global hard lifetime of IPSec SAs.
By default, the global time-based SA hard lifetime is 3600 seconds and the global traffic-based SA hard lifetime is 1843200 Kbytes.
ipsec sa global-duration { time-based interval | traffic-based size }
undo ipsec sa global-duration { time-based | traffic-based }
Parameter | Description | Value |
---|---|---|
time-based interval |
Specifies the time-based global IPSec SA hard lifetime. When a large number of IPSec tunnels are established between two devices, you are advised to set the global IPSec SA hard lifetime to a value larger than or equivalent to 1800s. |
It is an integer that ranges from 30 to 604800, in seconds. |
traffic-based size |
Specifies the traffic-based global IPSec SA hard lifetime. It is recommended that the traffic volume be equal to or larger than the size of IPSec traffic forwarded in 1 hour. |
The value is 0 or an integer from 256 to 200000000, in Kbytes.
During IPSec negotiation between a Huawei device and a Cisco device using IKEv1:
|
Usage Scenario
For a dynamic SA, configure the SA hard lifetime so that the SA can be updated in real time, reducing the crash risk and improving security.
Hard lifetime: specifies the lifetime of an IPSec SA.
When two devices negotiate an IPSec SA, the actual hard lifetime is the smaller of the two values configured on the two devices.
Soft lifetime: specifies the time after which a new IPSec SA is negotiated so that the new IPSec SA will be ready before the hard lifetime of the original IPSec SA expires.
Soft Lifetime Type |
Description |
---|---|
Time-based soft lifetime (soft timeout period) |
The value is 70% of the actual hard lifetime (hard timeout period). |
Traffic-based soft lifetime (soft timeout traffic) |
|
Before an IPSec SA becomes invalid, IKE negotiates a new IPSec SA for the remote end. The remote end uses the new IPSec SA to protect IPSec communication immediately after the new IPSec SA is negotiated. If service traffic is transmitted, the original IPSec SA is deleted immediately. If no service traffic is transmitted, the original IPSec SA will be deleted after 10s or the hard lifetime expires.
If the time-based lifetime and traffic-based lifetime are both set for an IPSec SA, the IPSec SA becomes invalid when either lifetime expires.
Precautions
During IKEv2 negotiation, the initiator or responder cannot initiate IPSec SA renegotiation if the IKE SA is deleted and the IPSec SA soft lifetime expires.