netstat

1, display the routing table
$netstat -r
$route –n
$ip route show
$ ip addr show
2, display interface
$netstat -i
ifconfig for detailed interface information, root previledge might be needed
3, display connections
$netstat -ta
4. display listening server sockets
$netstat -l

ethtool example:

# sudo ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 1000baseT/Full
10000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: No
Advertised link modes: Not reported
Advertised pause frame use: No
Advertised auto-negotiation: No
Speed: 10000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: off
MDI-X: Unknown
Supports Wake-on: uag
Wake-on: d
Link detected: yes

nmap

ping
nmap -sp 192.178.1.*
tcp syn 1-1000 port number
nmap 192.168.1.1
tcp syn, protocol number, operation version, operation system
nmap -sS -p0 -sV -o 192.168.1.0-10
quick scanning
nmap -T5 192.168.1.0/24
tcp connect scan for only port 80
nmap -sT -p80 192.18.1.0/24
to use faked source ip address and reall src ip together
nmap -sS 192.178.1.1 -D 192.168.78.1 (faked src add)
scan only the first 100 ports instead of 1000 ports
nmap -F 192.168.17.0/24 -exclude 192.168.17.1
do ping first, if get response, then go to scap 1000 port
nmap -Pn 192.168.1.1
scap ipv6 address
nmap -6 ipv6 address
nmap -iflist
to scan the 20 most popular ports
nmap –top-ports 20 192.168.1.0/24
run nmap with script
nmap –script=default 192.168.1.24
nmap -script -help to find all script that can be used
enable all advanced/aggressive scan
nmap -A -T5 192.168.1.24