cc/td/doc/product/software/ios120/12supdoc/12cmdsum
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

IPSec Network Security Commands

IPSec Network Security Commands

This chapter describes the function and displays the syntax for IPSec network security commands. For more information about defaults and usage guidelines, see the corresponding chapter of the Security Command Reference.

clear crypto sa

To delete IPSec security associations, use the clear crypto sa global configuration command.

clear crypto sa
clear crypto sa peer
{ip-address | peer-name}
clear crypto sa map map-name
clear crypto sa entry destination-address protocol spi
clear crypto sa counters

ip-address

Specify a remote peer's IP address.

peer-name

Specify a remote peer's name as the fully qualified domain name, for example remotepeer.domain.com.

map-name

Specify the name of a crypto map set.

destination-address

Specify the IP address of your peer or the remote peer.

protocol

Specify either the AH or ESP protocol.

spi

Specify an SPI (found by displaying the security association database).


crypto dynamic-map

To create a dynamic crypto map entry and enter the crypto map configuration command mode, use the crypto dynamic-map global configuration command. Use the no form of this command to delete a dynamic crypto map set or entry.

crypto dynamic-map dynamic-map-name dynamic-seq-num
no crypto dynamic-map dynamic-map-name [dynamic-seq-num]

dynamic-map-name

Specifies the name of the dynamic crypto map set.

dynamic-seq-num

Specifies the number of the dynamic crypto map entry.


crypto ipsec security-association lifetime

To change global lifetime values used when negotiating IPSec security associations, use the crypto ipsec security-association lifetime global configuration command. To reset a lifetime to the default value, use the no form of the command.

crypto ipsec security-association lifetime {seconds seconds | kilobytes kilobytes}
no crypto ipsec security-association lifetime {seconds | kilobytes}

seconds seconds

Specifies the number of seconds a security association will live before expiring. The default is 3600 seconds (one hour).

kilobytes kilobytes

Specifies the volume of traffic (in kilobytes) that can pass between IPSec peers using a given security association before that security association expires. The default is 4,608,000 kilobytes.


crypto ipsec transform-set

To define a transform set---an acceptable combination of security protocols and algorithms---use the crypto ipsec transform-set global configuration command. To delete a transform set, use the no form of the command.

crypto ipsec transform-set transform-set-name transform1 [transform2 [transform3]]
no crypto ipsec transform-set transform-set-name

transform-set-name

Specify the name of the transform set to create (or modify).

transform1
transform2
transform3

Specify up to three transforms (one is required) that define the IPSec security protocol(s) and algorithm(s).


crypto map (global configuration)

To create or modify a crypto map entry and enter the crypto map configuration mode, use the crypto map global configuration command. Use the no form of this command to delete a crypto map entry or set.

crypto map map-name seq-num [cisco]
crypto map
map-name seq-num ipsec-manual
crypto map map-name seq-num ipsec-isakmp [dynamic dynamic-map-name]
no crypto map map-name [seq-num]

cisco

(Default value) Indicates that CET will be used instead of IPSec for protecting the traffic specified by this newly specified crypto map entry. If you use this keyword, none of the IPSec-specific crypto map configuration commands will be available. Instead, the CET-specific commands will be available.

map-name

The name you assign to the crypto map set.

seq-num

The number you assign to the crypto map entry. See additional explanation for using this argument in the "Usage Guidelines" section.

ipsec-manual

Indicates that IKE will not be used to establish the IPSec security associations for protecting the traffic specified by this crypto map entry.

ipsec-isakmp

Indicates that IKE will be used to establish the IPSec security associations for protecting the traffic specified by this crypto map entry.

dynamic

(Optional) Specifies that this crypto map entry is to reference a preexisting dynamic crypto map. Dynamic crypto maps are policy templates used in processing negotiation requests from a peer IPSec device. If you use this keyword, none of the crypto map configuration commands will be available.

dynamic-map-name

(Optional) Specifies the name of the dynamic crypto map set that should be used as the policy template.


crypto map (interface configuration)

To apply a previously defined crypto map set to an interface, use the crypto map interface configuration command. Use the no form of the command to remove the crypto map set from the interface.

crypto map map-name
no crypto map [map-name]

map-name

The name which identifies the crypto map set. This is the name assigned when the crypto map was created.

When the no form of the command is used, this argument is optional. Any value supplied for the argument is ignored.


crypto map local-address

To specify and name an identifying interface to be used by the crypto map for IPSec traffic, use the crypto map local-address global configuration command. Use the no form of the command to remove this command from the configuration.

crypto map map-name local-address interface-id
no crypto map map-name local-address

map-name

The name which identifies the crypto map set. This is the name assigned when the crypto map was created.

interface-id

Specify the identifying interface that should be used by the router to identify itself to remote peers.

If IKE is enabled and you are using a certification authority (CA) to obtain certificates, this should be the interface with the address specified in the CA certificates.


initialization-vector size

To change the length of the initialization vector for the esp-rfc1829 transform, use the initialization-vector size crypto transform configuration command. To reset the initialization vector length to the default value, use the no form of the command.

initialization-vector size [4 | 8]
no initialization-vector size

4 | 8

(Optional) Specifies the length of the initialization vector: either 4 bytes or
8 bytes long. If neither 4 nor 8 is specified, the default length of 8 is assigned.


match address

To specify an extended access list for a crypto map entry, use the match address crypto map configuration command. Use the no form of this command to remove the extended access list from a crypto map entry.

match address [access-list-id | name]
no match address [access-list-id | name]

access-list-id

(Optional) Identifies the extended access list by its name or number. This value should match the access-list-number or name argument of the extended access list being matched.

name

(Optional) Identifies the named encryption access list. This name should match the name argument of the named encryption access list being matched.


mode

To change the mode for a transform set, use the mode crypto transform configuration command. To reset the mode to the default value of tunnel mode, use the no form of the command.

mode [tunnel | transport]
no mode

tunnel | transport

(Optional) Specifies the mode for a transform set: either tunnel or transport mode. If neither tunnel nor transport is specified, the default (tunnel mode) is assigned.


set peer

To specify an IPSec peer in a crypto map entry, use the set peer crypto map configuration command. Use the no form of this command to remove an IPSec peer from a crypto map entry.

set peer {hostname | ip-address}
no set peer {hostname | ip-address}

hostname

Specifies the IPSec peer by its host name. This is the peer's host name concatenated with its domain name (for example, myhost.domain.com)

ip-address

Specifies the IPSec peer by its IP address.


set pfs

To specify that IPSec should ask for perfect forward secrecy (PFS) when requesting new security associations for this crypto map entry, or that IPSec requires PFS when receiving requests for new security associations, use the set pfs crypto map configuration command. To specify that IPSec should not request PFS, use the no form of the command.

set pfs [group1 | group2]
no set pfs

group1

(Optional) Specifies that IPSec should use the 768-bit Diffie-Hellman prime modulus group when performing the new Diffie-Hellman exchange.

group2

(Optional) Specifies that IPSec should use the 1024-bit Diffie-Hellman prime modulus group when performing the new Diffie-Hellman exchange.


set security-association level per-host

To specify that separate IPSec security associations should be requested for each source/destination host pair, use the set security-association level per-host crypto map configuration command. Use the no form of this command to specify that one security association should be requested for each crypto map access list permit entry.

set security-association level per-host
no set security-association level per-host

set security-association lifetime

To override (for a particular crypto map entry) the global lifetime value, which is used when negotiating IPSec security associations, use the set security-association lifetime crypto map configuration command. To reset a crypto map entry's lifetime value to the global value, use the no form of the command.

set security-association lifetime {seconds seconds | kilobytes kilobytes}
no set security-association lifetime {seconds | kilobytes}

seconds seconds

Specifies the number of seconds a security association will live before expiring.

kilobytes kilobytes

Specifies the volume of traffic (in kilobytes) that can pass between IPSec peers using a given security association before that security association expires.


set session-key

To manually specify the IPSec session keys within a crypto map entry, use the set session-key crypto map configuration command. Use the no form of this command to remove IPSec session keys from a crypto map entry. This command is only available for ipsec-manual crypto map entries.

set session-key {inbound | outbound} ah spi hex-key-string
set session-key {inbound | outbound} esp spi cipher hex-key-string
[authenticator hex-key-string]
no set session-key {inbound | outbound} ah
no
set session-key {inbound | outbound} esp

inbound

Sets the inbound IPSec session key. (You must set both inbound and outbound keys.)

outbound

Sets the outbound IPSec session key. (You must set both inbound and outbound keys.)

ah

Sets the IPSec session key for the AH protocol. Use when the crypto map entry's transform set includes an AH transform.

spi

Specifies the security parameter index (SPI), a number that is used to uniquely identify a security association. The SPI is an arbitrary number you assign in the range of 256 to 4,294,967,295 (FFFF FFFF).

You can assign the same SPI to both directions and both protocols. However, not all peers have the same flexibility in SPI assignment. For a given destination address/protocol combination, unique SPI values must be used. The destination address is that of the router if inbound, the peer if outbound.

hex-key-string

Specifies the session key; enter in hexadecimal format.

This is an arbitrary hexadecimal string of 8, 16, or 20 bytes.

If the crypto map's transform set includes a DES algorithm, specify at least
8 bytes per key.

If the crypto map's transform set includes an MD5 algorithm, specify at least 16 bytes per key.

If the crypto map's transform set includes an SHA algorithm, specify 20 bytes per key.

Keys longer than the above sizes are simply truncated.

esp

Sets the IPSec session key for the ESP protocol. Use when the crypto map entry's transform set includes an ESP transform.

cipher

Indicates that the key string is to be used with the ESP encryption transform.

authenticator

(Optional) Indicates that the key string is to be used with the ESP authentication transform. This argument is required only when the crypto map entry's transform set includes an ESP authentication transform.


set transform-set

To specify which transform sets can be used with the crypto map entry, use the set transform-set crypto map configuration command. Use the no form of this command to remove all transform sets from a crypto map entry.

set transform-set transform-set-name1 [transform-set-name2...transform-set-name6]
no set transform-set

transform-set-name1....

Name of the transform set.

For an ipsec-manual crypto map entry, you can specify only one transform set.

For an ipsec-isakmp or dynamic crypto map entry, you can specify up to 6 transform sets.


show crypto dynamic-map

To view a dynamic crypto map set, use the show crypto dynamic-map EXEC command.

show crypto dynamic-map [tag map-name]

tag map-name

(Optional) Shows only the crypto dynamic map set with the specified map-name.


show crypto ipsec sa

To view the settings used by current security associations, use the show crypto ipsec sa EXEC command.

show crypto ipsec sa [map map-name | address | identity] [detail]

map map-name

(Optional) Shows any existing security associations created for the crypto map set named map-name.

address

(Optional) Shows the all existing security associations, sorted by the destination address (either the local address or the address of the IPSec remote peer) and then by protocol (AH or ESP).

identity

(Optional) Shows only the flow information. It does not show the security association information.

detail

(Optional) Shows detailed error counters. (The default is the high level send/receive error counters.)


show crypto ipsec security-association lifetime

To view the security-association lifetime value configured for a particular crypto map entry, use the show crypto ipsec security-association lifetime EXEC command.

show crypto ipsec security-association lifetime

show crypto ipsec transform-set

To view the configured transform sets, use the show crypto ipsec transform-set EXEC command.

show crypto ipsec transform-set [tag transform-set-name]

tag transform-set-name

(Optional) Shows only the transform sets with the specified transform-set-name.


show crypto map

To view the crypto map configuration, use the show crypto map EXEC command.

show crypto map [interface interface | tag map-name]

interface interface

(Optional) Shows only the crypto map set applied to the specified interface.

tag map-name

(Optional) Shows only the crypto map set with the specified map-name.




hometocprevnextglossaryfeedbacksearchhelp
Posted: Mon Feb 8 13:56:40 PST 1999
Copyright 1989-1999©Cisco Systems Inc.