IGP-LAB-OSPF-DR/BDR(MA)

Ospf(MA)


一.选择DR/BDR

二.在选出DR/BDR之后,修改BDR/DROTHER优先级,是否能够抢占DR

.在选出DR/BDR之后,将DROTHER优先级改最高,当DRdown后,是否BDRDROTHER最成为DR

211707886.jpg

一.搭建拓扑:

R1

R1(config)#intethernet0/0

R1(config-if)#ipadd110.1.1.1255.255.255.0

R1(config-if)#intlo0

R1(config-if)#ipadd1.1.1.1255.255.255.0

R1(config)#routeros110

R1(config-router)#router-id1.1.1.1

R1(config-router)#network110.1.1.00.0.0.255area0

R1(config-router)#network1.1.1.00.0.0.255area0


R2

R2(config)#intethernet0/0

R2(config-if)#ipadd110.1.1.2255.255.255.0

R2(config-if)#intlo0

R2(config-if)#ipadd2.2.2.2255.255.255.0

R2(config)#routeros110

R2(config-router)#router-id2.2.2.2

R2(config-router)#network110.1.1.00.0.0.255area0

R2(config-router)#network2.2.2.00.0.0.255area0


R3

R3(config)#intethernet0/0

R3(config-if)#ipadd110.1.1.3255.255.255.0

R3(config-if)#intlo0

R3(config-if)#ipadd3.3.3.3255.255.255.0

R3(config)#routeros110

R3(config-router)#router-id3.3.3.3

R3(config-router)#network110.1.1.00.0.0.255area0

R3(config-router)#network3.3.3.00.0.0.255area0


R1查看邻居表:

R1#shiposnei


NeighborIDPriStateDeadTimeAddressInterface

2.2.2.21FULL/BDR00:00:35110.1.1.2Ethernet0/0

3.3.3.31FULL/DR00:00:39110.1.1.3Ethernet0/0


R2查看邻居表:

R2#shiposnei


NeighborIDPriStateDeadTimeAddressInterface

1.1.1.11FULL/DROTHER00:00:36110.1.1.1Ethernet0/0

3.3.3.31FULL/DR00:00:38110.1.1.3Ethernet0/0


注:R1/R2/R3优先级默认都为1routerid大将成为DR,其次BDR。


-------------------------------------------------------------------------------

二.在R2上ethernet0/0上修改优先级为“5


R2#shiposintethernet0/0

Ethernet0/0isup,lineprotocolisup

InternetAddress110.1.1.2/24,Area0

ProcessID110,RouterID2.2.2.2,NetworkTypeBROADCAST,Cost:10

TransmitDelayis1sec,StateBDR,Priority1

DesignatedRouter(ID)3.3.3.3,Interfaceaddress110.1.1.3


在接口上修改:

R2(config)#intethernet0/0

R2(config-if)#ipospriority5


R2#shiposinterfaceethernet0/0

Ethernet0/0isup,lineprotocolisup

InternetAddress110.1.1.2/24,Area0

ProcessID110,RouterID2.2.2.2,NetworkTypeBROADCAST,Cost:10

TransmitDelayis1sec,StateBDR,Priority5

DesignatedRouter(ID)3.3.3.3,Interfaceaddress110.1.1.3


在R1或R3上查看邻居表:

R1#shiposnei


NeighborIDPriStateDeadTimeAddressInterface

2.2.2.25FULL/BDR00:00:31110.1.1.2Ethernet0/0

3.3.3.31FULL/DR00:00:35110.1.1.3Ethernet0/0


注:1.修改R2接口优先级后,不抢占DR。(不具有抢占性)重建邻居后,重新选举,R2才能成为DR

2.选DR取决于两个因素,优先级和routerid,都是越大越优,优先级更胜routerid,优先级一致再比较routerid大小。







三.把R1优先级修改为“7”在R1/R2/R3中R1(DROTHER)优先级最高,把R2优先级还原默认“1”


R2还原默认优先级:

R2(config)#intethernet0/0

R2(config-if)#noipospriority


R2#shiposintethernet0/0

Ethernet0/0isup,lineprotocolisup

InternetAddress110.1.1.2/24,Area0

ProcessID110,RouterID2.2.2.2,NetworkTypeBROADCAST,Cost:10

TransmitDelayis1sec,StateBDR,Priority1

DesignatedRouter(ID)3.3.3.3,Interfaceaddress110.1.1.3


R1优先级改为“7”

R1(config)#intethernet0/0

R1(config-if)#ipospriority7


R1#shiposinterfaceethernet0/0

Ethernet0/0isup,lineprotocolisup

InternetAddress110.1.1.1/24,Area0

ProcessID110,RouterID1.1.1.1,NetworkTypeBROADCAST,Cost:10

TransmitDelayis1sec,StateDROTHER,Priority7

DesignatedRouter(ID)3.3.3.3,Interfaceaddress110.1.1.3


R3查看邻居表:

R3#shiposnei

NeighborIDPriStateDeadTimeAddressInterface

1.1.1.17FULL/DROTHER00:00:34110.1.1.1Ethernet0/0

2.2.2.21FULL/BDR00:00:33110.1.1.2Ethernet0/0


将R3的ethernet0/0置down状态。

R3(config)#intethernet0/0

R3(config-if)#sh


分别在R1和R2查看邻居表信息:

R1#shiposnei


NeighborIDPriStateDeadTimeAddressInterface

2.2.2.21FULL/DR00:00:35110.1.1.2Ethernet0/0



R2#shiposnei


NeighborIDPriStateDeadTimeAddressInterface

1.1.1.17FULL/BDR00:00:36110.1.1.1Ethernet0/0


注:原来R2(BDR)成为DR优先级为“1”,R1(DROTHER)成为BDR。优先级为“7”.

当DRdown后,优选BDR升为DR,和优先级无关。





你可能感兴趣的:(NetWork,优先级,router)