Short answer: A hub copies every message out of every port, so all connected devices hear everything and only one can talk at a time. A switch learns which device is plugged into which port and sends each message only to the device it is meant for. A router connects separate networks, such as your office network and the internet, and picks the next step for each message using IP addresses. Hubs are obsolete. Every modern network uses switches on the inside and a router at the edge.
Look at the box your internet provider installed. It might be labelled a router, a gateway or, if you are with Bell, a Giga Hub. Inside that one box are four or five different devices, and only one of them is actually a router. None of them is a hub.
This guide untangles all of it. You will see what each device does with a single message, why hubs disappeared, how a switch lets a dozen conversations happen at the same instant, and why the address on your data changes at every hop while its destination never does. You can even watch it happen on your own computer with two commands.
Every section starts in plain language. Under most of them is a panel called Engineer’s notes with the protocol detail: CSMA/CD, MAC tables, ARP, longest prefix match, NAT, and the arithmetic behind switch datasheets. Skip the panels and you will still understand everything. Open them if you design or support networks for a living.
In this guide
- The one-minute version
- The condo building that explains it
- Hub: the megaphone
- Switch: the concierge
- Router: the post office
- Side-by-side comparison
- Follow one packet to a website
- What is inside your “router”
- Layer 3 switches, access points and more
- Myths that cause real problems
- See it on your own computer
- Which one do you need?
- A small office network, start to finish
- FAQ
Hub vs switch vs router in one minute
Say computer A wants to send a file to computer C. Here is what each device does with that one message.
- Hub: repeats the signal out of every port. B, C and D all receive it. B and D check the address, see it is not for them, and throw it away.
- Switch: reads the destination address, looks it up in a table it has built, and sends the message only out of the port where C is plugged in. B and D never see it.
- Router: comes into play when the destination is on a different network altogether, like a server across town or a website. It reads the destination IP address and forwards the message toward that network.
If you want one line to remember: a hub repeats, a switch delivers, a router directs.
The condo building that explains everything
Networking terms are easier with a picture in your head, so this guide uses one building from start to finish. Picture a condo tower in downtown Toronto.
Every resident has a name on their door. Packages arrive in the lobby, and somebody has to get each one to the right unit. Mail going to other buildings leaves through Canada Post, which only cares about street addresses, not who lives on the 12th floor.
That is a network. Here is how the pieces line up.
| In a network | In the condo building |
|---|---|
| A device: laptop, printer, camera, phone | A resident |
| A port on a switch | The door of a unit |
| MAC address | The name on the door. Assigned at the factory and only useful inside the building |
| IP address | The street address plus unit number. It tells the outside world which building to deliver to |
| Hub | A person in the lobby with a megaphone |
| Switch | The concierge desk |
| Router | Canada Post |
| Default gateway | The building’s outgoing mail slot |
| The internet | Every other building in the world |
What a hub does: the megaphone in the lobby
A hub is a box of Ethernet ports with no brain. It has no memory and no idea what an address is. When an electrical signal arrives on one port, the hub cleans it up and pushes it out of every other port, bit by bit, as it arrives.
So every device on the hub receives every message. Each computer’s network card checks the destination address and quietly drops anything not meant for it. In building terms, the hub is a person in the lobby with a megaphone, reading every package label out loud to all 200 units.
That design causes three problems.
- Only one device can talk at a time. If two computers start sending at the same moment, their signals crash into each other on the wire. That is called a collision. Both stop, wait a random fraction of a second, and try again. Add more devices and you get more collisions.
- Everyone shares one speed. A 100 Mbps hub gives 100 Mbps to the whole group, not to each device. Ten busy computers split it ten ways, and collisions waste part of what is left.
- Nothing is private. Any computer on a hub can record everybody else’s traffic. That was handy for troubleshooting and just as handy for snooping.
What happened to hubs?
Through the 1990s, hubs were the normal way to connect an office, because switches cost far more. As switch chips got cheap, hubs stopped making sense, and in 2011 the IEEE 802.3 Ethernet standard formally deprecated repeater hubs. Nobody designs a network around one today.
The word lives on, though, and that confuses people:
- Products sold online as an “Ethernet hub” are almost always small unmanaged switches. If the spec sheet mentions full duplex or a switching capacity, it is a switch.
- A USB hub has nothing to do with networking. It adds USB ports to a laptop.
- A smart-home hub is a controller for bulbs, locks and sensors.
- Internet providers use it as a brand name. Bell’s Giga Hub is a router, a switch, Wi-Fi and a fiber modem in one case.
Key idea: a hub works on electrical signals only. It never reads an address, so the only thing it can do is send everything everywhere.
Engineer’s notes: how a hub really works
- Layer 1 device. A hub is a multiport repeater. It regenerates and retimes the bit stream and has no frame buffer, so it cannot read a MAC address, check the CRC or hold a frame for later.
- Half duplex only, using CSMA/CD. A station listens for carrier, transmits, and watches for a collision. On a collision it sends a 32-bit jam signal and waits a random number of slot times chosen by truncated binary exponential backoff. After 16 failed attempts the frame is discarded.
- Why Ethernet frames have a 64-byte minimum. The slot time is 512 bit times. A frame has to be long enough that the sender is still transmitting when a collision from the far end of the segment gets back to it. The same timing limited how far a hub network could stretch, which is where the old 5-4-3 repeater rule for 10 Mbps networks came from.
- One collision domain and one broadcast domain span every port on the hub, plus every hub cascaded from it.
- Gigabit hubs barely existed. Half-duplex gigabit needed carrier extension to pad short frames to a 512-byte slot, the gigabit repeater clause stopped receiving maintenance in 2007, and almost no products shipped.
- Uplinks needed crossover cables. Hub-to-hub links used an uplink port or a crossover cable. Auto-MDIX made that obsolete; our guide to straight-through vs crossover cables explains the wiring.
- The one job hubs are still remembered for is packet capture: plug a laptop into a hub and you see everything. Today that is done with port mirroring (SPAN) on a managed switch or a passive network TAP.
What a switch does: the concierge who learns every name
From the outside a switch looks like a hub: a row of Ethernet ports and some blinking lights. Inside it has memory and a chip that reads the destination address on every message. That changes everything.
A switch learns. Every time a device sends something, the switch notes the sender’s MAC address and the port it came in on: the laptop with MAC address A4:83:E7:1C:2B:90 is on port 7. Within seconds of a network starting up, it knows where everyone is.
When a message arrives for a device, the switch looks up the destination in that table and sends it out of one port only. A good concierge does the same thing. After a day of watching residents come and go, they know who lives in 1204 and walk the package straight to that door.
If the switch has never heard from the destination, it does what a new concierge would. It sends the message to every port once, like asking the whole building, “Is anyone here named Priya?” Priya answers, the concierge remembers, and from then on her packages go straight to her. Entries also expire when a device goes quiet, usually after five minutes, so a laptop moved to another desk gets found again.
Why a switch is so much faster than a hub
Each port on a switch is its own private lane. Port 1 can send to port 2 while port 3 sends to port 4 and port 5 sends to port 6, all at full speed at the same instant. Every link is also full duplex, meaning a device can send and receive at the same time, so collisions do not happen at all.
A 24-port gigabit switch gives every port its own gigabit, in both directions. A 24-port gigabit hub, if you could buy one, would give all 24 devices a single gigabit to share, one direction at a time.
Types of switches you will run into
- Unmanaged: plug it in and it works. No settings and no login. Fine for a small office or a desk that needs a few more ports.
- Managed: you can log in and configure it. VLANs, traffic monitoring, port security, link aggregation, and a view of exactly what is plugged in where. This is what businesses put in the network closet. Our small business Cisco switch guide walks through the options.
- PoE switches: send power down the same Ethernet cable as the data, so cameras, desk phones, access points and door readers do not need an outlet. See PoE vs PoE+ vs PoE++ for how much power each standard delivers.
- Stackable, industrial and Layer 3 switches each have their own trade-offs. We cover them in stackable vs standalone switches, industrial vs commercial switches, and the Layer 3 section further down this page.
What a switch cannot do
A plain switch only knows its own building. It has no idea where other networks are, so on its own it cannot get you to the internet. It also passes broadcasts, the “everyone listen” messages that devices use to find each other, to every port. On a network of 40 devices that is harmless. On a network of 4,000 it turns into constant background noise, which is why large networks are split into smaller pieces and joined with routers.
Key idea: a switch reads MAC addresses and delivers messages inside one network. Every port gets its own full speed.
Engineer’s notes: MAC tables, latency and the datasheet math
- A switch is a multiport Layer 2 bridge. It learns from the source MAC of every frame and forwards on the destination MAC. The table is keyed by VLAN and MAC address, often called the CAM table. Cisco’s default aging time is 300 seconds;
show mac address-tablelists it. - Flooding. Unknown unicast, broadcast (ff:ff:ff:ff:ff:ff) and multicast without IGMP snooping are sent out of every port in the VLAN except the one the frame arrived on.
- Store-and-forward vs cut-through. Store-and-forward receives the whole frame and checks the FCS before sending, so it adds the serialization time of the frame: a 1,518-byte frame takes about 12.1 µs at 1 Gb/s and 1.2 µs at 10 Gb/s. Cut-through starts forwarding once it has read the destination MAC, which cuts latency but passes corrupt frames along. Most cut-through switches fall back to store-and-forward when the ingress and egress speeds differ.
- Where drops really happen. Not on an idle port, but when several ports send to one port at once, or when a 10G server talks to a 1G client. Access switches have shallow buffers, so microbursts show up as output drops even when average utilization looks low.
Reading a datasheet. Switching capacity is every port’s speed counted in both directions. Forwarding rate assumes minimum-size 64-byte frames, which occupy 84 bytes on the wire once you add the 8-byte preamble and 12-byte inter-frame gap.
| Figure | Calculation | Result |
|---|---|---|
| Switching capacity | (24 × 1 + 4 × 10) Gb/s × 2 directions | 128 Gb/s |
| Frames per second, one 1G port | 1,000,000,000 ÷ (84 bytes × 8 bits) | 1.488 Mpps |
| Frames per second, one 10G port | 10 × 1.488 Mpps | 14.88 Mpps |
| Forwarding rate, whole switch | 24 × 1.488 + 4 × 14.88 | 95.2 Mpps |
If the datasheet matches those numbers, the switch is non-blocking: it can forward at full line rate on every port at once. That is why you see 128 Gb/s and about 95 Mpps on so many 24-port switches with 10G uplinks.
- Loops. Ethernet frames have no TTL, so a loop sends broadcasts around forever and makes MAC entries flap between ports. Spanning tree (802.1D, RSTP 802.1w, MSTP 802.1s) blocks redundant paths. Use BPDU guard on edge ports. Many cheap unmanaged switches do not run spanning tree at all.
- VLANs (802.1Q). A 4-byte tag carries a 12-bit VLAN ID, giving 4,094 usable VLANs. Access ports carry one untagged VLAN; trunk ports carry many tagged ones. Each VLAN is its own broadcast domain and its own subnet. See what a VLAN is and subnets vs VLANs.
- Managed features worth knowing: LACP link aggregation (802.1AX), SPAN port mirroring, 802.1X port authentication, DHCP snooping and dynamic ARP inspection, IGMP snooping for multicast video, and QoS marking for voice.
- A management IP is not routing. A managed Layer 2 switch has an IP address on a management VLAN so you can reach it by SSH or web browser. It still forwards user traffic purely by MAC address.
What a router does: Canada Post for your data
A switch moves messages around inside one network. The moment data has to leave, to reach another office, a cloud service or a website, it goes through a router.
A router sits between two or more networks with a connection into each. It keeps a routing table: a list of known networks and the best way to reach each one. For every packet it receives, it reads the destination IP address, finds the best match in that table, and sends the packet one step closer.
Notice the words “one step”. A router does not know the whole route. Canada Post works the same way. The sorting plant in Mississauga does not drive your parcel to a house in Vancouver. It puts it on the right truck to the next facility, which does the same, until a local carrier brings it to the door. Across the internet that relay usually passes through somewhere between 5 and 20 routers.
Why routers use IP addresses, not MAC addresses
A MAC address is like the name on a door. It is unique, but it says nothing about where the door is. If all you knew was someone’s name, you could never mail them a letter from another country.
An IP address works like a street address. Part of it identifies the network, and the rest identifies the device on that network. That structure lets a router make a decision about a destination it has never seen before: anything starting with 10.20 goes to the Vaughan office, and everything else goes to the internet.
Your router is your default gateway
Every device on a network is given the address of one router, called its default gateway. When your laptop wants something that is not on the local network, it does not go looking for it. It hands the packet to the default gateway and lets the router figure it out, the same way a resident drops a letter in the building’s outgoing mail slot.
Routers stop broadcasts
The “everyone listen” messages that switches send to every port stop at the router. Each side of a router is its own broadcast area. That is how routers keep big networks under control, and why companies separate floors, buildings and departments with routing.
NAT: how 40 devices share one internet address
Your internet provider usually gives your office one public IPv4 address. Inside, every device has a private address, such as 192.168.1.25, that the internet cannot reach directly. When a laptop sends a request out, the router swaps the private address for the public one and notes which device asked. When the reply arrives, it checks those notes and passes the reply to the right laptop.
That is network address translation, or NAT. In the building, it is the mailroom sending every outgoing letter with the building’s street address as the return address, and keeping a logbook of which unit each reply belongs to.
Most business and home routers also act as a firewall, hand out IP addresses to new devices (DHCP), and pass along website name lookups (DNS). Those jobs ride along in the same box. The router’s core job is still deciding where each packet goes next.
Key idea: a router reads IP addresses and connects networks. Of the three devices, it is the only one that can get you to the internet.
Engineer’s notes: lookups, hops, NAT and throughput
Longest prefix match. When several routes match a destination, the most specific one wins. A small office table might look like this:
| Destination | Next hop | Meaning |
|---|---|---|
| 10.20.30.0/24 | Directly connected | The camera VLAN on this site |
| 10.20.0.0/16 | 172.16.0.2 | Site-to-site VPN to the Vaughan office |
| 0.0.0.0/0 | 198.51.100.1 | Default route to the internet provider |
A packet for 10.20.30.15 matches all three routes, and the /24 wins. A packet for 10.20.5.9 matches the /16 and the default, and the /16 wins. A packet for 203.0.113.10 only matches the default route.
- What changes at every hop. The router decrements the IPv4 TTL or IPv6 hop limit, drops the packet and sends ICMP Time Exceeded if it reaches zero, recomputes the IPv4 header checksum, and builds a new Layer 2 header: its own egress MAC as the source and the next hop’s MAC, found by ARP or IPv6 Neighbor Discovery, as the destination. The IP addresses stay the same unless NAT is involved.
- Control plane and data plane. Routing protocols fill the RIB, and the best routes are installed in the FIB used for forwarding. Small offices use static routes; larger organizations run OSPF internally; providers exchange routes with BGP. Layer 3 switches and large routers forward in hardware with ASICs and TCAM. Small routers and firewalls forward in software or on network processors.
- NAT and PAT. Port address translation rewrites the source IP and port and tracks each flow in a translation table. Private ranges are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 (RFC 1918). Some providers add carrier-grade NAT in 100.64.0.0/10. IPv6 normally needs no NAT, but the firewall still filters inbound traffic.
- Double NAT. When the provider’s gateway and your own firewall both translate, inbound port forwards, some VPNs and SIP phones break. Bell’s Giga Hub has no true bridge mode, so the usual fix is its PPPoE pass-through, which lets your firewall hold the public address itself.
- Throughput on datasheets. Headline firewall throughput is measured with large packets and no inspection. With IPS, application control, antivirus and VPN turned on, real throughput can be a fraction of that. Size a router or firewall on its threat protection figure. Our overview of Fortinet firewall options shows how vendors list these numbers.
Hub vs switch vs router: side-by-side comparison
Here is everything in one place. If you only read one table on this page, make it this one.
| Hub | Switch | Router | |
|---|---|---|---|
| What it reads | Nothing. Only electrical signals | MAC addresses | IP addresses |
| OSI layer | Layer 1, physical | Layer 2, data link | Layer 3, network |
| Unit of data | Bits | Frames | Packets |
| Sends a message to | Every port | Only the port where the destination is | The next router toward the destination network |
| Remembers | Nothing | A MAC address table | A routing table, ARP table and NAT table |
| Duplex | Half duplex only | Full duplex | Full duplex |
| Speed | Shared by all ports | Full speed on every port | Full speed on each interface |
| Collisions | One collision domain for the whole hub | None on full-duplex links | None on full-duplex links |
| Broadcasts | Passed everywhere | Passed to every port in the VLAN | Stopped. Each interface is its own broadcast domain |
| Connects | Devices in one network | Devices in one network | Different networks, including the internet |
| Setup | None | None if unmanaged, optional if managed | Required: addresses, routes, NAT, firewall rules |
| Security | None. Everyone hears everything | Traffic kept to the right port. VLANs and 802.1X on managed models | Firewall rules, NAT, access lists, VPN |
| Still sold? | No. Deprecated in 2011 | Yes, in every network | Yes, at the edge of every network |
| In the condo building | Megaphone in the lobby | Concierge desk | Canada Post |
Follow one packet from your laptop to a website
This is where the three devices stop being abstract. You are at a desk in a Mississauga office, and you open a website. Your laptop has already looked up the site’s IP address, 203.0.113.10 in this example. Here is the trip.
- Your laptop checks whether the site is local. It compares 203.0.113.10 with its own network, 192.168.1.0/24. They do not match, so the packet has to go to the default gateway at 192.168.1.1.
- It finds the router’s MAC address. The laptop broadcasts a question: who has 192.168.1.1? This is ARP. The switch passes the question to every port, the router answers with its MAC address, and the laptop remembers it.
- It wraps the packet in a frame. The packet inside is addressed to the website’s IP. The frame around it is addressed to the router’s MAC. Two addresses, two different jobs.
- The switch delivers the frame. It reads only the destination MAC, finds the router’s port in its table, and sends the frame out of that one port. It changes nothing.
- The router takes over. It unwraps the frame, reads the destination IP, and matches its default route to the internet provider. It swaps your private source address for the office’s public one, lowers the packet’s hop counter by one, and wraps it in a brand-new frame addressed to the provider’s router.
- Every router on the internet repeats step 5. New frame, hop counter down by one, pass it on. The destination IP never changes.
- The reply comes home. The website answers the office’s public address. Your router checks its NAT notes, sees the reply belongs to 192.168.1.25, and the switch delivers it to your desk.
The sentence to remember: the IP address is the address on the envelope, and it stays the same for the whole trip. The MAC address is the label for the next hand-off, and every router replaces it. That is the difference between a switch and a router in one line.
Engineer’s notes: the headers on each link
| Field | Laptop to office router | Office router to ISP | Last router to web server |
|---|---|---|---|
| Source MAC | Laptop | Office router, WAN port | Last ISP router |
| Destination MAC | Office router, LAN port | ISP router | Web server |
| Source IP | 192.168.1.25 | 198.51.100.7 (after NAT) | 198.51.100.7 |
| Destination IP | 203.0.113.10 | 203.0.113.10 | 203.0.113.10 |
| TTL | 64 or 128, set by the laptop | One lower | Lower by one for every router passed |
- Windows starts IPv4 packets at a TTL of 128; macOS and Linux start at 64.
- The switch appears nowhere in this table. It forwarded the first frame without touching a single field.
- Inside the office, the source port also changes under PAT, and the router records the original address and port so the reply can be mapped back.
- IPv6 replaces ARP with Neighbor Discovery, which uses ICMPv6 and multicast instead of broadcast. The same rule holds: Layer 2 headers are rewritten at every hop, Layer 3 addresses are not.
- DNS resolution, the TCP handshake and TLS happen around this, but they ride on exactly the same forwarding steps.
What is really inside the box you call a router
The device your internet provider leaves behind is several devices sharing one case and one power adapter. That is the main reason the words get mixed up.
- Modem or ONT. Converts the provider’s signal into Ethernet. Cable internet uses a cable modem, DSL uses a DSL modem, and fiber uses an optical network terminal. This is the only part that talks to the street.
- Router. Connects your private network to the provider’s network and runs NAT.
- Firewall. Blocks unrequested traffic coming in from the internet.
- DHCP and DNS. Gives each device an IP address when it joins, and forwards website name lookups.
- A small switch. The LAN ports on the back. Devices plugged into them talk to each other through this switch without the router part getting involved.
- A Wi-Fi access point. A radio that puts wireless devices on the same network as the wired ones.
Bell’s original Giga Hub is a good real-world example. The fiber ONT is built in, the back has four gigabit LAN ports plus one 10 Gbps port, and Wi-Fi is on board. It does not offer a normal bridge mode, so businesses that want their own firewall to do the routing usually connect it to the 10 Gbps port and use the Giga Hub’s PPPoE pass-through.
At home, the all-in-one box is fine. In a business it is usually the weak spot: one device doing five jobs, controlled by the provider. Offices normally split those jobs across a business firewall, a managed switch and ceiling-mounted access points, which is the layout shown further down this page.
The rest of the family: Layer 3 switches, access points, modems and more
Layer 3 switch
A switch that can also route. It moves traffic between VLANs inside a building at full speed, using the same chips that do its switching. Larger offices use one as the core of the network, so a laptop on the staff VLAN can reach a printer on another VLAN without every packet travelling to the firewall and back.
It usually does not replace the router at the edge. Most Layer 3 switches have no NAT, limited firewall features, no VPN, and none of the connection types an internet provider hands over. In the building, it is a concierge who can also deliver between the towers of the same complex, while Canada Post still handles everything leaving the property. Our overview of Cisco switch and router families shows where each type fits.
Wireless access point
Think of it as a switch port without the cable. An access point turns radio signals into Ethernet and plugs into a switch, usually powered by PoE. It does not route. Adding more access points, each wired back to the switch, is the right way to extend Wi-Fi in an office or warehouse. Our guide to how many access points a building needs covers spacing and density.
Mesh Wi-Fi system
One node is the router. The others are access points that link back to it, either wirelessly or, much better, over Ethernet.
Modem
Short for modulator-demodulator. It translates the provider’s line, whether coax, a phone line or fiber, into Ethernet. A modem on its own gives you exactly one connection and no network.
Firewall
A router whose main job is security. It inspects traffic and applies rules about what may pass between your networks and the internet. In most offices, the firewall is the router.
Bridge and repeater
The ancestors. A repeater boosted a signal along a cable, and a hub is a repeater with many ports. A bridge joined two network segments and learned addresses, and a switch is a bridge with many ports and fast chips. When engineers say a switch “bridges” traffic, that is where the word comes from.
Gateway
A loose word. In your network settings, “default gateway” means your router. In marketing, “gateway” usually means the all-in-one provider box described above.
Myths that cause real problems
“Adding a switch will slow down my internet”
It will not. A gigabit switch adds a few millionths of a second per packet, far too little to notice. When an office connection feels slow, the cause is usually Wi-Fi, the internet plan, the firewall, or a damaged cable that has quietly dropped a link from 1 Gbps to 100 Mbps. We show how to spot that in why 1 Gbps internet only shows 200 to 300 Mbps on Ethernet.
“A second router will extend my network”
It creates a second network instead. Devices behind the new router sit behind two layers of NAT, printers on one side may not show up on the other, and port forwarding and some VPNs break. If you need more ports, add a switch. If you need more Wi-Fi, add an access point, or switch the second router into access point mode.
“Switches can’t read IP addresses”
Basic ones don’t need to. Layer 3 switches route by IP address, and managed Layer 2 switches regularly inspect IP information for security filters, DHCP snooping and multicast control. The accurate version: a switch forwards by MAC address unless it is doing Layer 3 work.
“More LAN ports make a better router”
The LAN ports on a router are a small built-in switch. They tell you nothing about how fast the router can move traffic to the internet, or how well it copes once the firewall and VPN are switched on.
“Unmanaged switches are a security risk”
Not on their own. The real risk is a flat network, where cameras, guest phones, staff laptops and the accounting server can all reach each other. Fixing that takes VLANs on managed switches and rules on the firewall. Our guide to isolating CCTV cameras with VLANs shows the pattern.
“Plugging both ends of a cable into the network is harmless”
It creates a loop. Without spanning tree, the switches pass broadcasts around that loop forever, and within seconds the whole network can stop responding. It happens more often than you would think, usually with a spare patch cable connecting two wall jacks under a desk.
See switches and routers on your own computer
You do not need special equipment to watch any of this. Open Command Prompt on Windows, or Terminal on a Mac or Linux machine, and try these.
| What you will see | Windows | macOS | Linux |
|---|---|---|---|
| Your IP address | ipconfig |
ifconfig |
ip addr |
| Your default gateway, which is your router | ipconfig |
route -n get default |
ip route |
| Your MAC address | getmac |
ifconfig |
ip link |
| MAC addresses of nearby devices (the ARP table) | arp -a |
arp -a |
ip neigh |
| Every router between you and a website | tracert cablify.ca |
traceroute cablify.ca |
tracepath cablify.ca |
Run the trace and read the result.
- The first line is your default gateway: the router in your office or home.
- Every line after that is another router, each one a step closer to the website.
- Your switch never appears. A switch does not touch IP addresses or the hop counter, so a trace cannot see it. That missing line is the switch vs router difference, proven on your own screen.
Then run arp -a and find your default gateway’s IP address in the list. The MAC address next to it is your router’s, and it is the destination on every frame your laptop sends toward the internet.
Engineer’s notes: what the trace is doing, and switch commands
- How traceroute works. It sends probes with a TTL of 1, then 2, then 3. Each router that decrements a probe to zero replies with ICMP Time Exceeded, revealing its address. Windows
tracertuses ICMP echo; macOS and Linuxtracerouteuse UDP by default. - Asterisks are not always a fault. A line of
* * *usually means that router does not answer probes. Some provider networks also hide hops inside MPLS tunnels. - On a Cisco switch:
show mac address-tableshows which MAC is on which port, andshow interfaces statusshows link speed and duplex. - On a Cisco router:
show ip route,show ip arpandshow ip nat translationsshow the three tables from the comparison above.
Which one do you need? Six real situations
Test yourself. Read each situation, decide what you would use, then open the answer.
-
Your office router has four LAN ports and all four are taken. You need to connect eight more desks.
Show the answer
A switch. Plug a 16- or 24-port switch into one of the router’s LAN ports, and every desk reaches the internet through it. A second router would create a separate network with double NAT. If the desks have IP phones, pick a PoE switch.
-
Staff in the back of the warehouse keep losing Wi-Fi.
Show the answer
More access points, each cabled back to a PoE switch. Wireless extenders and extra routers usually cut speed or split the network. A Wi-Fi survey shows where the access points should go.
-
You want the security cameras unable to reach staff laptops, while the recorder still sees every camera.
Show the answer
A managed switch with a camera VLAN, plus firewall rules or a Layer 3 switch deciding what can cross between VLANs. An unmanaged switch cannot do this.
-
Your Toronto and Vaughan offices need to use the same file server.
Show the answer
Routers, usually business firewalls at each site, joined by a site-to-site VPN over the internet. These are two separate networks, so only routing can connect them.
-
A desk phone keeps dropping calls, and the phone provider asks for a capture of its traffic.
Show the answer
A managed switch with port mirroring copies the phone’s traffic to a laptop running a packet capture tool. This is the one job people used to keep old hubs around for.
-
You installed your own firewall behind the provider’s gateway, and remote access to the camera recorder stopped working.
Show the answer
Double NAT. Both boxes are routing. Put the provider’s gateway in bridge or pass-through mode so your firewall holds the public IP address, then set up the port forward or VPN on the firewall.
A small office network, start to finish
Here is how the pieces fit together in a typical office of 20 to 60 people in the GTA.
- The provider’s equipment. An ONT, cable modem or provider gateway, ideally set to pass the connection through instead of routing it.
- A firewall. The office’s real router. NAT, security rules, VPN for remote staff, and links to other branches.
- A managed PoE switch. It lives in a wall cabinet or network closet, and every jack in the office runs back to a patch panel beside it. It carries separate VLANs for staff, phones, cameras and guests, and powers the phones, cameras and access points.
- Access points on the ceiling, each with its own cable back to the switch.
- The cabling. Each run from a jack to the switch can be at most 100 metres including patch cords, so where the closet goes decides a lot about the design.
Two decisions matter more than the brand on the front. First, leave spare switch ports and PoE budget for growth; we usually plan 20 to 30 percent extra, and our PoE power calculator helps with the budget. Second, plan the VLANs before the cameras and phones go in, because changing them later means touching every device. The new office network cabling plan and rack size chart cover the physical side.
Cablify designs and installs this whole stack for offices, warehouses and retail sites across Toronto and the GTA. We are a Cisco and Cisco Meraki partner and an authorized Ubiquiti reseller, we pull the cabling ourselves, and every run is tested with a Fluke tester before we leave.
Need your office network sorted out?
We cable, install and configure switches, firewalls and Wi-Fi access points for businesses across the GTA, and we can tell you which pieces your space actually needs.
FAQ
What is the difference between a hub, a switch and a router?
A hub repeats every incoming signal out of all its ports, so every device hears every message. A switch learns the MAC address of each connected device and sends each message only to the right port. A router connects separate networks and forwards traffic between them using IP addresses, which is how a local network reaches the internet.
Is a router a switch?
Not exactly, but most home and small office routers contain one. The LAN ports on the back are a small built-in switch, while the router part connects that network to the internet. Business routers and firewalls often have only a few ports and rely on a separate switch.
Can I use a switch without a router?
Yes, for traffic between local devices. Computers, printers and storage on the same switch can talk to each other. Without a router there is no internet access, and unless something else hands out addresses, devices fall back to self-assigned 169.254.x.x addresses or need static IP addresses.
Do I need a switch if I already have a router?
Only if you need more wired connections than the router has, or features it lacks, such as PoE, VLANs or faster ports. A home router with four LAN ports is enough for many homes. Most offices need a separate switch.
Does a network switch slow down internet speed?
No. A gigabit switch adds a few microseconds per packet, which no one can notice. Slow speeds after adding a switch usually come from an old 100 Mbps switch, a damaged cable that has dropped the link to 100 Mbps, or a loop in the cabling.
Are network hubs still used?
Almost never. Switches replaced them as switch chips became cheap, and the IEEE 802.3 Ethernet standard deprecated repeater hubs in 2011. Products sold today as Ethernet hubs are nearly always small unmanaged switches.
Which is faster, a hub or a switch?
A switch, by a wide margin. A switch gives every port its full speed in both directions at once, while a hub shares one speed between all of its ports and only one device can transmit at a time.
Do I still need a router if I have a Layer 3 switch?
Usually yes. A Layer 3 switch routes between VLANs inside your building very quickly, but most models lack NAT, full firewall features, VPN and the internet-facing connections that a router or firewall provides.
Is a modem the same as a router?
No. A modem converts the internet provider’s signal from coax, a phone line or fiber into Ethernet and gives you one connection. A router creates your local network and shares that connection with every device. Many providers combine both in one box.
Can I connect a switch to another switch?
Yes. Run one cable from a port on the first switch to a port on the second; modern switches detect the cable type automatically. Keep only one path between any two switches unless they run spanning tree, or you create a loop that can take the network down.
Does a switch have an IP address?
An unmanaged switch has none and needs none. A managed switch has one IP address so you can log in and configure it, but it still forwards normal traffic by MAC address unless it is a Layer 3 switch doing routing.
