Description |
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 chaley@netdot.net. 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. |
||
Physical |
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) |
||
Network |
This is the layer that addresses and routes packets through the network. (this is where IP headers get assembled into a TCP/IP Packet) | ||
Transport |
Provides a transparent and reliable packet transfer mechanism between systems. (this is where TCP headers get assembled into a TCP/IP Packet) |
||
Session |
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) |
||
Presentation |
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. |
||
Application |
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, |
||
Ethernet |
The backbone of |
||
Modem (PPP) |
Despite being slow and often unreliable, PPP (point-to-point)
modem communications are widely used. |
||
|
|||
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 (httpd) |
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: http://www.apache.org/ |
||
DNS Service (named) |
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 curly.stooges.net) to IP
addresses like (10.0.0.3). 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 |
||
inetd |
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
|
||