LearnViz CompSci
Home / Learn / Computer Networks / Routers

Beginner Topic 12 of 50 Computer Networks

Routers

Devices forwarding packets between networks.

How it works

A router forwards packets between different networks by examining the destination IP address and consulting its routing table for the best next hop. Routing entries come from directly connected networks, static configuration or dynamic protocols such as OSPF and BGP. Routers separate broadcast domains, decrement the time-to-live field to stop loops, and often provide NAT, firewalling and DHCP in home devices.

Step-by-step walkthrough

  1. A packet arrives for a destination outside the local network.
  2. The router looks up the destination in its routing table.
  3. It chooses the next hop with the longest matching prefix.
  4. It decrements the TTL and forwards the packet.
  5. Routers connect different networks, switches connect devices within one.

Where it is used

Home gateways, enterprise edges, data-center cores and internet service providers' backbones are built from routers. They connect LANs to the internet and link organizations together.

Common pitfall

Misconfigured routes cause black holes or loops, and the default gateway setting on hosts is a frequent cause of connectivity failure. Routing tables can grow huge in the internet core. Failures of a single router isolate networks, so redundancy such as VRRP is used. Use traceroute to find where packets stop.

Where it fits in the course

Routers is topic 12 of 50 in Computer Networks, rated Beginner. It follows Switches and Hubs. The next topic is DNS.

Practice and explore

How to study this topic

  1. Read the explanation above and restate the definition in your own words.
  2. Open the interactive lesson and answer its mini quiz.
  3. Read the common pitfall, then write a short example that avoids it.
  4. Check your understanding in the Computer Networks quiz, and revisit the topic if you miss a question.

Frequently asked questions

What is Routers?
Devices forwarding packets between networks. It belongs to Computer Networks and is a beginner-level topic.
Where do people use Routers?
Home gateways, enterprise edges, data-center cores and internet service providers' backbones are built from routers.
What is the most common mistake with Routers?
Misconfigured routes cause black holes or loops, and the default gateway setting on hosts is a frequent cause of connectivity failure.
What should I learn before this topic?
Start with Switches and Hubs, the topic just before it in Computer Networks.
How can I practice it?
Answer the mini quiz in the interactive lesson, then take the Computer Networks quiz.
Is Routers hard to learn?
It is a Beginner topic, so it works as an entry point. If the terms are new, read the explanation twice and try the visualizer before the quiz.
How long does it take to learn Routers?
Most learners can read the explanation and finish the interactive lesson in under an hour. Fluency comes from applying the idea, so plan a few short practice sessions with the quiz.
Which topics are related to Routers?
Switches and Hubs, DNS, Ethernet are closely connected. The full list is in the related topics section of this page.
What should I study after Routers?
Continue with DNS, the next topic in Computer Networks.

Related topics