The following screenshot shows 2 PCs connected together via a cross over cable, this aloows the 2 PCs to connect to each other at the physical layer via the Ethernet cable, and are properly set up at the data link layer.
At the network layer we assign IP addresses to both PCs. As you can see both IPs on both machines are set with to communicate on the same network, we can see this because in the IP addresses the first 3 octets are the same. The subnetmask tells us that the 3 octets in the IP address is the network portion (255.255.255.).
Convert 255.255.255 to binary will give the following: 11111111.11111111.11111111. (24bits)
Because the network Portions are the same the PCs can communicate with each other. See following screenshot
The following screen shot shows 2 PCs with different IP Addresses which shows they are on 2 different networks, now both the PCs are unable to communicate as the network portions don’t match. Remember IP works at the network layer.
For the 2 PCs with different network portions we need to have a router. A router is nothing more than a fancy PC. A router has all the General components of a PC, for example:
POST – Power on self test
CPU – Computer processing Unit
RAM – Random Access Memory
Storage – A Hard drive or flash Drive
NICs – Network interface cards – Almost all routers will have at least 2 NICS and can have 100s
So can we do with a router? We can assign one NIC with and Network address for one network and the other NIC with another Network address on the other side, when configured properly both networks can talk to each other even though they Network portions are different. See following screenshot
Now if you look at the following screen shot you can see on the left side the router NIC has and address of 192.168.10.1, and if you look at the PC on the left it has a the same network portion as the router interface 192.168.10.x this allows the PC on the left to communicate with the interface on the router, likewise for the right side.
So the router is facilitating the movement of traffic from one IP network to different IP network. So that basically is the sole purpose of a Router.
Next a typical example of a SOHO setup, if you login to the router at home or you small office you should see that inside on the private network that the IP addresses on the private side all have the same network portion, on the internet side you should have a public IP assigned by your provider which will be different to the network portion on the private side. So what the router is basically do allowing traffic from the private network to be routed to the public network
What does router look like? As you can see a router in in the diagram is the circle with 4 arrows but the actuall physical hardware is a 19 inch piece of hardware. Below the diagram we have a 1841 router, CISCO does not manufacture these anymore but they are still wide-spread used. At the back of the router there are several ports, this router has 2 NICS marked in yellow which are fast Ethernet. There are also 2 serial interfaces which are represented by slot 1 and 2 and console ports: The 1841 router is completely different from a home router ie. Netgear, D-Link, Fritz AVM etc which comes with its OS etc. However a 1841 router comes with no configuration, its literally blank.
Boot up process – PC vs Router.
It’s essential to understand the boot up process router, like a PC a router boots and has a certain way. The screen shot below shows how the boot process begins POST > Bootstrap > IOS > configuration
More detailed overview of PC vs Router
Power on Self Test
The hardware has self checks to make sure the hardware is ok
Uses EEPROM memory – Electrically Erasable Programmable Read-Only Memory – we can erase and write to the memory.
Stored in flash – Internet working Operating system. IOS uses flash memory just like a USB stick or a compact flash card,
The router configuration is stored here in the NVRAM – RAM is Random Access Memory. NV stands for Non volatile RAM, we use this to store very small files that we don’t want to removed when we power off, so in this respect it kind of works like Flash Memory