Checking ports and sockets
http://www.cyberciti.biz/tips/linux-investigate-sockets-network-connections.html
Check if you have a duplicate IP on your machine
arp-scan -I eth0 -l | grep -i dup
Check your IP from command line
curl ifconfig.me
Check what ports are listening on a server
netsat -ntpl
ss -l
Listening on the wire
Tcpdump eg port 80 and ip address
tcpdump -ni eth0 'dst 192.168.1.5 and tcp and port http'
Check for a virus on a network
tcpdump -tnli eth0 not port ssh and not port smtp and not domain and not http and not https and not imap
Other Tools
Iftop
wireshark
ntop