6.2. Introduction to TCP/IP (TCP/IP suite)

The TCP/IP protocol synthesises an example of a will to communicate and to standardise the communication on a global scale.


The TCP/IP is, in reality, a set of basic protocols that have been added to the original protocol, to meet the different needs in computer-to-computer communication, such as TCP, UDP, IP, ICMP, ARP. [Mal96]

TCP/IP is most frequently used by most current users to remotely connect to other computers (telnet, SSH Secure Shell), to use remote files (NFS network file system) or to transfer them (FTP file transfer protocol, HTTP hypertext markup protocol).

Example 6-1. Note

Typical use of TCP/IP remote login:

telnet localhost Debian GNU/Linux 4.0


6.2.1. Services on TCP/IP

The most important traditional TCP/IP services are [Gar98]:

The progress in the technology and the increasingly lower cost of computers has meant that determined services have specialised and are now configured on determined computers working in a client-server model. A server is a system that performs specific services for the rest of the network or connected clients. A client is another computer that uses this service. All of these services are generally offered within TCP/IP:

6.2.2. What is TCP/IP?

TCP/IP is in fact two communication protocols between computers that are independent to each other.


On the one hand, TCP (transmission control protocol) defines the communication rules so that a (host) computer can talk to another computer (if we use the OSI/ISO communications model as a reference, it describes layer 4, see following table).

TCP is a connection-oriented protocol, in other words, it is equivalent to a telephone, and the communication is considered as a data stream.


IP (Internet protocol) defines the protocol to identify the networks and establish the pathways between different computers.

In other words, it routes the data between two computers through the networks. It corresponds to layer 3 of the OSI/ISO model and it is a connectionless protocol (see following table). [Com01, Rid00, Dra99]

An alternative to TCP is the UDP protocol (user datagram protocol), which treats the data as a message (datagram) and sends packets. It is a connectionless protocol (the recipient computer does not necessarily have to be listening when the other computer establishes communication with it) and it has the advantage of creating less overload on the network than a TCP connection, but it is less reliable (the packets may not arrive or arrive duplicated).

There is another alternative protocol called ICMP (Internet control message protocol). ICMP is used for error or control messages. For example, if one tries to connect to a host computer, the local computer may receive an ICMP message indicating "host unreachable". ICMP may also be used to extract information on a network. ICMP is similar to UDP in that it handles messages (datagrams), but it is simpler than UPD, because it does not have port identification (the ports are mailboxes where the data packets are left and where the server applications read the packets) in the message header.

In the OSI/ISO communications model (OSI, open systems interconnection reference model, ISO, International Standards Organization), is a theoretical model applied by many networks.There are seven communication layers where each one has an interface for communicating with the preceding and following one.

To summarise, TCP/IP is a set of protocols including IP, TCP, UDP that provide a set of low-level functions used by most of the applications. [KD00, Dra99].

Some of the protocols that use the abovementioned services were designed by Berkeley, Sun or other organisations. They are not imcluded (officially) as part of the Internet protocol suite (IPS). However, they are implemented using TCP/IP and they are therefore considered as a formal part of IPS. A description of the protocols available by Internet can be found in RFC 1011 (see references on RFC [IET]). There is currently a new version of protocol IPv6, also called IPng (IP next generation) which replaces IPv4. This protocol significantly improves the previous ones in elements such as having a greater number of nodes, traffic control, security or improvements in the routing.

6.2.3. Physical network devices (hardware)

From the physical point of view (layer 1 of the OSI model), the most commonly used hardware for LAN is that known as Ethernet (or FastEthernet or GigaEthernet). Its advantages consist of a lower cost, acceptable speeds (10, 100 or 1,000 megabits per second) and its user-friendly installation.


There are three connection modes, depending on the type of interconnection: thick, thin and twisted pair.

The first two are obsolete (they used coaxial cable) whereas the last is through twisted pair cables and connectors similar to those used by telephones (known as RJ45). The twisted pair connection is known as 10baseT or 100baseT (according to the speed) and it uses repeaters known as hubs as interconnection points. Ethernet technology uses intermediate communication elements (hubs, switches, routers) to configure multiple segments of the network and divide the traffic to improve the performance of the data transfer. Normally, in large organisations, these Ethernet LAN are interconnected through fibre optic cables using FDDI (fibre distributed data interface) technology, which is more expensive and more difficult to install, but with which we can obtain transmission speeds equivalent to Ethernet whilst not having the limits on distance involved in Ethernet (FDDI allows for distances of up to 200 km). The costs are justified when they are used between buildings or other network segments that are very congested. [Rid00, KD00].

At the same time, there are other types of hardware that are less common, but no less interesting, such as ATM (asynchronous transfer mode). This hardware allows us to set up a LAN with a high level of service quality and it is a good option when we have to set up high-speed and low-latency networks, such as those that require real time video streaming.

There is other hardware supported by GNU/Linux for interconnecting computers, of which we would mention: Frame Relay or X.25 (used in computers that access or interconnect WANs and for servers with large data transfer needs), Packet Radio (interconnection via radio using protocols such as AX.25, NetRom or Rose) or dial-up devices that use serial lines, which are slow but very cheap, through analogical or digital (RDSI, DSL, ADSL etc.) modems. The latter are the ones commonly used domestically or in small and medium-sized businesses, and they require another protocol for the transmission of packets, such as SLIP or PPP. In order to virtualise the diverse hardware on a network, TCP/IP defines an abstract interface through which all the packets that will be sent by a physical device (which includes a network or network segment) are concentrated. Consequently, for each communication device in the machine, we will have a corresponding interface in the operating system's kernel.

Example 6-2. Example

In GNU/Linux, Ethernet is called with ethx (where, "x" indicates an order number beginning with 0), the interface to serial lines (modems) is called up with pppx (for PPP) or slx (for SLIP); fddix is used for FDDI. These names are used by the commands to configure them and assign them the identification that will subsequently permit them to communicate with other devices in the network.

In GNU/Linux, this may mean that we have to include the appropriate modules for the appropriate device (NIC network interface card) in the kernel or as modules, and this means compiling the kernel after choosing, the appropriate NIC, with, for example, make menuconfig, indicating it as internal or as a module (in the latter case, the appropriate module must also be compiled).

Example 6-3. Note

How do we see the network interfaces that are available?

ifconfig -a

This command shows all of the default interfaces/parameters for each one.

The network devices can be seen in the /dev directory, where there is a file (a special file, which may be a block file or a character file, according to the transfer) that represents each hardware device.[KD00, Dra99].