Linux Kernel Network Stack Internals
Follow a packet through the Linux kernel: link layer, IP routing, TCP state machine, Netfilter and namespaces.
Advanced30 lessons
written lessons≈ 15 h
High-Performance Networking & Cloud-Native · 30 illustrated lessons (text/HTML)
Outcomes
- Trace a packet from the NIC to the socket and back
- Read TCP connection and data-path code with confidence
- Debug the stack with tracing and tune its performance
Where we teach this
The lessons
Every lesson in this curriculum, in the order we teach it.
- 1Learning roadmap
- 2The network subsystem architecture
- 3The network device driver model
- 4Packet reception (top half)
- 5Packet reception (bottom half)
- 6The socket buffer (sk_buff)
- 7The network stack entry point: eth_type_trans, layer-2 processing and packet routing decisions
- 8Link-layer protocol processing
- 9Network-layer protocol entry
- 10The IP routing subsystem explained
- 11IP local delivery
- 12IP forwarding
- 13Transport-layer protocol dispatch
- 14TCP protocol overview
- 15TCP connection management: the three-way handshake in the kernel
- 16TCP data reception: tcp_v4_rcv, receive and out-of-order queues, ACK generation and sending
- 17TCP data transmission: core mechanisms
- 18TCP congestion control
- 19UDP processing
- 20The socket-layer interface in depth
- 21System calls: send and sendmsg
- 22System calls: recv and recvmsg
- 23Netfilter and iptables in depth
- 24Connection tracking (conntrack)
- 25Network namespaces
- 26Virtual network devices in depth
- 27XDP fundamentals
- 28Network performance tuning
- 29Course overview
- 30Summary and outlook
All-access library
Every curriculum on this page, with the labs and lab sequences, for a year.