What is OSPF Router ID, Selection Algorithm, Configuration

OSPF Router ID: OSPF network contains multiple routers and all these routes have an OSPF Route ID which is unique. This unique id is mainly used for the identity purpose of the OSPF routes. Commonly this router ID is and address of IPv4 which is a 32-bit binary number. This address is assumed to each of the routes that run the OSPF protocol.

The OSPF uses its LSDB to store the topology of the network. Where LSDB is theLink State Database. All the routers in that particular topology have a unique route id. That is the number of routers present there, then, there will be the corresponding number of different router-id. If multiple routers have the same router ID, then it will lead to some issues such as unreachability.

If the OSPF process is started and all the OSPF neighboring connections have been established, we cannot change this unique OSPF route id. We can only change the value of this id before the two above process starts. For this purpose,  any one of the following things has to do. They are,

⦁    Reload IOS.

⦁    use the command: “clear IP OSPF process”.

Both of these methods may result in temporary network disconnectivity.

Algorithm for selecting OSPF Router ID ( also called as, OSPF Router ID Selection Algorithm)

We can look at the OSPF Router ID Selection Algorithm’s working procedure and is explained below:


  1. The very first step is to select the OSPF router ID. This id is selected from the OSPF process, where the selected OSPF Router id must be manually configured OSPF router ID.
  2. Suppose, there is no manually configured router ID, then the OSPF router ID will be the IP address of any of the loopback interfaces of the router, which is highest.
  3. Even there is no such configured loopback interface, the OSPF Router id will be the IP address that presented on its active interface, which is highest.

OSPF Router ID Configuration

The steps taken to configure the OSPF Router ID are illustrated below:

1)  Snabaynetworking.com R1 > enable.

2) Snabaynetworking.com R1  #  configure terminal.

3)  Snabaynetworking.com R1 ( config ) # router OSPF 100.

4)  Snabaynetworking.com R1 ( config-router ) # router-id

5)  Snabaynetworking.com R1 ( config-router ) # exit.

6)  Snabaynetworking.com R1  #.

Also, read…

Download What is OSPF Router ID, Selection Algorithm, Configuration in pdf – Click here


Close Menu