In the Basic OSPF Configuration Chapter, after you change the router-id of R3 to 3.3.3.3 and reset the OSPF process on R3, we can see the new router-id of R3 set to 3.3.3.3.
However, if you had reset the ospf processes on R1 and R2 after changing R3’s router-id, the ospf neighbor states would have been different if i am not wrong.
Logs:
R1#sh ip protocol
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 192.168.13.1
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
192.168.12.0 0.0.0.255 area 0
192.168.13.0 0.0.0.255 area 0
Routing Information Sources:
Gateway Distance Last Update
2.2.2.2 110 00:06:54
3.3.3.3 110 00:06:54
192.168.13.1 110 00:06:54
192.168.23.3 110 00:12:33
Distance: (default is 110)
R1#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 1 FULL/BDR 00:00:33 192.168.13.3 FastEthernet0/0
2.2.2.2 1 FULL/BDR 00:00:33 192.168.12.2 Ethernet0/1/0
R2#sh ip protocol
Routing Protocol is "ospf 2"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 2.2.2.2
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
192.168.12.0 0.0.0.255 area 0
192.168.23.0 0.0.0.255 area 0
Routing Information Sources:
Gateway Distance Last Update
2.2.2.2 110 00:07:43
3.3.3.3 110 00:07:43
192.168.13.1 110 00:07:43
192.168.23.3 110 00:13:22
Distance: (default is 110)
R2#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 1 FULL/DR 00:00:39 192.168.23.3 FastEthernet0/1
192.168.13.1 1 FULL/DR 00:00:34 192.168.12.1 Ethernet0/1/0
R3#sh ip protocol
Routing Protocol is "ospf 3"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 3.3.3.3
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
192.168.23.0 0.0.0.255 area 0
192.168.13.0 0.0.0.255 area 0
Routing Information Sources:
Gateway Distance Last Update
2.2.2.2 110 00:08:43
3.3.3.3 110 00:08:43
192.168.13.1 110 00:08:44
192.168.23.3 110 00:14:28
Distance: (default is 110)
R3#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.168.13.1 1 FULL/DR 00:00:37 192.168.13.1 FastEthernet0/0
2.2.2.2 1 FULL/BDR 00:00:37 192.168.23.2 FastEthernet0/1
This seems logical considering the DR/BDR election process:
Router with Highest Priority becomes DR. If priorities are equal ..
Router with the highest router id becomes DR. The Router with the second highest router-id/priority becomes the BDR.
This depends upon the state of the topology at that point in time. In the lesson, at this point, R1 has not yet become part of the OSPF topology since it has not become neighbors with R2 or R3. Only R2 and R3 are neighbors at this point. Once the OSPF process was reset on R3 after the change of the router ID, the expected behavior took place, R3 became the DR and R2 the BDR for that link.
In the output you are showing, R1 has become a neighbor with R2 and with R3. Since its router ID was not changed, it is using the highest IP address on an active interface. Since that router ID is higher than those of R2 or R3, in your topology, R1 has become the DR for both links. Similarly, R3 has become the DR for the link between R2 and R3 (just like in the lesson) since its router ID is higher.
Thank You @lagapidis for clarifying the same. So, does that mean when a new router becomes a neighbor on a network segment that already has a DR/BDR, the OSPF re-election doesn’t happen automatically even though the new router might have a higher OSPF priority or higher router-id. It only takes effect until after we restart the OSPF processes manually on all routers ?
Yes that is correct. OSPF DR/BDR elections are preemptive. That means that even if a new OSPF router is added to a network segment with a higher priority or higher router ID, an election will not be triggerred.
I’ve builded my own lab similar to yours on this lesson.
I’ve tested nearly everything, they are working as expected but I couldnt change Router-id of a router. I tried to configure a loopback and then clear ip ospf process, It didnt change.(I tried for R1) And then I manually configured router-id and then clear ip ospf but no luck. I am putting my lab conf and SS below, Could you help me?
My second question is that when you configure authentication for all ospf process, you only specify which authentication method it will use , in this case what will be the key id and key for MD5? Do I need to configure for all of the interfaces? Or it just creates a random MD5 key and id and use that?
R1#sh ip int br
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 10.0.12.1 YES manual up up
GigabitEthernet0/1 10.0.13.1 YES manual up up
GigabitEthernet0/2 31.223.77.222 YES manual up up
GigabitEthernet0/3 unassigned YES unset administratively down down
Loopback0 1.1.1.1 YES manual up up
R1#sh ip protocols
*** IP Routing is NSF aware ***
Routing Protocol is "application"
Sending updates every 0 seconds
Invalid after 0 seconds, hold down 0, flushed after 0
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Maximum path: 32
Routing for Networks:
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 4)
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 10.0.13.1
It is an autonomous system boundary router
Redistributing External Routes from,
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
10.0.12.0 0.0.0.255 area 0
10.0.13.0 0.0.0.255 area 0
Routing Information Sources:
Gateway Distance Last Update
10.0.23.3 110 00:32:15
10.0.23.2 110 00:32:31
Distance: (default is 110)
R1#sh ip ospf ne
R1#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.0.23.3 1 FULL/BDR 00:00:36 10.0.13.2 GigabitEthernet0/1
10.0.23.2 1 FULL/DR 00:00:35 10.0.12.2 GigabitEthernet0/0
R1#sh ip protocols
*** IP Routing is NSF aware ***
Routing Protocol is "application"
Sending updates every 0 seconds
Invalid after 0 seconds, hold down 0, flushed after 0
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Maximum path: 32
Routing for Networks:
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 4)
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 10.0.13.1
It is an autonomous system boundary router
Redistributing External Routes from,
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
10.0.12.0 0.0.0.255 area 0
10.0.13.0 0.0.0.255 area 0
Routing Information Sources:
Gateway Distance Last Update
10.0.23.3 110 00:32:23
10.0.23.2 110 00:32:39
Distance: (default is 110)
R2#sh ip ospf ne
Neighbor ID Pri State Dead Time Address Interface
10.0.23.3 1 FULL/DR 00:00:32 10.0.23.3 GigabitEthernet0/1
10.0.13.1 1 FULL/BDR 00:00:34 10.0.12.1 GigabitEthernet0/0
R2#sh ip protocols
*** IP Routing is NSF aware ***
Routing Protocol is "application"
Sending updates every 0 seconds
Invalid after 0 seconds, hold down 0, flushed after 0
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Maximum path: 32
Routing for Networks:
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 4)
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 10.0.23.2
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
10.0.12.0 0.0.0.255 area 0
10.0.23.0 0.0.0.255 area 0
Routing Information Sources:
Gateway Distance Last Update
10.0.13.1 110 00:30:35
10.0.23.3 110 00:30:58
Distance: (default is 110)
R2#sh ip int br
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 10.0.12.2 YES manual up up
GigabitEthernet0/1 10.0.23.2 YES manual up up
GigabitEthernet0/2 unassigned YES unset administratively down down
GigabitEthernet0/3 unassigned YES unset administratively down down
Loopback0 2.2.2.2 YES manual up up
R2#
R3#sh ip ospf ne
Neighbor ID Pri State Dead Time Address Interface
10.0.13.1 1 FULL/DR 00:00:37 10.0.13.1 GigabitEthernet0/1
10.0.23.2 1 FULL/BDR 00:00:33 10.0.23.2 GigabitEthernet0/0
R3#sh ip protocols
*** IP Routing is NSF aware ***
Routing Protocol is "application"
Sending updates every 0 seconds
Invalid after 0 seconds, hold down 0, flushed after 0
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Maximum path: 32
Routing for Networks:
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 4)
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 10.0.23.3
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
10.0.13.0 0.0.0.255 area 0
10.0.23.0 0.0.0.255 area 0
Routing Information Sources:
Gateway Distance Last Update
10.0.13.1 110 00:50:12
10.0.23.2 110 00:35:06
Distance: (default is 110)
R3# sh ip int br
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 10.0.23.3 YES manual up up
GigabitEthernet0/1 10.0.13.2 YES manual up up
GigabitEthernet0/2 unassigned YES unset administratively down down
GigabitEthernet0/3 unassigned YES unset administratively down down
R3#
Concerning your second question, enabling authentication globally is a single command, however, you must then configure the parameters for authentication (password etc) on each interface through which it is expected to establish an OSPF adjacency. More information can be found at this NetworkLessons note on the topic.
I am trying to play with Router ID. Before creating a loopback, it took the highest IP address as the router ID. Later, I created a loopback interface and reset the OSPF process in order to use it as the router ID, but it still doesn’t change.
cisco router image : IOSv Software (VIOS-ADVENTERPRISEK9-M), Version 15.8(3)M2
Router#sh run int loo0
Building configuration...
Current configuration : 69 bytes
!
interface Loopback0
ip address 100.100.100.1 255.255.255.255
end
Router#sh ip protocols | i Router
Router ID 192.168.12.2
Router#
Router#sh ip int brie
Router#sh ip int brief | ex unas
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 192.168.12.2 YES NVRAM up up
GigabitEthernet0/2 192.168.23.1 YES NVRAM administratively down down
Loopback0 100.100.100.1 YES manual up up
Router#clear ip ospf process
Reset ALL OSPF processes? [no]: yes
Router#
Router#
*Oct 8 07:08:32.542: %OSPF-5-ADJCHG: Process 20, Nbr 172.16.5.1 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*Oct 8 07:08:32.613: %OSPF-5-ADJCHG: Process 20, Nbr 172.16.5.1 on GigabitEthernet0/0 from LOADING to FULL, Loading Done
Router#
Router#sh ip protocols | i Router
Router ID 192.168.12.2
Router#sh run | s r o
router ospf 20
network 192.168.12.0 0.0.0.255 area 0
Router#
Believe it or not, this is normal behavior. Take a look at this NetworkLessons note on the topic for more information. If you have any further questions let us know!