]> git.proxmox.com Git - ovs.git/blame - INSTALL.userspace.md
netdev-dpdk: Remove dpdkvhostcuse ports
[ovs.git] / INSTALL.userspace.md
CommitLineData
542cc9bb
TG
1Using Open vSwitch without kernel support
2=========================================
d377243b
BP
3
4Open vSwitch can operate, at a cost in performance, entirely in
5userspace, without assistance from a kernel module. This file
6explains how to install Open vSwitch in such a mode.
7
8The userspace-only mode of Open vSwitch is considered experimental.
9It has not been thoroughly tested.
10
542cc9bb
TG
11This version of Open vSwitch should be built manually with `configure`
12and `make`. Debian packaging for Open vSwitch is also included, but
d377243b
BP
13it has not been recently tested, and so Debian packages are not a
14recommended way to use this version of Open vSwitch.
15
16Building and Installing
17-----------------------
18
19The requirements and procedure for building, installing, and
9feb1017 20configuring Open vSwitch are the same as those given in [INSTALL.md].
d377243b
BP
21You may omit configuring, building, and installing the kernel module,
22and the related requirements.
23
24On Linux, the userspace switch additionally requires the kernel
25TUN/TAP driver to be available, either built into the kernel or loaded
26as a module. If you are not sure, check for a directory named
27/sys/class/misc/tun. If it does not exist, then attempt to load the
542cc9bb 28module with `modprobe tun`.
d377243b 29
542cc9bb
TG
30The tun device must also exist as `/dev/net/tun`. If it does not exist,
31then create /dev/net (if necessary) with `mkdir /dev/net`, then create
32`/dev/net/tun` with `mknod /dev/net/tun c 10 200`.
d377243b 33
a09d302a
YT
34On FreeBSD and NetBSD, the userspace switch additionally requires the
35kernel tap(4) driver to be available, either built into the kernel or
36loaded as a module.
f6eb6b20 37
e3e9370b
BP
38Using the Userspace Datapath with ovs-vswitchd
39----------------------------------------------
d377243b 40
e5334dad
JG
41To use ovs-vswitchd in userspace mode, create a bridge with datapath_type
42"netdev" in the configuration database. For example:
d377243b 43
e5334dad
JG
44 ovs-vsctl add-br br0
45 ovs-vsctl set bridge br0 datapath_type=netdev
46 ovs-vsctl add-port br0 eth0
47 ovs-vsctl add-port br0 eth1
48 ovs-vsctl add-port br0 eth2
d377243b
BP
49
50ovs-vswitchd will create a TAP device as the bridge's local interface,
e5334dad
JG
51named the same as the bridge, as well as for each configured internal
52interface.
d377243b 53
d00409c5
YT
54Currently, on FreeBSD, the functionality required for in-band control
55support is not implemented. To avoid related errors, you can disable
56the in-band support with the following command.
a09d302a
YT
57
58 ovs-vsctl set bridge br0 other_config:disable-in-band=true
59
f4ef9534
BP
60Firewall Rules
61--------------
62
63On Linux, when a physical interface is in use by the userspace
64datapath, packets received on the interface still also pass into the
65kernel TCP/IP stack. This can cause surprising and incorrect
66behavior. You can use "iptables" to avoid this behavior, by using it
67to drop received packets. For example, to drop packets received on
68eth0:
69
70 iptables -A INPUT -i eth0 -j DROP
71 iptables -A FORWARD -i eth0 -j DROP
72
a09d302a
YT
73Other settings
74--------------
75
76On NetBSD, depending on your network topology and applications, the
77following configuration might help. See sysctl(7).
78
f293a803 79 sysctl -w net.inet.ip.checkinterface=1
a09d302a 80
d377243b
BP
81Bug Reporting
82-------------
83
84Please report problems to bugs@openvswitch.org.
9feb1017
TG
85
86[INSTALL.md]:INSTALL.md