Você está na página 1de 42

APRICOT 2014 MPLS WORKSHOP

INTRODUCTION TO MPLS
Speaker Name
Date

COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

AGENDA

1. Introduction to MPLS
2. MPLS Terminology
3. Fundamentals of MPLS

4. Label Distribution Protocol (LDP)

3
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

INTRODUCTION TO MPLS

MPLS IS A LABEL SWITCHING TECHNOLOGY THAT COMBINES THE TRAFFIC ENGINEERING


CAPABILITIES OF ATM WITH THE FLEXIBILITY AND SCALABILITY OF IP
MPLS PROVIDES THE ABILITY TO ESTABLISH CONNECTION -ORIENTED PATHS OVER A
CONNECTIONLESS IP NETWORK, AND FACILITATES A MECHANISM TO ENGINEER NETWORK
TRAFFIC PATTERNS INDEPENDENTLY OF SHORTEST PATH ROUTING TABLES

MPLS TECHNOLOGY OFFERS MANY SERVICES, INCLUDING LAYER 2 AND LAYER 3 VPN SERVICES,
TRAFFIC ENGINEERING, AND RESILIENCY

4
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MULTI PROTOCOL LABEL SWITCHING


INTRODUCTION
RFC 3031 describes the Multiprotocol Label Switching (MPLS) architecture
The term Multiprotocol indicates that an MPLS architecture can transport payloads from
many different protocols (IPv4, IPv6, Ethernet, ATM, Frame Relay, etc.)
Label Switching describes that an MPLS domain switches, rather than routes, packets in the
Service Provider Core

MPLS routers forward packets using pre-determined labels

5
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
IMPROVING PACKET FORWARDING PERFORMANCE
Label switching was initially considered an improvement over IP packet routing as it involves a
simpler lookup
- 20-bit fixed label size versus 32/128-bit longest match IP destination lookup

Advances in network processors lead to MPLS for Layer 3 packet forwarding performance being
an obsolete use-case

MPLS LABEL

IP SOURCE

IP SOURCE

IP DESTINATION

IP DESTINATION

OPTIONS

OPTIONS

PAYLOAD

PAYLOAD

6
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
IP ROUTING REVIEW
Longest match lookup on
destination address

R1

Prefix

Next-hop

Metric

10.1.1.0/24

R5

50

10.1.1.0/24

R6

20

10.1.0.0/16

R7

10

IP

IP

IP

L2

L2

L2

R2

R3

IP routing follows a simple process at each router:

R5

R4

R6

R7

1. Check and remove the L2 encapsulation header of the incoming packet


2. Examine the L3 (IP) header and perform a longest match lookup on the destination IP address in the
forwarding table
3. Determine the next-hop interface
4. Build a new L2 encapsulation header and forward the packet to the next-hop router, decrementing the
IP TTL/hop count
7
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
LIMITATIONS OF IP FORWARDING PARADIGM
Destination based routing lookup only
- No ability to look at the source address of packets without complicated configuration such as PBR to determine
next-hop
- No ability to steer different types of traffic over different next-hops without PBR

IP over underlay technologies (e.g. ATM)


- Was used extensively in the past to abstract the L2 and L3 topologies of networks by using underlying networks
such as ATM or Frame Relay to build any-to-any paths in large networks
- This approach could build a pseudo-full-mesh in a large scale network to optimize traffic flows
- Has been repeated in the MPLS world with IP-over-MPLS overlays
- Early form of IP TE

Traffic Engineering limitations


- In many networks it is desirable to send different traffic types via different paths (e.g. lowest latency, highest
bandwidth, etc)
- This sort of TE is difficult to represent in IP routing without complicated PBR configurations
- MPLS-TE allows for this information to be reflected in the network, and to map traffic to different path types
selected by the source node
- In many networks, not all links were utilized to get traffic across networks, leading to congestion on some links
and under-utilization on others
8
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
HOW IT HELPS
MPLS is a label based forwarding paradigm
- Separating IP destination from the forwarding lookup

Labels usually correspond to IP destination networks


- Similar to traditional IP routing
- Labels can also correspond to other parameters such as service IDs for pseudowire services, QoS
parameters, traffic engineering tunnel, etc

Separating packet forwarding from destination lookup gives operators flexibility to solve some of
the problems discussed on the previous slide

9
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
HOW IT HELPS DESTINATION BASED FORWARDING LOOKUP
FEC

In-Label

Out-label

Next-Hop

1000

2000

R2

1234

4567

R2

IP

IP

IP

1000

2000

3000

L2

L2

L2

R1

R2

R3

R4

Label based lookup

MPLS changes the forwarding paradigm by using labels and switching between them in the
center of the network
Only edge routers need to be IP aware, core routers are label-aware
Label tables contain ingress label, egress label, next-hop, and action information (push, pop,
swap)
10
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
HOW IT HELPS TRAFFIC ENGINEERING

R2

R3

R1

R4

R5

R6

MPLS gives operators flexibility for traffic engineering (TE) in their networks, including the
ability to use multiple links
Typically, IP will pick the best path (commonly, lowest metric). In topologies such as shown
here, ECMP is not possible to implement due to multiple links and metrics

MPLS-TE can force traffic at the ingress node (R1) to pick specific links, or share traffic across
multiple paths
11
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
HOW IT HELPS TRAFFIC ENGINEERING
1G

10G

1G

R2

R3

10G

1G

R1

1G

10G

1G

R5

R4

R6

In a complex topology, sometimes bandwidth is a key driver


- It might be required to use a higher-bandwidth, but less-metric-preferred path, to carry bulk traffic
across the network

Sometimes latency is a key driver


- Low-latency paths might be preferred for voice traffic

Put other traffic on remaining path(s)


12
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
HOW IT HELPS
Service flexibility and convergence
- Since MPLS matured and the primary goal of IP performance improvements became less relevant, MPLS
has been optimised for service flexibility and delivery
- Delivering Layer 2 services such as point-to-point pseudowires or multipoint services like VPLS
- Delivering Layer 3 services such as L3VPNs (aka VRF, VPRN, IP-VPN, RFC2547bis, RFC4364)
- This allows a single IP core to provide many service types across the network optimizing CAPEX and OPEX
for service providers

Network resiliency
- As part of signalling paths through an IP network, MPLS can signal for backup / alternate paths and allow
both the originating router and mid-point routers perform protection of paths should a link fail
- Typically this is seen as IP networks competing with traditional optical protection mechanisms in SDH or
DWDM platforms

BGP free core operations


- As traffic can be tunneled across the core nodes, BGP can be removed from these nodes allowing for
BGP/L3 only to exist on the IP edge
13
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS TERMINOLOGY
iLER

CE

PE

eLER

Service Provider Terminology

MPLS Terminology
-

PE

- CE: Customer Edge router


- PE: Provider Edge router
- P: Provider (Core) Router

iLER: Ingress Label Edge Router


eLER: Egress Label Edge Router
LSR: Label Switch Router
LSP: Label Switched Path
FEC: Forwarding Equivalence Class

14
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

CE

MPLS TERMINOLOGY
LABEL SWITCHED PATHS
Label
Push

PACKET

CE

Label
Swap

LABEL 1

PE

PACKET

Label
Swap

LABEL 2

PACKET

Label
Pop

LABEL 3

PACKET

PACKET

PE

CE

LSP

Labels are pushed onto packets when they enter the service provider network
Labels are swapped across the network as they transit a core/transit router

Labels are popped when they reach the egress edge of the network
LSPs refer to the end-to-end unidirectional tunnel across the network, regardless of how many
labels it consists of

LSP is a logical entity that reflects the connection between routers


15
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS TERMINOLOGY
FORWARDING EQUIVALENCE CLASS
The Forwarding Equivalence Class (FEC) refers to packets that are forwarded in the same
manner over the same path with the same forwarding treatement

In IP-only networks, FECs usually correspond to an IP prefix in the routing table


- 10.1.1.0/24 with next-hop 192.0.2.1
- Packets destined for 10.1.1.1 and 10.1.1.2 will both be forwarded to 192.0.2.1; meaning they share the
same FEC
- IP-only FEC lookups are performed at each hop

In MPLS networks, FECs can be defined based on destination IP prefixes and other administrative
criteria
- MPLS based FEC lookups are performed only at the ingress LER on incoming packets
- The FEC lookup determines the next-hop LSR and the label to be pushed onto the packet

16
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS TERMINOLOGY
FORWARDING EQUIVALENCE CLASS
FEC

In-Label

Out-label

Next-Hop

1000

2000

R2

1234

4567

R2

R1

FEC lookup

IP

IP

IP

1000

2000

3000

L2

L2

L2

R2

R3

R4

Label swap

FEC lookup is performed at the ingress LER (R1 in this example), and the label is imposed based
on the FEC lookup
LSRs R2 and R3 perform label swap operations

17
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS TERMINOLOGY
PLANES
The Control Plane in a router refers to the processes running
control protocols, such as routing information and MPLS
Control Plane
RIB

- OSPF, IS-IS, LDP, BGP are control plane processes

OSPF

LIB

BGP

FIB

IS-IS
LFIB

Data Plane

The Routing Information Base (RIB) receives all routing


information from routing protocols, and computes the best
path information for the Forwarding Information Base (FIB)
MPLS protocols exchange label bindings for their FECs, which
build the Label Information Base (LIB), which is computed for
the LFIB

The FIB is a data plane (or forwarding plane) function, which


refers to how the line cards will actually forward packets

18
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS ARCHITECTURE
MPLS LABELS
MPLS labels use a 32-bit field thats inserted between the L2 and L3 headers, often referred to
as a shim header
- Known as frame mode

Header format:
-

20 bit Label
3 bit Traffic Class field (aka EXPerimental, or Class of Service)
1 bit Bottom of Stack field
MPLS
Ethernet
Packet
8 bit Time To Live (TTL) field
Shim
MAC

Payload

(0x8847 or
0x8848)

20 bits

3 bits 1 8 bits

Label

TC
19
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

TTL

MPLS ARCHITECTURE
SPECIAL LABEL VALUES
Some special MPLS label values have been reserved:
-

0: IPv4 Explicit Null


1: Router Alert
2: IPv6 Explicit Null
3: Implicit Null
- Used for Penultimate Hop Popping (PHP)

- 7: Entropy Label Indicator (ELI)


- 13: GAL Label
- 14: OAM Alert Label

Reserved labels are documented by IANA:


- http://www.iana.org/assignments/mpls-label-values/mpls-label-values.xhtml

20
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS ARCHITECTURE
MPLS LABEL STACK
MPLS allows multiple labels to be inserted to a packet, referred to as stacking
These labels are typically used to provide different functions in the network
- A service label might identify a customer specific VPN
- A transport label might identify the LSP between two routers
- Other labels might be added depending on network complexity and topology, such as Fast Reroute labels

Label stacks impact your MTU, as each time one


label is added the packet size grows by 32 bits
- Its not unusual to have 5-6 labels in a packet in the
core of a network
- Check your routing platforms for limitations around
pushing/popping labels
- Ensure your MTU is engineered correctly!

The bottom label has the S bit set to 1


- Indicating bottom of stack
21
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
LABEL ASSIGNMENT AND DISTRIBUTION
Labels are locally significant
- Meaning that they are only relevant to an LSR

LSR assigns labels to prefixes learnt in the routing table


Label bindings are exchanged by adjacent LSRs
- <Label, Prefix, Mask>

When LSRs are exchanging label binding information, two approaches can be taken:
- Unsolicited mode where the downstream LSR advertises label bindings to all adjacent LSRs, regardless of
whether the adjacent LSR demands the label or not (MP-iBGP, LDP)
- On-demand mode where the downstream LSR advertises label bindings to adjacent LSRs which demand
the label binding (RSVP-TE)

22
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
COMPARISON OF UNSOLICITED AND ON-DEMAND
Unsolicited mode:

20|10.1.2.0/24

Downstream-on-demand mode:

30|10.1.3.0/24

Request label
for 10.1.3.0/24

40|10.1.3.0/24
FEC

In-Label

Out-label

FEC

Next-Hop

In-Label

10.1.2.0/24

20

R2

10.1.3.0/24

40

R2

10.1.3.0/24

10.1.2.0/24

20

Loopback

10.1.3.0/24

40

30

R3

40

R2

10.1.2.0/24

20

Loopback

10.1.3.0/24

40

30

R3

R3
10.1.3.0/24

R3
-

Next-Hop

R2

R2

30

Out-label

R1

R1

10.1.3.0/24

30|10.1.3.0/24

Loopback

23
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

30

Loopback

MPLS
CONTROL MODES
Ordered Control
- LSRs will advertise FECs upstream only when downstream routers have advertised a label for it first

Independent Control
- LSRs will advertise FECs upstream regardless of whether a downstream router has advertised a label for it

I know where
10.1.3.0/24 is and I
will advertise it
now!

I know where
10.1.3.0/24 is, but
I will not advertise
it yet

--|10.1.3.0/24

--|10.1.3.0/24

24
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
LABEL RETENTION MODES
LSRs maintain received label bindings through two approaches
Conservative Retention mode
- A router that does not need a specific label binding will not hold the binding

Liberal Retention mode


- A router that does not need a specific label binding will hold the binding
I dont need the
binding for
10.1.3.0/24 now, I
will delete it

I dont need the


binding for
10.1.3.0/24 now, I
but I will keep it

30|10.1.3.0/24

30|10.1.3.0/24

25
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
PENULTIMATE HOP POPPING

Penultimate Hop Popping (PHP) is when the label at the top of the stack is popped by the
upstream LSR of the egress LER
The egress LER requests the popping through the label distribution protocol
- Egress LER advertises the implicit-null label

This saves a lookup in the egress LER, optimizing performance


26
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
IMPLICIT AND EXPLICIT NULLS
When a downstream router advertises a FEC with the Implicit Null label, it is requesting the
upstream router perform Penultimate Hop Popping
- This removes the transport tunnel MPLS header and leaves the router with only the payload (or service
tunnel header), and can result in a loss of QoS information as the MPLS Transport Class field is no longer
present
- Note: Implicit Null label is a signaling-only label, and not visible in the forwarding plane

A downstream router may also advertise a FEC with the Explicit Null label, which can also be
used for PHP
- The upstream LSR will send the packet to the LER with the Explicit Null label set, which preserves the
Transport Class field
- The LER will not use the MPLS header for anything other than the QoS information
- Thus, the Explicit Null header is visible in the forwarding plane

27
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
TRANSPORT TUNNEL SIGNALING PROTOCOLS
Label Distribution Protocol (LDP)

Resource Reservation Protocol with Traffic


Engineering (RSVP-TE)

Defined in RFC5036

Defined in RFC3209

IGP-based tunnels only

Fully customizable tunnel paths

Simple configuration

Ability to run more complex path calculations


with administrative constraints

Automatic tunnel creation


No Traffic Engineering support

Decoupled from IGP

IGP dependant convergence time

Traffic protection mechanisms

Also called Link or Interface LDP

Higher administrative overhead

Downstream Unsolicited mode

Downstream on Demand mode

Liberal retention

Conservative retention
28
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
SERVICE TUNNEL SIGNALING PROTOCOLS
Targeted LDP (T-LDP)

Multi-Protocol Border Gateway Protocol (MPBGP)

Defined in RFC4447

Based on RFC4364 and many extensions

Used for L2VPNs

Used for L3VPN services, L2VPN services, and


many extensions

Creates an end-to-end session between two PE


routers

Multi-Protocol due to its support for multiple


address families in addition to IPv4

Not to be confused with LDP

29
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
LABEL DISTRIBUTION PROTOCOL (LDP) INTRODUCTION
RFC 3036, later updated by RFC 5036, defines LDP as a label distribution protocol
Routers configured for LDP establish an LDP session between them and become peers
The LDP sessions enable the exchange of label/FEC binding (mapping) information
LDP operates in two distinct modes:
- Link (or interface) LDP - Establishing Transport Tunnels
- Targeted LDP - Establishing Service Tunnels between PE routers

LDP is a TLV based messaging protocol

30
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
LDP: TRANSPORT AND SERVICE TUNNELS

Service 1

Service Tunnel 1

Service 1

Service Tunnel 2

Service 2

Transport Tunnel
Service 2

Link LDP is used to establish transport tunnels


- iLER uses the transport tunnel to reach the eLER

Targeted LDP is used to establish L2VPN service tunnels


- eLER uses the service tunnel for service de-multiplexing

31
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
LDP: LINK LDP

Link LDP sessions are established between all directly adjacent LDP routers
Routers exchange label bindings with each other over LDP sessions
This creates a full-mesh of transport tunnels in the network
LDP relies on IGP for operation and convergence
32
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
LDP: LINK LDP OPERATION OVERVIEW
The following four processes create and maintain a Link LDP session:
- Peer Discovery Routers use LDP Hello messages to automatically discover other LDP peers
- Session Establishment and Management LDP sessions are built between LDP peering routers. Sessions
are maintained via keepalive messages
- Label Management After sessions are established, LDP distributes label bindings, and withdraws them if
necessary
- Notification LDP uses notification messages to alert LDP peering routers about errors

LDP uses both UDP and TCP for transport services


- UDP based messages (port 646)
- Discovery messages periodically announce and maintain an LDP router in a network

- TCP based messages (port 646)


- Session messages establish, maintain, and terminate sessions between LDP peers
- Advertisement messages create, change, and delete label mappings for FECs
- Notification messages signal errors and other events

33
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
LDP: PDU STRUCTURE
Version ( 1 )

PDU Length ( 26 )

LDP Header

LDP ID ( 4 bytes LSR ID + 2 bytes label space)

Message Type ( 0x4001)

Message Length ( 16 )
Message ID

F
FEC Type ( prefix FEC == 2 )

FEC TLV ( 0x100 )

Length ( 8 )

FEC Element Address Type ( ipv4 == 1 )


Prefix ( 100.0.0.2 )

34
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

FEC Element Length ( 32 )

MPLS
LDP: PEER DISCOVERY PROCESS (HELLO)

35
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
LDP: HELLO PARAMETERS
LDP-ID (LDP Identifier): 6-byte field that identifies an LSR uniquely along with its label space.
Used in all the LDP messages
- The LSR ID is typically a loopback/system address
- The Label Space ID identify label space within the LSR. For platform-wide label spaces, it is always set to
zero
LSR ID
Label Space ID
(32-bit router ID)

(16 bits)

Transport Address: A necessary parameter to establish the subsequent LDP session with the
neighbor
Hello Timeout: Routers continue exchanging LDP Hellos after a successful discovery. A neighbor
is declared down if no hello messages are received from that neighbor within the timeout period

36
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
LDP: LDP SESSION ESTABLISHMENT

37
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
LDP: MESSAGE TYPES
TYPE

NAME

FUNCTION

0x0001

Notification

Signals errors and other events

0x0100

Hello

Announces the presence of an LSR

0x0200

Initialization

Starts the session establishment process

0x0201

KeepAlive

Monitors the integrity of the LDP session transport connection

0x0300

Address

Advertises the interface addresses to an LDP peer

0x0301

Address Withdraw

Withdraws a previously advertised interface address

0x0400

Label Mapping

Advertises a FEC-label binding to an LDP peer

0x0401

Label Request

Requests a FEC-label binding from an LDP peer

0x0402

Label Withdraw

Requests the peer remove from its LIB a previously signaled label

0x0403

Label Release

Signals the peer the LSR no longer needs specific FEC-label mappings previously
requested of and/or advertised by the peer

0x404

Label Abort Request

Aborts an outstanding Label Request message

0x3E00 0x3EFF

Vendor Private

Conveys vendor-private information between LSRs

0x3F00 0x3FF

Experimental

LDP experimental extensions undefined use

38
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
LDP: LABEL ADVERTISEMENT
Version =1
LDP-Id = 10.0.0.6:0

203.0.113.0/24

Message-Type = Label
Mapping (0x400)
FEC = 203.0.113.0/24
Label = 132071

Link LDP sessions are established between all adjacent routers


Label bindings are generated for Loopback/System Ips
R6 generates a label binding and advertises it for 203.0.113.0/24
- This is advertised (flooded) throughout the network (Downstream Unsolicited mode)
- Routers may receive the advertisement multiple times in a highly meshed network

39
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
LDP: TARGETED LDP
T-LDP

Used to exchange service labels for Layer 2 Services (VLL, VPLS)


Used independently from its Link LDP counterpart
Peers do not have to be directly connected (typically established between 2 PE routers that
have services configured)
Also used in LDP over RSVP environments

40
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

MPLS
LDP: TARGETED LDP OPERATION

Operation is very similar to Link LDP


T-LDP sends hellos via Unicast
41
COPYRIGHT 2013 ALCATEL-LUCENT. ALL RIGHTS RESERVED.

Você também pode gostar