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
- A packet arrives for a destination outside the local network.
- The router looks up the destination in its routing table.
- It chooses the next hop with the longest matching prefix.
- It decrements the TTL and forwards the packet.
- 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
- Open the interactive lesson, with a mini quiz.
- Take the Computer Networks quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Computer Networks quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Routers?
Where do people use Routers?
What is the most common mistake with Routers?
What should I learn before this topic?
How can I practice it?
Is Routers hard to learn?
How long does it take to learn Routers?
Which topics are related to Routers?
What should I study after Routers?
Related topics
- Switches and Hubs (Computer Networks)
- DNS (Computer Networks)
- Ethernet (Computer Networks)
- DHCP (Computer Networks)