DMVPN时使用OSPF时邻居不断UPDOWN

配置完OSPF后一直报错。

*Aug  4 03:18:38.935: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.5.254 on Tunnel0 from EXCHANGE to DOWN, Neighbor Down: Adjacency forced to reset
*Aug  4 03:18:39.655: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on Tunnel0 from LOADING to FULL, Loading Done
Hub(config-router)#
*Aug  4 03:18:43.787: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on Tunnel0 from FULL to DOWN, Neighbor Down: Adjacency forced to reset
*Aug  4 03:18:44.011: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.5.254 on Tunnel0 from EXSTART to DOWN, Neighbor Down: Adjacency forced to reset
*Aug  4 03:18:44.603: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on Tunnel0 from LOADING to FULL, Loading Done
Hub(config-router)#
*Aug  4 03:18:53.567: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on Tunnel0 from FULL to DOWN, Neighbor Down: Adjacency forced to reset
*Aug  4 03:18:53.779: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.5.254 on Tunnel0 from EXCHANGE to DOWN, Neighbor Down: Adjacency forced to reset
*Aug  4 03:18:54.387: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on Tunnel0 from LOADING to FULL, Loading Done

拓扑如下

hub:

interface tunnel 0

ip ospf network broadcast

ip ospf priority 255

spoke (R4 R5) 配置如下

interface tunnel 0

ip ospf network broadcast

ip ospf priority 0

完美解决,这是因为tunnel默认为point-point端口类型,tunnel的邻居超过两个,导致邻居关系一直UPDOWN。这也是OSPF 基础知识点啦。

附完整配置:(本实验SPOKE1为穿越NAT的客户1,SPOKE2为标准客户2。即模拟了标准的DMVPN+OSPF,又结合了NAT穿越的场景。使用用户能更好的掌握相关技能。)

HUB:

crypto isakmp policy 10
 authentication pre-share
crypto isakmp key test address 0.0.0.0 0.0.0.0
!
!        
crypto ipsec transform-set test esp-3des esp-md5-hmac
 mode transport
!
crypto ipsec profile testprofile
 set transform-set test

!
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface Loopback1
 ip address 192.168.1.254 255.255.255.0
 ip ospf network point-to-point
!
interface Tunnel0
 ip address 172.16.1.100 255.255.255.0
 no ip redirects
 ip nhrp authentication cisco
 ip nhrp map multicast dynamic
 ip nhrp network-id 10
 ip nhrp cache non-authoritative
 ip nhrp redirect
 ip ospf network broadcast
 ip ospf cost 255
 tunnel source FastEthernet0/0
 tunnel mode gre multipoint
 tunnel protection ipsec profile testprofile

interface FastEthernet0/0
 ip address 10.0.12.1 255.255.255.0
 duplex auto
 speed auto

router ospf 1
 log-adjacency-changes
 network 172.16.1.0 0.0.0.255 area 0
 network 192.168.1.0 0.0.0.255 area 0
!
ip route 0.0.0.0 0.0.0.0 10.0.12.2
no ip http server
no ip http secure-server

NAT1:

interface Loopback0
 ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
 ip address 10.0.23.3 255.255.255.0
 ip nat outside
 ip nat enable
 ip virtual-reassembly
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 10.0.35.3 255.255.255.0
 ip nat inside
 ip virtual-reassembly
 duplex auto
 speed auto

ip route 0.0.0.0 0.0.0.0 10.0.23.2
ip route 172.16.1.1 255.255.255.255 10.0.35.5
ip route 192.168.5.0 255.255.255.0 10.0.35.5
no ip http server
no ip http secure-server
!
!
ip nat inside source list 1 interface FastEthernet0/0 overload

SPOKE1(R5)

crypto isakmp policy 10
 authentication pre-share
crypto isakmp key test address 0.0.0.0 0.0.0.0
!
!
crypto ipsec transform-set test esp-3des esp-md5-hmac
 mode transport
!
crypto ipsec profile testprofile
 set transform-set test

interface Loopback0
 ip address 5.5.5.5 255.255.255.255
!
interface Loopback5
 ip address 192.168.5.254 255.255.255.0
 ip ospf network point-to-point
!        
interface Tunnel0
 ip address 172.16.1.1 255.255.255.0
 no ip redirects
 ip nhrp authentication cisco
 ip nhrp map multicast 10.0.12.1
 ip nhrp map 172.16.1.100 10.0.12.1
 ip nhrp network-id 10
 ip nhrp nhs 172.16.1.100
 ip nhrp cache non-authoritative
 ip nhrp shortcut
 ip ospf network broadcast
 ip ospf priority 0
 tunnel source FastEthernet0/0
 tunnel mode gre multipoint
 tunnel protection ipsec profile testprofile
!
interface FastEthernet0/0
 ip address 10.0.35.5 255.255.255.0
 duplex auto
 speed auto
!

router ospf 1
 log-adjacency-changes
 network 172.16.1.0 0.0.0.255 area 0
 network 192.168.5.0 0.0.0.255 area 0
!
ip route 0.0.0.0 0.0.0.0 10.0.35.3

spoke(R4):

crypto isakmp policy 10
 authentication pre-share
crypto isakmp key test address 0.0.0.0 0.0.0.0
!
!
crypto ipsec transform-set test esp-3des esp-md5-hmac
 mode transport
!
crypto ipsec profile testprofile
 set transform-set test

interface Loopback0
 ip address 4.4.4.4 255.255.255.255
!
interface Tunnel0
 ip address 172.16.1.2 255.255.255.0
 no ip redirects
 ip nhrp authentication cisco
 ip nhrp map multicast 10.0.12.1
 ip nhrp map 172.16.1.100 10.0.12.1
 ip nhrp network-id 10
 ip nhrp nhs 172.16.1.100
 ip nhrp cache non-authoritative
 ip nhrp shortcut
 ip ospf network broadcast
 ip ospf priority 0
 tunnel source FastEthernet0/0
 tunnel mode gre multipoint
 tunnel protection ipsec profile testprofile
!
interface FastEthernet0/0
 ip address 10.0.24.4 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 10.0.46.4 255.255.255.0
 duplex auto
 speed auto

router ospf 1
 log-adjacency-changes
 network 10.0.46.0 0.0.0.255 area 0
 network 172.16.1.0 0.0.0.255 area 0
!
ip route 0.0.0.0 0.0.0.0 10.0.24.2
no ip http server
no ip http secure-server

R6:

interface Loopback0
 ip address 6.6.6.6 255.255.255.255
!
interface Loopback6
 ip address 192.168.6.254 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 ip address 10.0.46.6 255.255.255.0
 duplex auto
 speed auto

router ospf 1
 log-adjacency-changes
 network 10.0.46.0 0.0.0.255 area 0
 network 192.168.6.0 0.0.0.255 area 0

时间: 2024-08-03 23:45:47

DMVPN时使用OSPF时邻居不断UPDOWN的相关文章

CCNP实验六:修改OSPF特定邻居源的路由管理距离

一:基本配置 r1(config)#router ospf 1 r1(config-router)#net 1.1.0.0 0.0.255.255 area 1 r1(config-router)#net 12.1.1.1 0.0.0.0 area 0 r1(config-router)#redistribute connected subnets r2(config)#router ospf 1 r2(config-router)#net 12.1.1.2 0.0.0.0 area 0 r2(

编译时、运行时、构建时(二)

泛型(又称类型检验):这个是发生在编译期的.编译器负责检查程序中类型的正确性,然后把使用了泛型的代码翻译或者重写成可以执行在当前JVM上的非泛型代码.这个技术被称为“类型擦除“.换句话来说,编译器会擦除所有在尖括号里的类型信息,来保证和版本1.4.0或者更早版本的JRE的兼容性. List<String> myList = new ArrayList<String>(10); 编译后成为了: List myList = new ArrayList(10); 异常(Exception

编译时、运行时、构建时(一)

在开发和设计的时候,我们需要考虑编译时,运行时以及构建时这三个概念.理解这几个概念可以更好地帮助你去了解一些基本的原理.下面是初学者晋级中级水平需要知道的一些问题. Q.下面的代码片段中,行A和行B所标识的代码有什么区别呢? public class ConstantFolding { static final int number1 = 5; static final int number2 = 6; static int number3 = 5; static int number4= 6;

OSPF的邻居状态有哪些?如果停留在某一状态是什么原因。(总结)

OSPF的邻居状态有: down:没有交互. init:发送方发送HELLO包等待回应. two-way:临济关系建立,进行DR/BDR选举. exstart:预启动,建立主从关系,确定DBD包序号. exchange:预交互状态,发送本地数据库的DBD,也会发送LSA请求自己没有的更新. loading:数据库同步过程,发送LSA请求自己没有的更新. FULL:完全简历邻接关系. 如果停留在某一状态是什么原因?: 一直停留在init状态,是因为发送方发送HELLO分组,对方没有给出回应(对方并

综合实验DMVPN+EZVPN+Eigrp&OSPF+路由重发布

互联基本配置 !Internet: conf t int f0/0 ip add 100.1.1.1 255.255.255.0 no shut exit int f1/0 ip add 210.1.1.1 255.255.255.0 no shut exit int f1/1 ip add 200.1.1.1 255.255.255.0 no shut exit !Beijing-Center: Route# conf t int f0/0 ip add 100.1.1.2 255.255.2

编译时,运行时解释

在开发和设计的时候,我们需要考虑编译时,运行时以及构建时这三个概念.理解这几个概念可以更好地帮助你去了解一些基本的原理.下面是初学者晋级中级水平需要知道的一些问题. Q.下面的代码片段中,行A和行B所标识的代码有什么区别呢? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 public class ConstantFolding {     static final  int number1 = 5;     static final  int n

假装网络工程师3——ospf的邻居建立条件与虚连接

一.背景说明 ospf作为IGP两大协议之一,有很多值得深挖的地方,仅通过一篇文章远远不够,后续还将通过多章篇幅进行说明. 二.ospf建立邻居的条件 尽管ospf作为一种链路状态协议,每一台路由器是通过lsa报文(其中包含其他路由器直连网段)在本地计算后形成以自己为根的路由表,但出于安全或其他方面的考虑ospf不是会和任意一台路由器建立邻居关系,ospf建立邻居有下面几个前提条件: 1. 直连路由的接口要宣告进同一个区域中(area) 2. 认证类型和认证密码要一致,查看命令 [R1]disp

OSPF之邻居关系、邻接关系

Ospf中路由器之间存在两种连接关系:邻居关系和邻接关系.本博文将详细介绍这2种关系建立及工作原理. 如果两台路由器之间共享一条公共数据链路(两台路由器中间没有其它路由器,或者两台路由器之间存在虚连接),并且成功协商了hello包中所指定的参数,那么它们就成为邻居.如果两个邻居之间需要同步LSDB,那么它们之间需要建立邻接关系.如果两个路由器之间建立了邻接关系,那么它们的LSDB一定是同步的.LSA只在存在邻接关系的路由器之间传递. 那么邻居关系和邻接关系怎么建立呢?邻居关系通过hello报文来

OSPF建立邻居、邻接关系 学习笔记

Ospf中路由器之间存在两种连接关系:邻居关系和邻接关系.本博文将详细介绍这2种关系建立及工作原理. 如果两台路由器之间共享一条公共数据链路(两台路由器中间没有其它路由器,或者两台路由器之间存在虚连接),并且成功协商了hello包中所指定的参数,那么它们就成为邻居.如果两个邻居之间需要同步LSDB,那么它们之间需要建立邻接关系.如果两个路由器之间建立了邻接关系,那么它们的LSDB一定是同步的.LSA只在存在邻接关系的路由器之间传递. 那么邻居关系和邻接关系怎么建立呢?邻居关系通过hello报文来