route-target

Use this command to identify routes that will be imported and exported by the VPN VRF.

Syntax

route-target {import | export | both} oui:num

Parameters

import Specifies that this VRF will import routes tagged with the specified route target identifier.
export Specifies that this VRF will tag routes that it exports with the specified route target identifier.
both Specifies that this VRF will import routes tagged with the specified route target and will tag routes that it exports with the specified route target identifier.
oui:number Specifies a route target identifier. The route target identifier supports two formats. Valid values are:
  • 1 - 65535:1 - 4294967295
  • valid_IPv4_Address:1 - 65535

Defaults

None.

Mode

A named VRF global configuration mode.

Usage

The route target determines which routes are inserted into a VRF. A VRF can be configured for one or more route targets for import, export, or both. At least one configured route target for import or export is a required component when defining a L3 VPN VRF. All routes exported by the VRF are tagged with each route target identifier configured for export on the VRF. Only VRFs configured to import routes tagged with the route target identifier will import the route. This allows you to configure one VRF to export multiple route targets and another VRF to be configured to import only a subset of the routes the first VRF exports.

  • An export route target – BGP advertises VPN-IPv4 and VPN-IPv6 address family prefixes, along with extended community names and tags the advertisement with the route target identifier. A redistribute rule must be created under the appropriate IPv4 or IPv6 address family in the BGP global configuration mode for each routing protocol, static, or connected route to be exported. See address-family for the BGP global configuration mode address family command details
  • An import route target – Import route targets specify that this VRF will import any BGP advertised routes that are tagged with the specified route target identifier, updating the VRF routing and forwarding tables with the advertised VPN-IPv4 or VPN-IPv6 addresses. When the VRF BGP router receives an update, it examines the extended community names for each set of prefixes. If an update matches a configured import route target for this named VRF, BGP installs the matching set of prefixes into the routing and forwarding tables as BGP learned routes, after removing the 64-bit RD.
  • Both an import and export route target – This VRF will both import routing updates that match configured import route targets and export VPN address family prefixes tagged with the specified route target(s).

Examples

This example shows how to export VPN address family prefixes and tag them with route target 1:1000:

System(su)->router vpnA
System(su-vpnA)->configure
System(su-vpnA-config)->route-target export 1:1000
System(su-vpnA-config)->

This example shows how to both import BGP VPN updates tagged with the route target 10.10.176.25:1000 and tag any BGP VPN advertisements with the route target 10.10.176.25:1000:

System(su)->router vpnA
System(su-vpnA)->configure
System(su-vpnA-config)->route-target both 10.10.176.25:1000
System(su-vpnA-config)->