Get an ip address for en0:
ipconfig getifaddr en0
Same thing, but setting and echoing a variable:
View the subnet mask of en0:
ipconfig getoption en0 subnet_mask
View the dns server for en0:
ipconfig getoption en0 domain_name_server
Get information about how en0 got its DHCP on:
ipconfig getpacket en1
View some network info:
ifconfig en0
Set en0 to have an IP address of 10.10.10.10 and a subnet mask of 255.255.255.0:
ifconfig en0 inet 10.10.10.10 netmask 255.255.255.0
Put a delay in your pings:
ping -i 5 192.168.210.1
Ping the hostname 5 times and then stop the ping:
ping -c 5 google.com
Flood ping the host:
ping -f localhost
Set the packet size during your ping:
ping -s 100 google.com
Customize the source IP during your ping:
ping -S 10.10.10.11 google.com
View disk performance:
iostat -d disk0
Trace the path packets go through:
traceroute google.com
Trace the routes without looking up names:
traceroute -n google.com
Trace a route in debug mode:
traceroute -d google.com
Flush the dns cache:
dscacheutil -flushcache
Clear your arp cache:
arp -ad