The router-id command configures router ID for BGP VPN instance IPv4 address family or BGP-VPN instance IPv6 address family view.
The undo router-id command deletes the router ID configured for BGP VPN instance IPv4 address family or BGP-VPN instance IPv6 address family view.
By default, no router ID is configured for BGP VPN instance IPv4 address family or BGP-VPN instance IPv6 address family view, and the BGP router ID is used as the router ID.
Parameter | Description | Value |
---|---|---|
ipv4-address | Specifies the router ID of a BGP VPN instance IPv4 address family or BGP-VPN instance IPv6 address family view. The router ID is expressed in the IPv4 address format. | It is in dotted decimal notation. |
auto-select | Configures automatic route ID selection for the current BGP VPN instance IPv4 address family or BGP-VPN instance IPv6 address family view. | - |
Usage Scenario
By configuring router ID for BGP VPN instance IPv4 address family or BGP-VPN instance IPv6 address family view, you can differentiate the configured router ID of BGP VPN instance IPv4 address family or BGP-VPN instance IPv6 address family view from the BGP router ID.
For example, if two VPN instances named vrf1 and vrf2 are configured on a PE, and a BGP session needs to be established between the interfaces bound to the two VPN instances, you need to configure different router IDs for the two VPN instance IPv4 address families. If no router ID is configured for the two VPN instance IPv4 address families, no BGP session can be established because the two VPN instance IPv4 address families have the same router ID, which is consistent with the BGP router ID.
Rules for automatically selecting a router ID for a BGP VPN instance IPv4 address family or BGP-VPN instance IPv6 address family view are as follows:
If loopback interfaces configured with IP addresses are bound to the VPN instance, the largest IP address among the IP addresses of the loopback interfaces is selected as the router ID.
If no loopback interfaces configured with IP addresses are bound to the VPN instance, the largest 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.
Precautions
If a BGP session has been established in a BGP VPN instance IPv4 address family or BGP-VPN instance IPv6 address family view, changing or deleting the configured router ID resets the BGP session. So, confirm the action before you use the router-id command.
<HUAWEI> system-view
[HUAWEI] ip vpn-instance vrf1
[HUAWEI-vpn-instance-vrf1] route-distinguisher 100:1
[HUAWEI-vpn-instance-vrf1-af-ipv4] quit
[HUAWEI-vpn-instance-vrf1] quit
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family vpn-instance vrf1
[HUAWEI-bgp-vrf1] router-id 192.168.100.1