230 likes | 245 Views
MPLS Basics. MPLS Applications. IP plus ATM Integration. Traffic Engineering. FR/ATM. E1. FR/ATM. E2. Circuit Transport over MPLS. IP VPN’s. Agenda. MPLS Concepts LSRs and labels Label Switch Paths Label assignment and distribution LDP overview. MPLS concepts Label Switch Routers.
E N D
MPLS Applications IP plus ATM Integration Traffic Engineering FR/ATM E1 FR/ATM E2 Circuit Transport over MPLS IP VPN’s
Agenda • MPLS Concepts • LSRs and labels • Label Switch Paths • Label assignment and distribution • LDP overview
MPLS conceptsLabel Switch Routers IGP domain with a label distribution protocol • An IP routing protocol is used within the routing domain (e.g.OSPF,ISIS) • A label distribution protocol is used to distribute address/label mappings between adjacent neighbors • The ingress LSR receives IP packets, performs packet classification (into a FEC), assign a label, and forward the labelled packet into the MPLS network • Core LSRs switch packets/cells based on the label value (no packet classification in the core) • The egress LSR removes the label before forwarding the IP packet outside the MPLS network
MPLS conceptsPacket forwarding: FEC and Next-Hop • IP packets are classified in FECs • Forwarding Equivalence Class • A group of IP packets which are forwarded in the same manner • Over the same path • With the same forwarding treatment • Packet forwarding consists on • Assign a packet to a FEC • Determine the next-hop of each FEC
MPLS conceptsPacket forwarding: FEC and Next-Hop • MPLS make use of FECs • MPLS nodes assign a label to each FEC • Packet classification (into a FEC) is done where the packet enters the core • No sub-sequent packet classification in the MPLS network
MPLS conceptsPacket forwarding: FEC and Next-Hop Label = 5 Label = 3 • IP packetD=171.68.10.12 • IP packetD=171.68.10.12 In I/F In Lab Address Prefix Out I/F Out Lab In I/F In Lab Address Prefix Out I/F Out Lab 4 x 171.68.10 3 5 Next-Hop 0 5 171.68.10 1 3 ... ... ... ... ... Next-Hop ... ... ... ... ... 3 0 1 171.68.10/24 4 Rtr-B Rtr-A • IP packetD=171.68.10.12 Router-A forwards labelled packets by looking at the label value against the label table(LFIB). No packet classification into FEC is done. Router-B classify the IP packet into a FEC and assign the corresponding label.
Label Switch Path (LSP) • LSP is the unidirectional sequence of LSRs through which the labelled packets have to go through in order to reach the egress LSR • FEC is determined in LSR-ingress Ingress-LSR Egress-LSR IGP domain with a label distribution protocol
Label Switch Path (LSP) • LSPs derive from IGP routing information • LSPs may diverge from IGP shortest path • LSP tunnels (explicit routing) with Traffic Engineering IGP domain with a label distribution protocol LSP follows IGP shortest path LSP diverges from IGP shortest path
MPLS conceptsLabels 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 Label | Exp|S| TTL • Generic: can be used over Ethernet, 802.3, PPP links, Frame Relay, ATM PVCs, etc. • Uses new Ethertypes/PPP PIDs/SNAP values/etc. • Can have label stacking of 4 octets each • draft-ietf-mpls-label-encaps-07.txt Label = 20 bits Exp = Experimental, 3 bits S = Bottom of stack, 1bit TTL = Time to live, 8 bits
MPLS conceptsLabels Label ATM Cell Header GFC VPI VCI PTI CLP HEC DATA PPP Header Label Layer 3 Header PPP Header (Packet over SONET/SDH) Shim header LAN MAC Label Header Label MAC Header Layer 3 Header
Label assignment and distribution • Labels have local significance • Each LSR binds his own label mappings • Each LSR assign labels to his FECs • Labels are assigned and exchanged between adjacent LSRs • Downstream to Upstream • Applications may require non-adjacent neighbors • e.g VPN
Label Distribution Protocols • Several protocols for label exchange • LDP • Maps unicast IP destinations into labels • RSVP, CR-LDP • Used for traffic engineering and resource reservation • BGP • External labels (VPN)
Upstream and Downstream LSRs • Rtr-C is the downstream neighbor of Rtr-B for destination 171.68.10/24 • Rtr-B is the downstream neighbor of Rtr-A for destination 171.68.10/24 • LSRs know their downstream neighbors through the IP routing protocol • Next-hop address is the downstream neighbor 171.68.10/24 171.68.40/24 Rtr-A Rtr-B Rtr-C
Upstream and Downstream LSRs • LSRs assign a label to each FEC • Label distribution may be upstream or downstream driven • Most implementations use downstream with two variants • Unsolicited Downstream • Downstream on demand
Unsolicited Downstream distribution Use label 7 for destination 171.68.10/24 Use label 5 for destination 171.68.10/24 In I/F In I/F In I/F In Lab In Lab In Lab Address Prefix Address Prefix Address Prefix Out I/F Out I/F Out I/F Out Lab Out Lab Out Lab 0 0 0 5 7 - 171.68.10 171.68.10 171.68.10 1 1 1 - 5 7 Next-Hop Next-Hop Next-Hop ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... • LSRs assign a label to each FEC • LSRs distribute labels to the upstream neighbors 171.68.40/24 171.68.10/24 Rtr-A Rtr-B Rtr-C IGP derived routes
Downstream on demand distribution Use label 7 for destination 171.68.10/24 Use label 5 for destination 171.68.10/24 Request label for destination 171.68.10/24 Request label for destination 171.68.10/24 • LSRs assign a label to each FEC • Upstream LSRs request labels to downstream neighbors • Downstream LSRs distribute labels upon request 171.68.10/24 171.68.40/24 Rtr-A Rtr-B Rtr-C
Penultimate Hop Popping • The label at the top of the stack is removed (popped) by the upstream neighbor of the egress LSR • The egress LSR requests the “popping” through the label distribution protocol • Egress LSR advertises implicit-null label • The egress LSR will not have to do a lookup and remove the label itself • One lookup is saved in the egress LSR
Penultimate Hop Popping Address Prefix and mask Next-Hop Interface In I/F In I/F In Lab In Lab Address Prefix Address Prefix Out I/F Out I/F Out Lab Out Lab Serial1 171.68.10/24 171.68.9.1 0 0 - 4 171.68/16 171.68/16 2 1 pop 4 Next-Hop Next-Hop 171.68.44/24 171.68.12.1 Serial2 ... ... ... ... ... ... ... ... ... ... 171.68/16 ... Null • Egress LSR needs to do an IP lookup for finding more specific route • Egress LSR need NOT receive a labelled packet • label will have to be popped anyway • Summary route for 171.68/16 • Summary route for 171.68/16 0 0 1 1 • Use label 4 for FEC 171.68/16 • Use label “implicit-null” for FEC 171.68/16 171.68.44/24 Egress LSR summarises morespecific routes and advertises a label for the new FEC Summary route is propagate through the IGP and label is assigned by each LSR 171.68.10/24
Penultimate Hop Popping Address Prefix and mask Next-Hop Interface In I/F In I/F In Lab In Lab Address Prefix Address Prefix Out I/F Out I/F Out Lab Out Lab Serial1 171.68.10/24 171.68.9.1 0 0 - 4 171.68/16 171.68/16 1 2 4 pop Next-Hop Next-Hop 171.68.44/24 171.68.12.1 Serial2 ... ... ... ... ... ... ... ... ... ... 171.68/16 ... Null Label = 4 • IP packetD=171.68.10.15 0 0 1 1 • IP packetD=171.68.10.15 171.68.44/24 • IP packetD=171.68.10.15 • IP packetD=171.68.10.15 171.68.10/24 Packet arrives without the labelat the egress LSR.Egress LSR needs to do an IP lookup to match more specific routes Packet is MPLS forwardedTop label is removed IP packet enters the MPLS networkIngress LSR assign a label andforward the packet
LDPConcepts • One of several standardised label distribution protocol • draft-ietf-mpls-ldp-09.txt • A set of procedures and messages to distribute mappings between labels and FECs • Two LSRs which use LDP to exchange label/FEC mapping information are known as "LDP Peers" • Peers exchange LDP messages • Uses TLV encoded message structure
ConceptsLDP Messages • Discovery messages • Used to discover and maintain the presence of new peers • Hello packets (UDP) sent to all-routers-in-subnet multicast address • Once neighbor is discovered, the LDP session is established over TCP • Session messages • Establish, maintain and terminate LDP sessions • Advertisement messages • Create, modify, delete label mappings • Notification messages • Error signalling