[ovs-discuss] The network speed is low when use vlan on ovs

Kris zhang zhang.kris at gmail.com
Fri Mar 29 05:54:50 UTC 2013


Thanks a lot


On Fri, Mar 29, 2013 at 1:07 PM, Ben Pfaff <blp at nicira.com> wrote:

> On Fri, Mar 29, 2013 at 01:05:16PM +0800, Kris zhang wrote:
> > So my question is why the network speed is slow when use vlan in OVS?
>
> There's a huge section in the FAQ about VLANs.  Please read it.
>
> Some relevant parts:
>
> Q: VLANs don't work.
>
> A: Many drivers in Linux kernels before version 3.3 had VLAN-related
>    bugs.  If you are having problems with VLANs that you suspect to be
>    driver related, then you have several options:
>
>        - Upgrade to Linux 3.3 or later.
>
>        - Build and install a fixed version of the particular driver
>          that is causing trouble, if one is available.
>
>        - Use a NIC whose driver does not have VLAN problems.
>
>        - Use "VLAN splinters", a feature in Open vSwitch 1.4 and later
>          that works around bugs in kernel drivers.  To enable VLAN
>          splinters on interface eth0, use the command:
>
>            ovs-vsctl set interface eth0
> other-config:enable-vlan-splinters=true
>
>          For VLAN splinters to be effective, Open vSwitch must know
>          which VLANs are in use.  See the "VLAN splinters" section in
>          the Interface table in ovs-vswitchd.conf.db(5) for details on
>          how Open vSwitch infers in-use VLANs.
>
>          VLAN splinters increase memory use and reduce performance, so
>          use them only if needed.
>
>        - Apply the "vlan workaround" patch from the XenServer kernel
>          patch queue, build Open vSwitch against this patched kernel,
>          and then use ovs-vlan-bug-workaround(8) to enable the VLAN
>          workaround for each interface whose driver is buggy.
>
>          (This is a nontrivial exercise, so this option is included
>          only for completeness.)
>
>    It is not always easy to tell whether a Linux kernel driver has
>    buggy VLAN support.  The ovs-vlan-test(8) and ovs-test(8) utilities
>    can help you test.  See their manpages for details.  Of the two
>    utilities, ovs-test(8) is newer and more thorough, but
>    ovs-vlan-test(8) may be easier to use.
>
> Q: VLANs still don't work.  I've tested the driver so I know that it's OK.
>
> A: Do you have VLANs enabled on the physical switch that OVS is
>    attached to?  Make sure that the port is configured to trunk the
>    VLAN or VLANs that you are using with OVS.
>
> Q: Outgoing VLAN-tagged traffic goes through OVS to my physical switch
>    and to its destination host, but OVS seems to drop incoming return
>    traffic.
>
> A: It's possible that you have the VLAN configured on your physical
>    switch as the "native" VLAN.  In this mode, the switch treats
>    incoming packets either tagged with the native VLAN or untagged as
>    part of the native VLAN.  It may also send outgoing packets in the
>    native VLAN without a VLAN tag.
>
>    If this is the case, you have two choices:
>
>        - Change the physical switch port configuration to tag packets
>          it forwards to OVS with the native VLAN instead of forwarding
>          them untagged.
>
>        - Change the OVS configuration for the physical port to a
>          native VLAN mode.  For example, the following sets up a
>          bridge with port eth0 in "native-tagged" mode in VLAN 9:
>
>              ovs-vsctl add-br br0
>              ovs-vsctl add-port br0 eth0 tag=9 vlan_mode=native-tagged
>
>          In this situation, "native-untagged" mode will probably work
>          equally well.  Refer to the documentation for the Port table
>          in ovs-vswitchd.conf.db(5) for more information.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20130329/f262bdc4/attachment-0001.html>


More information about the discuss mailing list