router-id (BGP-VPN instance view)

Use router-id to configure a router ID for a BGP VPN instance.

Use undo router-id to restore the default.

Syntax

router-id { router-id | auto-select }

undo router-id

Default

No router ID is configured for a BGP VPN instance, and the BGP VPN instance uses the router ID configured in BGP instance view. If no router ID is configured in BGP instance view, the BGP VPN instance uses the global router ID configured in system view.

Views

BGP-VPN instance view

Predefined user roles

network-admin

Parameters

router-id: Specifies a router ID in IP address format.

auto-select: Automatically selects a router ID for the BGP VPN instance.

Usage guidelines

To run BGP, a VPN instance of a BGP instance must have a router ID, which is an unsigned 32-bit integer that uniquely identifies the BGP VPN router in the AS.

If the auto-select keyword is specified, the system selects a router ID for the BGP VPN instance in the following order:

  1. The highest loopback address in the BGP VPN instance as the router ID.

  2. The highest physical interface address in the BGP VPN instance as the router ID, regardless of the interface status.

  3. 0.0.0.0 as the router ID.

If a non-zero router ID is selected for the BGP VPN instance, the router ID will not change when a more preferable router ID is available in the BGP VPN instance.

To improve availability, specify the IP address of a loopback interface as the router ID.

You can specify a different router ID for each VPN instance on a device.

If you execute this command in the same BGP-VPN instance view multiple times, the most recent configuration takes effect.

Examples

# In BGP-VPN instance view, set the router ID to 1.1.1.1.

<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] ip vpn-instance vpn1
[Sysname-bgp-default-vpn1] router-id 1.1.1.1

Related commands

router id

router-id (BGP instance view)