Router#show access-lists 101
Extended IP access list 101
10 permit udp host 172.17.0.1 host 172.16.1.1 eq isakmp log (4 matches)
20 permit udp host 172.17.0.5 host 172.16.1.1 eq isakmp log (4 matches)
30 permit ip any any (295 matches)
注意:请确保您的access-list中允许ip any any。否则,由于访问列表应用在出口接口的入站方向,因此可以阻止所有其他流量。
验证GRE在删除隧道保护时是否有效
当DMVPN不起作用时,在您使用IPsec进行故障排除之前,请验证GRE隧道在没有IPsec加密的情况下可以正常工作。
有关详细信息,请参阅如何配置GRE隧道。
NHRP注册失败
中心和辐射点之间的 VPN 隧道处于 Up 状态,但无法传输数据流量:
Router#show crypto isakmp sa
dst src state conn-id slot status
172.17.0.1 172.16.1.1 QM_IDLE 1082 0 ACTIVE
Router#show crypto IPSEC sa
local ident (addr/mask/prot/port): (172.16.1.1/255.255.255.255/47/0)
remote ident (addr/mask/prot/port): (172.17.0.1/255.255.255.255/47/0)
#pkts encaps: 154, #pkts encrypt: 154, #pkts digest: 154
#pkts decaps: 0, #pkts decrypt: 0, #pkts verify: 0
inbound esp sas:
spi: 0xF830FC95(4163959957)
outbound esp sas:
spi: 0xD65A7865(3596253285)
!--- !--- Output is truncated !---
它显示返回流量不会从隧道的另一端返回。
检查辐射点路由器中的 NHS 条目:
Router#show ip nhrp nhs detail
Legend: E=Expecting replies, R=Responding
Tunnel0: 172.17.0.1 E req-sent 0 req-failed 30 repl-recv 0
Pending Registration Requests:
Registration Request: Reqid 4371, Ret 64 NHS 172.17.0.1
它显示NHS请求失败。要解决此问题,请确保辐射点路由器隧道接口上的配置正确。
配置示例:
interface Tunnel0
ip address 10.0.0.9 255.255.255.0
ip nhrp map 10.0.0.1 172.17.0.1
ip nhrp map multicast 172.17.0.1
ip nhrp nhs 172.17.0.1
!--- !--- Output is truncated !---
NHS 服务器条目正确的配置示例:
interface Tunnel0
ip address 10.0.0.9 255.255.255.0
ip nhrp map 10.0.0.1 172.17.0.1
ip nhrp map multicast 172.17.0.1
ip nhrp nhs 10.0.0.1
!--- !--- Output is truncated !---
验证 NHS 条目和 IPsec 加密/解密计数器:
Router#show ip nhrp nhs detail
Legend: E=Expecting replies, R=Responding
Tunnel0: 10.0.0.1 RE req-sent 4 req-failed 0 repl-recv 3 (00:01:04 ago)
Router#show crypto IPSec sa
local ident (addr/mask/prot/port): (172.16.1.1/255.255.255.255/47/0)
remote ident (addr/mask/prot/port): (172.17.0.1/255.255.255.255/47/0)
#pkts encaps: 121, #pkts encrypt: 121, #pkts digest: 121
#pkts decaps: 118, #pkts decrypt: 118, #pkts verify: 118
inbound esp sas:
spi: 0x1B7670FC(460747004)
outbound esp sas:
spi: 0x3B31AA86(993110662)
!--- !--- Output is truncated !---
验证是否已正确配置生命周期
使用以下命令验证当前 SA 生命周期和下一次重新协商的时间:
请注意 SA 生命周期的值。如果这些值接近配置的生命周期(ISAKMP 的默认生命周期为 24 小时,ipsec 的默认生命周期为 1 小时),则表示这些 SA 最近已经过协商。如果您稍候片刻,然后再次协商,ISAKMP和/或IPsec可能会上下反弹。
Router#show crypto ipsec security-assoc lifetime
Security association lifetime: 4608000 kilobytes/3600 seconds
Router#show crypto isakmp policy
Global IKE policy
Protection suite of priority 1
Encryption algorithm: DES-Data Encryption Standard (65 bit keys)
Hash algorithm: Message Digest 5
Authentication method: Pre-Shared Key
Diffie-Hellman group: #1 (768 bit)
Lifetime: 86400 seconds, no volume limit
Default protection suite
Encryption algorithm: DES- Data Encryption Standard (56 bit keys)
Hash algorithm: Secure Hash Standard
Authentication method: Rivest-Shamir-Adleman Signature
Diffie-Hellman group: #1 (768 bit)
Lifetime: 86400 seconds, no volume limit
Router# show crypto ipsec sa
interface: Ethernet0/3
Crypto map tag: vpn, local addr. 172.17.0.1
local ident (addr/mask/prot/port): (172.16.1.1/255.255.255.255/47/0)
remote ident (addr/mask/prot/port): (172.17.0.1/255.255.255.255/47/0)
current_peer: 172.17.0.1:500
PERMIT, flags={origin_is_acl,}
#pkts encaps: 19, #pkts encrypt: 19, #pkts digest 19
#pkts decaps: 19, #pkts decrypt: 19, #pkts verify 19
#pkts compressed: 0, #pkts decompressed: 0
#pkts not compressed: 0, #pkts compr. failed: 0, #pkts decompress failed: 0
#send errors 1, #recv errors 0
local crypto endpt.: 172.16.1.1, remote crypto endpt.: 172.17.0.1
path mtu 1500, media mtu 1500
current outbound spi: 8E1CB77A
inbound esp sas:
spi: 0x4579753B(1165587771)
transform: esp-3des esp-md5-hmac ,
in use settings ={Tunnel, }
slot: 0, conn id: 2000, flow_id: 1, crypto map: vpn
sa timing: remaining key lifetime (k/sec): (4456885/3531)
IV size: 8 bytes
replay detection support: Y
outbound esp sas:
spi: 0x8E1CB77A(2384246650)
transform: esp-3des esp-md5-hmac ,
in use settings ={Tunnel, }
slot: 0, conn id: 2001, flow_id: 2, crypto map: vpn
sa timing: remaining key lifetime (k/sec): (4456885/3531)
IV size: 8 bytes
replay detection support: Y
验证是否只在一个方向传输流量
分支到分支路由器之间的VPN隧道处于启用状态,但无法传递数据流量。
Spoke1# show crypto ipsec sa peer 172.16.2.11
local ident (addr/mask/prot/port): (172.16.1.1/255.255.255.255/47/0)
remote ident (addr/mask/prot/port): (172.16.2.11/255.255.255.255/47/0)
#pkts encaps: 110, #pkts encrypt: 110
#pkts decaps: 0, #pkts decrypt: 0,
local crypto endpt.: 172.16.1.1,
remote crypto endpt.: 172.16.2.11
inbound esp sas:
spi: 0x4C36F4AF(1278669999)
outbound esp sas:
spi: 0x6AC801F4(1791492596)
!--- !--- Output is truncated !---
Spoke2#sh crypto ipsec sa peer 172.16.1.1
local ident (addr/mask/prot/port): (172.16.2.11/255.255.255.255/47/0)
remote ident (addr/mask/prot/port): (172.16.1.1/255.255.255.255/47/0)
#pkts encaps: 116, #pkts encrypt: 116,
#pkts decaps: 110, #pkts decrypt: 110,
local crypto endpt.: 172.16.2.11,
remote crypto endpt.: 172.16.1.1
inbound esp sas:
spi: 0x6AC801F4(1791492596)
outbound esp sas:
spi: 0x4C36F4AF(1278669999
!--- !--- Output is truncated !---
spoke1 中无 decap 数据包,这表明在 spoke1 到 spoke2 的返程路径中的某个位置丢弃了 esp 数据包。
spoke2路由器同时显示encap和decap,这意味着ESP流量在到达spoke2之前会被过滤。它可能发生在spoke2的ISP端,也可能发生在spoke2路由器和spoke1路由器之间路径中的任何防火墙上。在允许ESP (IP协议50)之后,spoke1和spoke2都会显示封装和解码计数器增加。
spoke1# show crypto ipsec sa peer 172.16.2.11
local ident (addr/mask/prot/port): (172.16.1.1/255.255.255.255/47/0)
remote ident (addr/mask/prot/port): (172.16.2.11/255.255.255.255/47/0)
#pkts encaps: 300, #pkts encrypt: 300
#pkts decaps: 200, #pkts decrypt: 200
!--- !--- Output is truncated !---
spoke2#sh crypto ipsec sa peer 172.16.1.1
local ident (addr/mask/prot/port): (172.16.2.11/255.255.255.255/47/0)
remote ident (addr/mask/prot/port): (172.16.1.1/255.255.255.255/47/0)
#pkts encaps: 316, #pkts encrypt: 316,
#pkts decaps: 300, #pkts decrypt: 310
!--- !--- Output is truncated !---
验证已建立路由协议邻居
辐射点不能建立路由协议邻居关系:
Hub# show ip eigrp neighbors
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
2 10.0.0.9 Tu0 13 00:00:37 1 5000 1 0
0 10.0.0.5 Tu0 11 00:00:47 1587 5000 0 1483
1 10.0.0.11 Tu0 13 00:00:56 1 5000 1 0
Syslog message:
%DUAL-5-NBRCHANGE: IP-EIGRP(0) 10:
Neighbor 10.0.0.9 (Tunnel0) is down: retry limit exceeded
Hub# show ip route eigrp
172.17.0.0/24 is subnetted, 1 subnets
C 172.17.0.0 is directly connected, FastEthernet0/0
10.0.0.0/24 is subnetted, 1 subnets
C 10.0.0.0 is directly connected, Tunnel0
C 192.168.0.0/24 is directly connected, FastEthernet0/1
S* 0.0.0.0/0 [1/0] via 172.17.0.100
验证是否在中心正确配置了 NHRP 组播映射。
需要在中心隧道接口中配置动态 NHRP 组播映射。
配置示例:
interface Tunnel0
ip address 10.0.0.1 255.255.255.0
ip mtu 1400
no ip next-hop-self eigrp 10
ip nhrp authentication test
ip nhrp network-id 10
no ip split-horizon eigrp 10
tunnel mode gre multipoint
!--- !--- Output is truncated !---
动态 NHRP 组播映射条目正确的配置示例:
interface Tunnel0
ip address 10.0.0.1 255.255.255.0
ip mtu 1400
no ip next-hop-self eigrp 10
ip nhrp authentication test
ip nhrp map multicast dynamic
ip nhrp network-id 10
no ip split-horizon eigrp 10
tunnel mode gre multipoint
!--- !--- Output is truncated !---
这允许 NHRP 自动将辐射点路由器添加到组播 NHRP 映射。
有关详细信息,请参阅思科IOS IP地址服务命令参考中的ip nhrp map multicast dynamic 命令。
Hub#show ip eigrp neighbors
IP-EIGRP neighbors for process 10
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
2 10.0.0.9 Tu0 12 00:16:48 13 200 0 334
1 10.0.0.11 Tu0 13 00:17:10 11 200 0 258
0 10.0.0.5 Tu0 12 00:48:44 1017 5000 0 1495
Hub#show ip route
172.17.0.0/24 is subnetted, 1 subnets
C 172.17.0.0 is directly connected, FastEthernet0/0
D 192.168.11.0/24 [90/2944000] via 10.0.0.11, 00:16:12, Tunnel0
10.0.0.0/24 is subnetted, 1 subnets
C 10.0.0.0 is directly connected, Tunnel0
C 192.168.0.0/24 is directly connected, FastEthernet0/1
D 192.168.2.0/24 [90/2818560] via 10.0.0.9, 00:15:45, Tunnel0
S* 0.0.0.0/0 [1/0] via 172.17.0.100
通过 eigrp 协议获知到辐射点的路由。
使用DMVPN集成的远程访问VPN问题
问题
DMVPN工作正常,但无法建立RAVPN。
解决方案
使用 ISAKMP 配置文件和 IPsec 配置文件实现此目的。 创建单独的 DMVPN 和 RAVPN 配置文件。
有关详细信息,请参阅 DMVPN 和带 ISAKMP 配置文件的简易 VPN 服务器配置示例。
Dual-hub-dual-dmvpn问题
问题
dual-hub-dual-dmvpn 问题。具体而言,隧道会关闭,无法重新协商。
解决方案
在隧道IPsec保护中,将共享关键字同时用于中心和分支上的隧道接口。
配置示例:
interface Tunnel43
description <<tunnel to primary cloud>>
tunnel source interface vlan10
tunnel protection IPSec profile myprofile shared
!--- !--- Output is truncated !---
interface Tunnel44
description <<tunnel to secondary cloud>>
tunnel source interface vlan10
tunnel protection IPSec profile myprofile shared
!--- !--- Output is truncated !---
有关详细信息,请参阅思科IOS安全命令参考(A-C)中的tunnel protection 命令。
通过DMVPN登录到服务器时出现问题
问题
发出无法访问DMVPN网络服务器的流量。
解决方案
此问题可能与使用GRE和IPsec的数据包的MTU和MSS大小有关。
数据包大小问题可能与分段有关。要避免此问题,请使用以下命令:
ip mtu 1400
ip tcp adjust-mss 1360
crypto IPSec fragmentation after-encryption (global)
您还可以配置tunnel path-mtu-discovery命令来动态发现MTU大小。
有关详细说明,请参阅解决GRE和IPSEC中的IP分段、MTU、MSS和PMTUD问题.
无法通过特定端口访问 DMVPN 上的服务器
问题
无法通过特定端口访问 DMVPN 上的服务器。
解决方案
要验证禁用Cisco IOS防火墙功能集,并查看其是否有效。
如果运行正常,则问题与Cisco IOS防火墙配置有关,与DMVPN无关。
相关信息