Use it when a host cannot reach the network or a specific service.
Network Connectivity
Network connectivity problems are failures to reach another host or service: link, address, route, gateway, firewall, DNS or the remote service.
1. ip -br link / ip -br addr — link up, address present?
2. ip route get <dest> — route and source.
3. ping <gateway> then ping <dest-ip>.
4. Port: nc -vz <host> <port> or curl -v.
5. Local firewall: nft list ruleset / firewall-cmd --list-all.
link → address → route/gateway → remote host → port open → service
For Linux Troubleshooting → Network Connectivity, continue with the first unproven Topic check: Pin namespace, source address, destination, protocol/port and expected path. If that boundary is healthy, advance to the adjacent check: Verify link/carrier, addresses, neighbor resolution and kernel route/rule selection for that source/destination. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
ping -c3 <gw>Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
Healthy evidence: the exact flow follows the intended namespace/interface/route, bidirectional packet evidence reaches the application boundary and the original transaction succeeds.
Step 2 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Pin namespace, source address, destination, protocol/port and expected path.
- Verify link/carrier, addresses, neighbor resolution and kernel route/rule selection for that source/destination.
- Use counters and packet capture to locate transmit, reply, MTU or filtering boundary.
- After targeted change, repeat the original application flow and verify both directions plus relevant regressions.
Step 3 Commands Verify boundary
ip -br addr ; ip route
ping -c3 <gw>
curl -v http://host:port
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: ping is the only test, namespace/source selection is ignored, route presence is treated as forwarding evidence, or captures are taken on the wrong interface/time window.
Step 5 Common mistakes Narrow the fault
- Skipping the default gateway check.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Work up the layers: link → address → gateway → route → remote IP → port → name. Test the port, not just ping — ICMP may be blocked while the service works.
journalctl -b -p err— errors this bootsystemctl --failed— failed unitsdf -h; df -i— space and inodesss -tulpn— listening socketsdmesg -T | tail— recent kernel messages
ReferenceWhat it is1 section · depth on demand
Core model
Reproduce the exact flow with source/destination/protocol/port and namespace. Walk kernel-selected interface/source/route, neighbor state, packet counters/capture and remote response rather than using ping as a universal test.
ReferenceImportant terms & boundaries4 sections · depth on demand
What this shows and what it does not
Network Connectivity owns host-side Linux packet-path isolation; Linux Networking, Firewall/Security and application protocol branches own specialist configuration.
In depth
Ask the kernel which route it uses
$ ip route get 10.50.1.10
10.50.1.10 via 10.0.10.1 dev eth0 src 10.0.10.21 uid 1000
cache
$ ip route get 10.50.1.10 from 10.0.20.21 iif eth1 # policy routing / reverse path check
The ip-route manual describes ip route get as returning a single route to a destination exactly as the kernel sees it — unlike ip route show, which only lists the table. It accounts for policy rules, VRFs and source addresses.
Bottom-up check sequence
| Layer | Command | Healthy result |
|---|---|---|
| Link | ip -br link, ethtool eth0 \| grep -E 'Speed\|Link detected' | UP, link detected |
| Address | ip -br addr | Expected IP/prefix |
| Neighbour | ip neigh show 10.0.10.1 | REACHABLE/STALE with a MAC, not FAILED |
| Route | ip route get <dst> | Correct gateway and source |
| Name | getent hosts app01 | Resolves (uses NSS like applications do) |
| Port | nc -vz app01 443 or curl -v https://app01 | Connection established |
| Path | tracepath -n app01 / mtr -n app01 | Where it stops; PMTU |
Local firewall and sockets
ss -ltnp | grep :443 # is the service listening, on which address?
nft list ruleset | less # local filtering
sysctl net.ipv4.conf.all.rp_filter # strict reverse-path filtering drops asymmetric traffic
A service bound to 127.0.0.1:8080 is unreachable from outside even with an open firewall.
Capture to settle it
tcpdump -ni eth0 host 10.50.1.10 and port 443
| Seen | Meaning |
|---|---|
| SYN out, nothing back | Dropped on the path or remote firewall |
| SYN out, RST back | Port closed remotely |
| Nothing leaves | Local routing/firewall — or the app never tried |
Multiple interfaces
With two NICs in different networks, replies can leave through the default route instead of the interface they arrived on. Use policy routing (ip rule add from 10.0.20.21 table 20) or a correct gateway per network.
*The route selection record and packet-capture commands illustrate connectivity checks, not observations from an actual network.*
How it works at runtime
Network Connectivity is part of Linux Troubleshooting → Network Connectivity. Network Connectivity isolates Linux packet-path failures from namespace/interface and link through addressing, neighbor resolution, routing/policy, MTU/firewall and remote service reachability.
Topic-specific state model. Network Connectivity isolates Linux packet-path failures from namespace/interface and link through addressing, neighbor resolution, routing/policy, MTU/firewall and remote service reachability.
Interpretation rule. - Interface UP ≠ carrier, address, route or service path is healthy.
- Ping success ≠ TCP/UDP application flow is permitted or listening.
- Default route exists ≠ policy route/source selection is correct.
- Local connect failure ≠ remote host is necessarily down.
Method
Network connectivity checks on Linux:
ip -br link; ip -br addr
ip route get 10.20.30.40 # chosen route and source address
ping -c3 <gateway>
ip neigh show <gateway>
ss -tulpn # listening sockets
nc -zv 10.20.30.40 443
tracepath 10.20.30.40 # path + MTU
nft list ruleset | less
tcpdump -ni any host 10.20.30.40
Work outward: link → address → route → neighbour (ARP) → gateway → remote host → port → application. ip route get and tcpdump on both ends settle most disputes about where packets disappear.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. Network Connectivity owns host-side Linux packet-path isolation; Linux Networking, Firewall/Security and application protocol branches own specialist configuration.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Linux Troubleshooting → Network Connectivity. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.kernel.org/ · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Network Connectivity operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for Network Connectivity.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | Network Connectivity isolates Linux packet-path failures from namespace/interface and link through addressing, neighbor resolution, routing/policy, MTU/firewall and remote service reachability. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin symptom + exact time + host/boot/user → define scope + expected baseline → preserve original failing test → collect targeted kernel/process/service/storage/network/security/log evidence → identify first divergent boundary → make one minimal reversible change → repeat original test → verify adjacent regressions and retain before/after evidence. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | symptom + exact time → scope + baseline → reproduce original failure → collect first-party evidence → identify first failed boundary → minimal controlled change → repeat original test → regression/posture check | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | Network Connectivity troubleshooting is complete only when evidence localizes the first failed Linux boundary and the original failing workload passes after the smallest justified change; intermediate command success is not final proof. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux troubleshooting evidence can establish this proof path: symptom + exact time → scope + baseline → reproduce original failure → collect first-party evidence → identify first failed boundary → minimal controlled change → repeat original test → regression/posture check | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove behavior outside the captured host, boot, process/user, dependency, time or workload scope. Network Connectivity troubleshooting is complete only when evidence localizes the first failed Linux boundary and the original failing workload passes after the smallest justified change; intermediate command success is not final proof. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven boundary: reproduce the exact original failure, collect the owning subsystem evidence at the same time, change only the proven cause or prerequisite, then repeat the original workload and regression checks. | Continue to the next unresolved boundary while preserving the original test condition. |
Network Connectivity · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | Network Connectivity |
|---|---|
| Topic path | Linux Troubleshooting → Network Connectivity |
| Runtime state | Network Connectivity isolates Linux packet-path failures from namespace/interface and link through addressing, neighbor resolution, routing/policy, MTU/firewall and remote service reachability. |
| Fast checks | - Pin namespace, source address, destination, protocol/port and expected path. - Verify link/carrier, addresses, neighbor resolution and kernel route/rule selection for that source/destination. - Use counters and packet capture to locate transmit, reply, MTU or filtering boundary. - After targeted change, repeat the original application flow and verify both directions plus relevant regressions. |
| Verification chain | symptom + exact time → scope + baseline → reproduce original failure → collect first-party evidence → identify first failed boundary → minimal controlled change → repeat original test → regression/posture check Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary. |
| Failure boundary | Network Connectivity troubleshooting is complete only when evidence localizes the first failed Linux boundary and the original failing workload passes after the smallest justified change; intermediate command success is not final proof. Boundary chain: process/socket namespace → source/rule/FIB → neighbor → netfilter/eBPF/qdisc → virtual/physical device → peer → return → application. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |