Packet.School
HomeLevelsSandboxPricingAbout
XP1,240
L4 · Network Devices
Level 4
5 lessons
  • 01Hub vs Switch
  • 02Router
  • 03Build Network Topology
  • 04Firewall
  • 05Level 4 Quiz
Levels/L4 · Network Devices/Lesson 02
Lesson · 02

Router

Router works at OSI Layer 3 (Network) and connects different networks together.

Duration
2min
Level
L4
Type
Lesson
Progress
2/ 5

01What Does a Router Do?

Main Tasks:

  1. Routing - Ensures packets take the best path
  2. Network Separation - Connects different LANs
  3. NAT - Converts private IPs to public IP
  4. DHCP - Distributes IP addresses (in home routers)
  5. Firewall - Basic security (in home routers)

02Routing

Routing Table:

code
Destination Network    Exit       Next Hop
192.168.1.0/24        eth0       Directly Connected
10.0.0.0/8            eth1       192.168.1.254
0.0.0.0/0             eth2       ISP Gateway

Routing Process:

  1. Packet arrives → Destination IP checked
  2. Routing table consulted
  3. Best path selected (longest prefix match)
  4. Packet sent that direction

03Home Router vs Enterprise Router

FeatureHome RouterEnterprise Router
Ports4-824+
Speed1 Gbps10-100 Gbps
FeaturesNAT, DHCP, Wi-FiRouting only
Price$50-200$1,000+
ManagementWeb interfaceCLI/SSH

04Static vs Dynamic Routing

Static Routing:

  • Manual configuration
  • Good for small networks
  • Stable, reliable
code
ip route 10.0.0.0/8 192.168.1.254

Dynamic Routing:

  • Automatic learning
  • For large networks
  • Adapts to changes

Protocols:

  • RIP - Old, small networks
  • OSPF - Medium/large networks
  • BGP - Internet backbone

05Switch vs Router

FeatureSwitchRouter
LayerLayer 2Layer 3
AddressMACIP
BroadcastForwardsStops
UsageWithin LANBetween LANs

06Summary

  • Router = Connects different networks
  • Works at Layer 3 (IP) level
  • Routes using routing table
  • Stops broadcasts (separates broadcast domains)
Previous
Hub vs Switch
Next
Build Network Topology
On this page
  • What Does a Router Do?
  • Routing
  • Home Router vs Enterprise Router
  • Static vs Dynamic Routing
  • Switch vs Router
  • Summary
Packet.School

An open, interactive curriculum for computer networking.

v3.0 · MIT22 lessons live

Learn

  • Lessons
  • Sandbox
  • Levels
  • Pricing
  • About

Simulations

  • Packet Journey
  • DNS Lookup
  • DHCP Simulator
  • Subnet Calc
  • Network Builder
  • Terminal

Project

  • About
  • Changelog
  • GitHub
  • Contributing
  • Style guide

Newsletter

One short email when a new level ships. No tracking pixels.

© 2026 Packet.School — MIT licensed☕ Support with a coffeebuilt in the open · last updated 2026.05.14