Introduction

Scope of Module This module introduces the students to the concepts involved in implementing network stacks (the software and firmware that implement a computer networking protocol suite such as TCP/IP over Ethernet).

Goals and Learning Outcomes

The aim of the module is to introduce students to the software embedded in network devices such as routers to implement network protocols. Where possible, open source implementations of protocols used in live networks will be studied. Both the data plane and the control plane will be studied, including data-link layer protocols, network layer protocols and transport layer protocols. Optimisation techniques, hardware acceleration and other approaches to achieving “wire speed” operation will be investigated. Protocols appropriate to the Internet of Things, to data centres, and to the future Internet will be considered. Having successfully completed this course, the students will be able to:

  • classify network functionality as belonging to the control plane and the data plane respectively
  • explain how a typical operating system processes packets from arrival from an interface card to forwarding to user space
  • describe the principles involved in implementing a network stack in software
  • decompose the software of “middleboxes” such as network routers into a software architecture
  • evaluate the trade-offs involved in hardware versus software implementation of packet processing functions
  • demonstrate advanced theoretical knowledge of networking
  • add functionality to an open-source network stack
  • adapt existing software to meet new networking requirements

Note about software

The module involves exploring the lower layers (the transport layer and below) and also the control plane (which straddles the layers) of protocol stacks. Conventional courses on network programming treat the network as something neatly wrapped inside an Applications Programming Interface such as the BSD sockets API. In this module, we look “under the hood” at the software that lies below this interface.

We’ll be using the Linux implementation of the network stack as our reference for how an Operating System implements network protocols. Ideally we’d study a real-time OS or one used in commercial routers, but these are, unfortunately, not open-source. For the same reason, we will not be looking at how the lower layers are implemented in the market leader OS.

Disclaimer

This is not a training course on Linux kernel software development; it is an academic module about the principles involved in implementing network stacks, which is illustrated by examples drawn largely from the Linux kernel. The Linux kernel is updated frequently, and many optimisations and bug fixes obscure the principles involved. If a concept is clearly illustrated in vX.Y of the kernel, and obfuscated in later versions, the concept will continue to be illustrated using the vX.Y source code.