Configuring The OSPF Router-ID

The OSPF Router-ID is used to identify a specific device within an OSPF database. Router ID’s must be unique to prevent unintended OSPF database problems. This lab will discuss and demonstrate the configuration and verification of the OSPF Router-ID

Real World Application & Core Knowledge

In lab 9-1, the process of the Router-ID determination was discussed and through out Section 9 labs when you’ve used the show ip ospf neighbor command and I’m sure you’ve noticed the neighbor id and that it was the IP Address of the neighbors loopback0 interface. As discussed in Lab 9-1, there is a reason for this. The Router-ID uniquely identifies a router in an autonomous system, no two routers in an OSPF autonomous system can have the same router-id.

If a router-id is not configured manually in the OSPF routing process the router will automatically configure a router-id determined from the highest IP address of a logical interface (loopback interface) or the highest IP address of an active interface. When referring to a higher IP address, step back and look at the IP address as a whole number. For example, 1.1.1.1 translates to 1,111 and 2.2.2.2 translates to 2,222; in which case 2,222 is a higher number than 1,111.

The router id is used in several OSPF related commands such as the specifying a specific neighbor when clearing a neighbor relationship or when viewing neighbor parameters by using the show ip ospf neighbor rid.

When configuring a router-id, the neighbors will not be updated automatically until that router has failed or the OSPF process has been cleared and the neighbor relationship has been re-established.

In this lab you will statically configure the Router-ID’s on all routers in the topology using the router number as the router-id. i.e; R1’s router-id would be 1.1.1.1

Familiarize yourself with the following new command(s);

Command

Description

router-id x.x.x.x

This command is executed in OSPF router configuration mode to statically configure a router id on a specific neighbor.

show ip ospf proc-id

This command is executed in privileged mode to view OSPF process parameters such s the local router-id and OSPF area information related to that router.

The following logical topology shown below is used in labs found through out Section 9 – Configuring OSPF;

Lab Prerequisites

If you are using GNS3 than load the Free CCNA Workbook GNS3 topology than start devices; R1, R2, R3, R4, R5 and SW1.

Establish a console session with devices R1, R2, R3, R4, R5 and SW1 than load the initial configurations provided below by copying the config from the textbox and pasting it into the respected routers console.

Lab Objectives

Configure each router with a router-id that reflects the router number. i.e; R1’s Router-id would be 1.1.1.1

Clear the OSPF process on each router and verify on R1 that the new router ID’s are be used by viewing R1’s OSPF neighbors.

Lab Instruction

Objective 1. – Configure each router with a router-id that reflects the router number. i.e; R1’s Router-id would be 1.1.1.1

R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
Reload or use "clear ip ospf process" command, for this to take effect
R1(config-router)#end
R1#

R2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router ospf 1
R2(config-router)#router-id 2.2.2.2
Reload or use "clear ip ospf process" command, for this to take effect
R2(config-router)#end
R2#

R3#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#router ospf 1
R3(config-router)#router-id 3.3.3.3
Reload or use "clear ip ospf process" command, for this to take effect
R3(config-router)#end
R3#

R4#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R4(config)#router ospf 1
R4(config-router)#router-id 4.4.4.4
Reload or use "clear ip ospf process" command, for this to take effect
R4(config-router)#end
R4#

R5#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R5(config)#router ospf 1
R5(config-router)#router-id 5.5.5.5
Reload or use "clear ip ospf process" command, for this to take effect
R5(config-router)#end
R5#

Objective 2. – Clear the OSPF process on each router and verify on R1 that the new router ID’s are be used by viewing R1’s OSPF neighbors.

R1#clear ip ospf 1 proc
Reset OSPF process? [no]: y
R1#

R2#clear ip ospf 1 proc
Reset OSPF process? [no]: y
R2#

R3#clear ip ospf 1 proc
Reset OSPF process? [no]: y
R3#

R4#clear ip ospf 1 proc
Reset OSPF process? [no]: y
R4#

R5#clear ip ospf 1 proc
Reset OSPF process? [no]: y
R5#

Once you’ve cleared the OSPF process as shown above on R1 through R5 the neighbor relationships will drop and reform, once all neighbor relationships have been re-established you can then view the OSPF neighbor table on R1 to verify that the router-id’s have indeed been changed;