Network-Layer Services: Forwarding, Routing, Data and Control Planes, and SDN
The Role of the Network Layer
Every host and router in a network has a network layer. The network layer transports segments between the sending and receiving hosts: at the sender it encapsulates segments into datagrams, and at the receiver it delivers segments up to the transport-layer entity.
Transport-layer segments are handled only end to end by the two end systems, but network-layer datagrams pass through every router along the way. Routers need neither the application nor the transport layer; they examine only datagram headers and use them to send each datagram to its next hop.
Data Plane and Control Plane
The network layer can be decomposed into two interacting parts: the data plane and the control plane. The data plane is a per-router function that determines how a datagram arriving on an input port is forwarded to an output port. The control plane determines how datagrams are routed among routers, that is, the end-to-end path a datagram takes from the source host to the destination host.
A road trip illustrates the difference. Choosing an exit lane at each interchange is forwarding; planning beforehand which cities and roads lead from the origin to the destination is routing. Forwarding is a local action inside one router, typically completed in nanoseconds and usually implemented in hardware. Routing involves the whole network, typically takes seconds, and is usually implemented in software.
| Forwarding (data plane) | Routing (control plane) | |
|---|---|---|
| Scope | Inside one router | The whole network |
| Works on | Every arriving packet | Routing information and forwarding tables |
| Timescale | Nanoseconds | Seconds |
| Typical implementation | Hardware | Software |
Every router has a forwarding table. A router uses the value of a field in the packet header to index into its forwarding table, which indicates the output port to which the packet will be forwarded.
Inside one router: look up, then switch
Unlock the complete interactive lab, deeper explanations, and curated reference answers.
KNOWLEDGE QUIZ
Traditional Routing and SDN
The traditional way to configure forwarding tables is for the routing algorithm in each router to communicate with the routing algorithms in other routers and compute the router's forwarding-table values. This communication follows a routing protocol, which exchanges routing messages containing routing information.
Another approach is software-defined networking (SDN). A remote controller, managed by the ISP or a third party, computes and distributes the forwarding tables for every router to use. Routers only forward; they do not make routing choices. The name comes from the fact that the controller, which computes forwarding tables and interacts with the routers, is implemented in software.
Who computes the forwarding tables?
Unlock the complete interactive lab, deeper explanations, and curated reference answers.
KNOWLEDGE QUIZ
The Network-Layer Service Model
The Internet's network layer provides only best-effort service. It tries to deliver each datagram to the destination host, but guarantees neither delivery nor in-order delivery, nor bandwidth or end-to-end delay. Reliable transfer, in-order delivery, and similar functions are implemented by upper-layer protocols such as TCP in the end systems. This simple service model keeps routers simple and lets the Internet interconnect many different kinds of links.
Sort tasks into the data plane and control plane
Classify each task as data plane or control plane, and state whether it happens inside one router or spans the network:
- Read a packet's destination and index the forwarding table
- Recompute paths after a link failure
- Move a packet through the switching fabric to an output port
- Exchange routing messages with neighboring routers
- An SDN controller installs new tables in routers
- Drop a packet because the output buffer is full