All You Should Know About A Router
12 min readWhat is a Router
A router is a networking device that forwards data packets between computer networks.
When we say computer networks, they are two different local area networks.
When two different local area networks want to communicate with each other, they need a router in order to do so.
Routers rely on their IP routing tables to determine how to handle incoming packets, forwarding them to the correct interface based on the data stored in their routing table.
These attributes, among others, make routers indispensable components of a larger global network known as the internet.
What is a Router?
A router is a crucial device in networking that helps connect and manage communication between different networks or subnetworks.
It has two main jobs: making sure data packets go where they’re supposed to by sending them to the right IP addresses and letting multiple devices share one Internet connection.
The key role of a router is to guide and control how network traffic moves around, both within networks and across the global Internet.
Imagine data, like web pages or emails, as small pieces called data packets.
These packets travel from one router to another, moving through the connected networks (like the Internet) until they reach where they’re meant to go.
A router links to two or more data lines, each linked to a different IP network.
When a data packet arrives on one of these lines, the router checks the network address in the packet header to find out where it should go.
It looks at its routing table or routing policy to figure out the next network where the packet should be sent.
Routers can be made using regular computer parts, but they’re often specially designed for specific networking jobs.
Early routers used software-based forwarding controlled by a central processing unit (CPU).
However, more advanced routers use application-specific integrated circuits (ASICs) to boost performance and offer extra features like advanced filtering and firewall capabilities.
These special components help the router work more efficiently in handling network traffic.
In a nutshell, routers are super-important devices that make communication between networks smooth.
They ensure data gets to the right places while managing the flow of information across all the connected networks.
Components of a Router
A router typically consists of several key components that work together to perform its networking functions.
The main components of a router include the following:
Central Processing Unit (CPU)
The CPU is responsible for executing the router’s operating system and managing various tasks, such as packet processing, routing protocols, and network management functions.
The CPU is like the brain of the router. It thinks and makes decisions, just like your brain helps you think and decide things.
Random Access Memory (RAM)
RAM, or Random-Access Memory, is a type of temporary memory in routers.
It acts like a large desk where the router keeps the information it needs at the moment.
However, it’s important to note that once the router is turned off, everything stored in RAM is erased, just like clearing a desk.
RAM helps the router process data quickly, but it’s not for long-term storage.
Read Only Memory (ROM)
ROM, short for Read Only Memory, is a special kind of memory found inside routers.
It holds essential information that the router needs to start up, just like a set of instructions that never change.
Think of it as a special book that the router reads every time it is turned on, providing it with all the necessary guidance right from the beginning.
Non-volatile RAM (NVRAM)
NVRAM, or Non-volatile RAM, is a memory type that stores the router’s configuration settings.
It’s similar to a small notebook where the router writes down and remembers all the settings you choose for it.
This memory is special because even if the router is turned off, the information in NVRAM stays safe and doesn’t get erased, just like your notes in a notebook.
FLASH
This is a storage area in routers where the operating system and settings are stored.
It’s like a special location where the router keeps all the important programs and rules it needs to function correctly.
Think of it as a safe and organized place where the router stores everything it needs to know to do its job effectively.
Interfaces or Ports
Interfaces, or ports, in a router are like doors that allow the router to connect with other devices or networks.
They serve as the communication channels through which the router interacts with and shares information with other devices.
Think of them as the connections or pathways that enable the router to talk to other devices and exchange data, just like doors that open up opportunities for communication and information exchange.
Operating System (OS)
The operating system (OS) of a router is like the boss that manages everything.
It takes care of the router’s functions, such as dealing with network protocols, forwarding data packets, ensuring security, and managing configurations.
Think of it as the conductor of an orchestra, coordinating all the different parts to make sure the router operates smoothly and efficiently.
The OS is crucial for the router to perform its tasks effectively and keep the network running smoothly.
Power Supply
The power supply is a vital part of a router, as it supplies the necessary energy for the entire system to operate.
It plays a crucial role in maintaining uninterrupted network connectivity.
It is important to ensure that the power supply is reliable and functions properly.
Before purchasing a replacement, it may be necessary to check the functionality and power capacity requirements to ensure compatibility.
These components work together to enable a router to route network traffic, connect different networks, and provide essential networking functions in a reliable and secure manner.
How does a Router Work?
A router is a hardware device designed for routing purposes. It functions as a central device in a network, directing data traffic between different devices.
The router operates at layer 3 of the OSI model, known as the network layer. By functioning at this layer, routers have the capability to facilitate communication between different networks.
Layer 3 is specifically where the IP protocol comes into play, as it examines the source and destination information of packets based on their IP addresses.
Therefore, the primary role of a router is to direct IP packets from the source station to the destination station when both the source and destination belong to different networks.
For that purpose, routers utilize their layer 3 functionality to analyze IP addresses and determine the appropriate routing path for packets to ensure successful delivery between networks.
Primarily, each data packet passing through a router includes both a source IP address and a destination IP address.
The source IP address corresponds to the node from which the packet originated. It indicates the source station’s location within the network.
On the other hand, the destination IP address corresponds to the remote station where the packet needs to be delivered. It specifies the intended recipient’s location within the network.
In essence, routers leverage the source and destination IP addresses within data packets to determine the appropriate path for forwarding the packets across networks to their intended destinations. Here’s a breakdown of its magic:
Packet Reception
When you browse the web on your smartphone, watch a movie on your smart TV, or download files on your computer, your device sends out little data packages containing the request or information.
These packets arrive at the router, like vehicles entering a busy intersection.
Destination Decoding
Each packet has a unique address attached, similar to a vehicle’s destination address.
The router reads this address, which is called an IP address, and identifies its intended recipient within your network.
Think of it as a map with all your devices plotted.
Routing the Path
When a router receives data packets via its incoming interface, it examines the destination address.
With the destination in mind, the router consults its routing table, a map of network pathways.
This table shows the most efficient routes to reach different devices based on factors like traffic congestion and connection quality.
Imagine the router planning the fastest route for each vehicle based on live traffic updates.
If the router finds a matching entry for the destination address in the routing table, it proceeds to forward the packet through the interface connected to the destination network.
On the other hand, if the router does not find an entry for the destination IP address in its routing table, it promptly discards or drops the packet as it is unable to determine the appropriate forwarding path.
Forwarding the Package
Once the best route is chosen, the router sends the packet on its way through the matching interface.
Similar to a traffic light directing vehicles, the router forwards the packet to the correct port or connection, leading to the intended device.
Your phone, TV, or computer then receives the information and displays it or processes it as needed.
Note
All the routers in the interconnected network or the internet have the capability to communicate with one another using a routing system and a routing table.
They make use of different routing protocols to exchange information about destination addresses and maintain it in their routing table.
The routing table consists of a list of routes between computer systems on the interconnected networks.
Essentially, a router uses a routing system along with the destination address in the routing table to determine the most efficient path for data to travel.
If the destination address is not found in the routing table, the router typically takes one of two actions.
In most cases, it will forward the packet to a default router specified in the routing table.
This default router serves as a fallback option for packets whose destination is not explicitly listed.
However, in some scenarios, if no default router is specified or available, the router may choose to discard the packets, considering them as lost or unreachable.
Different types of Routers
To connect a LAN to the Internet, routers use different methods to communicate with a modem.
Here are the primary types:
- Wired router
- Wireless router
- Core router
- Edge router
- Virtual router
Wired Router
Similar to a wireless router, a wired router connects to a modem via an Ethernet cable.
It uses additional cables to connect devices within the network, creating a LAN and linking them to the Internet.
Wireless Router
A wireless router functions like a regular router in a wired home or business network, but it adds more flexibility for laptops and portable devices.
It sets up WLANs (wireless local area networks), linking various gadgets without needing wires.
The wireless router connects to a modem with an Ethernet cable and sends out data using radio signals.
These routers follow the 802.11g standard, allowing data transmission over short distances.
Core Router
Core routers serve as the central hubs of the internet, directing information through the primary fiber optic backbone.
They are primarily utilized by large corporations to manage high-volume data transmission within their networks.
Operating at the “core” of the network, these routers do not communicate with external networks.
Internet service providers (ISPs) rely on core routers, which are the fastest and most powerful type of router available.
Additionally, enterprise routers connect the networks of large organizations to core routers, facilitating efficient data exchange.
Edge Router
An edge router communicates with both core routers and external networks. It resides at the “edge” of a network and uses the Border Gateway Protocol (BGP) to exchange data with other LANs and WANs.
Virtual Router
A virtual router is a software application that functions like a hardware router.
It can establish primary and backup virtual routers using the Virtual Router Redundancy Protocol (VRRP) to ensure reliability.
These various types of routers serve different purposes based on the size and requirements of the network they are used on.
Router Operating System (OS)
The operating system (OS) of a router acts as the central management and control system, overseeing the device’s resources and processes.
This OS is loaded during the router’s startup and remains operational until the device is powered off.
Its primary functions include executing programs, managing input and output operations, allocating resources, and handling file systems.
It’s important to note that most commercial and enterprise-grade routers use operating systems developed by their respective vendors (proprietary OS).
In addition to original equipment manufacturer (OEM) proprietary OS choices, alternative open-source options are available.
There are both generic and premium router operating systems.
Here are some popular router operating systems:
Cisco IOS
This monolithic operating system runs all files on a single image, with processes sharing the same memory.
However, a drawback is that if one service fails, it may lead to a system crash, and bugs in one process can impact others. Introducing new features or services often requires upgrading the entire IOS image.
Jupiter JUNOS
This modular operating system is based on FreeBSD, with processes running as separate modules in protected memory spaces.
Unlike monolithic OS designs, the modular approach ensures that a bug in one process will not affect the overall OS.
Moreover, adding new features can be accomplished without a full upgrade.
Huawei VRP
The Versatile Routing Platform (VRP) is a general network operating system used in Huawei network devices.
VRP is adaptable and can run on various hardware platforms, including routers and dedicated hardware firewalls.
MikroTik RouterOS
RouterOS is the operating system used in RouterBOARD devices.
It can also be installed on a PC, effectively transforming it into a router with comprehensive features such as routing, firewall, bandwidth management, wireless access point, backhaul link, hotspot gateway, VPN server, and more.
These operating systems provide different features and functionalities, catering to diverse networking needs and environments.
Benefits of Routers in Computer System Networking
Routers offer a range of significant benefits that contribute to optimal network performance and connectivity.
Some of these benefits include efficient traffic management, optimal routing, versatile connectivity options, enhanced security, data integrity, and simplified internet access.
These benefits make routers indispensable tools for establishing and maintaining reliable and efficient network connections.
Let’s explore these advantages in more detail:
Efficient Routing
Routers utilize MAC (Media Access Control) and IP (Internet Protocol) addresses to determine the most efficient route for data transmission across a network.
This ensures that data packets are directed to their intended destinations swiftly and effectively.
Traffic Reduction
Routers help reduce network traffic by implementing collision and broadcasting domains.
Collision domains prevent data collisions by allowing devices to transmit data without interference, thus enhancing efficiency.
Broadcasting domains limit the scope of broadcast messages, preventing unnecessary network congestion.
Versatile Connectivity
Routers facilitate easy connections to both wired and wireless networks.
They can support a variety of network architectures, including Ethernet cable, Wi-Fi, and WLAN (Wireless Local Area Network).
This versatility enables seamless integration with different devices and network setups.
Enhanced Security
Routers offer heightened security measures, such as password protection, to safeguard the network and connected devices.
By setting up a secure password, unauthorized access to the network can be prevented, ensuring the privacy and integrity of data transmission.
Data Integrity
Routers ensure that data packets are transmitted without loss or corruption.
They employ error-checking mechanisms and protocols to guarantee the accurate and reliable delivery of information across the network.
Simplified Internet Access
Wireless routers provide an effortless way to connect laptops and PCs to the internet, eliminating the need for extensive wiring.
Users can easily access the internet without the hassle of multiple cables, enjoying the convenience and flexibility of wireless connectivity.
Final Note
Routers are important networking devices that play a pivotal role in computer system networking, serving as the backbone for efficient data communication.
They are primarily responsible for directing data packets between different networks, such as connecting a home network to the internet.
It examines the destination IP address of packets and determines the best path to forward them to their intended destinations.
Routers also facilitate network segmentation by creating separate subnets, or network segments.
They provide logical separation between different LANs, allowing for better organization and control of network traffic.
Routers enable communication between different networks, such as connecting multiple offices or linking different parts of the internet.
Their ability to route data between different networks, manage traffic, and enhance security makes them indispensable for establishing robust and reliable network connections.
Routers contribute significantly to optimizing internet connectivity, ensuring seamless data transmission, and enabling diverse devices to communicate effectively.
As technology advances, routers continue to evolve, adapting to the changing landscape of network requirements and providing essential support for the interconnected digital world.