route-target
Syntax
route-target [import | export | both] no route-target [import | export | both]
Description
边界网关协议路由目标是扩展边界网关协议tha社区t 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.
Theno
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.
-
-
Specifies an AS number and an arbitrary number for the RT value.
Authority
Administrators or local user group members with execution rights for this command.
Examples
Configures the route-target for export. Removes the configuration for export.
switch(config-vrf-ipv4-af-uc)#route-target export 100:1switch(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:2switch(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:3switch(config-vrf-ipv4-af-uc)#no route-target both 100:3