Join our Newsletter — 33% off our NHI Course
Home› Guides› How Routers and Switches Work for Beginners: The…
Guide Security Policies & Awareness

How Routers and Switches Work for Beginners: The Boxes That Move Network Traffic

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 2 December 2026 10 min read
On this page

A switch moves data between devices on one network, and a router moves data between networks.

This guide is for anyone who has seen these boxes in a cupboard and wondered what they do. You do not need to be an engineer to be affected: almost everything your team sends at work passes through them.

In short

  • A switch links devices in one place, such as an office, and sends each message to the right device.
  • A router links whole networks, such as your office and the internet, and picks the path each message takes.
  • Because most traffic passes through them, attackers find them attractive targets.
  • Change default passwords, keep their software updated and limit who can manage them.

What you will learn

  • Explain the difference between a switch and a router in one sentence each.
  • Spot the settings screen where these boxes are managed.
  • Check the three basic safety settings on any router or switch.
  • Ask your IT supplier the right questions about your network boxes.
Device serial number (MAC address)
a fixed label on each network card that a switch uses to find a device.
Route list (routing table)
a router's list of which way to send messages for each destination.

What are routers and switches?

Think of a big office building. The post room inside delivers letters from desk to desk. The town post office sends letters to other towns. A switch is the post room, and a router is the post office.

A switch forwards data between devices on one local network, such as one office [2]. A local network is a group of connected devices close to each other, like the computers and printers in one building [2].

A router is a piece of network hardware that sends data on towards where it is going [1]. It picks a path across one network or across many linked networks, such as the internet [1].

Data travels in small pieces called packets. Each packet carries a short label at the front saying where it is going [1].

Where the comparison stops working: a post room is staffed by people who notice odd letters. Switches and routers just follow their settings, so a bad setting is followed as faithfully as a good one.

Why does it matter?

Most or all of an organisation's traffic must pass through these boxes. That is why a US government cyber agency calls them ideal targets for attackers [3].

If you run a small office

What could happen: a router still using its factory password can be taken over, and all your traffic with it.

Check this: ask whoever set up your network whether the default password was changed.

Next: Default Passwords for Beginners

If you are new to IT work

What could happen: you plug a laptop into the wrong switch port and land on a network meant for something else.

Check this: find the network diagram and learn which ports belong to which network.

Next: Network Segmentation for Beginners

If you look after automation tools

What could happen: a backup tool that signs in to every switch keeps a stored password that, if copied, opens them all.

Check this: list every program that signs in to your network boxes and who owns each one.

Next: Non-Human Identities for Beginners

What does it look like?

Most of the time you only see blinking lights. An engineer sees tables like these.

Example only. All values are made up.

SWITCH: device list (MAC address table)
  Port 1   00-00-5E-00-00-01  laptop-EXAMPLE     (1)
  Port 2   00-00-5E-00-00-02  printer-EXAMPLE

ROUTER: route list (routing table)
  Office network  192.0.2.0/24     send to Port 1   (2)
  Everything else 0.0.0.0/0        send to internet (3)

ROUTER: admin page  http://192.0.2.1  user: admin  password: FAKE-default-0000  (4)
  1. The switch has learned which device sits on which port.
  2. Messages for the office stay inside.
  3. Everything else goes out to the internet provider.
  4. In a real file, this line would contain the router's admin password, here never changed from the factory value.

Why this is risky: a factory password can be easy to guess. The admin page controls where all the traffic goes.

The safer way: set a long, unique admin password. Keep the admin page off the internet. Let only named staff reach it.

How does it work?

  1. A device sends a message. Your laptop wraps data in packets, each labelled with where it is going [1].
  2. The switch looks up the device. It keeps a table that matches each device's MAC address, a fixed hardware label a bit like a serial number, to one of its ports [2].
  3. The switch learns as it goes. If it does not know a device yet, it sends the message to every other port and notes where the reply comes from [2].
  4. The router reads the address. For traffic leaving the building, the router reads the label on each packet and checks its routing table, a list of paths to each destination [1].
  5. The router passes it on. It sends the packet one step closer, often to your internet provider's router, which repeats the process [1].
Diagram titled Switch inside, router between networks. On the left, a box labelled Office network contains a laptop, a printer and a phone, each joined to a box labelled Switch, with the note: uses device labels (MAC addresses) and its port list. An arrow runs from the switch to a box labelled Router, with the note: uses addresses (IP) and its route list. An arrow runs from the router to a box labelled Internet and other networks. A green box underneath lists three safety basics: change the default password, keep software updated, let only named staff manage it.
Figure 1. The switch delivers inside one network; the router links networks together.

Simple switches just add more cable sockets to a local network. Managed switches let an administrator set up extra control, such as splitting one switch into separate virtual networks called VLANs [2]. Splitting networks by role and job is a basic way to keep trouble in one part from reaching the rest [3].

Every managed router and switch also has a management interface, the settings page or command screen where it is configured. Whoever controls that screen controls the box. Guidance advises limiting admin rights on these devices [3], and some teams manage them over a separate path kept apart from everyday traffic [3].

A worked example

Petra Osei manages a small accountancy office with eight staff. The office has one router from the internet provider and a switch under a desk. A cousin set them up five years ago, and nobody has touched them since.

Petra starts with a list. She writes down each box, its make, and who knows how to sign in to it. For the switch, the answer is nobody. For the router, the password is on a sticky note on the side.

She asks an IT supplier for one hour of help. Together they sign in to the router and set a long, unique admin password, stored in the office password manager. They check that the admin page cannot be reached from the internet side. Then they install the latest software update for both boxes, because guidance advises keeping the device operating system patched [3].

The supplier also notices the guest Wi-Fi and the staff computers share one network. They split them, so a visitor's phone cannot see the office file store.

Last, Petra finds that the office backup tool signs in to the router each night to save its settings. It uses a stored password with full admin rights. Petra records the tool as a non-human identity, a software account that acts without a person, and gives it an owner. The supplier changes it to a read-only account and a new password.

The job takes one afternoon. Petra now has a one-page record of the boxes, who manages them and when they were last updated. She sets a reminder to check again in three months.

Myths and mistakes

What people thinkWhat is true
Routers and switches are the same thing.A switch delivers inside one network. A router links networks. Many home boxes do both jobs in one case.
Once it is plugged in and working, it needs no care.Like any computer, it runs software that needs updates, and its settings need a check now and then.
The factory password is fine because it is printed only on the box.Owners often leave factory settings in place, and guidance says to change default passwords [3].
Only people sign in to network boxes.Backup, monitoring and automation tools often sign in too. Their stored passwords need owners and limits.

What can I do this week?

  • Find every router and switch in your home or office and write down its make and model.
  • Check whether the admin password on each one was changed from the factory value.
  • Look for a software update in each device's settings page, or ask your supplier.
  • Ask who, and which tools, can sign in to manage them.

Checklist

  • I know where each router and switch is and who looks after it.
  • No device still uses its factory admin password.
  • The admin page is not reachable from the internet.
  • Device software is up to date, with a date recorded.
  • Guests and staff use separate networks.
  • Every tool that signs in to a network box has a named owner and only the rights it needs.

Common questions

Is my home Wi-Fi box a router or a switch?

Usually both. A typical home box from an internet provider links your home to the internet like a router. It also has a few cable sockets and Wi-Fi for your devices, which is the switch-like part. Bigger offices often split these jobs across separate boxes.

What is the difference between a MAC address and an IP address?

A MAC address is a fixed hardware label used inside one local network, and switches use it. An IP address shows where a device sits across networks, and routers use it. A MAC address normally stays inside your own network, while IP addresses travel across the internet.

Why would anyone attack a switch or router?

Because most traffic passes through them. Someone who controls one may be able to watch, redirect or block that traffic. That is why updates, strong admin passwords and a check that the device software has not been changed all matter.

Do I need a managed switch?

Not always. A simple switch is fine for adding a few cable sockets at home. A business that wants to keep guests, staff and cameras apart usually needs a managed one. It lets an administrator split one switch into separate networks.

Who should be allowed to change router settings?

Only a few named people, and any tools that truly need it. Each should have their own account where the device allows it, with the least rights that do the job. Shared passwords on sticky notes make it hard to know who changed what.

Where next?

Ready for the detail? Read the practitioner guide: CIS Control 12 Network Infrastructure Management Guide. It goes further into keeping network devices up to date, secure management paths and recording network changes.

Also useful:

Related NHI Mgmt Group resources: Non-Human Identities for Beginners, Default Passwords for Beginners and Hacked Routers for Beginners.

Key terms

Switch
A box that forwards data between devices on one local network.
Router
A box that forwards data between networks, picking a path for each packet.
MAC address
A fixed hardware label on a network card, used to find a device on a local network.
Routing table
A router's list of where to send packets for each destination.
VLAN
A separate virtual network created inside one physical switch.
Management plane
The admin side of a device or service, used to change how it behaves.
Network segmentation
Splitting a network into parts so trouble in one part stays there.

Sources and further reading

  1. Cloudflare, "What is routing?", Cloudflare Learning Center. https://www.cloudflare.com/learning/network-layer/what-is-routing/ (accessed 2 Dec 2026).
  2. Cloudflare, "What is a network switch? Switch vs. router", Cloudflare Learning Center. https://www.cloudflare.com/learning/network-layer/what-is-a-network-switch/ (accessed 2 Dec 2026).
  3. Cybersecurity and Infrastructure Security Agency (CISA), "Securing Network Infrastructure Devices". https://www.cisa.gov/tips/st18-001 (accessed 2 Dec 2026).

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.