fvctl命令的解释?

时间:2015-03-13 10:01:06

标签: command openflow

我真的需要你的帮助来理解这个命令中的 dl_type = 0x0800 nw_proto = 6 意味着什么:

$ fvctl -f / dev / null add-flowspace dpid1-port4-video-src 1 100 in_port = 4,dl_type = 0x0800,nw_proto = 6,tp_src = 9999 video = 7

谢谢!

1 个答案:

答案 0 :(得分:2)

这些约定与Open vSwitch ovs-ofctl工具相同,该联机帮助页包含您要查找的所有信息。

可以在here找到该联机帮助页的纯文本版本。

提到:

The following shorthand notations are also available:
(...)
tcp    Same as dl_type=0x0800,nw_proto=6.
(...)

完整描述有更多信息:

dl_type=ethertype
          Matches Ethernet protocol type ethertype, which is specified  as
          an  integer between 0 and 65535, inclusive, either in decimal or
          as a hexadecimal number prefixed by 0x (e.g. 0x0806 to match ARP
          packets).

nw_proto=proto
ip_proto=proto
          When ip or dl_type=0x0800 is specified, matches IP protocol type
          proto, which is specified as a decimal number between 0 and 255,
          inclusive (e.g. 1 to match ICMP packets or 6 to match TCP  pack‐
          ets).

          When  ipv6  or  dl_type=0x86dd is specified, matches IPv6 header
          type proto, which is specified as a decimal number between 0 and
          255,  inclusive  (e.g.  58 to match ICMPv6 packets or 6 to match
          TCP).  The header type is the terminal header  as  described  in
          the DESIGN document.

          When  arp  or  dl_type=0x0806  is specified, matches the lower 8
          bits of the ARP  opcode.   ARP  opcodes  greater  than  255  are
          treated as 0.

          When  rarp  or  dl_type=0x8035 is specified, matches the lower 8
          bits of the ARP  opcode.   ARP  opcodes  greater  than  255  are
          treated as 0.

          When  dl_type is wildcarded or set to a value other than 0x0800,
          0x0806, 0x8035 or 0x86dd, the value of nw_proto is ignored  (see
          Flow Syntax above).