Every Router that running OSPF in a network it must have an unique identity called RouterID. This ID is used 32 bit format number like an ip address format.
This number are used to identified on one router with other routers. Router ID also used by OSPF to DR and BDR selection process.
To Specify a router-id, OSPF are used some parameters as the following :
The following explanation based on diagram above :
- The first proccess is OSPF will checking if the manual RouterID is configured then it will be automatically used as RouterID.
- If no manual configuration yet ospf will be checking for ipv4 on loopback interface first and will be use a highest ip address as RouterID.
- Then If no ipv4 loopback interface, it will select the highest actively ipv4 on the router interfaces.
For the example if Router has an ip address 192.168.10.1 on interface G0/0 and 192.168.20.1 on interface G0/1, then 192.168.20.1 will be used as router-id.
How if interface that has used as router id is down ? then it will do the reselection of router id and how if the administration add new ip address with highest ip like 192.168.30.1 ? it’s the same.
So it’s not recomended and can be cause the issue if the router id are often changing. So in implementation it’s recomended to setup manual routerID or used ipv4 loopback interfaces.
For the example configuration it will discuss on the other article.