Modern computer networks depend on several devices working together. Routers, switches, firewalls, wireless access points, gateways, and modems each perform different functions to move traffic, connect users, and protect network resources.
A network switch connects devices within a local area network (LAN), while a router forwards traffic between different IP networks. Managed switches also support VLAN configuration, allowing administrators to separate devices and services without building separate physical networks.
Understanding these devices is essential for designing, managing, and troubleshooting home, business, and enterprise networks.
If you are new to networking, start with our Computer Networking Explained guide to understand the basic concepts behind network communication.
A network device is a hardware or software component that participates in network communication. It may connect endpoints, forward traffic, enforce security policies, or provide access to network services.
Common network devices include:
| Device | Primary Function | Typical OSI Layer |
|---|---|---|
| Network switch | Connects devices within a LAN | Layer 2 or Layer 3 |
| Router | Connects different IP networks | Layer 3 |
| Wireless access point | Connects Wi-Fi clients | Mainly Layer 2 |
| Firewall | Filters and inspects network traffic | Layers 3–7 |
| Hub | Repeats incoming signals | Layer 1 |
| Modem or ONT | Provides access to ISP infrastructure | Depends on technology |
| Load balancer | Distributes application traffic | Layers 4–7 |
These are typical roles, not strict limitations. Modern devices often combine multiple functions. For example, a Layer 3 switch can perform routing, while an enterprise firewall may also provide VPN, NAT, and routing services.
Cisco’s network switching overview provides additional background on how switches connect devices and forward traffic.
The main difference is the type of traffic each device handles and how it makes forwarding decisions.
Consider a simple office network:
PC 1 ─────┐
PC 2 ─────┤
PC 3 ─────┤
|
[SWITCH]
|
[ROUTER]
|
Internet The switch allows local devices to communicate with one another. The router provides a path to other IP networks, such as the Internet or a remote office.
A traditional Layer 2 switch does not normally route traffic between IP subnets. However, a Layer 3 switch can perform both switching and routing.
For a deeper understanding of IP addressing and packet forwarding, see our TCP/IP Explained guide.
A traditional Ethernet switch operates primarily at Layer 2 of the OSI model.
It learns the source MAC addresses of incoming Ethernet frames and associates them with the ports where those devices are connected. This information is stored in a MAC address table, sometimes called a forwarding database.
Example:
| MAC Address | Switch Port |
|---|---|
| AA:AA:AA:AA:AA:01 | Gi0/1 |
| BB:BB:BB:BB:BB:02 | Gi0/2 |
| CC:CC:CC:CC:CC:03 | Gi0/3 |
When a frame arrives, the switch checks its destination MAC address:
This process reduces unnecessary traffic compared with traditional hubs.
Switches are available in different types depending on the network’s size and management requirements.
An unmanaged switch provides basic Ethernet connectivity with little or no configuration.
Typical use cases include:
A managed switch provides administrative control over network ports and traffic.
Common features include:
Managed switches are generally preferred in business networks because they provide segmentation, monitoring, and greater control.
A Layer 2 switch forwards Ethernet frames using MAC addresses. A Layer 3 switch can also route IP packets between different networks.
For example, an organization might use two VLANs:
VLAN 10
192.168.10.0/24
|
|
[Layer 3 Switch]
|
|
VLAN 20
192.168.20.0/24 The Layer 3 switch can route traffic between these VLANs using switched virtual interfaces (SVIs), provided the device and configuration support this function.
This process is called inter-VLAN routing.
Layer 3 switches are common in enterprise networks because they combine high-speed switching with routing between internal networks.
A router forwards IP packets between different networks.
A typical connection might look like this:
Local Network
192.168.1.0/24
|
|
[ROUTER]
|
|
ISP / WAN
|
Internet Routers maintain routing information that tells them where to forward packets.
A simplified routing table might contain:
192.168.1.0/24 directly connected
192.168.2.0/24 via 10.0.0.2
0.0.0.0/0 via ISP gateway The route 0.0.0.0/0 is the IPv4 default route. It is used when no more specific route matches the destination.
Depending on the network, routers may use:
When a router receives an IP packet, it examines the destination IP address and compares it with the entries in its routing table.
The router normally selects the most specific matching route, known as the longest-prefix match.
A simplified traffic path is:
PC
|
v
Access Switch
|
v
Router A
|
v
Router B
|
v
ISP
|
v
Internet The actual path depends on routing protocols, network topology, policies, and available routes.
A default gateway is the Layer 3 next hop a host uses when the destination is outside its local IP subnet and no more specific route is available.
For example:
IP Address: 192.168.1.50
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1 A destination such as 192.168.1.100 belongs to the same /24 subnet, so the host can communicate with it directly at the IP layer.
A destination such as 8.8.8.8 is outside that subnet, so the host sends the packet toward its default gateway.
VLANs are primarily configured on managed network switches. Administrators create VLANs on switches and assign switch ports to the appropriate VLAN.
For example:
A typical business network might use:
| VLAN | Purpose | Example Subnet |
|---|---|---|
| VLAN 10 | Employees | 192.168.10.0/24 |
| VLAN 20 | Servers | 192.168.20.0/24 |
| VLAN 30 | Guest Wi-Fi | 192.168.30.0/24 |
| VLAN 40 | IoT devices | 192.168.40.0/24 |
VLANs create separate Layer 2 broadcast domains over shared switching infrastructure. They do not automatically provide complete security isolation; routing policies and firewall rules may also be required.
For practical examples of VLAN tagging, access ports, and trunk configuration, read our VLAN Explained: Access and Trunk Ports guide.
Cisco’s official documentation explains how to configure Ethernet switch ports and VLANs.
Switch ports commonly operate in access or trunk mode.
An access port normally carries traffic for one assigned VLAN and connects to an endpoint such as a computer, printer, or IP phone.
PC
|
|
Access Port
|
[SWITCH]
|
VLAN 10 A trunk port carries traffic for multiple VLANs, usually using IEEE 802.1Q VLAN tagging.
Switch A
|
| VLAN 10
| VLAN 20
| VLAN 30
|
TRUNK
|
Switch B Trunks are commonly used between switches, and between switches and VLAN-aware routers, firewalls, access points, or virtualization hosts.
Both ends must have compatible trunk settings and an appropriate allowed-VLAN configuration.
Redundant Layer 2 connections can create switching loops.
A loop may cause broadcast storms, duplicate frames, and unstable MAC address learning.
Spanning Tree Protocol (STP) helps prevent these problems by creating a loop-free logical topology while allowing redundant physical links to remain available.
Switch A
/ \
/ \
Switch B---Switch C STP uses Bridge Protocol Data Units (BPDUs) to exchange topology information and determine which ports should forward or block traffic.
Common versions and related technologies include:
Read our Spanning Tree Protocol Explained guide for a detailed explanation of root bridges, port roles, and loop prevention.
A wireless access point (AP) connects Wi-Fi clients to a wired network.
Laptop )))))
Phone ))))) [Wi-Fi AP] ─── Switch ─── Router
Tablet ))))) Access points can provide:
In business networks, access points commonly connect to managed PoE switches.
Different SSIDs can be mapped to separate VLANs. For example, employee Wi-Fi and guest Wi-Fi can use different VLANs and security policies.
A firewall controls network traffic according to defined security policies.
A simplified network design is:
Internet
|
|
[Firewall]
|
|
[Core Switch]
|
+---- Users
+---- Servers
+---- Wi-Fi Firewalls may inspect:
Modern firewalls may also provide VPN connectivity, NAT, intrusion prevention, application control, and network segmentation.
A firewall and a router are not identical, although one physical device may perform both functions.
For more information, read our Firewalls Explained and Network Security Basics guides.
Network Address Translation (NAT) changes IP address information as traffic crosses a network boundary.
A common example is translating private IPv4 addresses into a public IPv4 address when internal users access the Internet.
Private IP
192.168.1.50
|
v
Router
|
NAT
|
v
Public IP
203.0.113.20
|
Internet NAT and routing perform different jobs:
Routers and firewalls commonly provide NAT at network boundaries.
Power over Ethernet allows compatible devices to receive electrical power through Ethernet cabling.
Common PoE devices include:
PoE Switch
|
+------ Wi-Fi Access Point
|
+------ IP Camera
|
+------ VoIP Phone When selecting a PoE switch, administrators should check both the maximum power supported by each port and the total PoE power budget of the switch.
A switch may have enough physical ports but insufficient power capacity to operate every connected device simultaneously.
A hub and a switch are not the same.
A traditional Ethernet hub operates at Layer 1 and repeats incoming signals to its other ports.
A switch operates primarily at Layer 2 and forwards frames based on MAC address information.
| Feature | Hub | Switch |
|---|---|---|
| OSI Layer | Layer 1 | Primarily Layer 2 |
| Forwarding | Repeats signals | Uses MAC address table |
| Traffic handling | Shared medium | Selective forwarding |
| Modern usage | Rare | Standard LAN device |
Traditional hubs have largely been replaced by Ethernet switches.
A modem or Optical Network Terminal (ONT) provides the connection to an Internet service provider using the relevant access technology.
A fiber connection may look like this:
Fiber Connection
|
ONT
|
Router
|
Switch
|
Wi-Fi AP Consumer equipment often combines several functions in one physical device:
A gateway is a broader term for a device or system that provides access between networks or systems. In an IP network, a router or Layer 3 interface often acts as the default gateway for a subnet.
Routers and switches perform complementary roles.
A small business network might look like this:
Internet
|
ISP / ONT
|
Router / Firewall
|
Managed Switch
|
+--------+--------+
| | |
PCs Servers Printers
|
Wi-Fi APs The switch provides local connectivity between devices. The router forwards traffic between IP networks. The firewall enforces security policies, while access points provide wireless connectivity.
In larger enterprise networks, Layer 3 switches may route traffic between internal VLANs while dedicated routers and firewalls handle WAN and Internet connectivity.
For more advanced infrastructure designs, see our Data Center Network Architecture and Servers and Infrastructure Explained guides.
Network devices depend on services such as DHCP and DNS to support normal communication.
Dynamic Host Configuration Protocol (DHCP) automatically provides network configuration to clients, typically including:
The basic DHCP exchange is:
Client
|
DISCOVER
|
v
DHCP Server
|
OFFER
|
v
Client
|
REQUEST
|
v
DHCP Server
|
ACK
|
v
Configured Client The protocol is documented in RFC 2131.
Domain Name System (DNS) translates domain names into information such as IP addresses.
For example:
www.example.com
|
v
DNS
|
v
IP Address Read our DNS Explained guide for more information about DNS records, recursive resolution, authoritative servers, and caching.
When a user cannot access a network resource, troubleshoot systematically instead of immediately changing router or switch configurations.
Check:
Check:
Check:
Check:
Useful Windows commands include:
ipconfig /all
ping 192.168.1.1
tracert 8.8.8.8
route print
nslookup example.com
arp -a PowerShell also provides:
Get-NetIPConfiguration
Get-NetAdapter
Get-NetNeighbor
Test-NetConnection example.com -Port 443 Useful Linux commands include:
ip addr
ip route
ip neigh
ping -c 4 192.168.1.1
traceroute 8.8.8.8
dig example.com
ss -tulpn For more Linux diagnostics, see our Linux Network Tools Guide.
Network devices are important security boundaries and should be managed carefully.
Recommended practices include:
For enterprise environments, Network Access Control (NAC) can help authenticate users and devices before granting access to network resources.
Professional network administration requires more than configuring devices once.
Administrators need to:
Tools such as Python, Ansible, REST APIs, and NETCONF can help automate supported network devices.
Cisco and other vendors provide platform-specific automation interfaces. Automation should always include testing, validation, version control, staged deployment, and rollback planning.
Cloud environments use many of the same networking concepts as traditional networks, even when the underlying physical hardware is managed by a cloud provider.
Common cloud networking components include:
These services provide software-defined versions of functions traditionally performed by physical routers, switches, and security appliances.
Continue with our Cloud Networking Explained guide to understand VPCs, subnets, routing, gateways, and cloud security.
| Feature | Switch | Router | Access Point | Firewall |
|---|---|---|---|---|
| Main purpose | LAN connectivity | Connects IP networks | Wi-Fi connectivity | Traffic security |
| Main forwarding information | MAC address | IP address | Wireless and Ethernet frames | Rules and connection state |
| VLAN support | Common on managed models | Depends on platform | Often supports SSID-to-VLAN mapping | Common |
| Routing | Layer 3 models | Yes | Usually not its primary role | Often |
| NAT | Usually not | Common | Usually not | Common |
| Wireless connectivity | No, unless integrated | Some models | Yes | Some models |
| Security policies | Some models | Some models | Wireless controls | Extensive |
Modern equipment may combine several of these functions. Always evaluate the actual capabilities of the device rather than relying only on its product name.
No. A switch primarily connects devices within a local network, while a router forwards packets between different IP networks.
VLANs are primarily configured on managed switches. Administrators create VLANs and assign access ports to them. Trunk ports carry multiple VLANs between compatible devices.
Yes. Some routers support VLAN tagging, subinterfaces, or VLAN-aware interfaces. However, VLAN membership for endpoint access ports is most commonly configured on managed switches.
A Layer 3 switch, router, or firewall can route traffic between VLANs, depending on the network design and supported features.
Yes. A managed switch can have an IP address for management. A Layer 3 switch can also use Layer 3 interfaces to route IP traffic.
A Layer 3 switch can perform many routing functions, especially inside a LAN. However, it does not necessarily replace all WAN, Internet-edge, NAT, VPN, or security functions of a dedicated router or firewall.
A Layer 2 switch forwards Ethernet frames using MAC addresses. A Layer 3 switch can additionally route IP packets between networks.
It depends on the network. Many home routers include built-in Ethernet switch ports. Business networks often use dedicated managed switches for VLANs, PoE, monitoring, redundancy, and larger numbers of connected devices.
No. A router forwards packets between networks, while a firewall applies security policies to determine which traffic is permitted or blocked. Some devices perform both functions.
Routers, switches, firewalls, access points, and other network devices work together to provide reliable communication and secure connectivity.
The most important distinction is that switches connect devices within a LAN, while routers forward traffic between IP networks. Managed switches provide VLAN segmentation, and Layer 3 devices handle communication between different VLANs.
Understanding these roles makes it easier to design networks, troubleshoot connectivity problems, and manage modern enterprise and cloud infrastructure.
Introduction Border Gateway Protocol (BGP) is the routing protocol used to exchange network reachability information…
Introduction A Linux server can experience connection failures even when its network interface is working…
Introduction TCP retransmissions are an important indicator of network reliability and performance. When a Linux…
Open Shortest Path First (OSPF) is a link-state routing protocol widely used in enterprise networks…
Group Policy is one of the most important management features in Windows Server Active Directory…
Windows DNS servers play an essential role in Active Directory environments, allowing computers, servers, applications,…