Configuring VPNs Using an IPSec Tunnel and Generic Routing Encapsulation
The Cisco 1800 series integrated services fixed-configuration routers support the creation of virtual private networks (VPNs).
Cisco routers and other broadband devices provide high-performance connections to the Internet, but many applications also require the security of VPN connections which perform a high level of authentication and which encrypt the data between two particular endpoints.
Two types of VPNs are supported—site-to-site and remote access. Site-to-site VPNs are used to connect branch offices to corporate offices, for example. Remote access VPNs are used by remote clients to log in to a corporate network.
The example in this chapter illustrates the configuration of a site-to-site VPN that uses IPSec and the generic routing encapsulation (GRE) protocol to secure the connection between the branch office and the corporate network. Figure 7-1 shows a typical deployment scenario.
Figure 7-1 Site-to-Site VPN Using an IPSec Tunnel and GRE
|
Branch office containing multiple LANs and VLANs
|
|
Fast Ethernet LAN interface—With address 192.165.0.0/16 (also the inside interface for NAT)
|
|
VPN client—Cisco 1800 series integrated services router
|
|
Fast Ethernet or ATM interface—With address 200.1.1.1 (also the outside interface for NAT)
|
|
LAN interface—Connects to the Internet; with outside interface address of 210.110.101.1
|
|
VPN client—Another router, which controls access to the corporate network
|
|
LAN interface—Connects to the corporate network, with inside interface address of 10.1.1.1
|
|
Corporate office network
|
|
IPSec tunnel with GRE
|
GRE Tunnels
GRE tunnels are typically used to establish a VPN between the Cisco router and a remote device that controls access to a private network, such as a corporate network. Traffic forwarded through the GRE tunnel is encapsulated and routed out onto the physical interface of the router. When a GRE interface is used, the Cisco router and the router that controls access to the corporate network can support dynamic IP routing protocols to exchange routing updates over the tunnel, and to enable IP multicast traffic. Supported IP routing protocols include Enhanced Interior Gateway Routing Protocol (EIGRP), Routing Information Protocol (RIP), Intermediate System-to-Intermediate System (IS-IS), Open Shortest Path First (OSPF), and Border Gateway Protocol (BGP).
Note When IP Security (IPSec) is used with GRE, the access list for encrypting traffic does not list the desired end network and applications, but instead refers to the permitted source and destination of the GRE tunnel in the outbound direction. All packets forwarded to the GRE tunnel are encrypted if no further access control lists (ACLs) are applied to the tunnel interface.
VPNs
VPN configuration information must be configured on both endpoints; for example, on your Cisco router and at the remote user, or on your Cisco router and on another router. You must specify parameters, such as internal IP addresses, internal subnet masks, DHCP server addresses, and Network Address Translation (NAT).
Configuration Tasks
Perform the following tasks to configure this network scenario:
An example showing the results of these configuration tasks is shown in the section “Configuration Example.”
Note The procedures in this chapter assume that you have already configured basic router features as well as PPPoE or PPPoA with NAT, DCHP and VLANs. If you have not performed these configurations tasks, see “Basic Router Configuration,” “Configuring PPP over Ethernet with NAT,” “Configuring PPP over ATM with NAT,” and “Configuring a LAN with DHCP and VLANs,” as appropriate for your router.
Configure a VPN
Perform the following tasks to configure a VPN over an IPSec tunnel:
Configure the IKE Policy
Perform these steps to configure the Internet Key Exchange (IKE) policy, beginning in global configuration mode:
|
|
|
Step 1
|
crypto isakmp policy
priority
Example:
Router(config)#
crypto isakmp policy 1
|
Creates an IKE policy that is used during IKE negotiation. The priority is a number from 1 to 10000, with 1 being the highest.
Also enters Internet Security Association Key and Management Protocol (ISAKMP) policy configuration mode.
|
Step 2
|
encryption {des | 3des | aes | aes 192 | aes 256}
Example:
Router(config-isakmp)#
encryption 3des
|
Specifies the encryption algorithm used in the IKE policy.
The example uses 168-bit Data Encryption Standard (DES).
|
Step 3
|
hash {md5 | sha}
Example:
Router(config-isakmp)#
hash md5
|
Specifies the hash algorithm used in the IKE policy.
The example specifies the Message Digest 5 (MD5) algorithm. The default is Secure Hash standard (SHA-1).
|
Step 4
|
authentication {rsa-sig | rsa-encr | pre-share}
Example:
Router(config-isakmp)# authentication pre-share
|
Specifies the authentication method used in the IKE policy.
The example uses a pre-shared key.
|
Step 5
|
group {1 | 2 | 5}
Example:
Router(config-isakmp)#
group 2
|
Specifies the Diffie-Hellman group to be used in the IKE policy.
|
Step 6
|
lifetime
seconds
Example:
Router(config-isakmp)#
lifetime 480
|
Specifies the lifetime, 60–86400 seconds, for an IKE security association (SA).
|
Step 7
|
exit
Example:
Router(config-isakmp)#
exit
|
Exits IKE policy configuration mode, and enters global configuration mode.
|
Configure Group Policy Information
Perform these steps to configure the group policy, beginning in global configuration mode:
|
|
|
Step 1
|
crypto isakmp client configuration group
{
group-name
|
default
}
Example:
Router(config)# crypto isakmp client configuration group rtr-remote
Router(config-isakmp-group)#
|
Creates an IKE policy group that contains attributes to be downloaded to the remote client.
Also enters Internet Security Association Key Management Protocol (ISAKMP) policy configuration mode.
|
Step 2
|
key
name
Example:
Router(config-isakmp-group)#
key secret-password
Router(config-isakmp-group)#
|
Specifies the IKE pre-shared key for the group policy.
|
Step 3
|
dns
primary-server
Example:
Router(config-isakmp-group)# dns 10.50.10.1
Router(config-isakmp-group)#
|
Specifies the primary Domain Name Service (DNS) server for the group.
command.
|
Step 4
|
domain
name
Example:
Router(config-isakmp-group)#
domain company.com
Router(config-isakmp-group)#
|
Specifies group domain membership.
|
Step 5
|
exit
Example:
Router(config-isakmp-group)#
exit
|
Exits IKE group policy configuration mode, and enters global configuration mode.
|
Step 6
|
ip local pool
{
default
|
poolname
} [
low-ip-address
[
high-ip-address
]]
Example:
Router(config)#
ip local pool dynpool 30.30.30.20 30.30.30.30
|
Specifies a local address pool for the group.
For details about this command and additional parameters that can be set, see the
Cisco IOS Dial Technologies Command Reference
.
|
Enable Policy Lookup
Perform these steps to enable policy lookup through AAA, beginning in global configuration mode:
|
|
|
Step 1
|
aaa new-model
Example:
Router(config)# aaa new-model
|
Enables the AAA access control model.
|
Step 2
|
aaa authentication login {default |
list-name
}
method1
[
method2...
]
Example:
Router(config)# aaa authentication login rtr-remote local
|
Specifies AAA authentication of selected users at login, and specifies the method used.
This example uses a local authentication database. You could also use a RADIUS server for this. See the
Cisco IOS Security Configuration Guide
and the
Cisco IOS Security Command Reference
for details.
|
Step 3
|
aaa authorization {network | exec | commands
level
| reverse-access | configuration} {default |
list-name
} [
method1
[
method2...
]]
Example:
Router(config)# aaa authorization network rtr-remote local
|
Specifies AAA authorization of all network-related service requests, including PPP, and the method used to do so.
This example uses a local authorization database. You could also use a RADIUS server for this. See the
Cisco IOS Security Configuration Guide
and the
Cisco IOS Security Command Reference
for details.
|
Step 4
|
username
name
{nopassword | password
password
| password
encryption-type
encrypted-password
}
Example:
Router(config)# username Cisco password 0 Cisco
|
Establishes a username-based authentication system.
This example implements a username of
Cisco
with an encrypted password of
Cisco
.
|
Configure IPSec Transforms and Protocols
A transform set represents a certain combination of security protocols and algorithms. During IKE negotiation, the peers agree to use a particular transform set for protecting data flow.
During IKE negotiations, the peers search in multiple transform sets for a transform that is the same at both peers. When such a transform set is found, it is selected and applied to the protected traffic as a part of both peers’ configurations.
Perform these steps to specify the IPSec transform set and protocols, beginning in global configuration mode:
|
|
|
Step 1
|
crypto ipsec transform-set
transform-set-name transform1 [transform2] [transform3] [transform4]
Example:
Router(config)# crypto ipsec transform-set vpn1 esp-3des esp-sha-hmac
|
Defines a transform set—An acceptable combination of IPSec security protocols and algorithms.
See the
Cisco IOS Security Command Reference
for detail about the valid transforms and combinations.
|
Step 2
|
crypto ipsec security-association lifetime
{
seconds
seconds |
kilobytes
kilobytes}
Example:
Router(config)# crypto ipsec security-association lifetime seconds 86400
|
Specifies global lifetime values used when negotiating IPSec security associations.
See the
Cisco IOS Security Command Reference
for details.
|
Note With manually established security associations, there is no negotiation with the peer, and both sides must specify the same transform set.
Configure the IPSec Crypto Method and Parameters
A dynamic crypto map policy processes negotiation requests for new security associations from remote IPSec peers, even if the router does not know all the crypto map parameters (for example, IP address).
Perform these steps to configure the IPSec crypto method, beginning in global configuration mode:
|
|
|
Step 1
|
crypto dynamic-map
dynamic-map-name dynamic-seq-num
Example:
Router(config)# crypto dynamic-map dynmap 1
Router(config-crypto-map)#
|
Creates a dynamic crypto map entry, and enters crypto map configuration mode.
See the
Cisco IOS Security Command Reference
for more detail about this command.
|
Step 2
|
set transform-set
transform-set-name [transform-set-name2...transform-set-name6]
Example:
Router(config-crypto-map)# set transform-set vpn1
Router(config-crypto-map)#
|
Specifies which transform sets can be used with the crypto map entry.
|
Step 3
|
reverse-route
Example:
Router(config-crypto-map)# reverse-route
Router(config-crypto-map)#
|
Creates source proxy information for the crypto map entry.
See the
Cisco IOS Security Command Reference
for details.
|
Step 4
|
exit
Example:
Router(config-crypto-map)# exit
|
Enters global configuration mode.
|
Step 5
|
crypto map
map-name seq-num [
ipsec-isakmp
] [
dynamic
dynamic-map-name] [
discover
] [
profile
profile-name]
Example:
Router(config)# crypto map static-map 1 ipsec-isakmp dynamic dynmap
|
Creates a crypto map profile.
|
Apply the Crypto Map to the Physical Interface
The crypto maps must be applied to each interface through which IPSec traffic flows. Applying the crypto map to the physical interface instructs the router to evaluate all the traffic against the security associations database. With the default configurations, the router provides secure connectivity by encrypting the traffic sent between remote sites. However, the public interface still allows the rest of the traffic to pass and provides connectivity to the Internet.
Perform these steps to apply a crypto map to an interface, beginning in global configuration mode:
|
|
|
Step 1
|
interface
type number
Example:
Router(config)# interface fastethernet 0
|
Enters interface configuration mode for the interface to which you want to apply the crypto map.
|
Step 2
|
crypto map
map-name
Example:
Router(config-if)# crypto map static-map
|
Applies the crypto map to the interface.
See th e
Cisco IOS Security Command Reference
for more detail about this command.
|
Step 3
|
exit
Example:
|
Enters global configuration mode.
|