]> git.proxmox.com Git - mirror_ovs.git/blame - Documentation/ref/ovs-test.8.rst
ovsdb-idl: compound indexes design document
[mirror_ovs.git] / Documentation / ref / ovs-test.8.rst
CommitLineData
3591d8c7
SF
1========
2ovs-test
3========
4
5Synopsis
6========
7
8**ovs-test** -s *port*
9
10**ovs-test** -c *server1* *server2* [**-b** *targetbandwidth*] [**-i** *testinterval*] [**-d**]
11 [**-l** *vlantag*] [**-t** *tunnelmodes*]
12
13Description
14===========
15
16The :program:`ovs-test` program may be used to check for problems sending
17802.1Q or GRE traffic that Open vSwitch may uncover. These problems, for
18example, can occur when Open vSwitch is used to send 802.1Q traffic through
19physical interfaces running certain drivers of certain Linux kernel versions.
20To run a test, configure IP addresses on `server1` and `server2` for interfaces
21you intended to test. These interfaces could also be already configured OVS
22bridges that have a physical interface attached to them. Then, on one of the
23nodes, run :program:`ovs-test` in server mode and on the other node run it in
24client mode. The client will connect to :program:`ovs-test` server and schedule
25tests between both of them. The :program:`ovs-test` client will perform UDP and
26TCP tests.
27
28UDP tests can report packet loss and achieved bandwidth for various datagram
29sizes. By default target bandwidth for UDP tests is 1Mbit/s.
30
31TCP tests report only achieved bandwidth, because kernel TCP stack takes care
32of flow control and packet loss. TCP tests are essential to detect potential
33TSO related issues.
34
35To determine whether Open vSwitch is encountering any problems, the user must
36compare packet loss and achieved bandwidth in a setup where traffic is being
37directly sent and in one where it is not. If in the 802.1Q or L3 tunneled tests
38both :program:`ovs-test` processes are unable to communicate or the achieved
39bandwidth is much lower compared to direct setup, then, most likely, Open
40vSwitch has encountered a pre-existing kernel or driver bug.
41
42Some examples of the types of problems that may be encountered are:
43
44- When NICs use VLAN stripping on receive they must pass a pointer to a
45 `vlan_group` when reporting the stripped tag to the networking core. If no
46 `vlan_group` is in use then some drivers just drop the extracted tag.
47 Drivers are supposed to only enable stripping if a `vlan_group` is registered
48 but not all of them do that.
49
50- On receive, some drivers handle priority tagged packets specially and don't
51 pass the tag onto the network stack at all, so Open vSwitch never has a
52 chance to see it.
53
54- Some drivers size their receive buffers based on whether a `vlan_group` is
55 enabled, meaning that a maximum size packet with a VLAN tag will not fit if
56 no `vlan_group` is configured.
57
58- On transmit, some drivers expect that VLAN acceleration will be used if it is
59 available, which can only be done if a `vlan_group` is configured. In these
60 cases, the driver may fail to parse the packet and correctly setup checksum
61 offloading or TSO.
62
63Client Mode
64 An :program:`ovs-test` client will connect to two :program:`ovs-test` servers
65 and will ask them to exchange test traffic. It is also possible to spawn an
66 :program:`ovs-test` server automatically from the client.
67
68Server Mode
69 To conduct tests, two :program:`ovs-test` servers must be running on two
70 different hosts where the client can connect. The actual test traffic is
71 exchanged only between both :program:`ovs-test` servers. It is recommended
72 that both servers have their IP addresses in the same subnet, otherwise one
73 would have to make sure that routing is set up correctly.
74
75Options
76=======
77
78.. program:: ovs-test
79
80.. option:: -s <port>, --server <port>
81
82 Run in server mode and wait for the client to establish XML RPC Control
83 Connection on this TCP port. It is recommended to have `ethtool(8)`
84 installed on the server so that it could retrieve information about the NIC
85 driver.
86
87.. option:: -c <server1> <server2>, --client <server1> <server2>
88
89 Run in client mode and schedule tests between `server1` and `server2`,
90 where each server must be given in the following format::
91
92 OuterIP[:OuterPort],InnerIP[/Mask][:InnerPort].
93
94 The `OuterIP` must be already assigned to the physical interface which is
95 going to be tested. This is the IP address where client will try to
96 establish XML RPC connection. If `OuterIP` is 127.0.0.1 then client will
97 automatically spawn a local instance of :program:`ovs-test` server.
98 OuterPort is TCP port where server is listening for incoming XML/RPC
99 control connections to schedule tests (by default it is 15531). The
100 :program:`ovs-test` will automatically assign `InnerIP[/Mask]` to the
101 interfaces that will be created on the fly for testing purposes. It is
102 important that `InnerIP[/Mask]` does not interfere with already existing IP
103 addresses on both :program:`ovs-test` servers and client. InnerPort is port
104 which will be used by server to listen for test traffic that will be
105 encapsulated (by default it is 15532).
106
107.. option:: -b <targetbandwidth>, --bandwidth <targetbandwidth>
108
109 Target bandwidth for UDP tests. The targetbandwidth must be given in bits
110 per second. It is possible to use postfix `M` or `K` to alter the target
111 bandwidth magnitude.
112
113.. option:: -i <testinterval>, --interval <testinterval>
114
115 How long each test should run. By default 5 seconds.
116
117.. option:: -h, --help
118
119 Prints a brief help message to the console.
120
121.. option:: -V, --version
122
123 Prints version information to the console.
124
125The following test modes are supported by :program:`ovs-test`. It is possible
126to combine multiple of them in a single :program:`ovs-test` invocation.
127
128.. option:: -d, --direct
129
130 Perform direct tests between both OuterIP addresses. These tests could be
131 used as a reference to compare 802.1Q or L3 tunneling test results.
132
133.. option:: -l <vlantag>, --vlan-tag <vlantag>
134
135 Perform 802.1Q tests between both servers. These tests will create a
136 temporary OVS bridge, if necessary, and attach a VLAN tagged port to
137 it for testing purposes.
138
139.. option:: -t <tunnelmodes>, --tunnel-modes <tunnelmodes>
140
141 Perform L3 tunneling tests. The given argument is a comma sepa‐ rated
142 string that specifies all the L3 tunnel modes that should be tested (e.g.
143 gre). The L3 tunnels are terminated on interface that has the OuterIP
144 address assigned.
145
146Examples
147========
148
149On host 1.2.3.4 start :program:`ovs-test` in server mode::
150
151 ovs-test -s 15531
152
153On host 1.2.3.5 start :program:`ovs-test` in client mode and do direct, VLAN
154and GRE tests between both nodes::
155
156 ovs-test -c 127.0.0.1,1.1.1.1/30 1.2.3.4,1.1.1.2/30 -d -l 123 -t
157 gre
158
159See Also
160========
161
162`ovs-vswitchd(8)`, `ovs-ofctl(8)`, `ovs-vsctl(8)`, :program:`ovs-vlan-test`,
163`ethtool(8)`, `uname(1)`