29.0 Basic Networking
Linux offers the necessary networking tools and features for integration
into all types of network structures. The customary Linux protocol,
TCP/IP, has various services and special features, which are discussed
here. Network access using a network card, modem, or other device can be
configured with YaST. Manual configuration is also possible. Only the
fundamental mechanisms and the relevant network configuration files are
discussed in this chapter.
Linux and other Unix operating systems use the TCP/IP protocol. It is not
a single network protocol, but a family of network protocols that offer
various services. The protocols listed in
Table 29-1 are provided for the purpose of
exchanging data between two machines via TCP/IP. Networks combined by
TCP/IP, comprising a worldwide network are also referred to, in their
RFC stands for Request for Comments. RFCs are
documents that describe various Internet protocols and implementation
procedures for the operating system and its applications. The RFC
documents describe the setup of Internet protocols. To expand your
knowledge about any of the protocols, refer to the appropriate RFC
documents. They are available online at
Table 29-1 Several Protocols in the TCP/IP Protocol Family
Transmission Control Protocol: A connection-oriented secure protocol.
The data to transmit is first sent by the application as a stream of
data then converted by the operating system to the appropriate
format. The data arrives at the respective application on the
destination host in the original data stream format in which it was
initially sent. TCP determines whether any data has been lost during
the transmission and that there is no mix-up. TCP is implemented
wherever the data sequence matters.
User Datagram Protocol: A connectionless, insecure protocol. The data
to transmit is sent in the form of packets generated by the
application. The order in which the data arrives at the recipient is
not guaranteed and data loss is a possibility. UDP is suitable for
record-oriented applications. It features a smaller latency period
Internet Control Message Protocol: Essentially, this is not a
protocol for the end user, but a special control protocol that issues
error reports and can control the behavior of machines participating
in TCP/IP data transfer. In addition, it provides a special echo mode
that can be viewed using the program ping.
Internet Group Management Protocol: This protocol controls machine
behavior when implementing IP multicast.
As shown in Figure 29-1, data exchange takes place
in different layers. The actual network layer is the insecure data
transfer via IP (Internet protocol). On top of IP, TCP (transmission
control protocol) guarantees, to a certain extent, security of the data
transfer. The IP layer is supported by the underlying hardware-dependent
protocol, such as ethernet.
Figure 29-1 Simplified Layer Model for TCP/IP
The diagram provides one or two examples for each layer. The layers are
ordered according to abstraction levels. The lowest
layer is very close to the hardware. The uppermost layer, however, is
almost a complete abstraction from the hardware. Every layer has its own
special function. The special functions of each layer are mostly implicit
in their description. The data link and physical layers represent the
physical network used, such as ethernet.
Almost all hardware protocols work on a packet-oriented basis. The data to
transmit is packaged in packets, because it cannot be
sent all at once. The maximum size of a TCP/IP packet is approximately 64
KB. Packets are normally quite a bit smaller, because the network hardware
can be a limiting factor. The maximum size of a data packet on an ethernet
is about fifteen hundred bytes. The size of a TCP/IP packet is limited to
this amount when the data is sent over an ethernet. If more data is
transferred, more data packets need to be sent by the operating system.
For the layers to serve their designated functions, additional information
regarding each layer must be saved in the data packet. This takes place in
the header of the packet. Every layer attaches a
small block of data, called the protocol header, to the front of each
emerging packet. A sample TCP/IP data packet traveling over an ethernet
cable is illustrated in Figure 29-2. The proof
sum is located at the end of the packet, not at the beginning. This
simplifies things for the network hardware.
Figure 29-2 TCP/IP Ethernet Packet
When an application sends data over the network, the data passes through
each layer, all implemented in the Linux kernel except the physical layer.
Each layer is responsible for preparing the data so it can be passed to
the next layer. The lowest layer is ultimately responsible for sending the
data. The entire procedure is reversed when data is received. Like the
layers of an onion, in each layer the protocol headers are removed from
the transported data. Finally, the transport layer is responsible for
making the data available for use by the applications at the destination.
In this manner, one layer only communicates with the layer directly above
or below it. For applications, it is irrelevant whether data is
transmitted via a 100 MBit/s FDDI network or via a 56-kbit/s modem line.
Likewise, it is irrelevant for the data line which kind of data is
transmitted, as long as packets are in the correct format.