< Home

router id

Function

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.

Format

router id router-id

undo router id

Parameters

Parameter Description Value
router-id Specifies the router ID in the form of an IPv4 address. It is in dotted decimal notation.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

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:

  1. 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.

  2. The router ID is re-selected only when the interface IP address selected as the router ID is deleted or modified. The router ID is not selected in the following cases:
    • The interface goes Down.
    • A loopback interface is configured when the IP address of the non-loopback interface is selected as the router ID.
    • A larger interface address is configured.

    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.

  3. Each VPN instance can select the router ID from their interface addresses according to the preceding rules.

  4. 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.

Example

# Set the router ID of a router in the RM module to 1.1.1.1.

<sysname> system-view
[sysname] router id 1.1.1.1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >