The ipv4-family vpn-instance command enables the BGP-VPN instance address family and displays the address family view.
The undo ipv4-family vpn-instance command deletes the configurations in the BGP-VPN instance address family.
By default, the BGP-IPv4 unicast address family view is displayed.
Parameter | Description | Value |
---|---|---|
vpn-instance-name |
Associates a specified VPN instance with the BGP-IPv4 address family. You can enter the BGP-VPN instance address family view using the parameter. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string. |
Usage Scenario
Before performing BGP configurations in a BGP-VPN instance address family, you need to run the ipv4-family vpn-instance command in the BGP view to enable the BGP-VPN instance address family and enter the address family view. The configuration in this view takes effect for the IPv4 unicast routes and peers in the specified VPN instance.
Precautions
After the YANG management mode is enabled for a BGP VPN instance using the bgpyang-mode enable command, a VPN instance must have been created using the ipv4-family vpn-instance command.
If the YANG management mode is not enabled for BGP VPN instances, the ipv4-family vpn-instance command does not depend on the creation of VPN instances.<HUAWEI> system-view [~HUAWEI] ip vpn-instance vpn1 [*HUAWEI-vpn-instance-vpn1] ipv4-family [*HUAWEI-vpn-instance-vpn1-af-ipv4] route-distinguisher 100:1 [*HUAWEI-vpn-instance-vpn1-af-ipv4] vpn-target 100:1 both [*HUAWEI-vpn-instance-vpn1-af-ipv4] quit [*HUAWEI-vpn-instance-vpn1] quit [*HUAWEI] bgp 100 [*HUAWEI-bgp] ipv4-family vpn-instance vpn1 [*HUAWEI-bgp-vpn1]