A student is curious about how a Web site appears on his com
A student is curious about how a Web site appears on his computer screen. Draw and explain the communication between a client and a server when the client requests a Web page; use the OSI model as a reference. For example, what Application layer protocol is required? How will the process differ if the student is sending or retrieving information to or from a secure Web site? Explain to the student how each OSI model layer contributes to data arriving in the correct place without errors.
Solution
Client -> makes a request to the server
Server-> accepts the request from the client and send the corresponding response to the client
HTTP -> Hypertext Transfer Protocol
HTTP is the key protocol in communication between the client and the server.
Here client is the WEB BROWSER and the server is the WEB SERVER
when a user types some URL(uniform resource locator) in the browser address bar,browser sends HTTP request to the web server.
for e.g: http://www.abc.com/index.html
when the user uses the above URL in the address bar and press the enter key,
GET /index.html HTTP/1.1 is the HTTP Request which send to the server.
Web server in return send the index.html file in response to the client request.
HTTP/1.1 200 OK is the response to the client from the server. After the status code,contains the actual content of the file requested by the client.
200 is the status code, OK is the status description. 200 indicates the successful response from the server.
when the above request and response happens between the client and server, there are several layers in the OSI model works behind for the successful communication between the client and the server.
OSI Open Systems Interconnection
OSI model is the reference model for the network communications.
Application Layer:
HTTP protocol works in this layer. some of the other protocols works in this layer are SMTP,FTP,TELNET etc. Web browser makes a request by entering the url in the address bar. HTTP Request is made at the application layer by the browser.
Presentation Layer:
some of the functions performed by the presentation layer are
i) translation: translating the request between various machines and operating systems
ii) compression: compressing the request for better throughput
iii) encryption: encrypting the data for the security
Session Layer:
This layer is responsible for opening connection between the3 client and server. this layer is responsible for maintaining the session.
Transport Layer:
This layer is responsible for end-to-end communication. Some of the functions performed by trnasport layer are sequencing, flow control, congestion-avoidance. transport layer uses port number for the various processes running in the application layer. data from various processes are assigned the port number. so when the data arrives, data are separated by port numbers and given to the particular application protocols.
TCP/IP is the transport layer protocol, used in this layer.
Network layer:
This layer is responsible for sending the data to the particular machine in the network using IP addressing.
IP protocol is used in this layer.
Data Link layer;
This layer is responsible for sending the data to the host in between the source and destination machines. Flow-control, error-control are the other functions performed by this layer.
Physical Layer:
Data moves in the physical medium like OFC cable, ethernet cable in the form of electrical signals.
HTTPS: hypertext transfer protocol-SECURE
when a user request a page or resource from the secure website,data is encrypted using some code in the transport layer. the code is shared between the source and the destination machines. the secured websites have the url starts with https://, where are the normal website starts with http://.
How the data moves in the OSI layer is depicted in the figure
The above from the application layer is given to the transport layer
After adding the headers, then the unit is called as TCP segments, then it is given to the network layer
After adding the network layers headers, then it is called as IP packets,then it is given to the data link layer
Data-link layer header adds data-link layer header to the ip packet , then it is given to the physical layer
then the physical layer converts the frame into the 101010 binary, moves in the form of electrical signals in the physical medium.
In the destination machines, operations takes place in the reverse order, from physical to data link layer,
data-link layer to network layer, network layer to transport layer, transport layer to session,
session-to presentation, presentation to application layer.
| APPLICATION LAYER |
| PRESENTATION LAYER |
| SESSION LAYER |
| TRANSPORT LAYER |
| NETWORK LAYER |
| DATA LINK LAYER |
| PHYSICAL LAYER |

