目的:想检测两台机器之间UDP端口是否被防火墙限制
使用工具: ping 和 snoop
系统: Solaris 10
# ping -U -s 10.254.249.17
PING 10.254.249.17: 56 data bytes
92 bytes from 10.254.249.17: udp_port=33434. time=26.1 ms
92 bytes from 10.254.249.17: udp_port=33435. time=26.0 ms
92 bytes from 10.254.249.17: udp_port=33436. time=26.0 ms
92 bytes from 10.254.249.17: udp_port=33437. time=26.1 ms
92 bytes from 10.254.249.17: udp_port=33438. time=25.9 ms
92 bytes from 10.254.249.17: udp_port=33439. time=26.1 ms
# snoop |grep UDP |grep 10.254.249.17
Using device /dev/eri (promiscuous mode)
hqnms -> 10.254.249.17 UDP D=33434 S=41233 LEN=64
10.254.249.17 -> hqnms ICMP Destination unreachable (UDP port 33434 unreachable)
hqnms -> 10.254.249.17 UDP D=33435 S=41233 LEN=64
10.254.249.17 -> hqnms ICMP Destination unreachable (UDP port 33435 unreachable)
hqnms -> 10.254.249.17 UDP D=33436 S=41233 LEN=64
10.254.249.17 -> hqnms ICMP Destination unreachable (UDP port 33436 unreachable)
hqnms -> 10.254.249.17 UDP D=33437 S=41233 LEN=64
10.254.249.17 -> hqnms ICMP Destination unreachable (UDP port 33437 unreachable)
hqnms -> 10.254.249.17 UDP D=33438 S=41233 LEN=64
10.254.249.17 -> hqnms ICMP Destination unreachable (UDP port 33438 unreachable)
hqnms -> 10.254.249.17 UDP D=33439 S=41233 LEN=64
10.254.249.17 -> hqnms ICMP Destination unreachable (UDP port 33439 unreachable)
Snoop 使用手册:
http://bbs.chinaunix.net/viewthread.php?tid=191238
Linux下抓包工具
Tcpdump 使用手册:
http://linux.chinaunix.net/bbs/thread-1047913-1-1.html