Operation of TCP and IP

Thilakshids
3 min readSep 5, 2021

--

The below diagram indicates how these protocols are configured for communications. To make clear that the total communications facility may consist of multiple networks, the constituent networks are usually referred to as subnetworks. Some sort of network access protocol, such as the Ethernet logic, is used to connect a computer to another host or, if the target host is on another subnetwork, to a router that will forward the data. IP is implemented in all of the end systems and the routers. It acts as a relay to move a block of data from one host, through one or more routers, to another host. TCP is implemented in all of the end systems, it keeps track of the block of data to assure that all are delivered reliably to the appropriate application.

For successful communication, every entity in the overall system must have a unique address. Actually, two levels of address are needed. Each host on a subnetwork must have a unique global internet address. This allows the data to be delivered to the proper host. Each process with a host must have an address that is unique within the host, this allows the host-to-host protocol(TCP) to deliver data to the proper process. These latter addresses are known as ports.

Let me trace a simple operation. Suppose that a process, associated with port 1 at host A, wishes to send a message to another process, associated with port 3 at host B. The process at A hands the message down to TCP with instructions to send it to host B, port 2. TCP hands the message down to IP with instructions to send it to host B. Note that IP need not be told the identity of the destination port. All it needs to know is that the data are intended for host B. Next, IP hands the message down to the network access layer with instructions sends it to router J(the first stop on the way to B).

To control this operation, control information, as well as user data, must be transmitted, as to suggest in the below diagram let me say that the sending process generates a block of data and passes this to TCP. TCP may break this block into smaller pieces t make it more manageable. To each of these pieces, TCP appends control information known as the TCP header, forming a TCP segment. The control information is to be used by the peer TCP protocol entity at host B. Examples of items in this header include the following:

Protocol data units in the TCP/IP Architecture

Destination Port: When the TCP entity at B receives the segment, it must know to whom the data are to be delivered.

Sequence number: TCP numbers the segments that it sends to a particular destination port sequentially, so that if they arrive out of order, the TCP entity at B can reorder them.

CheckSum: The sending TCP includes a code that is a function of the contents of the remainder of the segment. The receiving TCP performs the same calculation and compares the result with the incoming code. A discrepancy results if there has been some error in transmission.

--

--

Thilakshids
Thilakshids

Written by Thilakshids

Software Quality Assurance Engineer

No responses yet