The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
The MPLS Multi-VRF feature allows you to configure and maintain more than one instance of a routing and forwarding table within the same customer edge (CE) router.
Your software release may not support all the features documented in this module. For the latest feature information and caveats, see the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the Feature Information Table at the end of this document.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
The network's core and provider edge routers must be configured for MPLS Virtual Private Network (VPN) operation.
You can configure the MPLS Multi-VRF feature only on Layer 3 interfaces.
The MPLS Multi-VRF feature is not supported by Interior Gateway Routing Protocol (IGRP) nor IS-IS.
Label distribution for a given VPN routing and forwarding (VRF) instance on a given router can be handled by either Border Gateway Protocol (BGP) or Label Distribution Protocol (LDP), but not by both protocols at the same time.
Multicast cannot operate on a Layer 3 interface that is configured with the MPLS Multi-VRF feature.
Multicast cannot be configured at the same time on the same layer 3 interface as the MPLS Multi-VRF feature.
The MPLS Multi-VRF feature enables a service provider to support two or more VPNs, where the IP addresses can overlap several VPNs. The MPLS Multi-VRF feature uses input interfaces to distinguish routes for different VPNs and forms virtual packet-forwarding tables by associating one or more Layer 3 interfaces with each VRF. Interfaces in a VRF can be either physical, such as FastEthernet ports, or logical, such as VLAN Switched Virtual Interfaces (SVIs), but a Layer 3 interface cannot belong to more than one VRF at any one time. The Multi-VRF feature allows an operator to support two or more routing domains on a CE router, with each routing domain having its own set of interfaces and its own set of routing and forwarding tables. The MPLS Multi-VRF feature makes it possible to extend the Label Switched Paths (LSPs) to the CE and into each routing domain that the CE supports.
The MPLS Multi-VRF feature works as follows:
With the MPLS Multi-VRF feature, two or more customers can share one CE router, and only one physical link is used between the CE and the PE routers. The shared CE router maintains separate VRF tables for each customer and routes packets for each customer based on that customer's own routing table. The MPLS Multi-VRF feature extends limited PE router functionality to a CE router, giving it the ability, through the maintenance of separate VRF tables, to extend the privacy and security of a VPN to the branch office.
The figure below shows a configuration where each CE router acts as if it were two CE routers. Because the MPLS Multi-VRF feature is a Layer 3 feature, each interface associated with a VRF must be a Layer 3 interface.
Figure 1 | Each CE Router Acting as Several Virtual CE Routers |
Following is the packet-forwarding process in an MPLS Multi-VRF CE-enabled network, as illustrated in the figure above :
To configure Multi-VRF, you create a VRF table and then specify the Layer 3 interface associated with that VRF. Next, you configure the routing protocols within the VPN, and between the CE and the PE. BGP is the preferred routing protocol for distributing VPN routing information across the provider's backbone. For more information, see the How to Configure MPLS Multi-VRF .
The Multi-VRF network has three major components:
Consider these points when configuring the MPLS Multi-VRF feature in your network:
To configure VRFs, complete the following procedure. Be sure to configure VRFs on both the PE and the CE routers.
If a VRF has not been configured, the router has the following default configuration:
![]() Note |
Multicast cannot be configured at the same time on the same Layer 3 interface as the MPLS Multi-VRF feature. |
Most routing protocols can be used between the CE and the PE routers. However, external BGP (eBGP) is recommended, because:
When BGP is used as the routing protocol, it can also be used to handle the MPLS label exchange between the PE and CE routers. By contrast, if OSPF, EIGRP, RIP, or static routing is used, LDP must be used to signal labels.
To configure a BGP PE-to-CE routing session, perform the following steps on the CE and on the PE routers.
Command or Action | Purpose | |
---|---|---|
|
Example: Router> enable |
Enables privileged EXEC mode. |
|
Example: Router# configure terminal |
Enters global configuration mode. |
|
Example: Router(config)# router bgp 100 |
Configures the BGP routing process with the autonomous system number passed to other BGP routers, and enters router configuration mode. |
|
Example: Router(config-router)# network 10.0.0.0 mask 255.255.255.0 |
Specifies a network and mask to announce using BGP. |
|
Example: Router(config-router)# redistribute ospf 2 match internal |
Sets the router to redistribute OSPF internal routes. |
|
Example: Router(config-router)# network 10.0.0.0 255.255.255.0 area 0 |
Identifies the network address and mask on which OSPF is running, and the area ID of that network address. |
|
Example: Router(config-router)# address-family ipv4 vrf v12 |
Identifies the name of the VRF instance that will be associated with the next two commands, and enters VRF address-family mode. |
|
Example: Router(config-router-af)# neighbor 10.0.0.3 remote-as 100 |
Informs this router's BGP neighbor table of the neighbor's address (or peer group name) and the neighbor's autonomous system number. |
|
Example: Router(config-router-af)# neighbor 10.0.0.3 activate |
Activates the advertisement of the IPv4 address-family neighbors. |
If BGP is used for routing between the PE and the CE routers, configure BGP to signal the labels on the VRF interfaces of both the CE and the PE routers. You must enable signalling globally at the router configuration level and for each interface:
Command or Action | Purpose | |
---|---|---|
|
Example: Router> enable |
Enables privileged EXEC mode. |
|
Example: Router# configure terminal |
Enters global configuration mode. |
|
Example: Router(config)# router bgp 100 |
Configures the BGP routing process with the autonomous system number passed to other BGP routers and enters router configuration mode. |
|
Example: Router(config-router)# address-family ipv4 vrf v12 |
Identifies the name of the VRF instance that will be associated with the next two commands and enters address family configuration mode. |
|
Example: Router(config-router-af)# neighbor 10.0.0.3 remote-as 100 |
Enables the router to use BGP to distribute MPLS labels along with the IPv4 routes to the peer router(s). If a BGP session is running when you issue this command, the command does not take effect until the BGP session is restarted. |
|
Example: Router(config-router-af)# neighbor 10.0.0.3 activate |
Activates the advertisement of the IPv4 address-family neighbors. |
|
Example: Router(config-router-af)# end |
Returns to privileged EXEC mode. |
|
Example: Router# configure terminal |
Enters global configuration mode. |
|
Example: Router(config)# interface fastethernet3/0/0.10 |
Enters interface configuration mode for the interface to be used for the BGP session. The interface can be a routed port or an SVI. |
|
Example: Router(config-if)# mpls bgp forwarding |
Enables MPLS forwarding on the interface. |
You can use RIP, EIGRP, OSPF or with static routing. This configuration uses OSPF, but the process is the same for other protocols.
If you use OSPF as the routing protocol between the PE and the CE routers, issue the capability vrf-lite command in router configuration mode. See OSPF Support for Multi-VRF in CE Routers for more information.
![]() Note |
If OSPF, EIGRP, RIP, or static routing is used, LDP must be used to signal labels. The MPLS Multi-VRF feature is not supported by IGRP nor IS-IS. Multicast cannot be configured on the same Layer 3 interface as the MPLS Multi-VRF feature is configured. > |
Command or Action | Purpose | |
---|---|---|
|
Example: Router> enable |
Enables privileged EXEC mode. |
|
Example: Router# configure terminal |
Enters global configuration mode. |
|
Example: Router(config)# router ospf 100 vrf v1 |
Enables OSPF routing, specifies a VRF table, and enters router configuration mode. |
|
Example: Router(config-router)# log-adjacency-changes |
(Optional) Logs changes in the adjacency state. This is the default state. |
|
Example: Router(config-router)# redistribute bgp 800 subnets |
Sets the router to redistribute information from the BGP network to the OSPF network. |
|
Example: Router(config-router)# network 10.0.0.0 255.255.255.0 area 0 |
Indicates the network address and mask on which OSPF runs, and the area ID of that network address. |
|
Example: Router(config-router)# end |
Exits router configuration mode and returns to privileged EXEC mode. |
|
Example: Router# show ip ospf |
Displays information about the OSPF routing processes. |
Command or Action | Purpose | |
---|---|---|
|
Example: Router> enable |
Enables privileged EXEC mode. |
|
Example: Router# configure terminal |
Enters global configuration mode. |
|
Example: Router(config)# interface fastethernet3/0/0.10 |
Enters interface configuration mode for the interface associated with the VRF. The interface can be a routed port or an SVI. |
|
Example: Router(config-if)# mpls ip |
Enables MPLS forwarding of IPv4 packets along normally routed paths for this interface. |
The figure below is an example of an MPLS Multi-VRF topology.
configure terminal ip vrf v1 rd 100:1 route-target export 100:1 route-target import 100:1 exit ip vrf v2 rd 100:2 route-target export 100:2 route-target import 100:2 exit
router bgp 100 address-family ipv4 vrf v2 neighbor 10.0.0.8 remote-as 800 neighbor 10.0.0.8 activate neighbor 10.0.0.8 send-label exit address-family ipv4 vrf vl neighbor 10.0.0.8 remote-as 800 neighbor 10.0.0.8 activate neighbor 10.0.0.8 send-label end configure terminal interface fastethernet3/0/0.10 ip vrf forwarding v1 ip address 10.0.0.3 255.255.255.0 mpls bgp forwarding exit interface fastethernet3/0/0.20 ip vrf forwarding v2 ip address 10.0.0.3 255.255.255.0 mpls bgp forwarding exit
router ospf 100 vrf v1 network 10.0.0.0 255.255.255.0 area 0 exit router ospf 101 vrf v2 network 10.0.0.0 255.255.255.0 area 0 exit interface fastethernet3/0/0.10 ip vrf forwarding v1 ip address 10.0.0.3 255.255.255.0 mpls ip exit interface fastethernet3/0/0.20 ip vrf forwarding v2 ip address 10.0.0.3 255.255.255.0 mpls ip exit
configure terminal ip routing ip vrf v11 rd 800:1 route-target export 800:1 route-target import 800:1 exit ip vrf v12 rd 800:2 route-target export 800:2 route-target import 800:2 exit
interface fastethernet3/8/0 ip vrf forwarding v11 ip address 10.0.0.8 255.255.255.0 exit interface fastethernet3/11/0 ip vrf forwarding v12 ip address 10.0.0.8 255.255.255.0 exit router ospf 1 vrf v11 network 10.0.0.0 255.255.255.0 area 0 network 10.0.0.0 255.255.255.0 area 0 exit router ospf 2 vrf v12 network 10.0.0.0 255.255.255.0 area 0 network 10.0.0.0 255.255.255.0 area 0 exit
![]() Note |
If BGP is used for routing between the PE and CE routers, the BGP-learned routes from the PE router can be redistributed into OSPF using the commands in the following example. |
router ospf 1 vrf v11 redistribute bgp 800 subnets exit router ospf 2 vrf v12 redistribute bgp 800 subnets exit
router bgp 800 address-family ipv4 vrf v12 neighbor 10.0.0.3 remote-as 100 neighbor 10.0.0.3 activate neighbor 10.0.0.3 send-label redistribute ospf 2 match internal exit address-family ipv4 vrf vl1 neighbor 10.0.0.3 remote-as 100 neighbor 10.0.0.3 activate neighbor 10.0.0.3 send-label redistribute ospf 1 match internal end interface fastethernet3/0/0.10 ip vrf forwarding v11 ip address 10.0.0.8 255.255.255.0 mpls bgp forwarding exit interface fastethernet3/0/0.20 ip vrf forwarding v12 ip address 10.0.0.8 255.255.255.0 mpls bgp forwarding exit
router ospf 1 vrf v11 network 10.0.0.0 255.255.255.0 area 0 exit router ospf 2 vrf v12 network 10.0.0.0 255.255.255.0 area 0 exit interface fastethernet3/0/0.10 ip vrf forwarding v11 ip address 10.0.0.3 255.255.255.0 mpls ip exit interface fastethernet3/0/0.20 ip vrf forwarding v12 ip address 10.0.0.3 255.255.255.0 mpls ip exit
Related Topic |
Document Title |
---|---|
Cisco IOS commands |
|
Description of commands associated with MPLS and MPLS application |
Cisco IOS Multiprotocol Label Switching Command Reference |
OSPF with Multi-VRF |
OSPF Support for Multi-VRF in CE Routers |
Standard |
Title |
---|---|
No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature. |
-- |
MIB |
MIBs Link |
---|---|
No new or modified MIBs are supported by this feature, and support for existing MIBs has not been modified by this feature. |
To locate and download MIBs for selected platforms, Cisco software releases, and feature sets, use Cisco MIB Locator found at the following URL: |
RFC |
Title |
---|---|
No new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature. |
-- |
Description |
Link |
---|---|
The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. |
The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Table 1 | Feature Information for MPLS Multi-VRF |
Feature Name |
Releases |
Feature Information |
---|---|---|
MPLS Multi-VRF |
Cisco IOS XE Release 2.1 |
The MPLS Multi-VRF feature allows you to configure and maintain more than one instance of a routing and forwarding table within the same CE router. |
Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com/go/trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1110R)
Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.