Linux IP Stacks Commentary Web Edition

Overview Of The TCP/IP Stack Commentary

Table of Contents

Introduction

Scope And Focus Of The Commentary


Introduction

Linux distributions ship with both fully functional workstation and server capabilities. The kernel code, directly and through loaded kernel modules, provides these underlying communications layers:

Servers are supported in Linux through a wide range of daemons (programs that run as independent processes but without control terminals). The following list includes a few of the daemons used in networking that are either provided as part of a Linux distribution or can be easily obtained free of charge via the Internet. In almost every case, the name ends with the character “d,” and the names are customarily pronounced as though the “d” were completely separate: “i-net-d,” “apache-d,” and “name-d,” and so on.

Literally hundreds more servers exist, from Internet Relay Chat (IRC) servers to game servers to multimedia servers — and any list of all of them would be obsolete the day after it was generated.

Just as many server programs are available for Linux, many client programs are also available on Linux. Here again, the following list is just a sample of the client programs that are available:

Experimenting with new protocols? Linux makes it easy, by letting you load kernel modules that implement and link new protocols into the system, without having to recompile the kernel each time you make changes to the protocol modules. Experimenting with new applications is even easier (as it is with most Unix-type systems), because building servers and clients that use either TCP or UDP as the Layer 4 protocol is a straightforward process that requires no kernel modification whatsoever.

Scope And Focus Of The Commentary

A complete treatment of all aspects of Linux networking communications would extend far beyond a single book. Therefore, this book concentrates on the basic TCP/IP kernel services that come into play whenever TCP/IP is used: network routing service, packet management service, datagram service, and datastream service. The article chapters provide a top-level view of the particular topic; the associated commentary chapters dig deep into the source code of that portion of the Linux kernel.

Background And Basic Concepts provides some background into the theory and history of TCP/IP, its development, and some of the twisty turns it took between its obscure start as a nuclear-event-survival thought experiment and the mainstream big-dollar market it has become.

To place TCP/IP in an academic perspective, Linux And The ISO Model compares TCP/IP with the ISO model of the networking process. The ISO model provides a good theoretical basis for developing new strategies and procedures, and also helps explain why the communication layers are separated the way they are.

Packet management service takes care of transporting data packets through the network, and is the responsibility of the Internet Protocol. IP receives help from ICMP and IGMP. ICMP is discussed in Internet Control Message Protocol.

To help you understand why the code works as it does, the Sockets API Overview section provides an application program’s view of the networking facility. That section shows the system calls used by application programs to initiate, terminate, control, and feed connections, as well as the options and their meaning (and whether they are supported in this particular TCP/IP implementation), and thus shows the local-system “input” to the networking software.

Network routing service concentrates on taking packets that are provided by processes running on the local system (or packets that are received from other systems) and forwarding those packets to other systems. The routing services, which are the “rocket science” of TCP/IP, are covered in detail in the Routing section.

IP itself is described in detail in the Internet Protocol version 4 section.

User Datagram Protocol (UDP) is intended for those applications that need simple transfers, need them only occasionally, and don’t need (or want) the complexity of sophisticated error recovery. UDP is a popular way to handle domain-name (DNS) look-up requests, thin-system initialization, Dynamic Host Configuration Protocol (DHCP, which enables clients to learn the IP address they are to use), and network diagnostics. UDP is covered in the User Datagram Protocol section.

A popular (not to say essential) implementation of it is described in the Domain Name System (DNS) section, which discusses the innards of DNS.

The heavy lifting is done with the Transmission Control Protocol. Virtually every common network application — Telnet, FTP, Gopher, Archie, the Web — uses TCP to carry data and commands. TCP sports a number of sophisticated algorithms for network management, flow management, and error control, to ensure that data gets to its destination as safely and as quickly as practical. TCP is the subject of the Transmission Control Protocol section.

No system connected to the Internet is immune from the activities of serious dark-side hackers. Even worse, though, are the “script kiddie” wannabes — that is, the many less-talented proto-malefactors who take the work of the few seriously talented crackers and play back those clever scripts against virtually every system on the Internet. The Firewall Support section describes the Linux firewall code, which is designed to keep out the bad guys and the bad kids alike, that comes with every modern Linux kernel.

As noted in the general introduction to this book, these sections are designed as predominantly self-contained units, so that you can go directly to the section or sections that contain the information you need. But if you prefer to read the entire text straight through, by all means be our guest.



Back to Table of Contents


Comments, suggestions, and error reports are welcome.
Send them to: ipstacks (at) satchell (dot) net
Copyright © 2022 Stephen Satchell, Reno NV USA