OSPF路由协议DR/BDR的选举
程序员文章站
2024-02-15 18:59:46
...
一.实验目的
1.配置OSPF路由协议DR/BDR的选举
二.OSPF路由协议DR/BDR选举的依据
1.DR和BDR是由同一网段所有路由器根据路由器OSPF优先级和路由 ID选举出
来的(越大越优先)
2.路由器优先级为0时,(默认优先级为1,0-255)为DRother,不参与选举DR
和BDR
3.遵循不抢占原则:当DR和BDR选举完成后,有一台优先级更高的路由器
加入,也不会立即成为DR
4.没能成为DR/BDR的,都是DRother
5.DR与BDR和DRother,建立邻接(Full)关系,BDR与DRother建立2-way关系
三.简单配置
AR1
sysname AR1
#
interface GigabitEthernet0/0/0
ip address 192.168.1.1 255.255.255.0
ospf dr-priority 100
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 192.168.1.1 0.0.0.0
#
return
AR2
sysname AR2
#
interface GigabitEthernet0/0/1
ip address 192.168.1.2 255.255.255.0
ospf dr-priority 20
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
#
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 192.168.1.2 0.0.0.0
#
return
AR3
sysname AR3
#
interface GigabitEthernet0/0/0
ip address 192.168.1.3 255.255.255.0
ospf dr-priority 0
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
#
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 192.168.1.3 0.0.0.0
#
return
AR4
sysname AR4
#
interface GigabitEthernet0/0/1
ip address 192.168.1.4 255.255.255.0
#
interface LoopBack0
ip address 4.4.4.4 255.255.255.255
#
ospf 1 router-id 4.4.4.4
area 0.0.0.0
network 4.4.4.4 0.0.0.0
network 192.168.1.4 0.0.0.0
#
return
推荐阅读