實驗目的:詳細探究DR,BDR的選舉過程。
先將R1,R2配置OSPF,過一段時間後再在R3上啓用OSPF。
在R1上查看鄰居表:
r1#
r1#show ip ospf ne
r1#show ip ospf neighbor
Neighbor ID
2.2.2.2
r1#
在R2上查看鄰居表:
r2#
r2#show ip ospf ne
r2#show ip ospf neighbor
Neighbor ID
1.1.1.1
r2#
因爲R2的router-id 2.2.2.2比R1的router-id 1.1.1.1大,在同一時間段內選舉,故R2爲DR,R1爲BDR.
過一段時間後在R3上啓用OSPF進程。
此時再查看鄰居表:
R1的鄰居表:
r1#
r1#
r1#show ip ospf neighbor
Neighbor ID
3.3.3.3
2.2.2.2
r1#
r1#
R2的鄰居表:
r2#
r2#show ip ospf neighbor
Neighbor ID
3.3.3.3
1.1.1.1
r2#
R3的鄰居表:
r3#
r3#show ip ospf neighbor
Neighbor ID
2.2.2.2
1.1.1.1
r3#
r3#
在 192.168.13.0 (R1<------>R3)網段內,因爲R1啓用OSPF進程的時間早於R3,故在此網段內R1爲DR,R3爲BDR。
在 192.168.23.0 (R2<------>R3)網段內,因爲R2啓用OSPF進程的時間早於R3,故在此網段內R2爲DR,R3爲BDR。
Notice:
解決方法: 清理一下OSPF的進程,讓OSPF重新選舉。
r1#
r1#clear ip ospf process
Reset ALL OSPF processes? [no]: y
r1#
r2#
r2#clear ip ospf process
Reset ALL OSPF processes? [no]: y
r2#
r3#
r3#clear ip ospf process
Reset ALL OSPF processes? [no]: y
r3#
此時,查看路由表:
r1#
r1#show ip ospf neighbor
Neighbor ID
3.3.3.3
2.2.2.2
r1#
————
r2#
r2#show ip ospf neighbor
Neighbor ID
3.3.3.3
1.1.1.1
r2#
————
r3#
r3#show ip ospf neighbor
Neighbor ID
2.2.2.2
1.1.1.1
r3#