Principles Digital Communication System & Computer Networks (Charles River Media Computer Engineering)
| < Day Day Up > |
|
20.2 OPERATION OF TCP AND IP
Consider the internet shown in Figure 20.4. Each end system will be running the TCP/IP protocol stack, including the application layer software. Each router will be running the IP layer software. If the networks use different protocols (e.g., one is an Ethernet LAN and another is an X.25 WAN), the router will do the necessary protocol conversion as well. End system A wants to transfer a file to end system B.
When two end systems have to exchange data using TCP/IP protocol stack, a TCP connection is established, and the data transfer takes place. Though IP layer does not provide a reliable service, it is the TCP layer that will ensure end-to-end reliable transfer of data through error detection and retransmission of packets.
Each end system must have a unique address—this address is the IP address. In addition, the process in end system A should establish a connection with the process running in end system B to transfer the file. Another address is assigned to this address, known as the port address. For each application, a specific port address is specified. When port 1 of A wishes to exchange data with port 2 on B, the procedure is:
-
Process on A gives message to its TCP: Send to B port 2.
-
TCP on A gives the message to its IP: Send to host B. (Note: IP layer need not know the port of B.)
-
IP on A gives message to the datalink layer with instructions to send it to router X.
-
Router X examines the IP address and routes it to B.
-
B receives the packet, each layer strips off the header, and finally the message is delivered to the process at port 2.
Note | Though we talk about TCP connection, it needs to be noted that there is no real connection between the end systems. It is a virtual connection. In other words, TCP connection is only an abstraction. |
| < Day Day Up > |
|