The IP Header THE INTERNET PROTOCOL IP: A PRIMER

THE MULTI-PROTOCOL LABEL SWITCHING MPLS ARCHITECTURE 137 first OSPF , the border gateway protocol BGP, and the protocol independent multicast PIM , used to construct routes and exchange routing information among IP routers. This information is used by the IP routers to construct the forwarding routing table, referred to as the forwarding information base FIB. The forwarding component consists of procedures that a router uses to make a forwarding decision on an IP packet. For instance, in unicast forwarding, the router uses the destination IP address to find an entry in the FIB, using the longest match algorithm. The result of this table look-up is an interface number, which is the output port connecting the router to the next hop router, to which the IP packet should be sent. A router forwards an IP packet according to its prefix. In a given router, the set of all addresses that have the same prefix, is referred to as the forwarding equivalent class FEC , pronounced as fek. IP packets belonging to the same FEC have the same output interface. In MPLS, each FEC is associated with a different label. This label is used to determine the output interface of an IP packet without having to look-up its address in the FIB. A label is a short fixed-length identifier that has local significance. That is, it is valid on a single hop interconnecting two routers. A label is similar in functionality to the VPIVCI value associated with an ATM cell. In IPv6, the label can be carried in the flow label field. In IPv4, however, there is no space for such a label in the IP header. If the IP network runs on top of an ATM network, then the label is carried in the VPIVCI field of an ATM cell. If it is running over frame relay, the label is carried in the DLCI field. For Ethernet, token ring, and point- to-point connections that run a link layer protocol e.g. PPP, the label is encapsulated and inserted between the LLC header and the IP header see Figure 6.3. Note that in tag switching, the encapsulated label was referred to as a shim header. The first field of the label encapsulation is a 20-bit field used to carry the label. The second field is a 3-bit field used for experimental purposes. It can for instance carry a class-of-service CoS indication, which can be used to determine the order in which IP packets will be transmitted out of an interface. The S field is used in conjunction with the label stack, which will be discussed in detail later on in this chapter. Finally, the time-to-live TTL field is similar to the TTL field in the IP header. An MPLS network consists of label switching routers LSR and MPLS nodes. An LSR is an IP router that runs the MPLS protocol. It can bind labels to FECs, forward IP packets based on their labels, and carry the customary IP forwarding decision by carrying out a table look-up in the FIB using a prefix. An MPLS node is an LSR, except that it does not necessarily have the capability to forward IP packets based on prefixes. LLC header Label encapsulation IP header TCP header Label 20 bits Exp 3 bits S 1 bit TTL 6 bits Figure 6.3 Label encapsulation. 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