▸Protocol notes for this page (click to expand)

Cross-layer - Control & Data Plane

Control plane and data plane

Control plane (purple dashed lines in the diagram): exchanges routes with neighbours, computes the best path and programs the result into a forwarding table. It runs only when routes change, perhaps a few times a day, tens of milliseconds each time.

Data plane (blue solid lines): the path packets actually take; for every packet it looks up the table, decrements the TTL and replaces the L2 header. Millions of times a second, microseconds each.

The main difference is frequency: the result of one route computation is used to forward a million packets.

RIB, FIB and data-plane acceleration

The control plane's table is the RIB (all candidate routes plus their attributes); the FIB programmed into the data plane keeps only the selected result: prefix -> egress interface plus next hop. Route attributes are not programmed down because lookups do not use them.

Because the data plane's work is small and fixed, it can be made cheaper with dedicated methods: implementing it in forwarding silicon (line-rate lookups, the CPU never handles packets), bypassing the kernel (polling instead of interrupts, no sk_buff), and on narrowband links compressing headers (trading CPU for bandwidth).

Common misconceptions

A packet's arrival does not trigger route computation: routes were computed beforehand, and an arriving packet only triggers a lookup in an already-computed table.

A control-plane failure does not immediately take the network down: the data plane keeps forwarding from the existing FIB. But the device learns no new routes, so after the next topology change traffic is sent in a direction that no longer works and is lost (a black hole).

Routers are not the only devices with both planes: layer 2 is the same, with STP computing a tree as the control plane and MAC-table lookups as the data plane. Every layer has a control plane and a data plane.