Sub topic 1
Testing Connectivity with ping, traceroute, and ipconfig
Prerequisites
Assume you know what an IP address is, can open a command prompt or terminal, and understand that routers connect different networks.
Addresses, gateways, and DNS: what you are testing
A network interface is the connection between your computer and a network. It has an IP address, which identifies the interface on its local network. A subnet mask describes which part of that address represents the local network.
The default gateway is usually a router on the local network. Your computer sends traffic for other networks to this router. A DNS server translates names such as example.com into IP addresses.
ICMP: the protocol behind ping and traceroute
ICMP, or Internet Control Message Protocol, carries diagnostic and error messages for IP networks. ping sends an ICMP Echo Request and waits for an Echo Reply. The round-trip time measures how long the request and reply took.
traceroute uses packets with deliberately small TTL values. TTL, or time to live, limits how many routers can forward a packet. Each router decreases the TTL. When it reaches zero, the router sends an ICMP Time Exceeded message. Repeating this process reveals each hop.
Checking your configuration with ipconfig
On Windows, inspect the address, subnet mask, gateway, and DNS servers with:
ipconfig
ipconfig /allThe shorter command shows the main address settings. /all adds details such as the MAC address, DHCP status, and DNS servers. Check that the intended adapter has an address and a gateway. An address beginning with 169.254 often means the computer did not receive a DHCP configuration.
Testing reachability with ping
Use a layered sequence so that each test checks a different part of the path:
ping 127.0.0.1
ping 192.168.1.1
ping 8.8.8.8
ping example.comThe first test checks the local TCP/IP stack. The second tests the gateway; replace the example address with your actual gateway. The third tests remote IP connectivity without DNS. The last tests both DNS resolution and connectivity to the resolved address.
A reply includes latency and a TTL value. A timeout means no reply arrived, but it does not prove the destination is down. A destination-unreachable message identifies a device that could not forward the packet.
Exercise
If pinging 8.8.8.8 works but pinging example.com fails, which service should you investigate first?
Show answer
Investigate DNS. IP connectivity works, but the name may not be resolving.