The router-id command specifies the ID for the router. The router ID must be unique for each router in an AS.
The undo router-id command deletes the specified router ID.
By default, no BGP router ID is configured, and the router ID configured for the RM through the router id command is used.
router-id { ipv4-address | vpn-instance auto-select }
undo router-id [ vpn-instance auto-select ]
| Parameter | Description | Value |
|---|---|---|
| ipv4-address | Specifies the router ID. It is expressed in the IPv4 address format. | It is in dotted decimal notation. |
| vpn-instance auto-select | Configures automatic router ID selection for all BGP VPN instance IPv4 address families. If a router ID has been configured for a specific BGP VPN instance IPv4 address family, this configured router ID takes precedence over the automatically selected router ID. |
- |
Usage Scenario
In BGP, you can run the router-id command to configure a router ID for the router. Each router ID uniquely identifies a BGP router in an AS.
By configuring automatic router ID selection for BGP VPN instance IPv4 address families, you can differentiate the configured router IDs of BGP VPN instance IPv4 address families from the BGP router ID.
By default, the router ID in the RM module is 0.0.0.0 when the router is not configured with any interface.
Prerequisites
The bgp command is run to enable BGP.
Configuration Impact
Changing or deleting a configured router ID in the BGP view resets all the sessions in the BGP view and sub-address families. If a BGP session has been established in a BGP VPN instance IPv4 address family, deleting the configured router ID resets a BGP session. Therefore, exercise caution when running this command.
# Specify the router ID.
<sysname> system-view
[sysname] bgp 100
[sysname-bgp] router-id 1.1.1.1
Warning: Changing the parameter in this command resets the peer session. Continue?[Y/N]y
# Configure automatic router ID selection for all BGP VPN instance IPv4 address families.
<sysname> system-view
[sysname] bgp 100
[sysname-bgp] router-id vpn-instance auto-select