As we have observed, communication involves a series of concepts that we will now discuss [Mal96, Com01]:
Internet/intranet: the term intranet refers to the application of Internet technology (the network of networks) within an organisation, basically to distribute the company's internal information and to have it available within the company. For example, the services offered by GNU/Linux as Internet and Intranet services include email, WWW, news etc.
Node: the (host) node refers to a machine that is connected to the network (in a wider sense, a node may be a computer, a printer, a CD (rack) etc.); in other words, an active and differentiable element in the network that requires or provides some kind of service and/or shares information.
Ethernet Network Address (Ethernet address or MAC address): a 48-bit number (for example 00:88:40:73:AB:FF –in octal– 0000 0000 1000 1000 0100 0000 0111 0011 1010 1011 1111 1111 –in binary–) that is inside the physical device (hardware) of the Ethernet driver (NIC) and that is recorded by the manufacturer (this number must be the only one in the world, each NIC manufacturer has a pre-allocated range).
Host name: each node must also have a unique network name. These may simply be names or they may use a scheme based on a hierarchical domain naming scheme. The names of the nodes must be unique, which is easy in small networks, more complex in large networks and impossible on the Internet unless some form of control is implemented. The names must have a maximum of 32 characters within the a-z, A-Z and 0-9 ranges and they may not contain spaces or # beginning with an alphabetic character.
Internet Address (IP address): this consists of four numbers within the range of 0-255 separated by dots (for example, 192.168.0.1) and it is used universally to identify the computers on a network or on the Internet. The names are translated into IP addresses by a DNS (domain name system) server, that transforms the node names (legible to humans) in IP addresses (this service is performed by an application called named).
Example 6-6. Note
Pre-assigned ports in UNIX:
more /etc/services
This command shows the ports predefined with support to TCP or UDP communications.
Port: numerical identifier of the mailbox in a node that allows a specific application to read a message (TCP,UDP) (for example, two machines that communicate by telnet, will do so through port 23, but if they have a FTP transaction they will do so through port 21). There may be different applications communicating between two nodes through various different ports simultaneously.
Router node (gateway): it is a node that performs the routing (data transfer). A router, depending on its characteristics, may transfer information between two similar or different network protocols and may also be selective.
Domain name system (DNS): makes it possible to ensure one single name and to provide the administration of the databases that perform the translation between the name and Internet address and that are structured in the form of a tree. In order to do this, domains separated by points are defined, of which the highest (from right to left) describes a category, institution or country (COM stands for Commercial, EDU for Education, GOV for Governmental, MIL for Military (government), ORG, non-profit Organisation, XX which could be any two letters to indicate the country, or special cases, such as CAT to indicate Catalan language and culture etc.). The second level represents the organisation and the third and remaining sections indicate the departments, sections or divisions within an organisation (for example, www.uoc.edu or nteum@pirulo.remix.es). The first two names (from right to left), uoc.edu in the first case, remix.es (in the second) must be assigned (approved) by the SRI-NIC (global organisation that manages the Internet domain registry) and the rest may be configured/assigned by the institution.
DHCP, bootp: DHCP and bootp are protocols that permit a client node to obtain information on the network (such as the node's IP address). Many organisations with many machines use this mechanism to facilitate the administration of large networks or networks in which there are roaming users.
ARP, RARP: in some networks (such as IEEE 802 LAN, which is the standard for Ethernet), the IP addresses are dynamically discovered through the use of two other members of the Internet protocol suite: address resolution protocol (ARP) and reverse address resolution protocol (RARP). ARP uses broadcast messages to determine the Ethernet address (MAC specification for layer 3 of the OSI model), corresponding to a particular network-layer address (IP). RARP uses broadcast messages (messages that reach all of the nodes) to determine the network-layer address associated with a particular hardware address. RARP is especially important to diskless nodes, for which network-layer addresses are usually unknown at boot time.
Socket Library: in UNIX, all TCP/IP implementation is part of the kernel of the operating system (either within the same or as a module that loads at boot time, as is the case with the device drivers in GNU/Linux).
The way for a programmer to use them is through an API (application programming interface) which implements this source-code interface. For TCP/IP, the most common API is the Berkeley Socket Library (Windows uses an equivalent library that is called Winsocks). This library makes it possible to create a communication end-point (socket), associate it to a remote node and port (bind) and offer the communication service (through connect, listen, accept, send, sendto, recv, recvfrom, for example). The library also provides a more general communication mode (AF INET family) and more optimised communications for cases in which the process are communicating within the same machine (AF UNIX family). In GNU/Linux, the socket library is part of the C standard library, Libc, (Libc6 in current versions), and it supports AF_INET, AF_UNIX, AF_IPX (for Novell protocols), AF_X25 (for the X.25 protocol), AF_ATMPVC-AF_ATMSVC (for the ATM protocol) and AF_AX25,F_NETROM, AF_ROSE (for amateur radio protocol).