Network services issues

6 minuti

Switching and routing issues are among the most common reasons a network fails — loops, misconfigured VLANs, missing routes, and exhausted DHCP pools can all bring traffic to a halt. Knowing how Spanning Tree prevents loops, how routing tables direct traffic, and how IP address allocation works is essential for isolating and fixing these problems. These notes follow Prof. Messer’s Network+ N10-009 videos “Switching Issues” and “Routing and IP Issues” (5.3).

⏱ Video — Switching Issues (9:50): 0:02 switch loops · 0:22 spanning tree protocol · 2:00 bpdu hello timers · 2:43 topology changes · 3:00 root bridge election · 4:00 designated and blocked ports · 5:00 topology change example · 5:50 spanning tree port states · 6:45 vlan assignment · 8:00 access control lists ⏱ Video — Routing and IP Issues (9:28): 0:02 routing tables · 0:44 missing routes · 1:24 routing table example · 2:40 gateway of last resort · 4:44 dhcp pool exhaustion · 5:22 ip address management ipam · 5:52 incorrect ip configuration · 7:23 duplicate ip addresses · 8:42 hunting duplicate addresses

Switching issues

Spanning Tree Protocol (STP)

  • Ethernet has no hop-count field, so a layer 2 loop lets frames circle indefinitely until a connection is unplugged. As traffic builds, both switches are overwhelmed and the network grinds to a halt.
  • STP (Spanning Tree Protocol) prevents loops by building a loop-free logical topology. Switches send BPDUs (Bridge Protocol Data Units) — MAC-layer multicasts — to every other switch in the local broadcast domain. By default BPDUs are sent every 2 seconds.
  • If a switch misses three consecutive BPDUs (6 seconds total), the link is considered down and STP recalculates.
  • Root bridge: elected when the network starts; all switches participate. The switch with the lowest bridge ID (0–61,240) wins. Tie goes to the lowest MAC address. Administrators can force a root bridge by setting a low bridge ID.
  • Each non-root switch picks a root port (best path back to the root). Other active interfaces are designated ports; redundant links are put into blocked (discarding) state.
  • When a link fails, STP unblocks the redundant path so traffic continues without creating a loop.
  • Port states (in order):
StateBehaviour
Blocking / DiscardingNo traffic passes
ListeningListening for BPDUs before changing topology
LearningPopulating the MAC address table
ForwardingNormal traffic passes
DisabledAdministratively turned off
  • To disable STP on a specific interface, put it in disabled mode (administratively off).

VLAN assignment

  • Every switch interface is associated with a VLAN. An access port is assigned a single VLAN ID; a trunk port carries multiple VLANs.
  • A device that receives an IP address via DHCP but cannot talk to other devices on the same network may be plugged into the wrong VLAN. Check the switch config to confirm the interface’s VLAN ID and either reconfigure the port or move the device to the correct port.
  • This is very common on large networks with many VLANs but is quick to resolve.

Access Control Lists (ACLs)

  • ACLs (Access Control Lists) filter traffic at the interface level. Even with correct switch and router configurations, an ACL can silently drop the packets you are trying to send.
  • Check every switch and router along the path — especially when no traffic can cross from one network to another.
  • ACLs work like a firewall rule base. More-granular rules should be at the top of the list because evaluation stops on the first match. Common matches at the top improve efficiency.
  • Best practice: disable the ACL before editing it — a mis-typed line can lock you out of the switch. Adding an ACL to an interface defaults to deny all traffic not explicitly permitted, so an empty ACL blocks everything.

Routing issues

Routing tables and the default gateway

  • The routing table determines the best next hop for each destination. Troubleshoot by checking the routing table of every router along the path — in both directions (forward and return).
  • A missing route causes the router to drop the packet and send an ICMP host unreachable message back to the sender.
  • Gateway of Last Resort (default route, 0.0.0.0/0) catches all traffic that doesn’t match an explicit route. It is added as a static route pointing to the next-hop router. Without it, unmatched traffic is dropped.
OriginExample
Directly connected10.10.10.0/24 via interface
Static routeip route 0.0.0.0 0.0.0.0 10.10.50.2
Dynamic (e.g. RIP)10.10.30.0/24 learned from RIP

DHCP address pool exhaustion

  • When the DHCP server has no available addresses, the client receives an APIPA (Automatic Private IP Addressing) address — 169.254.x.x in IPv4 — which allows local-subnet communication only and is non-routable.
  • Use an IPAM (IP Address Management) console to monitor address pool usage across all DHCP servers. If addresses run out, add more or decrease the lease time in environments with short user stays so addresses free up faster.

Incorrect IP configuration

  • Wrong IP address, subnet mask, or default gateway prevents communication. Verify with the network administrator or take a packet capture to see what other devices on the same subnet use.
  • Standard troubleshooting progression:
    1. Ping your own (loopback) address — confirms the stack is working.
    2. Ping the default gateway — confirms local connectivity.
    3. Ping an address beyond the gateway — confirms routing.

Duplicate IP addresses

  • Caused by a manually configured device using an address from the DHCP pool, overlapping DHCP server scopes, or a rogue DHCP server on the network.
  • Modern operating systems detect duplicates on connection and show an error before causing a conflict.
  • To find the offender:
    1. Ping the target IP address.
    2. Check the local ARP (Address Resolution Protocol) table for the MAC address.
    3. Look up that MAC in the switch’s MAC address table to find which physical interface the device is on.
  • If the conflict is between two DHCP servers, perform a packet capture to see what each server is offering.

Where attacks live — mental map (beyond the video)

Not from the video — why this matters for security.

  • STP attacks: an attacker can send forged BPDUs to become the root bridge, changing the topology and enabling traffic interception via a rogue switch.
  • VLAN hopping: double-tagged frames can leap between VLANs if trunk ports are misconfigured, bypassing the isolation VLANs are supposed to provide.
  • ACL bypass: an ACL with overly permissive entries low in the list or a missing implicit deny lets unwanted traffic through. Audit ACL order regularly.
  • DHCP starvation: an attacker floods the DHCP server with fake requests, exhausting the pool so legitimate clients get APIPA and cannot reach the network.
  • Rogue DHCP server: an unapproved device hands out wrong default gateways or DNS servers — a classic MITM vector when combined with false subnet and gateway values.
  • Duplicate IP from ARP spoofing: a poisoned ARP cache can make two devices appear to hold the same IP, silently redirecting traffic to an attacker’s MAC.