TCP/IP connectivity troubleshooting
Technical guide with a layered methodology to isolate TCP/IP connectivity failures.
Also available in Portuguese.Read in Portuguese
1. Introduction
Connectivity troubleshooting becomes more reliable when tests follow a defined order, from the local interface to the application.
2. Diagnostic flow
- Physical link and local interface
- Addressing and default gateway
- Route and intermediate hops
- Ports, firewall and application
- Name resolution (DNS)
3. Basic connectivity tests
bash
ip addr
ip route
ping -c 4 192.168.1.1
ping -c 4 8.8.8.8
4. Checking the route
bash
traceroute 8.8.8.8
traceroute example.com
5. Checking ports and services
bash
# Port 80 test (HTTP)
nc -zv 192.168.1.10 80
# Port 443 test (HTTPS)
nc -zv 192.168.1.10 443
Note
Always verify whether the test originates from the expected network segment and whether firewall policies are affecting the path.
Attention
Ping and traceroute can be affected by blocked ICMP. Validate with ports, logs and the expected application path.
6. Checking DNS
Separate name-resolution tests from raw IP reachability.
bash
dig example.com
nslookup example.com
7. Common problems and solutions
| Symptom | Probable domain | Next check |
|---|---|---|
| No link / interface down | Physical / local | Cable, optics, switchport |
| Gateway unreachable | L2 / VLAN / ARP | Neighbor table and VLAN |
| IP works, hostname fails | DNS | Resolver, record and cache |
| Ping works, TCP fails | ACL / Firewall / NAT | Policy, listener and return path |
8. Good practices
- Document the symptom and scope before changing configuration.
- Collect evidence before and after the intervention.
- Validate return path and security policy, not only the forward path.