~james-page/ubuntu/saucy/openvswitch/1.12-snapshot

« back to all changes in this revision

Viewing changes to FAQ

  • Committer: James Page
  • Date: 2013-08-21 10:16:57 UTC
  • mfrom: (1.1.20)
  • Revision ID: james.page@canonical.com-20130821101657-3o0z0qeiv5zkwlzi
New upstream snapshot

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
Q: What is Open vSwitch?
10
10
 
11
11
A: Open vSwitch is a production quality open source software switch
12
 
   designed to be used as a vswitch in virtualized server environments.  A
13
 
   vswitch forwards traffic between different VMs on the same physical host
14
 
   and also forwards traffic between VMs and the physical network.  Open
15
 
   vSwitch supports standard management interfaces (e.g. sFlow, NetFlow,
16
 
   RSPAN, CLI), and is open to programmatic extension and control using
17
 
   OpenFlow and the OVSDB management protocol.
 
12
   designed to be used as a vswitch in virtualized server
 
13
   environments.  A vswitch forwards traffic between different VMs on
 
14
   the same physical host and also forwards traffic between VMs and
 
15
   the physical network.  Open vSwitch supports standard management
 
16
   interfaces (e.g. sFlow, NetFlow, IPFIX, RSPAN, CLI), and is open to
 
17
   programmatic extension and control using OpenFlow and the OVSDB
 
18
   management protocol.
18
19
 
19
20
   Open vSwitch as designed to be compatible with modern switching
20
21
   chipsets.  This means that it can be ported to existing high-fanout
113
114
       http://openvswitch.org/mlists/
114
115
 
115
116
 
116
 
 
117
117
Releases
118
118
--------
119
119
 
126
126
   LTS release, we will provide an updated release that includes the
127
127
   fix.  Releases that are not LTS may not be fixed and may just be
128
128
   supplanted by the next major release.  The current LTS release is
129
 
   1.4.x.
 
129
   1.9.x.
130
130
 
131
131
Q: What Linux kernel versions does each Open vSwitch release work with?
132
132
 
147
147
       1.8.x      2.6.18 to 3.4
148
148
       1.9.x      2.6.18 to 3.8
149
149
       1.10.x     2.6.18 to 3.8
 
150
       1.11.x     2.6.18 to 3.8
 
151
       1.12.x     2.6.18 to 3.9
150
152
 
151
153
   Open vSwitch userspace should also work with the Linux kernel module
152
154
   built into Linux 3.3 and later.
155
157
   It should build against almost any kernel, certainly against 2.6.18
156
158
   and later.
157
159
 
 
160
Q: What Linux kernel versions does IPFIX flow monitoring work with?
 
161
 
 
162
A: IPFIX flow monitoring requires the Linux kernel module from Open
 
163
   vSwitch version 1.10.90 or later.
 
164
 
158
165
Q: Should userspace or kernel be upgraded first to minimize downtime?
159
166
 
160
167
   In general, the Open vSwitch userspace should be used with the
168
175
 
169
176
A: The kernel module in upstream Linux 3.3 and later does not include
170
177
   tunnel virtual ports, that is, interfaces with type "gre",
171
 
   "ipsec_gre", "gre64", "ipsec_gre64", or "vxlan".  It is
 
178
   "ipsec_gre", "gre64", "ipsec_gre64", "vxlan", or "lisp".  It is
172
179
   possible to create tunnels in Linux and attach them to Open vSwitch
173
180
   as system devices.  However, they cannot be dynamically created
174
181
   through the OVSDB protocol or set the tunnel ids as a flow action.
321
328
   alternative, Open vSwitch supports mirroring to a GRE tunnel (see
322
329
   above).
323
330
 
 
331
Q: How do I connect two bridges?
 
332
 
 
333
A: First, why do you want to do this?  Two connected bridges are not
 
334
   much different from a single bridge, so you might as well just have
 
335
   a single bridge with all your ports on it.
 
336
 
 
337
   If you still want to connect two bridges, you can use a pair of
 
338
   patch ports.  The following example creates bridges br0 and br1,
 
339
   adds eth0 and tap0 to br0, adds tap1 to br1, and then connects br0
 
340
   and br1 with a pair of patch ports.
 
341
 
 
342
       ovs-vsctl add-br br0
 
343
       ovs-vsctl add-port br0 eth0
 
344
       ovs-vsctl add-port br0 tap0
 
345
       ovs-vsctl add-br br1
 
346
       ovs-vsctl add-port br1 tap1
 
347
       ovs-vsctl \
 
348
           -- add-port br0 patch0 \
 
349
           -- set interface patch0 type=patch options:peer=patch1 \
 
350
           -- add-port br1 patch1 \
 
351
           -- set interface patch1 type=patch options:peer=patch0
 
352
 
 
353
   Bridges connected with patch ports are much like a single bridge.
 
354
   For instance, if the example above also added eth1 to br1, and both
 
355
   eth0 and eth1 happened to be connected to the same next-hop switch,
 
356
   then you could loop your network just as you would if you added
 
357
   eth0 and eth1 to the same bridge (see the "Configuration Problems"
 
358
   section below for more information).
 
359
 
 
360
   If you are using Open vSwitch 1.9 or an earlier version, then you
 
361
   need to be using the kernel module bundled with Open vSwitch rather
 
362
   than the one that is integrated into Linux 3.3 and later, because
 
363
   Open vSwitch 1.9 and earlier versions need kernel support for patch
 
364
   ports.  This also means that in Open vSwitch 1.9 and earlier, patch
 
365
   ports will not work with the userspace datapath, only with the
 
366
   kernel module.
 
367
 
324
368
Q: Why are there so many different ways to dump flows?
325
369
 
326
370
A: Open vSwitch uses different kinds of flows for different purposes:
361
405
 
362
406
      - "ovs-dpctl dump-flows [dp]" dumps the exact-match flow table
363
407
        entries for a Linux kernel-based datapath.  In Open vSwitch
364
 
        1.10 and later, ovs-vswitchd later merges multiple switches
365
 
        into a single datapath, so it will show all the flows on all
366
 
        your kernel-based switches.  This command can occasionally be
 
408
        1.10 and later, ovs-vswitchd merges multiple switches into a
 
409
        single datapath, so it will show all the flows on all your
 
410
        kernel-based switches.  This command can occasionally be
367
411
        useful for debugging.
368
412
 
369
413
      - "ovs-appctl dpif/dump-flows <br>", new in Open vSwitch 1.10,
576
620
 
577
621
       ovs-vsctl -- --all destroy QoS -- --all destroy Queue
578
622
 
 
623
   If you do want to keep some QoS or Queue records, or the Open
 
624
   vSwitch you are using is older than version 1.8 (which added the
 
625
   --all option), then you will have to destroy QoS and Queue records
 
626
   individually.
 
627
 
579
628
Q: I configured Quality of Service (QoS) in my OpenFlow network by
580
629
   adding records to the QoS and Queue table, but the results aren't
581
630
   what I expect.
770
819
   the machines you are trying to access are not on VLAN 9 (or 10) and
771
820
   that the Internet is not available on VLAN 9 (or 10).
772
821
 
 
822
Q: I added a pair of VMs on the same VLAN, like this:
 
823
 
 
824
       ovs-vsctl add-br br0
 
825
       ovs-vsctl add-port br0 eth0
 
826
       ovs-vsctl add-port br0 tap0 tag=9
 
827
       ovs-vsctl add-port br0 tap1 tag=9
 
828
 
 
829
    The VMs can access each other, but not the external network or the
 
830
    Internet.
 
831
 
 
832
A: It seems likely that the machines you are trying to access in the
 
833
   external network are not on VLAN 9 and that the Internet is not
 
834
   available on VLAN 9.  Also, ensure VLAN 9 is set up as an allowed
 
835
   trunk VLAN on the upstream switch port to which eth0 is connected.
 
836
 
773
837
Q: Can I configure an IP address on a VLAN?
774
838
 
775
839
A: Yes.  Use an "internal port" configured as an access port.  For
799
863
   You can use "normal switching" as a component of your OpenFlow
800
864
   actions, e.g. by putting "normal" into the lists of actions on
801
865
   ovs-ofctl or by outputting to OFPP_NORMAL from an OpenFlow
802
 
   controller.  This will only be suitable for some situations,
803
 
   though.
 
866
   controller.  In situations where this is not suitable, you can
 
867
   implement VLAN handling yourself, e.g.:
 
868
 
 
869
       - If a packet comes in on an access port, and the flow table
 
870
         needs to send it out on a trunk port, then the flow can add
 
871
         the appropriate VLAN tag with the "mod_vlan_vid" action.
 
872
 
 
873
       - If a packet comes in on a trunk port, and the flow table
 
874
         needs to send it out on an access port, then the flow can
 
875
         strip the VLAN tag with the "strip_vlan" action.
804
876
 
805
877
Q: I configured ports on a bridge as access ports with different VLAN
806
878
   tags, like this:
856
928
       options:dst_port=8472
857
929
 
858
930
 
859
 
Controllers
860
 
-----------
 
931
Using OpenFlow (Manually or Via Controller)
 
932
-------------------------------------------
861
933
 
862
934
Q: What versions of OpenFlow does Open vSwitch support?
863
935
 
865
937
   extensions that bring in many of the features from later versions
866
938
   of OpenFlow).
867
939
 
868
 
   Open vSwitch versions 1.10 and later will have experimental support
869
 
   for OpenFlow 1.2 and 1.3.  On these versions of Open vSwitch, the
870
 
   following command enables OpenFlow 1.0, 1.2, and 1.3 on bridge br0:
871
 
 
872
 
       ovs-vsctl set bridge br0 protocols=openflow10,openflow12,openflow13
873
 
 
874
 
   Support for OpenFlow 1.1 is incomplete enough that it cannot yet be
875
 
   enabled, even experimentally.
876
 
 
877
 
   Support for OpenFlow 1.2 and 1.3 is still incomplete.  Work to be
878
 
   done is tracked in OPENFLOW-1.1+ in the Open vSwitch source tree
 
940
   Open vSwitch 1.10 and later have experimental support for OpenFlow
 
941
   1.2 and 1.3.  On these versions of Open vSwitch, the following
 
942
   command enables OpenFlow 1.0, 1.2, and 1.3 on bridge br0:
 
943
 
 
944
       ovs-vsctl set bridge br0 protocols=OpenFlow10,OpenFlow12,OpenFlow13
 
945
 
 
946
   Open vSwitch version 1.12 and later will have experimental support
 
947
   for OpenFlow 1.1, 1.2, and 1.3.  On these versions of Open vSwitch,
 
948
   the following command enables OpenFlow 1.0, 1.1, 1.2, and 1.3 on
 
949
   bridge br0:
 
950
 
 
951
       ovs-vsctl set bridge br0 protocols=OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13
 
952
 
 
953
   Use the -O option to enable support for later versions of OpenFlow
 
954
   in ovs-ofctl.  For example:
 
955
 
 
956
       ovs-ofctl -O OpenFlow13 dump-flows br0
 
957
 
 
958
   Support for OpenFlow 1.1, 1.2, and 1.3 is still incomplete.  Work
 
959
   to be done is tracked in OPENFLOW-1.1+ in the Open vSwitch sources
879
960
   (also via http://openvswitch.org/development/openflow-1-x-plan/).
880
961
   When support for a given OpenFlow version is solidly implemented,
881
962
   Open vSwitch will enable that version by default.
1029
1110
         controller is not configured, this happens implicitly to
1030
1111
         every packet.)
1031
1112
 
1032
 
       - The "autopath" Nicira extension action.  However, "autopath"
1033
 
         is deprecated and scheduled for removal in February 2013.
1034
 
 
1035
1113
       - Mirrors configured for output to a bonded port.
1036
1114
 
1037
1115
   It would make a lot of sense for Open vSwitch to present a bond as
1039
1117
   implementation of such a feature, please bring it up on the Open
1040
1118
   vSwitch development mailing list at dev@openvswitch.org.
1041
1119
 
 
1120
Q: I have a sophisticated network setup involving Open vSwitch, VMs or
 
1121
   multiple hosts, and other components.  The behavior isn't what I
 
1122
   expect.  Help!
 
1123
 
 
1124
A: To debug network behavior problems, trace the path of a packet,
 
1125
   hop-by-hop, from its origin in one host to a remote host.  If
 
1126
   that's correct, then trace the path of the response packet back to
 
1127
   the origin.
 
1128
 
 
1129
   Usually a simple ICMP echo request and reply ("ping") packet is
 
1130
   good enough.  Start by initiating an ongoing "ping" from the origin
 
1131
   host to a remote host.  If you are tracking down a connectivity
 
1132
   problem, the "ping" will not display any successful output, but
 
1133
   packets are still being sent.  (In this case the packets being sent
 
1134
   are likely ARP rather than ICMP.)
 
1135
 
 
1136
   Tools available for tracing include the following:
 
1137
 
 
1138
       - "tcpdump" and "wireshark" for observing hops across network
 
1139
         devices, such as Open vSwitch internal devices and physical
 
1140
         wires.
 
1141
 
 
1142
       - "ovs-appctl dpif/dump-flows <br>" in Open vSwitch 1.10 and
 
1143
         later or "ovs-dpctl dump-flows <br>" in earlier versions.
 
1144
         These tools allow one to observe the actions being taken on
 
1145
         packets in ongoing flows.
 
1146
 
 
1147
         See ovs-vswitchd(8) for "ovs-appctl dpif/dump-flows"
 
1148
         documentation, ovs-dpctl(8) for "ovs-dpctl dump-flows"
 
1149
         documentation, and "Why are there so many different ways to
 
1150
         dump flows?" above for some background.
 
1151
 
 
1152
       - "ovs-appctl ofproto/trace" to observe the logic behind how
 
1153
         ovs-vswitchd treats packets.  See ovs-vswitchd(8) for
 
1154
         documentation.  You can out more details about a given flow
 
1155
         that "ovs-dpctl dump-flows" displays, by cutting and pasting
 
1156
         a flow from the output into an "ovs-appctl ofproto/trace"
 
1157
         command.
 
1158
 
 
1159
       - SPAN, RSPAN, and ERSPAN features of physical switches, to
 
1160
         observe what goes on at these physical hops.
 
1161
 
 
1162
   Starting at the origin of a given packet, observe the packet at
 
1163
   each hop in turn.  For example, in one plausible scenario, you
 
1164
   might:
 
1165
 
 
1166
       1. "tcpdump" the "eth" interface through which an ARP egresses
 
1167
          a VM, from inside the VM.
 
1168
 
 
1169
       2. "tcpdump" the "vif" or "tap" interface through which the ARP
 
1170
          ingresses the host machine.
 
1171
 
 
1172
       3. Use "ovs-dpctl dump-flows" to spot the ARP flow and observe
 
1173
          the host interface through which the ARP egresses the
 
1174
          physical machine.  You may need to use "ovs-dpctl show" to
 
1175
          interpret the port numbers.  If the output seems surprising,
 
1176
          you can use "ovs-appctl ofproto/trace" to observe details of
 
1177
          how ovs-vswitchd determined the actions in the "ovs-dpctl
 
1178
          dump-flows" output.
 
1179
 
 
1180
       4. "tcpdump" the "eth" interface through which the ARP egresses
 
1181
          the physical machine.
 
1182
 
 
1183
       5. "tcpdump" the "eth" interface through which the ARP
 
1184
          ingresses the physical machine, at the remote host that
 
1185
          receives the ARP.
 
1186
 
 
1187
       6. Use "ovs-dpctl dump-flows" to spot the ARP flow on the
 
1188
          remote host that receives the ARP and observe the VM "vif"
 
1189
          or "tap" interface to which the flow is directed.  Again,
 
1190
          "ovs-dpctl show" and "ovs-appctl ofproto/trace" might help.
 
1191
 
 
1192
       7. "tcpdump" the "vif" or "tap" interface to which the ARP is
 
1193
          directed.
 
1194
 
 
1195
       8. "tcpdump" the "eth" interface through which the ARP
 
1196
          ingresses a VM, from inside the VM.
 
1197
 
 
1198
   It is likely that during one of these steps you will figure out the
 
1199
   problem.  If not, then follow the ARP reply back to the origin, in
 
1200
   reverse.
 
1201
 
 
1202
Q: How do I make a flow drop packets?
 
1203
 
 
1204
A: An empty set of actions causes a packet to be dropped.  You can
 
1205
   specify an empty set of actions with "actions=" on the ovs-ofctl
 
1206
   command line.  For example:
 
1207
 
 
1208
       ovs-ofctl add-flow br0 priority=65535,actions=
 
1209
 
 
1210
   would cause every packet entering switch br0 to be dropped.
 
1211
 
 
1212
   You can write "drop" explicitly if you like.  The effect is the
 
1213
   same.  Thus, the following command also causes every packet
 
1214
   entering switch br0 to be dropped:
 
1215
 
 
1216
       ovs-ofctl add-flow br0 priority=65535,actions=drop
 
1217
 
 
1218
 
1042
1219
Contact 
1043
1220
-------
1044
1221