A Martian’s guide to the Internet (2)
I suggest you go through the first post I wrote in this series to get a quick overview of how the current state of internet came to be.
Routers: Your gateway to the internet
Routers are small computers that help in connecting computers over a network, their main task being ‘routing’ packets to the correct destination. Just like your computer, a router has a small CPU and some memory. This memory is used mainly to store the operating system and the ‘routing table’ that has information about all the device that this router connects. Routers can be as small as the smallest router I ever owned, a TP-Link Nano WR702N, or as large as Cisco’s CRS-X Router Pack.
The larger router systems (like the CRS-X) may occupy rooms and are used by ISPs and can handle larger traffic in the magnitudes of petabits per second. Such large routers are mostly used by backbone ISPs.
As mentioned earlier modern routers come with the modem coupled in the same hardware. This wasnt the case during the early days of the internet. One had to get their own separate router, modem and a lot more other devices!
A consumer grade router is a network router that connects the internet to your local area network. The ISP provides a dynamic IP address to your router and this is shared by all your household devices connected to the router. A physical WAN (Wide Area Network) port present on the router is the one that physically connects the cable coming from your ISP (the internet) to your network. LAN ports help in connecting all your other devices to this router. A typical modern day consumer grade router comprises of four components:
NAT (Network Address Translator)
Network address translation is something that can be done with hardware as well as with software. In consumer routers its mostly software based. NAT was introduced as something to conserve the limited IP addresses. We as consumers have more than one device connected to our personal router. Assigning a dedicated IP to every device we have will run out the IP addresses quicker than we can imagine. Also, not all devices are going to be always connected to the internet. So it makes no sense to have a permanent IP assigned to them. What NAT does is help us in representing all our devices as just one single IP to the internet. Our internet service provider assigns an IP to our consumer router. The entire private network on our LAN is represented by this one single IP address (unless the configurations of the router are tampered with). This is one of the many functions of NAT.
DHCP (Dynamic Host Configuration Protocol)
DHCP is a client/server protocol that provides an IP address to devices connected a network. It automatically leases IP address for a particular time period to any new device that connects to a network. If the device is no longer connected to the network, DHCP removes the IP address from the list of connected devices and keeps it in a pool for it to be allocated to new devices.
In computing, a firewall is a network security system that monitors and controls incoming and outgoing network traffic based on predetermined security rules. A firewall typically establishes a barrier between a trusted internal network and untrusted outside network, such as the Internet.
-Wikipedia (this was the simplest one)
Almost all routers these days have wireless capabilities. Earlier devices could be connected only using ethernet cables locally. With the advent of WiFi, most new routers have built in wireless connection capability.
You can see most of these configurations in your home routers by visiting its administration portal. For TP-Link routers, just go to a web browser on a device connected to the router, visit 192.168.0.1 and login using the default admin-admin username-password. This IP may vary depending upon the vendor.
There are still more concepts to be discussed, like how and where are the addresses stored (DNS) and how does routing of a packet occurs over the internet, is the World Wide Web same as the internet, and where does your actual web browser stand in all of this. Will continue it in the next article.