TCP/IP Application Layer

Application Layer Protocols

Application layer in TCP/IP model is the first step in the communication during which data is encoded and sent to and from transport layer ports. Application layer defines user-friendly method of presenting, naming, sending and receiving data.

The most common and popular TCP/IP application is the web browser. Using a web browser, it’s very simple and easy to browse any web site. Select a web site and type the name of web site in web browser to view web page on your computer.

But what makes these web pages to appear on your computer? Here is an example, which explains this process in detail

John web browser (Internet Explorer or Mozilla Firefox) is configured in such a web that, whenever he opens, it will automatically ask for web server Ruby’ s default web page (home page).

General Application logic to get web page



What actually happens is: First request from John asks Ruby to send her home page back. Ruby‘s web server has been configured to identify the location of the file (name.htm) where Ruby‘s web page is stored. John gets the file name.htm from Ruby and contents of the file will be displayed on the web browser window.

In the above example, two TCP/IP application layer protocols are used. Request for the file and transfer of file is executed by HTTP (Hypertext Transfer protocol). You might have noticed that most of the web sites URLs (universal Resource Locators: the text to recognize a web server and a specific web page) start with “http”, which means that HTTP is used to transfer the web pages.

The second protocol known as HTML (Hypertext Markup Language), describes how John’s web browser has to read the contents in the file to display it .The file may contain the size, color etc of the text or it may contain graphics, images and animation.

HTTP Request message format
The next example gives details about functions of networking protocols. Figure below shows the locations of HTTP header and data.

HTTP Get request and reply


Request from John is sent in the form of HTTP header, which contains commands to “get” the required file. Along with the command it also contains the name of the file (in this example it is name.htm). In case when the file name is not mentioned, the web server assumes that the request from John is for default home page. The reply from Ruby contains a HTTP return code along with header.

When the web page is not found in the web server, a HTTP404 “not found “error will be received, which means that you have received HTTP return code of 404. When the requested web page is found, the return code will be “0”.

Interaction between John and Ruby introduces a concept behind networking model. The application layer protocol on Ruby. This is done by creating and transferring application layer header and sometimes not. This process is known as same layer interaction.

Application layer provides the application, the ability to access the services provided by other layers. The most widely used protocols other than HTTP are listed below along with their respective port number and description.

HTTP Response message format

0 comments:

Post a Comment