Title: MPLS Forwarding
1Lecture 7
2MPLS Forwarding
- MPLS forwarding can be described in terms of
- Label imposition
- Label disposition
- Label swapping
3Label Imposition
- The action of adding the label to an unlabeled
packet is known as label imposition. - For example, an edge LSR performs label
imposition. - Label imposition involves
- IP address lookup in the FIB to map the packet to
a particular FEC - FEC-to-NHLFE lookup in the LFIB
4Label Swapping
- Label swapping forwarding operation applies to
transit nodes along an LSP. - In the case of label swapping, the LSR
- uses top label in the incoming packet to identify
ILM - uses ILM to identify one or more NHLFE
- Uses the information in the NHLFE to Perform the
required label stack operation - encodes the new label stack and transmits the
labeled packet on the appropriate outgoing
interface - Label swapping operation only uses LFIB table
5Label Disposition
- The action of removing label stack from a label
stack is known as label disposition. - Label disposition is performed in the egress node
for an LSP. - In the case of label disposition, the LSR
- uses top label in the incoming packet to identify
ILM - uses ILM to identify one or more NHLFE
- Uses the information in the NHLFE to Perform the
required label stack operation. - The label stack operation in this case indicates
that the label stack needs to be removed. - In some case (e.g., de-aggregation), an
additional IP address lookup may be required to
forward the unlabeled packet.
6MPLS Forwarding Architecture
- Edge LSRs make use of both FIB and LFIB
- Transit LSRs can forward labeled traffic based on
LFIB - Each LSR may carry a mix of IP and MPLS traffic
- In general, each LSR supports both conventional
IP forwarding (i.e., FIB) and label switching
based forwarding (i.e., LFIB) components. - In MPLS, LIB is the counterpart of RIB and LFIB
is the counterpart of the FIB.
7(No Transcript)
8FIB and LFIB Synchronization
- Exchange dynamic routing information and label
information with peers - Process the routing information and build the
FIB. Process the local/remote label and build the
LIB. - Select the best paths. Build LFIB from LIB.
- Distribute the FIB/LFIB to the line cards.
Initially, entire database. Later, incremental.
9Label Distribution Protocol (LDP)
Big Picture
10 Label Distribution Methods
- To establish label switch paths, LSRs must be
able exchange label information. - MPLS uses multiple protocols for this purpose,
namely - Label Distribution Protocol (LDP)
- RSVP-TE
- BGP
- Each label distribution protocol has certain
characteristics that meets application specific
requirements e.g - LDP maps unicast IP destinations into labels and
establishes a hop-by-hop routed LSP - RSVP is used to establish a LSP along explicit
path. - BGP is used to assign and distribute labels for
BGP routes.
11MPLS Applications
- MPLS enables a diverse set of applications such
as - IP over MPLS
- Traffic Engineering
- Virtual Private Networks (VPNs)
- IP over MPLS
- Use hop-by-hop routed LSP to route IP traffic
- Label distribution via LDP
- Traffic Engineering
- Use explicitly routed LSPs with QoS
- Label distribution via RSVP-TE
- VPN
- Share common transport network among multiple
customers - Label distribution via LDP and BGP
12 Label Distribution Protocol (LDP)
- MPLS label distribution protocols are either
extend existing protocols or define new
protocols. - For example, RSVP-TE and BGP label distribution
protocols are based on extensions of the existing
protocols. - LDP is a protocols that is explicitly designed
for distribution label information between
directly or indirectly connected LSRs.
13 Label Distribution Protocol (LDP)
- LDP assigns labels to IGP prefixes and as a
result establishes hop-by-hop routed LSP. - LSP that are established via LDP essentially
traverse along path that would be followed by all
packets in certain FEC if they were routed using
conventional IP forwarding. - In a nutshell, LDP assigns labels to the FEC. As
a result, the LSPs that are established via LDP
mimic or track the IGP Path. - For example, if a next hop for a certain FEC
changes, the corresponding LSP path also changes.
14(No Transcript)
15(No Transcript)
16(No Transcript)
17Downstream and Upstream LSRs
18Label Distribution Modes
- In MPLS, it is always the downstream LSR that
assigns the FEC-to-label bindings and distribute
them to the upstream LSR. - The downstream LSR distributes bindings in two
ways - On explicit request from the upstream LSR
- Unsolicited
- The label distribution mode when the upstream LSR
makes an explicit request for label-to-FEC
bindings is known as downstream-on-demand (DoD). - The label distribution mode when the downstream
LSR distributes label-to-FEC bindings without
explicit requests from the upstream LSR is known
as downstream-unsolicited (DU).
19Downstream-on-Demand (DoD)
- LSRs assign a label to each FEC (usually
triggered when IGP learns about a prefix) - Upstream LSRs request labels to downstream
neighbors - Downstream LSRs distribute labels upon request
20Downstream Unsolicited (DU)
- LSRs assign a label to each FEC
- Downstream LSRs distribute labels unsolicited
21 Label Information Base (LIB)
- LDP maintains all locally assigned (i.e.,
incoming) and remotely learned (i.e., outgoing)
labels in a Label Information Base (LIB). - Each entry in the LIB consists of
- destination address,
- incoming label (assigned by the LSR itself)
- one or more pair of the form (LDP Identifier, out
label). - For LSP established using LDP, incoming and
outgoing label information is used to populate
Label Forwarding Information Base (LFIB).
22LIB/LFIB
23Downstream-on-Demand (DoD)
24Downstream Unsolicited (DU)
R4 learns about 172.32.0.0/16 via IGP. Assigns a
local label. L1. And advertises unsolicited this
label-to-FEC mapping to LDP peers
Here is FEC/L3
Here is FEC/L1
R2
Here is FEC/L2
FEC
172.32.0.0/16
IGP
R1
R4
R3
25Label Retention Modes
- There are two modes to retain labels from peers
namely liberal and conservative retention modes. - In liberal retention mode, LSR retains labels
from all neighbors (whether valid next hops or
not for the associated FEC) - Pros faster convergence and LSP adaptation to
next hop changes. This is because in label/FEC
mappings from a new next hop already exist and
dont need to be requested. - Cons - Require more memory and larger label space
- In conservative retention mode, LSR retains
labels only from valid next-hops neighbors (i.e.,
discards all labels/FEC mappings except received
from valid next-hops) - Pros Free memory and label space
- Cons Slower LSP adaptation to changes in next
hops.
26Label Retention Modes
27Label Distribution Control (Ordered vs.
Independent)
- There are two modes for LSP control ordered and
independent. - In ordered LSP control, a LSR only binds and
advertise a label for a particular FEC if - it is the egress LSR for that FEC or
- it has already received a label binding from its
next-hop - Pros packets are not forwarded onto the LSP
until the complete LSP is established - Cons Slower. Introduces dependencies in LSP
establishment process. For example, a LSP may
have a local label/FEC mappings but cannot
advertise it because it must wait for the remote
(out) label/FEC mappings.
28Example- DoD/Ordered Control
2
Request label for 172.32.0.0/16
Request label for 172.32.0.0/16
1
3
Use label 7
Use label 5
4
R2
FEC
172.32.0.0/16
IGP
R1
R4
R3
29Label Distribution Control (Ordered vs.
Independent)
- In independent LSP control, a LSR binds a label
to a FEC independently from the label it has to
receive from its next-hop - Pros Faster. Does not introduce extra latency.
- Cons - An LSR may label forward packet to a
next-hop that does not have yet label information
for that FEC. Packets may be dropped in the core
until LSP set-up is complete.
30DoD/Independent LSP Control
4
Request label for 172.32.0.0/16
Request label for 172.32.0.0/16
1
5
Use label 7
Use label 5
2
R2
FEC
172.32.0.0/16
R1 starts sending the traffic for 172.32.0.0/16
with label 7
3
IGP
R1
R4
R3
Between R2-R4 traffic is forwarded using IP.
31Independent LSP Control
Depending upon the amount of traffic is routed on
IP forwarding, the forwarding performance of some
LSRs may suffer.
32Commonly used LDP Modes
- Frame-based LSR typically use
- DU label advertisement
- Conservative label retention mode
- Ordered label distribution
- Cell-based LSR typically use
- DoD label advertisement mode
- Conservative label retention mode
- Ordered label distribution
33Summary of LDP modes
34LDP Mechanics
- Neighbor Discovery
- Session Establishment
- TCP Connection Establishment
- LDP Session Initialization
- Session Maintenance
- Label Advertisement
35LDP Discovery
- Before establishing LDP sessions, the potential
LDP neighbors are discovered. - To discover directly connected neighbours
- LSR periodically transmits Hellos as UDP packets
over each LDP interface - LDP Link Hellos are addresses to all routers on
the subnet - Hello messages use UDP port 646.
- Reception of Hello on an interface establishes a
Hello Adjacency on the that interface with the
sender . - A separate Hello Adjacency is on each interface.
36Session Establishment
- Creation of Hello Adjacency triggers
establishment of TCP connection. - For establishing LDP sessions, TCP port 646.
- Once TCP connection has been established, two
LSRs exchange LDP Initialisation message to
negotiate parameters. - After successful negotiation of parameters, two
LSRs are LDP peers and ready for label
advertisement messages.
37Session Establishment
- LSR1 receives Hello LSR20 on link.
- LSR1 attempts to open LDP TCP connection to LSR2.
- LSR1 and LSR2 negotiate session parameters via
exchange of Initialization messages e.g.,
advertisement mode, label range.
38Initialization Message
The encoding for the Initialization Message
is 0 1
2 3 0 1 2 3 4 5 6 7 8 9 0 1
2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-------------------------
------- 0 Initialization (0x0200)
Message Length
-------------------------
------- Message
ID
-------------------------
------- Common
Session Parameters TLV
-------------------------
------- Optional
Parameters
-------------------------
-------
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4
5 6 7 8 9 0 1 ---------------
----------------- 00
Common Sess Parms (0x0500) Length
-----------------
--------------- Protocol
Version KeepAlive Time
-------------------
------------- AD Reserved
PVLim Max PDU Length
---------------------
-----------
Receiver LDP Identifier
----------------
----------
------
39Initialization Message
ATM Session Parameters Used when an LDP session
manages label exchange for an ATM link to specify
ATM-specific session parameters. 0
1 2
3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8
9 0 1 2 3 4 5 6 7 8 9 0 1
-------------------------
------- 00 ATM Sess Parms
(0x0501) Length
-------------------------
------- M N D
Reserved
-------------------------
------- ATM Label
Range Component 1
-------------------------
-------
-------------------------
------- ATM Label
Range Component N
-------------------------
-------
40Hello Adjacencies and Sessions
- Recall, label space refers to set of unique label
values. - Label space be implemented system wide (global)
and/or per interface - Per interface label space is used on LC-ATM
interfaces - System wide label space is implemented on
frame-based LSRs - A LSR may have one or more Hello adjacencies.
However, as long as parallel links use global
label space, only one LDP session is established. - On ATM interfaces, however, a separate LDP
session is established per interface.
41Label Space Identification
- LDP label space is identified by LDP Identifier
(LDP Id). - LDP Id is six bytes in length
- first 4 bytes represent router ID
- last 2 bytes indicate label space
- Global label space, last 2 bytes contain 0
- 172.32.23.120
- Per interface label space, last 2 bytes contain gt
0 - 172.32.23.125
42LDP Session Between Directly Connected LSRs
Global label space
LSR 20
LSR 10
43LDP Session Between Directly Connected LSRs
44LDP Session Between Non-Directly Connected LSRs
LSR7
LSR1
R1
R4
LSR1 and LSR7 uses to discover each other and
establish hello adjacency
45Session Maintenance
- A Hello adjacency is created on receiving the
first hello. - Once created, LSR maintains a Hello adjacency by
periodic transmission of Hellos - LSR keeps a hold timer for each Hello adjacency.
If no Hello is received before expiration of the
hold timer, adjacency is deleted. - As long as there is at least one adjacency, the
corresponding LDP session is retained. Upon
deletion of last adjacency, the LDP session is
removed. - Once LDP session is established, the integrity of
LDP session is maintained by periodic
transmission of KeepAlive messages.
46(No Transcript)