IP Addresses THE INTERNET PROTOCOL IP: A PRIMER

138 THE MULTI-PROTOCOL LABEL SWITCHING MPLS ARCHITECTURE MPLS domain A Non-MPLS IP domain LSR 1 LSR 2 MPLS domain B Figure 6.4 MPLS domains, LSRs, and MPLS nodes. A C D E B if1 if0 if1 if1 if1 if1 if0 if2 if2 if2 if0 if0 if0 x.0.0.0, y.0.0.0 Non-MPLS IP domain 1 Non-MPLS IP domain 2 Figure 6.5 An example of multi-protocol label switching. A contiguous set of MPLS nodes that are in the same routing or administrative domain forms an MPLS domain. Within an MPLS domain, IP packets are switched using their MPLS label. An MPLS domain can be connected to a node outside the domain, which might belong to an MPLS or a non-MPLS IP domain that is, an IP domain where the routers use the customary forwarding decision based on prefixes. As shown in Figure 6.4, the MPLS domain B consists of five routers, two of which are LSRs LSR 1 and LSR 2; the remaining three might be either LSRs or MPLS nodes. MPLS domain B is connected to the MPLS domain A via LSR 1, and is connected to the non-MPLS IP domain C via LSR 2. LSRs 1 and 2 are referred to as MPLS edge nodes. For simplicity, we will assume that all nodes within an MPLS domain are LSRs. To see how MPLS works, let us consider an MPLS domain consisting of five LSRs LSRs A, B, C, D, and E, all linked with point-to-point connections as shown in Figure 6.5. LSRs A and C are connected to non-MPLS IP domains 1 and 2, respec- tively. Assume that a new set of hosts with the prefix x.0.0.0, y.0.0.0, where x.0.0.0 is the base network address and y.0.0.0 is the mask, is directly connected to E. The flow of IP packets with this prefix from A to E is via B and D. That is, A’s next hop router for this prefix is B, B’s next hop router is D, and D’s next hop router is E. Likewise, the flow of IP packets with the same prefix from C to E is via D. That is, C’s next hop THE MULTI-PROTOCOL LABEL SWITCHING MPLS ARCHITECTURE 139 router for this prefix is D, and D’s next hop router is E. The interfaces in Figure 6.5 show how these routers are interconnected. For instance, A is connected to B via if0, and B is connected to A, C, and D via if1, if2, and if0, respectively. When a LSR identifies the FEC associated with this new prefix x.0.0.0, y.0.0.0, it selects a label from a pool of free labels and it makes an entry into a table referred to as the label forward information base LFIB. This table contains information regarding the incoming and outgoing labels associated with a FEC and the output interface, i.e. the FEC’s next hop router. The LSR also saves the label in its FIB in the entry associated with the FEC. The entry in the LFIB associated with this particular FEC for each LSR is shown in Table 6.2. For presentation purposes we have listed all of the entries together in a single table. Note that B has selected an incoming label equal to 62; D has selected 15; and E has selected 60. Since A and C are MPLS edge routers and do not expect to receive labeled IP packets, they have not selected an incoming label for this FEC. The remaining information in each entry gives the next hop LSR and the output interface for the FEC. So for this FEC, the next hop router for A is B, and is through if0. An incoming label is the label that a LSR expects to find in all of the incoming IP packets that belong to a FEC. For instance, in the above example, LSR B expects all of the incoming IP packets belonging to the FEC associated with the prefix x.0.0.0, y.0.0.0 to be labeled with the value 62. The labeling of these packets has to be done by the LSRs which are upstream of B. That is, they are upstream in relation to the flow of IP packets associated with this FEC. In this example, the only LSP that is upstream of B is A. In the case of D, both B and C are upstream LSRs. In order for an LSR to receive incoming IP packets labeled with the value that it has selected, the LSR has to notify its neighbours about its label selection for a particular FEC. In the above example, LSR B sends its information to A, D, and C. A recognizes that it is upstream from B, and it uses the information to update the entry for this FEC in its LFIB. As far as this FEC is concerned, D and C are not upstream from B, and they do not use this information in their LFIBs. However, they can chose to store it for future use. For example, a C-to-D link failure could make B the next hop LSR for this FEC. In this case, C will use the label advertised by B to update the entry in its LFIB. D sends its information to B, C, and E. Since B and C are both upstream of D, they use this information to update the entries in their LFIB. Finally, E sends its information Table 6.2 FEC entry in each LFIB. LSR Incoming label Outgoing label Next hop Outgoing interface A – – LSR B if0 B 62 – LSR D if0 C – – LSR D if2 D 15 – LSR E if2 E 60 – LSR E if0 140 THE MULTI-PROTOCOL LABEL SWITCHING MPLS ARCHITECTURE Table 6.3 FEC entry in each LFIB with label binding information. LFIB Incoming label Outgoing label Next hop Outgoing interface A – 62 LSR B if0 B 62 15 LSR D if0 C – 15 LSR D if2 D 15 60 LSR E if2 E 60 – LSR E if0 to D, which uses it to update its entry in its LFIB. As a result, each entry in the LFIB of each LSR will be modified see Table 6.3. For LSR E, the next hop is E itself. This indicates that the IP packets associated with the prefix x.0.0.0, y.0.0.0 will be forwarded to the local destination over if 0 using their prefix. Once the labels have been distributed and the entries have been updated in the LFIBs, the forwarding of an IP packet belonging to the FEC associated with the prefix x.0.0.0, y.0.0.0 is done using solely the labels. Let us assume that A receives an IP packet from the non-MPLS IP domain 1 with a prefix x.0.0.0, y.0.0.0. A identifies that the packet’s IP address belongs to the FEC, and it looks up its LFIB to obtain the label value and the outgoing interface. It sets the label value to 62, encapsulates it using the format shown in Figure 6.3, and forwards it to the outgoing interface if0. When the IP packet arrives at LSR B, its label is extracted and looked up in B’s LFIB. The old label is replaced by the new one, which is 15, and the IP packet is forwarded to interface if0. LSR D follows exactly the same procedure. When it receives the IP packet from B, it replaces its incoming label with the outgoing label, which is 60, and forwards it to interface if2. Finally, E forwards the IP packet to its local destination. The same procedure applies for an IP packet with a prefix x.0.0.0, y.0.0.0 that arrives at C from the non-MPLS domain 2. In Figure 6.6, we show the labels allocated by the LSRs. These labels are similar to the VPIVCI values in ATM. They have local significance; that is, each label is valid only for Non-MPLS IP domain 1 A C D B if1 if0 if1 if1 if1 if1 if0 if2 if2 if2 if0 if0 if0 〈x.0.0.0, y.0.0.0〉 Non-MPLS IP domain 2 E 15 60 15 62 Figure 6.6 Label switched paths.