of 33/33
Label Switching, Flows and MPLS

Label Switching, Flows and MPLS - ics.uci.edumagda/ics_x33/module_LabelSwitching.pdf · MPLS • Internet divided into • Standard routers • MPLS core • Datagram encapsulated

  • View

  • Download

Embed Size (px)

Text of Label Switching, Flows and MPLS - ics.uci.edumagda/ics_x33/module_LabelSwitching.pdf · MPLS •...

Label Switching, Flows and MPLS

Internet Frowarding IP implements datagram forwarding longest

prefix matching Both hosts and routers

Have an IP module Forward datagrams

IP forwarding is table-driven Table known as routing table and populated by

routing algorithms.

Table Lookup Longest prefix matching:

For N items in a table On average log2N steps required to perform longest

prefix matching Label switching consists of matching a label to a

table entry (index) An array index can be performed in hardware and in

one step Requires connection set-up.

Switching technology Designed as a higher-speed alternative to packet

forwarding Uses array lookup instead of destination address


Switching Concept

label action 0 1 2 3

Labels and Identifying End Destinations

Label is a small integer Internet has millions of end destinations Change concept of using destination address for

forwarding and replace with concept of a using a flow ID (label) to an end point.

A packet flow is a sequence of packets between to end points

New concept: forward on flows not end destinations

Creating Flows Switching requires setting up end to end flows Flows are much more dynamic than destinations

(network prefixes) Each flow needs to be assigned a unique label Setting up a flow needs to use address

forwarding concepts. The mechanism to set up a flow needs to make

sure it is unique. That requires each switch to be checked for label


Label Swapping and Paths Checking each router/switch enroute for label ID is

tedious and time consuming. Solution was to find a way that would allow a label to be

chosen independently at each switch along the way. A flow then consists of a string/sequence of labels, each

label identifying a switch along the path. Requires a switch to re-write the label in each packet. Know as label swapping, each switch on path rewrites

the label before sending packet out

Extending Switch to a Large Network

Potential Advantages Of Switching with IP

Faster forwarding Aggregated route information label all packets

that are going to a same intermediate destination with one label, e.g., all traffic going to a particular ISP can have same label as it flows thru your network. Label removed at boundary to that ISP

Ability to manage aggregate flows SLA agreements easy to control on aggregate flows.

Flow Switching Also known as

Layer 3 switching Tag switching Label switching

Ideas eventually consolidated into Multi-Protocol Label Switching (MPLS)

Multi protocol as it can carry any protocol, however IP is generally the only one.

MPLS Internet divided into

Standard routers MPLS core

Datagram encapsulated when entering the MPLS core and de-encapsulated when leaving

Within the core, MPLS labels are used to forward packets

Processing an IP Datagram for an MPLS Core

Datagram classified Multiple headers examined Example: classification can depend on TCP port

numbers as well as IP addresses Classification used to assign a label Note: each label corresponds to flow that may

include may TCP sessions

Hierarchical MPLS Multi-level hierarchy is possible Example: corporation with three campuses and

multiple buildings on each campus Conventional forwarding within a building One level of MPLS for buildings within a campus Additional level of MPLS between campuses

To accommodate hierarchy, MPLS uses stack of labels

MPLS Label Processing Only top label is used to forward When entering new level of hierarchy, push next

label on stack When leaving a level of the hierarchy, pop the top

label from the stack

MPLS Encapsulation

If using Ethernet frame to carry an MPLS packet, the type field is set to: 0x8847 (for unicast transmission). 0x8848 (for multicast)

Fields In An MPLS Header MPLS header

Prepended to IP datagram Only used while datagram in MPLS core

MPLS switches use LABEL in header when forwarding packet

EXP Field: not used S: is a bit set to 0 if more lables, set to 1 if last label TTL: same as IP, prevents eternal cycle incase an error in path setup MPLS Label Field is 20bits as an index that could be a problem. Usually it does a table lookup using a hashing algorithm.

Label Switching Router Device that connects between conventional

Internet and MPLS core Handles classification Uses data structure known as Next Hop Label

Forwarding Table (NHLFT) to choose an action Entries known as NHLF Entry (NHLFE)


Next Hop Label Forwarding Entry Found in NHLFT Specifies

Next hop information (e.g., the outgoing interface) Operation to be performed Encapsulation to use (optional) How to encode the label (optional) Other information needed to handle the packet


Operation to be performed Replace (switch) label at top of stack Pop label at top of stack Replace (switch) label at top of stack, and then

push one or more new labels onto stack

Control Processing And Label Distribution

Needed to establish Label Switched Path (LSP) Coordinate labels along the path Configure next-hop forwarding in switches

Performed by Label Distribution mechanism Series of labels selected automatically

Protocols For MPLS Control Two primary protocols proposed

Label Distribution Protocol (MPLS-LDP) Constraint-Based Routing LDP (CR-LDP) labels

have to match routes that match a set of administrative constraints,

Other proposals to extend routing protocols OSPF BGP RSVP

MPLS and Fragmentation Outgoing

MPLS prepends shim header to each datagram If datagram fills network MTU, fragmentation will be

required Incoming

Classification requires knowledge of headers (e.g., TCP port numbers)

Only first fragment contains needed information LSR must collect fragments and reassemble before


Mesh Topology MPLS Core Used in many MPLS cores LSP established between each pair of LSRs Parallel LSPs can be used for levels of service Example

One LSP reserved for VOIP traffic Another LSP used for all other traffic

Service Differentiation Because MPLS classification can use arbitrary fields in a datagram, including the IP source address, the service a datagram receives can depend on the customer sending the datagram as well as the type of data being carried.

Packet Classification

Why Classify? For networks such as MPLS, to classify traffic into

flows, the packet has to be parsed and several fields examined to determine what flow it belongs to. Some flows may only require a destination address, others may require separation by port number.

For fast processing, the exact octets (ie bytes) in the frame need to be examined.

That requires, step by step checking of each field that is needed to reach the final value that determines the classification

Fields in a Frame To extract all web traffic, we have to examine: Ethernet: Frame type: 0x0800 for IP IP: Protocol type: 6 for TCP TCP: Destination Port number: 80 for HTTP But to do last function we need to know the exact size of the IP header to know where to look For TCP header. For that we have to look at at Header length field.

Classifier A classifier is a mechanism that uses a specific

lookup approach to classify traffic according to certain rules.

If the looked up values match a specific set of rules: the packet can be classified and is treated appropriately.

If it fails, then it is processed as normal via the usual stack operations.


Classification hardware

Classification and its Benefits All fields in a packet maybe examined. Rules maybe applied to any combination of fields. Rules determine what the next action is going to

be for that packet. Classifiers have been implemented in special

purpose hardware using parallelism to enable fast switching.