通过修改接口优先级改变DR和BDR的选举

实验要求:

R4作为DR;

R3作为BDR;

R2不参与选举 。

实验步骤:

①划分网段

②配环回口,配接口ip

③配置ospf进程

[r1]
ospf 1
area 0
network 192.168.1.0 0.0.0.255

查看ospf进程状态:

display ospf peer
<r1>display ospf peer 

	 OSPF Process 1 with Router ID 1.1.1.1
		 Neighbors 

 Area 0.0.0.0 interface 192.168.1.1(GigabitEthernet0/0/0)'s neighbors
 Router ID: 2.2.2.2          Address: 192.168.1.2     
   State: Full  Mode:Nbr is  Master  Priority: 1
   DR: 192.168.1.1  BDR: 192.168.1.2  MTU: 0    
   Dead timer due in 32  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:07:37     
   Authentication Sequence: [ 0 ] 

 Router ID: 3.3.3.3          Address: 192.168.1.3     
   State: Full  Mode:Nbr is  Master  Priority: 1
   DR: 192.168.1.1  BDR: 192.168.1.2  MTU: 0    
   Dead timer due in 32  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:07:15     
   Authentication Sequence: [ 0 ] 

 Router ID: 4.4.4.4          Address: 192.168.1.4     
   State: Full  Mode:Nbr is  Master  Priority: 1
   DR: 192.168.1.1  BDR: 192.168.1.2  MTU: 0    
   Dead timer due in 34  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:06:39     
   Authentication Sequence: [ 0 ] 

可以看到现在的状态不满足实验要求

④修改接口优先级

[r4-GigabitEthernet0/0/0]ospf dr-priority 100
[r3-GigabitEthernet0/0/0]ospf dr-priority 50
[r2-GigabitEthernet0/0/0]ospf dr-priority 0

DR和BDR的选举规则:

1>先比较接口优先级,优先级大的为DR,次大的为BDR。

        华为设备默认优先级为1,如果优先级为0,则代表该接口放弃选举

2>若人为不干预,优先级相同都为1,则比较RID,大的为DR,次大的为BDR。 

⑤重启ospf进程(<>模式下):一定要全部路由器同时进行

reset ospf 1 process

再次查看状态:

<r1>display ospf peer 

	 OSPF Process 1 with Router ID 1.1.1.1
		 Neighbors 

 Area 0.0.0.0 interface 192.168.1.1(GigabitEthernet0/0/0)'s neighbors
 Router ID: 2.2.2.2          Address: 192.168.1.2     
   State: 2-Way  Mode:Nbr is  Master  Priority: 0
   DR: 192.168.1.4  BDR: 192.168.1.3  MTU: 0    
   Dead timer due in 36  sec 
   Retrans timer interval: 0 
   Neighbor is up for 00:00:00     
   Authentication Sequence: [ 0 ] 

 Router ID: 3.3.3.3          Address: 192.168.1.3     
   State: Full  Mode:Nbr is  Master  Priority: 50
   DR: 192.168.1.4  BDR: 192.168.1.3  MTU: 0    
   Dead timer due in 36  sec 
   Retrans timer interval: 4 
   Neighbor is up for 00:00:37     
   Authentication Sequence: [ 0 ] 

 Router ID: 4.4.4.4          Address: 192.168.1.4     
   State: Full  Mode:Nbr is  Master  Priority: 100
   DR: 192.168.1.4  BDR: 192.168.1.3  MTU: 0    
   Dead timer due in 33  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:00:40     
   Authentication Sequence: [ 0 ] 

已满足实验要求,实验结束。 

 

 

 

 

 

 

  • 3
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值