🧭 What is Routing in Computer Networks?
Routing is the process of selecting a path for data (called packets) to travel from the source to
the destination across a network.
Think of it like Google Maps for data — the router chooses the best route for your data to get
where it needs to go!
Where Does Routing Happen?
Routing is handled by network devices called routers at the Network Layer (Layer 3) of the OSI
Model (or the Internet Layer in the TCP/IP model).
Routers connect different networks.
They use routing tables and routing algorithms to make decisions.
📦 What Happens During Routing?
1. You send a message or request (e.g., open a website).
2. The message is split into packets.
3. Each router along the path checks the destination IP address.
4. Routers consult their routing tables to decide the best next hop.
5. The packet travels router by router until it reaches the destination.
🧠 Types of Routing
🔹 1. Static Routing
Routes are manually configured by a network admin.
Simple and predictable.
Good for small or stable networks.
Doesn’t adapt automatically if a route fails.
Example: Home or small office networks.
🔹 2. Dynamic Routing
Routes are automatically updated using routing protocols.
Routers communicate with each other to learn the best paths.
Automatically adapts if the network changes (e.g., link failure).
Example: Large enterprise or ISP networks.
🌐 Common Dynamic Routing Protocols
Protocol Type Description
RIP Distance Vector Uses hop count to find best route. Max 15 hops.
OSPF Link State Builds a full map of the network. Fast & accurate.
BGP Path Vector Used on the internet between ISPs (very large scale).
🧭 How Do Routers Choose the Best Route?
Routers use metrics to choose the best path. These can include:
Hop count (number of routers to pass through)
Bandwidth
Delay
Cost
Reliability
The path with the lowest total metric is usually chosen.
Example:
Imagine you’re in India and opening a website hosted in the U.S.
1. Your computer sends a packet to your local router.
2. The router checks its routing table.
3. The packet hops across routers (your ISP → backbone → data center).
4. Each router chooses the next hop based on the destination IP.
5. The packet eventually reaches the server in the U.S.
📌 Summary
Concept Meaning
Routing Process of finding a path for data to travel
Router Device that makes routing decisions
Static Routing Manual configuration
Dynamic Routing Automatic updates using protocols
Protocols RIP, OSPF, BGP, etc.