Sign in
Log inSign up
Wonderful Web Communication!

Wonderful Web Communication!

Prem Kantikar's photo
Prem Kantikar
·Feb 20, 2021·

3 min read

Ever wondered how communication between computers and other devices over the internet takes place?

wp2044704.jpg



When the devices send or receive something over the internet it is done based on some set of protocols / basic rules to follow that decides how these devices should be communicating. These protocols dictate what each computer must do to transmit data, when to transmit data, how to transmit that data. It also states how to receive data in the same manner. If the rules are not followed, the computer can't connect to another computer, nor send and receive data between other computers.
One of these protocols is called TCP/IP (Transmission control protocol/Internet protocol). Each device on the internet has an address known as IP Address.

The format of the IP address is :

ipv4.png

This new IP address version namely IPV6 is being deployed to fulfill the need for more Internet addresses. It was aimed to resolve issues that are associated with IPv4. With 128-bit address space, it allows 340 undecillion unique address space. IPv6 also called IPng (Internet Protocol next generation).

ipv6.png

Any package or information sent or received by a device can be in any form like email, webpage, file, etc. Each of these is necessary to be identified. They have a designated port number. Some of the services and their port numbers are listed below.

port.png

  • When someone sends something over the internet, along with the IP address the port number is also sent. Ex: 1.2.3.4 : 80

When we type some URL it sends a request to the server or some device. But each device is recognized using an IP address and not the URL so how does the device get the IP address from the URL? To understand this we need to learn something called DNS (Domain Name System). DNS is a method of mapping the URL to its corresponding IP address. Once DNS has converted the URL into an IP address, the routers on the Internet will know how to route your TCP/IP packet.

The client makes an HTTP (HyperText Transfer Protocol ) request that is served up by the server and sends a response back. HTTP is related to what is being communicated i.e content of the request and content of the response.

A similar abbreviation, HTTPS means (HyperText Transfer Protocol Secure). Basically, it is the secure version of HTTP. Communications between the browser and website are encrypted by Transport Layer Security (TLS), or its predecessor, Secure Sockets Layer (SSL).

The HTTP request and reponse looks something like :

HTTP REQUEST:
GET/HTTP/1.1
Host: google.com

HTTP RESPONSE:
HTTP/1.1 200 OK
Content-Type: text/html

The Get request is sent along with the version and host to be communicated with and the response sends the version and HTTP status code and message along with the content type and some more information.

Some of the HTTP status codes and their messages are:

status codes.png
For more details on status codes refer: httpstatuses.com

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct