Mikey’s Linux Field NotesAll topics

GUIDE 07 / INFRASTRUCTURE

Networking & DNS

Inspect addresses, routes, neighbors, listening sockets, and name resolution.

4 quick lessons · Examples to adapt to your server
In this guide
Identify the network settingsFollow the pathRead DNS recordsInspect connections and NAT

Commands use class paths and example filenames. Replace placeholders and inspect the target before making changes.

01

Identify the network settings

An address such as 192.168.64.3/24 contains an IP address and prefix length. A default route handles destinations without a more specific route. Static settings come from saved administrator configuration rather than a DHCP lease.

COMMANDS & EXAMPLES
ip -br address
ip link
ip route
cat /etc/resolv.conf
nmcli device status
Field note

link/ether shows the MAC address. A link can be up while IPv4 has no address. Check the NetworkManager profile before assuming a service failure.

02

Follow the path

A same-subnet IPv4 destination is normally reached directly; other destinations use a router. ARP resolves local IPv4 neighbors to MAC addresses and is commonly placed at the Layer 2/3 boundary.

COMMANDS & EXAMPLES
ip route get 8.8.8.8
ip neighbor
ping -c 3 8.8.8.8
traceroute -n 8.8.8.8
Field note

ICMP carries diagnostics and errors; ping uses echo request/reply. Traceroute stars indicate missing probe replies, not necessarily a broken path. !X denotes an administratively prohibited response.

03

Read DNS records

A records map names to IPv4 addresses, AAAA to IPv6, CNAME to an alias target, MX to mail exchangers, NS to name servers, and PTR to reverse names.

COMMANDS & EXAMPLES
dig ulc-119.ulcert.uw.edu A
dig -x 140.142.159.119 +short
dig uw.edu MX
dig ulcert.uw.edu NS +short
dig +noall +answer www.washington.edu
Field note

A decreasing TTL usually reflects cached data. Several A records can support distribution and redundancy. A resolver may allow recursion for campus clients while refusing off-campus clients; REFUSED is an explicit response, not a timeout.

04

Inspect connections and NAT

ss displays socket endpoints. In SSH_CONNECTION, the fields are client address, client port, server address, and server port. NAT can make multiple devices appear under the same public address.

COMMANDS & EXAMPLES
ss -tln
ss -tn '( sport = :22 )'
printf '%s\n' "$SSH_CONNECTION"
curl -I --max-time 5 http://localhost
Field note

A listening socket, a firewall allowance, and external reachability are distinct checks. Use a second machine to test whether a service can actually be reached from outside.