The router id command sets the global router ID.
The undo router id command deletes the configured global router ID.
By default, the global router ID is 0.0.0.0 when no IPv4 interface address is configured.
Parameter | Description | Value |
---|---|---|
router-id |
Sets a router ID in the IPv4 address format. |
The value is in dotted decimal notation. |
Usage Scenario
A router ID is a 32-bit integer used to uniquely identify a device that uses a specific dynamic routing protocol for route exchange. A router ID uses the same format as an IP address. Router IDs are classified into global router IDs of devices and router IDs of dynamic routing protocols.
The rules for selecting a global router ID are as follows:
If you set the global router ID using the router id command, the configured router ID is used.
You can run the display router id command to view the global router ID.
Each VPN instance selects the router ID from the IP addresses of the interfaces in the VPN instance based on rules 1 and 2.
After the global router ID is changed, manually run the reset command for each routing protocol to make the new global router ID take effect.
Precautions
When a device is being initialized and there is no interface address on the device, the first configured IP address on the device, which may be a loopback interface address or another interface address, will become the global router ID of the device. This global router ID remains unchanged even if there is a larger interface IP address on the device.
The IP address of the interface whose configuration is restored the first is used as the global router ID after the restart.
To enhance network reliability, configure the address of a loopback interface as the global router ID.