What Does a Router Do?

By: Curt Franklin  | 
A Fujitsu Geostream R980 industrial strength router.
Fujitsu GeoStream R980 industrial strength router. See Internet connection pictures to see ways to get online.
Photo courtesy Newstream.com

The Internet is one of the 20th century's greatest communications developments. It allows people around the world to send e-mail to one another in a matter of seconds, and it lets you read, among other things, the articles on HowStuffWorks.com. Of course, none of this would be possible without the router, which begs the question: What does a router do?

We're all used to seeing the various parts of the Internet that come into our homes and offices — the Web pages, e-mail messages, text messages, downloaded files, and streaming data that make the Internet a dynamic and valuable medium. But none of these parts would ever make it to your computer without the router. In this article, we'll help you understand exactly what a router does, and how its role is chiefly responsible for allowing the Internet to exist at all.

Advertisement

The Role of Wired or Wireless Routers

When you send e-mail to a friend on the other side of the country, how does the message know to end up on your friend's computer, rather than on one of the millions of other computers in the world? Much of the work to get a message from one computer to another is done by routers, because they're the crucial devices that let messages flow between networks, rather than within networks.

Let's look at what a very simple router might do. Imagine a small company that makes animated 3-D graphics for local television stations. There are 10 employees of the company, each with a computer. Four of the employees are animators, while the rest are in sales, accounting and management. The animators will need to send lots of very large files back and forth to one another as they work on projects. To do this, they'll use a network.

Advertisement

When one animator sends a file to another, the very large file will use up most of the network's capacity, making the network run very slowly for other users. One of the reasons that a single intensive user can affect the entire network stems from the way that Ethernet works. Each information packet sent from a computer is seen by all the other computers on the local network. Each computer then examines the packet and decides whether it was meant for its address. This keeps the basic plan of the network simple, but has performance consequences as the size of the network or level of network activity increases.

To keep the animators' work from interfering with that of the folks in the front office, the company sets up two separate networks, one for the animators and one for the rest of the company. A wired router links the two networks and connects both networks to the Internet.

Advertisement

Directing Traffic

The router is the only device that sees every message sent by any computer on either of the company's networks. When the animator in our example sends a huge file to another animator, the router looks at the recipient's address and keeps the traffic on the animator's network. However, when an animator sends a message to the bookkeeper asking about an expense-account check, then the router sees the recipient's address and forwards the message between the two networks.

One of the tools a router uses to decide where data packets should go is a configuration table. A configuration table is a collection of information, including:

Advertisement

  • Information on which connections lead to particular groups of addresses
  • Priorities for connections to be used
  • Rules for handling both routine and special cases of traffic

A configuration table can be as simple as a half-dozen lines in the smallest routers, but can grow to massive size and complexity in the very large wired routers that handle the bulk of Internet messages.

Advertisement

Providing Info to Connected Devices

A router, then, has two separate but related jobs:

  • The router ensures that information doesn't go where it's not needed. This is crucial for keeping large volumes of data from clogging the connections of "innocent bystanders."
  • The router makes sure that information does make it to the intended destination.

In performing these two jobs, a router is extremely useful in dealing with network management. It joins two separate computer networks, passing information from one to the other and, in some cases, performing translations of various protocols between the two networks. It also protects the networks from one another, preventing the traffic on one from unnecessarily spilling over to the other.

Advertisement

As the number of networks attached to one another grows, the configuration table for handling traffic among them grows, and the processing power of the router is increased. Regardless of how many networks are attached, though, the basic operation and function of the router remains the same.

Advertisement

Transmitting Packets

Internet data, whether in the form of a Web page, a downloaded file or an e-mail message, travels over a system known as a packet-switching network. In this system, the data in a message or file is broken up into packages about 1,500 bytes long. Each of these packages gets a wrapper that includes information on the sender's address, the receiver's address, the package's place in the entire message, and how the receiving computer can be sure that the package arrived intact.

Each data package, called a packet, is then sent off to its destination via the best available route — a route that might be taken by all the other packets in the message or by none of the other packets in the message. In a network designed for data, there are two huge advantages to the packet-switching plan:

Advertisement

  • The network can balance the load across various pieces of equipment on a millisecond-by-millisecond basis.
  • If there is a problem with one piece of equipment in the network while a message is being transferred, packets can be routed around the problem, ensuring the delivery of the entire message.

The Path of Data Packets

The routers that make up the main part of the Internet can reconfigure the paths that packets take because they look at the information surrounding the data packet, and they tell each other about line conditions, such as delays in receiving and sending data and traffic on various pieces of the network. Not all routers do so many jobs, however. Routers come in different sizes. For example:

  • If you have enabled Internet connection sharing between two Windows 98-based computers, you're using one of the computers (the computer with the Internet connection) as a simple router. In this instance, the router does so little — simply looking at data to see whether it's intended for one computer or the other — that it can operate in the background of the system without significantly affecting the other programs you might be running.
  • Slightly larger routers, the sort used to connect a small office network to the Internet, will do a bit more. These routers frequently enforce rules concerning security for the office network (trying to secure the network from certain attacks). They handle enough traffic that they're generally stand-alone devices rather than software running on a server.
  • The largest routers, those used to handle data at the major traffic points on the Internet, handle millions of data packets every second and work to configure the network most efficiently. These routers are large stand-alone systems that have far more in common with supercomputers than with your office server.

Advertisement

Recognizing a Local Area Network

One of the crucial tasks for any router is knowing when a packet of information stays on its local network. For this, it uses a mechanism called a subnet mask. The subnet mask looks like an IP address and usually reads "255.255.255.0." This tells the router that all messages with the sender and receiver having an address sharing the first three groups of numbers are on the same network, and shouldn't be sent out to another network.

Here's an example: The computer at address 15.57.31.40 sends a request to the computer at 15.57.31.52. The router, which sees all the packets, matches the first three groups in the address of both sender and receiver (15.57.31), and keeps the packet on the local network. (You'll learn more about how the addresses work in the next section.)

Advertisement

Knowing Where to Send Data

Routers are one of several types of devices that make up the "plumbing" of a computer network. Hubs, switches and routers all take signals from computers or networks and pass them along to other computers and networks, but a router is the only one of these devices that examines each bundle of data as it passes and makes a decision about exactly where it should go. To make these decisions, routers must first know about two kinds of information: addresses and network structure.

When a friend mails a birthday card to be delivered to you at your house, he probably uses an address that looks something like this:

Advertisement

Joe Smith 123 Maple Street Smalltown, FL 45678

The address has several pieces, each of which helps the people in the postal service move the letter along to your house. The ZIP code can speed the process up; but even without the ZIP code, the card will get to your house as long as your friend includes your state, city and street address. You can think of this address as a logical address because it describes a way someone can get a message to you.

Advertisement

Logical Addresses

Every piece of equipment that connects to a network, whether an office network or the Internet, has a physical address. This is an address that's unique to the piece of equipment that's actually attached to the network cable. For example, if your desktop computer has a network interface card (NIC) in it, the NIC has a physical address permanently stored in a special memory location.

This physical address, which is also called the MAC address (for Media Access Control), has two parts, each 3 bytes long. The first 3 bytes identify the company that made the NIC. The second 3 bytes are the serial number of the NIC itself.

Advertisement

The interesting thing is that your computer can have several logical addresses at the same time. Of course, you're used to having several "logical addresses" bring messages to one physical address. Your mailing address, telephone number (or numbers) and home e-mail address all work to bring messages to you when you're in your house. They are simply used for different types of messages — different networks, so to speak.

Logical addresses for computer networks work in exactly the same way. You may be using the addressing schemes, or protocols, from several different types of networks simultaneously. If you're connected to the Internet (and if you're reading this, you probably are), then you have an address that's part of the TCP/IP network protocol. If you also have a small network set up to exchange files between several family computers, then you may also be using the Microsoft NetBEUI protocol.

Advertisement

MAC Addresses

The chances are very good that you'll never see the MAC address for any of your equipment because the software that helps your computer communicate with a network takes care of matching the MAC address to a logical address. The logical address is what the network uses to pass information along to your computer.

If you'd like to see the MAC address and logical address used by the Internet Protocol (IP) for your Windows computer, you can run a small program that Microsoft provides. Go to the "Start" menu, click on "Run," and in the window that appears, type WINIPCFG (IPCONFIG/ALL for Windows 2000/XP). When the gray window appears, click on "More Info".

Advertisement

There's a lot of information here that will vary depending on exactly how your connection to the Internet is established, but the physical address is the MAC address of the adapter queried by the program. The IP address is the logical address assigned to your connection by your ISP or network administrator. You'll see the addresses of other servers, including the DNS servers that keep track of all the names of Internet sites.

When you've finished looking at the information, click OK. You should be very careful about giving your computer's information to other people. With your address and the right tools, an unscrupulous person could, in some circumstances, gain access to your personal information and control your system through a "Trojan Horse" program. And let's not even get started on the subject of malware and ransomware!

Advertisement

Understanding the Protocols

The first and most basic job of the router is to know where to send information addressed to your computer. Just as the mail handler on the other side of the country knows enough to keep a birthday card coming toward you without knowing where your house is, most of the routers that forward an e-mail message to you don't know your computer's MAC address, but they know enough to keep the message flowing.

Routers are programmed to understand the most common network protocols. That means they know the format of the addresses, how many bytes are in the basic package of data sent out over the network, and how to make sure all the packages reach their destination and get reassembled. For the routers that are part of the Internet's main "backbone," this means looking at, and moving on, millions of information packages every second.

In a modern network, every e-mail message is broken up into small pieces. The pieces are sent individually and reassembled when they're received at their final destination. Because the individual pieces of information are called packets and each packet can be sent along a different path, like a train going through a set of switches, this kind of network is called a packet-switched network.

Tracing a Message

Tracing route transcript.
A tracing route transcript.

If you're using a Microsoft Windows-based system, you can see just how many routers are involved in your Internet traffic by using a program you have on your computer. The program is called Traceroute, and that describes what it does — it traces the route that a packet of information takes to get from your computer to another computer connected via an Internet service provider.

You can use Traceroute to see how many routers are between you and any other computer you can name or know the IP address for. It can be interesting to see how many steps are required to get to computers outside your nation. For example, I decided to see how many routers were between my computer and the Web server for the British Broadcasting Corporation. The result was this:

Tracing route transcript between the U.S. and BBC.
How many routers does it take to get from the U.S. to the BBC?

You can see that it took only one more step to reach a Web server on the other side of the Atlantic Ocean than it did to reach a server two states away!

The Wireless Router and Beyond

The days of relying on an ethernet cable are over! Routers have undergone significant evolution over the past few years, driven by the relentless demand for faster internet speeds, greater range, and more reliable connections. Modern wireless routers have transcended the basic functionality of merely connecting devices to the internet.

Today, they are equipped with advanced features such as dual-band or even tri-band capabilities, allowing them to broadcast on multiple frequencies simultaneously. This advancement reduces interference and increases the capacity to support more devices without compromising the quality of connection.

Faster Internet Access

Packet switched networks for your multiple devices are more dynamic than ever. The adoption of the latest Wi-Fi standards, such as Wi-Fi 6 (802.11ax), marks a pivotal shift in wireless network technology. Wi-Fi 6 routers offer faster data rates, increased capacity, and improved performance in environments with many connected devices, along with better power efficiency for devices.

Additionally, the integration of Mesh network technology in wireless routers has revolutionized the home network. By seamlessly connecting multiple router nodes to blanket a home with Wi-Fi coverage, Mesh systems ensure there are no dead zones, providing a consistent and strong Wi-Fi signal throughout larger homes.

Tougher Network Security

The evolution of wireless routers also reflects in their enhanced security features. With the rise in cybersecurity threats, modern routers now come with robust security protocols such as WPA3, which provides cutting-edge encryption.

Furthermore, many routers now include built-in VPN support, parental controls, and the ability to manage network access through mobile apps, making network management more accessible and comprehensive for the average user. This evolution not only reflects technological advancement but also a shift towards more user-centric designs, accommodating the increasing reliance on connected devices in daily life.

For more information on routers and related topics, check out the links on the next page.

This article was updated in conjunction with AI technology, then fact-checked and edited by a HowStuffWorks editor.

Frequently Answered Questions

What does a internet router do?
A router is a device that forwards data packets between computer networks. Routers perform the traffic-directing functions on the Internet. A data packet is typically forwarded from one router to another router through the networks that constitute the internetwork until it reaches its destination node.

Advertisement

Loading...