The router id command sets the router ID in RM.
The undo router id command deletes the set router ID.
By default, when a router does not have any interface, the router ID in RM is 0.0.0.0.
| Parameter | Description | Value |
|---|---|---|
| router-id | Specifies the router ID in the form of an IPv4 address. | It is in dotted decimal notation. |
Usage Scenario
Router ID is required by certain dynamic routing protocols. If the router ID is not specified when these routing protocols are started, the router ID in RM is used by default.
The rules for selecting a router ID are as follows:
You can run the router id command to set the router ID. If the router ID is not set, select the router ID according to the following rules:
If there are the loopback interfaces that are configured with IP addresses, the largest IP address is selected as the router ID.
If there are no loopback interfaces that are configured with IP addresses, the largest IP address of an interface from other interfaces is selected as the router ID, regardless of whether the interface is Up or Down.
Running the display router id command displays the value of the router ID, the configuration results of the router id command, and the selection result of the router ID chosen from public network interface addresses.
Each VPN instance can select the router ID from their interface addresses according to the preceding rules.
If the Active Main Board (AMB) and Standby Main Board (SMB) exist, the system backs up the router ID set through the command and the router ID selected from interface addresses. After the AMB/SMB switchover, the system checks the validity of the router ID selected from interface addresses. If the router ID is invalid, the system needs to select a new router ID.
After the router ID changes, run the reset command for each protocol to select a new router ID.
Precautions
To enhance the reliability of a network, you can configure the address of a loopback interface as the router ID.