]> git.proxmox.com Git - mirror_ovs.git/blame - ofproto/ofproto-unixctl.man
Add support for connection tracking.
[mirror_ovs.git] / ofproto / ofproto-unixctl.man
CommitLineData
7aa697dd
BP
1.SS "OFPROTO COMMANDS"
2These commands manage the core OpenFlow switch implementation (called
3\fBofproto\fR).
876b0e1c 4.
7aa697dd
BP
5.IP "\fBofproto/list\fR"
6Lists the names of the running ofproto instances. These are the names
7that may be used on \fBofproto/trace\fR.
876b0e1c 8.
aee0979b
BP
9.IP "\fBofproto/trace\fR [\fIdpname\fR] \fIodp_flow\fR [\fB\-generate \fR| \fIpacket\fR]"
10.IQ "\fBofproto/trace\fR \fIbridge\fR \fIbr_flow\fR [\fB\-generate \fR| \fIpacket\fR]"
11.IQ "\fBofproto/trace\-packet\-out\fR [\fB\-consistent\fR] [\fIdpname\fR] \fIodp_flow\fR [\fB\-generate \fR| \fIpacket\fR] \fIactions\fR"
12.IQ "\fBofproto/trace\-packet\-out\fR [\fB\-consistent\fR] \fIbridge\fR \fIbr_flow\fR [\fB\-generate \fR| \fIpacket\fR] \fIactions\fR"
50aa28fd 13Traces the path of an imaginary packet through \fIswitch\fR and
aee0979b
BP
14reports the path that it took. The initial treatment of the packet
15varies based on the command:
16.
17.RS
18.IP \(bu
19\fBofproto/trace\fR looks the packet up in the OpenFlow flow table, as
20if the packet had arrived on an OpenFlow port.
21.
22.IP \(bu
23\fBofproto/trace\-packet\-out\fR applies the specified OpenFlow
24\fIactions\fR, as if the packet, flow, and actions had been specified
25in an OpenFlow ``packet-out'' request.
26.RE
27.
28.IP
29The packet's headers (e.g. source and destination) and metadata
30(e.g. input port), together called its ``flow,'' are usually all that
31matter for the purpose of tracing a packet. You can specify the flow
32in the following ways:
50aa28fd 33.
7aa697dd 34.RS
50aa28fd
AW
35.IP "\fIdpname\fR \fIodp_flow\fR"
36\fIodp_flow\fR is a flow in the form printed by \fBovs\-dpctl\fR(8)'s
37\fBdump\-flows\fR command. If all of your bridges have the same type,
38which is the common case, then you can omit \fIdpname\fR, but if you
39have bridges of different types (say, both \fBovs-netdev\fR and
40\fBovs-system\fR), then you need to specify a \fIdpname\fR to disambiguate.
41.
42.IP "\fIbridge\fR \fIbr_flow\fR"
43\fIbr_flow\fR is a flow in the form similar to that accepted by
44\fBovs\-ofctl\fR(8)'s \fBadd\-flow\fR command. (This is not an
45OpenFlow flow: besides other differences, it never contains
46wildcards.) \fIbridge\fR names of the bridge through which
47\fIbr_flow\fR should be traced.
dc29f566 48.RE
50aa28fd 49.
876b0e1c 50.IP
50aa28fd
AW
51Most commonly, one specifies only a flow, using one of the forms
52above, but sometimes one might need to specify an actual packet
53instead of just a flow:
54.
8b3b8dd1 55.RS
50aa28fd
AW
56.IP "Side effects."
57Some actions have side effects. For example, the \fBnormal\fR action
58can update the MAC learning table, and the \fBlearn\fR action can
aee0979b 59change OpenFlow tables. The trace commands only perform side
50aa28fd
AW
60effects when a packet is specified. If you want side effects to take
61place, then you must supply a packet.
62.
8b3b8dd1 63.IP
50aa28fd 64(Output actions are obviously side effects too, but
aee0979b 65the trace commands never execute them, even when one specifies a
50aa28fd 66packet.)
876b0e1c 67.
50aa28fd
AW
68.IP "Incomplete information."
69Most of the time, Open vSwitch can figure out everything about the
70path of a packet using just the flow, but in some special
71circumstances it needs to look at parts of the packet that are not
72included in the flow. When this is the case, and you do not supply a
aee0979b 73packet, then a trace command will tell you it needs a packet.
876b0e1c 74.RE
50aa28fd 75.
876b0e1c 76.IP
aee0979b
BP
77If you wish to include a packet as part of a trace operation, there
78are two ways to do it:
50aa28fd
AW
79.
80.RS
81.IP \fB\-generate\fR
82This option, added to one of the ways to specify a flow already
83described, causes Open vSwitch to internally generate a packet with
84the flow described and then to use that packet. If your goal is to
85execute side effects, then \fB\-generate\fR is the easiest way to do
86it, but \fB\-generate\fR is not a good way to fill in incomplete
87information, because it generates packets based on only the flow
88information, which means that the packets really do not have any more
89information than the flow.
90.
91.IP \fIpacket\fR
92This form supplies an explicit \fIpacket\fR as a sequence of hex
93digits. An Ethernet frame is at least 14 bytes long, so there must be
94at least 28 hex digits. Obviously, it is inconvenient to type in the
95hex digits by hand, so the \fBovs\-pcap\fR(1) and
96\fBovs\-tcpundump\fR(1) utilities provide easier ways.
876b0e1c 97.IP
50aa28fd
AW
98With this form, packet headers are extracted directly from
99\fIpacket\fR, so the \fIodp_flow\fR or \fIbr_flow\fR should specify
100only metadata. The metadata can be:
101.RS
102.IP \fIskb_priority\fR
103Packet QoS priority.
1362e248
JG
104.IP \fIpkt_mark\fR
105Mark of the packet.
07659514
JS
106.IP \fIct_state\fR
107Connection state of the packet.
108.IP \fIct_zone\fR
109Connection tracking zone for packet.
50aa28fd
AW
110.IP \fItun_id\fR
111The tunnel ID on which the packet arrived.
112.IP \fIin_port\fR
113The port on which the packet arrived.
114.RE
aee0979b 115.RE
50aa28fd 116.
aee0979b 117.IP
50aa28fd
AW
118The in_port value is kernel datapath port number for the first format
119and OpenFlow port number for the second format. The numbering of these
120two types of port usually differs and there is no relationship.
aee0979b
BP
121.
122.IP
123\fBofproto\-trace\-packet\-out\fR accepts an additional
124\fB\-consistent\fR option. With this option specified, the command
125rejects \fIactions\fR that are inconsistent with the specified packet.
126(An example of an inconsistency is attempting to strip the VLAN tag
127from a packet that does not have a VLAN tag.) Open vSwitch ignores
128most forms of inconsistency in OpenFlow 1.0 and rejects
129inconsistencies in later versions of OpenFlow. The option is
130necessary because the command does not ordinarily imply a particular
131OpenFlow version. One exception is that, when \fIactions\fR includes
132an action that only OpenFlow 1.1 and later supports (such as
133\fBpush_vlan\fR), \fB\-consistent\fR is automatically enabled.
6814e51f
BP
134.IP "\fBofproto/self\-check\fR [\fIswitch\fR]"
135Runs an internal consistency check on \fIswitch\fR, if specified,
136otherwise on all ofproto instances, and responds with a brief summary
137of the results. If the summary reports any errors, then the Open
138vSwitch logs should contain more detailed information. Please pass
139along errors reported by this command to the Open vSwitch developers
140as bugs.