This article throws light upon the three main types of protocols. The types are: 1. Transmission Control Protocol 2. Internet Protocol 3. User Datagram Protocol.
Type # 1. Transmission Control Protocol:
Transmission Control Protocol or TCP is a transport layer protocol. Recall that while discussing the “layer cake” one of the layers in the OSI reference model was the transport layer.
Similarly, this is one of the layers defined in the TCP/IP reference model. In order to carry on a conversation between a source and a destination, establishing a firm connection between the two is desirable. TCP is such a connection-oriented protocol.
At the sender’s end it disassembles messages into discrete packets, sends these discrete packets through the net and again reassembles them at the destination.
ADVERTISEMENTS:
TCP also controls the flow of these packets on the Internet, that is, it tries to ensure that a fast sender does not overburden or swamp a slow receiver. It thus also performs the functions of sequencing and flow control of messages on the Internet. It is, therefore, concerned with congestion management in the Internet.
TCP views the data stream as a sequence of bytes that it divides into segments for transmission. Each segment travels across the network—invariably the Internet—in a single IP datagram. Therefore, the unit of transfer between the TCP software on two machines is called a segment. Segments are exchanged to establish connections, to transfer data, to send acknowledgements and to close connections.
In TCP, an acknowledgement travelling from machine A to machine B may travel in the same segment as data travelling from machine A to machine B, even though the acknowledgement refers to data sent from machine B to machine A. The segment format is shown in Fig. 7.4. The header length is 20 bytes.
This header is followed by options (if any) and that is followed by the data to be transmitted. While there is much that can be written about this protocol, including details of its structure, the information given above is enough for our purposes.
Type # 2. Internet Protocol:
ADVERTISEMENTS:
Internet Protocol or IP is along with TCP, one of the two most important and talked about protocols on the Internet. IP is often called the workhorse of the TCP/IP protocol suite.
All TCP, UDP, ICMP and IGMP data gets transmitted as IP data-grams. This protocol defines the unreliable, connectionless datagram delivery mechanism. By unreliable, we mean that there are no guarantees that an IP datagram will reach its destination.
When something goes wrong, IP simply throws away the datagram and sends an ICMP message back to the source. Any required reliability must be provided by the upper layers, for example, by TCP.
ADVERTISEMENTS:
Therefore, the most fundamental Internet service consists of a packet delivery system and technically it can be said to be defined as an unreliable, best effort, connectionless packet delivery system analogous to the service provided by network hardware that operates on a best-effort delivery paradigm.
The service is said to use best-effort delivery, because the internet software makes an earnest attempt to deliver the packets and does not discard packets capriciously—unreliability arises only when resources are exhausted or networks fail.
Usually, this suite of protocols on the Internet is referred to as TCP/IP protocols, although IP is a Network layer protocol and TCP, is a Transport layer protocol. Indeed, in the TCP/IP reference model, the Network layer is often referred to as the Internet layer.
IP is responsible for moving data-grams on the Internet, including routing them. It does this by creating data-grams as per a predetermined format. This IP datagram consists of a 20-byte fixed header and a variable length optional part. Much of the study of the IP protocol consists of the study of this format. Other protocols associated with IP are several Internet Control Protocols and the Internet Control Message Protocol.
ADVERTISEMENTS:
The diagram below attempts to show the various protocols used in the TCP/IP moded and tries to show the equivalence of these protocols and layers to those in the Open Systems Interconnections (OSI) model.
The TCP/IP model has five layers as against seven layers in the OSI model and names of some of them are different. For example, the Network layer in the OSI model is called the Internet layer in the TCP/IP model. These differences are attempted to be highlighted in the following diagram, Fig. 7.5. The diagram also names the various protocols in the TCP/IP model and shows the layers in which these protocols are utilised.
IP is a Network layer protocol and TCP, as we have seen, is a Transport layer protocol. Indeed in the TCP/IP reference model, the Network layer is often referred to as the Internet layer. IP is responsible for moving data-grams on the Internet, including routing them. It does this by creating data-grams as per a predetermined format.
ADVERTISEMENTS:
This IP datagram consists of a 20-byte fixed header and a variable length optional part. Much of the study of the IP protocol consists of the study of this format.
Other protocols associated with IP are several Internet Control Protocols and the Internet Control Message Protocol.
The organisation of the IP header is shown below in Fig. 7.6:
Type # 3. User Datagram Protocol:
User Datagram Protocol or UDP is a transport layer protocol, but is slightly unreliable; however, it is connectionless. It is used for applications that do not want TCP’s sequencing or flow control and would rather try their own.
It is also used for one shot, client-server type request-reply type queries and applications in which prompt delivery is more important than accurate delivery, such as transmitting speech or video. The network layer protocol most favoured is IP (Internet Protocol) but the transport layer protocol with which IP works can be either TCP or UDP.
UDP provides a way to send encapsulated raw IP datagrams and send them without establishing a connection.
Many client-server applications that have one request and one response use UDP rather than go to the trouble of establishing and later releasing a connection. UDP has been described in RFC 768 (RFC refers to the terminology that became popular during the development of the Internet and stands for “request for confirmation“). The UDP header-is shown in Fig. 7.7.
The UDP segment consists of an 8-byte header followed by the data as shown in Fig. 7.6.
The two ports serve the same function as they do in TCP that is to identify the end points within the source and destination machines. The UDP length field includes the 8-byte header and the data. The UDP checksum includes the same format pseudo-header, as it does in TCP. The UDP header and the UDP data are padded out to an even number of bytes, if need be.
TCP and UDP over Wireless:
In theory, transport protocols should be independent of the technology of the underlying network. In particular, TCP should not be concerned whether IP is running over fibre optics or over radio.
In practice, it does matter, because most TCP implementations have been carefully optimized based on assumptions that are true for wired networks, but which fail for wireless networks. Ignoring the properties of wireless transmission can lead to a TCP implementation that is logically correct, but has very poor performance.
The principal problem will be the congestion control algorithm. Nearly all TCP implementation nowadays assume that timeouts are caused by congestion, not by lost packets. Consequently, when a timer goes off, TCP slows down and sends less vigorously. The idea behind this approach is to reduce network load and thus alleviate congestion. Unfortunately, wireless transmission links are highly unreliable.
They lose packets all the time. The proper approach to dealing with lost packets is to send them again as quickly as possible. Slowing down just makes matters worse. If, for example, 20% of all packets are lost, then when the transmitter sends 100 packets per second, the throughput is 80 packets per second.
If the transmission drops by fifty percent, the throughput also drops by this amount. In effect, when a packet is lost on a wired network, the sender should slow down.
When one is lost in a wireless network, the sender should try harder. When the sender is unaware of the details of the network, the decision becomes difficult. For the purposes of our discussions regarding TCP/IP and its functions, familiarity with the IP header is adequate.