15-1 router-id ip-address

 <  Free Open Study  >  

15-1 router-id ip-address

Syntax Description:

  • ip-address ” The IP address that is to be used as the OSPF router ID.

Purpose: To configure the OSPF router ID. The default OSPF router ID is the numerically highest IP address of any loopback interface that has been configured on the router. If no loopback interfaces have been configured, then the OSPF router ID is the numerically highest IP address of any active interface. The router ID is a component of every OSPF exchange, including Hello packets and link-state advertisements (LSAs). For multiaccess networks, the OSPF router ID is used in the election of the Designated Router (DR). It is desirable to have an OSPF router ID that does not change. If loopback interfaces are not configured on an OSPF router, then the command router-id should be used to establish a stable OSPF router ID

Initial Cisco IOS Software Release: 12.0(1)T

Configuration Example: OSPF Router ID Selection

In Figure 15-1, Routers A and B are OSPF neighbors. Router A has two physical interfaces configured, Ethernet 0/0 and Serial 0/1. Initially, interface Ethernet 0/0 is in the shutdown state, so OSPF will choose the router ID as the IP address assigned to Serial 0/1 because it is the only remaining active interface. Configure Routers A and B as shown in the listing that follows the figure.

Figure 15-1. OSPF Router ID

graphics/15fig01.gif

 Router A  interface Ethernet0/0   ip address 172.16.1.1 255.255.255.0   shutdown   !   interface Serial0/1   ip address 10.1.1.1 255.255.255.252   clockrate 64000   !   router ospf 1   network 10.1.1.0 0.0.0.3 area 0  ________________________________________________________________ Router B  interface Loopback0   ip address 2.2.2.2 255.255.255.255   !   interface Serial0   ip address 10.1.1.2 255.255.255.252   !   router ospf 1   network 10.1.1.0 0.0.0.3 area 0  

To determine the OSPF router ID of Router A, use the show ip ospf command on Router A or the show ip ospf neighbor command on Router B.

 rtrA#  show ip ospf  Routing Process "ospf 1" with  ID 10.1.1.1  and Domain ID 0.0.0.1  Supports only single TOS(TOS0) routes  Supports opaque LSA  SPF schedule delay 5 secs, Hold time between two SPFs 10 secs  Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs  Number of external LSA 8. Checksum Sum 0x3BAD0  Number of opaque AS LSA 0. Checksum Sum 0x0  Number of DCbitless external and opaque AS LSA 0  Number of DoNotAge external and opaque AS LSA 0  Number of areas in this router is 1. 1 normal 0 stub 0 nssa  External flood list length 0     Area BACKBONE(0)         Number of interfaces in this area is 1         Area has no authentication         SPF algorithm executed 2 times         Area ranges are         Number of LSA 3. Checksum Sum 0x23124         Number of opaque link LSA 0. Checksum Sum 0x0         Number of DCbitless LSA 0         Number of indication LSA 0         Number of DoNotAge LSA 0         Flood list length 0 ________________________________________________________________ rtrB#  show ip ospf neighbor  Neighbor ID     Pri   State           Dead Time   Address         Interface  10.1.1.1  1   FULL/  -        00:00:34    10.1.1.1        Serial0 

Enable the Ethernet 0/0 interface on Router A and observe the effect on the OSPF router ID.

 Router A  interface Ethernet0/0   ip address 172.16.1.1 255.255.255.0    no shutdown   

Verify that interface E0/0 is up.

 rtrA#  show ip interface brief  Interface                  IP-Address      OK? Method Status     Protocol  Ethernet0/0                172.16.1.1      YES NVRAM  up               up  Serial0/0                  unassigned      YES manual administratively down down Ethernet0/1                unassigned      YES NVRAM  administratively down down Serial0/1                  10.1.1.1        YES NVRAM  up                    up 

View the OSPF router ID on Router A.

 rtrA#  show ip ospf  Routing Process "ospf 1" with ID 10.1.1.1 and Domain ID 0.0.0.1  Supports only single TOS(TOS0) routes  Supports opaque LSA  SPF schedule delay 5 secs, Hold time between two SPFs 10 secs  Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs  Number of external LSA 8. Checksum Sum 0x3AED6  Number of opaque AS LSA 0. Checksum Sum 0x0  Number of DCbitless external and opaque AS LSA 0  Number of DoNotAge external and opaque AS LSA 0  Number of areas in this router is 1. 1 normal 0 stub 0 nssa  External flood list length 0     Area BACKBONE(0)         Number of interfaces in this area is 1         Area has no authentication         SPF algorithm executed 2 times         Area ranges are         Number of LSA 3. Checksum Sum 0x23124         Number of opaque link LSA 0. Checksum Sum 0x0         Number of DCbitless LSA 0         Number of indication LSA 0         Number of DoNotAge LSA 0         Flood list length 0 

The OSPF router ID has not changed, even though the IP address on Ethernet 0/0 is higher than the IP address on Serial 0/1. This is a stability feature of OSPF. The router ID will not change until you reload the router or remove the OSPF configuration and then reconfigure OSPF. Remove the OSPF process on Router A using the command no router ospf 1 in configuration mode. Reconfigure the OSPF process on Router A using the previous listing. Has the OSPF router ID changed?

 rtrA#  show ip ospf  Routing Process "ospf 1" with  ID 172.16.1.1  and Domain ID 0.0.0.1  Supports only single TOS(TOS0) routes  Supports opaque LSA  SPF schedule delay 5 secs, Hold time between two SPFs 10 secs  Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs  Number of external LSA 8. Checksum Sum 0x3AED6  Number of opaque AS LSA 0. Checksum Sum 0x0  Number of DCbitless external and opaque AS LSA 0  Number of DoNotAge external and opaque AS LSA 0  Number of areas in this router is 1. 1 normal 0 stub 0 nssa  External flood list length 0     Area BACKBONE(0)         Number of interfaces in this area is 1         Area has no authentication         SPF algorithm executed 1 times         Area ranges are         Number of LSA 4. Checksum Sum 0x27A6A         Number of opaque link LSA 0. Checksum Sum 0x0         Number of DCbitless LSA 0         Number of indication LSA 0         Number of DoNotAge LSA 0         Flood list length 0 

The OSPF router ID has changed. Now add a loopback interface on Router A with an IP address of 1.1.1.1/32. Even though this IP address is lower than the IP address assigned to Ethernet 0/0 and Serial 0/1, OSPF will use the loopback IP address as the router ID. Of course, OSPF will use the loopback address as the router ID only if the router is reloaded and the OSPF process is cleared or if the OSPF process is removed and then reconfigured. So remove and reconfigure the OSPF process on Router A and display the OSPF router ID.

 Router A  interface Loopback0   ip address 1.1.1.1 255.255.255.255  

Now that the loopback interface has been added, remove and re-apply the OSPF configuration, clear the OSPF process, or simply save and reload the router.

 rtrA#  show ip ospf  Routing Process "ospf 1" with  ID 1.1.1.1  and Domain ID 0.0.0.1  Supports only single TOS(TOS0) routes  Supports opaque LSA  SPF schedule delay 5 secs, Hold time between two SPFs 10 secs  Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs  Number of external LSA 8. Checksum Sum 0x3AED6  Number of opaque AS LSA 0. Checksum Sum 0x0  Number of DCbitless external and opaque AS LSA 0  Number of DoNotAge external and opaque AS LSA 0  Number of areas in this router is 1. 1 normal 0 stub 0 nssa  External flood list length 0     Area BACKBONE(0)         Number of interfaces in this area is 1         Area has no authentication         SPF algorithm executed 2 times         Area ranges are         Number of LSA 4. Checksum Sum 0x1FF72         Number of opaque link LSA 0. Checksum Sum 0x0         Number of DCbitless LSA 0         Number of indication LSA 0         Number of DoNotAge LSA 0         Flood list length 0 

Finally, use the router-id command to change the OSPF router ID on Router A to 1.2.3.4.

 Router A  router ospf 1    router-id 1.2.3.4    network 10.1.1.0 0.0.0.3 area 0  

When the command router-id is entered, you should observe the router giving you some friendly advice:

 rtrA(config-router)#  router-id 1.2.3.4  Reload or use "clear ip ospf process" command, for this to take effect 

Heed the router's advice and clear the OSPF process on Router A.

Verification

Verify that the OSPF process ID on Router A has been changed to 1.2.3.4.

 rtrA#  clear ip ospf process 1  rtrA#rtrA#  show ip ospf  Routing Process "ospf 1" with  ID 1.2.3.4  and Domain ID 0.0.0.1  Supports only single TOS(TOS0) routes  Supports opaque LSA  SPF schedule delay 5 secs, Hold time between two SPFs 10 secs  Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs  Number of external LSA 16. Checksum Sum 0x75DAC  Number of opaque AS LSA 0. Checksum Sum 0x0  Number of DCbitless external and opaque AS LSA 0  Number of DoNotAge external and opaque AS LSA 0  Number of areas in this router is 1. 1 normal 0 stub 0 nssa  External flood list length 0     Area BACKBONE(0)         Number of interfaces in this area is 1         Area has no authentication         SPF algorithm executed 4 times         Area ranges are         Number of LSA 7. Checksum Sum 0x3BFF9         Number of opaque link LSA 0. Checksum Sum 0x0         Number of DCbitless LSA 0         Number of indication LSA 0         Number of DoNotAge LSA 0         Flood list length 0 
Troubleshooting
Step 1. The only thing that can go wrong with this command is forgetting to clear the OSPF process using the EXEC command clear ip ospf process.

 <  Free Open Study  >  


Cisco[r] OSPF Command and Configuration Handbook
Cisco OSPF Command and Configuration Handbook (paperback)
ISBN: 1587055406
EAN: 2147483647
Year: 2002
Pages: 236

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net