1 / 46

Lecture 7

Lecture 7. MPLS Forwarding. MPLS forwarding can be described in terms of: Label imposition Label disposition Label swapping. Label Imposition. The action of adding the label to an unlabeled packet is known as label imposition. For example, an edge LSR performs label imposition.

milo
Télécharger la présentation

Lecture 7

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 7

  2. MPLS Forwarding • MPLS forwarding can be described in terms of: • Label imposition • Label disposition • Label swapping

  3. Label Imposition • The action of adding the label to an unlabeled packet is known as label imposition. • For example, an edge LSR performs label imposition. • Label imposition involves: • IP address lookup in the FIB to map the packet to a particular FEC • FEC-to-NHLFE lookup in the LFIB

  4. Label Swapping • Label swapping forwarding operation applies to transit nodes along an LSP. • In the case of label swapping, the LSR: • uses top label in the incoming packet to identify ILM • uses ILM to identify one or more NHLFE • Uses the information in the NHLFE to Perform the required label stack operation • encodes the new label stack and transmits the labeled packet on the appropriate outgoing interface • Label swapping operation only uses LFIB table

  5. Label Disposition • The action of removing label stack from a label stack is known as label disposition. • Label disposition is performed in the egress node for an LSP. • In the case of label disposition, the LSR: • uses top label in the incoming packet to identify ILM • uses ILM to identify one or more NHLFE • Uses the information in the NHLFE to Perform the required label stack operation. • The label stack operation in this case indicates that the label stack needs to be removed. • In some case (e.g., de-aggregation), an additional IP address lookup may be required to forward the unlabeled packet.

  6. MPLS Forwarding Architecture • Edge LSRs make use of both FIB and LFIB • Transit LSRs can forward labeled traffic based on LFIB • Each LSR may carry a mix of IP and MPLS traffic • In general, each LSR supports both conventional IP forwarding (i.e., FIB) and label switching based forwarding (i.e., LFIB) components. • In MPLS, LIB is the counterpart of RIB and LFIB is the counterpart of the FIB.

  7. FIB and LFIB Synchronization • Exchange dynamic routing information and label information with peers • Process the routing information and build the FIB. Process the local/remote label and build the LIB. • Select the best paths. Build LFIB from LIB. • Distribute the FIB/LFIB to the line cards. Initially, entire database. Later, incremental.

  8. Label Distribution Protocol (LDP) Big Picture

  9. Label Distribution Methods • To establish label switch paths, LSRs must be able exchange label information. • MPLS uses multiple protocols for this purpose, namely : • Label Distribution Protocol (LDP) • RSVP-TE • BGP • Each label distribution protocol has certain characteristics that meets application specific requirements e.g: • LDP maps unicast IP destinations into labels and establishes a hop-by-hop routed LSP • RSVP is used to establish a LSP along explicit path. • BGP is used to assign and distribute labels for BGP routes.

  10. MPLS Applications • MPLS enables a diverse set of applications such as: • IP over MPLS • Traffic Engineering • Virtual Private Networks (VPNs) • IP over MPLS • Use hop-by-hop routed LSP to route IP traffic • Label distribution via LDP • Traffic Engineering • Use explicitly routed LSPs with QoS • Label distribution via RSVP-TE • VPN • Share common transport network among multiple customers • Label distribution via LDP and BGP

  11. Label Distribution Protocol (LDP) • MPLS label distribution protocols are either extend existing protocols or define new protocols. • For example, RSVP-TE and BGP label distribution protocols are based on extensions of the existing protocols. • LDP is a protocols that is explicitly designed for distribution label information between directly or indirectly connected LSRs.

  12. Label Distribution Protocol (LDP) • LDP assigns labels to IGP prefixes and as a result establishes hop-by-hop routed LSP. • LSP that are established via LDP essentially traverse along path that would be followed by all packets in certain FEC if they were routed using conventional IP forwarding. • In a nutshell, LDP assigns labels to the FEC. As a result, the LSPs that are established via LDP mimic or track the IGP Path. • For example, if a next hop for a certain FEC changes, the corresponding LSP path also changes.

  13. d1 and d2 mapped to the same FEC d1 and d2 mapped to different FECs Prefix Next hop Out Link Prefix Next hop Out Link R6 Link 1 d1 R4 Link 2 d1,d2 R5 Link 2 d2 d1 and d2 mapped to the same FEC R4 R2 Prefix Next hop Out Link R2 Link 1 d1,d2 FEC d2 R6 d2 R1 d1 d2 d1 Destination = d1 d2 d1 d2 d1 d1 d2 Destination = d2 d1 d1 R5 R3 Packets destined for d1/d2 form a FEC from R1 to R4.

  14. d1 and d2 mapped to the same FEC d1 and d2 mapped to different FECs Prefix Next hop Out Link Prefix Next hop Out Link R6 Link 1 d1 R4 Link 2 d1,d2 R5 Link 2 d2 d1 and d2 mapped to the same FEC R4 R2 d2 d1 Prefix Next hop Out Link R2 Link 1 d1,d2 d1 LSP1 LSP3 R1 LSP2 d2 d1 R6 d2 d1 Destination = d1 d2 Destination = d2 R5 R3 Using LDP label this Path and form a LSP Similarly, label these paths via LDP

  15. d1 and d2 mapped to the same FEC d1 and d2 mapped to different FECs Prefix Next hop Out Link Prefix Next hop Out Link R6 Link 1 d1 R3 Link 2 d1,d2 R5 Link 2 d2 Next hop change d1 and d2 mapped to the same FEC R4 R2 d1 d2 Prefix Next hop Out Link R2 Link 1 d1,d2 d1 LSP3 R1 LSP2 LSP1 d1 d2 R6 d2 d1 Destination = d1 d2 Destination = d2 R5 R3 As IGP next hop changes, LDP follows and assigns label on the R2-R3 segment for this FEC.

  16. Upstream/downstream LSR are defined with respect to traffic flow for a given FEC. Upstream Downstream 172.68.10/24 Traffic flow direction for 172.68.10/24 LSR1 LSR2 Packets with IP destination = 172.68.10/10 and carrying label L1 A LSR may be downstream with respect To certain FEC and upstream with respect another FEC. Downstream and Upstream LSRs

  17. Label Distribution Modes • In MPLS, it is always the downstream LSR that assigns the FEC-to-label bindings and distribute them to the upstream LSR. • The downstream LSR distributes bindings in two ways: • On explicit request from the upstream LSR • Unsolicited • The label distribution mode when the upstream LSR makes an explicit request for label-to-FEC bindings is known as downstream-on-demand (DoD). • The label distribution mode when the downstream LSR distributes label-to-FEC bindings without explicit requests from the upstream LSR is known as downstream-unsolicited (DU).

  18. Use label 5 for destination 171.68.32/24 171.68.32/24 LSR2 Request label for destination 171.68.32/24 LSR1 Downstream-on-Demand (DoD) • LSRs assign a label to each FEC (usually triggered when IGP learns about a prefix) • Upstream LSRs request labels to downstream neighbors • Downstream LSRs distribute labels upon request

  19. Use label 5 for destination 171.68.32/24 171.68.32/24 LSR1 LSR2 Downstream Unsolicited (DU) • LSRs assign a label to each FEC • Downstream LSRs distribute labels unsolicited

  20. Label Information Base (LIB) • LDP maintains all locally assigned (i.e., incoming) and remotely learned (i.e., outgoing) labels in a Label Information Base (LIB). • Each entry in the LIB consists of: • destination address, • incoming label (assigned by the LSR itself) • one or more pair of the form (LDP Identifier, out label). • For LSP established using LDP, incoming and outgoing label information is used to populate Label Forwarding Information Base (LFIB).

  21. To/From LDP Peers In labels are advertised unsolicited or on demand LDP Out labels learned either upon explicit request or unsolicited Destination In Label (Peer, Out Label) LIB d1 LR1 (R2, LR2), (R3, LR3), (R4, LR4) LR1 LR2 i3 In Label Out Label Interface LFIB LIB/LFIB

  22. R2 responds with a label . Request Response R1 requests a label for 172.32.0.0/16 Request Response LDP LDP LDP LIB LIB LIB LSP R2 LFIB LFIB LFIB LFIB programmed. LSP ready! IGP 172.32.0.0/16 R1 R4 Traffic Flow (R1-R4) R3 Downstream-on-Demand (DoD)

  23. LDP LDP LDP LDP LIB LIB LIB LIB LFIB LFIB LFIB LFIB Traffic Flow (R1-R4) Downstream Unsolicited (DU) R4 learns about 172.32.0.0/16 via IGP. Assigns a local label. L1. And advertises unsolicited this label-to-FEC mapping to LDP peers Here is FEC/L3 Here is FEC/L1 R2 Here is FEC/L2 FEC 172.32.0.0/16 IGP R1 R4 R3

  24. Label Retention Modes • There are two modes to retain labels from peers namely liberal and conservative retention modes. • In liberal retention mode, LSR retains labels from all neighbors (whether valid next hops or not for the associated FEC) • Pros – faster convergence and LSP adaptation to next hop changes. This is because in label/FEC mappings from a new next hop already exist and don’t need to be requested. • Cons - Require more memory and larger label space • In conservative retention mode, LSR retains labels only from valid next-hops neighbors (i.e., discards all labels/FEC mappings except received from valid next-hops) • Pros – Free memory and label space • Cons – Slower LSP adaptation to changes in next hops.

  25. R2 using liberal retention mode. Already have a label/FEC from new Next hop (R3). Quickly starts using the new label. Next hop for FEC Changes. X LDP LDP LDP LDP LIB LIB LIB LIB R2 LFIB LFIB LFIB LFIB IGP FEC 172.32.0.0/16 R1 R4 Thus liberal retentions allows faster LSP adaptation R3 Label Retention Modes

  26. Label Distribution Control (Ordered vs. Independent) • There are two modes for LSP control: ordered and independent. • In ordered LSP control, a LSR only binds and advertise a label for a particular FEC if: • it is the egress LSR for that FEC or • it has already received a label binding from its next-hop • Pros – packets are not forwarded onto the LSP until the complete LSP is established • Cons – Slower. Introduces dependencies in LSP establishment process. For example, a LSP may have a local label/FEC mappings but cannot advertise it because it must wait for the remote (out) label/FEC mappings.

  27. LDP LDP LDP LIB LIB LIB LFIB LFIB LFIB Example- DoD/Ordered Control 2 Request label for 172.32.0.0/16 Request label for 172.32.0.0/16 1 3 Use label 7 Use label 5 4 R2 FEC 172.32.0.0/16 IGP R1 R4 R3

  28. Label Distribution Control (Ordered vs. Independent) • In independent LSP control, a LSR binds a label to a FEC independently from the label it has to receive from its next-hop • Pros – Faster. Does not introduce extra latency. • Cons - An LSR may label forward packet to a next-hop that does not have yet label information for that FEC. Packets may be dropped in the core until LSP set-up is complete.

  29. LDP LDP LDP LIB LIB LIB LFIB LFIB LFIB DoD/Independent LSP Control 4 Request label for 172.32.0.0/16 Request label for 172.32.0.0/16 1 5 Use label 7 Use label 5 2 R2 FEC 172.32.0.0/16 R1 starts sending the traffic for 172.32.0.0/16 with label 7 3 IGP R1 R4 R3 Between R2-R4 traffic is forwarded using IP.

  30. Packets labeled Packets unlabeled R2 R1 R4 Unlabeled LSP segments may exists for sometime Packets labeled R3 Independent LSP Control Depending upon the amount of traffic is routed on IP forwarding, the forwarding performance of some LSRs may suffer.

  31. Commonly used LDP Modes • Frame-based LSR typically use: • DU label advertisement • Conservative label retention mode • Ordered label distribution • Cell-based LSR typically use: • DoD label advertisement mode • Conservative label retention mode • Ordered label distribution

  32. LDP Label Modes Advertisement Downstream-on-Demand Downstream-Unsolicited Distribution Independent Ordered Retention Liberal Conservative Summary of LDP modes

  33. LDP Mechanics • Neighbor Discovery • Session Establishment • TCP Connection Establishment • LDP Session Initialization • Session Maintenance • Label Advertisement

  34. LDP Discovery • Before establishing LDP sessions, the potential LDP neighbors are discovered. • To discover directly connected neighbours: • LSR periodically transmits Hellos as UDP packets over each LDP interface • LDP Link Hellos are addresses to “all routers on the subnet” • Hello messages use UDP port = 646. • Reception of Hello on an interface establishes a “Hello Adjacency” on the that interface with the sender . • A separate Hello Adjacency is on each interface.

  35. Session Establishment • Creation of Hello Adjacency triggers establishment of TCP connection. • For establishing LDP sessions, TCP port = 646. • Once TCP connection has been established, two LSRs exchange LDP Initialisation message to negotiate parameters. • After successful negotiation of parameters, two LSRs are LDP peers and ready for label advertisement messages.

  36. Hello, LSR2:0 Link 1 Hello, LSR1:0 LSR1:0 LSR2:0 Session Establishment • LSR1 receives Hello LSR2:0 on link. • LSR1 attempts to open LDP TCP connection to LSR2. • LSR1 and LSR2 negotiate session parameters via exchange of Initialization messages; e.g., advertisement mode, label range.

  37. Initialization Message The encoding for the Initialization Message is: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0| Initialization (0x0200) | Message Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Message ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Common Session Parameters TLV | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Optional Parameters | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0|0| Common Sess Parms (0x0500)| Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Protocol Version | KeepAlive Time | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |A|D| Reserved | PVLim | Max PDU Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Receiver LDP Identifier | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++

  38. Initialization Message ATM Session Parameters Used when an LDP session manages label exchange for an ATM link to specify ATM-specific session parameters. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0|0| ATM Sess Parms (0x0501) | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | M | N |D| Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ATM Label Range Component 1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ATM Label Range Component N | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

  39. Hello Adjacencies and Sessions • Recall, label space refers to set of unique label values. • Label space be implemented system wide (global) and/or per interface: • Per interface label space is used on LC-ATM interfaces • System wide label space is implemented on frame-based LSRs • A LSR may have one or more Hello adjacencies. However, as long as parallel links use global label space, only one LDP session is established. • On ATM interfaces, however, a separate LDP session is established per interface.

  40. Label Space Identification • LDP label space is identified by LDP Identifier (LDP Id). • LDP Id is six bytes in length • first 4 bytes represent router ID • last 2 bytes indicate label space • Global label space, last 2 bytes contain = 0 • 172.32.23.12:0 • Per interface label space, last 2 bytes contain > 0 • 172.32.23.12:5

  41. LDP session = 1 TCP connection + 1 or more discovery adjacencies for the same label space LDP Session link1 LDP Session link2 Hello Adjacency Hello Adjacency LSR 1:0 LSR 2:0 TCP connection = 1 Hello adjacencies = 2 TCP connection = 1 Hello adjacencies = 1 LDP Session Between Directly Connected LSRs Global label space LSR 1:0 LSR 2:0

  42. LDP Session link1 link2 Hello Adjacency Per interface label space TCP connection = 2 Hello adjacencies = 2 LDP Session Between Directly Connected LSRs

  43. In some applications such as L2 transport over MPLS, LDP session between non-directly connected LSRs is established for exchanging VC labels. LDP Session Between Non-Directly Connected LSRs LSR7 LSR1 R1 R4 LSR1 and LSR7 uses to discover each other and establish hello adjacency

  44. Session Maintenance • A Hello adjacency is created on receiving the first hello. • Once created, LSR maintains a Hello adjacency by periodic transmission of Hellos • LSR keeps a hold timer for each Hello adjacency. If no Hello is received before expiration of the hold timer, adjacency is deleted. • As long as there is at least one adjacency, the corresponding LDP session is retained. Upon deletion of last adjacency, the LDP session is removed. • Once LDP session is established, the integrity of LDP session is maintained by periodic transmission of KeepAlive messages.

  45. LSR1 LSR2 1 Exchange Hellos Maintain adjacency by periodic transmission of Hellos 2 Establish TCP connection 3 Initialize LDP session LSR1 and LSR2 are LDP peers 4 Exchange LDP address messages 5 LDP session ready for label advertisement messages To maintain LDP session, send any LDP protocol message or KeepAlive message before the KeepAlive timer expiry

More Related