- Index
- Preface
- Using Cisco IOS Software
- SIP, SSC, and SPA Product Overview
-
- Overview of the IPsec VPN SPA
- Configuring VPNs in Crypto-Connect Mode
- Configuring VPNs in VRF Mode
- Configuring IPsec VPN Fragmentation and MTU
- Configuring IKE Features Using the IPsec VPN SPA
- Configuring Enhanced IPsec Features Using the IPsec VPN SPA
- Configuring PKI Using the IPsec VPN SPA
- Configuring Advanced VPNs Using the IPsec VPN SPA
- Configuring Duplicate Hardware and IPsec Failover Using the IPsec VPN SPA
- Configuring Monitoring and Accounting for the IPsec VPN SPA
- Troubleshooting the IPsec VPN SPA
- Glossary
Configuring Monitoring and Accounting for the IPsec VPN SPA
This chapter provides information about configuring monitoring and accounting using the IPsec VPN SPA on the Catalyst 6500 Series switch. It includes the following sections:
•Overview of Monitoring and Accounting for the IPsec VPN SPA
•Monitoring and Managing IPsec VPN Sessions
•Configuring SPAN Monitoring for the IPsec VPN SPA
•Configuring IPsec VPN Accounting
Note For detailed information on Cisco IOS IPsec cryptographic operations and policies, refer to the Cisco IOS Security Configuration Guide and Cisco IOS Security Command Reference.
For information about managing your system images and configuration files, refer to the Cisco IOS Configuration Fundamentals Configuration Guide and Cisco IOS Configuration Fundamentals Command Reference publications.
For additional information about the commands used in this chapter, see the Catalyst 6500 Series Cisco IOS Command Reference, Release 12.2SX and the related Cisco IOS Release 12.2 software configuration guide and master index publications. For more information about accessing these publications, see the "Related Documentation" section on page xlv.
Tip To ensure a successful configuration of your VPN using the IPsec VPN SPA, read all of the configuration summaries and guidelines before you perform any configuration tasks.
Overview of Monitoring and Accounting for the IPsec VPN SPA
This chapter describes some IPsec features that can be used to monitor and manage the IPsec VPN SPA. These features include:
•The IPsec VPN monitoring feature, which provides VPN session monitoring enhancements that will allow you to troubleshoot the VPN and monitor the end-user interface.
•The IPsec VPN accounting feature, which enables session accounting records to be generated by indicating when the session starts and when it stops.
•The IPsec and IKE MIB support for Cisco VRF-aware IPsec feature, which provides manageability of VPN routing and forwarding- (VRF-) aware IPsec using MIBs.
Monitoring and Managing IPsec VPN Sessions
The IPsec VPN monitoring feature provides VPN session monitoring enhancements that will allow you to troubleshoot the Virtual Private Network (VPN) and monitor the end-user interface. A crypto session is a set of IPsec connections (flows) between two crypto endpoints. If the two crypto endpoints use IKE as the keying protocol, they are IKE peers to each other. Typically, a crypto session consists of one IKE security association (for control traffic) and at least two IPsec security associations (for data traffic, one per each direction). There may be duplicated IKE security associations (SAs) and IPsec SAs or duplicated IKE SAs or IPsec SAs for the same session in the duration of rekeying or because of simultaneous setup requests from both sides.
Session monitoring enhancements include the following:
•Ability to specify an Internet Key Exchange (IKE) peer description in the configuration file
•Summary listing of crypto session status
•Syslog notification for crypto session up or down status
•Ability to clear both IKE and IPsec security associations (SAs) using one command-line interface (CLI)
Adding the Description of an IKE Peer
To add the description of an IKE peer to an IPsec VPN session, perform this task beginning in global configuration mode:
This example shows how to add a description of an IKE peer:
Router(config)# show crypto isakmp peer 10.2.2.9
Router(config-isakmp-peer)# description connection from site A
Verifying Peer Descriptions
To verify peer descriptions, enter the show crypto isakmp peer command:
Router# show crypto isakmp peer
Peer: 10.2.2.9 Port: 500
Description: connection from site A
flags: PEER_POLICY
When the peer at address 10.2.2.9 connects and the session comes up, the syslog status will be shown as follows:
%CRYPTO-5-SESSION_STATUS: Crypto tunnel is UP. Peer 10.2.2.9:500 Description: connection from site A Id: ezvpn
Getting a Summary Listing of Crypto Session Status
You can get a list of all the active VPN sessions by entering the show crypto session command. The listing will include the following:
•Interface
•IKE peer description, if available
•IKE SAs that are associated with the peer by which the IPsec SAs are created
•IPsec SAs serving the flows of a session
Multiple IKE or IPsec SAs may be established for the same peer, in which case IKE peer descriptions will be repeated with different values for the IKE SAs that are associated with the peer and for the IPsec SAs that are serving the flows of the session.
You can also use the show crypto session detail variant of this command to obtain more detailed information about the sessions.
The following is sample output for the show crypto session command without the detail keyword:
Router# show crypto session
Crypto session current status
Interface: FastEthernet0/1
Session status: UP-ACTIVE
Peer: 172.0.0.2/500
IKE SA: local 172.0.0.1/500 remote 172.0.0.2/500 Active
IPSEC FLOW: permit ip 10.10.10.0/255.255.255.0 10.30.30.0/255.255.255.0
Active SAs: 2, origin: crypto map
The following is sample output using the show crypto session command with the detail keyword:
Router# show crypto session detail
Interface: Tunnel0
Session status: UP-ACTIVE
Peer: 10.1.1.3 port 500 fvrf: (none) ivrf: (none)
Desc: this is my peer at 10.1.1.3:500 Green
Phase1_id: 10.1.1.3
IKE SA: local 10.1.1.4/500 remote 10.1.1.3/500 Active
Capabilities:(none) connid:3 lifetime:22:03:24
IPSEC FLOW: permit 47 host 10.1.1.4 host 10.1.1.3
Active SAs: 0, origin: crypto map
Inbound: #pkts dec'ed 0 drop 0 life (KB/Sec) 0/0
Outbound: #pkts enc'ed 0 drop 0 life (KB/Sec) 0/0
IPSEC FLOW: permit ip host 10.1.1.4 host 10.1.1.3
Active SAs: 4, origin: crypto map
Inbound: #pkts dec'ed 4 drop 0 life (KB/Sec) 4605665/2949
Outbound: #pkts enc'ed 4 drop 1 life (KB/Sec) 4605665/2949
Syslog Notification for Crypto Session Up or Down Status
The syslog notification for crypto session up or down status function provides syslog notification every time the crypto session comes up or goes down. To enable syslog logging of the session status, enter the crypto logging session and crypto logging ezvpn commands in configuration mode.
The following is a sample syslog notification showing that a crypto session is up:
%CRYPTO-5-SESSION_STATUS: Crypto session is UP. Peer 10.6.6.1:500 fvrf=name10 ivrf=name20 Description: SJC24-2-VPN-Gateway Id: 10.5.5.2
The following is a sample syslog notification showing that a crypto session is down:
%CRYPTO-5-SESSION_STATUS: Crypto session is DOWN. Peer 10.6.6.1:500 fvrf=name10 ivrf=name20 Description: SJC24-2-VPN-Gateway Id: 10.5.5.2
Clearing a Crypto Session
In previous Cisco IOS software releases, there was no single command to clear both IKE and IPsec security associations (SAs). Instead, you entered the clear crypto isakmp command to clear IKE and the clear crypto ipsec command to clear IPsec. The clear crypto session command allows you to clear both IKE and IPsec with a single command. To clear a specific crypto session or a subset of all the sessions (for example, a single tunnel to one remote site), you must provide session-specific parameters, such as a local or remote IP address, a local or remote port, a front-door VPN routing and forwarding (FVRF) name, or an inside VRF (IVRF) name. Typically, the remote IP address will be used to specify a single tunnel to be deleted.
If a local IP address is provided as a parameter when you enter the clear crypto session command, all the sessions (and their IKE SAs and IPsec SAs) that share the IP address as a local crypto endpoint (IKE local address) will be cleared. If you do not provide a parameter when you enter the clear crypto session command, all IPsec SAs and IKE SAs in the switch will be deleted.
To clear a crypto session, enter the clear crypto session command in privileged EXEC mode from the switch command line. No configuration statements are required in the configuration file to use this command:
Router# clear crypto session
For complete configuration information for IPsec VPN Monitoring, refer to this URL:
http://www.cisco.com/en/US/docs/ios/12_3t/12_3t4/feature/guide/gt_ipsvm.html
For IPsec VPN monitoring configuration examples, see the "IPsec VPN Monitoring Configuration Example" section.
Configuring SPAN Monitoring for the IPsec VPN SPA
You can monitor IPsec VPN SPA port traffic using the local Switched Port Analyzer (SPAN) or remote SPAN (RSPAN). By configuring two SPAN sessions, one on the inside port and one on the outside port, you can monitor clear traffic and encrypted traffic simultaneously.
For detailed information on using SPAN, see the "Configuring Local SPAN, RSPAN, and ERSPAN" chapter of the Catalyst 6500 Release 12.2SXH and Later Software Configuration Guide at this URL:
http://www.cisco.com/en/US/docs/switches/lan/catalyst6500/ios/12.2SX/configuration/guide/span.html
Note Do not configure one IPsec VPN SPA port as a source for more than one SPAN session.
Configuring a SPAN Session
To configure a local SPAN session using an IPsec VPN SPA port as a source, perform this task beginning in global configuration mode:
This example shows how to configure a local SPAN session to capture inbound traffic before decryption from an IPsec VPN SPA in subslot 0 of module 2 and send the captured traffic to port 16 of module 5:
Router(config)# monitor session 1 source interface gi2/0/2 tx
Router(config)# monitor session 1 destination interface gi5/16
This example shows how to capture inbound traffic after decryption:
Router(config)# monitor session 1 source interface gi2/0/1 rx
This example shows how to capture outbound traffic before encryption:
Router(config)# monitor session 1 source interface gi2/0/1 tx
This example shows how to capture outbound traffic after encryption:
Router(config)# monitor session 1 source interface gi2/0/2 rx
Configuring IPsec VPN Accounting
The IPsec VPN accounting feature enables session accounting records to be generated by indicating when the session starts and when it stops.
A VPN session is defined as an Internet Key Exchange (IKE) security association (SA) and the one or more SA pairs that are created by the IKE SA. The session starts when the first IP Security (IPsec) pair is created and stops when all IPsec SAs are deleted. If IPsec accounting is configured, after IKE phases are complete, an accounting start record is generated for the session. New accounting records are not generated during a rekeying.
Session-identifying information and session-usage information is passed to the Remote Authentication Dial-In User Service (RADIUS) server by standard RADIUS attributes and vendor-specific attributes (VSAs).
To enable IPsec VPN accounting, perform this task beginning in global configuration mode:
For complete configuration information for IPsec VPN Accounting, refer to this URL:
http://www.cisco.com/en/US/docs/ios/12_2t/12_2t15/feature/guide/ft_evpna.html
For IPsec VPN accounting configuration examples, see the "IPsec VPN Accounting Configuration Example" section.
Configuration Examples
This section provide examples of the following configurations:
•IPsec VPN Accounting Configuration Example
•IPsec VPN Monitoring Configuration Example
Note The following examples use commands at the level of Cisco IOS Release 12.2(33)SXH.
As of Cisco IOS Release 12.2(33)SXH, the crypto engine subslot command used in previous releases has been replaced with the crypto engine slot command (of the form crypto engine slot slot {inside | outside}). The crypto engine subslot command is no longer supported. When upgrading, ensure that this command has been modified in your start-up configuration to avoid extended maintenance time.
IPsec VPN Accounting Configuration Example
The following example shows how to enable the IPsec VPN accounting feature:
aaa new-model
!
!
aaa group server radius r1
server-private 10.30.1.52 auth-port 1812 acct-port 1813 key allegro
!
aaa authentication login test_list group r1
aaa authorization network test_list group r1
aaa accounting update periodic 10 jitter maximum 0
aaa accounting network test_list start-stop group r1!
!
ip vrf ivrf1
rd 1:2
!
crypto engine mode vrf
!
crypto isakmp policy 5
encr 3des
authentication pre-share
group 2
lifetime 14400
!
crypto isakmp client configuration group test
key world
pool pool1
!
crypto isakmp profile test_pro
vrf ivrf1
match identity group test
client authentication list test_list
isakmp authorization list test_list
client configuration address respond
accounting test_list
!
crypto ipsec transform-set t3 esp-3des esp-sha-hmac
!
!
crypto dynamic-map dyn-ra 10
set transform-set t3
set isakmp-profile test_pro
reverse-route
!
!
crypto map map-ra local-address GigabitEthernet3/15
crypto map map-ra 1 ipsec-isakmp dynamic dyn-ra
!
!
interface GigabitEthernet1/0/1
switchport
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 1,100,1002-1005
switchport mode trunk
mtu 9216
mls qos trust ip-precedence
flowcontrol receive on
flowcontrol send off
spanning-tree portfast edge trunk
!
interface GigabitEthernet1/0/2
switchport
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 1,1002-1005
switchport mode trunk
mtu 9216
mls qos trust ip-precedence
flowcontrol receive on
flowcontrol send off
spanning-tree portfast edge trunk
!
!
interface GigabitEthernet3/15
mtu 9216
ip address 120.0.0.254 255.255.255.0
crypto engine outside
!
!
!
interface Vlan100
ip vrf forwarding ivrf1
ip address 120.0.0.100 255.255.255.0
ip flow ingress
crypto map map-ra
crypto engine slot 1/0 inside
!
!
!
ip local pool pool1 100.0.1.1 100.0.5.250
IPsec VPN Monitoring Configuration Example
The following example shows how to configure an IKE peer for IPsec VPN monitoring:
!
upgrade fpd auto
version 12.2
service timestamps debug datetime
service timestamps log datetime
no service password-encryption
service counters max age 5
!
hostname Ez-DCM-CC
!
boot-start-marker
boot system disk1:s72033-adventerprisek9_wan-mz.122-33.SXH
boot-end-marker
!
logging buffered 1000000 debugging
enable secret 5 $1$i5FZ$47ybx5dEaUKc3eRaDIZ/z.
!
username cisco password 0 cisco
username t1 password 0 t1
username t2 password 0 t2
username t3 password 0 t3
username t4 password 0 t4
username t5 password 0 t5
username t6 password 0 t6
username t7 password 0 t7
username t8 password 0 t8
username user1 password 0 letmein
aaa new-model
aaa authentication login myuserlist local
aaa authorization network myuserlist local
!
aaa session-id common
clock timezone PST -7
call-home
alert-group configuration
alert-group diagnostic
alert-group environment
alert-group inventory
alert-group syslog
profile "CiscoTAC-1"
no active
no destination transport-method http
destination transport-method email
destination address email callhome@cisco.com
destination address http https://tools.cisco.com/its/service/oddce/services/DDCEService
subscribe-to-alert-group diagnostic severity minor
subscribe-to-alert-group environment severity minor
subscribe-to-alert-group syslog severity major pattern ".*"
subscribe-to-alert-group configuration periodic monthly 10 15:08
subscribe-to-alert-group inventory periodic monthly 10 14:53
ip subnet-zero
!
no ip domain-lookup
ip domain-name cisco.com
ipv6 mfib hardware-switching replication-mode ingress
vtp mode transparent
no mls acl tcam share-global
mls netflow interface
no mls flow ip
no mls flow ipv6
mls cef error action freeze
!
redundancy
keepalive-enable
mode sso
linecard-group 0 feature-card
class load-sharing
subslot 4/0
main-cpu
auto-sync running-config
spanning-tree mode pvst
no spanning-tree optimize bpdu transmission
spanning-tree extend system-id
diagnostic monitor syslog
diagnostic cns publish cisco.cns.device.diag_results
diagnostic cns subscribe cisco.cns.device.diag_commands
!
power redundancy-mode combined
port-channel per-module load-balance
!
vlan internal allocation policy descending
vlan access-log ratelimit 2000
!
vlan 2-3,16-17
!
crypto logging session
crypto logging ezvpn
!
crypto logging ezvpn group mygroup
!
crypto isakmp policy 10
encr aes
authentication pre-share
group 2
lifetime 43200
crypto isakmp key WorldCup2006 address 0.0.0.0 0.0.0.0
!
crypto isakmp client configuration group mygroup
key mykey
pool mypool
!
crypto isakmp peer address 16.0.0.3
description first-ezvpn-client
!
crypto isakmp peer address 16.0.0.4
description second-ezvpn-client
!
crypto ipsec security-association lifetime seconds 21600
!
crypto ipsec transform-set MyTranSet esp-aes esp-sha-hmac
no crypto ipsec nat-transparency udp-encaps
!
crypto call admission limit ike in-negotiation-sa 10
!
crypto dynamic-map DynMap1 10
set transform-set MyTranSet
reverse-route
!
crypto map MyMap1 client authentication list myuserlist
crypto map MyMap1 isakmp authorization list myuserlist
crypto map MyMap1 client configuration address respond
crypto map MyMap1 500 ipsec-isakmp dynamic DynMap1
!
interface GigabitEthernet1/25
no ip address
crypto connect vlan 16
!
interface GigabitEthernet1/27
no ip address
crypto connect vlan 17
!
interface GigabitEthernet1/29
ip address 26.0.0.2 255.255.255.0
!
interface GigabitEthernet4/0/1
switchport
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 16,17,1002-1005
switchport mode trunk
mtu 9216
mls qos vlan-based
mls qos trust cos
flowcontrol receive on
flowcontrol send off
spanning-tree portfast trunk
!
interface GigabitEthernet4/0/2
switchport
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 1002-1005
switchport mode trunk
mtu 9216
mls qos trust cos
flowcontrol receive on
flowcontrol send off
spanning-tree portfast trunk
!
interface GigabitEthernet5/2
ip address 44.0.111.114 255.0.0.0
media-type rj45
!
interface Vlan1
no ip address
ip flow ingress
ip igmp snooping querier
shutdown
!
interface Vlan16
ip address 16.0.0.2 255.255.224.0
no mop enabled
crypto map MyMap1
crypto engine slot 4/0
!
interface Vlan17
ip address 16.0.32.2 255.255.224.0
no mop enabled
crypto map MyMap1
crypto engine slot 4/0
!
ip local pool mypool 36.0.0.1 36.0.15.254
ip local pool mypool 36.0.16.1 36.0.31.254
ip local pool mypool 36.0.32.1 36.0.47.254
ip local pool mypool 36.0.48.1 36.0.63.254
ip default-gateway 44.0.100.1
ip classless
ip route 43.0.0.0 255.0.0.0 44.0.100.1
ip route 45.0.0.0 255.0.0.0 44.0.100.1
ip route 223.255.254.53 255.255.255.255 44.0.100.1
ip route 223.255.254.54 255.255.255.255 44.0.100.1
!
no ip http server
no ip http secure-server
!
radius-server source-ports 1645-1646
!
control-plane
!
dial-peer cor custom
!
line con 0
exec-timeout 0 0
line vty 0 4
password cisco
transport input lat pad mop udptn telnet rlogin ssh nasi acercon
line vty 5 15
transport input lat pad mop udptn telnet rlogin ssh nasi acercon
!
monitor event-trace platform cmfi lc agg-label
monitor event-trace platform cmfi lc error
ntp clock-period 17280219
ntp update-calendar
ntp server 223.255.254.254
ntp server 223.255.254.53
mac-address-table aging-time 0
!
end