Sub topic 12
Network Devices and What They Do
This chapter assumes you know the network types from earlier chapters, the OSI and TCP/IP models, and the basics of IPv4 addressing, including what a subnet mask and default gateway are. It also assumes you can tell an Ethernet cable from a fiber cable. The goal is to match each device to the layer it works at, the job it does, and the symptoms it causes when it fails.
The Big Picture
Every device in a small network does one of a few jobs. It joins devices together, forwards traffic between networks, lets wireless clients attach, filters traffic, or converts one signal type into another. The A+ exam describes a scenario and asks you to pick the device that fits.
Hubs and Switches
A hub is a basic device that repeats every incoming signal out of all of its other ports. It works at Layer 1, the physical layer. Every connected device sees all traffic, so devices share one collision domain. A collision happens when two devices transmit at the same time and the signals corrupt each other. Hubs are obsolete, but the exam still uses them as a contrast with switches.
A switch is the standard device for connecting wired devices in a LAN. A basic switch works at Layer 2, the data link layer. It reads the source MAC address of each incoming frame and records it in a MAC address table, which maps each MAC address to the port it was learned on. When a frame arrives, the switch looks up the destination MAC address and sends the frame out of only that port. If the destination is not in the table yet, the switch floods the frame out of all other ports. The reply from the destination teaches the switch where that device is.
Each switch port is its own collision domain, which is why switches are much faster in practice than hubs. Switches do not separate broadcast domains by default. A broadcast frame, such as a DHCP discovery message, still goes to every port.
There are two switch types to know:
- An unmanaged switch works out of the box with no configuration. It is common in homes and small offices.
- A managed switch has a configuration interface. It supports features such as VLANs, port monitoring, and speed and duplex settings.
A VLAN (virtual LAN) splits one physical switch into several logical networks. Devices in different VLANs cannot talk directly. Their traffic must pass through a router or a Layer 3 switch. A Layer 3 switch adds routing between VLANs.
Routers
A router connects different networks and forwards packets between them using IP addresses. It works at Layer 3, the network layer. A router has at least two interfaces, each in a different network. For a client, the router's LAN address is the default gateway.
A router compares the destination IP address of each packet against its routing table. The table lists known networks and the next hop for each one. If no entry matches, the router uses its default route, which on a home router points to the ISP. Routers do not forward broadcasts, so each router interface is its own broadcast domain.
A SOHO (small office/home office) router combines several functions in one box:
- A router for Layer 3 forwarding and NAT
- A small switch with typically four LAN ports
- A wireless access point
- A DHCP server and a basic firewall
Because of this, a "wireless router" is really several devices in one case. Later chapters cover its configuration.
Access Points
An access point (AP) connects wireless clients to a wired network. It bridges 802.11 Wi-Fi to Ethernet at Layer 2. The AP plugs into a switch port and broadcasts one or more SSIDs (network names).
A standalone AP is useful when the router has no wireless or its signal is weak. In a larger building you place several APs that share an SSID and use different channels, so users roam between them. APs are often powered with Power over Ethernet, covered in a later chapter. A wireless range extender (repeater) differs from an AP. It receives a wireless signal and rebroadcasts it, which usually halves the throughput. An AP wired back to the network does not have that penalty.
Firewalls
A firewall allows or blocks traffic according to rules. Rules usually match source and destination address, port, and protocol.
| Type | What it does | Example |
|---|---|---|
| Host-based | Software on one computer | Windows Defender Firewall |
| Network-based | Dedicated hardware or a router feature at the network edge | Edge firewall appliance |
| Stateless packet filter | Judges each packet alone against the rules | Basic ACL |
| Stateful | Tracks connections and allows replies to traffic the inside host started | Most SOHO routers |
A stateful firewall is why a home computer can browse the web but unrequested inbound connections are dropped. The firewall remembers the outbound request and lets the matching reply through. An unrequested packet from the internet matches no known connection and is dropped.
A UTM (unified threat management) appliance bundles a firewall with other protection, such as intrusion prevention, content filtering, and antivirus scanning.
Modems
A modem converts between the digital signals used inside your network and the signal type used by the provider's line. The kind of modem depends on the service:
- Cable modems use the coaxial cable TV line, and the connector is F-type.
- DSL modems use a telephone line with an RJ11 connector.
- An ONT (optical network terminal) does the same job for fiber service.
- Cellular modems or hotspots use mobile networks.
A modem does not route. If you plug one computer straight into a modem, it may get a public address from the ISP. Most households place a router behind the modem. Many ISPs supply a single box that combines modem and router, called a gateway.
Patch Panels
A patch panel is a rack-mounted panel with many ports and no electronics. Permanent cable runs from wall jacks are punched down on the back of the panel. Short patch cables then link the front ports to switch ports. This design lets you rearrange connections without touching the long, hidden cable runs. It also makes labeling easier. If a wall jack fails, you move the patch cable on the front, and the building wiring stays untouched. A patch panel does not amplify or filter anything.
Other Devices
- A repeater regenerates a signal to extend a cable run beyond its distance limit, which is 100 meters for twisted pair Ethernet.
- A bridge joins two network segments at Layer 2. A switch is effectively a multiport bridge.
- A media converter changes one cable type to another, for example copper Ethernet to fiber.
- A load balancer distributes requests across several servers.
- A proxy server makes requests on behalf of clients and can cache or filter content.
- An IDS/IPS detects, or detects and blocks, suspicious traffic.
Choosing a Device
Common Errors and Symptoms
- A hub is used where a switch is needed. Performance falls as more devices are added, because all devices share one collision domain.
- A computer reaches local devices but not the internet. Suspect the default gateway setting or the router's connection to the modem.
- Only one computer works when plugged into the modem. The ISP may allow a single device. A router solves this.
- Wi-Fi works but the wired port does not. Check the cable, the switch port, and the patch panel connection.
- A second router on a home network causes address conflicts. Two DHCP servers on one LAN hand out clashing configurations, so disable DHCP on the second device or use it only as an AP.
- Plugging a switch into itself with two cables creates a loop. Without spanning tree protection, broadcasts circle endlessly and the network slows or stops.
Exercises
Exercise
A small office has one internet line, ten wired PCs, and staff who want Wi-Fi. Name the devices needed and say what each one does.
Show answer
A modem (or ONT) converts the ISP signal. A router connects the office LAN to the internet, provides NAT and acts as the default gateway, with a firewall protecting the edge. A switch connects the ten wired PCs. An access point provides Wi-Fi and is wired to the switch. A SOHO router can combine the router, switch, firewall, and AP in one box.
Exercise
A switch receives a frame whose destination MAC address is not in its MAC address table. What does it do, and how does it later learn the location of that device?
Show answer
It floods the frame out of every port except the one it arrived on. When the destination replies, the switch reads that frame's source MAC address and records it with the port it arrived on. Later frames go out of that port only.
Exercise
After a user adds an older wireless router to the LAN by plugging it into a LAN port, several PCs get wrong gateway addresses and lose internet access. What is the likely cause and the fix?
Show answer
The second router's DHCP server is answering client requests alongside the main router's DHCP server. Disable DHCP on the second device and plug into one of its LAN ports instead of its WAN port, or configure it only as an access point.