How a dependable network fits together: routers vs. firewalls, switches, VLANs, Wi-Fi, PoE, guest networks, firewall rules, DNS, remote access, and monitoring, with plans for homes and small offices.
Who this is for
Homeowners who want Wi-Fi and internet that just work, homelab builders adding VLANs, and small offices (roughly 2–25 people) without a dedicated IT person.
Before you start
- Admin access to your router or firewall
- A rough list of devices on your network (computers, phones, printers, TVs, cameras, smart-home gear)
Applies to
Vendor-neutral. Command examples: Cisco IOS XE 17.x (Catalyst 9300 documentation), FortiOS 7.6 and 8.0, Windows 11, Linux and macOS. The Cisco and FortiGate examples are checked against vendor documentation, not tested on equipment.
Ask AI about this guideChatGPT, Claude, or any assistant
These open a new chat with a prompt that points the assistant to this guide. It only sees the guide if it can open the link. If it says it can't, use Copy guide for AI and paste the text into the chat.
Nothing goes to an AI service unless you choose one. AI answers can be wrong: check them against the guide before you change anything important.
Think of Wi-Fi that drops in the back bedroom, a printer that vanishes, or a smart TV on the same network as the office laptops. Most network problems like these come from a network that grew one device at a time without a plan. This guide explains how the pieces fit together so you can fix what you have or build it right from the start.
It stays vendor-neutral. The concepts apply whether your gear comes from your ISP, a consumer brand, or a business line. Where a command example helps, it's labeled with the platform it applies to, whether it only reads or changes settings, and whether it was checked against the vendor's documentation or tested on equipment.
The basic architecture#
Nearly every home and small-office network has the same layers:
- Internet connection: the ISP's modem, fiber ONT, or cellular gateway.
- Router or firewall: connects your network to the internet, hands out addresses (DHCP), translates addresses (NAT), and decides what traffic is allowed.
- Switch: connects wired devices together. Many routers include a small one.
- Wireless access points (APs): put devices on the network over Wi-Fi. A consumer "router" usually has one built in.
- Devices: computers, phones, printers, cameras, TVs, and smart-home gear.
In a small home, one box often does layers 2–4. As needs grow, splitting them up (a separate firewall, switch, and access points) makes each part easier to upgrade and troubleshoot.
Router vs. firewall#
Nearly every consumer router includes a basic stateful firewall: it allows replies to traffic your devices started and blocks unsolicited connections from the internet. For most homes, that's enough.
A dedicated firewall (a business appliance from vendors such as Fortinet, or open-source software such as OPNsense or pfSense on suitable hardware) adds:
- Rules between internal network zones, not just between "inside" and the internet
- Site-to-site and remote-access VPN
- Detailed logging, plus optional web filtering and intrusion prevention (often a paid subscription)
- Multiple internet connections with failover
| You probably need... | When |
|---|---|
| A good router or mesh Wi-Fi system | A home with no special requirements; nobody wants to manage rules |
| A router that supports VLANs and multiple SSIDs | A home with lots of smart-home devices, a home office, or a homelab |
| A business firewall | A small office with sensitive data, compliance needs, remote workers, or multiple sites |
Managed vs. unmanaged switches#
- Unmanaged switches have no settings. They're cheap and reliable, and fine when every device belongs on one network.
- Managed (or "smart") switches add VLANs, per-port PoE control, port statistics, loop protection (spanning tree), link aggregation, and port mirroring for troubleshooting.
To separate guests, smart-home devices, or a homelab with VLANs that span more than one device, you need a managed switch (or one built into your router). VLAN-tagged traffic has to pass between your router and your access points. A single router with a built-in guest Wi-Fi network can separate guests without one.
IP addresses and subnets, in plain terms#
Every device on your network needs an IP address, and every address belongs to a subnet: a range of addresses that can reach each other directly, without going through the router.
- Private ranges. Home and office networks use the ranges RFC 1918 sets aside for private use: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, and 192.168.0.0–192.168.255.255. The internet doesn't route them, so the router translates them to its public address (NAT).
- Reading "/24".
192.168.20.0/24means the first 24 bits (the first three numbers,192.168.20) identify the network, and the last number identifies the device. That gives 256 addresses, 254 of them usable:.0names the network and.255is the broadcast address. The subnet mask255.255.255.0says the same thing. A /24 is plenty for a home or a small office. The subnet calculator works out the network, broadcast, and usable range for any address and prefix. - The default gateway is the router's address on the subnet, usually
.1. A device sends anything addressed outside its own subnet to the gateway. - Routing is what the router does next: it looks at the destination and forwards the traffic to the right network, whether that's the internet or another subnet. Each VLAN below is its own subnet, so traffic between VLANs passes through the router or firewall, and that's where your rules apply.
VLAN fundamentals#
A VLAN (virtual LAN, IEEE 802.1Q) splits one physical switch into several separate networks. Devices on different VLANs can't talk to each other unless the router or firewall allows it.
Three terms make VLANs click:
- Access (untagged) port: belongs to one VLAN. The device plugged in doesn't know VLANs exist. Use for computers, printers, and cameras.
- Trunk (tagged) port: carries several VLANs at once, each frame tagged with its VLAN number. Use between switches, to the router/firewall, and to access points that broadcast multiple SSIDs.
- Native/untagged VLAN on a trunk: the one VLAN a trunk carries without a tag. Keep it consistent on both ends of a link; a mismatch is a classic source of "it gets the wrong address" problems.
A starter VLAN plan#
Give each VLAN its own private subnet (RFC 1918 ranges). Matching the third number to the VLAN ID makes troubleshooting easier:
| VLAN | Name | Subnet | Who's on it |
|---|---|---|---|
| 10 | Management | 192.168.10.0/24 | Switches, access points, firewall management |
| 20 | Staff / Trusted | 192.168.20.0/24 | Work and family computers, phones |
| 30 | Guest | 192.168.30.0/24 | Visitors' devices: internet only |
| 40 | IoT / Cameras | 192.168.40.0/24 | Smart TVs, speakers, thermostats, cameras |
| 50 | Lab (optional) | 192.168.50.0/24 | Homelab servers and test machines |
Start with fewer VLANs rather than more. Every extra network is another set of rules to maintain. For a printable VLAN and trunking reference, see the switching sheets in the PacketLife networking cheat sheets.
Example: access and trunk ports on a Cisco switch#
configure terminal
vlan 10
name MGMT
vlan 20
name STAFF
vlan 30
name GUEST
vlan 40
name IOT
!
interface GigabitEthernet1/0/5
description Front desk PC
switchport mode access
switchport access vlan 20
spanning-tree portfast
!
interface GigabitEthernet1/0/24
description Uplink to firewall
switchport mode trunk
switchport trunk allowed vlan 10,20,30,40
!
end
copy running-config startup-config
show vlan brief
show interfaces switchport
Wi-Fi: choosing and placing access points#
Placement matters more than any spec sheet.
- More access points at lower power beat one powerful router. Walls, floors, mirrors, and appliances absorb signal. A two-story house or an office with interior walls usually needs two or more APs.
- Wire the access points whenever you can. Mesh systems that relay Wi-Fi over Wi-Fi ("wireless backhaul") usually lose speed with each hop. Mesh with Ethernet backhaul gets the best of both.
- Mount APs high and central, away from metal cabinets and the back of a TV.
- Choose Wi-Fi 6 (802.11ax) or newer for new equipment. Wi-Fi 6E added the 6 GHz band, and Wi-Fi 7 uses it too. The 6 GHz band helps in crowded areas, but only devices that support it can use it.
- Use WPA3 (or WPA2/WPA3 transition mode if older devices must connect). Turn off WPS.
- Keep SSIDs to three or four. Each extra network name adds overhead on every channel. One SSID for each VLAN that needs Wi-Fi (Staff, Guest, IoT) is plenty.
- On 2.4 GHz, use 20 MHz channels and stick to channels 1, 6, or 11 (in the US). Let 5 and 6 GHz carry the heavy traffic.
Power over Ethernet (PoE)#
PoE sends power and data over the same Ethernet cable, so an access point or camera on the ceiling needs no outlet. Check three things:
- The standard each device needs. 802.3af (PoE) supplies up to 15.4 W per port at the switch, 802.3at (PoE+) up to 30 W, and 802.3bt (PoE++) up to 60 W (Type 3) or 90 W (Type 4). Some power is lost in the cable, so the device itself can count on about 13 W, 25.5 W, 51 W, or 71.3 W respectively. Newer Wi-Fi 6E/7 access points often need PoE+ or more.
- The switch's total PoE budget. A switch might offer PoE+ on every port but only enough total power for a few devices at full draw. Add up your devices' maximums.
- Standard vs. "passive" PoE. Some older or budget equipment uses passive PoE that isn't compatible with the IEEE standards. Mixing them up can damage equipment.
Segmentation and guest networks#
Segmentation means putting devices that don't need to talk to each other on separate networks, so a compromised smart plug or a visitor's infected laptop can't reach your work computers directly.
- Guest network: internet only, with client isolation turned on so guests can't see each other.
- IoT network: smart TVs, speakers, cameras, and appliances. These often get fewer security updates than computers.
- Trusted network: computers and phones you manage.
Two practical wrinkles:
- Casting and discovery (AirPlay, Chromecast, network printers) rely on multicast (mDNS/Bonjour), which doesn't cross VLANs by default. Many routers have an "mDNS reflector" or "multicast DNS" option to allow it between specific VLANs.
- Printers usually work best on the trusted network, or on their own VLAN with a rule allowing printing from trusted devices.
Basic firewall rules#
Firewall rules decide what traffic may pass through the router, from one network to another. On most firewalls, including FortiGate, they're checked from the top of the list down, and the first match decides. A sensible small-network policy:
| # | From | To | Allow | Why |
|---|---|---|---|---|
| 1 | Any | Any | Established and related replies | Lets answers to allowed traffic come back |
| 2 | Trusted (20) | Any internal VLAN | Yes | Your managed devices can reach printers, cameras, and the lab |
| 3 | Guest (30), IoT (40) | Other private networks (RFC 1918) | Block | Keeps them away from your computers |
| 4 | Guest (30), IoT (40) | Internet | Yes | They only need the internet |
| 5 | Internet | Anything inside | Block (default) | No inbound connections unless you add a specific rule |
Traffic to the router itself#
Traffic addressed to the router, such as its admin pages, DHCP, and DNS if it answers lookups, is usually controlled separately from the rules above. Most routers set it per network: which services the router offers on each interface. Business firewalls add their own rules for traffic to the firewall.
- Guest and IoT devices still need DHCP and DNS. DHCP comes from the router (or a relay). DNS comes from the router or from the resolvers that DHCP hands out.
- Turn off admin access on the guest and IoT networks. Disable HTTPS, SSH, and any web management on those interfaces, and manage the network from Trusted or Management only. On a FortiGate, that's each interface's administrative access setting (
allowaccess), and local-in policies can restrict it further. Ordinary firewall policies don't control it.
Example: a guest VLAN and policy on a FortiGate#
config system interface
edit "guest"
set vdom "root"
set interface "internal"
set type vlan
set vlanid 30
set mode static
set ip 192.168.30.1 255.255.255.0
set allowaccess ping
set role lan
next
end
config system dhcp server
edit 0
set dns-service default
set default-gateway 192.168.30.1
set netmask 255.255.255.0
set interface "guest"
config ip-range
edit 1
set start-ip 192.168.30.100
set end-ip 192.168.30.199
next
end
next
end
config firewall policy
edit 0
set name "guest-to-internet"
set srcintf "guest"
set dstintf "wan1"
set action accept
set srcaddr "all"
set dstaddr "all"
set schedule "always"
set service "ALL"
set nat enable
next
end
What each part does:
- The policy covers traffic passing through the FortiGate. FortiOS denies forwarded traffic that no policy matches, so unless another policy allows more, guests can reach only the internet.
edit 0creates a new entry with the next free number, so it never overwrites an existing one. - The outgoing interface (
set dstintf "wan1") is only an example. Interface names vary by model and configuration; Fortinet's own examples usewan1,port2, andexternal. On models with two WAN ports, the default configuration putswan1andwan2in an SD-WAN zone namedsd-wan, and the default internet policy uses that zone instead. Before you change anything, list your interfaces withshow system interfaceand check which outgoing interface or zone your existing internet policy uses withshow firewall policy. Both commands are read-only. set allowaccess pingcontrols access to the FortiGate itself on this interface. It lets guests ping the gateway address and enables no other administrative access, so HTTPS and SSH administration stay off on the guest network. (The DHCP server is configured separately and still answers guests.)set dns-service defaultgives DHCP clients the DNS server addresses configured in the FortiGate's system DNS settings. It doesn't turn the guest interface address into a DNS resolver; guests send their lookups to those servers through the internet policy.- The parent interface (
internalhere) depends on the model. It may beinternal,lan, or a port such asport1, and the available interfaces and VLAN options vary between models. Check yours withshow system interface.
DNS and DHCP#
- Let the router hand out addresses (DHCP) and use reservations for devices that need a fixed address: printers, NAS, servers, and access points. Reserved addresses are easier to manage than addresses typed into each device.
- Plan addressing for every VLAN. If devices on a VLAN should get their addresses automatically, that VLAN needs a DHCP range on the router, or a DHCP relay to a server elsewhere. Without one, they end up with no usable address (see the 169.254 symptom below). Static addresses are a valid alternative, for example on a small VLAN of servers or network equipment.
- Point devices at the router for DNS, and set the router's upstream to a resolver you trust. Some public resolvers block known malicious domains, for example Quad9 (
9.9.9.9) or Cloudflare's malware-blocking resolver (1.1.1.2). A self-hosted filter such as Pi-hole or AdGuard Home can also block ads and tracking. - Use
home.arpafor local names (for exampleprinter.home.arpa). It's reserved for home networks by RFC 8375. Avoid.local, which belongs to multicast DNS (RFC 6762).
Remote access#
- Don't port-forward Remote Desktop, file sharing (SMB), or admin pages to the internet. They're constantly scanned and attacked.
- Use a VPN: WireGuard or IPsec on your router or firewall, or a mesh VPN service. Require multi-factor authentication where the VPN supports it.
- Patch VPN and firewall firmware promptly. Internet-facing VPN appliances are a favorite target; CISA's Known Exploited Vulnerabilities catalog regularly lists them.
Monitoring and maintenance#
You don't need an enterprise monitoring system. You need to know when something breaks, and to keep things updated.
- Keep an inventory: a spreadsheet of devices, their IP addresses, locations, firmware versions, and admin logins (in your password manager).
- Turn on automatic firmware updates where your equipment supports them, or put a monthly reminder on the calendar.
- Watch the important things: a small uptime monitor (Uptime Kuma, for example) can ping your internet connection, firewall, switch, and key servers and alert you by email or phone.
- Back up the configuration of your router/firewall and switches after every change.
- Put the core equipment on a UPS (battery backup) so a brief power blip doesn't reboot the whole network.
Choosing hardware#
Match the equipment to how much you want to manage, not to the biggest spec sheet.
| Home: reliable Wi-Fi, little maintenance | A well-reviewed Wi-Fi 6 or newer mesh system with Ethernet backhaul where possible, plus a guest network. No VLANs needed. |
|---|---|
| Home with smart devices, a home office, or a homelab | A router/gateway that supports VLANs and multiple SSIDs, a small managed PoE switch, and one to three ceiling access points managed from one controller app. |
| Small office (about 2–25 people) | A business firewall with a support contract and VPN, a managed PoE switch with headroom, ceiling-mounted access points, a UPS, and documented configuration backups. |
For the "managed from one app" setups, two common ecosystems are Ubiquiti UniFi and TP-Link Omada, and both pair gateways, switches, and access points. For small offices that need a full business firewall, Fortinet FortiGate is one widely used option among several. For the technically inclined, open-source OPNsense on dedicated hardware is another. These are examples, not endorsements of a single brand. Pick based on support, the management interface you're comfortable with, and the cost of any licenses.
- Ubiquiti UniFi product line
- TP-Link Omada product line
- Fortinet FortiGate firewalls
- OPNsense (open-source firewall)
Troubleshooting, layer by layer#
Work from the bottom up. Many problems turn up in the first three steps.
- Physical: link lights on? Try a different cable and port. For Wi-Fi, check signal strength where the problem happens.
- Addressing: does the device have the right address for its VLAN?
- Gateway: can it reach the router?
- Internet: can it reach a public IP address?
- DNS: can it look up names?
- The service itself: is the specific port reachable?
ipconfig /all # address, gateway, DNS servers
ping 192.168.20.1 # the gateway for this VLAN
ping 1.1.1.1 # the internet, by IP address
nslookup example.com # DNS
tracert 1.1.1.1 # where packets stop
Test-NetConnection example.com -Port 443 # a specific service
ip addr # macOS: ifconfig
ip route # macOS: netstat -rn
ping -c 4 192.168.20.1
ping -c 4 1.1.1.1
dig example.com # or: nslookup example.com
traceroute 1.1.1.1
All of these only read or send test traffic; none changes a setting. On some Linux distributions, dig and traceroute are separate packages (dnsutils or bind-utils, and traceroute).
Common symptoms and causes:
- An address starting with 169.254 (a self-assigned "link-local" address, RFC 3927) usually means the device got no DHCP reply. Check the cable or Wi-Fi, the switch port's VLAN, and, if the VLAN uses DHCP, that it has a DHCP server or relay.
- A device gets an address from the wrong subnet: the switch port or SSID is mapped to the wrong VLAN, or the trunk's native VLAN doesn't match on both ends.
- Internet works by IP address but not by name: most likely DNS. Check the DNS servers in
ipconfig /alland try another resolver. - The router's WAN address is private (10.x, 172.16–31.x, 192.168.x): you have double NAT, two routers in a row. Put the ISP device in bridge/passthrough mode or turn off routing on one of them. Double NAT breaks some VPNs, games, and port forwards.
- The router's WAN address is between 100.64.0.0 and 100.127.255.255 (100.64.0.0/10): that range is shared address space, set aside for ISPs and often used for carrier-grade NAT (RFC 6598). It strongly suggests your ISP shares one public address among several customers, but it isn't proof. If it does, ordinary inbound port forwarding may not work. Check with your ISP; ask whether you're behind carrier-grade NAT and whether a public address is available. Remote-access tools that connect outward from your network are another option.
- Wi-Fi is slow in one area but fine near the AP: coverage. Add an access point (wired, ideally) rather than raising transmit power.
- Everything drops for a few seconds at random: look for a network loop (two cables between the same switches without spanning tree) or a failing switch or power supply.
Next steps#
- Draw your current network, even on paper, and write down your VLAN plan before changing anything.
- Check each VLAN's subnet with the subnet calculator, and if you write Cisco access lists, check their address and wildcard pairs with the wildcard mask calculator.
- Keep the PacketLife networking cheat sheets by Jeremy Stretch handy for subnetting, VLANs, and Cisco IOS commands.
- Secure what's on the network with the Small Business Cybersecurity Checklist.
Sources and official documentation
- RFC 1918: Address Allocation for Private Internets
- RFC 8375: Special-Use Domain 'home.arpa.'
- RFC 6762: Multicast DNS (the .local domain)
- RFC 3927: Dynamic Configuration of IPv4 Link-Local Addresses (169.254.x.x)
- RFC 6598: Shared Address Space for carrier-grade NAT (100.64.0.0/10)
- IEEE 802.3 Ethernet standards (including PoE: 802.3af/at/bt)
- Ethernet Alliance: Overview of 802.3bt (PoE power by Type and Class)
- Wi-Fi Alliance: Wi-Fi security (WPA3)
- Cisco Meraki: Channel bonding (2.4 GHz stays at 20 MHz on channels 1, 6, 11)
- CISA: Home network security (2021, archived)
- CISA: Known Exploited Vulnerabilities catalog
- Cisco: VLAN Configuration Guide, IOS XE 17.18.x (Catalyst 9300): Configuring VLANs
- Cisco: VLAN Configuration Guide, IOS XE 17.18.x (Catalyst 9300): Configuring VLAN Trunks
- Cisco: Layer 2 Configuration Guide, IOS XE 17.13.x (Catalyst 9300): Optional Spanning-Tree Features (PortFast)
- Fortinet: FortiOS 8.0.2 Administration Guide: VLAN
- Fortinet: FortiOS 8.0.2 Administration Guide: Firewall policy
- Fortinet: FortiOS 8.0.2 Administration Guide: DHCP server basic configuration
- Fortinet: FortiOS 8.0.2 Administration Guide: Local-in policy (traffic to the FortiGate itself)
- Fortinet: FortiOS 8.0.2 Administration Guide: Configuration backup and restore
- Fortinet: FortiOS 8.0.2 Administration Guide: CLI subcommands (edit 0)
- Fortinet: FortiOS 8.0.2 Administration Guide: Differences between models (interface names vary)
- Fortinet: FortiOS 8.0.2 Administration Guide: Default SD-WAN configuration on models with two WAN ports
- Cloudflare: 1.1.1.1 for Families (1.1.1.2 blocks malware)
- Quad9: Service addresses and features
Review history
- Technical review: Jeremiah Ellington,
- Editorial review: Jeremiah Ellington,
- Next scheduled review:
Spotted something out of date or wrong? Email a correction and I'll fix it. See how these guides are made.