- The Internet Layer
- Internet Protocol
- Format of an IP Datagram
- Transmission of Datagrams
- Summary
Internet Protocol
Internet Protocol (IP) is a protocol that operates from the Internet layer of the TCP/IP reference model. The specifications of IP are provided in RFC 791. IP is responsible for transmitting data to the correct destination. It also takes care of routing. Irrespective of the protocol used in the Transport layer, all the protocols rely on IP for sending and receiving data. The following are some of the characteristics of IP:
IP provides a connectionless delivery system. This means that every data packet that is sent across the network is treated as an independent unit. IP does not maintain the details of the connection between the server and the client.
IP does not guarantee a reliable data transfer. However, this does not mean that packets are ignored without a proper rule. Data loss occurs only when there are problems on the network.
IP provides a best-effort delivery system, which means that IP tries to avert data loss as much as possible. Data loss occurs only in exceptional situations, such as problems in the network due to a hardware failure.
NOTE
The process of delivering data from one computer to another is called routing.
To learn more about routing, see "IP Routing," p. 259
Data Transmission Using IP
IP takes care of delivering a data packet irrespective of the location of the destination. Location in this context refers to the network on which the computer is located. The sender and the receiver can belong to the same network or might be on different networks. If the receiver is on the same network, the sender transmits the data directly to the destination. This is also called local delivery of packets. However, if the destination computer is on a different network, an intermediate device is required. The process of routing a data packet to a computer on a remote network is also called remote delivery of packets.
For more information on intermediate devices, see "Intermediate Devices," p. 13
To know more about how a computer checks whether the destination computer is on the same network, see "Routing Concepts," p. 260
The sender is ignorant of how the data packets reach the destination. The sender need not be aware of the path taken by the data to reach the destination. This concept is not new to you. For example, in the postal service, if you post a letter, all that you need to do is provide the correct address. You, as a sender, need not be aware of the how the letter is being sent to the destination. Similarly, during the transmission of data, it might pass through a number of intermediate devices before it reaches the final destination without the sender being aware of it. Each intermediate device can decide the best route or path that can be taken by the data.
NOTE
The data that is sent by the application could be a text file, bitmap file, or an audio file.
Functions of IP
IP defines a set of standards for data transmission. The standards that are defined by IP are as follows:
IP defines the format of the basic unit of data transmission that can be sent to the Network Interface layer. This basic unit of data transmission is called a datagram or an IP datagram. The format of a datagram is discussed later in this chapter. A datagram is sent to the Network Interface layer in which it is encapsulated in a frame and transmitted over the physical medium. A frame is the basic unit of data transfer defined by the Network Interface layer. A datagram is converted to a frame because the Network Interface layer can transmit data only in the form of frames.
IP also performs routing. If there are more routes to the same destination, IP determines the best route that a data packet can take to reach the destination and also sends the data packet through the same path.
IP also defines a set of rules that define the conditions in which a datagram can be discarded. IP works with ICMP, which is responsible for generating error messages when an error occurs during data transmission. The Transport layer protocols, namely TCP and UDP, decide to retransmit data based on the error message that is received.
To know more about how error messages are generated by ICMP, see "Internet Control Message Protocol," p. 61
IP Hourglass Model
The data that is created by an application needs to pass through all the layers of the TCP/IP reference model to reach the destination. For example, the Application layer protocol used might be HTTP, FTP, or TFTP. Every application layer protocol is associated with a Transport layer protocol depending on whether it is connection-oriented or connectionless. The Transport layer protocol, in turn, interacts with IP for routing the data packets. It is very important to understand that irrespective of the Application layer protocols and the Transport layer protocols, the only protocol that is used for routing the data packets is IP. When the data transmission through the four layers is visualized, it takes the shape of an hourglass (see Figure 3.2) and thus the model is called the IP hourglass model.
Figure 3.2 The IP hourglass model depicts that whatever the path is taken by data, it has to pass through IP.
In Figure 3.2, notice that Source A and Source B interact with the HTTP, whereas Source C interacts with TFTP. HTTP interacts with TCP and TFTP interacts with UDP, which are in the Transport layer. TCP and UDP send the data to IP in the Internet layer. IP datagrams are forwarded to the Network Interface layer, which creates the frames based on the network technology used.
For information on RFCs, see "RFCs," p. 425