route-target

Syntax

route-target [import | export | both] <AS-NUMBER:NN>

	no route-target [import | export | both] <AS-NUMBER:NN>

Description

BGP route targets are extended BGP communities that identify the VPNv4 or VPNv6 routes that are associated with a VRF. This command specifies the route targets used on the import or export of the routes to other VRFs. Multiple route targets can be associated to a VRF.

The no form of the command removes the association.

Command context

Manager (#)

Parameters

import

Specifies the RTs imported to the VRF. Import or export or both required Literal Specifies the route-target type.

export

Specifies the RT on VPNv4 or VPNv6 prefixes that are leaked to other VRFs.

both

Specifies the RT for both export and import types.

<AS-NUMBER:NN>

Specifies an AS number and an arbitrary number for the RT value.

Authority

Administrators

Examples

Configures the route-target for export. Removes the configuration for export.

 switch(config-vrf-ipv4-af-uc)# route-target export 100:1
		 
switch(config-vrf-ipv4-af-uc)# no route-target export 100:1

Configures the route-target for import. Removes the configuration for import.

switch(config-vrf-ipv4-af-uc)# route-target import 100:2
		 
switch(config-vrf-ipv4-af-uc)# no route-target import 100:2

Configures the route-target for both import and export. Removes the configuration for import and export.

switch(config-vrf-ipv4-af-uc)# route-target both 100:3
		 
switch(config-vrf-ipv4-af-uc)# no route-target both 100:3