Prerequisites for MPLS VPN Route Target Rewrite
-
You should know how to configure Multiprotocol Label Switching (MPLS) Virtual Private Networks (VPNs).
-
You need to identify the RT replacement policy and target device for the autonomous system (AS).
Restrictions for MPLS VPN Route Target Rewrite
Route Target Rewrite can only be implemented in a single AS topology.
ip unnumbered command is not supported in MPLS configuration.
Information About MPLS VPN Route Target Rewrite
This section provides information about MPLS VPN Route Target Rewrite:
Route Target Replacement Policy
Routing policies for a peer include all configurations that may impact inbound or outbound routing table updates. The MPLS VPN Route Target Rewrite feature can influence routing table updates by allowing the replacement of route targets on inbound and outbound Border Gateway Protocol (BGP) updates. Route targets are carried as extended community attributes in BGP Virtual Private Network IP Version 4 (VPNv4) updates. Route target extended community attributes are used to identify a set of sites and VPN routing and forwarding (VRF) instances that can receive routes with a configured route target.
You can configure the MPLS VPN Route Target Rewrite feature on provider edge (PE) devices.
The figure below shows an example of route target replacement on PE devices in an Multiprotocol Label Switching (MPLS) VPN single autonomous system topology. This example includes the following configurations:
-
PE1 is configured to import and export RT 65000:1 for VRF Customer A and to rewrite all inbound VPNv4 prefixes with RT 65000:1 to RT 65000:2.
-
PE2 is configured to import and export RT 65000:2 for VRF Customer B and to rewrite all inbound VPNv4 prefixes with RT 65000:2 to RT 65000:1.
Route Maps and Route Target Replacement
The MPLS VPN Route Target Rewrite feature extends the Border Gateway Protocol (BGP) inbound/outbound route map functionality to enable route target replacement. The set extcomm-list delete command entered in route-map configuration mode allows the deletion of a route target extended community attribute based on an extended community list.
How to Configure MPLS VPN Route Target Rewrite
This section provides the configuration steps for MPLS VPN Route Target Rewrite:
Configuring a Route Target Replacement Policy
Perform this task to configure a route target (RT) replacement policy for your internetwork.
If you configure a provider edge (PE) device to rewrite RT x to RT y and the PE has a virtual routing and forwarding (VRF) instance that imports RT x , you need to configure the VRF to import RT y in addition to RT x .
Procedure
Command or Action | Purpose | |
---|---|---|
Step1 | enable Example: | Enables privileged EXEC mode.
|
Step2 | configure terminal Example: | Enters global configuration mode. |
Step3 | ip extcommunity-list {standard-list-number | expanded-list-number} {permit | deny} [regular-expression] [rt | soo extended-community-value] Example: | Creates an extended community access list and controls access to it.
The colon is used to separate the autonomous system number and network number or IP address and network number. |
Step4 | route-map map-name [permit | deny] [sequence-number] Example: | Defines the conditions for redistributing routes from one routing protocol into another or enables policy routing and enables route-map configuration mode.
If the match criteria are not met, and the permit keyword is specified, the next route map with the same map tag is tested. If a route passes none of the match criteria for the set of route maps sharing the same name, it is not redistributed by that set. The permit keyword is the default.
|
Step5 | match extcommunity {standard-list-number | expanded-list-number} Example: Example: | Matches the Border Gateway Protocol (BGP) extended community list attributes.
|
Step6 | set extcomm-list extended-community-list-number delete Example: | Removes a route target from an extended community attribute of an inbound or outbound BGP Virtual Private Network Version 4 (VPNv4) update.
|
Step7 | set extcommunity {rt extended-community-value [additive] | soo extended-community-value} Example: | Sets BGP extended community attributes.
The colon is used to separate the autonomous system number and network number or IP address and network number.
|
Step8 | end Example: | (Optional) Returns to privileged EXEC mode. |
Step9 | show route-map map-name Example: | (Optional) Verifies that the match and set entries are correct.
|
Applying the Route Target Replacement Policy
Perform the following tasks to apply the route target replacement policy to your network:
Associating Route Maps with Specific BGP Neighbors
Procedure
Command or Action | Purpose | |
---|---|---|
Step1 | enable Example: | Enables privileged EXEC mode.
|
Step2 | configure terminal Example: | Enters global configuration mode. |
Step3 | router bgp as-number Example: | Configures a Border Gateway Protocol (BGP) routing process and places the device in router configuration mode.
The range is 0 to 65535. Private autonomous system numbers that can be used in internal networks range from 64512 to 65535. |
Step4 | neighbor {ip-address | peer-group-name} remote-as as-number Example: | Adds an entry to the BGP or multiprotocol BGP neighbor table.
|
Step5 | address-family vpnv4 [unicast] Example: | Enters address family configuration mode for configuring routing sessions, such as BGP, that use standard Virtual Private Network Version 4 (VPNv4) address prefixes.
|
Step6 | neighbor {ip-address | peer-group-name} activate Example: | Enables the exchange of information with a neighboring BGP device.
|
Step7 | neighbor {ip-address | peer-group-name} send-community [both | extended | standard] Example: | Specifies that a communities attribute should be sent to a BGP neighbor.
|
Step8 | neighbor {ip-address | peer-group-name} route-map map-name {in | out} Example: | Apply a route map to incoming or outgoing routes
|
Step9 | end Example: | (Optional) Returns to privileged EXEC mode. |
Verifying the Route Target Replacement Policy
Procedure
Step1 | enable Enables privileged EXEC mode. Enter your password if prompted. Example: |
Step2 | show ip bgp vpnv4 vrf vrf-name Verifies that Virtual Private Network Version 4 (VPNv4) prefixes with a specified route target (RT) extended community attribute are replaced with the proper RT extended community attribute to verify that the provider edge (PE) devices receive the rewritten RT extended community attributes. Verify route target replacement on PE1: Example: |
Step3 | exit Returns to user EXEC mode: Example: |
Configuration Examples for MPLS VPN Route Target Rewrite
The following section provides configuration examples for MPLS VPN Route Target Rewrite:
Examples: Applying Route Target Replacement Policies
Examples: Associating Route Maps with Specific BGP Neighbor
This example shows the association of route map extmap with a Border Gateway Protocol (BGP) neighbor. The BGP inbound route map is configured to replace route targets (RTs) on incoming updates.
router bgp 1address-family vpnv4neighbor 2.2.2.2 route-map rtrewrite in
This example shows the association of the same route map with the outbound BGP neighbor. The route map is configured to replace RTs on outgoing updates.
router bgp 1address-family vpnv4neighbor 2.2.2.2 route-map rtrewrite out
Feature History for MPLS VPN Route Target Rewrite
This table provides release and related information for features explained in this module.
These features are available on all releases subsequent to the one they were introduced in, unless noted otherwise.
Release | Feature | Feature Information |
---|---|---|
Cisco IOS XE Everest 16.6.1 | MPLS VPN Route Target Rewrite | The MPLS VPN Route Target Rewrite feature can influence routing table updates by allowing the replacement of route targets on inbound and outbound Border Gateway Protocol (BGP) updates. |
Use Cisco Feature Navigator to find information about platform and software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn.