OSPF参数配置

OSPF参数配置

OSPF的hello和dead计时器,默认是多少?
hello 10秒 dead是hello的4倍是40
修改hello值 dead会乘4 比如5 20,但是直接修改dead时间hello不变
OSPF的默认DR优先级是多少?
优先级是1
ODPF的默认的接口cost是多少?
默认是1
查看OSPF接口参数的命令是什么?
display ospf interface +接口

案例3:OSPF 参数调整
3.1 问题
如图,配置设备 IP 地址
配置 OSPF 协议,所有网段属于区域 0
配置 R1 的进程号是 10
配置 R2 的进程号是 20
配置 R3 的进程号是 30
Router-id 为 x.x.x.x (x为路由器号码)
配置R1和R2之间不选举DR和BDR
配置R2和 R3之间R3为 DR
配置 PC-2 的网段中,R3为 DRother
确保R1\R2\R3互相学习路由条目
确保R1上,192.168.2.0/24的 cost 为 37
确保 R3上,192.168.1.0/24的 cost 为 24
确保R1和R2之间的 hello 时间为 5s
确保R2和R3之间的 dead 时间为 28s

OSPF参数配置

案例3
OSPF 参数调整
3.1 问题
如图,配置设备 IP 地址
配置 OSPF 协议,所有网段属于区域 0
配置 R1 的进程号是 10
配置 R2 的进程号是 20
配置 R3 的进程号是 30
Router-id 为 x.x.x.x (x为路由器号码)
接口上
ospf 10 router-id 1.1.1.1 /ospf 进程号10 路由id 1.1.1.1
配置R1和R2之间不选举DR和BDR
两个接口修改网络类型 p2p
ospf network-type p2p或者p2mp
配置R2和 R3之间R3为 DR
把R2 0/0/0接口修改优先级为0不参加DR选举
[R2-GigabitEthernet0/0/0]ospf dr-priority 0
配置 PC-2 的网段中,R3为 DRother
修改和pc2接口连接的端口优先级为0,路由器就变成DRother
[R3-GigabitEthernet0/0/2]ospf dr-priority 0
确保R1\R2\R3互相学习路由条目
配置基础ospf 是否可以ping通
确保R1上,192.168.2.0/24的 cost 为 37
pc2访问r1过程中所有所有入接口开销加起来为3 修改其中一个cost为35+2就是37
[R3-GigabitEthernet0/0/2]ospf cost 35 入接口进行修改cost值
[R1]dis ip routing-table protocol ospf //查看路由表ospf协议
确保 R3上,192.168.1.0/24的 cost 为 24 经过的三个入接口都可以进行修改
[R3-GigabitEthernet0/0/1]ospf cost 22
[R3]dis ip routing-table protocol ospf
确保R1和R2之间的 hello 时间为 5s
必须两个接口hello和dead时间是一致才能互通 时间不同不发建立邻居
接口修改ospf timer hello 5
[R1-GigabitEthernet0/0/0]ospf timer hello 5
[R2-GigabitEthernet0/0/1]ospf timer hello 5
确保R2和R3之间的 dead 时间为 28s
[R3-GigabitEthernet0/0/1]ospf timer dead 28
[R2-GigabitEthernet0/0/0]ospf timer dead 28

猜你喜欢

转载自blog.51cto.com/14806008/2498109