Overview of MPLS Basic Operation and in Depth Config Part 1590764138
Overview of MPLS Basic Operation and in Depth Config Part 1590764138
10.1.1.1 10.1.1.1
Routing
Routing lookup
lookup
Routing
lookup
10.1.1.1
10.1.1.1
Primary
OC192 link
Large Site A Large Site B
Backup
OC48 link
Small Site C
• Most traffic goes between large sites A and B and uses only the primary link.
• Destination-based routing does not provide any mechanism for load
balancing across unequal paths.
• Policy-based routing can be used to forward packets based on other
parameters, but this is not a scalable solution.
Basic MPLS Concepts
Efficiency of Switching
Postal network forwards based on Zip Code
Carrier delivers based on name and address
Postal
Name Network Name
Address Address
City, State 01022 City, State 01022
MPLS
IP Address
Port
Network IP Address
Port
Label 01022
MPLS Components
Customer Edge Router—Connects to provider network (no MPLS)
Ingress LSR —Translates IP destination address to label, commonly
referred to as a provider edge (PE) router
Transit LSR —Switches packets based on labels, commonly referred to as
provider (P) router or core LSR
Egress LSR —Removes label and forwards packet to customer edge,
also commonly referred to as a PE router
Customer Edge Ingress LSR Transit LSR Egress LSR Customer Edge
Customer Customer
IP Network IP Network
MPLS Provider
Network
Route Switch Route
Basic MPLS Concepts
Primary
OC192 link
Large Site A
Large Site B
Secondary
OC48 link
Small Site C
Control Plane
OSPF
OSPF: 10.0.0.0/8 OSPF: 10.0.0.0/8
Data Plane
Labeled packet LFIB Labeled packet
Label 17 4→17 Label 4
MPLS Domain
Edge
LSR
LSR
LSR
IP Routing Table
Exchange of
labels
Label Distribution Protocol
Edge LSR
IP Routing Table
Exchange of
labels
Label Distribution Protocol
Incoming
Data Plane Outgoing
IP packets IP packets
IP Forwarding Table
Incoming Outgoing
labeled packets labeled packets
Label Forwarding Table
MPLS Label Assignment &
Distribution
MPLS Label Format
MPLS uses a 32-bit label field that contains the following information:
• 20-bit label (a number)
• 3-bit experimental field (usually used to carry IP precedence value)
• 1-bit bottom-of-stack indicator (indicates whether this is the last label before the
IP header)
• 8-bit TTL (equal to the TTL in IP header)
MPLS Labels
Frame
Label 1 Label 2 Label 3 IP Header Payload
Header
PID=MPLS-IP
S=1
S=0 S=0
Customer
IP Network
Label Distribution Protocol (LDP)
LSP direction
(Packet flow)
Source Destinatio
nX
Upstream Downstream
platform platform
tR1 tR2 i3
LDP Identifier
a b c d n
• LDP Identifier
– The six byte concatenation of the LSR ID
and LABEL SPACE ID results in the LDP
Identifier. This uniquely identifies the label
space.
LDP Session
MPLS_A
MPLS_B
1.0.0.1 1.0.0.2
MPLS_A
MPLS_B
Establish TCP session
1.0.0.1 1.0.0.2
Initialization message
MPLS_A
MPLS_B
Establish TCP session
1.0.0.1 1.0.0.2
Initialization message
Initialization message
Keepalive
MPLS_A
MPLS_B
Establish TCP session
1.0.0.1 1.0.0.2
Initialization message
Initialization message
Keepalive
Keepalive
Address message ….
• LSR2 discovers a ‘next hop’ for a particular FEC • LSR1 recognizes LSR2 as its next-hop for an FEC
• LSR2 generates a label for the FEC and • A request is made to LSR2 for a binding between
communicates the binding to LSR1 the FEC and a label
• LSR1 inserts the binding into its forwarding tables • If LSR2 recognizes the FEC and has a next hop for
it, it creates a binding and replies to LSR1
• If LSR2 is the next hop for the FEC, LSR1 can use
that label knowing that its meaning is understood • Both LSRs then have a common understanding
Both methods are supported, even in the same network at the same time
For any single adjacency, LDP negotiation must agree on a common method
Label Switched Path
LSP
Label Switched Path
Customer
IP Network
Core
Functions
Edge
Customer
Functions
IP Network
LSP Details
Frame
IP Header Payload
Header
Layer 2 Layer 3
Routing
lookup and
label
assignment
Frame
Label IP Header Payload
Header
Layer 2 Layer 2½ Layer 3
Cell_Mode MPLS
Frame
IP Header Payload
Header
Layer 2 Layer 3
Frame
Label IP Header Payload
Header
Layer 2 Layer 2½ Layer 3
VPI/VCI fields are
used for label
switching
ATM
Cell 2 Payload
Header
MPLS Forwarding
MPLS Domain
MPLS Domain
10.1.1.1 1/3 1/3 1/3 1/3 1/5 1/5 1/5 1/5 10.1.1.1
• Labels (VPI/VCI) are imposed during the IP lookup process on ingress ATM edge LSRs. Packets
are segmented into cells.
• ATM LSRs in the core swap labels based on the contents of the ATM switching table. ATM LSRs
cannot forward IP packets.
• On egress ATM edge LSRs the labels are removed (cells are reassembled into packets) and a
routing lookup is used to forward packets.
MPLS Applications
MPLS Applications
MPLS is already used in many different applications:
• Unicast IP routing
• Multicast IP routing
• Traffic Engineering (MPLS TE)
• QoS
• Virtual private networks (MPLS VPN)
Regardless of the application, the functionality is always split
into the control plane and the data plane:
• The applications differ only in the control plane.
• They all use a common label-switching data plane.
• Edge LSR Layer 3 data planes may differ.
• In general, a label is assigned to a forwarding equivalence
class (FEC).
Unicast IP Routing
• Two mechanisms are needed on the control plane:
• IP routing protocol (OSPF, IS-IS, EIGRP, ...)
• Label distribution protocol (LDP or TDP)
• A routing protocol carries the information about the
reachability of networks.
• The label distribution protocol binds labels to
networks learned via a routing protocol.
• The forwarding equivalence class (FEC) is equal to a
destination network, stored in the IP routing table.
Control Plane
Unicast Multicast MPLS Traffic Quality of Service MPLS/VPN
IP Routing IP Routing Engineering
LDP or TDP PIM version 2 LDP RSVP LDP or TDP LDP BGP
Data Plane
Label forwarding table
MPLS Layer 3 VPNs
Virtual Network Models
Virtual Networks
VPN B VPN A
VPN C VPN C
VPN B VPN A
VPN A
VPN A VPN C
VPN B
VPN B VPN C
VPN C VPN B
MPLS VPN Topology
VPN C/Site 2
CEA2 12.1/16
VPN B/Site 1
CE1B1 Static CEB2
11.1/16 RIP
11.2/16
RIP
P1 PE2
2
CE B1
VPN B/Site 2
BGP
RIP PE1
P2 CEA3
Static RIP
CEA1
16.2/16
P3 PE3
BGP
CEB3 VPN A/Site 2
16.1/16
12.2/16 VPN C/Site 1
VPN A/Site 1
VPN Routing and Forwarding
Instance (VRF)
192.168.100.2 192.168.100.1
CE2 PE2 OSPF PE1
PE Router – VRF Routing Table Output
VPN Routing
Table
• Define a unique VRF for 195.12.2.0/24
interface 0 VPN-A CE
• Define a unique VRF for VRF for VPN-A
interface 1
• Packets will never go VPN-A 0
between int. 0 and 1 PE
1
• Uses VPNv4 to exchange VRF
routing information between VRF for VPN-B
PE’s VPN-B
CE
• No MPLS yet… 146.12.7.0/24 Global Routing
Table
VRF Route Population
VPN1
Customer-2
CE MPLS Domain
CE
Customer-1
eBGP, EIGRP,OSPF, RIPv2,Static
PE
iBGP Domain
Paris
London
CE CE
VPN-v4 update:
RD:1:27:149.27.2.0/24,
PE-1 Next-hop=PE-1 PE-2
BGP, OSPF, RIPv2 update RT=VPN-A
149.27.2.0/24,NH=CE-1 Label=(28)
VPN-v4 update:
PE-1 RD:1:27:149.27.2.0/24, PE-2
BGP, OSPF, RIPv2 update Next-hop=PE-1
149.27.2.0/24,NH=CE-1 RT=VPN-A
Label=(28)
Paris London
149.27.2.0/24
Paris London
149.27.2.0/24
VPN1
Customer-2
CE MPLS Domain
CE
Customer-1
eBGP, EIGRP,OSPF, RIPv2,Static
PE
iBGP Domain
PE PE
Virtual Leased Line
ATM/FR
ATM/FR
Virtual Circuits
Ethernet
Segment
ISP C
PE PE ISP B
ISP 2
PE PE
ISP 1
PE PE
Ethernet Enterprise
ISP 3
Segment LAN
• Port-mode
Allows a frame coming into an interface to be packed into an MPLS packet
• VLAN-mode
Forwards frames from a SRC 802.1Q VLAN to a DST 802.1Q VLAN
PPP/HDLC over MPLS
MPLS Network
Customer Edge
Customer Edge
• Mandatory:
• Enable CEF switching.
• Configure label pool (mandatory in some IOS software releases).
• Configure Tag Distribution Protocol or Label Distribution Protocol on every label-
enabled interface.
• Optional:
• Configure MTU size for labeled packets.
• Configure IP TTL propagation.
• Configure conditional label advertising.
Configuring IP CEF
router(config)#
ip cef [distributed]
• Starts CEF switching and creates the FIB table
• Distributed keyword configures distributed CEF
(running on VIP or line cards)
• All CEF-capable interfaces run CEF switching
router(config-if)#
no ip route-cache cef
• Disables CEF switching on an interface
• Usually not needed
Monitoring IP CEF
router(config-if)#
tag-switching ip
ip cef
Enable MPLS on all core
interfaces in your network. interface hssi 1/0
mpls ip
interface fastethernet 0/0
mpls ip
C1 A B C C2
Cat6000
Provider Network
ip cef
router(config-vrf)#
rd route-distinguisher
ip vrf Customer_ABC
rd 12703:15
route-target export 12703:15
route-target import 12703:15
Assigning an Interface to
VRF Table
router(config-if)#
ip vrf forwarding vrf-name
ip cef
!
interface serial 0/0
ip vrf forwarding Customer_ABC
ip address 10.0.0.1 255.255.255.252
Sample VPN Network
CE-BGP-A1 CE-BGP-A2
PE-Site-X PE-Site-Y
CE-RIP-B1 CE-RIP-B2
router(config-router)#
address-family vpnv4
router(config)#
router bgp AS-number
neighbor IP-address remote-as AS-number
neighbor IP-address update-source loopback-interface
router(config-router-af)#
neighbor IP-address activate
router(config-router-af)#
neighbor IP-address next-hop-self
router(config-router)#
no bgp default route-target filter Cisco IOS Release 12.1(4)T
Usage guidelines:
• Extended BGP communities attached to VPNv4
prefixes have to be exchanged between MP-BGP
neighbors for proper MPLS VPN operation.
• To propagate standard BGP communities between
MP-BGP neighbors, use the both option.
Sample VPN Network
MP-IBGP Configuration
CE-BGP-A1 CE-BGP-A2
PE-Site-X PE-Site-Y
interface loopback 0
CE-RIP-B1 ip address 172.16.1.1 255.255.255.255 CE-RIP-B2
!
router bgp 115
neighbor 172.16.1.2 remote-as 115
neighbor 172.16.1.2 update-source loopback 0
!
address-family vpnv4
neighbor 172.16.1.2 activate
neighbor 172.16.1.2 next-hop-self
neighbor 172.16.1.2 send-community both
Basic MPLS Monitoring Commands.
Basic MPLS Monitoring Commands
router(config)#
show tag-switching tdp parameters
• Displays TDP parameters on the local router
router(config)#
show tag-switching interface
show mpls interface Cisco IOS Release 12.1(3)T
router(config)#
show tag-switching tdp discovery
• Displays all discovered TDP neighbors
show tag-switching interface
router(config)#
show tag-switching tdp neighbor
• Displays individual TDP neighbors
router(config)#
show tag-switching tdp neighbor detail
• Displays more details about TDP neighbors
router(config)#
show tag-switching tdp bindings
• Displays Tag Information Base (TIB)
show tag tdp neighbor
router(config)#
show tag-switching forwarding-table
show mpls forwarding-table
• Displays contents of LFIB
router(config)#
show ip cef detail
• Displays label(s) attached to a packet during label
imposition on edge LSR
Monitoring Label Switching
Monitoring LFIB
router#
show ip vrf
router#
show ip vrf detail
router#
show ip vrf interfaces
Router#show ip vrf
Name Default RD Interfaces
SiteA2 103:30 Serial1/0.20
SiteB 103:11 Serial1/0.100
SiteX 103:20 Ethernet0/0
Router#
show ip vrf detail
router#
show ip protocols vrf name
router#
show ip route vrf name …
router#
show ip bgp vpnv4 vrf name …
… rest deleted …
show ip bgp vpnv4 vrf neighbor
… rest deleted …
Monitoring MP-BGP Sessions
router#
show ip bgp neighbor
... Continued
show ip bgp neighbor
... Continued
router#
telnet host /vrf name
router#
ping vrf name …
router#
trace vrf name …
Customer B Customer C
PE Router X P Router PE Router Y
P-Network
Customer C Customer A
Customer B Customer C
PE Router X P Router PE Router Y
P-Network
Customer C Customer A
Customer B Customer C
PE Router X P Router PE Router Y
P-Network
Customer C Customer A
Customer B Customer C
PE Router X P Router PE Router Y
P-Network
Customer C Customer A
Conclusion:
BGP is used to exchange customer routes directly between PE routers.
Routing Information Propagation Across
the P-Network (cont.)
Customer B Customer C
PE Router X P Router PE Router Y
P-Network
Customer C Customer A
https://www.facebook.com/ClearConceptsNetworks
ClearConceptsNetworks