一、简单介绍
(一)理论概念
1、OSPF技术点
2、启动OSPF的几个元素
(1)进程编号 – 本地有效 (1-65535)– 不同设备之间编号可以不同的
(2)进行网段的宣告(建立邻居使用和对端设备直连网段 – 自己的网段告诉别人的时候 )
(二)如何选举:
1、OSPF接口优先级选举 默认情况下 优先级 = 1
可以修改 = 相当于人为指定
哪个设备先启动 哪个就是DR
2、如果默认情况下 比较router-id 越大越好
(三)路由器选路问题
1、来自于不同协议的相同路由条目 比较管理距离
2、来自于相同协议的相同路由条目 比较度量值
二、拓扑

三、基础配置
R-1
R-1#configure terminal R-1(config)#interface gigabitEthernet 0/0 R-1(config-if)# ip address 12.1.1.1 255.255.255.0 R-1(config-if)#no shutdown R-1(config)#router ospf 1 R-1(config-router)#router-id 1.1.1.1 R-1(config-router)#network 12.1.1.1 0.0.0.0 area 0
R-2
R-2#configure terminal R-2(config)#interface gigabitEthernet 0/0 R-2(config-if)# ip address 12.1.1.2 255.255.255.0 R-2(config-if)#no shutdown R-2(config)#interface gigabitEthernet 0/1 R-2(config-if)# ip address 23.1.1.2 255.255.255.0 R-2(config-if)#no shutdown R-2(config)#router ospf 1 R-2(config-router)#router-id 2.2.2.2 R-2(config-router)#network 12.1.1.2 0.0.0.0 area 0 R-2(config-router)#network 23.1.1.2 0.0.0.0 area 0
R-3
R-3#configure terminal R-3(config)#interface gigabitEthernet 0/0 R-3(config-if)# ip address 23.1.1.3 255.255.255.0 R-3(config-if)#no shutdown R-3(config)#router ospf 1 R-3(config-router)#router-id 3.3.3.3 R-3(config-router)#network 23.1.1.3 0.0.0.0 area 0
四、分析
1、在R-2上查看OSPF邻居关系是否建立成功?
2、重启OSPF邻居关系,并观察数据包。
在特权模式下使用命令:clear ip ospf process,然后按“Y”


我是艺博东!欢迎你和我一起讨论,我们下期见。
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/215707.html原文链接:https://javaforall.net
