It\u2019s funny how things come in waves. For most of last year the majority of my consulting engagements concerned IPv6 in some way or another. But over the past month and a half most of my time has been focused on conducting MPLS seminars of various sorts and for varied audiences.A central concept to MPLS is the Forwarding Equivalence Class (FEC), and it\u2019s something many people new to the technology struggle to understand. So in this post I\u2019d like to discuss FECs and their role in MPLS.An FEC is a set of packets that a single router:(1)\u00a0 Forwards to the same next hop;(2)\u00a0 Out the same interface; and(3)\u00a0 With the same treatment (such as queuing).FECs are nothing new. Every router performing generic IP forwarding determines the next hop to which the packet is to be forwarded, the interface out which the packet is sent to get to that next hop, and how to queue the packet for that interface. But we don\u2019t often hear those very basic procedures presented as \u201cdetermining what FEC a packet belongs to.\u201d On the other hand, FECs are almost always discussed when introducing the fundamental concepts of MPLS. The reason for this is that understanding how a packet\u2019s FEC is determined at an MPLS Label Switching Router (LSR) goes a long way toward understanding MPLS itself.First let\u2019s look at how a packet is forwarded across a path toward a destination using regular IP processes. Figure 1 (click here to see Figure 1) shows four routers. A packet arrives at R1, and its destination IP address is examined. A lookup is performed, the packet\u2019s FEC (again: next-hop, outgoing interface, and forwarding treatment) is determined, and using that information the packet is forwarded to the next hop router R2. R2 then repeats the process: The FEC is determined and the packet is forwarded to R3. R3 again determines the packet\u2019s FEC and forwards it to R4.In other words, the packet\u2019s FEC is determined hop-by-hop at every router along the forwarding path toward the destination.Now let\u2019s suppose the four routers of Figure 1 are MPLS LSRs, and there is a Label Switching Path (an LSP, which is simply an MPLS virtual circuit) between R1 and R4; the termination point of the LSP is R4\u2019s loopback interface, 192.168.255.1. This relationship is shown in Figure 2 (click here for Figure 2).As before, a packet arrives at R1 and the packet\u2019s FEC is determined. In this case, however, the next hop for the FEC is the termination point of the LSP at R4. The packet is encapsulated with an MPLS header \u2013 that is, an MPLS header is PUSHed onto the packet \u2013 and the packet is forwarded out the interface to R2. At the remaining hops to R4, the packet is simply switched from its incoming interface to the outgoing interface designated by the MPLS switching table, with the MPLS label being SWAPed at each hop. At no point along the LSP does a router again determine the packet\u2019s FEC until the packet exits the LSP (the MPLS header is POPed) at R4.And that\u2019s the key point: In an MPLS network the FEC is determined only once, at the ingress to an LSP, rather than at every router hop along the path. In our example, even though the LSP actually traverses R2 and R3, R1 \u201csees\u201d the LSP as a single link to R4 and therefore chooses it as a better path than the hop-by-hop IP routed path through R2 and R3.Conceptually, then, you can think of MPLS as a technology that pushes the \u201cintelligence\u201d to the edge of the network, leaving the core to do simple switching. In other words, as Figure 3 illustrates (click here for Figure 3), the network control plane is located at the edge and the forwarding plane is in the center. This separation of control and forwarding planes is very much in keeping with broad trends in networking, such as in high-performance routers that have long implemented the control and forwarding planes as separate physical components.