Routers Concepts

Networking is about getting data from one point to another. This can be from one end host to a server, from a server to another or from host to host. Connectivity must be established and maintained, so devices can send and receive data.

Network devices must be connected, else no communication takes place. Connections can be in the form of  physical cables or wireless, or a mix of both. In my household, my Mac is connected to a home router via wireless access. My home router is connected to my service provider via fibre cable.

Default Gateway

How does my Mac know how to reach a google.com or amazon.com servers ? In my case, and indeed to most common home scenarios, the Mac or PC has a default gateway. This means the Mac or PC will simply send all data to the default gateway, which is the home router. The home router will have specific routes to other devices connected to it. For example, the home router would know that getting to the printer is via LAN port 2, and the NAS via LAN3 etc.. so when your PC wants to send data to a printer, your router will send it out the right interface or port.

The function of a router is to receive data and forward it to its right destination. Routers will store and maintain routing tables, a list of destinations and information on how to get to these destinations and through which ports. Routing table can be learnt dynamically through a routing protocol, or can be static when added manually by and administrator.

Does my home router know all internet thousands routes ?

Besides specific routes per LAN port, the home router holds a default route. This route known in Cisco CLI as “0.0.0.0 0.0.0.0”, means all networks that my router has no knowledge of. This is a very important concept you understand, both in terms of design as well as troubleshooting.

Simple Routing

In this example, 3 PCs and a server are connected to 2 different routers. Each router has in its routing table all necessary information to be able to forward data to, not only to directly connected devices, but also the remote ones.

On the drawing, a routing below each router, shows its routing table.

If PC3 sends data to PC2, Router 2 receives the data from port or interface GE0/0 and sends it through GE0/1. However if PC3 sends data to the server on a remote network, then Router 2 will sends data via GE0/2 to Router1. When Router 1 receives the data and checks the intended destination, it will send data via interface GE0/0.

A Cisco Router example

Below figure depicts a Cisco ASR9001, view of its ports and interfaces.

2 power supply ports are available, which allows us to have great redundancy when plugging the chords to power socket on different circuits.

Console port is where you gain access with your computer and configure basic configuration or troubleshoot if you are unable to access the router by other means. You need to be locally connected to be able to access a router through console port.

Management port allows the same operations as for console port, but is routed. This means you can remote access the router via a management network.

Interfaces as the ports used to receive and forward traffic. In this case, they come in a form of a modular port adapter which is inserted in a slot. This makes the ASR9001 versatile and flexible, as it Cisco offers various types of MPA flavours.

KEY CONCEPTS:

  • A router forwards packets.

  • A router stores and maintains a routing table, it uses for forwarding decisions.

  • A Router relies on default route to forward any packet for which it has no specific route.

  • A router breaks broadcast domains, so it will not forward broadcasts.