CCNP-19. MPLS-VPN
CCNP-19. MPLS-VPN
• Explain the MPLS VPN architecture, RDs, RTs, and virtual routing tables
• Describe end-to-end routing update flow
• Describe VPN label propagation between PE routers and the MPLS
VPN end-to-end forwarding mechanism
VPN services can be offered based on two major models:
• Overlay model, in which the service provider provides virtual point-to-
point links between customer sites
• Peer-to-peer model, in which the service provider participates in the
customer routing
VPNs
Overlay VPN Peer-to-Peer VPN
Provider (P)
Core Devices
CE Router CE Router
PE Router PE Router
CE Router CE Router
Access
Aggregation
IP Edge
Core
MPLS
MPLS
VPN
Customer A Customer A
Site 1 Site 2
CE1-A CE2-A
CE Router CE Router
P1
PE1 PE2
MPLS VPN Service
Provider Edge Provider Network Provider Edge
Router Router
P2
Customer B Customer B
Site 1 Site 2
CE1-B CE2-B
CE Router CE Router
Customer A Customer A Customer A Customer A
Site 1 IPv4 Routes IPv4 Routes Site 2
Global Routing Global Routing
Table Table
CE
CE
Virtual Routing Virtual Routing
Table (Customer A) Table (Customer A)
P
Physical or Physical or
Logical Logical
Virtual Routing Table Virtual Routing Table
Interface (Customer B) (Customer B)
Interface
P
Customer B Provider Edge Router Provider Edge Router Customer B
Site 1 (PE) (PE) Site 2
Customer B Customer B
CE IPv4 Routes IPv4 Routes CE
CE1-B
PE Router
CE1-B Routes
IPv4 Prefix
172.16.10.0/24 VRF for P VRF for
Customer B Customer B
CE1-B CE2-B
RD = 1:101 RD = 1:101
PE Router PE Router
MPLS VPN
Customer B Service Customer B
Site 1 Provider Site 2
AS1
Customer A Customer A
Site 1 CE2-A Site 2
CE1-A
CE Router
CE Router
Step 4: The receiving PE routers strip the RD from
Step 2: The PE router prepends a 64-bit the VPNv4 prefix, resulting in an IPv4 prefix. RD is
RD to the IPv4 routing update, resulting used to match the proper VRF routing table.
in a globally unique 96-bit VPNv4 prefix.
Step 3: The VPNv4 prefix is propagated via
an MP-IBGP session
P1 to other PE routers.
PE1 PE2
Provider Edge Provider Edge
Router Router
P2
Customer B Step 5: The IPv4 prefix is forwarded to other Customer B
Site 1 CE routers within an IPv4 routing update. Site 2
CE1-B CE2-B
CE Router CE Router
Step 1: The CE router sends an IPv4
routing update to the PE router.
• The RD cannot identify participation in more than one VPN.
• RTs were introduced in the MPLS VPN architecture to support complex
VPN topologies.
• RTs are additional attributes attached to VPNv4 BGP routes to indicate
VPN membership.
• Extended BGP communities are used to encode these attributes.
• Export RTs:
- Identifying VPN membership
- Appended to the customer route when it is converted into a VPNv4 route
• Import RTs:
- Associated with each virtual routing table
- Select routes to be inserted into the virtual routing table
1:100:172.16.10.0/24
RT 1:100 NH 10.10.10.101 (PE1) VPN Label: V1
1:101:192.168.10.0/24
RT 1:101 NH 10.10.10.101 (PE1) VPN Label: V2
Customer A 3 Customer A
Site 1 Site 2
MP-BGP MP-BGP
4
VRF Customer A VRF Customer A
1 CE1-A RD = 1:100 RD = 1:100 CE2-A
Export RT = 1:100 Export RT = 1:100
IPv4 Prefix IPv4 Prefix
172.16.10.0/24 Import RT = 1:100 Import RT = 1:100 172.16.10.0/24
P1 5
2
VRF Customer B VRF Customer B
IPv4 Prefix RD = 1:101 IPv4 Prefix
RD = 1:101
192.168.10.0/24 192.168.10.0/24
Export RT = 1:101 P2 Export RT = 1:101
1 CE1-B Import RT = 1:101 Import RT = 1:101 CE2-B
MPLS VPN
Customer B Service Customer B
Site 1 Provider Site 2
MPLS VPN Routing
• CE routers must run standard IP routing software.
• PE routers must support MPLS VPN services and IP routing.
• P routers must not participate in customer VPN routing.
• Exchange VPN routes with CE routers via per-VPN routing protocols
• Exchange core routes with P routers and PE routers via core IGP
• Exchange VPNv4 routes with other PE routers via MP-IBGP sessions
MP BGP
CE Router IP L1 IP L2 IP L3 CE Router
CE Router CE Router
Approach 2: The PE routers will label the VPN packets with a label stack,
using the LDP label for the egress PE router as the top label, and the VPN
label assigned by the egress PE router as the second label in the stack.
Results:
• The P routers perform label switching using the top label, and the packet
reaches the egress PE router. The top label is removed.
• The egress PE router performs a lookup on the VPN label and forwards the
packet toward the CE router.
CE Router IP V L1 IP V L2 IP V L3 CE Router
CE Router CE Router
• PHP on the LDP label can be performed on the last P router.
• The egress PE router performs label lookup only on the
VPN label, resulting in faster and simpler label lookup.
• IP lookup is performed only once—in the ingress PE router.
CE Router IP V L1 IP V L2 IP V CE Router
CE Router CE Router
Question: How will the ingress PE router get the second label in the label
stack from the egress PE router?
Answer: Labels are propagated in MP-BGP VPNv4 routing updates.
Step 3: A label stack is Step 1: A VPN label is assigned
built in the VRF table. to every VPN route.
CE Router 38 26 38 CE Router
LSP Forwarding
CE Router CE Router
?
CE Router IP V L1 3 IP V CE Router
4
IP IP
Site 1 Site 3
IP
+
MPLS
Site 2 IP IP Site 4
VPNA
• A VRF is the routing and forwarding instance for a set of sites with
identical connectivity requirements.
• Data structures associated with a VRF are as follows:
- IP routing table
- Cisco Express Forwarding table
- Set of rules and routing protocol parameters (routing protocol contexts)
- List of interfaces that use the VRF
• Other information associated with a VRF is as follows:
- Route distinguisher
- Set of import and export route targets
10.1.1.0/24 • There are two backbones with
overlapping addresses.
RIP
VPN A
CE-A MPLS VPN
RIP Backbone
PE Router
VPN B CE-B Address Conflict
Backbone
VRF-B Routing Table Multiprotocol
BGP
CE-BGP-A
Instance for VRF-B
CE-BGP-B
Backbone
VRF-B Routing Table Multiprotocol
BGP
CE-BGP-A
Instance for VRF-B
CE-BGP-B
Backbone
VRF-B Routing Table Multiprotocol
BGP
CE-BGP-A
Instance for VRF-B
CE-BGP-B
• The route distinguishers are prepended during the route export to the BGP routes from the
VRF instance of the BGP process to convert them into VPNv4 prefixes. Route targets are
attached to these prefixes.
• VPNv4 prefixes are propagated to other PE routers.
PE Router
VRF-A Routing Table BGP Routing
Process
Backbone
VRF-B Routing Table Multiprotocol
BGP
CE-BGP-A
Instance for VRF-B
CE-BGP-B
Backbone
VRF-B Routing Table Multiprotocol
BGP
CE-BGP-A
Instance for VRF-B
CE-BGP-B
• Routes are received from backbone MP-BGP and imported into a VRF.
• IPv4 routes are forwarded to EBGP CE neighbors attached to
that VRF.
PE Router
VRF-A Routing Table BGP Routing
RD: 1:100 Imp. RT: 1:100 Process
172.16.10.0/24
Backbone
VRF-B Routing Table Multiprotocol
BGP
1:100 172.16.10.0/24
172.16.10.0/24 RT: 1:100
Instance for VRF-A
172.16.10.0/24
CE-BGP-A
Instance for VRF-B
CE-BGP-B
PE Router
RIP Routing Process
VRF-A Routing Table BGP Routing
Instance for VRF-A Process
CE-RIP-A Backbone
Instance for VRF-B VRF-B Routing Table Multiprotocol
BGP
CE-RIP-B
CE-RIP-A Backbone
Instance for VRF-B VRF-B Routing Table Multiprotocol
BGP
CE-RIP-B
• The RIP routes entered in the VRF routing table are redistributed into BGP
for further propagation into the MPLS VPN backbone.
• Redistribution between RIP and BGP has to be configured for proper
MPLS VPN operation.
PE Router
RIP Routing Process
VRF-A Routing Table BGP Routing
Instance for VRF-A Process
CE-RIP-A Backbone
Instance for VRF-B VRF-B Routing Table Multiprotocol
BGP
CE-RIP-B
• The RIP routes entered in the VRF routing table are redistributed into BGP
for further propagation into the MPLS VPN backbone.
• Redistribution between RIP and BGP has to be configured for proper
MPLS VPN operation.
PE Router
RIP Routing Process
VRF-A Routing Table BGP Routing
Instance for VRF-A Process
CE-RIP-A Backbone
Instance for VRF-B VRF-B Routing Table Multiprotocol
BGP
CE-RIP-B
• Routes redistributed from BGP into a VRF instance of RIP are sent to RIP-speaking CE
routers.
PE Router
RIP Routing Process
172.16.10.0/24 VRF-A Routing Table BGP Routing
Instance for VRF-A RD: 1:100 Imp. RT: 1:100 Process
172.16.10.0/24 172.16.10.0/24
CE-RIP-A Backbone
Instance for VRF-B VRF-B Routing Table Multiprotocol
BGP
CE-RIP-B
1:100 172.16.10.0/24
RT: 1:100
Instance for VRF-A
172.16.10.0/24
Router(config-vrf)#
vpn id oui:vpn-index
• Assigns the VPN ID to the VRF
Router(config-if)#
Cisco IOS and IOS ip vrf forwarding vrf-name
XE
CE-B1 CE-B2
PE-X PE-Y
ip vrf Customer_A
rd 6111:11
route-target both 64500:11
!
ip vrf Customer_B
rd 6111:12
route-target both 64500:12
!
interface GigabitEthernet1/0/0
ip vrf forwarding Customer_A
ip address 10.1.0.1 255.255.255.252
!
interface GigabitEthernet1/1/0
ip vrf forwarding Customer_B
ip address 10.2.0.1 255.255.255.252
MP-BGP
PE P P PE
MPLS Backbone
BGP BGP
PE P P PE
MPLS Backbone
Router(config-router)#
address-family vpnv4
Router(config-router)#
address-family ipv4 vrf vrf-name
Router(config-router)#
address-family vpnv4
Router(config-router-af)#
neighbor ip-address next-hop-self
• The next-hop-self keyword can be configured on the MP-IBGP
session for MPLS VPN configuration if EBGP is being run with a
CE neighbor.
Router(config-router-af)#
neighbor ip-address send-community [standard | extended
| both]
address-family ipv4
neighbor 172.16.32.14 activate
neighbor 172.16.32.27 activate
! Step#2 – VPNv4 route exchange
address-family vpnv4
neighbor 172.16.32.15 activate
neighbor 172.16.32.27 activate
MPLS VPN Backbone
CE-X1 CE-Y1
AS 64500
CE-B1 CE-B2
PE-X PE-Y
• These commands are the same in Cisco IOS , IOS XE, and IOS XR
Software.
• Configure an OSPF PE-CE routing session
• Configure a BGP PE-CE routing session
• Describe how to troubleshoot MPLS VPNs
REFERENCE TOPIC
PE Router PE Router
ABR ABR
4. The interarea route
is propagated into
other areas.
• Extended BGP communities are used to propagate OSPF route types across the
BGP backbone.
• OSPF cost is copied into the MED attribute.
BGP
10.0.0.0/8
Backbone OSPF RT = 1:1:0
Internal OSPF routes MED = 768
transformation. BGP
10.0.0.0/8
Backbone OSPF RT = 1:5:1
External OSPF routes MED = 768
RIP Area 2
Follow these steps to configure OSPF as the PE-CE routing
protocol:
• Configure a per-VRF copy of OSPF.
• Configure redistribution of MP-BGP into OSPF.
• Configure redistribution of OSPF into MP-BGP.
router(config)#
router ospf process-id vrf vrf-name
... Standard OSPF parameters ...
• This command starts the per-VRF OSPF routing process.
router(config-router)#
redistribute bgp as-number subnets
• This command redistributes MP-BGP routes into OSPF. The
subnets keyword is mandatory for proper operation.
router(config)#
router bgp as-number
address-family ipv4 vrf vrf-name
redistribute ospf process-id [match [internal]
[external-1] [external-2]]
• OSPF-BGP route redistribution is configured with the redistribute
command under the proper address-family command.
2. The OSPF route is received by a PE router,
redistributed into MP-BGP, and propagated
across the MPLS VPN backbone.
BGP Backbone
3. The route from the superbackbone
is inserted as the interarea route.
Area 1 Area 2
1. The local subnetwork is announced to the PE router.
• A down bit has been introduced in the options field of the OSPF LSA header.
• PE routers set the down bit when redistributing routes from MP-BGP into OSPF.
• PE routers never redistribute OSPF routes with the down bit set into MP-BGP.
2. An OSPF route is received by a PE router, redistributed into
MP-BGP, and propagated across the MPLS VPN backbone.
BGP Backbone
3. The route from the superbackbone is inserted
as the interarea route.
Area 1 Area 2
1. The local subnetwork is announced without the down bit.
2. The OSPF route is propagated with the down 3. Because of administrative distances,
bit set. an OSPF route is preferred over an
MP-IBGP route. Packet flow across
the network is not optimal.
BGP Backbone
Another OSPF or
Area 1 Area 2 Non-OSPF Site
1. The OSPF route is received by a PE router
and redistributed into MP-BGP and OSPF.
1. The OSPF route is propagated with the down 2. The OSPF route is ignored because
bit set. the down bit is set.
BGP Backbone
Another OSPF or
Area 1 Area 2 Non-OSPF Site
Packet flow across the network is optimal.
Troubleshooting MPLS VPNs
Perform basic MPLS troubleshooting:
• Is Cisco Express Forwarding enabled?
• Are labels for IGP routes generated and propagated?
• Are large labeled packets propagated across the MPLS backbone
(maximum transmission unit issues)?
2. Are routes redistributed into MP-BGP 5. Are VPNv4 routes inserted into
with the proper extended communities? VRFs on other PE routers?
P-Network
CE-Spoke P CE-Spoke
show route
PE-1 PE-2
CE-Spoke P CE-Spoke
Is Cisco Express Forwarding
enabled on the ingress PE
router interface?
PE-1 PE-2
CE-Spoke CE-Spoke
Is the LFIB entry on the
egress PE router correct?
show cef vrf vrf-name ip-prefix/length detail
P-Network
CE-Spoke P CE-Spoke
show cef interface
PE-1 PE-2
CE-Spoke CE-Spoke
• Check for summarization issues. The BGP next hop should be
reachable as a host route.
• Quick check—If TTL propagation is disabled, the trace from PE-2 to
PE-1 should contain only one hop.
• If needed, check LFIB values hop by hop.
• Check for MTU issues on the path. MPLS VPN requires a larger label
header than pure MPLS.
P-Network
CE-Spoke P CE-Spoke
PE-1 PE-2
CE-Spoke CE-Spoke
show cef vrf vrf-name ip-prefix/length detail
show mpls forwarding vrf vrf-name value detail
P-Network
CE-Spoke P CE-Spoke
PE-1 PE-2
CE-Spoke CE-Spoke
Cisco IOS and IOS XE
show ip ospf database Control Plane
show ip bgp
show ip eigrp topology Routing Protocol
Data Plane
show ip cef
show ip cef vrf
IP Forwarding Table (FIB)