Wednesday, June 4, 2008

BASICS OF MPLS VPN

Introduction
This document provides a sample configuration of a Multiprotocol Label Switching (MPLS) VPN over ATM when Border Gateway Protocol (BGP) or Routing Information Protocol (RIP) is present on the customer's site.
When used with MPLS, the VPN feature allows several sites to interconnect transparently through a service provider's network. One service provider network can support several different IP VPNs. Each of these appears to its users as a private network, separate from all other networks. Within a VPN, each site can send IP packets to any other site in the same VPN.
Each VPN is associated with one or more VPN routing or forwarding instances (VRFs). A VRF consists of an IP routing table, a derived Cisco express forwarding (CEF) table, and a set of interfaces that use this forwarding table.
The router maintains a separate routing and CEF table for each VRF. This prevents information being sent outside the VPN and allows the same subnet to be used in several VPNs without causing duplicate IP address problems.
The router using Multiprotocol BGP (MP-BGP) distributes the VPN routing information using the MP-BGP extended communities.
For more information about the propagation of updates through a VPN, refer to these documents:




Feature Overview
The IP virtual private network (VPN) feature for Multiprotocol Label Switching (MPLS) allows a Cisco IOS network to deploy scalable IPv4 Layer 3 VPN backbone services. An IP VPN is the foundation companies use for deploying or administering value-added services including applications and data hosting network commerce, and telephony services to business customers.
In private local area networks (LANs), IP-based intranets have fundamentally changed the way companies conduct their business. Companies are moving their business applications to their intranets to extend over a wide area network (WAN). Companies are also embracing the needs of their customers, suppliers, and partners by using extranets (an intranet that encompasses multiple businesses). With extranets, companies reduce business process costs by facilitating supply-chain automation, electronic data interchange (EDI), and other forms of network commerce. To take advantage of this business opportunity, service providers must have an IP VPN infrastructure that delivers private network services to businesses over a public infrastructure.
Tag Switching/MPLS Terminology
MPLS replaces the earlier "Tag Switching" technologies. The following table lists the older Tag Switching terms and the new MPLS terms found in this document.
Old Designation
New Designation
Tag Switching
MPLS, Multiprotocol Label Switching
Tag (short for Tag Switching)
MPLS
Tag (item or packet)
Label
TDP (Tag Distribution Protocol)
LDP (Label Distribution Protocol)
Note Cisco TDP and LDP (MPLS Label Distribution Protocol)) are nearly identical in function, but use incompatible message formats and some different procedures. Cisco will be changing from TDP to a fully compliant LDP.
Tag Switched
Label Switched
TFIB (Tag Forwarding Information Base)
LFIB (Label Forwarding Information Base)
TSR (Tag Switching Router)
LSR (Label Switching Router)
TSC (Tag Switch Controller)
LSC (Label Switch Controller)
ATM-TSR
ATM-LSR (ATM Label Switch Router, for example,BPX 8650.)
TVC (Tag VC, Tag Virtual Circuit)
LVC (Label VC, Label Virtual Circuit)
TSP (Tag Switch Path)
LSP (Label Switch Path)
XTagATM (extended Tag ATM port)
XmplsATM (extended MPLS ATM port)

IP Virtual Private Networks
To effectively implement an IP VPN in your facility, ensure your IP VPN meets the following basic requirements:
Privacy—All IP VPNs offer privacy over a shared (public) network infrastructure. Most companies use an encrypted tunnel. This is only one of several ways to provide network and data privacy.
Scalability—For proper service delivery, VPNs must scale to serve hundreds of thousands of sites and users. Besides being a managed service, VPNs are also a management tool for service providers to control access to services. One example is Closed User Groups for data and voice services.
Flexibility—IP VPNs must handle the any-to-any traffic patterns characteristic of corporate intranets and extranets, in which data no longer flows to and from a central location. VPNs must also have the inherent flexibility to add new sites quickly, connect users over different media, and meet the increasingly sophisticated transport and bandwidth requirements of new intranet applications.
Predictable Performance—Performance needs vary widely requiring different classes of service, but the common requirement is that the performance is predictable. Examples of the ranges of performance requirements include:
• Remote access for mobile users—Require widespread connectivity
• Branch offices—Require a sustained performance level because of the interactive nature of the intranet application in a branch office
• Video conferencing—Require specific performance characteristics
MPLS Virtual Private Networks
MPLS VPNs allow service providers to deploy scalable VPNs and build the foundation to deliver value-added services, including:
Connectionless Service—A significant technical advantage of MPLS VPNs is that they are connectionless. The Internet owes its success to its basic technology, TCP/IP. TCP/IP is built on packet-based, connectionless network paradigm. This means that no prior action is necessary to establish communication between hosts, making it easy for two parties to communicate. To establish privacy in a connectionless IP environment, current VPN solutions impose a connection-oriented, point-to-point overlay on the network. Even if it runs over a connectionless network, a VPN cannot take advantage of the ease of connectivity and multiple services available in connectionless networks. When you create a connectionless VPN, you do not need tunnels and encryption for network privacy, thus eliminating significant complexity.
Centralized Service—Building VPNs in Layer 3 allows delivery of targeted services to a group of users represented by a VPN. A VPN must give service providers more than a mechanism for privately connecting users to intranet services. It must also provide a way to flexibly deliver value-added services to targeted customers. Scalability is critical, because customers want to use services privately in their intranets and extranets. Because MPLS VPNs are seen as private intranets, you may use new IP services such as:
• multicast
• quality of service (QoS)
• telephony support within a VPN
• centralized services including content and web hosting to a VPN
You can customize several combinations of specialized services for individual customers. For example, a service that combines IP multicast with a low-latency service class enables videoconferencing within an intranet.
Scalability—If you create a VPN using connection-oriented, point-to-point overlays, Frame Relay, or ATM virtual connections (VCs), the VPN's key deficiency is scalability. Specifically, connection-oriented VPNs without fully meshed connections between customer sites, are not optimal. MPLS-based VPNs instead use the peer model and Layer 3 connectionless architecture to leverage a highly scalable VPN solution. The peer model requires a customer site to only a peer with one provider edge (PE) router as opposed to all other CPE or customer edge (CE) routers that are members of the VPN. The connectionless architecture allows the creation of VPNs in Layer 3, eliminating the need for tunnels or VCs.
Other scalability issues of MPLS VPNs are due to the partitioning of VPN routes between PE routers and the further partitioning of VPN and IGP routes between PE routers and provider (P) routers in a core network.
• PE routers must maintain VPN routes for those VPNs who are members.
• P routers do not maintain any VPN routes.
This increases the scalability of the provider's core and ensures that no one device is a scalability bottleneck.
Security—MPLS VPNs offer the same level of security as connection-oriented VPNs. Packets from one VPN do not inadvertently go to another VPN. Security is provided
1 At the edge of a provider network, ensuring packets received from a customer are placed on the correct VPN.
2 At the backbone, VPN traffic is kept separate. Malicious spoofing (an attempt to gain access to a PE router) is nearly impossible because the packets received from customers are IP packets. These IP packets must be received on a particular interface or subinterface to be uniquely identified with a VPN label.
Easy to Create—To take full advantage of VPNs, it must be easy for customers to create new VPNs and user communities. Because MPLS VPNs are connectionless, no specific point-to-point connection maps or topologies are required. You can add sites to intranets and extranets and form closed user groups. When you manage VPNs in this manner, it enables membership of any given site in multiple VPNs, maximizing flexibility in building intranets and extranets.
Flexible Addressing—To make a VPN service more accessible, customers of a service provider can design their own addressing plan, independent of addressing plans for other service provider customers. Many customers use private address spaces, as defined in RFC 1918, and do not want to invest the time and expense of converting to public IP addresses to enable intranet connectivity. MPLS VPNs allow customers to continue to use their present address spaces without network address translation (NAT) by providing a public and private view of the address. A NAT is required only if two VPNs with overlapping address spaces want to communicate. This enables customers to use their own unregistered private addresses, and communicate freely across a public IP network.
Integrated Class of Service (CoS) Support—CoS is an important requirement for many IP VPN customers. It provides the ability to address two fundamental VPN requirements:
1 Predictable performance and policy implementation
2 Support for multiple levels of service in a MPLS VPN
Network traffic is classified and labeled at the edge of the network before traffic is aggregated according to policies defined by subscribers and implemented by the provider and transported across the provider core. Traffic at the edge and core of the network can then be differentiated into different classes by drop probability or delay.
Straightforward Migration—For service providers to quickly deploy VPN services, use a straightforward migration path. MPLS VPNs are unique because you can be build them over multiple network architectures, including IP, ATM, Frame Relay, and hybrid networks.
Migration for the end customer is simplified because there is no requirement to support MPLS on the customer edge (CE) router and no modifications are required to a customer's intranet.
For a list of platforms supported by MPLS VPNs, refer to the section entitled Supported Platforms.
shows an example of a VPN with a service provider (P) backbone network, service provider edge routers (PE), and customer edge routers (CE).
Figure 1 VPNs with a Service Provider Backbone
A VPN contains customer devices attached to the CE routers. These customer devices use VPNs to exchange information between devices. Only the PE routers are aware of the VPNs.
shows five customer sites communicating within three VPNs. The VPNs can communicate with the following sites:
• VPN1—sites 2 and 4
• VPN2—sites 1, 3, and 4
• VPN3—sites 1,3, and 5
Figure 2 Customer Sites within VPNs
VPN Operation
Each VPN is associated with one or more VPN routing/forwarding instances (VRFs). A VRF defines the VPN membership of a customer site attached to a PE router. A VRF consists of an IP routing table, a derived Cisco Express Forwarding (CEF) table, a set of interfaces that use the forwarding table, and a set of rules and routing protocol parameters that control the information that is included into the routing table.
A one-to-one relationship does not necessarily exist between customer sites and VPNs. A given site can be a member of multiple VPNs, as shown in . However, a site can only associate with one (and only one) VRF. A customer site's VRF contains all the routes available to the site from the VPNs of which it is a member.
Packet forwarding information is stored in the IP routing table and the CEF table for each VRF. A separate set of routing and CEF tables is maintained for each VRF. These tables prevent information from being forwarded outside a VPN, and also prevent packets that are outside a VPN from being forwarded to a router within the VPN.
VPN Route Target Communities
The distribution of VPN routing information is controlled through the use of VPN route target communities, implemented by border gateway protocol (BGP) extended communities. Distribution of VPN routing information works as follows:
• When a VPN route learned from a CE router is injected into BGP, a list of VPN route target extended community attributes are associated with it. Typically the list of route target community values is set from an export list of route targets associated with the VRF from which the route was learned.
• An import list of route target extended communities is associated with each VRF. The import list defines route target extended community attributes a route must have for the route to be imported into the VRF. For example, if the import list for a particular VRF includes route target communities A, B, and C, then any VPN route that carries any of those route target extended communities — A, B, or C — is imported into the VRF.
BGP Distribution of VPN Routing Information
A service provider edge (PE) router can learn an IP prefix from a customer edge (CE) routerby static configuration, through a BGP session with the CE router, or through the routing information protocol (RIP) exchange with the CE router. The IP prefix is a member of the IPv4 address family. After it learns the IP prefix, the PE converts it into a VPN-IPv4 prefix by combining it with an 8-byte route distinguisher (RD). The generated prefix is a member of the VPN-IPv4 address family. It serves to uniquely identify the customer address, even if the customer site is using globally nonunique (unregistered private) IP addresses.
The route distinguisher used to generate the VPN-IPv4 prefix is specified by a configuration command associated with the VRF on the PE router.
BGP distributes reachability information for VPN-IPv4 prefixes for each VPN. BGP communication takes place at two levels: within IP domains, known as an autonomous systems (interior BGP or IBGP) and between autonomous systems (external BGP or EBGP). PE-PE or PE-RR (route reflector) sessions are IBGP sessions, and PE-CE sessions are EBGP sessions.
BGP propagates reachability information for VPN-IPv4 prefixes among PE routers by means of the BGP multiprotocol extensions (see RFC 2283, Multiprotocol Extensions for BGP-4) which define support for address families other than IPv4. It does this in a way that ensures the routes for a given VPN are learned only by other members of that VPN, enabling members of the VPN to communicate with each other.
MPLS Forwarding
Based on routing information stored in the VRF IP routing table and VRF CEF table, packets are forwarded to their destination using MPLS.
A PE router binds a label to each customer prefix learned from a CE router and includes the label in the network reachability information for the prefix that it advertises to other PE routers. When a PE router forwards a packet received from a CE router across the provider network it labels the packet with the label learned from the destination PE router. When the destination PE router receives the labeled packet it pops the label and uses it to direct the packet to the correct CE router. Label forwarding across the provider backbone, is based on either dynamic label switching or traffic engineered paths. A customer data packet carries two levels of labels when traversing the backbone:
1 Top label directs the packet to the correct PE router
2 Second label indicates how that PE router should forward the packet to the CE router
Benefits
This section describes the benefits of VPNs in general and MPLS VPNs in particular.
IP VPNs are attractive because they:
1 Reduce the cost of connecting branch offices, telecommuters, and mobile users to a corporate intranet, which operate over the public infrastructure of the Internet
2 Are more cost-effective than private WANs constructed with leased lines
However, conventional VPNs do not scale well. They are based on creating and maintaining a full mesh of tunnels or permanent virtual circuits among all sites belonging to a particular VPN, using:
• IPSec
• Layer 2 tunneling protocol (L2TP)
• Layer 2 forwarding (L2F) protocol
• generic routing encapsulation (GRE)
• Frame Relay
• ATM protocols
The overhead required to provision and manage these connection-based schemes cannot be supported in a provider network that must support hundreds or thousands of VPNs, each with tens or hundreds or thousands of sites and thousands or tens of thousands of routes.
MPLS VPNs, which are created in Layer 3, are connectionless, and therefore substantially more scalable and easier to build and manage than conventional VPNs. In addition, you can add value-added services, such as application and data hosting, network commerce, and telephony services to a particular MPLS VPN because the service provider's backbone recognizes each MPLS VPN as a separate, connectionless IP network.
MPLS VPNs offer:
• A platform for rapid deployment of additional value-added IP services, including intranets, extranets, voice, multimedia, and network commerce
• Privacy and security equal to that provided by Layer-2 VPNs by limiting the distribution of a VPN's routes to only those routers that are members of the VPN
• Seamless integration with customer intranets
• Increased scalability over current VPN implementations, with thousands of sites per VPN and hundreds of thousands of VPNs per service provider
• IP Class of Service (CoS), with support for multiple classes of service and priorities within VPNs, as well as between VPNs
• Management of VPN membership and provisioning of new VPNs for rapid deployment
• Scalable any-to-any connectivity for extended intranets and extranets that encompass multiple businesses
Related Features and Technologies
VPNs may be used with the Class of Service (CoS) feature for MPLS.
Related Documents
• MPLS Class of Service Feature Guide
• Cisco IOS Release 12.0 Network Protocols Command Reference, Part I
• Internet draft draft-rosen-vpn-mpls-00.txt VPN architecture description
• RFC 1163, A Border Gateway Protocol
• RFC 1164, Application of the Border Gateway Protocol in the Internet
• RFC 2283, Multiprotocol Extensions for BGP-4
• RFC 2547, BGP/MPLS VPNs
• Internet draft draft-rekhter-bgp-mpls-00.txt, Carrying Label information in BGP-4
• Internet draft draft-ramachandra-bgp-ext-communities-01.txt extended community attributes
Supported Platforms
The following is a list of router platforms supported at the provider core.
• Cisco 7200 series
• Cisco 7500 series
• Cisco 8540 series (MSR)
• Cisco 8650 series (BPX)
• Cisco 8800 series (MGX)
The following is a list of router platforms supported at the provider edge.
• Cisco 3640 series
• Cisco 7200 series
• Cisco 7500 series
Supported Standards, MIBs and RFCs
MIBs
No new or modified MIBs are supported by this feature.
RFCs
• RFC 1163, A Border Gateway Protocol
• RFC 1164, Application of the Border Gateway Protocol in the Internet
• RFC 2283, Multiprotocol Extensions for BGP-4
• RFC 2547, BGP/MPLS VPNs
Standards
No new or modified standards are supported by this feature.
Prerequisites
Your network must be running the following Cisco IOS services before you configure VPN operation:
• MPLS in provider backbone routers, or GRE tunnel connectivity among all provider edge (PE) routers
• MPLS with VPN code in provider routers with VPN edge service (PE) routers
• BGP in all routers providing a VPN service
• CEF switching in every MPLS-enabled router
• CoS feature (optional)
Configuration Tasks
Perform the following tasks to configure and verify VPNs:
Defining VPNs
Configuring BGP PE to PE Routing Sessions
Configuring BGP PE to CE Routing Sessions
Configuring RIP PE to CE Routing Sessions
Configuring Static Route PE to CE Routing Sessions
Verifying VPN Operation
Defining VPNs
To define VPN routing instances, perform the following steps on the PE router:
Step
Command
Purpose
1
Router(config)# ip vrf vrf-name
Enter VRF configuration mode and define the VPN routing instance by assigning a VRF name.
2
Router(config-vrf)# rd route-distinguisher
Create routing and forwarding tables.
3
Router(config-vrf)# route-target {import export both} route-target-ext-community
Create a list of import and/or export route target communities for the specified VRF.
4
Router(config-vrf)# import map route-map
(Optional) Associate the specified route map with the VRF.
5
Router(config-if)# ip vrf forwarding vrf-name
Associate a VRF with an interface or subinterface.

Configuring BGP PE to PE Routing Sessions
To configure BGP PE to PE routing sessions in a provider network, perform the following steps on the PE routers:
Step
Command
Purpose
1
Router(config)# router bgp autonomous-system
Configures the IBGP routing process with the autonomous system number passed along to other IBGP routers.
2
Router(config-router)# neighbor {ip-address peer-group-name} remote-as number
Specifies a neighbor's IP address or IBGP peer group identifying it to the local autonomous system.
3
Router(config-router)# neighbor ip-address activate
Activates the advertisement of the IPv4 address family.

Configuring BGP PE to CE Routing Sessions
To configure BGP PE to CE routing sessions perform the following steps on the PE router:
Step
Command
Purpose
1
Router(config)# router bgp autonomous-system
Configures a EBGP routing process with the autonomous system number passed along to other EBGP routers.
2
Router(config-router)# neighbor {ip-address peer-group-name} remote-as number
Specifies a neighbor's IP address or EBGP peer group identifying it to the local autonomous system.
3
Router(config-router)# neighbor ip-address activate
Activates the advertisement of the IPv4 address family.

Configuring RIP PE to CE Routing Sessions
To configure RIP PE to CE routing sessions perform the following steps on the PE router:
Step
Command
Purpose
1
Router(config)# router rip
Enables RIP.
2
Router(config-router)# address-family ipv4 [unicast] vrf vrf-name
Defines RIP parameters for PE to CE routing sessions.
Note The default is Off for auto-summary and synchronization in the VRF address-family submode.
3
Router(config-router-af)# network prefix
Enables RIP on the PE to CE link.

Configuring Static Route PE to CE Routing Sessions
To configure static route PE to CE routing sessions perform the following steps on the PE router:
Step
Command
Purpose
1
Router(config)# ip route vrf vrf-name
Defines static route parameters for every PE to CE session.
2
Router(config-router)# address-family ipv4 [unicast] vrf vrf-name
Defines static route parameters for every BGP PE to CE routing session.
Note The default is Off for auto-summary and synchronization in the VRF address-family submode.
3
Router(config-router-af)# redistribute static
Redistributes VRF static routes into the VRF BGP table.
4
Router(config-router-af)# redistribute static connected
Redistributes directly connected networks into the VRF BGP table.

Verifying VPN Operation
To verify VPN operation, perform the following steps:
Step
Command
Purpose
1
Router# show ip vrf
Displays the set of defined VRFs and interfaces.
2
Router# show ip vrf [{brief detail interfaces}] vrf-name
Displays information about defined VRFs and associated interfaces.
3
Router# show ip route vrf vrf-name
Displays the IP routing table for a VRF.
4
Router# show ip protocols vrf vrf-name
Displays the routing protocol information for a VRF.
5
Router# show ip cef vrf vrf-name
Displays the CEF forwarding table associated with a VRF.
6
Router# show ip interface interface-number
Displays the VRF table associated with an interface.
7
Router# show ip bgp vpnv4 all [tags]
Displays information about all BGPs.
8
Router# show tag-switching forwarding vrf vrf-name [prefix mask/length][detail]
Displays label forwarding entries that correspond to VRF routes advertised by this router.

Configuration Examples
This section provides a sample configuration file from a PE router. ip cef distributed ! CEF switching is pre-requisite for label Switchingframe-relay switching!ip vrf vrf1 ! Define VPN Routing instance vrf1 rd 100:1 route-target both 100:1 ! Configure import and export route-targets for vrf1!ip vrf vrf2 ! Define VPN Routing instance vrf2 rd 100:2 route-target both 100:2 ! Configure import and export route-targets for vrf2 route-target import 100:1 ! Configure an additional import route-target for vrf2 import map vrf2_import ! Configure import route-map for vrf2!interface lo0 ip address 10.13.0.13 255.255.255.255!interface atm9/0/0 ! Backbone link to another Provider router!interface atm9/0/0.1 tag-switching ip unnumbered loopback0 no ip directed-broadcast tag-switching atm vpi 2-5 tag-switching ip interface atm5/0 no ip address no ip directed-broadcast atm clock INTERNAL no atm ilmi-keepalive interface Ethernet1/0 ip address 3.3.3.5 255.255.0.0 no ip directed-broadcast no ip mroute-cache no keepalive interface Ethernet5/0/1 ! Set up Ethernet interface as VRF link to a CE router ip vrf forwarding vrf1 ip address 10.20.0.13 255.255.255.0 !interface hssi 10/1/0 hssi internal-clock encaps fr frame-relay intf-type dce frame-relay lmi-type ansi!interface hssi 10/1/0.16 point-to-point ip vrf forwarding vrf2 ip address 10.20.1.13 255.255.255.0 frame-relay interface-dlci 16 ! Set up Frame Relay PVC subinterface as link to another! ! CE router router bgp 1 ! Configure BGP sessions no synchronization no bgp default ipv4-activate ! Deactivate default IPv4 advertisements neighbor 10.15.0.15 remote-as 1 ! Define IBGP session with another PE neighbor 10.15.0.15 update-source lo0! address-family vpnv4 unicast ! Activate PE exchange of VPNv4 NLRI neighbor 10.15.0.15 activate exit-address-family! address-family ipv4 unicast vrf vrf1 ! Define BGP PE-CE session for vrf1 redistribute static redistribute connected neighbor 10.20.0.60 remote-as 65535 neighbor 10.20.0.60 activate no auto-summary exit-address-family! address-family ipv4 unicast vrf vrf2 ! Define BGP PE-CE session for vrf2 redistribute static redistribute connected neighbor 10.20.1.11 remote-as 65535 neighbor 10.20.1.11 update-source h10/1/0.16 neighbor 10.20.1.11 activate no auto-summary exit-address-family!! Define a VRF static routeip route vrf vrf1 12.0.0.0 255.0.0.0 e5/0/1 10.20.0.60!route-map vrf2_import permit 10 ! Define import route-map for vrf2. ...
Command Reference
This section documents new or modified commands. All other commands used with this feature are documented in the Cisco IOS Release 12.0 command references.
address-family
clear ip route vrf
exit-address-family
import map
ip route vrf
ip vrf forwarding
ip vrf
neighbor activate
rd
route-target
show ip bgp vpnv4
show ip cef vrf
show ip protocols vrf
show ip route vrf
show ip vrf
show tag-switching forwarding vrf
In Cisco IOS Release 12.0(1)T or later, you can search and filter the output for show and more commands. This functionality is useful when you need to sort through large amounts of output, or if you want to exclude output that you do not need to see.
To use this functionality, enter a show or more command followed by the "pipe" character (), one of the keywords begin, include, or exclude, and an expression that you want to search or filter on:
command {begin include exclude} regular-expression
Following is an example of the show atm vc command in which you want the command output to begin with the first line where the expression "PeakRate" appears:
show atm vc begin PeakRate
For more information on the search and filter functionality, refer to the Cisco IOS Release 12.0(1)T feature module titled CLI String Search.
address-family
To enter the address family submode for configuring routing protocols, such as BGP, RIP and static routing, use the address-family global configuration command. To disable the address family submode for configuring routing protocols, use the no form of this command.
VPN-IPv4 unicast
address-family vpnv4 [unicast]
no address-family vpnv4 [unicast]
IPv4 unicast
address-family ipv4 [unicast]
no address-family ipv4 [unicast]
IPv4 unicast with CE router
address-family ipv4 [unicast] vrf vrf-name
no address-family ipv4 [unicast] vrf vrf-name
Syntax Description
ipv4
Configures sessions that carry standard IPv4 address prefixes.
vpnv4
Configures sessions that carry customer VPN-IPv4 prefixes, each of which has been made globally unique by adding an 8-byte route distinguisher.
unicast
(Optional) Specifies unicast prefixes.
vrf vrf-name
Specifies the name of a VPN routing/forwarding instance (VRF) to associate with submode commands.

Default
Routing information for address family IPv4 is advertised by default when you configure a BGP session using the neighbor...remote-as command unless you execute the no bgp default ipv4-activate command.
Command Mode
Router configuration
Command History
Release
Modification
12.0(5)T
This command was introduced.

Usage Guidelines
Using the address-family command puts you in address family configuration submode (prompt: (config-router-af)# ). Within this submode, you can configure address-family specific parameters for routing protocols, such as BGP, that can accommodate multiple Layer 3 address families.
To leave address family configuration submode and return to router configuration mode, type exit-address-family, or simply exit.
Examples
The address-family command in the following example puts the router into address family configuration submode for the VPNv4 address family. Within the submode, you can configure advertisement of NLRI for the VPNv4 address family using neighbor activate and other related commands: (config)# router bgp 100(config-router)# address-family vpnv4 (config-router-af)#
The command in the following example puts the router into address family configuration submode for the IPv4 address family. Use this form of the command, which specifies a VRF, only to configure routing exchanges between PE and CE devices. This address-family command causes subsequent commands entered in the submode to be executed in the context of VRF vrf2. Within the submode, you can use neighbor activate and other related commands to accomplish the following:
• Configure advertisement of IPv4 NLRI between the PE and CE routers.
• Configure translation of the IPv4 NLRI (that is, translate IPv4 into VPNv4 for NLRI received from the CE, and translate VPNv4 into IPv4 for NLRI to be sent from the PE to the CE).
• Enter the routing parameters that apply to this VRF.
Entered the address family submode as follows: (config)# router bgp 100(config-router)# address-family ipv4 unicast vrf vrf2 (config-router-af)#
Related Commands
Command
Description
exit-address-family
Exits address family submode.
neighbor activate
Exchanges an address with a neighboring router.

clear ip route vrf
To remove routes from the VRF routing table, use the clear ip route vrf EXEC command.
clear ip route vrf vrf-name {* network [mask]}
Syntax Description
vrf-name
Name of the VPN routing/forwarding instance (VRF) for the static route.
*
Deletes all routes for a given VRF.
network
Destination to be removed, in dotted-decimal format.
mask
(Optional) Mask for the specified network destination, in dotted-decimal format.

Default
No default behavior or values.
Command Mode
EXEC
Command History
Release
Modification
12.0(5)T
This command was introduced

Usage Guidelines
Use this command to clear routes from the routing table. Use the asterisk (*) to delete all routes from the forwarding table for a specified VRF, or enter the address and mask of a particular network to delete the route to that network.
Example
The following command removes the route to the network 10.13.0.0 in the vpn1 routing table: Router# clear ip route vrf vpn1 10.13.0.0
Related Command
Command
Description
show ip route vrf
Displays the IP routing table associated with a VRF.

exit-address-family
To exit from the address family submode, use the exit-address-family address family submode command.
exit-address-family
Syntax Description
This command has no arguments or keywords.
Default
No default behavior or values.
Command Mode
Address family submode
Command History
Release
Modification
12.0(5)T
This command was introduced.

Usage Guidelines
This command can be abbreviated to exit.
Example
The following example shows how to exit the address-family command mode: (config-router-af)# exit-address-family
Related Commands
Command
Description
address-family
Enters the address family submode used to configure routing protocols.

import map
To configure an import route map for a VRF, use the import VRF submode command.
import map route-map
Syntax Description
route-map
Specifies the route map to be used as an import route map for the VRF.

Default
There is no default. A VRF has no import route map unless one is configured using the import map command.
Command Mode
VRF submode
Command History
Release
Modification
12.0(5)T
This command was introduced.

Usage Guidelines
Use an import route map when an application requires finer control over the routes imported into a VRF than provided by the import and export extended communities configured for the importing and exporting VRF.
The import-map command associates a route map with the specified VRF. You can filter routes that are eligible for import into a VRF, based on the route target extended community attributes of the route, through the use of a route map. The route map might deny access to selected routes from a community that is on the import list.
Example
The following example shows how to configure an import route map for a VRF: (config)# ip vrf vrf_blue(config-vrf)# import map blue_import_map
Related Commands
Command
Description
ip vrf
Enters VRF configuration mode.
route-target
Configures import and export extended community attributes for the VRF.
show ip vrf
Displays information about a VRF or all VRFs.

ip route vrf
To establish static routes for a VRF, use the ip route vrf global configuration command. To disable static routes, use the no form of this command.
ip route vrf vrf-name prefix mask [next-hop-address] [interface {interface-number}]
[global] [distance] [permanent] [tag tag]
no ip route vrf vrf-name prefix mask [next-hop-address] [interface {interface-number}]
[global] [distance] [permanent] [tag tag]
Syntax Description
vrf-name
Name of the VPN routing/forwarding instance (VRF) for the static route.
prefix
IP route prefix for the destination, in dotted-decimal format.
mask
Prefix mask for the destination, in dotted-decimal format.
next-hop-address
(Optional) IP address of the next hop (the forwarding router that can be used to reach that network).
interface
(Optional) Type of network interface to use: ATM, Ethernet, loopback, POS (packet over SONET), or null.
interface-number
Number identifying the network interface to use.
global
Specifies that the given next hop address is in the non-VRF routing table.
distance
(Optional) An administrative distance for this route.
permanent
(Optional) Specifies that this route will not be removed, even if the interface shuts down.
tag tag
(Optional) Label value that can be used for controlling redistribution of routes through route maps.

Default
No default behavior or values.
Command Mode
Global configuration
Command History
Release
Modification
12.0(5)T
This command was introduced.

Usage Guidelines
Use a static route when the Cisco IOS software cannot dynamically build a route to the destination.
If you specify an administrative distance when you set up a route, you are flagging a static route that can be overridden by dynamic information. For example, IGRP-derived routes have a default administrative distance of 100. To set a static route to be overridden by an IGRP dynamic route, specify an administrative distance greater than 100. Static routes each have a default administrative distance of 1.
Static routes that point to an interface are advertised through RIP, IGRP, and other dynamic routing protocols, regardless of whether the routes are redistributed into those routing protocols. That is, static routes configured by specifying an interface lose their static nature when installed into the routing table.
However, if you define a static route to an interface not defined in a network command, no dynamic routing protocols advertise the route unless a redistribute static command is specified for these protocols.
Example
The following command reroutes packets addressed to network 137.23.0.0 in VRF vpn3 to router 131.108.6.6: (config)# ip route vrf vpn3 137.23.0.0 255.255.0.0 131.108.6.6
Related Command
Command
Description
show ip route vrf
Displays the IP routing table associated with a VRF.

ip vrf forwarding
To associate a VRF with an interface or subinterface, use the ip vrf forwarding interface configuration command. To disassociate a VRF, use the no form of this command.
ip vrf forwarding vrf-name
no ip vrf forwarding vrf-name
Syntax Description
vrf-name
Name assigned to a VRF.

Default
The default for an interface is the global routing table.
Command Modes
Global configuration
Interface configuration
Command History
Release
Modification
12.0(5)T
This command was introduced.

Usage Guidelines
Use this command to associate an interface with a VRF. Executing this command on an interface removes the IP address. The IP address should be reconfigured.
Example
The following example shows how to link a VRF to ATM interface 0/0: (config)# interface atm0/0(config-if)# ip vrf forwarding vpn1
Related Commands
Command
Description
ip vrf
Defines a VRF.
ip route vrf
Establishes static routes for a VRF.

ip vrf
To configure a VRF routing table, use the ip vrf global configuration command. To remove a VRF routing table, use the no form of this command.
ip vrf vrf-nameno ip vrf vrf-name
Syntax Description

No comments: