Skip to content

Networking Router#

Your local system is attached to a local network. You can talk to other systems on the same network without ever having left it. But when it comes to visiting websites, you'll need to go beyond your local network and connect to a system in another one. It's obvious that the second network isn't inside the same physical building as you - it probably isn't even in the same country. So how does your traffic get there?

When we have two separate networks that want to talk to each we need something that can route traffic between them. A network router handles this job, and it does it by knowing where to find particular networks. When your system has an IP address inside of one network and the other systems you're trying to talk to has an IP inside of a different network, you need a router to move your data between the two networks.

Here's what a router might look like:

A router

A router
(hystiff, CC0, via Wikimedia Commons)

They're very similar to a switch but generally have far fewer ports, sometimes as few as two. The router is used to create a "hop" or "route" between multiple networks and doesn't have consumer or user devices directly connected to it like laptops or mobile phones. Instead it has switches and other networking devices attached to it instead.

We're going to explore what switching and routing actually do in the networtking chapter. For now. here's an illustration of how a router fits into the picture:

Simple network with router Simple network with router

A simple pair of networks connected via a router

Here we have two networks (Local Area Networks) represented by a switch. These networks have devices attached to them. The devices directly attached to the switch can talk to each other without having to be routed over the router. But if a device from one network wants to talk to a device on another, a router (or several) is needed.

The reasons behind why a router is needed will become more clear when we look at the networking chapter, but for now I simply want you to understand the job of the network router (and switch.)