MPLS [RFC 3031] IP Switchin Use labels; works with other protocols [not just with IP] Use labels to determine forwardin action instead of 32/128 bit addresses 20 bit label Generic MPLS Header (32 bits) IP Header IP Payload MPLS Network Plain IP Network Inres Router LSRs Eres Router Plain IP Network Add MPLS header MPLS Network Remove MPLS header Inres Label Switched Router adds a label (header) LSRs switch based on label values Eres router removes the MPLS header 1
MPLS Path IP Packet L1 IP Packet L2 IP Packet L3 IP Packet IP Packet Inres router LSR 1 LSR 2 Eres router Examine LSR 2: How does LSR2 process each packet with MPLS header? Loot at interface it came on (why?), label L2 Consult switchin table associated with incomin interface Action: Replace L2 by L3, forward on output interface O 2 Other actions: Push new MPLS header; Pop MPLS header Processin done in hardware (very fast) Lookup Time Lonest prefix matchin 20 bits vs. 32 or 128 bits Layer 3 routin vs. MLPS Label has local sinificance only IP addresses have lobal sinificance 2
Two important questions How does an inres router select a label? How do the intermediate routers make up their switchin/forwardin tables? Forwardin Equivalence Class FEC: Group of packets that receive same treatment by routers FEC controls packet s path throuh network and packet s forwardin treatment on that path Examine an Inres router. For each destination one FEC? (all packets to that destination will et same treatment) What if some need to be treated diffferently? Examine source, destination ids, application protocol, incomin link, QoS, current network condition, VPN requirements, and find FEC FEC and quick forwardin are two reatest advantaes of MPLS Force packets to o throuh a certain path 3
MPLS messae format Label (20 bits) IP Header Res(3) B TTL(8) B=1: Stack bottom (no more MPLS headers below) Reserved Labels Some labeles have special sinificance 0 to 15 0: IPv4 null label (pop stack, treat rest as IPv4 packet) 1: router alert: pkt needs special handlin, route based on next label 2: IPv6 null label 3: Multicast null label 4-15 reserved 4
TTL handlin Copy TTL from IP header to TTL of first MPLS header at first inres Decrement TTL for each hop When poppin, copy TTL of MPLS header into TTL of IP header Same when pushin a stack of MPLS headers Determine FEC Map FEC to LSP Packet handlin at Inres Assin a label (or encode FEC in a label) Label bindin: FEC -> Label 5
Always downstream assined Why? Label assinments Downstream unsolicited or Downstream on demand Downstream Unsolicited Upstream Downstream Here is label OK 6
Downstream on demand Upstream Downstream Need a label Here is label OK Hierarchical MPLS networks One MPLS network completely inside another Example Label Stack 7
Example LSP i A C Auonomous system D B C m n o p D LSP j LSP i A C Auonomous system D B Action at C? C m n o p D Action at D? LSP j 8
Multiple MPLS headers Multiple MPLS headers for an IP packet Framentation because of this: Inres node must take care of this Why not sinle MPLS header? Don t mix LSP i and LSP j AS does not need to know complete routin stratey LDP Label Distribution Protocol Similar to combination of OSPF and BGP LSR does a neihbor discovery Send hello messaes containin LDP id on all interfaces; Use UDP to send messaes to far away routers LDP id identifies label space appropriate for this messae = IP address of LSP + 2 bytes to identify label space within same route Loop detection/fec merin 9
LDP Messaes Discovery Hello messaes; find other LSRs Session Establish, maintain and terminate sessions Adverisement Create, chane and delete mappin for FEC Notification Advisory info Misc Loop detection FEC merin/areation 10