Networking 101

Modem vs Router

A lot of people confuse over a Modem and a Router. But actually they both do a different job. Modem is a simple device which converts the signal that comes via the ADSL (Telephone Lines) cable to a digital signal which your computer could understand (Ethernet). Okay so basically, the job of a Modem is to convert a Analog Signal to a Digital Signal.

Now lets talk about a Wi-Fi Router, It takes up the single internet connection  that your ISP provides over a Ethernet cable usually and spread it to multiple devices. Most of the Routers come with 4 or 5 Ethernet ports Which allows devices to be connected over Ethernet cable.

Now, How does it do this?
 It has something called NAT(Network Address Translation) and  DHCP(Dynamic Host Configuration Protocol) Server Which does this job.

Consider a place like your Office where you have a huge number of wired devices (Computers, Printers etc.) that has to be connected to the network and you are left only with a few ports on your Router. The Solution is to use a Network Switch. These can turn one Ethernet port to many.

IP Address
An IP Address is a unique address which is assigned to all the devices that are connected to the Internet

IPv4 is a 32 bit IP Address and has a limit of 2^32 approximately about 4 Billion IP Addresses, Which sounds like a lot but is not enough for every device on earth to have its own Address. And without a unique address there is no way to ensure that the packets are been delivered to the correct destination. Whereas IPv6 replaces the 32 bit address of IPv4 with 128 bit Address

But..4 Billion is already not enough when compared to the no of people using internet, How did we manage co far?? This is where Network Address Translation Comes into play

Consider your home, Where you have a single internet connection with so many devices connected to it, Such as your TV, Smartphone, Laptops etc. Your ISP provides you with a Public IP address, through which your ISP would be able to reach your Router. As you have a Router with multiple devices connected, Your devices will be assigned with a IP address which is different from your Public IP address. Now these IP addresses that are assigned by the Router to the devices are called Private IP Address.(,, ..etc) Thus your Router has created a LAN(Local Area Network) with these IP addresses that are local to your network. 

NAT (Network Address Translation)
The private addressing scheme works well for computers that only have to access resources inside the network, like Computers needing access to file servers and printers. Routers inside the private network can route traffic between private addresses with no trouble. However, to access resources outside the network, like the Internet, these computers need a Public IP Address. This is where NAT comes into play.

Say if the smartphone has requested for a webpage, The Router sees the request from the device and makes the same request to the Internet using its own Public Address, and returns the response from the Internet. NAT acts as a mediator between the devices connected to the Router and the Internet. The main use of NAT is to limit the number of Public IP Addresses.

DHCP (Dynamic Host Configuration Protocol)
If you notice, The Private IP addresses are being assigned automatically to the devices. This is done by DHCP Server. With the help of a DHCP, an IP Address can be assigned to any device dynamically such that they can communicate using this IP Address. There are two parts to DHCP, the client and the host. The host exists on your router, which assigns IP addresses. The client is on your Device, which requests the host for an IP address.


Post a Comment