Table Of Contents
Prerequisites for the Per VRF Label Feature
Restrictions for the Per VRF Label Feature
Information About the Per VRF Label Feature
How to Configure the Per VRF Label Feature
Configuring the Per VRF Label Feature
Configuration Examples for the Per VRF Label feature
Mixed Mode (with Global Per-Prefix): Example
Mixed Mode (with Global Per-VRF): Example
Feature Information for MPLS VPN—Per VRF Label
MPLS VPN—Per VRF Label
First Published: February 27, 2006The MPLS VPN—Per VRF Label feature (hereafter, in this document, referred to as the Per VRF Label feature or the Per VRF feature) allows you to configure a single virtual private network (VPN) label for all local routes in the entire VPN routing and forwarding (VRF) domain on supported routers. Prior to this Cisco IOS Release 12.4(6)T, a VPN label allocation was required for each VPN prefix. This new feature incorporates a single (per VRF) VPN label that includes all local routes in the VRF table.
You can enable (or disable) the MPLS VPN—Per VRF Label feature at the router global configuration level by using a new, hidden, CLI command.
History for the MPLS VPN—Per VRF Label Feature
Finding Support Information for Platforms and Cisco IOS Software Images
Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn. You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.
Contents
This document includes the following topics:
•
Prerequisites for the Per VRF Label Feature
•
Restrictions for the Per VRF Label Feature
•
Information About the Per VRF Label Feature
•
How to Configure the Per VRF Label Feature
•
Configuration Examples for the Per VRF Label feature
•
Feature Information for MPLS VPN—Per VRF Label
Prerequisites for the Per VRF Label Feature
•
If your VRF domain has the external/internal Border Gateway Protocol (EIBGP) multipath feature or the Carrier Supporting Carrier (CSC) feature enabled, disable those features before you configure the Per VRF Label feature.
•
Before configuring Multiprotocol Label Switching (MPLS) Layer 3 VPNs, you must have MPLS, Label Distribution Protocol (LDP), and Cisco Express Forwarding (CEF) installed in your network. All routers in the core, including the Provider Edge (PE) routers, must be able to support CEF and MPLS forwarding.
Restrictions for the Per VRF Label Feature
•
Enabling the Per VRF Label feature causes BGP reconvergence, which can result in data loss for traffic coming from the MPLS VPN core.
![]()
Note
You can minimize network disruption by enabling this feature during a scheduled MPLS maintenance window. Also, if possible, avoid enabling this feature on a live router.
•
Per-prefix MPLS counters for VPN prefixes are lost when you enable the Per VRF Label feature.
•
You cannot use this feature with CSC and EIBGP multipath features.
•
When you configure the Per VRF Label feature, the system displays the following message:
% This command is an unreleased and unsupported featureThis is normal and does not affect the operation of the feature. This feature is supported through the Technical Assistance Center (TAC) for authorized customers.
Information About the Per VRF Label Feature
Prior to this Cisco IOS Release 12.4(6)T, Cisco IOS routers advertised a Per Prefix label for all local routes (the default setting).
The PE stores both local and remote routes and includes a label entry for each route. For distributed platforms, the per-prefix labels consume memory. When there are many VRFs and routes, the amount of memory that the per-prefix labels consume can become an issue.
This new Per VRF Label feature allows the advertisement of a single VPN label for local routes throughout the entire VRF. The router uses a new VPN label for the VRF decoding and IP-based lookup to learn where to forward packets for the PE or CE interfaces.
The following conditions apply when you configure the Per VRF Label feature:
•
The VRF uses one label for all local routes.
•
When you enable the Per VRF Label feature, a new Per VRF label is created and all local routes will experience some data loss.
•
When you disable the Per VRF Label feature, the configuration reverts to the default configuration (Per prefix label).
How to Configure the Per VRF Label Feature
This section describes the following required task:
•
Configuring the Per VRF Label Feature
Configuring the Per VRF Label Feature
To configure the Per VRF Label feature, perform the following task.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
mpls label mode {vrf vrf-name | all-vrfs} protocol bgp-vpnv4 {per-prefix | per-vrf}
4.
end
5.
show ip vrf detail
DETAILED STEPS
Examples
The following command example shows how to verify the Per VRF Label configuration:
In this example output, the bold text indicates the label modes:
Router# show ip vrf detailVRF vpn1; default RD 1:1; default VPNID <not set>VRF Table ID = 1Interfaces:Ethernet0/0 Serial5/0 Loopback1Connected addresses are not in global routing tableExport VPN route-target communitiesRT:1:1Import VPN route-target communitiesRT:1:1No import route-mapNo export route-mapVRF label distribution protocol: not configuredVRF label allocation mode: per-vrf (Label 33)VRF vpn2; default RD 2:1; default VPNID <not set>VRF Table ID = 2Interfaces:Ethernet2/0 Loopback2Connected addresses are not in global routing tableExport VPN route-target communitiesRT:2:1Import VPN route-target communitiesRT:2:1No import route-mapNo export route-mapVRF label distribution protocol: not configuredVRF label allocation mode: per-vrf (Label 20)VRF vpn3; default RD 3:1; default VPNID <not set>VRF Table ID = 3Interfaces:Ethernet3/0 Loopback3Connected addresses are not in global routing tableExport VPN route-target communitiesRT:3:1Import VPN route-target communitiesRT:3:1No import route-mapNo export route-mapVRF label distribution protocol: not configuredVRF label allocation mode: per-vrf (Label 19)Router# show ip bgp vpnv4 all labelsNetwork Next Hop In label/Out labelRoute Distinguisher: 1:1 (vpn1)127.0.0.1/32 192.168.1.1 per-VRF:33/nolabel127.0.0.5/32 127.0.0.4 nolabel/19192.168.1.0/24 0.0.0.0 per-VRF:33/aggregate(vpn1)192.168.1.1 per-VRF:33/nolabel192.168.4.0/24 127.0.0.4 nolabel/20172.16.0.0/16 0.0.0.0 per-VRF:33/aggregate(vpn1)172.16.128.0/32 192.168.1.1 per-VRF:33/nolabelRoute Distinguisher: 2:1 (vpn2)127.0.2.2/32 0.0.0.0 per-VRF:20/aggregate(vpn2)127.0.0.6/32 192.168.5.1 per-VRF:20/nolabel192.168.5.0/24 0.0.0.0 per-VRF:20/aggregate(vpn2)172.17.128.0/32 192.168.5.1 per-VRF:20/nolabelRoute Distinguisher: 3:1 (vpn3)127.0.3.2/32 0.0.0.0 per-VRF:19/aggregate(vpn3)127.0.0.8/32 192.168.7.1 per-VRF:19/nolabel192.168.7.0/24 0.0.0.0 per-VRF:19/aggregate(vpn3)172.16.128.0/32 192.168.7.1 per-VRF:19/nolabelRouter# show mpls forwarding-tableLocal Outgoing Prefix Bytes tag Outgoing Next Hoptag tag or VC or Tunnel Id switched interface16 Pop tag 192.168.3.0/24 0 Et1/0 192.168.2.317 Pop tag 127.0.0.3/32 0 Et1/0 192.168.2.318 17 127.0.0.4/32 0 Et1/0 192.168.2.319 Aggregate vrf:vpn3 020 Aggregate vrf:vpn2 033 Aggregate vrf:vpn1 0Router#Configuration Examples for the Per VRF Label feature
This section shows examples for three different configurations:
•
Mixed Mode (with Global Per-Prefix): Example
•
Mixed Mode (with Global Per-VRF): Example
No Label Mode: Example
The following example shows the default label mode configuration (no label mode).
In this example output, the bold text indicates the label modes:
Router# show ip vrf detailVRF vpn1; default RD 1:1; default VPNID <not set>VRF Table ID = 1Interfaces:Ethernet0/0 Serial5/0 Loopback1Connected addresses are not in global routing tableExport VPN route-target communitiesRT:1:1Import VPN route-target communitiesRT:1:1No import route-mapNo export route-mapVRF label distribution protocol: not configuredVRF label allocation mode: per-prefixVRF vpn2; default RD 2:1; default VPNID <not set>VRF Table ID = 2Interfaces:Ethernet2/0 Loopback2Connected addresses are not in global routing tableExport VPN route-target communitiesRT:2:1Import VPN route-target communitiesRT:2:1No import route-mapNo export route-mapVRF label distribution protocol: not configuredVRF label allocation mode: per-prefixVRF vpn3; default RD 3:1; default VPNID <not set>VRF Table ID = 3Interfaces:Ethernet3/0 Loopback3Connected addresses are not in global routing tableExport VPN route-target communitiesRT:3:1Import VPN route-target communitiesRT:3:1No import route-mapNo export route-mapVRF label distribution protocol: not configuredVRF label allocation mode: per-prefixRouter# show ip bgp vpnv4 all labelsNetwork Next Hop In label/Out labelRoute Distinguisher: 1:1 (vpn1)127.0.0.1/32 192.168.1.1 19/nolabel127.0.0.5/32 127.0.0.4 nolabel/19192.168.1.0/24 192.168.1.1 20/nolabel0.0.0.0 20/aggregate(vpn1)192.168.4.0/24 127.0.0.4 nolabel/20172.16.0.0/16 0.0.0.0 32/aggregate(vpn1)172.16.128.0/32 192.168.1.1 22/nolabelRoute Distinguisher: 2:1 (vpn2)127.0.2.2/32 0.0.0.0 23/aggregate(vpn2)127.0.0.6/32 192.168.5.1 24/nolabel192.168.5.0/24 0.0.0.0 25/aggregate(vpn2)172.17.128.0/32 192.168.5.1 26/nolabelRoute Distinguisher: 3:1 (vpn3)127.0.3.2/32 0.0.0.0 27/aggregate(vpn3)127.0.0.8/32 192.168.7.1 28/nolabel192.168.7.0/24 0.0.0.0 29/aggregate(vpn3)172.16.128.0/32 192.168.7.1 30/nolabelRouter# show mpls forwarding-tableLocal Outgoing Prefix Bytes tag Outgoing Next Hoptag tag or VC or Tunnel Id switched interface16 Pop tag 192.168.3.0/24 0 Et1/0 192.168.2.317 Pop tag 127.0.0.3/32 0 Et1/0 192.168.2.318 17 127.0.0.4/32 0 Et1/0 192.168.2.319 Untagged 127.0.0.1/32[V] 0 Et0/0 192.168.1.120 Aggregate 192.168.1.0/24[V] 022 Untagged 172.16.128.0/32[V]0 Et0/0 192.168.1.123 Aggregate 127.0.2.2/32[V] 024 Untagged 127.0.0.6/32[V] 0 Et2/0 192.168.5.125 Aggregate 192.168.5.0/24[V] 026 Untagged 172.17.128.0/32[V]0 Et2/0 192.168.5.127 Aggregate 127.0.3.2/32[V] 028 Untagged 127.0.0.8/32[V] 0 Et3/0 192.168.7.129 Aggregate 192.168.7.0/24[V] 030 Untagged 172.16.128.0/32[V]0 Et3/0 192.168.7.132 Aggregate 172.16.0.0/16[V] 0Router#Mixed Mode (with Global Per-Prefix): Example
For this example, the following commands set VPN 1 for per-vrf label mode, VPN 2 for per-prefix label mode, and all remaining VPNs for per-prefix (globally).
In this example output, the bold text indicates the label modes:
Router# mpls label mode vrf vpn1 protocol bgp-vpnv4 per-vrfRouter# mpls label mode vrf vpn2 protocol bgp-vpnv4 per-prefixUse the following show commands to display the label mode settings:
Router# show ip vrf detailVRF vpn1; default RD 1:1; default VPNID <not set>VRF Table ID = 1Interfaces:Ethernet0/0 Serial5/0 Loopback1Connected addresses are not in global routing tableExport VPN route-target communitiesRT:1:1Import VPN route-target communitiesRT:1:1No import route-mapNo export route-mapVRF label distribution protocol: not configuredVRF label allocation mode: per-vrf (Label 33)VRF vpn2; default RD 2:1; default VPNID <not set>VRF Table ID = 2Interfaces:Ethernet2/0 Loopback2Connected addresses are not in global routing tableExport VPN route-target communitiesRT:2:1Import VPN route-target communitiesRT:2:1No import route-mapNo export route-mapVRF label distribution protocol: not configuredVRF label allocation mode: per-prefixVRF vpn3; default RD 3:1; default VPNID <not set>VRF Table ID = 3Interfaces:Ethernet3/0 Loopback3Connected addresses are not in global routing tableExport VPN route-target communitiesRT:3:1Import VPN route-target communitiesRT:3:1No import route-mapNo export route-mapVRF label distribution protocol: not configuredVRF label allocation mode: per-prefixRouter# show ip bgp vpnv4 all labelNetwork Next Hop In label/Out labelRoute Distinguisher: 1:1 (vpn1)127.0.0.1/32 192.168.1.1 per-VRF:33/nolabel127.0.0.5/32 127.0.0.4 nolabel/19192.168.1.0/24 0.0.0.0 per-VRF:33/aggregate(vpn1)192.168.1.1 per-VRF:33/nolabel192.168.4.0/24 127.0.0.4 nolabel/20172.16.0.0/16 0.0.0.0 per-VRF:33/aggregate(vpn1)172.16.128.0/32 192.168.1.1 per-VRF:33/nolabelRoute Distinguisher: 2:1 (vpn2)127.0.2.2/32 0.0.0.0 23/aggregate(vpn2)127.0.0.6/32 192.168.5.1 24/nolabel192.168.5.0/24 0.0.0.0 25/aggregate(vpn2)172.17.128.0/32 192.168.5.1 26/nolabelRoute Distinguisher: 3:1 (vpn3)127.0.3.2/32 0.0.0.0 27/aggregate(vpn3)127.0.0.8/32 192.168.7.1 28/nolabel192.168.7.0/24 0.0.0.0 29/aggregate(vpn3)172.16.128.0/32 192.168.7.1 30/nolabelRouter# show mpls forwarding-tableLocal Outgoing Prefix Bytes tag Outgoing Next Hoptag tag or VC or Tunnel Id switched interface16 Pop tag 192.168.3.0/24 0 Et1/0 192.168.2.317 Pop tag 127.0.0.3/32 0 Et1/0 192.168.2.318 17 127.0.0.4/32 0 Et1/0 192.168.2.323 Aggregate 127.0.2.2/32[V] 024 Untagged 127.0.0.6/32[V] 0 Et2/0 192.168.5.125 Aggregate 192.168.5.0/24[V] 026 Untagged 172.17.128.0/32[V]0 Et2/0 192.168.5.127 Aggregate 127.0.3.2/32[V] 028 Untagged 127.0.0.8/32[V] 0 Et3/0 192.168.7.129 Aggregate 192.168.7.0/24[V] 030 Untagged 172.16.128.0/32[V]0 Et3/0 192.168.7.133 Aggregate vrf:vpn1 0Router#Mixed Mode (with Global Per-VRF): Example
For this example, the following commands set VPN 1 for per-vrf label mode, VPN 2 for per-prefix label mode, and all remaining VPNs for per-vrf (globally).
In this example output, the bold text indicates the label modes:
Router# mpls label mode vrf vpn1 protocol bgp-vpnv4 per-vrfRouter# mpls label mode vrf vpn2 protocol bgp-vpnv4 per-prefixRouter# mpls label mode all-vrfs protocol bgp-vpnv4 per-vrfRouter# show ip vrf detailVRF vpn1; default RD 1:1; default VPNID <not set>VRF Table ID = 1Interfaces:Ethernet0/0 Serial5/0 Loopback1Connected addresses are not in global routing tableExport VPN route-target communitiesRT:1:1Import VPN route-target communitiesRT:1:1No import route-mapNo export route-mapVRF label distribution protocol: not configuredVRF label allocation mode: per-vrf (Label 33)VRF vpn2; default RD 2:1; default VPNID <not set>VRF Table ID = 2Interfaces:Ethernet2/0 Loopback2Connected addresses are not in global routing tableExport VPN route-target communitiesRT:2:1Import VPN route-target communitiesRT:2:1No import route-mapNo export route-mapVRF label distribution protocol: not configuredVRF label allocation mode: per-prefixVRF vpn3; default RD 3:1; default VPNID <not set>VRF Table ID = 3Interfaces:Ethernet3/0 Loopback3Connected addresses are not in global routing tableExport VPN route-target communitiesRT:3:1Import VPN route-target communitiesRT:3:1No import route-mapNo export route-mapVRF label distribution protocol: not configuredVRF label allocation mode: per-vrf (Label 19)Router# show ip bgp vpnv4 all labelNetwork Next Hop In label/Out labelRoute Distinguisher: 1:1 (vpn1)127.0.0.1/32 192.168.1.1 per-VRF:33/nolabel127.0.0.5/32 127.0.0.4 nolabel/19192.168.1.0/24 0.0.0.0 per-VRF:33/aggregate(vpn1)192.168.1.1 per-VRF:33/nolabel192.168.4.0/24 127.0.0.4 nolabel/20172.16.0.0/16 0.0.0.0 per-VRF:33/aggregate(vpn1)172.16.128.0/32 192.168.1.1 per-VRF:33/nolabelRoute Distinguisher: 2:1 (vpn2)127.0.2.2/32 0.0.0.0 23/aggregate(vpn2)127.0.0.6/32 192.168.5.1 24/nolabel192.168.5.0/24 0.0.0.0 25/aggregate(vpn2)172.17.128.0/32 192.168.5.1 26/nolabelRoute Distinguisher: 3:1 (vpn3)127.0.3.2/32 0.0.0.0 per-VRF:19/aggregate(vpn3)127.0.0.8/32 192.168.7.1 per-VRF:19/nolabel192.168.7.0/24 0.0.0.0 per-VRF:19/aggregate(vpn3)172.16.128.0/32 192.168.7.1 per-VRF:19/nolabelRouter# show mpls forwarding-tableLocal Outgoing Prefix Bytes tag Outgoing Next Hoptag tag or VC or Tunnel Id switched interface16 Pop tag 192.168.3.0/24 0 Et1/0 192.168.2.317 Pop tag 127.0.0.3/32 0 Et1/0 192.168.2.318 17 127.0.0.4/32 0 Et1/0 192.168.2.319 Aggregate vrf:vpn3 023 Aggregate 127.0.2.2/32[V] 024 Untagged 127.0.0.6/32[V] 0 Et2/0 192.168.5.125 Aggregate 192.168.5.0/24[V] 026 Untagged 172.17.128.0/32[V]0 Et2/0 192.168.5.133 Aggregate vrf:vpn1 0Router#Additional References
The following sections provide references related to the Per VRF Label feature.
Related Documents
Related Topic Document TitleMPLS VPNs
Cisco IOS Multiprotocol Label Switching Configuration Guide, Release 12.4
Part 4: MPLS Virtual Private Networks
Standards
Standard TitleNo new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.
—
MIBs
RFCs
Technical Assistance
Command Reference
This section documents new and modified commands only.
debug ip bgp vpnv4 unicast
To display debugging messages for Virtual Private Network version 4 (VPNv4) unicast routes, use the debug ip bgp vpnv4 unicast command in privileged EXEC mode. To disable debugging output, use the no form of this command.
debug ip bgp vpnv4 unicast {checkpoint | csc | import | keepalives | labelmode | nsf}
no debug ip bgp vpnv4 unicast {checkpoint | csc | import | keepalives | labelmode | nsf}
Syntax Description
Command Default
Debugging of VPNv4 unicast routes is not enabled.
Command Modes
Privileged EXEC
Command History
Examples
The following example enables debugging of MPLS VPN label mode processing:
Router# debug ip bgp vpnv4 unicast labelmodeMPLS VPN Label mode processing debugging is onRouter# config terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)# mpls label mode all-vrfs protocol bgp-vpnv4 per-vrf% This command is an unreleased and unsupported featureRouter(config)#*Feb 17 13:45:27.727: vpn: changing the label mode (Enable: per-vrf) for all-vrfs*Feb 17 13:45:28.355: vpn: pervrf, free local label 19, remove mpls forw entry for vpn1:127.0.0.1/255.255.255.255*Feb 17 13:45:28.355: vpn: create per-vrf mpls forw entry for vrf vpn1, label 33*Feb 17 13:45:28.355: TFIB AGGR Label: add aggregate label 33 for vrf vpn1*Feb 17 13:45:28.355: vpn: set pervrf label 33 for vpn1:127.0.0.1/255.255.255.255*Feb 17 13:45:28.355: vpn: pervrf, free local label 20, remove mpls forw entry for vpn1:192.168.1.0/255.255.255.0*Feb 17 13:45:28.355: vpn: set pervrf label 33 for vpn1:192.168.1.0/255.255.255.0*Feb 17 13:45:28.355: vpn: pervrf, free local label 32, remove mpls forw entry for vpn1:172.16.0.0/255.255.0.0*Feb 17 13:45:28.355: vpn: set pervrf label 33 for vpn1:172.16.0.0/255.255.0.0.......*Feb 17 13:45:28.355: vpn: set pervrf label 20 for vpn3:172.16.128.0/255.255.255.255*Feb 17 13:45:28.355: vpn: label mode change, bnet walk complete.*Feb 17 13:45:28.355: BGP: VPNv4 Unicast label mode changed^ZRouter#*Feb 17 13:45:38.455: %SYS-5-CONFIG_I: Configured from console by consoleRouter# show debugTag VPN:MPLS VPN Label mode processing debugging is onRouter#Related Commands
mpls label mode
To configure the Per VRF Labels, use the mpls label mode command in global configuration mode. To disable the Per VRF Label feature, use the no form of this command.
mpls label mode {vrf vrf-name | all-vrfs} protocol bgp-vpnv4 {per-prefix | per-vrf}
no mpls label mode {vrf vrf-name | all-vrfs} protocol bgp-vpnv4 {per-prefix | per-vrf}
Syntax Description
Command Default
Per-prefix label mode is the default for all local routes.
Command Modes
Global configuration
Command History
Usage Guidelines
When you configure the Per VRF Label feature, you will receive the following system message:
% This command is an unreleased and unsupported featureThis is normal and does not affect the operation of the feature. This feature is supported through the Technical Assistance Center (TAC) for authorized customers.
Examples
The following command example configures all VRFs to per-vrf mode:
Router(config)# mpls label mode all-vrfs protocol bgp-vpnv4 per-vrf
Related Commands
Command Descriptiondebug ip bgp vpnv4 unicast
Displays debugging messages for VPNv4 unicast routes.
show ip vrf detail
Displays the assigned label mode for the VRF.
Feature Information for MPLS VPN—Per VRF Label
Table 1 lists the release history for this feature.
Not all commands may be available in your Cisco IOS software release. For release information about a specific command, see the command reference documentation.
Cisco IOS software images are specific to a Cisco IOS software release, a feature set, and a platform. Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn. You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.
![]()
Note
Table 1 lists only the Cisco IOS software release that introduced support for a given feature in a given Cisco IOS software release train. Unless noted otherwise, subsequent releases of that Cisco IOS software release train also support that feature.
Table 1 Feature Information for <Phrase Based on Module Title>
Feature Name Releases Feature InformationMPLS VPN—Per VRF Label
12.4(6)T
The MPLS VPN—Per VRF Label feature allows you to configure a single virtual private network (VPN) label for all local routes in the entire VPN routing and forwarding (VRF) domain on supported routers.
In 12.4(6)T, this feature was introduced.
The following sections provide information about this feature:
•
Prerequisites for the Per VRF Label Feature
•
Restrictions for the Per VRF Label Feature
•
Information About the Per VRF Label Feature
•
How to Configure the Per VRF Label Feature
•
Configuration Examples for the Per VRF Label feature
![]()
Any Internet Protocol (IP) addresses used in this document are not intended to be actual addresses. Any examples, command display output, and figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses in illustrative content is unintentional and coincidental.
© 2006 Cisco Systems, Inc. All rights reserved.