拓扑图:
ospf动态路由协议过程简析
首先路由器之间交互hello报文
建立邻居关系
交互lsa报文
建立lsdb
利用spf算法,找出最优路径
生成路由表
(
ospf router-id 1.1.1.1 //定义id
area 0 //定义区域
network ip 反掩码 //宣告路由器链接的网段,或者i
)
第一个
配置静态路由
dis ip int b
对R1
sys
sysname R1
int g0/0/0
ip address 192.168.1.2 30
int g0/0/1
ip address 192.168.2.1 30
dis ip int b
ospf router-id 1.1.1.1
area 0
network 192.168.1.1 0.0.0.0
network 192.168.2.1 0.0.0.0
对R2
sys
sysname R2
int g0/0/0
ip address 192.168.3.1 30
int g0/0/1
ip address 192.168.2.2 30
int g0/0/2
ip address 192.168.6.2 30
dis ip int b
ospf router-id 2.2.2.2
area 0
network 192.168.2.2 0.0.0.0
network 192.168.3.1 0.0.0.0
area 2
network 192.168.6.1 0.0.0.0
对R3
sys
sysname R3
int g0/0/0
ip address 192.168.4.1 30
int g0/0/1
ip address 192.168.3.2 30
ospf router-id 3.3.3.3
area 0
network 192.168.3.2 0.0.0.0
area 1
network 192.168.4.1 0.0.0.0
对R4
sys
sysname R4
int g0/0/0
ip address 192.168.7.1 30
int g0/0/2
ip address 192.168.6.1 30
dis ip int b
ospf router-id 4.4.4
area 2
network 192.168.6.2 0.0.0.0
network 192.168.7.1 0.0.0.0
对R5
sys
sysname R5
int g0/0/0
ip address 192.168.4.1 30
int g0/0/1
ip address 192.168.5.2 30
dis ip int b
ospf router-id 5.5.5.5
area 1
network 192.168.4.2 0.0.0.0
network 192.168.5.1 0.0.0.0