336
Description
Use the
ipsec policy
command to apply an IPsec policy group to an interface.
Use the
undo ipsec policy
command to remove the application.
IPsec policies can be applied only to VLAN interfaces on the switch.
Only one IPsec policy group can be applied to an interface. To apply another IPsec policy group to the
interface, remove the original application first. An IPsec policy can be applied to only one interface.
With an IPsec policy group applied to an interface, the system uses each IPsec policy in the group to
protect certain data flows.
For each packet to be sent out an IPsec protected interface, the system checks the IPsec policies of the
IPsec policy group in the ascending order of sequence numbers. If it finds an IPsec policy whose ACL
matches the packet, it uses the IPsec policy to protect the packet. If it finds no ACL of the IPsec policies
matches the packet, it does not provide IPsec protection for the packet and sends the packet out directly.
Related commands:
ipsec
policy (system view)
.
Examples
# Apply IPsec policy group
pg1
to interface VLAN-interface 1.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] ipsec policy pg1
ipsec policy (system view)
Syntax
ipsec
policy
policy-name
seq-number
[
isakmp
|
manual
]
undo
ipsec
policy
policy-name
[
seq-number
]
View
System view
Default level
2: System level
Parameters
policy-name
: Name for the IPsec policy, a case-insensitive string of 1 to 15 characters, including letters
and digits. No minus sign (-) can be included.
seq-number
: Sequence number for the IPsec policy, in the range of 1 to 65535.
isakmp
: Sets up SAs through IKE negotiation.
manual
: Sets up SAs manually.
Description
Use the
ipsec policy
command to create an IPsec policy and enter its view.
Use the
undo ipsec policy
command to delete the specified IPsec policies.
By default, no IPsec policy exists.
When creating an IPsec policy, you must specify the generation mode.