Mpls VPN Basic
Mpls VPN Basic
Contents
Introduction
Prerequisites
Requirements
Components Used
Conventions
Background Information
Configuration
Network Diagram
Configuration Procedures
MPLS Configuration
Configure MP-BGP
Configurations
Verification
Related Information
Introduction
This document describes how to configure a Multiprotocol Label Switching (MPLS) VPN when
additional protocols are on the Cisco client site.
Prerequisites
Requirements
Components Used
The information in this document is based on these software and hardware versions:
● P and PE Routers Cisco IOS® Software Release which includes the MPLS VPN feature.Any
Cisco router from the 7200 series or higher supports P functionality.The Cisco 2600, as well
as any 3600 series or higher router supports PE functionality.
● C and CE Routers You can use any router that can exchange routing information with its PE
router.
The information in this document was created from the devices in a specific lab environment. All of
the devices used in this document started with a cleared (default) configuration. If your network is
live, ensure that you understand the potential impact of any command.
Related Products
To implement the MPLS feature, you must have a router from the range of Cisco 2600 or higher.
To select the required Cisco IOS with MPLS feature, use the Software Research tool. Also check
for the additional RAM and Flash memory required to run the MPLS feature in the routers. WIC-
1T, WIC-2T, and serial interfaces can be used.
Conventions
Refer to Cisco Technical Tips Conventions for more information on document conventions.
These letters represent the different types of routers and switches used:
Note: PE routers are the last hop in the provider network and these are the devices that
connect directly to the CE routers which are not aware of the MPLS feature, as shown in the
next diagram.
This diagram shows a typical configuration that illustrates the conventions outlined previously.
MPLS VPN
Network Diagram
Background Information
This document provides a sample configuration of a Multiprotocol Label Switching (MPLS) VPN
when Border Gateway Protocol (BGP) is present on the Cisco client site.
When used with MPLS, the VPN feature allows several sites to interconnect transparently through
a service provider 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 Virtual Routing and Forwarding (VRF) instances. 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 Information
Base (RIB) and CEF table for each VRF. Therefore, the information is not sent outside the VPN
and allows the same subnet to be used in several VPNs and does not cause duplicate IP address
problems. The router that uses Multiprotocol BGP (MP-BGP) distributes the VPN routing
information with the MP-BGP extended communities.
Configuration
This section provides the configuration examples and how they are implemented.
Network Diagram
Configuration Procedures
MPLS Configuration
1. Verify that ip cef is enabled on the routers where MPLS is required. For improved performance,
use ip cef distributed (where available).
2. Configure an IGP on the service provider core, either Open Shortest Path First (OSPF) or
Intermediate System-to-Intermediate System (IS-IS) protocols are the recommended options, and
advertise the Loopback0 from each P and PE routers.
3. After the service provider core routers are fully L3 reachable between their loopbacks, configure
the command mpls ip on each L3 interface between P and PE routers.
Note: The PE router interface that connects directly to the CE router does not require the
mpls ip command configuration.
Complete these steps on the PEs after MPLS has been set up (configuration of mpls ip on the
interfaces).
1. Create one VRF for each VPN connected with the vrf definition <VRF name> command. Additional
steps:Specify the correct route distinguisher used for that VPN. This command rd <VPN route
distinguisher> is used to extend the IP address so that you can identify which VPN it belongs
to.
vrf definition Client_A
rd 100:110
Set up the import and export properties for the MP-BGP extended communities. These are
used to filter the import and export process with the command route-target [import|export|both] <target
VPN extended community> as shown in the next output:
vrf definition Client_A
rd 100:110
route-target export 100:1000
route-target import 100:1000
!
address-family ipv4
exit-address-family
2. On the PE router, add the interfaces that connect the CE to the corresponding VRF.
Configure the forwarding details for the respective interfaces with the vrf forwarding command
and set up the IP address.
Pescara#
Configure MP-BGP
There are several ways to configure BGP, for example, you can configure PE routers as BGP
neighbors or use a Route Reflector (RR) or Confederation methods. A Route Reflector is used in
the next example, which is more scalable than the use of direct neighbors between PE routers:
1. Enter the address-family ipv4 vrf <VRF name> command for each VPN present at this PE
router.Carry out one or more of the next steps, as necessary:If you use BGP to exchange
routing information with the CE, configure and activate the BGP neighbors with the CE
routers.If you use a different dynamic routing protocol to exchange routing information with
the CE, redistribute the routing protocols.
Note: Based on the PE-CE routing protocol you use, you can configure any dynamic routing
protocols (EIGRP, OSPF or BGP) between PE and CE devices. If BGP is the protocol used
to exchange routing information between PE and CE, there is no need to configure
redistribution between protocols.
2. Enter the address-family vpnv4 mode, and complete the next steps:
● Activate the neighbors, a VPNv4 neighbor session needs to be established between each PE
router and the Route Reflector.
● Specify that extended community must be used. This is mandatory.
Configurations
This document uses these configurations to setup the MPLS VPN network example:
●Pescara (PE)
●Pesaro (PE)
●Pomerol (P)
●Pulligny (RR)
●Pauillac (P)
Pescara
hostname Pescara
!
ip cef
!
vrf definition Client_B rd 100:120 route-target export 100:2000 route-target import 100:2000 ! address-f
ipv4 exit-address-family
!
interface Loopback0 ip address 10.10.10.4 255.255.255.255 ip router isis
! interface GigabitEthernet0/1 vrf forwarding Client_A ip address 10.0.4.2 255.255.255.0 duplex auto spe
auto media-type rj45 ! interface GigabitEthernet0/2 vrf forwarding Client_B ip address 10.0.4.2 255.255.
duplex auto speed auto media-type rj45
!
interface GigabitEthernet0/0 description link to Pauillac ip address 10.1.1.14 255.255.255.252 ip router
duplex auto speed auto media-type rj45 mpls ip
!--- Enables MPLS on the L3 interface connecting to the P router
!
router isis net 49.0001.0000.0000.0004.00 is-type level-2-only metric-style wide passive-interface Loopb
!--- Enables IS-IS as the IGP in the provider core network
! address-family vpnv4 neighbor 10.10.10.2 activate neighbor 10.10.10.2 send-community both exit-address
family
!--- To enter address family configuration mode that use standard VPN version 4 address prefixes.
!--- Creates the VPNv4 neighbor session to the Route Reflector.
!--- And to send the community attribute to the BGP neighbor.
! address-family ipv4 vrf Client_A neighbor 10.0.4.1 remote-as 65002 neighbor 10.0.4.1 activate exit-add
family ! address-family ipv4 vrf Client_B neighbor 10.0.4.1 remote-as 65001 neighbor 10.0.4.1 activate e
address-family
!--- These are the eBGP sessions to each CE router belonging to different customers.
!--- The eBGP sessions are configured within the VRF address family
!
end
Pesaro
hostname Pesaro
!
ip cef
! vrf definition Client_A rd 100:110 route-target export 100:1000 route-target import 100:1000 ! address
family ipv4 exit-address-family !
vrf definition Client_B rd 100:120 route-target export 100:2000 route-target import 100:2000 ! address-f
ipv4 exit-address-family ! ip cef ! interface Loopback0 ip address 10.10.10.6 255.255.255.255
ip router isis
! interface GigabitEthernet0/0 description link to Pomerol ip address 10.1.1.22 255.255.255.252 ip route
isis duplex auto speed auto media-type rj45 mpls ip ! interface GigabitEthernet0/1 vrf forwarding Client
address 10.0.6.2 255.255.255.0 duplex auto speed auto media-type rj45 ! interface GigabitEthernet0/2 vrf
forwarding Client_A ip address 10.1.6.2 255.255.255.0 duplex auto speed auto media-type rj45 ! interface
GigabitEthernet0/3 vrf forwarding Client_A ip address 10.0.6.2 255.255.255.0 duplex auto speed auto medi
type rj45 ! router isis net 49.0001.0000.0000.0006.00 is-type level-2-only metric-style wide passive-
interface Loopback0 ! router bgp 65000 bgp log-neighbor-changes neighbor 10.10.10.2 remote-as 65000 neig
10.10.10.2 update-source Loopback0 ! address-family vpnv4 neighbor 10.10.10.2 activate neighbor 10.10.10
send-community both exit-address-family ! address-family ipv4 vrf Client_A neighbor 10.0.6.1 remote-as 6
neighbor 10.0.6.1 activate neighbor 10.1.6.1 remote-as 65004 neighbor 10.1.6.1 activate exit-address-fam
address-family ipv4 vrf Client_B neighbor 10.0.6.1 remote-as 65003 neighbor 10.0.6.1 activate exit-addre
family ! ! end
Pomerol
hostname Pomerol
!
ip cef
!
interface Loopback0
ip address 10.10.10.3 255.255.255.255
ip router isis
!
interface GigabitEthernet0/0
description link to Pesaro
ip address 10.1.1.21 255.255.255.252
ip router isis
duplex auto
speed auto
media-type rj45
mpls ip
!
interface GigabitEthernet0/1
description link to Pauillac
ip address 10.1.1.6 255.255.255.252
ip router isis
duplex auto
speed auto
media-type rj45
mpls ip
!
interface GigabitEthernet0/2
description link to Pulligny
ip address 10.1.1.9 255.255.255.252
ip router isis
duplex auto
speed auto
media-type rj45
mpls ip
!
router isis
net 49.0001.0000.0000.0003.00
is-type level-2-only
metric-style wide
passive-interface Loopback0
!
end
Pulligny
hostname Pulligny
!
ip cef
!
interface Loopback0
ip address 10.10.10.2 255.255.255.255
ip router isis
!
interface GigabitEthernet0/0
description link to Pauillac
ip address 10.1.1.2 255.255.255.252ip router isis
duplex auto
speed auto
media-type rj45
mpls ip
!
interface GigabitEthernet0/1
description link to Pomerol
ip address 10.1.1.10 255.255.255.252ip router isis
duplex auto
speed auto
media-type rj45
mpls ip
!
interface GigabitEthernet0/3
no ip address
shutdown
duplex auto
speed auto
media-type rj45
!
router isis
net 49.0001.0000.0000.0002.00
is-type level-2-only
metric-style wide
passive-interface Loopback0
!
router bgp 65000
bgp log-neighbor-changes
neighbor 10.10.10.4 remote-as 65000
neighbor 10.10.10.4 update-source Loopback0
neighbor 10.10.10.6 remote-as 65000
neighbor 10.10.10.6 update-source Loopback0
!
address-family vpnv4
neighbor 10.10.10.4 activate
neighbor 10.10.10.4 send-community both
neighbor 10.10.10.4 route-reflector-client
neighbor 10.10.10.6 activate
neighbor 10.10.10.6 send-community both
neighbor 10.10.10.6 route-reflector-client
exit-address-family
!
!
end
Pauillac
hostname pauillac
!
ip cef
!
interface Loopback0
ip address 10.10.10.1 255.255.255.255
ip router isis
!
interface GigabitEthernet0/0
description link to Pescara
ip address 10.1.1.13 255.255.255.252
ip router isis
duplex auto
speed auto
media-type rj45
mpls ip
!
interface GigabitEthernet0/1
description link to Pulligny
ip address 10.1.1.5 255.255.255.252
ip router isis
duplex auto
speed auto
media-type rj45
mpls ip
!
interface GigabitEthernet0/2
description link to Pomerol
ip address 10.1.1.1 255.255.255.252
ip router isis
duplex auto
speed auto
media-type rj45
mpls ip
!
router isis
net 49.0001.0000.0000.0001.00
is-type level-2-only
metric-style wide
passive-interface Loopback0
!
end
CE-A1 CE-A3
Verification
This section provides information you can use to confirm that the configuration works properly:
PE to CE Verification Commands
show ip route vrf <VRF name> —Verifies the routing information on the PE routers.
●
traceroute vrf <VRF name> <IP address> — Verifies the routing information on the PE routers.
●
show ip cef vrf <VRF name> <IP address> detail — Verifies the routing information on the PE routers.
●
This next is a sample command output of the show ip vrf interfaces command.
Pesaro#show ip vrf interfaces
Interface IP-Address VRF Protocol
Gi0/2 10.1.6.2 Client_A up
Gi0/3 10.0.6.2 Client_A up
Gi0/1 10.0.6.2 Client_B up
In this next sample, the show ip route vrf commands show the same prefix 10.0.6.0/24 in both the
outputs. This is because the remote PE has the same network for two Cisco clients, CE_B2 and
CE_A3, which is allowed in a typical MPLS VPN solution.
When you run a traceroute between two sites, in this example two sites of Client_A (CE-A1 to CE-
A3), it is possible to see the label stack used by the MPLS network (if it is configured to do so by
mpls ip propagate-ttl ).
The next output shows the IS-IS and LDP adjacency established between the RR and some of the
P routers in the Service Provider core network:
Tag null:
System Id Type Interface IP Address State Holdtime Circuit Id
Pauillac L2 Gi0/0 10.1.1.1 UP 25 Pulligny.01
Pomerol L2 Gi0/1 10.1.1.9 UP 23 Pulligny.02
Pulligny#
Related Information
● MPLS Command Reference
● Technical Support & Documentation - Cisco Systems