Multiprotocol Label Switching (MPLS)

advertisement
Multiprotocol Label Switching
(MPLS)
NETE0514
Presented by
Dr.Apichan Kanjanavapastit
Traditional Routing and Packet Switching
• The initial deployment of the Internet addressed the
requirements of data transfer over the network. This
network catered to simple applications such as file
transfer and remote login
• To carry out these requirements, a simple softwarebased router platform, with network interfaces to support
the existing T1/E1– or T3/E3–based backbones, was
sufficient
• As the demand for higher speed and the ability to
support higher-bandwidth transmission rates emerged,
devices with capabilities to switch at the Level-2 (data
link) and the Level-3 (network layer) in hardware had to be
deployed
Traditional Routing and Packet Switching (cont.)
• These early solutions addressed the need for
wire-speed transfer of packets as they traversed
the network, but they did not address the service
requirements of the information contained in the
packets
• Also, most of the routing protocols deployed
today are based on algorithms designed to
obtain the shortest path in the network for packet
traversal and do not take into account additional
metrics (such as delay, jitter, and traffic
congestion), which can further diminish network
performance
Definition
• Multiprotocol label switching (MPLS) is a
technology for packet forwarding and switching
in network routers by using connection-oriented
concept
• Multiprotocol means this technology can
transport various protocols such as IPv4 and
IPv6 and protocols in Layer 2 such as Ethernet,
Frame Relay, and ATM
• Label switching means the packets are switched
based on an identifier (a label)
Advantages of MPLS
• The Use of One Unified Network
Infrastructure
• Better IP over ATM Integration
• BGP-Free Core
• The peer-to-peer model for MPLS VPN
• Optimal Traffic Flow
• Traffic Engineering
MPLS and Its Components
• MPLS is an Internet Engineering Task Force (IETF)–specified
framework that provides for the efficient designation, routing,
forwarding, and switching of traffic flows through the network.
• MPLS performs the following functions:
– specifies mechanisms to manage traffic flows between
different hardware, machines, or different applications
– remains independent of the Layer-2 and Layer-3 protocols
– provides a means to map IP addresses to simple, fixedlength labels used by different packet-forwarding and
packet-switching technologies
– interfaces to existing routing protocols such as resource
reservation protocol (RSVP) and open shortest path first
(OSPF)
– supports the IP, ATM, and frame-relay Layer-2 protocols
Where does MPLS fits in the OSI
Reference Model?
• MPLS is not a Layer 2 protocol because the
Layer 2 encapsulation is still present with
labeled packets
• MPLS also is not really a Layer 3 protocol
because the Layer 3 protocol is also still present
• Therefore, MPLS does not fit in the OSI layering
too well. Perhaps the easiest thing to do is to
view MPLS as the 2.5 layer and be one with it
MPLS Labels
• A label, in its simplest form, identifies the path a packet
should traverse. A label is carried or encapsulated in a
Layer-2 header along with the packet
• The first 20 bits are the label value. However, the first 16
values are exempted from normal use. The bit 20-22 are
3 experimental bits. These bits are used solely for QoS.
Bit 23 is the Bottom of Stack (BoS) bit. It is 0, unless this
is the bottom label in the stack. Bit 24-31 are the eight
bits used for Time To Live (TTL).
Label Stacking
• MPLS-capable routers might need more than one label on top
of the packet to route that packet through the MPLS network
• This is done by packing the labels into a stack. The first label
in the stack is called the top label, and the last label is called
the bottom label. In between, you can have any number of
labels.
• Some MPLS applications actually need more than one label in
the label stack to forward the label packets. Such applications
are MPLS VPN and AToM (Any Transport over MPLS).
Encoding of MPLS Labels
• The label stack sits in front of the Layer 3 packet—that
is, before the header of the transported protocol, but
after the Layer 2 header. Often, the MPLS label stack is
called the shim header because of its placement.
MPLS Label Encoding in ATM Cell
Label Switch Router (LSR)
• Three kinds of LSRs exist in an MPLS network:
ingress LSRs, egress LSRs, and intermediate LSRs
• Ingress LSRs—receive a packet that is not labeled
yet, insert a label (stack), and send it on a data link
• Egress LSRs—receive labeled packets, remove the
label(s), and send them on a data link. Ingress and
egress LSRs are edge LSRs
• Intermediate LSRs—receive an incoming labeled
packet, perform an operation on it, switch the
packet, and send the packet on the correct data link
• An LSR can do 3 operations: pop, push, or swap
Label Switch Router (LSR) (cont.)
• It must be able to pop labels (remove) before
switching the packet out
• An LSR must also be able to push (insert) labels
onto the received packet
• An LSR must also be able to swap a label
• An LSR that pushes labels onto a packet that
was not labeled yet is called an imposing LSR
which normally is an ingress LSR
• An LSR that removes all labels from the labeled
packet before switching out the packet is a
disposing LSR which normally is an egress LSR
Label Switch Router (LSR) (cont.)
Label Switched Path (LSP)
• A LSP is a sequence of LSRs that switch a labeled packet through
an MPLS network or part of an MPLS network
• The first LSR of an LSP is the ingress LSR for that LSP, whereas the
last LSR of the LSP is the egress
• All the LSRs in between the ingress and egress LSRs are the
intermediate LSRs
Label Switched Path (LSP) (cont.)
• The ingress LSR of an LSP is not necessarily the first
router to label the packet if the packet might have been
labeled by a preceding LSR
• Such a case would be a nested LSP—that is an LSP
inside another LSP
Forward Equivalence Class (FEC)
• The forward equivalence class (FEC) is a
group of packets that are forwarded along
the same path and are treated the same
with regard to the forwarding treatment
• The router that decides which packets
belong to which FEC is the ingress LSR
because the ingress LSR classifies and
labels the packets
Some Examples of FECs
• Packets with Layer 3 destination IP addresses matching a certain
prefix
• Multicast packets belonging to a certain group
• Packets with the same forwarding treatment, based on the
precedence or IP DiffServ Code Point (DSCP) field
• Packet with Layer 3 destination IP addresses that belong to a set of
Border Gateway Protocol (BGP) prefixes, all with the same BGP
next hop
Label Distribution
• The first label is imposed on the ingress LSR and the
label belongs to one LSP. The path of the packet through
the MPLS network is bound to that one LSP
• All that changes is that the top label in the label stack is
swapped at each hop
• The ingress LSR imposes one or more labels on the
packet. The intermediate LSRs swap the top label (the
incoming label) of the received labeled packet with
another label (the outgoing label) and transmit the
packet on the outgoing link
• The egress LSR of the LSP strips off the labels of this
LSP and forwards the packet
Label Distribution (cont.)
• Labels are local to each pair of adjacent
routers. They have no global meaning
across the network
• For adjacent routers to agree which label
to use for which prefix, they need some
form of communication mechanism: a
label distribution protocol
Ways of Labels Distribution
• There are two ways of labels distribution
– Piggyback the labels on an existing IP routing
protocol
– Have a separate protocol distribute labels
Piggyback the Labels on an
Existing IP Routing Protocol
• In this way, every existing IP routing protocol
needs to be extended to carry the labels
• The advantage of having the routing protocol
carry the labels is that the routing and label
distribution are always in sync, which means that
you cannot have a label if the prefix is missing or
vice versa
• The implementation for distance vector routing
protocol is straightforward, since each router
originates a prefix from its routing table. The
router then just binds a label to that prefix
Piggyback the Labels on an
Existing IP Routing Protocol (cont.)
• Link state routing protocol do not function in this way
since each router originates link state updates that are
then forwarded unchanged by all routers inside one
area
• The problem is that for MPLS to work, each router
needs to distribute a label for each prefix even the
routers that are not originators of that prefix
• For link state routing protocols, a separate protocol is
preferred to distribute the labels
• None of the IGPs has been changed to deploy the first
method. However, BGP is a routing protocol that can
carry prefixes and distribute labels at the same time.
However, BGP is not an IGP. BGP is used primarily for
label distribution in MPLS VPN networks.
Running a Separate Protocol for
Label Distribution
• The second method has the advantage of
being routing protocol independent
• Several varieties of protocols distribute
labels:
– Tag Distribution Protocol (TDP)
– Label Distribution Protocol (LDP)
– Resource Reservation Protocol (RSVP)
Running a Separate Protocol for
Label Distribution (cont.)
• TDP was the first protocol for label
distribution developed and implemented
by Cisco. TDP is proprietary to Cisco
• IETE later formalized LDP. LDP and TDP
are similar in the way they operate, but
LDP has more functionality
• RSVP is used for MPLS TE (traffic
engineering) only
Label Distribution with LDP
• For every IGP IP prefix in its IP routing table, each LSR
creates a local binding—that is it binds a label to the IPv4
prefix
• The LSR then distributes this binding to all its LDP
neighbors. Those received bindings become remote
bindings
• The neighbors then store these remote and local bindings
in a special table, the label information base (LIB)
• Each LSR has only one local binding per prefix, at least
when the label space is per platform. If the label space is
per interface, one local binding can exist per prefix per
interface
• The LSR can get more than one remote binding per prefix
because it usually has more than one adjacent LSR
Label Distribution with LDP (cont.)
• LSR then needs to pick only one and use that
one to determine the outgoing label for that IP
prefix
• The LSR choose the remote binding received
from the downstream LSR, which is the next hop
in the IP routing table for that prefix
• It uses this information to set up its label
forwarding information base (LFIB) where the
label from the local binding serves the incoming
label and the label from the one remote binding
serves as the outgoing label
Label Distribution with LDP (cont.)
Label Distribution with LDP (cont.)
• When an LSR receives a labeled packet, it is
now capable of swapping the incoming label it
assigned, with the outgoing label assigned by
the adjacent next-hop LSR
Label Distribution with LDP (cont.)
Label Forwarding Instance Base (LFIB)
• The LFIB is the table used to forward labeled
packets
• In the example of IPv4-over-MPLS, the label is
bound on an IPv4 prefix. However, the LFIB can
be populated with labels that LDP does not
assign
• In the case of MPLS TE, the labels are
distributed by RSVP
• In the case of MPLS VPN, the VPN label is
distributed by BGP
MPLS Payload
• The MPLS label has no Network Level Protocol
identifier field
• This field is present in all Layer 2 frames to
indicate what the Layer 3 protocol is
• How does the LSR know what the MPLS
payload is?  Most LSRs especially for
intermediate LSRs don’t need to know, because
they will receive a labeled packet, swap the top
label, and send the packet on the outgoing link
MPLS Payload (cont.)
• However, an egress LSR that is removing all
labels must know what the MPLS payload is,
because it must forward the MPLS payload
further on
• That egress LSR is the one that made the local
binding, which means that that LSR assigned a
local binding to that FEC, and it is that label that
is used as an incoming label on the packet
• Thus, the egress LSR knows what the MPLS
payload is by looking at the incoming label of
which the egress LRS has created local binding
for that FEC
Label Spaces
• The labels used by an LSR for FEC–label
bindings are categorized as follows:
– per platform—The label values are unique across
the whole LSR. The labels are allocated from a
common pool. No two labels distributed on different
interfaces have the same value.
– per interface—The label ranges are associated with
interfaces. Multiple label pools are defined for
interfaces, and the labels provided on those
interfaces are allocated from the separate pools. The
label values provided on different interfaces could be
the same
Label Spaces (cont.)
Per-Interface Label Space
Per-Platform Label Space
Different MPLS Modes
• An LSR can use different modes which
have their own characteristics when
distributing labels to other LSRs which
include:
– Label distribution mode
– Label retention mode
– LSP control mode
Label Distribution Modes
• The MPLS architecture has two modes to distribute label
bindings:
– Downstream-on-Demand (DoD) label distribution mode
– Unsolicited Downstream (UD) label distribution mode
• In the DoD mode, each LSR requests its next-hop LSR
on an LSP, a label binding for that FEC. Each LSR
receives one binding per FEC only from its downsteam
• In the UD mode, each LSR distributes a binding to its
adjacent LSRs, without those LSRs requesting a label
• In the case of DoD, the LIB shows only one remote
binding, whereas in the case of UD, you are likely to see
more than one
Label Retention Modes
• Two label retention modes are possible:
– Liberal Label Retention (LLR) mode
– Conservative Label Retention (CLR) mode
• In LLR mode, an LSR keeps all received remote
bindings in the LIB. However, the label from the
remote binding which received from the downstream
for that FEC is only used in the LFIB
• Why keep the labels around that are not used? 
anytime the routing topology changes due to a link
going down or a router being removed, the LFIB can
be quickly updated with the new outgoing label
Label Retention Modes (cont.)
• The second label retention mode is CLR
mode. An LSR that is running this mode
does not store all remote bindings in the
LIB, but it stores only the remote binding
that is associated with the next-hop LSR
for a particular FEC
LSP Control Modes
• LSRs can create a local binding for a FEC in 2 ways:
– Independent LSP Control mode
– Ordered LSP Control mode
• In Independent LSP Control mode, each LSR creates
a local binding for a particular FEC which is in its
routing table
• In Ordered LSP Control mode, an LSR only crates a
local binding for a FEC if it recognizes that it is the
egress LSR for the FEC or if the LSR has received a
label binding from the next hop for this FEC
• The disadvantage of Independent LSP Control is that
some LSRs begin to label switch packets before the
complete LSP is set up end to end
Summary of MPLS Operation
• The following steps must be taken for a data packet to
travel through an MPLS domain.
–
–
–
–
–
label creation and distribution
table creation at each router
label-switched path creation
label insertion/table lookup
packet forwarding
Label Creation and Label
Distribution
• Before any traffic begins the routers make the
decision to bind a label to a specific FEC and
build their tables.
• In LDP, downstream routers initiate the
distribution of labels and the label/FEC binding.
• In addition, traffic-related characteristics and
MPLS capabilities are negotiated using LDP.
• A reliable and ordered transport protocol should
be used for the signaling protocol. LDP uses
TCP.
Table Creation
• On receipt of label bindings each LSR
creates entries in the label information
base (LIB).
• The contents of the table will specify the
mapping between a label and an FEC.
– mapping between the input port and input
label table to the output port and output label
table.
– The entries are updated whenever
renegotiation of the label bindings occurs.
Label Switched Path Creation
• As shown by the dashed blue lines, the
LSPs are created in the reverse direction
to the creation of entries in the LIBs.
Label Insertion/Table-Lookup
• The first router (LER1) uses the LIB table
to find the next hop and request a label for
the specific FEC
• Subsequent routers just use the label to
find the next hop
• Once the packet reaches the egress LSR
(LER4), the label is removed and the
packet is supplied to the destination
Packet Forwarding
• Packet forwarding then occur after the
previous operations have completed
Comparison of MPLS versus ATM
• While the underlying protocols and technologies are different,
both MPLS and ATM provide a connection-oriented service for
transporting data across computer networks.
• Excluding differences in the signaling protocols there still
remain significant differences in the behavior of the
technologies
• The most significant difference is in the transport and
encapsulation methods. MPLS is able to work with variable
length packets while ATM transports fixed-length (53 byte)
cells
• Packets must be segmented, transported and re-assembled
over an ATM network using an adaptation layer, which adds
significant complexity and overhead to the data stream
• MPLS, on the other hand, simply adds a label to the head of
each packet and transmits it on the network.
Comparison of MPLS versus ATM (cont.)
• Differences exist, as well, in the nature of the
connections. An MPLS connection (LSP) is unidirectional - allowing data to flow in only one direction
• Establishing two-way communications between
endpoints requires a pair of LSPs to be established.
Thus data flowing in the forward direction may use a
different path from data flowing in the reverse direction
• ATM Virtual Circuits, on the other hand, are bidirectional, allowing data to flow in both directions over
the same path (only SVC ATM connections are bidirectional; PVC ATM connections are uni-directional)
Comparison of MPLS versus ATM (cont.)
• Both ATM and MPLS support tunneling of
connections inside connections. MPLS uses
label stacking to accomplish this while ATM uses
Virtual Paths
• MPLS can stack multiple labels to form tunnels
within tunnels. The ATM Virtual Path Indicator
(VPI) and Virtual Circuit Indicator (VCI) are both
carried together in the cell header, limiting ATM
to a single level of tunneling
Comparison of MPLS versus ATM (cont.)
• The biggest single advantage that MPLS has
over ATM is that it was designed from the start to
be complementary to IP
• Modern routers are able to support both MPLS
and IP natively across a common interface
allowing network operators great flexibility in
network design and operation
• ATM's incompatibilities with IP require complex
adaptation, making it comparatively less suitable
for today's predominantly IP networks
MPLS and ATM
MPLS and ATM (cont.)
Download