An Example of the Use of the Label Stack

7 Label Distribution Protocols MPLS requires a set of procedures for the reliable distribution of label bindings between LSRs. MPLS does not require the use of a single label distribution protocol. In view of this, various schemes have been proposed for the distribution of labels, of which the label distribution protocol LDP and the resource reservation protocol – traffic engineering RSVP–TE are the most popular. LDP is a new signaling protocol. It is used to distribute label bindings for an LSP associated with a FEC. It has been extended to the constraint-based routing label distri- bution protocol CR-LDP , which is used to set up an explicit route i.e. an LSP between two LSRs. LDP and CR-LDP are described below in Sections 7.1 and 7.2. An alternative method to distributing label bindings is to extend an existing IP control protocol, such as BGP, PIM, and RSVP, so that it can carry label bindings. The extended version of RSVP is known as RSVP-TE, and is the most popular protocol of the above three for distributing label bindings. RSVP-TE has functionality for setting up LSPs using the next hop information in the routing table of an LSR and explicitly routed LSPs. RSVP and RSVP-TE are described in Sections 7.3 and 7.4. Typically, an LSR will run both LDP and RSVP-TE. The two label distribution proto- cols are not compatible, however. In order to establish an LSP, either LDP or RSVP-TE has to be used.

7.1 THE LABEL DISTRIBUTION PROTOCOL LDP

LDP is used to establish and maintain label bindings for an LSP associated with a FEC. Two LSRs that use LDP to exchange label bindings are known as LDP peers. LDP provides several LDP messages, which are classified as follows: • Discovery messages : These messages are used to announce and maintain the presence of an LSR in the network. • Session messages : In order for two LDP peers to exchange information, they have to first establish an LDP session. The session messages are used to establish, maintain, and terminate LDP sessions between LDP peers. • Advertisement messages : These messages are used to create, change, and delete label bindings to FECs. • Notification messages : These messages are used to provide advisory information and to signal error information. Connection-oriented Networks Harry Perros  2005 John Wiley Sons, Ltd ISBN: 0-470-02163-2 150 LABEL DISTRIBUTION PROTOCOLS LDP runs on top of TCP for reliability, with the exception of the LDP discovery messages that run over UDP. Before we proceed to describe the LDP messages and their format, we divert to discuss in the following section several LDP concepts, such as the per platform and per interface label space, LDP session , and hello adjacencies. The following section can be skipped in the first reading.

7.1.1 Label Spaces, LDP Sessions, and Hello Adjacencies

LDP makes use of the concept of the label space, which is the set of all labels. Two types of label space have been defined: per interface label space and per platform label space . The per interface label space is a set of labels which are specific to a particular interface. For instance, an ATM interface uses VPIVCI numbers which are specific to the interface. Likewise, a frame relay interface uses DLCI values which are also specific to the interface. The per platform label space is a set of labels shared by all interfaces other than ATM and frame relay interfaces, such as packet-over-SONET PoS and gigabit Ethernet GbE . When transmitting packets over these links, the MPLS labels are carried in the special label encapsulation see Figure 6.3. These labels are processed by the same MPLS software, and they all belong to the same per-platform label space. An LSR label space is identified by a 6-byte value. The first four bytes carry a globally unique value identifying the LSR, such as a 32-bit router id that has been assigned to the LSR by the autonomous system administrator. The last two bytes identify the label space. If the label space is per platform, then the last two bytes are set to 0. A label space id, formally referred to as an LDP id, is expressed as LSRDid, label space number. An example of label space ids is given in Figure 7.1. The LSR id number for LSR A is lsr170 . LSR A is connected to LSRs B, C, D, E, and F. It connects to B via the A GbE interface. It connects to C via a GbE interface, and also via a separate PoS interface. It connects to D via an ATM interface. It connects to E via two separate ATM interfaces. It connects to F via a GbE interface and a separate ATM interface. LSR A advertises the per-platform label space id lsr170,0 to B and C. It advertises the non-zero label space lsr170,1 to D. It advertises the non-zero label space id lsr170,2 over the first ATM link and lsr170,3 over the second ATM link to E. It advertises the non-zero label space lsr170,4 over the ATM link and the per-platform label space id lsr170,0 over the GbE interface to F. In summary, the label space ids that A advertises to its B A E C F D GbE ATM GbE PoS ATM ATM GbE ATM Figure 7.1 An example of label space ids.