The router-id command sets the router ID for the IPv4 address family of a BGP VPN instance.
The undo router-id command deletes the router ID for the IPv4 address family of a BGP VPN instance.
By default, no router ID is set for the IPv4 address family of a BGP VPN instance, and the BGP router ID is used.
| Parameter | Description | Value |
|---|---|---|
ipv4-address |
Specifies a router ID for the IPv4 address family of a BGP VPN instance. |
The value is in dotted decimal notation. |
auto-select |
Automatically selects a router ID for the IPv4 address family of an existing BGP VPN instance. |
- |
Usage Scenario
The IPv4 address family of a BGP VPN instance can be assigned a router ID, which helps a device differentiate router IDs configured in the BGP-VPN IPv4 address family view and BGP view.
For example, two VPN instances named vrf1 and vrf2 are configured on a PE. To help the PE establish BGP sessions on interfaces that are bound to the two VPN instances, different router IDs must be configured in the BGP-VPN IPv4 address family. If these router IDs are not configured, the same BGP router ID is used, which causes the BGP sessions or peer relationships to fail to be established.
Rules for automatically selecting a router ID for a BGP VPN instance IPv4 address family are as follows:
If loopback interfaces assigned IP addresses are bound to a VPN instance with the IPv4 address family enabled, the greatest loopback IP address is selected as the router ID.
If no loopback interfaces assigned IP addresses are bound to a VPN instance with the IPv4 address family enabled, the greatest IP address among the IP addresses of other interfaces bound to the VPN instance is selected as the router ID, regardless of whether the interface is Up or Down.
Configuration Impact
If BGP sessions have been established for the IPv4 address family, changing or deleting the router ID configured for the BGP VPN instance IPv4 address family causes the BGP sessions to reset. Therefore, exercise caution before you decide to run the router-id command.
If the auto-select parameter is configured in the router-id command, the device automatically selects the greatest IP address among the IP addresses of other interfaces bound to the VPN instance as a router ID, regardless of whether the interface is Up or Down.