Skip to content

Network Configuration and Troubleshooting

First PublishedByAtif Alam

This page covers host networking on Linux: interfaces, addresses, routes, DNS resolution, listening sockets, and basic reachability probes. It pairs with Packet capture and System calls.

Terminal window
ip link show
ip addr show
ip -br addr

UP/DOWN, MTU, and L2 state (carrier) explain “cable unplugged” or veth issues in Docker/Kubernetes nodes.

Terminal window
ip route show
ip route get 203.0.113.1
  • Default gateway — Missing or wrong → no off-subnet reachability.
  • Policy routingip rule list for multi-homing or VRF-style setups.
  • Asymmetric routing — Return path differs from outbound; TCP can break with stateful firewalls on only one path.

Correlate with cloud VPC route tables in AWS Networking.

  • /etc/resolv.confnameserver and search domains (often managed by systemd-resolved, NetworkManager, or cloud-init).
  • resolvectl status (systemd-resolved) — See which stub and upstream resolvers are used.
  • VPC — Many EC2 instances use the AmazonProvidedDNS address at the VPC base + 2.

Misconfiguration shows up as works with IP but fails with hostname.

Terminal window
ss -tlnp # TCP listening, numeric, processes
ss -ulnp # UDP
ss -tp state established

If the app should listen but ss shows nothing, check bind address (127.0.0.1 vs 0.0.0.0), namespace (container vs host), and permissions.

Terminal window
ping -c 3 203.0.113.1
traceroute 203.0.113.1
mtr -rwzbc 100 203.0.113.1

ICMP may be blocked while TCP:443 works — a failed ping is not proof the host is down. Use curl, nc, or tcpdump for TCP/UDP path checks.

StackNotes
nftablesModern default on many distros; iptables-nft bridge.
iptablesLegacy chains INPUT/FORWARD/OUTPUT.
firewalldZone-based; wraps nftables/iptables.
ufwSimple frontend on Ubuntu.

Cloud security groups still apply outside the instance — debug both host firewall and SG.

Terminal window
ip link show eth0
ping -M do -s 1472 -c 1 203.0.113.1 # DF ping to probe PMTU ideas

VPN and overlay networks often need lower MTU or MSS clamping. Symptoms: small requests work, large transfers hang.

bond / team interfaces aggregate links for redundancy or throughput. ip link shows master / slave relationships. Cloud VMs often use single ENI; bonding appears more on bare metal.

  • Host — Check bridge / veth with ip link and iptables/nft FORWARD rules.
  • Namespacensenter -n -t <pid> or run tools inside the pod network namespace for accurate ss/ip.