案例分析网络拓扑结构
目的
地址介绍
案例描述
排错工具
故障排错过程
案例结果
学习完本案例后,对于IPsec vpn服务中断的故障排错有一个基本的思路。
SH Hai ASA的public IP 地址为10.10.10.10, Philippine ASA的public IP 地址为 11.11.11.11.(因涉及真实案例,故本案例中所有的公口地址都采用私网地址)
用户自述并未对网络做任何变动,但突然就发现从上海到菲律宾的ipsec vpn不通了。从上海到菲律宾的公网IP是可达的。现要找出故障原因,使得从上海的192.168.0.0子网到菲律宾的 106.0.0.0子网可以通过 VPN 通讯。
Show crypto isakmp sa
Show crypto ipsec sa
Capture命令
Show logging
Show crypto isakmp sa Show crypto ipsec sa peer 11.11.11.11输出结果为:”There are no ipsec sas for peer 11.11.11.11”
SH-5520(config)# access-list cs permit ip 192.168.0.0 255.255.128.0 106.0.0.0 255.255.255.0 SH-5520(config)# access-list cs perm ip 106.0.0.0 255.255.255.0 192.168.0.0 255.255.128.0 SH-5520(config)# capture cs access-list cs in LAN SH-5520(config)# show capture cs 19 packets captured 1: 13:34:37.443611 192.168.0.9 > 106.0.0.251: icmp: echo request 2: 13:34:37.443892 192.168.0.9 > 106.0.0.251: icmp: echo request :从上我们可以看出,SH Hai ASA已经成功收到了来自192.168.0.0子网的数据包。但是并没有收到来自106.0.0.0子网的数据包。
Philippine(config)# show capture cs 0 packets captured
SH-5520# show route C 192.168.0.0 255.255.255.0 is directly connected, LAN S* 0.0.0.0 0.0.0.0 [1/0] via 20x.xx.xx.xx, Outside1没有问题。
Philippine# show route C 106.0.0.0 255.255.255.0 is directly connected, inside S* 0.0.0.0 0.0.0.0 [1/0] via 20x.xx.xx.xx, Outside也没有问题。
SH-5520# ping 11.11.11.11 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 122.55.79.161, timeout is 2 seconds: !!!!! Philippine# ping 10.10.10.10 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 122.55.79.161, timeout is 2 seconds: …..可以看到单向通讯
access-list cs1 permit ip host 10.10.10.10 host 11.11.11.11 access-list cs1 permit ip host 11.11.11.11 host 10.10.10.10 capture cs1 access-list cs1 in LAN同样在Philippine方也做同样的capture,命令略。
Outside1 20x.1x4.x1.x49 000f.23d5.2c20 32 Outside1 20x.x36.x16.2x9 000f.23d5.2c20 1270 Outside1 2x2.1x6.2x8.x4 000f.23d5.2c20 11262 Outside1 2xx.x.1x8.x7 000f.23d5.2c20 11268发现有四个不同的IP 地址(下一跳)都映射到了同一个MAC 地址。
Logging on Logging buffered informational Logging timestamp然后show logging 发现SH ASA 报错:”………..no acceptable ipsec SA”.
crypto map Outside1_map 1 match address Outside1_1_cryptomap crypto map Outside1_map 1 set pfs group1 crypto map Outside1_map 1 set peer 11.11.11.11 crypto map Outside1_map 1 set transform-set ESP-3DES-SHAPhilippine ASA的配置:
crypto map outside-1_map 25 match address outside-1_60_cryptomap crypto map outside-1_map 25 set peer 10.10.10.10 crypto map outside-1_map 25 set transform-set ESP-3DES-SHA问题找到,SH ASA启动了pfs group1, 而 Philippine ASA 没有启动。
SH ASA和Philippine ASA最终可以成功建立SA,两个子网之间的流量通过VPN通讯。
SH-5520# show crypto ipsec sa peer 11.11.11.11 peer address: 11.11.11.11 Crypto map tag: Outside1_map, seq num: 1, local addr: 10.10.10.10 access-list Outside1_1_cryptomap permit ip 192.168.0.0 255.255.128.0 106.0.0.0 255.255.255.0 local ident (addr/mask/prot/port): (192.168.0.0/255.255.128.0/0/0) remote ident (addr/mask/prot/port): (106.0.0.0/255.255.255.0/0/0) current_peer: 11.11.11.11 #pkts encaps: 1888599, #pkts encrypt: 1888599, #pkts digest: 1888599 #pkts decaps: 1681578, #pkts decrypt: 1681578, #pkts verify: 1681578 #pkts compressed: 0, #pkts decompressed: 0