1.10 Verify IP settings on Windows, macOS and Linux clients
CCNA 200-301 v1.1 · 1.0 Network Fundamentals
When a user cannot reach anything, the first questions are on the host itself: does it have an address, the right mask, a default gateway and a DNS server? For the CCNA you find these on Windows, macOS and Linux, and read what the answers mean.
What you must know
- Find a host's IPv4 and IPv6 address, mask, gateway, DNS and MAC on Windows, macOS and Linux.
- Tell a DHCP failure (169.254.x.x) from a wrong gateway or a missing DNS server.
- Renew a DHCP lease and clear the DNS cache.
- Test step by step: loopback, own address, gateway, remote address, name.
The commands per operating system
| Task | Windows | macOS | Linux |
|---|---|---|---|
| Addresses, mask, MAC | ipconfig /all | ifconfig en0 or ipconfig getifaddr en0 | ip address (ip a) |
| Default gateway | ipconfig | netstat -rn or route -n get default | ip route |
| DNS servers | ipconfig /all | scutil --dns | resolvectl status or /etc/resolv.conf |
| Renew DHCP | ipconfig /release then /renew | sudo ipconfig set en0 DHCP | sudo dhclient -r && sudo dhclient (or NetworkManager) |
| ARP / neighbors | arp -a | arp -a | ip neigh |
Graphical settings show the same data, but the exam (and real troubleshooting) favour the command line because it shows everything at once.
Reading the result
ping 127.0.0.1: the host's TCP/IP stack works.- Ping its own address, then the default gateway (1): the NIC, address and LAN work.
- Ping a remote address, then a name (2): routing beyond the gateway, then DNS.
| Symptom | Likely cause |
|---|---|
| Address 169.254.x.x | No answer from DHCP: check the cable, VLAN, relay and server. |
| Gateway in another subnet, or blank | Wrong static settings or a wrong DHCP option. |
| Remote addresses ping, names fail | Missing or wrong DNS server. |
| Only some hosts on a subnet reachable | Wrong mask on this host. |
Commands
ipconfig /all | Windows: every adapter's settings, DHCP server and lease. |
ip address / ip route | Linux: addresses and the routing table with the default route. |
nslookup <name> | Every OS: which DNS server answers and what it says. |
tracert / traceroute | The path to a remote address, hop by hop. |
Exam traps
- 169.254.x.x (APIPA) means DHCP failed, not that DHCP gave that address.
- A host's default gateway must be in its own subnet.
- Ping working by address but not by name points to DNS.
- Windows uses
tracert; macOS and Linux usetraceroute.
Check yourself
- A Windows PC shows 169.254.10.4. What happened, and what do you try first?
- It got no DHCP answer. Check the link and VLAN, then
ipconfig /releaseand/renew. - Which Linux command shows the default gateway?
ip route(thedefault via …line).- A host pings 8.8.8.8 but not www.cisco.com. What is wrong?
- Name resolution: the DNS server setting or the DNS server itself.
Labs
Try it live: IPv4 subnets, IPv6 and client settings on Windows, macOS and Linux
More topics in 1.0 Network Fundamentals
- 1.1 Explain what each kind of network component does
- 1.2 Describe common network topology designs
- 1.3 Compare cabling and physical interface types
- 1.4 Identify interface and cabling faults: collisions, errors, duplex or speed mismatch
- 1.5 Compare how TCP and UDP behave
- 1.6 Configure and verify IPv4 addresses and divide a network into subnets
- 1.7 Describe private IPv4 address space
- 1.8 Configure and verify IPv6 addresses and prefixes
- 1.12 Explain virtual machines, containers and VRFs
- 1.13 Describe how a switch forwards frames