OSPF 基本概念 单区域配置

RIP 是距离矢量路由协议
OSPF 是链路状态路由协议
·
OSPF的四种路由
1.DR 主备份路由
2.BDR 从备份路由
3.ABR 区域边界路由
4.ASBR 自制系统边界路由
·
DR BDR 的选举顺序
1.loopback
2.物理端口
3.手工指定
·
OSPF数据包类型
1.hello包
2.数据库描述包(DBD)
3.链路状态请求包(LSR)
4.链路状态更新包(LSU)
5.链路状态确认包(LSAck)
·
OSPF邻接关系建立的7个状态
1.失效(Down)
2.初始(init) 每个接口通过224.0.0.5发送hello包
3.双向(2-way) 选举DR BDR
4.准启动(Exstart) 建立主从路由器
5.交换(Exchange) 交换DBD包
6.加载(Loading) 路由器向对方发送LSR,对方用LSU回应LSR
7.完全邻接(full)
·
区域类型
骨干区域,标准区域,末梢区域,完全末梢区域,非纯末梢区域
·
单区域配置
OSPF 基本概念 单区域配置

R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 192.168.10.0 0.0.0.255 area 0
R1(config-router)#network 12.0.0.0 0.0.0.255 area 0
·
R2(config)#router ospf 1
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 12.0.0.0 0.0.0.255 area 0
R2(config-router)#network 13.0.0.0 0.0.0.255 area 0
·
R3(config)#router ospf 1
R3(config-router)#router-id 3.3.3.3
R3(config-router)#network 13.0.0.2 0.0.0.255 area 0
R3(config-router)#network 192.168.20.0 0.0.0.255 area 0
·
R1#show ip route
C 192.168.10.0/24 is directly connected, FastEthernet0/0
O 192.168.20.0/24 [110/30] via 12.0.0.2, 00:08:07, FastEthernet0/1
12.0.0.0/24 is subnetted, 1 subnets
C 12.0.0.0 is directly connected, FastEthernet0/1
13.0.0.0/24 is subnetted, 1 subnets
O 13.0.0.0 [110/20] via 12.0.0.2, 00:08:07, FastEthernet0/1
·
路由条目192.168.20.0前面标识为O,说明是通过OSPF学习来的
OSPF的管理距离为110 ,后面的30表示开销值

猜你喜欢

转载自blog.51cto.com/14436017/2418957