另外查看路由表只显示优先级高的,怎么让都显示出来?
(0)
最佳答案
您好,请知:
以下是配置案例,请参考:
· Router A、Router B、Router C、Router D在同一网段,运行OSPF协议。
· 配置Router A为DR,Router C为BDR。
图1-13 OSPF的DR选择配置组网图
· 配置各接口的IP地址;
· 配置OSPF基本功能;
· 改变路由器接口的路由器优先级使Router A成为DR,Router C成为BDR。
(1) 配置各接口的IP地址(略)
(2) 配置OSPF基本功能
# 配置Router A。
<RouterA> system-view
[RouterA] router id 1.1.1.1
[RouterA] ospf
[RouterA-ospf-1] area 0
[RouterA-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[RouterA-ospf-1-area-0.0.0.0] quit
[RouterA-ospf-1] quit
# 配置Router B。
<RouterB> system-view
[RouterB] router id 2.2.2.2
[RouterB] ospf
[RouterB-ospf-1] area 0
[RouterB-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[RouterB-ospf-1-area-0.0.0.0] quit
[RouterB-ospf-1] quit
# 配置Router C。
<RouterC> system-view
[RouterC] router id 3.3.3.3
[RouterC] ospf
[RouterC-ospf-1] area 0
[RouterC-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[RouterC-ospf-1-area-0.0.0.0] quit
[RouterC-ospf-1] quit
# 配置Router D。
<RouterD> system-view
[RouterD] router id 4.4.4.4
[RouterD] ospf
[RouterD-ospf-1] area 0
[RouterD-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[RouterD-ospf-1-area-0.0.0.0] quit
[RouterD-ospf-1] quit
# 查看Router A的邻居信息。
[RouterA] display ospf peer verbose
OSPF Process 1 with Router ID 1.1.1.1
Neighbors
Area 0.0.0.0 interface 192.168.1.1(GigabitEthernet1/0/1)'s neighbors
Router ID: 2.2.2.2 Address: 192.168.1.2 GR State: Normal
State: 2-Way Mode: None Priority: 1
DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0
Options is 0x02 (-|-|-|-|-|-|E|-)
Dead timer due in 38 sec
Neighbor is up for 00:01:31
Authentication Sequence: [ 0 ]
Neighbor state change count: 6
BFD status: Disabled
Router ID: 3.3.3.3 Address: 192.168.1.3 GR State: Normal
State: Full Mode: Nbr is master Priority: 1
DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0
Options is 0x02 (-|-|-|-|-|-|E|-)
Dead timer due in 31 sec
Neighbor is up for 00:01:28
Authentication Sequence: [ 0 ]
Neighbor state change count: 6
BFD status: Disabled
Router ID: 4.4.4.4 Address: 192.168.1.4 GR State: Normal
State: Full Mode: Nbr is master Priority: 1
DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0
Options is 0x02 (-|-|-|-|-|-|E|-)
Dead timer due in 31 sec
Neighbor is up for 00:01:28
Authentication Sequence: [ 0 ]
Neighbor state change count: 6
BFD status: Disabled
可以看到Router D为DR,Router C为BDR。
(3) 配置接口上的路由器优先级
# 配置Router A。
[RouterA] interface gigabitethernet 1/0/1
[RouterA-GigabitEthernet1/0/1] ospf dr-priority 100
[RouterA-GigabitEthernet1/0/1] quit
# 配置Router B。
[RouterB] interface gigabitethernet 1/0/1
[RouterB-GigabitEthernet1/0/1] ospf dr-priority 0
[RouterB-GigabitEthernet1/0/1] quit
# 配置Router C。
[RouterC] interface gigabitethernet 1/0/1
[RouterC-GigabitEthernet1/0/1] ospf dr-priority 2
[RouterC-GigabitEthernet1/0/1] quit
# 查看Router D的邻居信息。
<RouterD> display ospf peer verbose
OSPF Process 1 with Router ID 4.4.4.4
Neighbors
Area 0.0.0.0 interface 192.168.1.4(GigabitEthernet1/0/1)'s neighbors
Router ID: 1.1.1.1 Address: 192.168.1.1 GR State: Normal
State: Full Mode:Nbr is slave Priority: 100
DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0
Options is 0x02 (-|-|-|-|-|-|E|-)
Dead timer due in 31 sec
Neighbor is up for 00:11:17
Authentication Sequence: [ 0 ]
Neighbor state change count: 6
BFD status: Disabled
Router ID: 2.2.2.2 Address: 192.168.1.2 GR State: Normal
State: Full Mode:Nbr is slave Priority: 0
DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0
Options is 0x02 (-|-|-|-|-|-|E|-)
Dead timer due in 35 sec
Neighbor is up for 00:11:19
Authentication Sequence: [ 0 ]
Neighbor state change count: 6
BFD status: Disabled
Router ID: 3.3.3.3 Address: 192.168.1.3 GR State: Normal
State: Full Mode:Nbr is slave Priority: 2
DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0
Options is 0x02 (-|-|-|-|-|-|E|-)
Dead timer due in 33 sec
Neighbor is up for 00:11:15
Authentication Sequence: [ 0 ]
Neighbor state change count: 6
BFD status: Disabled
可以看到,网络中DR/BDR并没有改变。
网络中DR/BDR已经存在的情况下,接口上的路由器优先级的配置并不会立即生效。
(4) 重启OSPF进程
# 重启Router D的进程。
<RouterD> reset ospf 1 process
Warning : Reset OSPF process? [Y/N]:y
# 查看Router D的邻居信息。
<RouterD> display ospf peer verbose
OSPF Process 1 with Router ID 4.4.4.4
Neighbors
Area 0.0.0.0 interface 192.168.1.4(GigabitEthernet1/0/1)'s neighbors
Router ID: 1.1.1.1 Address: 192.168.1.1 GR State: Normal
State: Full Mode: Nbr is slave Priority: 100
DR: 192.168.1.1 BDR: 192.168.1.3 MTU: 0
Options is 0x02 (-|-|-|-|-|-|E|-)
Dead timer due in 39 sec
Neighbor is up for 00:01:40
Authentication Sequence: [ 0 ]
Neighbor state change count: 6
BFD status: Disabled
Router ID: 2.2.2.2 Address: 192.168.1.2 GR State: Normal
State: 2-Way Mode: None Priority: 0
DR: 192.168.1.1 BDR: 192.168.1.3 MTU: 0
Options is 0x02 (-|-|-|-|-|-|E|-)
Dead timer due in 35 sec
Neighbor is up for 00:01:44
Authentication Sequence: [ 0 ]
Neighbor state change count: 6
BFD status: Disabled
Router ID: 3.3.3.3 Address: 192.168.1.3 GR State: Normal
State: Full Mode: Nbr is slave Priority: 2
DR: 192.168.1.1 BDR: 192.168.1.3 MTU: 0
Options is 0x02 (-|-|-|-|-|-|E|-)
Dead timer due in 39 sec
Neighbor is up for 00:01:41
Authentication Sequence: [ 0 ]
Neighbor state change count: 6
BFD status: Disabled
可以看到Router A成为DR,Router C为BDR。
当路由器的邻居关系稳定后:
· 如果邻居的状态是Full,这说明它和邻居之间形成了邻接关系;
· 如果邻居的状态是2-Way,则说明它们都不是DR或BDR,两者之间不需要交换LSA。
# 查看OSPF接口的状态。
[RouterA] display ospf interface
OSPF Process 1 with Router ID 1.1.1.1
Interfaces
Area: 0.0.0.0
IP Address Type State Cost Pri DR BDR
192.168.1.1 Broadcast DR 1 100 192.168.1.1 192.168.1.3
[RouterB] display ospf interface
OSPF Process 1 with Router ID 2.2.2.2
Interfaces
Area: 0.0.0.0
IP Address Type State Cost Pri DR BDR
192.168.1.2 Broadcast DROther 1 0 192.168.1.1 192.168.1.3
如果OSPF接口的状态是DROther,则说明它既不是DR,也不是BDR。
(0)
是的,OSPF可以通过配置负载分担,使得两台设备可以组成环状,并且流量可以在多条路径上平均分摊。
OSPF是一种动态路由协议,它可以自动计算接口上的Cost值,但也可以通过手工指定该接口的Cost值。在OSPF中,到达同一目的地的相同开销的路径可以执行负载均衡,最多可以有6条链路同时执行负载均衡。
当存在多条到达同一个目的地址的相同开销的路径时,OSPF会执行等价多路径负载分担(ECMP)。这意味着发往该目的IP或者目的网段的三层转发流量可以通过不同的路径分担,实现网络的负载均衡。
(0)
暂无评论
一个DR,另一个BDR即可吧
https://www.h3c.com/cn/d_201805/1078304_30005_0.htm#_Toc511916735
(0)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论