O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Linux Kernel Networking: Implementation and Theory

Book Description

Linux Kernel Networking takes you on a guided in-depth tour of the current Linux networking implementation and the theory behind it. Linux kernel networking is a complex topic, so the book won't burden you with topics not directly related to networking. This book will also not overload you with cumbersome line-by-line code walkthroughs not directly related to what you're searching for; you'll find just what you need, with in-depth explanations in each chapter and a quick reference at the end of each chapter.

Linux Kernel Networking is the only up-to-date reference guide to understanding how networking is implemented, and it will be indispensable in years to come since so many devices now use Linux or operating systems based on Linux, like Android, and since Linux is so prevalent in the data center arena, including Linux-based virtualization technologies like Xen and KVM.

What you'll learn

  • Kernel networking basics, including socket buffers

  • How key protocols like ARP, Neighbour Discovery and ICMP are implemented

  • In-depth looks at both IPv4 and IPv6

  • Everything you need to know about Linux routing

  • How netfilter and IPsec are implemented

  • Linux wireless networking

  • Additional topics like Network Namespaces, NFC, IEEE 802.15.4, Bluetooth, InfiniBand and more

  • Who this book is for

    Software developers and architects, project managers, CTOs, network admins and architects, network security professionals, computer science researchers, and Linux kernel hackers. A basic knowledge of C and networking is required; basic knowledge of the Linux kernel is helpful but not mandatory.

    Table of Contents

    1. Title Page
    2. Dedication
    3. Contents at a Glance
    4. Contents
    5. About the Author
    6. About the Technical Reviewer
    7. Acknowledgments
    8. Preface
    9. CHAPTER 1: Introduction
      1. The Linux Network Stack
      2. The Network Device
      3. The Linux Kernel Networking Development Model
      4. Summary
    10. CHAPTER 2: Netlink Sockets
      1. The Netlink Family
      2. Generic Netlink Protocol
      3. Summary
    11. CHAPTER 3: Internet Control Message Protocol (ICMP)
      1. ICMPv4
      2. ICMPv6
      3. ICMP Sockets (“Ping sockets”)
      4. Summary
      5. Quick Reference
    12. CHAPTER 4: IPv4
      1. IPv4 Header
      2. IPv4 Initialization
      3. Receiving IPv4 Packets
      4. Receiving IPv4 Multicast Packets
      5. IP Options
      6. Sending IPv4 Packets
      7. Fragmentation
      8. Defragmentation
      9. Forwarding
      10. Summary
      11. Quick Reference
    13. CHAPTER 5: The IPv4 Routing Subsystem
      1. Forwarding and the FIB
      2. Performing a Lookup in the Routing Subsystem
      3. FIB Tables
      4. ICMPv4 Redirect Message
      5. Summary
      6. Quick Reference
    14. CHAPTER 6: Advanced Routing
      1. Multicast Routing
      2. Policy Routing
      3. Multipath Routing
      4. Summary
      5. Quick Reference
    15. CHAPTER 7: Linux Neighbouring Subsystem
      1. The Neighbouring Subsystem Core
      2. The ARP protocol (IPv4)
      3. The NDISC Protocol (IPv6)
      4. Summary
      5. Quick Reference
    16. CHAPTER 8: IPv6
      1. IPv6 – Short Introduction
      2. IPv6 Addresses
      3. IPv6 Header
      4. Extension Headers
      5. IPv6 Initialization
      6. Autoconfiguration
      7. Receiving IPv6 Packets
      8. Receiving IPv6 Multicast Packets
      9. Multicast Listener Discovery (MLD)
      10. Sending IPv6 Packets
      11. IPv6 Routing
      12. Summary
      13. Quick Reference
    17. CHAPTER 9: Netfilter
      1. Netfilter Frameworks
      2. Netfilter Hooks
      3. Connection Tracking
      4. Summary
      5. Quick Reference
    18. CHAPTER 10: IPsec
      1. General
      2. IKE (Internet Key Exchange)
      3. IPsec and Cryptography
      4. The XFRM Framework
      5. ESP Implementation (IPv4)
      6. Receiving an IPsec Packet (Transport Mode)
      7. Sending an IPsec Packet (Transport Mode)
      8. XFRM Lookup
      9. NAT Traversal in IPsec
      10. Summary
      11. Quick Reference
    19. CHAPTER 11: Layer 4 Protocols
      1. Sockets
      2. Creating Sockets
      3. UDP (User Datagram Protocol)
      4. TCP (Transmission Control Protocol)
      5. SCTP (Stream Control Transmission Protocol)
      6. DCCP: The Datagram Congestion Control Protocol
      7. Summary
      8. Quick Reference
    20. CHAPTER 12: Wireless in Linux
      1. Mac80211 Subsystem
      2. The 802.11 MAC Header
      3. The Other 802.11 MAC Header Members
      4. Network Topologies
      5. Power Save Mode
      6. The Management Layer (MLME)
      7. Mac80211 Implementation
      8. High Throughput (ieee802.11n)
      9. Mesh Networking (802.11s)
      10. Linux Wireless Development Process
      11. Summary
      12. Quick Reference
    21. CHAPTER 13: InfiniBand
      1. RDMA and InfiniBand—General
      2. RDMA Resources
      3. Summary
      4. Quick Reference
    22. CHAPTER 14: Advanced Topics
      1. Network Namespaces
      2. Cgroups
      3. Busy Poll Sockets
      4. The Linux Bluetooth Subsystem
      5. IEEE 802.15.4 and 6LoWPAN
      6. Near Field Communication (NFC)
      7. Notifications Chains
      8. The PCI Subsystem
      9. Teaming Network Device
      10. The PPPoE Protocol
      11. PPPoE Header
      12. Android
      13. Summary
      14. Quick Reference
    23. APPENDIX A: Linux API
      1. The sk_buff Structure
      2. The net_device structure
      3. RDMA (Remote DMA)
      4. RDMA Device
      5. Protection Domain (PD)
      6. eXtended Reliable Connected (XRC)
      7. Shared Receive Queue (SRQ)
      8. Address Handle (AH)
      9. Multicast Groups
      10. Completion Queue (CQ)
      11. Queue Pair (QP)
      12. Memory Windows (MW)
      13. Memory Region (MR)
    24. APPENDIX B: Network Administration
      1. arp
      2. arping
      3. arptables
      4. arpwatch
      5. ApacheBench (ab)
      6. brctl
      7. conntrack-tools
      8. crtools
      9. ebtables
      10. ether-wake
      11. ethtool
      12. git
      13. hciconfig
      14. hcidump
      15. hcitool
      16. ifconifg
      17. ifenslave
      18. iperf
      19. iproute2
      20. iptables and iptables6
      21. ipvsadm
      22. iw
      23. iwconfig
      24. libreswan Project
      25. l2ping
      26. lowpan-tools
      27. lshw
      28. lscpu
      29. lspci
      30. mrouted
      31. nc
      32. ngrep
      33. netperf
      34. netsniff-ng
      35. netstat
      36. nmap (Network Mapper)
      37. openswan
      38. OpenVPN
      39. packeth
      40. ping
      41. pimd
      42. poptop
      43. ppp
      44. pktgen
      45. radvd
      46. route
      47. RP-PPPoE
      48. sar
      49. smcroute
      50. snort
      51. suricata
      52. strongSwan
      53. sysctl
      54. taskset
      55. tcpdump
      56. top
      57. tracepath
      58. traceroute
      59. tshark
      60. tunctl
      61. udevadm
      62. unshare
      63. vconfig
      64. wpa_supplicant
      65. wireshark
      66. XORP
    25. APPENDIX C: Glossary
    26. Index