This chapter covers the following subjects:
• Plan a Cisco IOS Software VTI-based site-to-site VPN: Introduces the virtual tunnel interface (VTI) and discusses pre-deployment tasks for VTI-based VPNs.
• Configure basic IKE peering using pre-shared keys: Presents the essential parameters to successfully configure Internet Key Exchange (IKE) between two peers.
• Configure and verify static point-to-point IPsec VTI tunnels: Learn how to configure static, point-to-point VPNs.
• Configure and verify dynamic point-to-point IPsec VTI tunnels: Learn how to configure dynamic, point-to-point VPNs.
IP Security (IPsec) virtual tunnel interfaces (VTI) greatly simplify the configuration process that is required to create site-to-site VPN tunnels. One major benefit of using IPsec VTIs is that it is no longer required to apply an IPsec crypto map to a physical interface. IPsec VTIs function like any other real interface on the router so that many other Cisco IOS Software features can be applied to them. This chapter covers deployment of static and dynamic point-to-point VTI tunnels using Cisco IOS Software.
The “Do I Know This Already?” quiz helps you decide whether you really need to read the entire chapter. If you already intend to read the entire chapter, you do not necessarily need to answer these questions now.
The eight-question quiz, derived from the major sections in the “Foundation Topics” portion of this chapter, helps you determine how to spend your limited study time.
Table 15-1 outlines the major topics discussed in this chapter and the “Do I Know This Already?” quiz questions that correspond to those topics.
Table 15-1. “Do I Know This Already?” Foundation Topics Section-to-Question Mapping

The goal of self-assessment is to gauge your mastery of the topics in this chapter. If you do not know the answer to a question or are only partially sure of the answer, you should mark this question wrong for purposes of the self-assessment. Giving yourself credit for an answer that you correctly guess skews your self-assessment results and might provide you with a false sense of security.
1. The line protocol of a virtual tunnel interface depends on the state of which of the following?
a. Physical interface
b. Routing table
c. VPN tunnel
d. Peer’s VPN tunnel
e. Crypto map
2. The encapsulation on a virtual tunnel interface must be which of the following?
a. Frame Relay
b. ATM
c. AH or ESP
d. ISAKMP
e. HDLC
3. The IKE policy on both peers must match on all parameters except for which of the following?
a. Authentication
b. Encryption algorithm
c. Diffie-Hellman group
d. Pre-shared key value
e. ISAKMP lifetime
4. Industry best practices recommend that you use which hash algorithm and DH key length combination for IKE phase 1 policies?
a. SHA-1 and DH group 5
b. MD5 and DH group 1
c. AES-128 and IPsec
d. DES and RSA
e. 3DES and ISAKMP
5. Why should static point-to-point virtual tunnel interfaces use IP unnumbered addresses?
a. It makes static routing easier.
b. VTIs cannot have their own IPs and must use IP unnumbered addresses.
c. For a peer to find them.
d. To conserve IP address space.
6. The line protocol on a virtual tunnel interface goes up and down based upon which of the following?
a. Seeing its own Ethernet loopback packet return
b. Successful Layer 2 connectivity
c. The state of the IPsec SA negotiation
d. The network administrator not shutting the interface
e. None of these answers are correct.
7. Where are dynamic point-to-point VTI tunnels deployed?
a. On the hub router
b. On each spoke router
c. On the hub router and on each spoke router
d. On the VPN concentrator
e. None of these answers are correct.
8. The IP address of a virtual tunnel interface must be configured using which interface command?
a. ip address
b. ip address dhcp
c. ip address pppoe
d. ip unnumbered
The answers to the “Do I Know This Already?” quiz are found in Appendix A. The suggested choices for your next step are as follows:
• 6 or less overall score: Read the entire chapter. This includes the “Foundation Topics” and the “Exam Preparation” sections.
• 7 or 8 overall score: If you want more review on these topics, skip to the “Exam Preparation” section. Otherwise, move on to Chapter 16, “Deploying Scalable Authentication in Site-to-Site IPsec VPNs.”
VTI-based IPsec site-to-site VPNs are a much simpler way to protect user data while it is in transit between two sites. This chapter covers planning a VTI-based site-to-site IPsec VPN, configuring basic IKE peering with pre-shared keys (PSK), configuring static IPsec VTI tunnels, and configuring dynamic IPsec VTI tunnels using Cisco IOS Software.
IPsec VTIs make it much easier to provide protection to user data when configuring a site-to-site VPN tunnel. Using a virtual tunnel interface is much simpler than using generic routing encapsulation (GRE) or Layer 2 Tunneling Protocol (L2TP) tunnels for encapsulation and IPsec crypto maps. One aspect that is much simpler is that there is no longer a requirement to statically map an IPsec crypto map to a physical interface on the router. The IPsec tunnel endpoint is associated with a virtual interface. Because this virtual tunnel interface is a full-featured routable interface, many of the common interface options that can be applied to physical interfaces can now be applied to the IPsec virtual tunnel interface. Figure 15-1 shows a basic IPsec VTI diagram. User data between the Fast Ethernet 1/0 interface on R1 and the Fast Ethernet 1/0 interface on R3 is protected by the encapsulation and encryption of the IPsec VTI tunnel.
Figure 15-1. Basic IPsec VTI Tunnel

When using the VTI IPsec configuration, fewer configuration lines are required because after the virtual tunnel interface is created and an IPsec profile is applied to it, the crypto maps are automatically generated for each tunnel. This chapter covers VTI-based VPNs with static or dynamic peering and pre-shared keys for IKE authentication.
An IPsec VTI is a feature in Cisco IOS Software that is used to support IPsec VPNs. VTIs support native IPsec tunneling, including interoperability with standards-based IPsec implementations of other vendors. The IPsec tunnel endpoint is associated with a routable virtual interface that allows many common interface features to be applied to the IPsec tunnel.
Several features of the VTI include

• VTIs act as regular tunnels, one for each remote side of the VPN.
• The encapsulation must be either IPsec Encapsulating Security Payload (ESP) or Authentication Header (AH).
• The line protocol depends on the state of the VPN tunnels (IPsec Security Associations [SA]).
Example 15-1 shows an IPv4 IPsec tunnel attached to interface GigabitEthernet0/0 on the local router and at the remote router’s tunnel endpoint of 192.168.2.2. Traffic to be sent through the tunnel (interesting traffic) is specified in the IPsec profile named ENC-Profile.

Example 15-1. IPsec VTI Configuration
Router# configure terminal
Router(config)# interface Tunnel0
Router(config-if)# description VPN tunnel to branch office
Router(config-if)# ip unnumbered GigabitEthernet0/0
Router(config-if)# tunnel source GigabitEthernet0/0
Router(config-if)# tunnel destination 192.168.2.2
Router(config-if)# tunnel mode ipsec ipv4
Router(config-if)# tunnel protection ipsec profile ENC-Profile
Router# copy running-config startup-config
IPsec VTIs have many benefits:
• Simplify configuration: Configuring IPsec peering is much simpler when using virtual tunnel interfaces as compared to configuring IPsec peering with crypto maps or GRE/IPsec tunnels.
• Flexible interface feature support: An IPsec VTI is a Cisco IOS Software interface that offers the flexibility of accepting features that can be applied to physical interfaces (that operate on ciphertext traffic) or the IPsec VTI that operates on clear-text traffic.
• Support for multicast: IPsec VTIs support multicast traffic such as voice and video.
• Better scalability: IPsec VTIs require fewer SAs to support all types of traffic.
• Routable interface: Like GRE/IPsec, VTIs support all types of IP routing protocols, which provides scalability and redundancy.
The IPsec VTI has the following limitations:
• The IPsec VTI is limited to only IP unicast and multicast traffic, while the GRE/IPsec tunnels support a much wider range of protocols and applications.
• Cisco IOS Software IPsec stateful failover is not supported on VTIs, although other redundancy features, such as dynamic routing protocols, can be used as alternative failover methods.
Table 15-2 summarizes the benefits and limitations of using Cisco IOS Software IPsec VTIs.

Table 15-2. VTI Benefits and Limitations

The following information must be accumulated when configuring VTI-based VPNs:
• Existing hardware: Need to determine whether existing hardware can provide the performance required to support VTI-based VPNs. Integrated Services Router (ISR)/ISR-Generation 2 (G2) routers can include an Advanced Integration Module (AIM) hardware accelerator, onboard encryption modules, or even software encryption.
• Existing software: Need to determine whether existing software can support strong cryptographic algorithms and support for VTI routers only.
• Addressing and routing: Need to determine current IP addressing scheme and routing paths to direct traffic through the virtual tunnel interface.
• Cryptographic standards: For a VPN link to establish, both endpoint devices must agree on a set of algorithms to be used for the connection.
Table 15-3 summarizes the information that must be gathered prior to deploying a VTI-based IPsec VPN.

Deploying VTI-based site-to-site tunnels requires that some of or all the following high-level tasks be performed:
Step 1: Configure Internet Key Exchange (IKE) peering between VPN endpoints.
Step 2: Configure an IPsec traffic protection policy on all peers.
Step 3: Configure a static or dynamic VTI tunnel on each peer.
Step 4: Configure static or dynamic routing over the VTI tunnels.
Some choices need to be made when deploying VTI-based site-to-site tunnels. Table 15-4 provides information about these choices.

Table 15-4. IPsec VTI Deployment Choices

Consider the following guidelines when deploying VTI-based site-to-site IPsec VPNs:

• Use VTI-based site-to-site VPNs as the default IPsec technology for individual point-to-point VPN links and for hub-and-spoke VPNs.
• Consider deploying Dynamic Multipoint VPN (DMVPN) or Group Encrypted Transport (GET) VPN for larger environments with partial or fully meshed VPN requirements.
When configuring VTI-based site-to-site IPsec VPNs, the first step that must be completed is to configure IKE peering between VPN peers. Determine an appropriate IKE Internet Security Association and Key Management Protocol (ISAKMP) Phase 1 policy that meets the requirements of the organization and then configure these policies on all peers. Developing a well-planned IKE policy plan prior to deployment will enhance the chances of a successful deployment. The following list of parameters must be configured in an ISAKMP policy. These parameters must match on the two peers for a successful Phase 1 negotiation:

• Determine the peer authentication method: Choose the authentication method based on credentials from all peers. Cisco IOS Software provides support for pre-shared keys; Rivest, Shamir, and Adleman (RSA)–encrypted nonces; and RSA signatures to authenticate IPsec peers.
• Determine the protection policy for the IKE session: Choose the encryption and hashing algorithms.
• Determine the key length: Choose the length of the Diffie-Hellman keys.
• Determine the IKE session lifetime: Choose an appropriate lifetime for the IKE session.
The choices made for the preceding parameters provide the data that will be needed later in the configuration steps.
Cisco IOS Software Release 12.4(20)T introduced default IKE policies. There are eight default policies with priorities ranging from 65507 to 65514, with 65507 having the highest priority and 65514 having the lowest priority. The highest-priority pre-shared key–based policy (65508) in Table 15-5 provides the highest protection of the default policies. It provides Advanced Encryption Standard (AES) for the encryption algorithm, Secure Hash Algorithm (SHA) for the hash algorithm, and Diffie-Hellman (DH) group 5.
Table 15-5. Cisco IOS Software Default IKE PSK-Based Policies

Policies that use message digest algorithm 5 (MD5) for the hash algorithm or DH group 2 as SHA-1 and DH5 are stronger.
Perform the following steps to configure basic IKE peering:
Task 1. (Optional) Configure an IKE (ISAKMP) policy on each peer.
Task 2. Generate authentication credentials (PSKs) for each pair of peers.
Task 3. Configure authentication credentials.
Several choices must be taken into consideration when configuring basic IKE peering. The default IKE policies provide adequate security, but certain environments might dictate requirements that necessitate choosing different IKE policy aspects. For example, choosing a stronger DH group to provide longer protection might satisfy requirements but will come at a cost to performance, because the stronger DH group will mean heavier computational load during the IKE exchange.
IKE lifetimes are configured by default to be conservative. If VPN peers will not agree on an IKE lifetime parameter, change it to an acceptable value. Note that Cisco IOS Software does not require that the IKE peers have matching IKE lifetime settings for a successful exchange. The IKE SA will establish by adjusting its IKE session lifetime to the shorter of the two settings.
The configuration scenario used in the topic’s configuration sequence that follows includes two IKE peers that have 172.17.1.1 and 172.17.2.4 configured on their untrusted interfaces. They will be configured using the following policy parameters:
• IKE authentication: Pre-shared keys
• IKE hash algorithm: SHA-1 Hash-based Message Authentication Code (HMAC)
• IKE encryption: 128-bit AES
• IKE key exchange: Diffie-Hellman Group 14 (2048-bit key length)
• IKE session lifetime: One hour (3600 seconds)
A strong pre-shared authentication key will also be generated and configured on both peers as part of the scenario. Assumptions are that connectivity between the two peers exists and that IKE sessions are permitted along the path between the two outside interfaces of each peer.
The first configuration task for IKE peering is optional because of the default policies provided by Cisco IOS Software. To create a custom IKE policy that meets organizational requirements, create the policy with the crypto isakmp policy global configuration command. Inside this policy, set the necessary parameters with the commands shown in Example 15-2.

Example 15-2. Configure IKE Policy
Router# configure terminal
Router(config)# crypto isakmp policy 10
Router(config-isakmp)# authentication pre-share
Router(config-isakmp)# hash sha
Router(config-isakmp)# encryption aes 128
Router(config-isakmp)# group 14
Router(config-isakmp)# lifetime 3600
Router(config-isakmp)# exit
Router(config)# crypto isakmp key !%@$^#@&%RRETWERsdf address 172.17.2.4
Router(config)# end
Router# copy running-config startup-config
The second and third configuration tasks are the generation and configuration of authentication credentials (pre-shared keys). Be sure to create random, long pre-shared keys to provide strong protection. Bind the pre-shared key to the tunnel destination IP address of each peer using the crypto isakmp key command, as shown in Example 15-3.
Example 15-3. Bind Pre-Shared Key to IKE Peer
Router# configure terminal
Router(config)# crypto isakmp key !%@$^#@&%RRETWERsdf address 172.17.2.4
Router(config)# end
Router# copy running-config startup-config
Use the show crypto isakmp policy command to display the parameters configured for each local IKE policy. Unless you have added custom IKE policies with the crypto isakmp policy command or have removed the default IKE policies with the no crypto isakmp default policy command, the default IKE policies will be displayed as the output of the show isakmp policy command. Example 15-4 shows the parameters that are displayed after the command is issued.
Example 15-4. Verify IKE Policy on Local Router
Router# show crypto isakmp policy
Global IKE policy
Protection suite of policy 10
Encryption algorithm: AES - Advanced Encryption Standard (128 bit keys)
Hash algorithm: Secure Hash Algorithm
Authentication method: Pre-shared Key
Diffie-Hellman Group: #14 (2048 bit)
Lifetime: 3600 seconds, no volume limit
Use the show crypto isakmp sa command to display the current IKE Security Associations (SA) on the local router. The QM_IDLE status indicates successful establishment of the IKE SA, meaning that the ISAKMP process is idle after having successfully negotiated and established SAs. Example 15-5 shows the output of the show crypto isakmp sa command.

Example 15-5. Displaying the Current IKE SA on Local Router
Router# show crypto isakmp sa
IPv4 Crypto ISAKMP SA
Dst src state conn-id status
172.17.2.4 172.17.1.1 QM_IDLE 1004 ACTIVE
With the Cisco IOS Software crypto map based system, the IPsec subsystem will request SAs to be established upon seeing interesting traffic that matches the crypto map. In a VTI-based IPsec VPN, IPsec requests SA establishment as soon as the virtual tunnel interface (VTI)s are fully configured.
The debug crypto isakmp debugging command will display the “SA has been authenticated” debug message after the IKE Phase 1 peering is successful.
Consider the following implementation guidelines when configuring basic IKE peering:

• Each peer must have the same IKE policy. The lifetime parameter is the only one that is not required to match. Multiple policies can be configured to support several peers.
• If possible, it is recommended to use the same, strong IKE policy for all peers.
• Do not use the same key for all peers or groups of peers.
• If possible, use a utility to generate random pre-shared keys.
Several commands are provided by Cisco IOS Software to troubleshoot basic IKE peering. Use the ping command to first verify connectivity between the two peers. Use the traceroute command to troubleshoot connectivity issues if pings fail.
The show crypto isakmp policy command can be executed on both peers to compare IKE parameters and ensure that they match. The debug crypto isakmp debugging command will display debugging messages during IKE negotiation and session establishment. These debugging commands should be executed and analyzed on both peers.
Follow these steps to proceed through the recommended flow for troubleshooting IKE peering:

Step 1: Verify peer reachability using the ping and traceroute commands with the tunnel source and destination IP addresses on both peers. If connectivity is verified, proceed to Step 2; otherwise, check the path between the two peers for routing or access (firewall or access list) issues.
Step 2: Verify the IKE policy on both peers using the show crypto isakmp policy command. Debug messages revealed by the debug crypto isakmp command will also point out IKE policy mismatches.
Step 3: Verify IKE peer authentication. The debug crypto isakmp command will display unsuccessful authentication.
Step 4: Upon successful completion of Steps 1–3, the IKE SA should be establishing. This can be verified with the show crypto isakmp sa command and looking for a state of QM_IDLE.
Static VTI VPN tunnels provide secure connectivity between two sites. Deploying static VTI tunnels involves configuring a Cisco IOS Software tunnel interface on both VPN peers. These tunnel interfaces uniquely identify the peering between the two sites. Static VTI tunnels are permanently established immediately after being configured and can be used to provision a limited number of site-to-site IPsec tunnels in either hub-and-spoke or meshed IPsec VPNs.
Transform sets are bundles of cryptographic algorithms that are used together to protect traffic flows as defined by a VPN policy. IPsec transform sets define the encapsulation (ESP or AH), the packet authentication/integrity algorithm (SHA-1 or MD5), and the IPsec mode (transport or tunnel) that is used with a VPN policy.
Cisco IOS Software Release 12.4(20)T introduced default IPsec transform sets, as summarized in Table 15-6. If custom transform sets are not configured, IKE negotiation results in the use of ESP encapsulation, 3DES encryption, and SHA-1 HMAC for authentication/integrity.
Table 15-6. Cisco IOS Software Default IPsec Transform Sets


Perform the following tasks to configure site-to-site VPN peering using a static point-to-point VTI tunnel on each peer:
Task 1. Configure IKE peering between the two peers. The configuration steps were provided in the previous topic.
Task 2. (Optional) Configure an IPsec transform set. This is optional because default transform sets are used if no custom transform sets are configured.
Task 3. Configure an IPsec protection profile to specify a traffic protection policy for the VTI tunnel.
Task 4. Configure a VTI and provide it with IP addressing.
Task 5. Enable IPsec encapsulation on the VTI and apply the IPsec protection profile to the VTI.
Task 6. Configure static or dynamic routing through the VTI tunnel.
The following configuration choices must be analyzed prior to configuring a VTI-based IPsec tunnel:
• The optional, second step in the task list calls for configuring an IPsec transform set. The default transform set with higher priority uses Triple DES (3DES) as its encryption algorithm, which can cause lower performance on some platforms. The decision must be made to either use the default transform set or to create a custom one that uses AES-128.
• Terminating the VTI tunnel on a loopback interface will provide redundancy as opposed to when a physical interface is used. The choice to use a loopback to route around a failed physical interface can provide resiliency to your VPN tunnel.
The configuration scenario used in the topic’s configuration sequence that follows includes two IKE peers that have untrusted interfaces using the IP addresses of 172.17.1.1 and 172.17.2.4. A static VTI tunnel between the IP addresses with static routing will be configured. Assumptions are that connectivity between the two peers exists and that IKE sessions are permitted along the path between the two outside interfaces of each peer. Also assumed is that basic IKE peering, as covered in the previous topic, is in place.
Refer to the section, “Task 1: (Optional) Configure an IKE Policy on Each Peer,” under the section “Configuring Basic IKE Peering,” which documented how to configure IKE peering between the two peers.
The second configuration task is the optional task of creating a custom IPsec transform set. For example, to configure an IPsec transform set named AES128-SHA that uses ESP tunnel mode, with 128-bit AES encryption and SHA-1 HMAC integrity/authentication algorithms, you would enter the following:
Router(config)# crypto ipsec transform-set AES128-SHA esp-aes 128 esp-sha-hmac
Task 3 in the VTI-based VPN peering sequence is the configuration of an IPsec protection profile. The IPsec protection profile specifies the traffic protection policy for the VTI tunnel and includes the following basic parameters:
• IPsec transform set used in the protection policy: The default IPsec transform set will be used if a custom transform set has not been configured.
• IPsec SA (session key) lifetimes: The default lifetime of 1 hour will be used if not configured differently.
• Perfect Forward Secrecy (PFS): PFS will not be negotiated by default.
Example 15-6 shows the crypto ipsec profile global configuration command being used to create a named IPsec profile (MYIPsecProfile). Inside profile configuration mode, the administrator has specified a custom transform set using the set transform-set command and specifying the name of the custom transform set.
Example 15-6. Configure IPsec Protection Profile
Router(config)# crypto ipsec profile MYIPsecProfile
Router(ipsec-profile)# set transform-set AES128-SHA
Router(ipsec-profile)# end
Router# copy running-config startup-config
The fourth configuration task for VTI-based VPN peering is the creation and basic configuration of the VTI:
Step 1: Using a new, unused tunnel interface number, create a new tunnel interface using the interface tunnel configuration command and give it an IP address and subnet mask using the ip address interface configuration command. As an alternative, use IP unnumbered addressing as shown in Example 15-7 by issuing the ip unnumbered command.
Step 2: Configure a tunnel source address by using the tunnel source interface configuration command.
Step 3: With the tunnel destination interface configuration command, configure a tunnel destination address by specifying the remote peer’s remote IP address.

Example 15-7. Configure a Virtual Tunnel Interface (VTI)
Router(config)# interface Tunnel0
Router(config-if)# ip unnumbered GigabitEthernet0/0
Router(config-if)# tunnel source GigabitEthernet0/0
Router(config-if)# tunnel destination 172.17.2.4
Router(config-if)# end
Router# copy running-config startup-config
Task 5 is a required task that configures the IPsec encapsulation on the tunnel using the tunnel mode ipsec ipv4 command and applies the traffic protection policy to the tunnel by using the tunnel protection ipsec profile command. Example 15-8 illustrates the usage of these commands.

Example 15-8. Apply a Protection Profile to a Tunnel Interface
Router(config)# interface Tunnel0
Router(config-if)# tunnel mode ipsec ipv4
Router(config-if)# tunnel protection ipsec profile MYIPsecProfile
Router(config-if)# end
Router# copy running-config startup-config
In the sixth and final configuration task, Example 15-9 shows a configuration that is routing to all reachable networks through the tunnel. The example shows a static route for the 10.1.2.0/24 network that is pointing to the Tunnel0 interface. The other VPN router will have a similar configuration that routes the 10.1.1.0/24 network (the local router’s inside LAN) into the VTI VPN tunnel.
Example 15-9. Configure Routes Pointing to the New Tunnel Interface
Router(config)# ip route 10.1.2.0 255.255.255.0 Tunnel0
Router(config-if)# end
Router# copy running-config startup-config

Consider the following when configuring static point-to-point VTI tunnels:
• It is recommended that the VTI tunnel use unnumbered IP addressing to conserve IP address space.
• Using dynamic routing protocols instead of static routing statements will increase the scalability and manageability of a VTI-based VPN deployment.
• To prevent recursive routing lookups, make sure that the tunnel destination is learned over the physical interface and not the tunnel interface.
Verify the status of the local tunnel interface using the show interface tunnel command. The output of this command will provide information about the status of the line and the line protocol of the tunnel interface. Recall that line protocol on a virtual tunnel interface is dependent upon the IPsec SA bound to that interface. Line protocol will go up when an IPsec SA is successfully established. It also shows packet counts for input and output traffic statistics.
To verify the status of the IPsec SA for a particular peer, execute the show crypto ipsec sa peer command. This command provides statistical information such as the number of packets that have been successfully encapsulated/decapsulated, encrypted/decrypted, and hash-digested/verified by IPsec. Verify that the statistics have nonzero values and that the IPsec SAs are filled in with numbers, indicating that IPsec SAs have been negotiated.
The show ip route | include Tunnel command will display all routes pointing to the virtual tunnel interface. Routes for destination networks that are reachable through VPN peers should be pointing toward the appropriate VTI.
The debug crypto isakmp command displays messages about IKE events. After the IKE SA has been established, IKE moves to Quick Mode to negotiate IPsec SAs. During quick mode negotiations, the “IPsec policy invalidated proposal” message indicates a mismatch in IPsec (IKE Phase 2) policies on the two peers. Investigate the Phase 2 parameters on each peer to locate the one that does not match.
Look for the “sa created” debug message in the output of the debug crypto ipsec debugging command. This success message should also cause the tunnel interface line protocol to change its state to “up.”
To summarize, you troubleshoot static point-to-point VTI tunnels by using several commands to verify that Phase 1 completed successfully. After ensuring that basic IKE peering has succeeded, follow with these troubleshooting commands to make sure that Phase 2 completed successfully and that you can route traffic through the tunnel. The following commands help troubleshoot Phase 2 negotiation and routing through the tunnel:
• show interface tunnel verifies the status of the virtual tunnel interface.
• debug crypto isakmp displays debugging messages about IKE events.
• debug crypto ipsec displays debugging messages about IPsec SA establishment.
• show crypto ipsec sa can directly verify the status of an IPsec SA.
• show ip route | include Tunnel displays all routes pointing to local tunnels interfaces.

Perform the following steps to troubleshoot static VTI tunnels:
Step 1: If traffic is not flowing through the tunnel, first check to see that the IKE SAs are successfully established. If the SAs are in place, proceed to Step 2.
Step 2: Verify that the IPsec SAs are established. Use the show crypto ipsec sa, debug crypto isakmp, debug crypto ipsec, or show interface tunnels command to verify and troubleshoot IPsec SAs. After the IPsec SAs are established, proceed to Step 3.
Step 3: Verify the routing of user traffic. Use the show ip route | include Tunnel command to verify routing. Use static or dynamic routing to correct routing if necessary.
Dynamic VTIs (DVTI) provide scalable hub configurations in hub-and-spoke VPNs for site-to-site and remote-access connectivity. With DVTIs, there is no requirement to statically map IPsec sessions to physical interfaces. Instead, VTIs on the hub are created dynamically as tunnels to the hub are established. A virtual access interface is dynamically created based on a preconfigured virtual template that includes all the required IPsec configuration as well as any Cisco IOS Software features that are desired, such as quality of service (QoS), NetFlow, or access control lists (ACL).
Using dynamic VTIs requires minimal configuration on the hub router to support a VPN with a large numbers of VTIs. When a spoke peer initiates a tunnel, the tunnel and dynamic VTI are created. On the spoke peer, use a static VTI to establish a tunnel with the hub peer.
When a dynamic VTI is created as spoke peers attempt to create VPN connections with the hub peer, dynamic VTIs on the hub do not appear as a tunnel interface as they do with static VTIs. Instead, they appear as virtual access interfaces that are created from information configured in a virtual template interface. Virtual template interfaces are sets of common settings that contain the information needed to build the virtual access interfaces. The settings in the virtual template interface are for all dynamic interfaces and include the hub IP address inside the tunnel (unnumbered), the tunnel mode (IPsec), and the tunnel protection, and can optionally include other Cisco IOS Software services, such as NetFlow accounting or firewall policy settings. The router uses this information to create a virtual access interface (DVTI). Other information in the virtual template interface is added to the virtual access interface as the spoke completes IKE negotiations, such as the tunnel source and destination IP address.
Example 15-10 portrays a virtual template and the virtual access interface that is created as tunnels to the hub are established. A virtual access interface is dynamically created based on a preconfigured virtual template that includes all the required IPsec configuration as well as any Cisco IOS Software features that are desired, such as QoS, NetFlow, or ACLs.
Example 15-10. Virtual Template and Virtual Access Interface Configuration
Interface Virtual-template 1
Ip unnumbered FastEthernet0/0
Tunnel mode ipsec ipv4
Tunnel protection ipsec profile Profile1
Ip flow ingress
Zone-member security B2BVPN-Zone
Interface Virtual-access 125
Ip unnumbered FastEthernet0/0
Tunnel source 10.1.1.1
Tunnel mode ipsec ipv4
Tunnel destination 10.1.1.2
Tunnel protection ipsec profile Profile1
No tunnel protection ipsec initiate
Ip flow ingress
Zone-member security B2BVPN-Zone
Another feature of Cisco IOS Software, called an ISAKMP profile, is required to use DVTIs. ISAKMP profiles contain a set of match statements used to define a peer or set of peers. For example, with a basic pre-shared key VPN, peer identity is based upon IP address. However, the peer identity could also be based on a peer’s fully qualified domain name (FQDN) or fields from a peer’s certificate subject name. ISAKMP profiles can possibly match on a single peer, multiple peers, or even no peers based on the identity information received during the IKE negotiations.
ISAKMP profiles are used to find remote peers that can use virtual template interfaces and create DVTIs from it.

Perform the following tasks to configure site-to-site VPN peering using a dynamic point-to-point VTI tunnel on a hub router:
Task 1. Configure IKE peering using pre-shared key key rings instead of per-peer ISAKMP keys.
Task 2. (Optional) Configure an IPsec transform set. This is optional because default transform sets are used if no custom transform sets are configured.
Task 3. Configure an IPsec protection profile to be applied to the virtual template interface.
Task 4. Configure a virtual template interface on which IPsec encapsulation will be enabled and the protection profile from Task 3 will be applied.
Task 5. Configure an ISAKMP profile to map remote peers to the configured virtual template interface.
The configuration scenario used in the topic’s configuration sequence that follows includes two IKE peers that have untrusted interfaces using the IP addresses of 172.17.1.1 and 172.17.2.4. A static VTI tunnel between the IP addresses with static routing will be configured. Assumptions are that connectivity between the two peers exists and that IKE sessions are permitted along the path between the two outside interfaces of each peer. Also assumed is that basic IKE peering, as covered in the previous topic, is in place.
Figure 15-2 shows the configuration scenario for the configuration tasks that follow. The hub router will be configured to protect bidirectional traffic from both SiteA (10.1.2.0/24) and SiteB (10.1.3.0/24). These networks are connected directly to the central site (10.1.1.0/24). The hub will be configured for dynamic VTI by creating a VTI tunnel template that will accept tunnels from both peers and then dynamically create the point-to-point hub-and-spoke tunnels (DVTIs). Assumed for this scenario are the facts that full connectivity exists where required and that IKE peering is configured on all peers.
Figure 15-2. Dynamic VTI Scenario

The first task in configuring a dynamic point-to-point VTI tunnel on the hub router is to create authentication pre-shared keys for remote peers and then group them into a named key ring using the crypto keyring global configuration command. Use the pre-shared-key address command inside the key ring to specify a pre-shared key for a specific peer IP address. The command usage is shown in Example 15-11.
Example 15-11. IKE Peering with Pre-Shared Key Key Ring
Crypto keyring NEWKEYRING
Pre-shared-key address 172.17.2.4 key ier58ewrui90aEEQEd0erq9u2i3j5p
Pre-shared-key address 172.17.2.7 key iqwur@#$7234898245@#3jk23jh244
The second configuration task is the optional task of creating a custom IPsec transform set on the hub router. To configure an IPsec transform set named AES128-SHA that uses ESP tunnel mode, with 128-bit AES encryption and SHA-1 HMAC integrity/authentication algorithms, you would enter the following:
Router(config)# crypto ipsec transform-set AES128-SHA esp-aes 128 esp-sha-hmac
Task 3 in the VTI-based VPN peering sequence is the configuration of an IPsec protection profile. The IPsec protection profile specifies the traffic protection policy for the VTI tunnel and includes the following basic parameters:
• IPsec transform set used in the protection policy: The default IPsec transform set will be used if a custom transform set has not been configured.
• IPsec SA (session key) lifetimes: The default lifetime of 1 hour will be used if not configured differently.
• Perfect Forward Secrecy (PFS): Will not be negotiated by default.
Example 15-12 shows the crypto ipsec profile global configuration command being used to create a named IPsec profile (MYIPsecProfile). Inside profile configuration mode, the administrator has specified a custom transform set using the set transform-set command and specifying the name of the custom transform set.
Example 15-12. Configure IPsec Protection Profile
Router(config)# crypto ipsec profile MYIPsecProfile
Router(ipsec-profile)# set transform-set AES128-SHA
Router(ipsec-profile)# end
Router# copy running-config startup-config
Task 4 in the DVTI VPN peering sequence is the configuration of a virtual template interface upon which common settings for dynamic VTIs will be defined as well. Example 15-13 shows the interface Virtual-template1 type tunnel global configuration command being used to create a virtual template interface.
Example 15-13. Configure a Virtual Template Interface
Interface Virtual-template1 type tunnel
Ip unnumbered GigabitEthernet0/0
Tunnel mode ipsec ipv4
Tunnel protection ipsec profile MYIPsecProfile
The IP address of a virtual template interface must be configured using the ip unnumbered interface command.
The final task involves configuring an ISAKMP profile that maps remote peers to the newly created virtual template interface. First, the ISAKMP profile is created using the crypto isakmp profile command and then references the key ring associated with the peer group using the keyring ISAKMP profile configuration command.
Next, use appropriate match statements to identify remote peers (IP addresses of spoke peers). This is accomplished with the match identity address command. Finally, specify the virtual template interface that the router will use to create a dynamic VTI for this peer. Example 15-14 shows the ISAKMP profile and remote peer mapping being executed.
Example 15-14. Configure an ISAKMP Profile and Map Remote Peers
Router# show crypto isakmp profile ISAKMPProfile
Keyring NEWKEYRING
Match identity address 172.17.2.4 255.255.255.255
Match identity address 172.17.2.7 255.255.255.255
Virtual-template 1
The tunnel status on the hub router can be displayed using the show ip interfaces brief | include Virtual-Access command. The output should show a virtual access interface for each dynamically created virtual tunnel interface (VTI) (each spoke peer). A special Virtual-Access1 interface is used internally by Cisco IOS Software and is always present in the output of this command.
The show interfaces virtual-access command can be used to ensure that the dynamic VTI is operating properly. The virtual access interface is always in the “up” state. The line protocol will be up when the IPsec SA negotiation is completed successfully.
The complete configuration for a dynamic VTI virtual access interface can be seen by using the show running-config interface Virtual-access command. Note that the configuration for the virtual access interface is created dynamically based in part on the information contained in the virtual template interface and is not automatically saved to the startup configuration, nor can it be saved manually.

Consider the following deployment guidelines when implementing dynamic VTI VPNs:
• Dynamic routing protocols must be used inside tunnels to provide intra-VPN routing. Static routes cannot be used on the hub router because of the unnumbered addressing on the VTIs, and therefore there are no specific next-hop addresses to route. Static routing can be used on the spoke, if required.
• Pre-shared keys for IKE peer authentication limits configuration scalability because authentication credentials must be configured on each spoke peer.
• Spoke peers must use a static IP address if IKE pre-shared authentication and IKE main mode are used. This is because of the IKE protocol, but it can be overcome by using either certificate-based authentication or by using IKE aggressive mode with pre-shared keys.
• Unnumbered IP addressing is mandatory with DVTI tunnels.
As mentioned in the section, “How to Use This Book,” in the Introduction, you have several choices for exam preparation: the exercises here, the memory tables in Appendix C, the final exam preparation chapter, and the exam simulation questions on the CD-ROM. The following questions present a bigger challenge than the exam itself because they use an open-ended question format. By using this more difficult format, you exercise your memory better and prove your conceptual and factual knowledge of this chapter. You can find the answers to these questions in the appendix.
Review the most important topics in this chapter, noted with the Key Topics icon in the margin of the page. Table 15-7 lists a reference of these key topics and the page numbers on which each is found.

Print a copy of Appendix C, “Memory Tables” (found on the CD), or at least the section for this chapter, and complete the tables and lists from memory. Appendix D, “Memory Table Answers,” also on the CD, includes completed tables and lists to check your work.
Define the following key terms from this chapter, and check your answers in the Glossary:
virtual tunnel interface (VTI)
Advanced Integration Module (AIM)
Encapsulating Security Protocol (ESP)
Cisco IOS Security Configuration Guide: Secure Connectivity, Release 12.4T, www.cisco.com/en/US/partner/docs/ios/sec_secure_connectivity/configuration/guide/12_4t/sec_secure_connectivity_12_4t_book.html.