router-id

Use this command to set the OSPF router ID for the device.

Syntax

router-id ip-address

Parameters

ip-address Specifies the IP address that OSPF will use as the router ID.

Defaults

None.

Mode

OSPF router configuration.

Usage

The OSPF protocol uses the router ID as a tie-breaker for path selection. If not specified, this will be set to the highest IP address of the interfaces configured for IP routing. If no router ID is configured, then the OSPF router ID is set to the highest loopback address configured. If no loopback address is configured, then the highest IP address configured will be used. If no IP addresses are configured, then OSPF will not enable.

Example

This example shows how to set the OSPF router ID to IP address 182.127.62.1:

System(rw-config-ospf-1)->router-id 182.127.62.1