Routers are the backbone of computer networks, directing data packets between devices. Their architecture comprises key components like routing processors, switching fabrics, and input/output ports, all working together to efficiently forward packets.
The control plane and data plane are crucial aspects of router functionality. The control plane handles network-wide logic and routing decisions, while the data plane focuses on fast packet forwarding. This separation allows for optimized performance and scalability in network operations.
Router Architecture
Components of router architecture
- Routing processor runs routing protocols (OSPF, BGP), builds and maintains routing tables, performs network management functions
- Switching fabric interconnects router's input and output ports, transfers packets between ports
- Input ports terminate physical links, perform link-layer functions (Ethernet)
- Output ports have same functions as input ports, may include queueing and scheduling mechanisms
- Forwarding engine responsible for packet forwarding, consults forwarding table, determines output port for each packet
Process of packet forwarding
- Packet arrival at input port, link-layer processing performed
- Forwarding table lookup by forwarding engine, matches packet's destination IP address, determines output port
- Packet transferred from input port to output port via switching fabric
- Output processing: packet queued at output port, link-layer encapsulation performed, packet transmitted on outgoing link
Control Plane and Data Plane
Control plane vs data plane
- Control plane builds and maintains routing tables, runs routing protocols, exchanges routing information with other routers, slow path implemented in software
- Data plane responsible for packet forwarding, consults forwarding table, fast path implemented in hardware
- Separation of concerns: control plane focuses on network-wide logic, data plane focuses on per-packet processing
Role of routing tables
- Routing table built by routing protocols (OSPF, BGP), contains network topology information, lists best paths to network destinations, used by routing processor
- Forwarding table derived from routing table, optimized for fast lookups, contains only necessary information for forwarding (destination IP prefix, output port, next-hop IP address), consulted by forwarding engine for each packet