When you need to connect a computer to another computer with a cable you use a device called a switch. When your computer is on the same network with other computers or devices they only need a switch to communicate with each other.
When you need to connect a computer to another computer with a cable you use a device called a switch.
When your computer is on the same network with other computers or devices they only need a switch to communicate with each other.
How about if the two computers are on a different networks? What if your computer needs to “speak” with a server, computer or any other device located in another country? Here is where the router device is used.
A router device is like a switch in that it connects devices together. Typically for a switch they are devices on the same network, however a router is used to connects devices in different networks.
Usually, the router needs 2 or more network interfaces in order to work and commonly connects multiple networks together. The expression of one interface is programmed using intervlan routing but we are not going to look at that for now.
A router works on 3 Layers (network layers) as you can see in the below picture:
A computer sends a packet out of its interface and if it is using a different network the packet is then sent to the computers default gateway. This gateway usually is the router; when the packet arrives at the router, this device then looks at the packet and checks the destination before opening the routing table to check which interface to send the packet to.
On a routing table, there are 2 types of routes: static and dynamic.
Static is manually added by the user or by manufacturer (for example the default route for all unknown networks go through the WAN). Dynamic routing is using certain protocols that are responsible for discovering and exchanging routing information within the network.
The interface of the router can either be LAN or WAN; WAN is typically how we connect to the internet.
Modern routers have a bridge between WIFI and the LAN interface, so WIFI and LAN are in the same network; usually modern routers have many integrated features which is not a router but more of a multiuse device.
Many of the integrated features include: a firewall, Network Address Translation (NAT), with port forwarding (where a static can be assigned to a any relevant port, game or server for better internet access), DHCP server, DNS server, Modem integrated (such as PPOE,PPP etc.), WIFI access points also have many features (including security on WIFI, channel setup etc) QoS, mac filtering, and some routers even have USB ports for sharing files to your network like music files, documents etc., and more features than you can find on a typical router.
On a router you can also find a small integrated switch and WIFI as previously mentioned.
There are various categories of routers, and routes for both enterprise purposes (larger networks) as and for smaller offices or home users.
At home we also use this device, it is what allows us to communicate from our computer to the outside world, while it is quite a complex system, with all the automations nowadays it has become extremely user friendly for those lacking in technical knowledge.