The web is one of the many applications to access the internet, and web browsers are just a computer program that enables you to view and download webpages. What happens when you click enter on the address bar?
The internet is a decentralised network of networks (of computers). Each connected computer have an unique address called IP (Internet Protocol) address. The internet is composed of three parts:
- The last mile, provided to homes and businesses through TV companies, fibre optics, telephone cables, towers (wireless).
- Data centres, rooms of servers that store data and host content.
- The backbone, networks that carry data between data centres and consumers.
Data Centres <--> Backbone <--> Last Mile (Consumers)
You can use the built-in ping program to see if your computer is alive on the internet. Open the terminal and type the following command:
The ping program maps the domain name to the computer's IP address, sends a ICMP (Internet Control Message Protocol) request and comes back with a reply.
The human readable data needs to be resolved into electronic signals for machines before it reaches the backbone, protocol stack in the operating system takes care of this job.
Message on the sender machine goes through 4 protocol layers in a broad sense:
- Application Protocol Layer, where user interacts and specific for each application e.g. HTTP
- Transmission Control Protocol (TCP) Layer, directs packets of data to the correct application (i.e. listening port) once it arrives on the target computer
- Internet Protocol Layer, packets directed to computer associated with the IP address
- Hardware layer, converts between binary data and network signals
TCP/IP standard is the foundation of modern internet, which is why the protocol stack is also known as TCP/IP stack.
The packets then will make their journey through several routers and backbones until they find the target destination. Each router knows its sub-networks and holds an IP address table for that region, it acts as a packet switch to direct packets in the routing hierarchy. Use the trace route program to see the path taken in action:
On the receiver side, the packets of data goes through the layers in reverse order to reconstruct the original message.