OBJECTIVE
1. To understand the concept of DR (Designated Router) and BDR (Backup Designated Router).
2. Determine how DR and BDR is elected through the Router ID.
3. Manipulate the election of DR and BDR using the “ip ospf priority ” command.
Configurations of MANILA Router:
R1#config t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#hostname MANILA
MANILA(config)#int fa0/0
MANILA(config-if)#ip add 192.168.12.1 255.255.255.0
MANILA(config-if)#no shut
MANILA(config-if)#exit
MANILA(config)#int lo1
MANILA(config-if)#ip address 10.10.10.1 255.255.255.0
MANILA(config-if)#exit
MANILA(config)#router ospf 1
MANILA(config-router)#network 192.168.12.0 0.0.0.255 area 0
MANILA(config-router)#network 10.10.10.0 0.0.0.255 area 0
MANILA(config-router)#^Z
MANILA#
Configurations of MELBOURNE Router:
R2#config t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#hostname MELBOURNE
MELBOURNE(config)#int fa0/0
MELBOURNE(config-if)#ip add 192.168.12.2 255.255.255.0
MELBOURNE(config-if)#no shut
MELBOURNE(config-if)#exit
MELBOURNE(config)#int lo2
MELBOURNE(config-if)#ip add 20.20.20.1 255.255.255.0
MELBOURNE(config-if)#exit
MELBOURNE(config)#router ospf 1
MELBOURNE(config-router)#network 192.168.12.0 0.0.0.255 area 0
MELBOURNE(config-router)#network 20.20.20.0 0.0.0.255 area 0
MELBOURNE(config-router)#^Z
Configurations of SYDNEY Router:
R3#config t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#hostname SYDNEY
SYDNEY(config)#int fa0/0
SYDNEY(config-if)#ip add 192.168.12.3 255.255.255.0
SYDNEY(config-if)#no shut
SYDNEY(config-if)#exit
SYDNEY(config)#int lo3
SYDNEY(config-if)#ip add 30.30.30.1 255.255.255.0
SYDNEY(config-if)#exit
SYDNEY(config)#router ospf 1
SYDNEY(config-router)#network 192.168.12.0 0.0.0.255 area 0
SYDNEY(config-router)#network 30.30.30.0 0.0.0.255 area 0
Configurations of SINGAPORE Router:
R4#config t
Enter configuration commands, one per line. End with CNTL/Z.
R4(config)#hostname SINGAPORE
SINGAPORE(config)#int fa0/0
SINGAPORE(config-if)#ip add 192.168.12.4 255.255.255.0
SINGAPORE(config-if)#no shut
SINGAPORE(config-if)#exit
SINGAPORE(config)#int lo4
SINGAPORE(config-if)#ip add 40.40.40.1 255.255.255.0
SINGAPORE(config-if)#exit
SINGAPORE(config)#router ospf 1
SINGAPORE(config-router)#network 192.168.12.0 0.0.0.255 area 0
SINGAPORE(config-router)#network 40.40.40.0 0.0.0.255 area 0
SINGAPORE(config-router)#^Z
Now, let’s see the results of “show ip ospf neighbor”,
MANILA#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
20.20.20.1 1 2WAY/DROTHER 00:00:30 192.168.12.2 FastEthernet0/0
30.30.30.1 1 FULL/BDR 00:00:39 192.168.12.3 FastEthernet0/0
40.40.40.1 1 FULL/DR 00:00:33 192.168.12.4 FastEthernet0/0
MANILA#
>>As observed above, the SINGAPORE router was elected as the DR and the SYDNEY router were elected as the BDR. In the background, I have to manually reset the OSPF process in MANILA and MELBOURNE router to elect the correct DR and BDR based on the highest ROUTER ID.
How do we determine the Router ID? The results of “show ip opsf database”will provide the router ID of each router. For example below, MANILA router’s Router ID is shown,
MANILA#show ip ospf database
OSPF Router with ID (10.10.10.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
10.10.10.1 10.10.10.1 645 0x80000005 0x002FA1 2
20.20.20.1 20.20.20.1 625 0x80000005 0x00DF95 2
30.30.30.1 30.30.30.1 647 0x80000005 0x009089 2
40.40.40.1 40.40.40.1 646 0x80000005 0x00417D 2
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
192.168.12.4 40.40.40.1 628 0x80000002 0x00C547
Let’see the rest of the three routers OPSF Nieghbor details,
MELBOURNE#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.10.10.1 1 2WAY/DROTHER 00:00:35 192.168.12.1 FastEthernet0/0
30.30.30.1 1 FULL/BDR 00:00:33 192.168.12.3 FastEthernet0/0
40.40.40.1 1 FULL/DR 00:00:37 192.168.12.4 FastEthernet0/0
MELBOURNE#
SYDNEY#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.10.10.1 1 FULL/DROTHER 00:00:31 192.168.12.1 FastEthernet0/0
20.20.20.1 1 FULL/DROTHER 00:00:31 192.168.12.2 FastEthernet0/0
40.40.40.1 1 FULL/DR 00:00:34 192.168.12.4 FastEthernet0/0
SYDNEY#
SINGAPORE#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.10.10.1 1 FULL/DROTHER 00:00:31 192.168.12.1 FastEthernet0/0
20.20.20.1 1 FULL/DROTHER 00:00:32 192.168.12.2 FastEthernet0/0
30.30.30.1 1 FULL/BDR 00:00:30 192.168.12.3 FastEthernet0/0
SINGAPORE#
>>> As seen above, the SINGAPORE Router were elected as the DR while the SYDNEY router were elected as the BDR.
>> What did you notice about the MANILA and MELBOURNE router State?
It shows that they are in 2WAY/DROTHER. So what does this means?
>> If two OSPF neighbors both have their OSPF interface priority set to zero, they establish
two-way adjacency instead of full adjacency.
Now, Let’s make MANILA Router as the DR and MELBOURNE as the BDR by using the “ip ospf priority” and configure both SYDNEY and SINGAPORE router not to participate on the DR & BDR election. As we know , the Higher the Priority, it will become the DR.
MANILA#config t
Enter configuration commands, one per line. End with CNTL/Z.
MANILA(config)#int fa0/0
MANILA(config-if)#ip ospf priority 255 <<<< OSPF priority maximum value is 255.
MELBOURNE#CONFIG T
Enter configuration commands, one per line. End with CNTL/Z.
MELBOURNE(config)#int fa0/0
MELBOURNE(config-if)#ip ospf priority ?
Priority
MELBOURNE(config-if)#ip ospf priority 200 <<<< Lower than the value I have set up for MANILA.
MELBOURNE(config-if)#^Z
As observed from SYDNEY Router, the changes did not take effect immediately. We have to reset the OSPF Process manually. Take note that OSPF DR and BDR Election is NON-PREEMPTIVE.
SYDNEY#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.10.10.1 255 FULL/DROTHER 00:00:36 192.168.12.1 FastEthernet0/0
20.20.20.1 1 FULL/DROTHER 00:00:35 192.168.12.2 FastEthernet0/0
40.40.40.1 1 FULL/DR 00:00:34 192.168.12.4 FastEthernet0/0
SYDNEY#
Now, Let’s clear the OSPF PROCESS on all the routers.
MANILA#clear ip ospf process
Reset ALL OSPF processes? [no]: yes
MELBOURNE#clear ip ospf process
Reset ALL OSPF processes? [no]: yes
MELBOURNE#
SYDNEY#clear ip ospf process
Reset ALL OSPF processes? [no]: yes
SYDNEY#
SINGAPORE#clear ip ospf process
Reset ALL OSPF processes? [no]: yes
SINGAPORE#
Let’s check now the status of the OSPF neighbors on the 4 routers:
MANILA#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
20.20.20.1 200 FULL/BDR 00:00:39 192.168.12.2 FastEthernet0/0
30.30.30.1 1 FULL/DROTHER 00:00:33 192.168.12.3 FastEthernet0/0
40.40.40.1 1 FULL/DROTHER 00:00:33 192.168.12.4 FastEthernet0/0
MANILA#
MELBOURNE#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.10.10.1 255 FULL/DR 00:00:36 192.168.12.1 FastEthernet0/0
30.30.30.1 1 FULL/DROTHER 00:00:34 192.168.12.3 FastEthernet0/0
40.40.40.1 1 FULL/DROTHER 00:00:34 192.168.12.4 FastEthernet0/0
SYDNEY#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.10.10.1 255 FULL/DR 00:00:33 192.168.12.1 FastEthernet0/0
20.20.20.1 200 FULL/BDR 00:00:37 192.168.12.2 FastEthernet0/0
40.40.40.1 1 2WAY/DROTHER 00:00:32 192.168.12.4 FastEthernet0/0
SYDNEY#
SINGAPORE#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.10.10.1 255 FULL/DR 00:00:39 192.168.12.1 FastEthernet0/0
20.20.20.1 200 FULL/BDR 00:00:38 192.168.12.2 FastEthernet0/0
30.30.30.1 1 2WAY/DROTHER 00:00:31 192.168.12.3 FastEthernet0/0
SINGAPORE#
>>> As observed from the results above, we can see that MANILA now became the DR and MELBOURNE is the BDR.
Leave a comment