router-id

Function

The router-id command configures a Router ID for the Device. Each Router ID uniquely identifies one Device in an AS.

The undo router-id command deletes the Router ID configured for the Device.

By default, no BGP Router ID is configured, and the Router ID configured for the route management module through the router id command is used.

Format

router-id ipv4-address

undo router-id

Parameters

Parameter Description Value
ipv4-address

Specifies the router ID in the format of an IPv4 address.

It is in dotted decimal notation.

Views

BGP view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

Usage Scenario

The router-id command is used to configure a Router ID for the Device. Each Router ID uniquely identifies one BGP Device in an AS.

By configuring automatic Router ID selection for BGP-VPN instance, you can differentiate the configured Router ID of BGP-VPN instance from the BGP Router ID. For more information about the Router ID of a BGP-VPN instance, see the router-id (BGP-VPN Instance IPv4 Address Family View) command.

Prerequisites

The bgp command is run to enable BGP.

Configuration Impact

Changing or deleting a configured Router ID in the BGP view resets a BGP session. If a BGP session has been established in a BGP-VPN instance, deleting the configured Router ID resets the BGP session. Exercise caution when changing or deleting a Router ID.

Precautions

By default, the device that is not configured with any interface IP address uses the router ID of 0.0.0.0 selected by the routing management (RM) module.

If the router-id command is not configured in the BGP view, the router ID of the RM module is used by default. When the IP address of the interface selected as the router ID is deleted or modified, the reselecting process is triggered. In addition, the reset command is required for the modification to take effect. Router IDs are selected in descending order of priority: system router ID, BGP public network router ID, and BGP VPN instance router ID.

When BGP uses the router ID of the RM module by default and all public IP addresses are deleted, running the reset command changes the BGP router ID to 0.0.0.0. As a result, the BGP peer relationship cannot be established.

Example

# Configure a Router ID for the Device.
<HUAWEI> system-view
[~HUAWEI] bgp 100
[*HUAWEI-bgp] router-id 10.1.1.1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >