OSPF router ID
Each OSPF router must be assigned a router ID in order to operate within an OSPF routing domain. The router ID is used to provide a unique identity to the OSPF router. An OSPF router obtains its router ID in one of the following ways:
- It can be manually configured using the
router-id
command in OSPF configuration mode. If it is not configured then... - The router ID is defined as the highest IPv4 address on a loopback interface on the OSPF router. If there is no loopback interface, then...
- the router ID is defined as the highest IPv4 address on a physical interface on the OSPF router.
Note:
- It is best practice to either manually configure the router ID or use a loopback address. If an IP address on a physical interface is used, and that interface goes down, the router ID changes which will result in an unstable OSPF topology. Manually configured router IDs and loopbacks are less likely to fail.
- OSPFv3 used within an exclusively IPv6 environment must still use an IPv4 address as the router ID. Take a look at OSPF router ID in an IPv6 environment for more details.
Links
Links to this page:
- OSPF - Database Example
- OSPF - Default route advertisement next hop IP
- OSPF - Link ID and ADV Router in the OSPF database
- OSPF - Link ID in the OSPF database
- OSPF - Stuck in ExStart or Exchange states
- OSPF DR BDR election criteria
- OSPF modifying the router ID
- OSPF router ID in an IPv6 environment
- OSPF
- Route-map matching OSPF router ID
- Routing - How the routing table is populated