Sub topic 2
Network basics you need before troubleshooting
This chapter assumes you know what a router, switch, and access point do, and that you can open a Windows command prompt. It covers the four settings that nearly every network fault touches: IP address, subnet mask, default gateway, and DNS server. It also covers DHCP, which hands those settings out.
The four settings a host needs
A host needs four values to talk beyond its own local network.
| Setting | What it does | Typical value |
|---|---|---|
| IP address | Identifies the host on the network | 192.168.1.25 |
| Subnet mask | Shows which part of the address is the local network | 255.255.255.0 |
| Default gateway | The router the host sends non-local traffic to | 192.168.1.1 |
| DNS server | Turns names such as example.com into IP addresses | 192.168.1.1 or 8.8.8.8 |
The subnet mask lets the host decide where to send a packet. With the mask 255.255.255.0, any address that starts with 192.168.1 is local, so the host sends the packet straight to it. Any other address goes to the default gateway.
How DHCP assigns settings
DHCP (Dynamic Host Configuration Protocol) is a service that gives out IP settings automatically. Most home routers run a DHCP server. Most business networks use a dedicated server.
A DHCP lease is the loan of an address for a set time. The client asks, the server offers an address with the mask, gateway, and DNS servers, and the client accepts. This exchange is often remembered as DORA: Discover, Offer, Request, Acknowledge.
If no server answers, Windows gives itself an APIPA address (Automatic Private IP Addressing) in the range 169.254.0.0/16. An APIPA address has no gateway, so the host can reach only other hosts that also use APIPA addresses on the same segment. Seeing 169.254.x.x is a strong sign that DHCP failed.
A static address is one you set by hand. Static addresses suit servers and printers. They cause trouble when two devices get the same address (an IP conflict) or when the address is outside the local network's range.
Public and private addresses
Private addresses work only inside a local network. They are:
- 10.0.0.0 to 10.255.255.255
- 172.16.0.0 to 172.31.255.255
- 192.168.0.0 to 192.168.255.255
The router uses NAT (Network Address Translation) to share one public address among all the private hosts. Because of NAT, a computer with a private address can still browse the internet.
DNS and the default gateway
DNS (Domain Name System) is the service that translates names to addresses. If you can reach a site by IP address but not by name, the problem is DNS. If you cannot reach anything outside your own network, suspect the default gateway or the internet connection.
A wrong gateway is a common fault on static configurations. The gateway must be inside the host's own subnet. A host at 192.168.1.25 with the mask 255.255.255.0 and the gateway 192.168.2.1 cannot reach the gateway, so it cannot leave the network.
Ports and layers in brief
A few ports are worth recognizing: DHCP uses UDP 67 and 68, and DNS uses 53. Printing often uses TCP 9100 or 631. You will see how these matter in later chapters.
What this means for troubleshooting
Each setting maps to a symptom. This map guides the commands you will use in the next chapter.
| Symptom | Likely setting at fault |
|---|---|
| 169.254.x.x address | DHCP unreachable |
| Reaches local devices, not the internet | Default gateway |
| Reaches IP addresses, not names | DNS server |
| Intermittent loss of connection | IP conflict or a duplicate static address |
Exercise
A technician finds that a laptop has the address 169.254.17.8 and cannot reach the internet or the file server. Other laptops on the same network work. What is the most likely cause, and what is a sensible next step?
Show answer
The laptop did not get a lease from the DHCP server and assigned itself an APIPA address. Check the cable or Wi-Fi connection, then run ipconfig /release and ipconfig /renew. If it still fails, confirm that the DHCP server is running and reachable.
Exercise
A user can open http://8.8.8.8 but cannot open example.com. Which setting is the most likely cause?
Show answer
The DNS server setting. The network path works, because the IP address loads, but names are not being resolved.