Skip to main content

The Entire Communication Process in Networking

 The Entire Communication Process in Networking

Now let us look at the entire communication process considering all the layers collectively. Assume we are sending an email to the address bhushan@glsict.org. Here 'bhushan' is a mailbox on the mail server of "glsict.org'. It is like having a few mailboxes at the entry of an apartment for each of its residents. Here the address "glsict.org' is similar to an apartment address which is common for all mailbox holders at the same place. All of us who work at 'glsict' are given a separate mailbox to store received mails. Whenever a postman has to deliver a mail to a mailbox X belonging to apartment Y, he first of all finds out the apartment Y and then drops the letter in the mailbox X. So the first job is to find out the address of Y. The email ID bhushan@glsict.org is not the actual address. It gets converted to a 32 bit integer known as the IP address. A process known as Domain Name Service is invited to find the IP address for the server glsict.org. Once that address is obtained, we can proceed further.

We will be sending this mail to a mail server on the machine represented by glsict.org Note that there may be more than one processes running on the server. Mail server is just one of them. When we send something, how would the recipient know that the message is for the mail server and not for anybody else? The problem is solved by providing a separate number for each service. This integer which indicates service is known as the port number. The mail server's port number is usually fixed and known globally. All machines should run their mail servers at port no 25.

After getting the IP address from the Domain Name System, our mail client requests the TCP process to establish a connection with the IP address and the port number specified. Upon receiving this request, TCP generates a connection request segment and passes it to the IP layer below. Before passing it to the IP layer, TCP adds a header indicating a few important parameters including the sender's and receiver's port number.

The IP layer looks at the destination IP address and decides where to send that packet next. It is possible that our recipient is ten networks away on a specific path. The IP layer decides the router on the next network. Then it prepares the header including the sender's and receiver's IP addresses, The TCP segment received is embedded inside this packet. Then it passes the packet to the network interface card (the Ethernet card or the Centrino card for example).

This NIC contains the data link layer which generates a frame. The IP address of the immediate next recipient is also converted to the recipient's physical address by means of a process known as address resolution. The frame is constructed now. The sender's physical address is taken from the card itself (as it is the card's own address) and the recipient's address is taken from the address resolution process.

The frame is now sent to the next immediate router. That router's network interface card (Ethernet card in most of the cases) receives that frame. When the physical layer receives the bits, they are passed up. The data link layer now understands the bit streams received as a frame. It checks the destination address which is the card's own address,16 If it is ok, the content of the frame (i.ec., the network layer data) is passed to the network layer. The network layer now checks for the network address of the destination. If that address is not its own, it has to forward that packet. In case of intermediate routers, the destination network's address is not their own address, so they have to route that packet to some other router. They now refer to the table known as the routing table. This table suggests the route to reach a given destination. Once the router learns from the table where to send the packet, the router constructs a new frame. The new frame will contain the sender's address as the router's own address and the receiver's address as the next destination address. Then it is passed to the physical layer to transmit it to the physical layer of the next router. Remember that the next router is decided at the network layer looking at the routing table,

It is important to see that the router processes this message till the network layer and not let it go up. The reason is that the message is not for the router and the transport layer data is of no use for the router. This is similar to a consignment-related message sent by the secretary, which is of no use to the intermediate offices (read routers). The only information needed is the receiver's address, looking at which they can find out where to send the packet next. The router will be able to route successfully with the data available at the network layer itself. That is why when the message reaches at the network layer of an intermediate router, it just takes a return journey back to the physical layer and does not go up.

Then the packet is received by the next router. The next router does similar processing to find out its next router, construct the frame, and send it across. This process will continue till the next destination is the final one.

When the final destination network layer receives the packet, it concludes that the address is its own. Thus, instead of forwarding the packet, it passes the content of the packet up to the transport layer. The transport layer, upon receiving the segment, sends an acknowledgement on the reverse channel in a similar fashion. This is analogous to the document being signed by the recipient secretary in our example. The transport layer, if finds everything ok, passes the data up to the application layer and the application acts upon the command sent by the sender. If the sender has sent the command Is to the receiver which is a Telnet server, then the receiver interprets that the sender wants to have a directory listing. It acts upon that command and prepares the directory listing. Then it sends the listing back on the reverse channel.

Let us take one more example from the Internet domain to reinforce our understanding of the communication process and the duties of each layer. This example also illustrates some issues that we have not seen in the previous example.

Suppose we type http://www.glsict.org/regular.php in our browser's address bar. The URL that we have typed contains two parts. The http://www.glsict.org is the first part and 'regular.php' is the second part. The first part indicates the protocol (http) and the name of the server (www.glsict.org). The second part (regular.php) indicates the name of the page that is requested from that URL. The browser requests the DNS (domain name system) to extract the IP address the URL pertains to. Then the browser passes it on to the application layer. The application layer is identified by the HTTP client in this case. The HTTP client constructs a message like the following.

GET regular.php HTTP/1.1 host:www.glsict.org

The above message indicates that the page regular.php' is requested. (We will not be looking at the exact meaning of each of the components of this command.) This message is given to the transport layer (TCP) requesting it to establish a connection with the IP address obtained from the DNS (i.e., the IP address of www.glsict.org) with the port number 80 (because a web server typically runs at port number 80. As we have seen earlier, every application running on a specific IP address has a unique port number. If we do not specify a port number, it is assumed to be 80). Assume the IP address obtained is 20.30.40.50. 

Now to establish a connection with that IP address, the TCP must send a connection request to the host. Therefore, it generates a connection request with the receiver's port number as 80 and supplies it to the IP layer.

The IP layer decides the next immediate destination for that IP address 20.30.40.50 (assuming that 20.30.40.50 is not directly accessible). Let us assume the next immediate router's address is found to be 30.40.50.60. This information is gathered from the routing table as we have already discussed. Now, the IP constructs a packet indicating the final destination (20.30.40.50) and passes it to the data link layer which in turn sends the packet to 30.40.50.60 (the next router in the chain).

Upon receiving the packet, the data link layer finds out the physical address of 30.40.50.60 (using the address resolution process) and constructs a frame indicating the physical address as a recipient. Then it passes the frame on to the physical layer. The physical layer, upon receiving the frame, sends it bit by bit to the other end. 

Thephysical layer at the other end (of an intermediate router) passes the frame to the data link layer after the entire frame is received. 

The intermediate data link layer extracts the IP layer packet and passes it up to the IP layer of the intermediate router. The IP layer, looking at the final recipient's address, decides to pass it on to 40.50.60.70 and repeats the process to pass it to the IP layer of 40.50.60.70 via the data link and physical layer.

Ultimately the recipient IP layer receives the IP packetand instead of passing it back to the data link layer, it passes the packet up to the TCP layer. If the TCP layer accepts the connection request, then it sends back an acknowledgement using a similar route to the sending TCP layer. Upon receiving the acknowledgement of the request, the sender again sends the acknowledgement back. The sender now sends the HTTP message we have described earlier to the receiver. It will follow the path to the recipient and utilize the services of all layers. Upon receiving the message, the TCP layer at the other end passes it on to its application layer (the Web server or technically an HTTP server). The Web server understands that the page containing regular faculties is requested and sends it back using the same set of layers as in the earlier case.

We have discussed two different examples to describe the communication process. However, we have left a few questions unanswered, for example, how does the DNS convert a name to an IP address? We will discuss these concepts in due course.

Comments