Networking Deep Dive›Host & Wire · Cheat sheet & self-check
Learning Hub / Kubernetes & Platform / Networking Deep Dive

Host & Wire · wrap-up

Cheat sheet & self-check

Every command from this section on one page.

01 · Ethernet, ARP & MTU

Link layer

ip -br linkInterfaces, state and MAC addresses
ip neighARP/neighbour table (IP → MAC)
sudo tcpdump -eni eth0 arpWatch ARP requests and replies, with MACs
cat /proc/net/bonding/bond0Bond mode and member link status
ip -d link show eth0.100VLAN details (id, parent)

MTU

ip link show eth0 | grep mtuInterface MTU
ping -M do -s 1472 10.0.0.20Test a full 1500-byte packet without fragmentation
tracepath 10.0.0.20Discover the path MTU

02 · IP routing, NAT & conntrack

Routing

ip routeMain routing table
ip route get 10.96.0.10Which route and source address a destination uses
ip rulePolicy routing rules (which table to consult)
ip route show table all | headRoutes in every table

NAT & conntrack

sudo iptables -t nat -S | head -40NAT rules (iptables-based kube-proxy)
sudo nft list ruleset | lessAll nftables rules
sudo conntrack -L | headTracked connections (conntrack-tools)
sudo conntrack -SPer-CPU stats, including drops and insert failures
sysctl net.netfilter.nf_conntrack_count net.netfilter.nf_conntrack_maxCurrent vs maximum tracked connections

03 · TCP: state, flags & congestion

See connections

ss -tan state established | wc -lHow many established connections
ss -tan | awk 'NR>1 {print $1}' | sort | uniq -cConnections per state
ss -ti dst 10.0.5.20Per-connection RTT, cwnd, retransmits
nstat -az | grep -E 'TcpRetransSegs|ListenOverflows|ListenDrops'Kernel TCP counters

Capture

sudo tcpdump -ni any 'tcp port 443 and (tcp[tcpflags] & (tcp-syn|tcp-rst) != 0)'Only SYNs and RSTs
sysctl net.ipv4.tcp_congestion_controlCongestion control algorithm (cubic, bbr…)

04 · Your host's network model

Build it by hand

sudo ip netns add pod1Create a network namespace (a 'pod')
sudo ip link add veth-pod1 type veth peer name veth-host1A virtual cable with two ends
sudo ip link set veth-pod1 netns pod1Plug one end into the namespace
sudo ip link add br0 type bridge && sudo ip link set veth-host1 master br0Plug the other end into a bridge
sudo ip netns exec pod1 ip addrRun a command inside the namespace

Inspect a real node

ip -br link | grep -E 'veth|cali|lxc|cni'Host-side ends of pod veth pairs (names depend on the CNI)
sudo nsenter -t <pid> -n ip routeA pod's routes, from the node
ls /etc/cni/net.d/ /opt/cni/bin/CNI config and plugin binaries