Show
Summary This topic configure an OSPFv2 router ID.. Start learning CCNA 200-301 for free right now!! Note: Welcome: This topic is part of Module 2 of the Cisco CCNA 3 course, for a better follow up of the course you can go to the CCNA 3 section to guide you through an order. To get you started, this topic discusses the foundation on which OSPF bases its entire process, the OSPF router ID. The figure shows the topology used for configuring OSPFv2 in this module. The routers in the topology have a starting configuration, including interface addresses. There is currently no static routing or dynamic routing configured on any of the routers. All interfaces on R1, R2, and R3 (except the loopback 1 on R2) are within the OSPF backbone area. The ISP router is used as the gateway to the internet of the routing domain. OSPF Reference TopologyNote: In this topology the loopback interface is used to simulate the WAN link to the Internet and a LAN connected to each router. This is done to allow this topology to be duplicated for demonstration purposes on routers that only have two Gigabit Ethernet interfaces. Router Configuration Mode for OSPFOSPFv2 is enabled using the router ospf process-id global configuration mode command, as shown in the command window for R1. The process-id value represents a number between 1 and 65,535 and is selected by the network administrator. The process-id value is locally significant, which means that it does not have to be the same value on the other OSPF routers to establish adjacencies with those neighbors. It is considered best practice to use the same process-id on all OSPF routers. After entering the router ospf process-id command, the router enters router configuration mode, as indicated by the R1(config-router)# prompt. Enter a question mark (?), to view all the commands available in this mode. The list of commands shown here has been altered to display only the commands that are relevant to this module. R1(config)# router ospf 10 R1(config-router)# ? area OSPF area parameters auto-cost Calculate OSPF interface cost according to bandwidth default-information Control distribution of default information distance Define an administrative distance exit Exit from routing protocol configuration mode log-adjacency-changes Log changes in adjacency state neighbor Specify a neighbor router network Enable routing on an IP network no Negate a command or set its defaults passive-interface Suppress routing updates on an interface redistribute Redistribute information from another routing protocol router-id router-id for this OSPF process R1(config-router)#Router IDsAn OSPF router ID is a 32-bit value, represented as an IPv4 address. The router ID is used to uniquely identify an OSPF router. All OSPF packets include the router ID of the originating router. Every router requires a router ID to participate in an OSPF domain. The router ID can be defined by an administrator or automatically assigned by the router. The router ID is used by an OSPF-enabled router to do the following:
Note: The DR and BDR election process is discussed in more detail later in this module. But how does the router determine the router ID? As illustrated in the figure, Cisco routers derive the router ID based on one of three criteria, in the following preferential order:
Configure a Loopback Interface as the Router IDIn the reference topology, only the physical interfaces are configured and active. The loopback interfaces have not been configured. When OSPF routing is enabled on the router, the routers would pick the following highest active configured IPv4 address as the router ID.
Note: OSPF does not need to be enabled on an interface for that interface to be chosen as the router ID. Instead of relying on physical interface, the router ID can be assigned to a loopback interface. Typically, the IPv4 address for this type of loopback interface should be configured using a 32-bit subnet mask (255.255.255.255). This effectively creates a host route. A 32-bit host route would not get advertised as a route to other OSPF routers. The example shows how to configure a loopback interface on R1. Assuming the router ID was not explicitly configured or previously learned, R1 will use IPv4 address 1.1.1.1 as its router ID. Assume R1 has not yet learned a router ID. R1(config-if)# interface Loopback 1 R1(config-if)# ip address 1.1.1.1 255.255.255.255 R1(config-if)# end R1# show ip protocols | include Router ID Router ID 1.1.1.1 R1#Explicitly Configure a Router IDIn the figure, the topology has been updated to show the router ID for each router:
Use the router-id rid router configuration mode command to manually assign a router ID. In the example, the router ID 1.1.1.1 is assigned to R1. Use the show ip protocols command to verify the router ID. R1(config)# router ospf 10 R1(config-router)# router-id 1.1.1.1 R1(config-router)# end *May 23 19:33:42.689: %SYS-5-CONFIG_I: Configured from console by console R1# show ip protocols | include Router ID Router ID 1.1.1.1 R1#Modify a Router IDAfter a router selects a router ID, an active OSPF router does not allow the router ID to be changed until the router is reloaded or the OSPF process is reset. In example for R1, the configured router ID has been removed and the router reloaded. Notice that the current router ID is 10.10.1.1, which is the Loopback 0 IPv4 address. The router ID should be 1.1.1.1. Therefore, R1 is configured with the command router-id 1.1.1.1. Notice how an informational message appears stating that the OSPF process must be cleared or that the router must be reloaded. The reason is because R1 already has adjacencies with other neighbors using the router ID 10.10.1.1. Those adjacencies must be renegotiated using the new router ID 1.1.1.1. Use the clear ip ospf process command to reset the adjacencies. You can then verify that R1 is using the new router ID command with the show ip protocols command piped to display only the router ID section. Clearing the OSPF process is the preferred method to reset the router ID. Note: The router-id command is the preferred method. Otherwise, the router chooses the highest IPv4 loopback interface address or the highest active IPv4 address of any of its physical interfaces. Syntax Checker – Configure R2 and R3 Router IDsUse the Syntax Checker to configure R2 and R3 with router IDs. You are currently logged into R2:
Enter the show ip protocols command to verify the router ID. R2#show ip protocols \*\*\* IP Routing is NSF aware \*\*\* (output omitted) Routing Protocol is "ospf 10" 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 0. 0 normal 0 stub 0 nssa Maximum path: 4 Routing for Networks: Routing Information Sources: Gateway Distance Last Update Distance: (default is 110) R2#You are now on R3:
Enter the show ip protocols command to verify the router ID. R3#show ip protocols \*\*\* IP Routing is NSF aware \*\*\* (output omitted) Routing Protocol is "ospf 10" 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 0. 0 normal 0 stub 0 nssa Maximum path: 4 Routing for Networks: Routing Information Sources: Gateway Distance Last Update Distance: (default is 110) R3#You have successfully assigned the router IDs to R2 and R3. Ready to go! Keep visiting our networking course blog, give Like to our fanpage; and you will find more tools and concepts that will make you a networking professional. |