Routing for Computer Networkss
Routing is the process of choosing paths for packets through a network. A router uses a forwarding table to send each packet to its next hop, and routing algorithms build that table. Link-state methods like OSPF use Dijkstra on a full map, distance-vector methods like RIP use Bellman-Ford, and BGP exchanges routes between autonomous systems.
Stage: Network Layer · Part of the Computer Networks roadmap · Last reviewed 19 November 2026
What to learn in Routing
- Run Dijkstra's algorithm on a small topology to build a router's forwarding table
- Apply Bellman-Ford distance-vector updates and spot the count-to-infinity problem
- Explain longest prefix match in a forwarding table lookup
- Distinguish intra-domain routing protocols from inter-domain routing with BGP
- Read a simple routing table and predict the next hop for a destination
Routing interview questions
What is the difference between routing and forwarding?
Routing is the control-plane task of computing paths and filling the routing tables. Forwarding is the data-plane action of moving each arriving packet to the correct output interface using those tables. Routing happens over seconds or longer, forwarding happens per packet at line speed.
Why is BGP used between networks instead of OSPF?
OSPF suits a single administrative domain where all routers share the same goals. Between organisations, policy matters more than shortest path, so BGP lets each autonomous system choose which routes to accept and advertise, and it scales to the global internet.
Where Routing fits in the Computer Networks roadmap
Routing belongs to the Network Layer stage (intermediate level). Moving packets.
Other units in this stage
Back to the full Computer Networks roadmap