20.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. In this
chapter only the fundamental mechanisms and the relevant network
configuration files are covered.
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 20-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 as the
Internet.
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. These are available at
https://www.ietf.org/rfc.html.
Table 20-1 Several Protocols in the TCP/IP Protocol Family
TCP
|
Transmission Control Protocol: a connection-oriented secure protocol.
The data to transmit is first sent by the application as a stream of
data and converted into the appropriate format by the operating
system. The data arrives at the respective application on the
destination host in the original data stream format it was initially
sent. TCP determines whether any data has been lost during the
transmission or the order of the data got mixed up. TCP is
implemented wherever the data sequence matters.
|
UDP
|
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 possible. UDP is suitable for
record-oriented applications. It features a smaller latency period
than TCP.
|
ICMP
|
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.
|
IGMP
|
Internet Group Management Protocol: This protocol controls machine
behavior when implementing IP multicast.
|
As shown in Figure 20-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.
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 20-2. The proof
sum is located at the end of the packet, not at the beginning. This
simplifies things for the network hardware.
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.