Network
20 articles, grouped by kind; the order follows the tracks.
Concepts 7
-
Network diagnostics
A ladder of connectivity checks — from the gateway to DNS and the destination port.
5 minping -c4mtr -rwctraceroute -T -
The veth pair and network namespaces
A veth pair is two virtual interfaces joined like a cable; it connects network namespaces inside one machine.
5 minip netnsip linkip -n -
Persistent networking with netplan
Persistent network configuration on Ubuntu — netplan YAML files, static addresses and DHCP, applying safely.
6 minnetplan generatenetplan trynetplan apply -
SSH keys and ssh-agent
Key pairs for passwordless login; sshd rejects ~/.ssh if it is writable by the group or by others.
5 minssh-keygen -tssh-copy-idssh-keygen -l -
VLANs and interface bonding
Logical networks over a cable and combining NICs into one interface; the bond mode must match the switch's config.
4 minip -brcatip -d -
DNS and name resolution
How a name becomes an IP — resolv.conf, systemd-resolved, /etc/hosts, dig.
5 mingetent hostsresolvectl statusdig -
HTTP — requests, responses, status codes and headers
HTTP is the web protocol: a client sends a method, path and headers; the server replies with a code, headers, body.
11 mincurl -icurl -Icurl -v
Commands 13
-
ping — check whether packets reach a host
The ping command sends ICMP echo requests to a host and prints replies, latency and loss — the first network check.
6 minping -cpingip netns -
ip — addresses, interfaces and routes
Manage interfaces, addresses and routes (iproute2) — the replacement for ifconfig/route.
6 minip -brip rip route -
ss — sockets and ports
Shows who is listening on ports and which connections are open; a netstat replacement, faster with many connections.
4 minss -tlnpss -tnpss -tulnp -
ssh, scp — connecting and copying over SSH
A client for logging in and copying files over SSH; host aliases in ~/.ssh/config remove repeated connection parameters.
3 minsshssh -pscp file -
ssh-keyscan — collecting host keys
Pre-populate known_hosts with server keys — skip the interactive "yes" on first ssh.
5 minssh-keyscanssh-keyscan -Hssh-keyscan -t -
nmap: which ports are visible from outside
A port scanner: shows which ports of a machine are open, closed or filtered, as another machine sees them.
8 minnmapnmap -pnmap -p- -
curl — HTTP requests from the console
curl sends HTTP and HTTPS requests from the console: status code, headers, the whole exchange, certificate checks.
7 mincurl -icurl -Icurl -v -
wget — downloading files over the network
Downloads files with resume and recursion; -r without -np and -l has no brakes and can mirror a whole site.
4 minwgetwget -Owget -c -
tcpdump — capturing and analyzing network traffic
Captures packets to diagnose "is traffic even arriving"; without -n it resolves every IP through DNS and slows down.
4 mintcpdump -ni -
ethtool — network card settings
Link speed and duplex, error statistics, cable type — NIC diagnostics.
4 minethtoolethtool -Sethtool -i -
nc — checking ports and transferring data
Checking whether ports are reachable, simple data transfer over TCP/UDP.
4 minnc -zvw3nc -zvunc -zv -
whois — domain and IP data
Shows a domain's or IP's owner and abuse contact; for domains, some fields are hidden by the registrar's privacy shield.
4 minwhoiswhois -h -
conntrack — connection tracking
The kernel's connection table — what NAT/firewall see, overflow, debugging.
4 minconntrack -Lconntrack -Econntrack -S
Nothing found. Try a shorter query.