Configuring GRE Over Ipsec
Configuring GRE Over Ipsec
On an IKEv2 initiator, the IKEv2 key ring key lookup is performed using the peer’s hostname or the address,
in that order. On an IKEv2 responder, the key lookup is performed using the peer’s IKEv2 identity or the
address, in that order.
Note You cannot configure the same identity in more than one peer.
Procedure
Step 3 crypto ikev2 keyring keyring-name Defines an IKEv2 key ring and enters IKEv2
key ring configuration mode.
Example:
Step 4 peer name Defines the peer or peer group and enters
IKEv2 key ring peer configuration mode.
Example:
Device(config-ikev2-keyring)# peer peer1
Step 7 address {ipv4-address [mask] | ipv6-address Specifies an IPv4 or IPv6 address or range for
prefix} the peer.
Example: Note
Device(config-ikev2-keyring-peer)# This IP address is the IKE endpoint address
address 10.0.0.1 255.255.255.0 and is independent of the identity address.
Step 8 identity {address {ipv4-address | Identifies the IKEv2 peer through the
ipv6-address} | fqdn domain domain-name | following identities:
email domain domain-name | key-id key-id}
• E-mail
Example:
• Fully qualified domain name (FQDN) .
Device(config-ikev2-keyring-peer)#
identity address 10.0.0.5 Note
When FQDN is used to identify the peer
in the keyring configuration, use the IP
address of the peer along with the FQDN
Note
The identity is available for key lookup on the
IKEv2 responder only.
Step 9 pre-shared-key {local | remote} [0 | 6] line Specifies the preshared key for the peer.
hex hexadecimal-string
IKEv2 Profile
An IKEv2 profile is a repository of nonnegotiable parameters of the IKE SA, such as local or remote identities
and authentication methods and services that are available to authenticated peers that match the profile. An
IKEv2 profile must be attached to either a crypto map or an IPsec profile on the initiator.
Note You must configure the responder-only configuration on the responder device because the IPsec process might
fail without this configuration.
Procedure
Device> enable
Step 3 crypto ipsec transform-set transform-set-name Defines a transform set. Enters crypto transform
configuration mode.
Example:
Device(config)# crypto ipsec
transform-set tfs
Step 6 set transform-set transform-set-name Specifies the transform sets used with the crypto
map entry.
Example:
Procedure
Device> enable
Step 3 interface tunnel number Specifies the interface on which the tunnel will
be configured. Enters interface configuration
Example:
mode.
Device(config)# interface tunnel 100
Step 5 tunnel source interface-type interface-number Specifies the tunnel source as a loopback
interface.
Example:
Step 7 tunnel protection IPsec profile profile-name Associates a tunnel interface with an IPsec
profile.
Example:
conf t
crypto ikev2 keyring ikev2_key
peer mypeer
address 0.0.0.0 0.0.0.0
pre-shared-key cisco123
conf t
The following example shows how to attach an IKEv2 profile to an IPSec profile:
conf t
crypto ipsec transform-set tfs esp-aes esp-sha-hmac
esn
mode tunnel
end
conf t
crypto ipsec profile ipsec_prof
set transform-set tfs
set ikev2-profile ikev2_prof
end
The following example shows how to create a tunnel interface and configure a tunnel source and tunnel
destination under the tunnel interface:
conf t
interface Tunnel100
ip address 128.1.1.1 255.255.255.0
tunnel source 120.1.1.1
tunnel destination 120.1.1.2
tunnel protection ipsec profile ipsec_prof
end
Cisco IOS XE Dublin 17.11.1 GRE over IPsec The GRE over IPsec feature allows
a payload to be GRE encapsulated
and transferred securely over an
IPsec tunnel.
Use the Cisco Feature Navigator to find information about platform and software image support. To access
the Cisco Feature Navigator, go to http://www.cisco.com/go/cfn.