This document is intended to be a brief tutorial on basic networking fundamentals, especially as they apply to the construction of Free Unix based networks. This is by no means a complete reference on the subject. Send any comments or suggestions to

Warning: This page is currently under development

In order to understand a network, it is useful to know how networks work on a more abstract, general level.

OSI Model

The OSI Model is more of a virtualized way to imagine networking than anything else, but is conceptually the same throughout any type of network. The Open System Interconnect Reference Model (OSI), is a communication model developed by the International Standards Organization (ISO), the primary standard-setting body in the data communication industry. This model defines seven layers, each of which provide a subset of all of the LAN services. This layered approach allows small groups of related services to be implemented in a modular fashion, this makes designing network software much more flexible. Below is a brief explanation about each layer, and where some familiar networking components reside.


This layer is the pavement of the Highway and defines the electrical, mechanical, and physical interfaces to the network. (this is the physical network itself, cabling, hubs, switches, etc.)

Data Link

This layer (sometimes refereed to as the logical link layer) provides the packet structure and controls to move data along the physical layers of the highway. This layer addresses error detection and flow control. (this is where Ethernet packets are constructed)


This is the layer that addresses and routes packets through the network. (this is where IP headers get assembled into a TCP/IP Packet)


Provides a transparent and reliable packet transfer mechanism between systems. (this is where TCP headers get assembled into a TCP/IP Packet)


This is where you establish, manage, synchronize, and terminate a session dialogue. (a TCP session (such as a telnet session or an HTTP request) operates on this layer)


This is where data is transformed, allowing you to move along the highway using a data-transfer format. Encoding, decoding, and compression of data happens here. For the security-minded, this layer encrypts and decrypts data.


This is where end users' applications interface to the network. Standardized network services are provided to applications in this layer.

Building Your Network

The first step you'll need to take in constructing your net is to assemble the physical network. The composition of physical networks are wide and varied. Some are linked by Ethernet using coaxial or twisted pair cable, some are linked by fiber optics, and some are even pushing data back and forth via radio. In fact, most networks incorporate a variety of different physical network media. One of the best examples of this mixed-media networking in action is the internet.

For the sake of brevity, we'll discuss a fairly basic local network in this document.

An Example

We will examine the construction and operation of our fictional example network, There are three nodes on the network: larry, curly, and moe. All three nodes are linked via Ethernet to each other. moe also has a PPP connection (over a modem) to his ISP. (see diagram below)


The backbone of is the Ethernet. Ethernet comes in many flavors on many different types of media. The most common are 10-Base-T (which runs on a twisted-pair cable) and 10-Base-2 (which runs on a coaxial cable, similar to that which carries cable TV). In order to connect more than one node to a 10-Base-T network, a hub is required. In this example, makes use of a 10-Base-2 network. The physical media itself is connected to a Network Interface Card (NIC for short), which is usually installed as a card in the computer.

Modem (PPP)

Despite being slow and often unreliable, PPP (point-to-point) modem communications are widely used. has a PPP link from moe

In order to make use of a physical network, the operating system has to know how to communicate with the NIC or modem in order to send and receive data. In Linux/BSD this is accomplished by compiling a driver (in the case of Ethernet, a driver for the NIC) (in the case of modems, a serial driver) into the kernel. The kernel provides system function calls to programs and services on your computer which enable services to send and receive data over the network. To minimize confusion, the system assigns an "interface" to each network type on the computer.

There are two types of services which run on Linux/BSD, standalone services (like the Apache HTTP Daemon) and inetd services (like telnetd or ftpd). Standalone services constantly run in the background, waiting for TCP/IP or UDP/IP connecitons from another node. Inetd services, on the other hand, do not run at all until a connection is requested from another node. Instead of running one copy of every single service available, one copy of a daemon called inetd waits for connections on specified ports and then spawns a copy of the appropriate daemon (like telnetd).

WWW Service

To serve web pages and other HTTP (HyperText Transfer Protocol) data is one of the most useful services that a node can provide. In Linux/BSD the server usually used is the Apache HTTP Daemon. This process gets started at boot time, and starts listening, waiting for a connection request from another node, on a specific TCP port (usually port 80). Apache httpd is configured by editing a set of server-config files, which will not be described in this document. (Refer to the main apache site for detailed documentation:

DNS Service

Another service which is vital to the operation of a network is DNS (Domain Name Service). DNS is a sort of white pages, which matches hostnames (like to IP addresses like ( On a Linux/BSD box, the name server is a binary called named. named gets started at boot time, and listens for connection requests on its specified port. Configuration of the named server is done by editing the named.boot file, which usually resides in /etc, and zone files, which actually contain the database of hosts and IP addresses. (for more information on configuring named, man named)


The key to getting most services installed and operational is successfully configuring the inetd superserver. Inetd keeps a table of all possible services in a file called /etc/services. Here is a sample /etc/services file:

daytime 13/tcp
daytime 13/udp
qotd 17/tcp quote #Quote of the Day
qotd 17/udp quote #Quote of the Day
msp 18/tcp #Message Send Protocol
msp 18/udp #Message Send Protocol
chargen 19/tcp ttytst source #Character Generator
chargen 19/udp ttytst source #Character Generator
ftp-data 20/tcp #File Transfer [Default Data]
ftp-data 20/udp #File Transfer [Default Data]
ftp 21/tcp #File Transfer [Control]
ftp 21/udp #File Transfer [Control]
ssh 22/tcp #Secure Shell Login
ssh 22/udp #Secure Shell Login
telnet 23/tcp
telnet 23/udp
smtp 25/tcp mail #Simple Mail Transfer
smtp 25/udp mail #Simple Mail Transfer