网络分析工具Wireshark使用教程(4)

发表于:2012-12-20来源:博客园作者:Observer点击数: 标签:Wireshark
Protocol(协议): 可能的值: ether, fddi, ip, arp, rarp, decnet, lat, sca, moprc, mopdl, tcp and udp. 如果没有特别指明是什么协议,则默认使用所有支持的协议。 Direction(方向
Protocol(协议):

  可能的值: ether, fddi, ip, arp, rarp, decnet, lat, sca, moprc, mopdl, tcp and udp.

  如果没有特别指明是什么协议,则默认使用所有支持的协议。

Direction(方向):

  可能的值: src, dst, src and dst, src or dst

  如果没有特别指明来源或目的地,则默认使用 "src or dst" 作为关键字。

  例如,"host 10.2.2.2"与"src or dst host 10.2.2.2"是一样的。

Host(s):

  可能的值: net, port, host, portrange.

  如果没有指定此值,则默认使用"host"关键字。

  例如,"src 10.1.1.1"与"src host 10.1.1.1"相同。

Logical Operations(逻辑运算):

  可能的值:not, and, or.

  否("not")具有最高的优先级。或("or")和与("and")具有相同的优先级,运算时从左至右进行。

  例如,

  "not tcp port 3128 and tcp port 23"与"(not tcp port 3128) and tcp port 23"相同。

  "not tcp port 3128 and tcp port 23"与"not (tcp port 3128 and tcp port 23)"不同。

  例子:

tcp dst port 3128

  显示目的TCP端口为3128的封包。

ip src host 10.1.1.1

  显示来源IP地址为10.1.1.1的封包。

host 10.1.2.3

  显示目的或来源IP地址为10.1.2.3的封包。

src portrange 2000-2500

  显示来源为UDP或TCP,并且端口号在2000至2500范围内的封包。

not imcp

  显示除了icmp以外的所有封包。(icmp通常被ping工具使用)

src host 10.7.2.12 and not dst net 10.200.0.0/16

  显示来源IP地址为10.7.2.12,但目的地不是10.200.0.0/16的封包。

(src host 10.4.1.12 or src net 10.6.0.0/16) and tcp dst portrange 200-10000 and dst net 10.0.0.0/8

  显示来源IP为10.4.1.12或者来源网络为10.6.0.0/16,目的地TCP端口号在200至10000之间,并且目的位于网络10.0.0.0/8内的所有封包。

  注意事项:

  当使用关键字作为值时,需使用反斜杠"\"。

  "ether proto \ip" (与关键字"ip"相同).

  这样写将会以IP协议作为目标。

  "ip proto \icmp" (与关键字"icmp"相同).

  这样写将会以ping工具常用的icmp作为目标。

  可以在"ip"或"ether"后面使用"multicast"及"broadcast"关键字。

原文转自:http://www.ltesting.net