Sub topic 10
Practicing networking tasks
This chapter assumes you have a working Windows guest and a Linux guest in your virtual machine lab, and that you know what an IP address, a gateway, and DNS are. You will run a fixed sequence of checks and learn to read the results. This builds the evidence habit that the A+ exams test.
Work from the bottom up
A network fault can sit in the machine, the local network, name lookup, or the wider path. Test each layer in order. The first check that fails tells you where to look.
Checking a Windows guest
Open a command prompt in the Windows guest and run these in order. Replace the placeholder with your real gateway address from the first command.
ipconfig /all
ping 127.0.0.1
ping <default-gateway-address>
nslookup example.com
tracert example.com| Command | What it proves | A failure suggests |
|---|---|---|
| `ipconfig /all` | The adapter has an address, mask, gateway, and DNS server | Wrong or missing settings |
| `ping 127.0.0.1` | The local TCP/IP stack works | A damaged stack or driver |
| `ping` the gateway | The machine reaches its local network | Cabling, virtual adapter, or gateway fault |
| `nslookup` | Names resolve to addresses | A DNS problem |
| `tracert` | Where the path to a remote host breaks | A fault at the hop where replies stop |
An address starting with 169.254 means the guest did not get an address from DHCP and assigned itself one. Check that the guest is attached to the right virtual network.
Checking a Linux guest
The Linux commands answer the same questions.
ip addr show
ip route show
ping -c 4 <default-gateway-address>
resolvectl statusThe ip route show output includes a line beginning default via. That line is the gateway. resolvectl status lists the DNS servers that systemd-resolved is using.
Practice with deliberate faults
Reading healthy output is easy. Learn the failure patterns by breaking things on purpose.
- Change the virtual adapter's network mode, for example from NAT to an internal network. The gateway ping should fail.
- Set a wrong DNS server address. Pinging an IP address such as 8.8.8.8 still works, but
nslookup example.comfails. - Set a static address outside the gateway's subnet. Notice which checks fail first.
- Restore the settings and confirm that every check passes again.
Exercise
In a guest, ping 8.8.8.8 succeeds but ping example.com fails. Which layer is the likely fault, and which command do you run next?
Show answer
The fault is likely in DNS, because the network path works but names do not resolve. Run nslookup example.com (or resolvectl status on Linux) and check which DNS server the guest is using.