The vpn-target command configures a multicast virtual private network (MVPN) target for the VPN instance MVPN address family.
The undo vpn-target command deletes the MVPN target of the VPN instance MVPN address family.
By default, no MVPN target is configured for the VPN instance MVPN address family. The VPN instance MVPN address family uses the VPN target configured in the VPN instance IPv4 address family view as the MVPN target.
Parameter | Description | Value |
---|---|---|
vrfRT |
Specifies the MVPN target to be added to the import or export VPN target extended community list of the VPN instance MVPN address family. |
The available MVPN target formats are as follows:
|
vrfRTType |
vrfRT type. |
The parameters are as follows:
import and export VPN target extended community lists of the VPN instance MVPN address family.
|
all |
Deletes all MVPN targets. |
- |
Usage Scenario
The MVPN target controls route learning between MVPN sites. An MVPN target can be an import or export MVPN target. An export MVPN target is contained in an MVPN route to be advertised to a remote Multiprotocol Border Gateway Protocol (MP-BGP) peer. After receiving an MVPN route, an MP-BGP peer compares the received export MVPN target with the local import MVPN target to determine whether the MVPN route can be added to the MVPN routing table of the local VPN instance.
Configuration Impact
After an MVPN target is configured for the VPN instance MVPN address family, the VPN instance MVPN address family accepts only the MVPN routes that match the MVPN target. When MVPN routes are advertised between VPN instances, if one of the MVPN targets carried in the MVPN routes matches the import VPN target of the local VPN instance MVPN address family, the routes will be added to the MVPN routing table of the local VPN instance.
If all MVPN targets of the VPN instance MVPN address family are deleted using the undo vpn-target command, all routes learned by the VPN instance MVPN address family from other VPN instances will be deleted.Precautions
An MVPN target configured using the vpn-target command will not overwrite any previously configured MVPN target. If the number of configured MVPN targets has reached the maximum limit, no additional MVPN target can be added.
Multiple MVPN targets can be configured for the VPN instance MVPN address family. One vpn-target command instance can configure a maximum of eight MVPN targets. To configure more MVPN targets for the VPN instance MVPN address family, run the vpn-target command several times.<HUAWEI> system-view [~HUAWEI] multicast mvpn 2.2.2.2 [*HUAWEI] ip vpn-instance mcast1 [*HUAWEI-vpn-instance-mcast1] ipv4-family [*HUAWEI-vpn-instance-mcast1-af-ipv4] route-distinguisher 100:100 [*HUAWEI-vpn-instance-mcast1-af-ipv4] multicast routing-enable [*HUAWEI-vpn-instance-mcast1-af-ipv4] mvpn [*HUAWEI-vpn-instance-mcast1-af-ipv4-mvpn] vpn-target 3:3 4:4 export-extcommunity [*HUAWEI-vpn-instance-mcast1-af-ipv4-mvpn] vpn-target 192.168.1.1:1 10:1 65537:3 3.3:3 import-extcommunity <HUAWEI> system-view [~HUAWEI] multicast mvpn 2.2.2.2 [*HUAWEI] ip vpn-instance mcast1 [*HUAWEI-vpn-instance-mcast1] ipv4-family [*HUAWEI-vpn-instance-mcast1-af-ipv4] route-distinguisher 100:100 [*HUAWEI-vpn-instance-mcast1-af-ipv4] multicast routing-enable [*HUAWEI-vpn-instance-mcast1-af-ipv4] mvpn [*HUAWEI-vpn-instance-mcast1-af-ipv4-mvpn] vpn-target 1:1 2:2 3:3 4:4 5:5 6:6 7:7 8:8 both [*HUAWEI-vpn-instance-mcast1-af-ipv4-mvpn] vpn-target 13:2 2:14 192.168.1.1:24 export-extcommunity [*HUAWEI-vpn-instance-mcast1-af-ipv4-mvpn] vpn-target 45:3 9.9:81 10.1.1.2:65001 import-extcommunity