Step 1 |
Initiate the IKE and IPsec SAs between Host 1 and Host 2
Router# show crypto isakmp sa
f_vrf/i_vrf dst src state conn-id slot
/ 10.2.2.2 10.1.1.1 QM_IDLE 1 0
Router# show crypto isakmp sa
f_vrf/i_vrf dst src state conn-id slot
/ 10.1.1.1 10.2.2.2 QM_IDLE 1 0
Router# show crypto ipsec sa interface fastethernet0/0
interface: FastEthernet0/0
Crypto map tag: testtag1, local addr. 10.1.1.1
protected vrf:
local ident (addr/mask/prot/port): (10.0.0.1/255.255.255.255/0/0)
remote ident (addr/mask/prot/port): (10.0.2.2/255.255.255.255/0/0)
current_peer: 10.2.2.2:500
PERMIT, flags={origin_is_acl,}
#pkts encaps: 10, #pkts encrypt: 10, #pkts digest: 10
#pkts decaps: 10, #pkts decrypt: 10, #pkts verify: 10
#pkts compressed: 0, #pkts decompressed: 0
#pkts not compressed: 0, #pkts compr. failed: 0
#pkts not decompressed: 0, #pkts decompress failed: 0
#send errors 0, #recv errors 0
local crypto endpt.: 10.1.1.1, remote crypto endpt.: 10.2.2.2
path mtu 1500, media mtu 1500
current outbound spi: 7AA69CB7
inbound esp sas:
spi: 0x249C5062(614223970)
transform: esp-des esp-sha-hmac ,
in use settings ={Tunnel, }
slot: 0, conn id: 5123, flow_id: 1, crypto map: testtag1
crypto engine type: Hardware
sa timing: remaining key lifetime (k/sec): (4537831/3595)
IV size: 8 bytes
replay detection support: Y
inbound ah sas:
spi: 0xB16D1587(2976716167)
transform: ah-sha-hmac ,
in use settings ={Tunnel, }
slot: 0, conn id: 5121, flow_id: 1, crypto map: testtag1
crypto engine type: Hardware
sa timing: remaining key lifetime (k/sec): (4537831/3595)
replay detection support: Y
inbound pcp sas:
outbound esp sas:
spi: 0x7AA69CB7(2057739447)
transform: esp-des esp-sha-hmac ,
in use settings ={Tunnel, }
slot: 0, conn id: 5124, flow_id: 2, crypto map: testtag1
crypto engine type: Hardware
sa timing: remaining key lifetime (k/sec): (4537835/3595)
IV size: 8 bytes
replay detection support: Y
outbound ah sas:
spi: 0x1214F0D(18960141)
transform: ah-sha-hmac ,
in use settings ={Tunnel, }
slot: 0, conn id: 5122, flow_id: 2, crypto map: testtag1
crypto engine type: Hardware
sa timing: remaining key lifetime (k/sec): (4537835/3594)
replay detection support: Y
outbound pcp sas:
Router# show crypto ipsec sa interface Fastethernet1/0
interface: FastEthernet1/0
Crypto map tag: testtag1, local addr. 10.2.2.2
protected vrf:
local ident (addr/mask/prot/port): (10.0.2.2/255.255.255.255/0/0)
remote ident (addr/mask/prot/port): (10.0.0.1/255.255.255.255/0/0)
current_peer: 10.1.1.1:500
PERMIT, flags={origin_is_acl,}
#pkts encaps: 10, #pkts encrypt: 10, #pkts digest: 10
#pkts decaps: 10, #pkts decrypt: 10, #pkts verify: 10
#pkts compressed: 0, #pkts decompressed: 0
#pkts not compressed: 0, #pkts compr. failed: 0
#pkts not decompressed: 0, #pkts decompress failed: 0
#send errors 0, #recv errors 0
local crypto endpt.: 10.2.2.2, remote crypto endpt.: 10.1.1.1
path mtu 1500, media mtu 1500
current outbound spi: 249C5062
inbound esp sas:
spi: 0x7AA69CB7(2057739447)
transform: esp-des esp-sha-hmac ,
in use settings ={Tunnel, }
slot: 0, conn id: 5123, flow_id: 1, crypto map: testtag1
crypto engine type: Hardware
sa timing: remaining key lifetime (k/sec): (4421281/3593)
IV size: 8 bytes
replay detection support: Y
inbound ah sas:
spi: 0x1214F0D(18960141)
transform: ah-sha-hmac ,
in use settings ={Tunnel, }
slot: 0, conn id: 5121, flow_id: 1, crypto map: testtag1
crypto engine type: Hardware
sa timing: remaining key lifetime (k/sec): (4421281/3593)
replay detection support: Y
inbound pcp sas:
outbound esp sas:
spi: 0x249C5062(614223970)
transform: esp-des esp-sha-hmac ,
in use settings ={Tunnel, }
slot: 0, conn id: 5124, flow_id: 2, crypto map: testtag1
crypto engine type: Hardware
sa timing: remaining key lifetime (k/sec): (4421285/3593)
IV size: 8 bytes
replay detection support: Y
outbound ah sas:
spi: 0xB16D1587(2976716167)
transform: ah-sha-hmac ,
in use settings ={Tunnel, }
slot: 0, conn id: 5122, flow_id: 2, crypto map: testtag1
crypto engine type: Hardware
sa timing: remaining key lifetime (k/sec): (4421285/3592)
replay detection support: Y
outbound pcp sas:
|
Step 2 |
Clear the IKE and IPsec SAs on Router B
Router# clear crypto isakmp
Router# clear crypto sa
Router# show crypto isakmp sa
f_vrf/i_vrf dst src state conn-id slot
/ 10.2.2.2. 10.1.1.1 MM_NO_STATE 1 0 (deleted)
Router# show crypto ipsec sa
interface: FastEthernet1/0
Crypto map tag: testtag1, local addr. 10.2.2.2
protected vrf:
local ident (addr/mask/prot/port): (10.0.2.2/255.255.255.255/0/0)
remote ident (addr/mask/prot/port): (10.0.0.1/255.255.255.255/0/0)
current_peer: 10.1.1.1:500
PERMIT, flags={origin_is_acl,}
#pkts encaps: 0, #pkts encrypt: 0, #pkts digest: 0
#pkts decaps: 0, #pkts decrypt: 0, #pkts verify: 0
#pkts compressed: 0, #pkts decompressed: 0
#pkts not compressed: 0, #pkts compr. failed: 0
#pkts not decompressed: 0, #pkts decompress failed: 0
#send errors 0, #recv errors 0
local crypto endpt.: 10.2.2.2, remote crypto endpt.: 10.1.1.1
path mtu 1500, media mtu 1500
current outbound spi: 0
inbound esp sas:
inbound ah sas:
inbound pcp sas:
outbound esp sas:
outbound ah sas:
outbound pcp sas:
|
Step 3 |
Send traffic from Host 1 to Host 2 and ensure that new IKE and IPsec SAs are correctly established
ping
Protocol [ip]: ip
Target IP address: 10.0.2.2
Repeat count [5]: 30
Datagram size [100]: 100
Timeout in seconds [2]:
Extended commands [n]: no
Sweep range of sizes [n]: n
Type escape sequence to abort.
Sending 30, 100-byte ICMP Echos to 10.0.2.2, timeout is 2 seconds:
..!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 93 percent (28/30), round-trip min/avg/max = 1/3/8 ms
RouterB# show crypto isakmp sa
f_vrf/i_vrf dst src state conn-id slot
/ 10.1.1.1 10.2.2.2 QM_IDLE 3 0
/ 10.1.1.1 10.2.2.2 MM_NO_STATE 1 0 (deleted)
RouterB# show crypto ipsec sa
interface: FastEthernet1/0
Crypto map tag: testtag1, local addr. 10.2.2.2
protected vrf:
local ident (addr/mask/prot/port): (10.0.2.2/255.255.255.255/0/0)
remote ident (addr/mask/prot/port): (10.0.0.1/255.255.255.255/0/0)
current_peer: 10.1.1.1:500
PERMIT, flags={origin_is_acl,}
#pkts encaps: 28, #pkts encrypt: 28, #pkts digest: 28
#pkts decaps: 28, #pkts decrypt: 28, #pkts verify: 28
#pkts compressed: 0, #pkts decompressed: 0
#pkts not compressed: 0, #pkts compr. failed: 0
#pkts not decompressed: 0, #pkts decompress failed: 0
#send errors 0, #recv errors 0
local crypto endpt.: 10.2.2.2, remote crypto endpt.: 10.1.1.1
path mtu 1500, media mtu 1500
current outbound spi: D763771F
inbound esp sas:
spi: 0xE7AB4256(3886760534)
transform: esp-des esp-sha-hmac ,
in use settings ={Tunnel, }
slot: 0, conn id: 5127, flow_id: 3, crypto map: testtag1
crypto engine type: Hardware
sa timing: remaining key lifetime (k/sec): (4502463/3596)
IV size: 8 bytes
replay detection support: Y
inbound ah sas:
spi: 0xF9205CED(4179647725)
transform: ah-sha-hmac ,
in use settings ={Tunnel, }
slot: 0, conn id: 5125, flow_id: 3, crypto map: testtag1
crypto engine type: Hardware
sa timing: remaining key lifetime (k/sec): (4502463/3596)
replay detection support: Y
inbound pcp sas:
outbound esp sas:
spi: 0xD763771F(3613619999)
transform: esp-des esp-sha-hmac ,
in use settings ={Tunnel, }
slot: 0, conn id: 5128, flow_id: 4, crypto map: testtag1
crypto engine type: Hardware
sa timing: remaining key lifetime (k/sec): (4502468/3596)
IV size: 8 bytes
replay detection support: Y
outbound ah sas:
spi: 0xEB95406F(3952427119)
transform: ah-sha-hmac ,
in use settings ={Tunnel, }
slot: 0, conn id: 5126, flow_id: 4, crypto map: testtag1
crypto engine type: Hardware
sa timing: remaining key lifetime (k/sec): (4502468/3595)
replay detection support: Y
outbound pcp sas:
RouterA# show crypto isakmp sa
f_vrf/i_vrf dst src state conn-id slot
/ 10.2.2.2 10.1.1.1 MM_NO_STATE 1 0 (deleted)
/ 10.2.2.2 10.1.1.1 QM_IDLE 2 0
|
Step 4 |
Check for an invalid SPI message on Router B
Router# show logging
Syslog logging: enabled (10 messages dropped, 13 messages rate-limited, 0 flushes, 0 overruns, xml disabled)
Console logging: disabled
Monitor logging: level debugging, 0 messages logged, xml disabled
Buffer logging: level debugging, 43 messages logged, xml disabled
Logging Exception size (8192 bytes)
Count and timestamp logging messages: disabled
Trap logging: level informational, 72 message lines logged
Log Buffer (8000 bytes):
*Mar 24 20:55:45.739: %CRYPTO-4-RECVD_PKT_INV_SPI: decaps: rec'd IPSEC packet has invalid spi for
destaddr=10.2.2.2, prot=51, spi=0x1214F0D(18960141), srcaddr=10.1.1.1
*Mar 24 20:55:47.743: IPSEC(validate_proposal_request): proposal part #1,
(key eng. msg.) INBOUND local= 10.2.2.2, remote= 10.1.1.1,
local_proxy= 10.0.2.2/255.255.255.255/0/0 (type=1),
remote_proxy= 10.0.0.1/255.255.255.255/0/0 (type=1),
protocol= AH, transform= ah-sha-hmac ,
lifedur= 0s and 0kb,
spi= 0x0(0), conn_id= 0, keysize= 0, flags= 0x2
*Mar 24 20:55:47.743: IPSEC(validate_proposal_request): proposal part #2,
(key eng. msg.) INBOUND local= 10.2.2.2, remote= 10.1.1.1,
local_proxy= 10.0.2.2/255.255.255.255/0/0 (type=1),
remote_proxy= 10.0.0.1/255.255.255.255/0/0 (type=1),
protocol= ESP, transform= esp-des esp-sha-hmac ,
lifedur= 0s and 0kb,
spi= 0x0(0), conn_id= 0, keysize= 0, flags= 0x2
*Mar 24 20:55:47.743: IPSEC(kei_proxy): head = testtag1, map->ivrf = , kei->ivrf =
*Mar 24 20:55:47.743: IPSEC(key_engine): got a queue event with 2 kei messages
*Mar 24 20:55:47.743: IPSEC(spi_response): getting spi 4179647725 for SA
from 10.2.2.2 to 10.1.1.1 for prot 2
*Mar 24 20:55:47.747: IPSEC(spi_response): getting spi 3886760534 for SA
from 10.2.2.2 to 10.1.1.1 for prot 3
*Mar 24 20:55:48.071: IPSec: Flow_switching Allocated flow for flow_id 939524099
*Mar 24 20:55:48.071: IPSec: Flow_switching Allocated flow for flow_id 939524100
*Mar 24 20:55:48.135: IPSEC(key_engine): got a queue event with 4 kei messages
*Mar 24 20:55:48.135: IPSEC(initialize_sas): ,
(key eng. msg.) INBOUND local= 10.2.2.2, remote= 10.1.1.1,
local_proxy= 10.0.2.2/0.0.0.0/0/0 (type=1),
remote_proxy= 10.0.0.1/0.0.0.0/0/0 (type=1),
protocol= AH, transform= ah-sha-hmac ,
lifedur= 3600s and 4608000kb,
spi= 0xF9205CED(4179647725), conn_id= 939529221, keysize= 0, flags= 0x2
*Mar 24 20:55:48.135: IPSEC(initialize_sas): ,
(key eng. msg.) OUTBOUND local= 10.2.2.2, remote= 10.1.1.1,
local_proxy= 10.0.2.2/0.0.0.0/0/0 (type=1),
remote_proxy= 10.0.0.1/0.0.0.0/0/0 (type=1),
protocol= AH, transform= ah-sha-hmac ,
lifedur= 3600s and 4608000kb,
spi= 0xEB95406F(3952427119), conn_id= 939529222, keysize= 0, flags= 0xA
*Mar 24 20:55:48.135: IPSEC(initialize_sas): ,
(key eng. msg.) INBOUND local= 10.2.2.2, remote= 10.1.1.1,
local_proxy= 10.0.2.2/0.0.0.0/0/0 (type=1),
remote_proxy= 10.0.0.1/0.0.0.0/0/0 (type=1),
protocol= ESP, transform= esp-des esp-sha-hmac ,
lifedur= 3600s and 4608000kb,
spi= 0xE7AB4256(3886760534), conn_id= 939529223, keysize= 0, flags= 0x2
*Mar 24 20:55:48.135: IPSEC(initialize_sas): ,
(key eng. msg.) OUTBOUND local= 10.2.2.2, remote= 10.1.1.1,
local_proxy= 10.0.2.2/0.0.0.0/0/0 (type=1),
remote_proxy= 10.0.0.1/0.0.0.0/0/0 (type=1),
protocol= ESP, transform= esp-des esp-sha-hmac ,
lifedur= 3600s and 4608000kb,
spi= 0xD763771F(3613619999), conn_id= 939529224, keysize= 0, flags= 0xA
*Mar 24 20:55:48.139: IPSEC(kei_proxy): head = testtag1, map->ivrf = , kei->ivrf =
*Mar 24 20:55:48.139: IPSEC(mtree_add_ident): src 10.2.2.2, dest 10.1.1.1, dest_port 0
*Mar 24 20:55:48.139: IPSEC(create_sa): sa created,
(sa) sa_dest= 10.1.1.1, sa_prot= 51,
sa_spi= 0xF9205CED(4179647725),
sa_trans= ah-sha-hmac , sa_conn_id= 939529221
*Mar 24 20:55:48.139: IPSEC(create_sa): sa created,
(sa) sa_dest= 10.2.2.2, sa_prot= 51,
sa_spi= 0xEB95406F(3952427119),
sa_trans= ah-sha-hmac , sa_conn_id= 939529222
*Mar 24 20:55:48.139: IPSEC(create_sa): sa created,
(sa) sa_dest= 10.1.1.1, sa_prot= 50,
sa_spi= 0xE7AB4256(3886760534),
sa_trans= esp-des esp-sha-hmac , sa_conn_id= 939529223
*Mar 24 20:55:48.139: IPSEC(create_sa): sa created,
(sa) sa_dest= 10.2.2.2, sa_prot= 50,
sa_spi= 0xD763771F(3613619999),
sa_trans= esp-des esp-sha-hmac , sa_conn_id= 939529224
ipseca-72a#
|