No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search


To have a better experience, please upgrade your IE browser.


AR500, AR510, and AR530 V200R007 Commands Reference

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
ipsec policy (system view)

ipsec policy (system view)


The ipsec policy command creates an IPSec policy and displays the IPSec policy view.

The undo ipsec policy command deletes an IPSec policy.

By default, no IPSec policy is configured.


ipsec policy policy-name seq-number [ gdoi | isakmp [ template template-name ] | manual ]

undo ipsec policy policy-name [ seq-number ]






Specifies the name of an IPSec policy.

The value is a string of 1 to 15 case-sensitive characters without question marks (?) or spaces.


Specifies the sequence number of an IPSec policy.

The value is an integer that ranges from 1 to 10000. A smaller value indicates a higher IPSec policy priority.


Indicates that an IPSec SA is established in GDOI mode.



Indicates that an IPSec policy is established in IKE negotiation mode.


template template-name

Indicates that the IPSec policy template is applied to the IPSec policy. template-name specifies the name of an IPSec policy template.

The value is a string of 1 to 15 case-sensitive characters without question marks (?) or spaces.


Indicates that an IPSec SA is created manually.



System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

An IPSec policy is identified by its name and sequence number and multiple IPSec policies with the same IPSec policy name constitute an IPSec policy group.

  • GDOI mode

    This mode can be used when you deploy A2A VPNs.

  • Manual mode

    IPSec parameters including the authentication/encryption key and SPI on IPSec peers must mirror each other. That is, IPSec parameters of the inbound SA at the local end must be the same as those of the outbound SA at the remote end, and IPSec parameters of the outbound SA at the local end must be the same as those of the inbound SA at the remote end.

  • IKE negotiation mode: IPSec parameters are automatically negotiated through IKE. This mode is classified into ISAKMP and IPSec policy template:

    • ISAKMP

      Negotiated IPSec parameters are defined in the IPSec policy view, and the initiator and responder must use the same IPSec parameters.

    • IPSec policy template

      Negotiated IPSec parameters are defined in the IPSec policy template view. The initiator determines optional parameters, and the responder accepts the parameters delivered by the initiator. If an IPSec policy template is configured at the local end, the local end can only function as the responder to receive negotiation requests.

      An IPSec policy template can be used to configure multiple IPSec policies, reducing the workload of establishing multiple IPSec tunnels. An IPSec policy template can be applicable to specific scenarios, for example, scenario where the remote IP address is variable or unknown (IP address obtained using PPPoE) and the remote peers are allowed to initiate negotiation to the local end.

      ACLs in this mode are optional. If no ACL is configured, the responder uses the ACL configured on the initiator to protect data flows.

The manual mode applies to small-scale networks or scenarios where only a few IPSec peers exist. The IKE negotiation mode applies to medium- and large-scale networks. The GDOI mode applies when multiple branches exist and a large number of multicast services need to be encrypted.

Follow-up Procedure

Define negotiated IPSec parameters in the IPSec policy view and run the ipsec policy (interface view) command to apply the IPSec policy to an interface.


  • If an IPSec policy template is used to create an IPSec policy, the local end can only respond to negotiation initiated by the remote end, and cannot initiate negotiation.

  • When creating an IPSec policy, you must specify the SA creation mode. If you have entered the IPSec policy view, you do not need to enter the SA creation mode.
  • Before modifying the negotiation mode of a created IPSec policy, delete the IPSec policy and create an IPSec policy again.


# Create an IPSec policy policy1 whose sequence number is 100, and set the SA creation mode to manual.

<Huawei> system-view
[Huawei] ipsec policy policy1 100 manual
Updated: 2019-05-29

Document ID: EDOC1000097293

Views: 135796

Downloads: 148

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Previous Next