No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Command Reference

CloudEngine 8800, 7800, 6800, and 5800 V200R002C50

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
vpn-target

vpn-target

Function

The vpn-target command configures the export or import VPN target extended community attribute for the VPN instance address family.

The undo vpn-target command deletes the setting.

By default, no export or import VPN target extended community list is configured for the VPN instance address family.

NOTE:

CE6810LI series do not support this command.

Format

vpn-target vpn-target &<1-8> [ both | export-extcommunity | import-extcommunity ] [ evpn ]

undo vpn-target { all | vpn-target &<1-8> [ both | export-extcommunity | import-extcommunity ] [ evpn ] }

Parameters

Parameter Description Value
vpn-target Specifies the VPN target extended community attribute to be added to the VPN target extended community list of the VPN instance address family. The forms of VPN targets are as follows:
  • 2-byte AS number: 4-byte user-defined number, for example, 1:3. The AS number ranges from 0 to 65535. The user-defined number ranges from 0 to 4294967295. The AS number and the user-defined number cannot both be 0. That is, a VPN target cannot be 0:0.

  • IPv4-address: 2-byte user-defined number, for example, 192.168.122.15:1. The IP address ranges from 0.0.0.0 to 255.255.255.255. The user-defined number ranges from 0 to 65535.

  • Integral 4-byte AS number:2-byte user-defined number, for example, 65537:3. An AS number ranges from 65536 to 4294967295. A user-defined number ranges from 0 to 65535. The AS number and user-defined number cannot be both 0s. That is, a VPN target cannot be 0:0.

  • 4-byte AS number in dotted notation:2-byte user-defined number, for example, 0.0:3 or 0.1:0. A 4-byte AS number in dotted notation is in the format of x.y, where x and y are integers that range from 0 to 65535 and from 0 to 65535, respectively. A user-defined number ranges from 0 to 65535. The AS number and user-defined number cannot be both 0s. That is, a VPN target cannot be 0.0:0.

-
both Adds the VPN target extended community attribute to the export and import VPN target extended community lists of the VPN instance address family. If none of both, export-extcommunity, or import-extcommunity is specified, both is adopted by default. -
export-extcommunity Adds the VPN target extended community attribute to the export VPN target extended community lists of the VPN instance address family. -
import-extcommunity Adds the VPN target extended community attribute to the import VPN target extended community lists of the VPN instance address family. -
evpn Specifies a VPN target for routes to be installed into the routing table of an EVPN instance.
NOTE:

Only the CE8860EI, CE8850EI, CE7855EI, CE7850EI, CE6860EI, CE6856HI, CE6855HI, CE6851HI, CE6850HI, and CE6850U-HI support evpn parameter.

-
all Delete all the VPN targets of the VPN instance IPv4 address family. -

Views

VPN instance view, VPN instance IPv4 address family view, VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If a VPN instance is configured on a PE, the vpn-target command must be used to configure a VPN target for the IPv4 or IPv6 address family of the VPN instance.

The VPN target controls route learning between VPN sites. A VPN target may be either an import VPN target or an export VPN target. An export VPN target is contained in a VPNv4 or IPv6 route to be advertised to a remote MP-BGP peer. After receiving a VPNv4 or IPv6 route, an MP-BGP peer compares the received export VPN target with the local import VPN target to determine whether the VPNv4 or IPv6 route can be added to the routing table of the local VPN instance enabled with the IPv4 or IPv6 address family.

After evpn is configured, routes of a VPN instance can be installed into the routing table of the EVPN instance with a matching VPN target.

Prerequisites

The route-distinguisher command has been executed to set the RD of the VPN instance.

evpn can be specified only after the evpn-overlay enable command is run.

Precautions

A VPN target configured using the vpn-target command will not overwrite any previously configured VPN target. If the number of configured VPN targets has reached the maximum limit, no VPN target can be added by using the vpn-target command.

After a VPN target is configured for the IPv4 or IPv6 address family of a VPN instance, only the routes that match the VPN target will be accepted by the IPv4 or IPv6 address family of the VPN instance.

If all the VPN targets of the IPv4 or IPv6 address family of a VPN instance are deleted using the undo vpn-target command, all routes learned by the IPv4 address family of the VPN instance from other VPN instances will be deleted.

Multiple VPN targets can be configured for the IPv4 or IPv6 address family of a VPN instance. One vpn-target command can configure a maximum of eight VPN targets at a time. If you want to configure more VPN targets in the VPN instance IPv4 or IPv6 address family view, run the vpn-target command multiple times. When VPN routes are advertised between VPN instances, if one of the VPN targets carried in the VPNv4 or IPv6 routes matches the import VPN target of the IPv4 or IPv6 address family of a local VPN instance, the routes will be added to the routing table of the local VPN instance.

Example

# Add 3:3 to the export VPN target extended community list and 4:4 to the import VPN target extended community list of the VPN instance named vrf1.

<HUAWEI> system-view
[~HUAWEI] ip vpn-instance vrf1
[*HUAWEI-vpn-instance-vrf1] ipv4-family
[*HUAWEI-vpn-instance-vrf1-af-ipv4] route-distinguisher 100:1
[*HUAWEI-vpn-instance-vrf1-af-ipv4] vpn-target 3:3 export-extcommunity
[*HUAWEI-vpn-instance-vrf1-af-ipv4] vpn-target 4:4 import-extcommunity
Translation
Download
Updated: 2019-03-21

Document ID: EDOC1000166501

Views: 43487

Downloads: 330

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next