-
OSPF
排错及其七种状态机
OSPF
路由
器在完全邻接之前
,
所经过的几个状态:
1. Down
:此状态还没有与其他路由器
交换
信息。首先从其
ospf
接口向外发送
hello
p>
分
组,还并不知道
DR(
< br>若为广播网络
)
和任何其他路由器。发送
hello
分组是,使用组播地址
224.0.0.5
。
2. Attempt
:只适于
NBM
A
网络,在
NBMA
网络中邻居是手动
指定的,在该状态下,
路由器将使用
HelloInterva
l
取代
PollInterval
来发
送
Hello
包。
3. Init
< br>:在
DeadInterval
里收到了
Hello
包,
2-Way
通
信还没有建立起来的状态。
4. two-way
:双向会话建立,而
RID
彼此出现在对方的邻居列表中。
(
< br>若为广播网络:
例如:以太网。在这个时候应该
**DR
,BDR
。
)
5. ExStart
:信息
交换
初始状态,在这个状态下,本地路由器和邻居将建立
Master/Slave
关系,并确定
DD
Sequence Number
,路由器
ID
大的的成为
Master
。
6. Exchange
:
信息交换状态:
本地路由器和邻居交换一个或
多个
DBD
分组
(
也叫
DDP)
。
DBD
包含有关
LSDB
中
L
SA
条目的摘要信息。
7. Loading
:信息加载状
态:收到
DBD
后,使用
LSACK<
/p>
分组确认已收到
DBD
。将收
到的信息同
LSDB
中的信息进行比较。如果
p>
DBD
中有更新的链路状态条目,则想对方发送
一个
LSR
,用于请求新的
LSA
。
8.
Full
:完全邻接状态,这种邻接出现在
Router
LSA
和
Network
LSA
中。
为了模拟出
OSPF
的基本网络环境,
这里有两种配置,
一种为普通
p2p
加上
MA
的网
络,
另一种为
NBMA
网络。
基本链路配置:
R1
:
interface
Loopback0
ip
address 1.1.1.1 255.255.255.255
!
interface Serial1/0
ip address 12.1.1.1
255.255.255.0
serial restart-delay 0
clock rate 64000
!
R2
:
interface
Loopback0
ip
address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 23.1.1.2
255.255.255.0
speed auto
duplex auto
!
interface Serial1/1
ip address 12.1.1.2
255.255.255.0
serial restart-delay 0
!
R3
:
interface Loopback0
ip address
3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 23.1.1.3
255.255.255.0
speed auto
duplex auto
!
NBMA
基本链路配置:
R1
:
interface Loopback0
ip address
1.1.1.1 255.255.255.255
!
interface Serial1/0
ip address 13.1.1.1
255.255.255.0
encapsulation frame-relay
no fair-queue
serial restart-delay 0
frame-relay map
ip 13.1.1.3 103 broadcast
no frame-relay inverse-arp
!
R2
:
frame-relay switching
!
interface Serial1/0
no ip address
encapsulation
frame-relay
no
fair-queue
serial restart-delay 0
clock rate 64000
frame-relay
lmi-type ansi
frame-relay intf-type dce
frame-relay route 301
interface Serial1/1 103
!
interface Serial1/1
no ip address
encapsulation frame-relay
serial restart-
delay 0
clock
rate 64000
frame-relay lmi-type ansi
frame-relay intf-type dce
frame-relay
route 103 interface Serial1/0 301
!
R3
:
interface Loopback0
ip address
3.3.3.3 255.255.255.255
!
interface Serial1/1
ip address 13.1.1.3
255.255.255.0
encapsulation frame-relay
serial restart-delay 0
frame-relay map
ip 13.1.1.1 301 broadcast
no frame-relay inverse-arp
!
<
/p>
所有路由器上
OSPF
协议
均采用以下配置:
router ospf 10
router-id x.x.x.x
(
x
为路由器编号)
network 0.0.0.0
255.255.255.255 area 0
1. Attempt
: