Single-area OSPFv2 configuration
Configuration
router ospf process-id
- The process-id value represents a number between 1 and 65,535
- The process-id is locally significant, it does not have to the same on the other routers
- But it is best practice to use the same process-id on all OSPF routers
Router-IDs
- An OSPF router ID is a 32-bit value, represented as IPv4 address.
- The router ID is used to uniquely identify an OSPF router.
- All OSPF packets include the router ID of the originating router.
- The router ID can be defined by administrator or automatically assigned by the router
- The router ID is used by an OSPF-enabled router
- Participate in the synchronization of OSPF databases
- During the ExChange State, the router with the highest router ID will send the database decriptor(DBD) packet first
- Participate in the election of the designated router(DR)
- The router with the highest router ID is elected the DR
- The router with the second router ID is elected the BDR
- Participate in the synchronization of OSPF databases
Router-ID Determination
OSPF router-id rid
(This is the recommended method to assign a router ID)- If the router ID is not configured, the router chooses the highest IPv4 address of any configured loopback interface.
- If no loopback interfaces are configured, the router chooses the highest active IPv4 address of any of its physical interfaces.
Modify Router ID
- After 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.
- Rest the OSPF process
clear ip ospf process
Configure OSPF directly on the interface
routers(config-if)# ip ospf process-id area area-id
Passive Interface
- To prevent the transmission of routing messages through a router interface
passive-interface interface
Change the network type
router(config-if)# ip ospf network point-to-point/ broadcast
- In the point-to-point network, the election of DR and BDR is not conducted.