Linux network diagnostics

Status of network interfaces

$ ifconfig

{if you don't see an "inet addr" listed, you're not connected}

$ ip ro

nicer output for sysadmin

Programs talking on what ports to what hosts

$ netstat -ap

Often useful to pipe into grep to look for specific service or

Routing and gateways

$ route -n

Route to another host

$ traceroute host.domain

Listen to TCP packets on interface 'eth0'

$ tcpdump -i eth0 ether proto 0x8863 '||' ether proto 0x8864

Status of wireless network interfaces

$ iwconfig

Scan for wireless access points over interface 'wlan0'

$ iwlist wlan0 scanning