Kahibaro
Discord Login Register

9.1 What is Routing?

The Basic Idea of Routing

Routing is the process that decides where data should go next as it travels across multiple networks. Whenever a packet needs to move from one network to another, routing is involved. Routers read information in the packet header and choose a path so that the packet eventually reaches its destination network.

You can think of routing as the postal system of the internet. Each packet is like an envelope. The destination IP address is the postal address. Routers act like post offices that forward envelopes closer and closer to the correct town and street until they reach the final address.

Routing is different from switching. Switching happens inside a single local network, where devices are on the same IP subnet. Routing connects different networks and subnets and is responsible for moving packets between them.

Router as a Network Guide

A router is a device with at least two network interfaces. Each interface connects to a different network or subnet. The router receives packets on one interface, checks the destination IP address, and decides out of which interface to send them next.

Inside a router, the key tool is the routing table. The routing table is like a list of known destination networks and where to send traffic for each one. When a packet arrives, the router looks up the destination address in this table and selects the best route.

Here is a simple way to see the relationship.

ConceptRole in Routing
RouterDevice that forwards packets between networks
InterfaceRouter port connected to a specific network or subnet
Routing tableList of networks and how to reach them
RouteOne entry in the routing table

Paths Between Networks

Routing is concerned with paths between networks, not with individual devices. A route usually points to a network prefix, for example something like a /24 network, not to a single host. When a router sees a packet for an IP address, it matches that address to the most specific network entry in its routing table and forwards the packet according to that match.

As packets move across multiple routers, each router only cares about the next step, called the next hop. The router does not need to know the entire end to end path in detail, just which neighbor to use to get the packet closer to the destination network.

Routing makes it possible to join many separate networks into a single global system. Without routing, you could only communicate inside one local network. With routing, a device in one city or country can reach a device on a completely different network somewhere else in the world.

Static and Dynamic Decisions

Routing decisions can be created in two basic ways, either by humans or by protocols. When a human network administrator manually adds routes to the router, the router follows those fixed instructions. When the router runs a routing protocol, it can discover and update routes automatically based on information from other routers.

From the point of view of this chapter, the important idea is that routing is not random. It is based on rules and entries in the routing table that tell the router which destination networks exist and how they can be reached. Later chapters in this section will describe the difference between static and dynamic routing and how routers learn those entries.

Routing and the Internet

The internet is a very large collection of interconnected networks. Every time you browse a website or use an online service, your packets pass through multiple routers. Each router along the way makes its own independent routing decision using its own routing table.

Even though the path can include many steps, the basic action is always the same. A router receives a packet, examines the destination IP address, looks up the best matching network in its routing table, and forwards the packet to the next hop on the path to that network.

Routing is the process of forwarding packets between different networks based on the destination IP address and the information in a router’s routing table.

This simple rule is the essence of routing and is the foundation for all more advanced routing topics that follow.

Views: 48

Comments

Please login to add a comment.

Don't have an account? Register now!