MPLS connection

Download Report

Transcript MPLS connection

Lecture 10:
Multi Protocol Label
Switching (MPLS)
Routing vs Switching
• routing: based on address lookup, max
prefix match
– search operation
– complexity O(logn) - 0(n)
• switching: based on circuit numbers
– indexing operation
– complexity O(1)
– scalable to large networks (assuming only
existing connections exist in the table)
 MPLS
MPLS connection
• MPLS introduces a connection-oriented
structure into the connectionless IP network.
• An MPLS-ready IP router does not forward IP
packets based on the destination address in the
header, but on a label.
• Consider an MPLS-enabled IP network that
runs over Ethernet:
– A special MPLS header is sandwiched between the
IP header and the LLC header.
– The MPLS header contains a label that is a short,
fixed-length connection identifier.
MPLS connection
• The MPLS-ready IP router, known as a label
switched router (LSR), maintains a table of
labels.
• When an IP packet arrives at the LSR, the label
carried in the MPLS header is cross-referenced
to the table of labels to find the next hop.
• The IP packet is then switched to the
destination output port of the LSR that connects
to the next hop LSR.
• The table contains labels for only the existing
connections, and therefore it is not as large as
the forwarding routing table in an IP router.
MPLS connection
• In order for a user to transmit over an MPLS-enabled
IP network, it has to first request the establishment of
a connection.
• This is done using a signaling protocol, such LDP
(later CR-LDP) or RSVP (later RSVP-TE). The
connection is a label switched path (LSP).
• LSR is aware of all of the connections that pass
through its switch fabric; therefore, it can decide
whether to accept a new connection or not based on
the amount of traffic that will be transmitted and the
requested QoS.
• The LSR allocates a portion of its bandwidth to a
new connection, and it stops accepting new
connections when it either runs out of bandwidth or
reaches a certain percentage of utilization.
Tag Switching
Key difference: tags setup in background using
IP routing protocols (I.e. control-driven VC setup)
MPLS Concept: Route at Edge,
Switch in Core
IP
IP
IP Forwarding
#L1
IP
#L2
LABEL SWITCHING
IP
#L3
IP
IP Forwarding
MPLS Terminology
• LDP: Label Distribution Protocol
• LSP: Label Switched Path
• FEC: Forwarding Equivalence Class
• LSR: Label Switching Router
• LER: Label Edge Router (Useful term not in
standards)
• MPLS “multi-protocol” both in terms of protocols it
supports ABOVE and BELOW in protocol stack!
MPLS Header
• IP packet encapsulated in MPLS header
and sent down LSP
IP Packet
…
32-bit
MPLS Header
• IP packet restored at end of LSP by
egress router
– TTL adjusted by default
MPLS Header
Label
EXP S
TTL
• label
– used to match packet to LSP
• experimental bits
– carries packet queuing priority (CoS)
• stacking bit: can build “stacks” of labels
– qoal: nested tunnels!
• time to live
– copied from IP TTL
MPLS Forwarding: Example
• IP packet destined to 134.112.1.5/32 arrives to SF
• San Francisco has route for 134.112/16
– next hop is LSP to New York
134.112/16
IP
New York
134.112.1.5
San
Francisco
0
1965
1026
Santa Fe
MPLS Forwarding Example
• San Francisco pre-pends MPLS header onto IP
packet, sends packet to first transit router on
path
134.112/16
New York
San
Francisco
Santa Fe
MPLS Forwarding Example
• because packet arrived to Santa Fe with
MPLS header, Santa Fe forwards it using
MPLS forwarding table
134.112/16
New York
San
Francisco
Santa Fe
MPLS Forwarding Example
• packet arrives from penultimate router with
label 0
• egress router sees label 0, strips MPLS header
• egress router performs standard IP forwarding
IP
134.112/16
New York
San
Francisco
Santa Fe
Regular IP Forwarding
Dest
47.1
47.2
47.3
Dest
47.1
47.2
47.3
Out
1
2
3
1 47.1
1
Dest
47.1
47.2
47.3
Out
1
2
3
IP 47.1.1.1
2
IP 47.1.1.1
3
Out
1
2
3
2
IP 47.1.1.1
1
47.2
47.3 3
2
IP 47.1.1.1
IP destination address unchanged in packet header!
MPLS Label Distribution
Intf Label Dest Intf Label
In In
Out Out
3
0.50 47.1 1
0.40
Intf
In
3
Label Dest Intf
In
Out
0.40 47.1 1
1
Request: 47.1
3
Intf Dest Intf Label
In
Out Out
3
47.1 1
0.50
3
2
1
1
47.3 3
47.1
Mapping: 0.40
2
47.2
2
Label Switched Path (LSP)
Intf Label Dest Intf Label
In In
Out Out
3
0.50 47.1 1
0.40
Intf Dest Intf Label
In
Out Out
3
47.1 1
0.50
2
2
47.2
2
IP 47.1.1.1
3
1
47.3 3
Label Dest Intf
In
Out
0.40 47.1 1
IP 47.1.1.1
1 47.1
3
1
Intf
In
3
A General Vanilla LSP
#216
#14
#311
#99
#311
#963
#311
#963
#14
#612
#5
#462
#99
#311
- Vanilla LSP actually part of tree from every source to
destination (unidirectional)
- Vanilla LDP builds tree using existing IP forwarding
tables to route control messages
Forwarding Equivalence
Classes
• FEC - group of IP packets
– forwarded over same path, with same
forwarding treatment
• FEC may correspond to
– destination IP subnet
– source, destination IP subnet
– QoS class
Example