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

route-target

BGP extended-community attributes to identify ipv4 unicast routes of the VRF.

import

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

export

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

both

Sets the RT for both export and import types.

asn:nn

Required - Enter 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