So when we talk about network design, there's a few logical pieces of it. When you talk about networks, there's part of networks that forward the actual data of the network. But there's also a part of the network that's associated with controlling that data processing part. That instills forwarding tables on the network, that runs routing protocols, and things like that. So networking experts have realized this and given names to these different pieces. The part of the network that forwards the data traffic, that processes IP packets, determines next hops, and things like that, that's called the data plane. The data plane is the part of the network that forwards data. The part of the network that instills control on the network, that disseminates routing advertisements, the software part of the network, that's the control plane. The control and data plane need to work together to forward packets. Here's how that works. So if you have a router, a router is logically constructed with two different pieces, there's the control plane and the data plane. The control plane is on top of the data plane. In the control plane, we have software, we have BGP and OSPF. All these protocols are implemented as socket applications, routing on top of a traditional Intel processor, DRAM and things like that. These routing protocols run and they construct routing tables. These routing tables contain information about routes the router's could use. The name we often give to routing tables is called the RIB or the routing information base, that's a more formal name for routing tables. So these routing protocols run and they compute routes. In the data plane, we have the FIB or the forwarding table, the forwarding information base, that's stores forwarding information. So what we do is we run these routing protocols, we compute the RIB, the RIB has lot of routes in it, and then we choose the best one for this router, and we publish the best one down through the FIB, and then we have a bunch of network interfaces there as well. So in the control plane, we run routing advertisements, we run routing protocols, they disseminate routing updates, information about how to reach prefixes. They receive these updates, they advertise new updates out, and they use this information to construct the RIB, where we store the set of routes that we've learned. We don't just store the best route because if the best route goes down, we may need to fail over to an alternate route. So the RIB contains all the routes. We then take the best router, we publish it down to the FIB. The RIB also contains information about the nature of these different next hops. If we're running BGP, it'll actually keep track of the set of ISPs along the path, policy information, all sorts of other stuff. When we publish down to the FIB, we summarize this information down to only what we need, which is a prefix and the outbound interface, that's all we need forward packets. So by doing this, when data packets arrive, they only need to traverse the data plane, and this is much faster, because there's control plane runs in software. But the data plane is completely offloaded onto hardware. So we published just what we need down to the data plane and then data packets can be forwarded in and out fast without going up to the control plane. So this is the way routers work today. Now, historically, it's been a little bit difficult to do this with IP because the IP protocol specification is complicated. It's got all these options that you need to process, quality a service and things like that. So what a lot of vendors did is they would push down the core forwarding function of IP into the data plane, and they'd have all these special case stuff implemented in software in the control plane. There's an easier way to deal with things. One problem that came up though is data packets would come in and then they'd be sent up to the control plane for special purpose processing. That's fine, if it's just a few packets that have options that needs a special purpose processing. But in general, for a lot of packets are being sent up to the control plane that can overload the control plane. People started realizing this could happen, and malicious entities in the Internet started using this as a denial-of-service attack against routers. So good routers actually disable this processing where you send packets up to the control plane. If you've ever heard the term slow path, the slow path is the path a data packet takes when it goes through the control plane. You want to disable slow path for packets, you want all your data packets to traverse the fast path, that is, just go through the data plane. So this is a logical view of a router. In terms of how it's physically realized in hardware, it looks like this. You have all the different line cards with all these different ports and you have the switching fabric in between. The line cards and the switching fabric together, comprise the data plane. IP packets that come in or Ethernet packets, they just get routed through the data plane, ideally. On top of this, you have the control plane implemented on a route processor, which is often running on a separate line card. The route processor sits there, it runs routing protocols, computes ribs, and then publishes information down to the switching fabric. So you might hear questions like, "I'm running a different routing protocol. Is that going to slow down my packet forwarding? What if I have a lot of firewall rules that I have to traverse, is that going to slow down my packet forwarding?" You can now answer these questions because you can think about where these functions are implemented. If you change the software of a router, that's not going to affect the switching fabric speed, it's not going to affect the latency of packets. So you can run more routing protocols on top. It's not going to slow down the speed of which we're forwarding packets. It may slow down your reaction to failure. If you have a slow control plane, then it'll have to process new routing updates before it can switch onto the other route, that might be slower, but it's not going to affect the latency of packets going through the router, because that's separate, that's offloaded onto the data plane. So in general, there's some terminology surrounding this which is good to be aware of. You may have heard the terms routing and forwarding. These are often used as synonyms, but these are actually very different things. So experts use the term routing to refer to operations done in the control plane. Routing is the process of computing paths that a packet will follow. It refers to computations that are done on the router's CPU, and it creates the forwarding table us output. So routing is done in software. In contrast, forwarding is usually done in hardware. Forwarding corresponds to the data planes operations. Forwarding is centered around the idea of taking enough data packet and forwarding it up the appropriate outbound interface. It uses the forwarding table created by the control plane to do this. So putting all these pieces together, you have the control plane and the data plane. The control plane's job is running routing protocols and maintaining the routing table. On commercial routers, the control plane runs on a special purpose "route processor." So it's like a separate line card. It's got a CPU in it which does that work. Then IP forwarding or the data planes operations, are distributed across the line cards. So the line card will actually have IP processing implemented in it. So it'll take in packets, know the IP protocol well enough to do a lookup, determine the outbound port then switches it into the switching fabric to actually accomplish that task.