Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 672 1 Summer 2003 Lecture 7. CS 672 2 Summer 2003 MPLS Forwarding MPLS forwarding can be described in terms of: Label imposition Label disposition.

Similar presentations


Presentation on theme: "CS 672 1 Summer 2003 Lecture 7. CS 672 2 Summer 2003 MPLS Forwarding MPLS forwarding can be described in terms of: Label imposition Label disposition."— Presentation transcript:

1 CS 672 1 Summer 2003 Lecture 7

2 CS 672 2 Summer 2003 MPLS Forwarding MPLS forwarding can be described in terms of: Label imposition Label disposition Label swapping

3 CS 672 3 Summer 2003 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 CS 672 4 Summer 2003 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 CS 672 5 Summer 2003 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 CS 672 6 Summer 2003 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 CS 672 7 Summer 2003

8 CS 672 8 Summer 2003 FIB and LFIB Synchronization 1.Exchange dynamic routing information and label information with peers 2.Process the routing information and build the FIB. Process the local/remote label and build the LIB. 3.Select the best paths. Build LFIB from LIB. 4.Distribute the FIB/LFIB to the line cards. Initially, entire database. Later, incremental.

9 CS 672 9 Summer 2003 Label Distribution Protocol (LDP) Big Picture

10 CS 672 10 Summer 2003 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.

11 CS 672 11 Summer 2003 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

12 CS 672 12 Summer 2003 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.

13 CS 672 13 Summer 2003 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.

14 CS 672 14 Summer 2003 R3 R5 R1 R2 R4 R6 PrefixNext hopOut Link d1,d2 R4 Link 2 PrefixNext hopOut Link d1,d2 R2 Link 1 PrefixNext hopOut Link d1 R6 Link 1 d2 R5 Link 2 d1d2d1d2 d1d2d1 d2 d1 d2 d1 and d2 mapped to different FECs d1 and d2 mapped to the same FEC Destination = d2 Destination = d1 FEC Packets destined for d1/d2 form a FEC from R1 to R4.

15 CS 672 15 Summer 2003 R3 R5 R1 R2 R4 R6 PrefixNext hopOut Link d1,d2 R4 Link 2 PrefixNext hopOut Link d1 R6 Link 1 d2 R5 Link 2 d1 and d2 mapped to different FECs PrefixNext hopOut Link d1,d2 R2 Link 1 d1 and d2 mapped to the same FEC Destination = d2 Destination = d1 Using LDP label this Path and form a LSP LSP1 Similarly, label these paths via LDP d2 d1 d2 d1 d2d1 LSP2 LSP3 d2

16 CS 672 16 Summer 2003 R3 R5 R1 R2 R4 R6 PrefixNext hopOut Link d1,d2 R3 Link 2 PrefixNext hopOut Link d1 R6 Link 1 d2 R5 Link 2 d1 and d2 mapped to different FECs PrefixNext hopOut Link d1,d2 R2 Link 1 d1 and d2 mapped to the same FEC Destination = d2 Destination = d1 LSP1 d2 d1 d2d1 LSP2 LSP3 d2 d1 Next hop change As IGP next hop changes, LDP follows and assigns label on the R2-R3 segment for this FEC.

17 CS 672 17 Summer 2003 Downstream and Upstream LSRs Packets with IP destination = 172.68.10/10 and carrying label L1 172.68.10/24 LSR1LSR2 UpstreamDownstream Upstream/downstream LSR are defined with respect to traffic flow for a given FEC. Traffic flow direction for 172.68.10/24 A LSR may be downstream with respect To certain FEC and upstream with respect another FEC.

18 CS 672 18 Summer 2003 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).

19 CS 672 19 Summer 2003 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 171.68.32/24 LSR1 LSR2 Use label 5 for destination 171.68.32/24 Request label for destination 171.68.32/24

20 CS 672 20 Summer 2003 Downstream Unsolicited (DU) LSRs assign a label to each FEC Downstream LSRs distribute labels unsolicited 171.68.32/24 LSR1 LSR2 Use label 5 for destination 171.68.32/24

21 CS 672 21 Summer 2003 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).

22 CS 672 22 Summer 2003 LIB/LFIB DestinationIn Label (Peer, Out Label) d1L R1 (R2, L R2 ), (R3, L R3 ), (R4, L R4 ) LIB LFIB In LabelOut Label Interface L R1 L R2 i3i3 LDP Out labels learned either upon explicit request or unsolicited In labels are advertised unsolicited or on demand To/From LDP Peers

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

24 CS 672 24 Summer 2003 Downstream Unsolicited (DU) Traffic Flow (R1-R4) LDP LIB LFIB LDP LIB LFIB LDP LIB LFIB 172.32.0.0/16 IGP R1 R2 R3 R4 LDP LIB LFIB 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 FEC Here is FEC/L1 Here is FEC/L3 Here is FEC/L2

25 CS 672 25 Summer 2003 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.

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

27 CS 672 27 Summer 2003 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.

28 CS 672 28 Summer 2003 Example- DoD/Ordered Control LDP LIB LFIB LDP LIB LFIB LDP LIB LFIB 172.32.0.0/16 IGP R1 R2 R3 R4 FEC 1 Request label for 172.32.0.0/16 2 3 Use label 5 4 Use label 7

29 CS 672 29 Summer 2003 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.

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

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

32 CS 672 32 Summer 2003 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

33 CS 672 33 Summer 2003 Summary of LDP modes LDP Label Modes Advertisement Downstream-on-DemandDownstream-Unsolicited Independent Ordered Distribution Retention ConservativeLiberal

34 CS 672 34 Summer 2003 LDP Mechanics Neighbor Discovery Session Establishment TCP Connection Establishment LDP Session Initialization Session Maintenance Label Advertisement

35 CS 672 35 Summer 2003 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.

36 CS 672 36 Summer 2003 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.

37 CS 672 37 Summer 2003 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. LSR1:0LSR2:0 Hello, LSR1:0 Hello, LSR2:0 Link 1

38 CS 672 38 Summer 2003 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 | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++

39 CS 672 39 Summer 2003 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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

40 CS 672 40 Summer 2003 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.

41 CS 672 41 Summer 2003 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

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

43 CS 672 43 Summer 2003 LDP Session Between Directly Connected LSRs LDP Session Hello Adjacency link1 link2 TCP connection = 2 Hello adjacencies = 2 Per interface label space

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

45 CS 672 45 Summer 2003 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.

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


Download ppt "CS 672 1 Summer 2003 Lecture 7. CS 672 2 Summer 2003 MPLS Forwarding MPLS forwarding can be described in terms of: Label imposition Label disposition."

Similar presentations


Ads by Google