1 官网下载ovs 2.5.0 tar.gz wget *.tar.gz
2 tar xf 2.5.0.tar.gz
3 cd ovs
./boot.sh
./configure
make
make install
这里我的编译没什么问题
23 mkdir -p /usr/local/etc/openvswitch
24 mkdir -p /usr/local/var/run/openvswitch
25 rm /usr/local/etc/openvswitch/conf.db
26 ovsdb-tool create /usr/local/etc/openvswitch/conf.db /usr/local/share/openvswitch/vswitch.ovsschema
27 ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock --remote=db:Open_vSwitch,Open_vSwitch,manager_options --pidfile --detach
28 kill -9 5137
29 ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock --remote=db:Open_vSwitch,manager_options --pidfile --detach
30 ovs-vsctl --no-wait init
31 export DB_SOCK=/usr/local/var/run/openvswitch/db.sock
32 ovs-vsctl --no-wait set Open_vSwitch .
33 ovs-vswitchd unix:$DB_SOCK --pidfile --detach
4 执行ovs-vsctl show
2.5.0
ovs-ofctl show
of1.4
5 执行ovs-vsctl add-br br0出错,报告db.sock不存在
处理如下
目的:The OVSDB manager can programs the OVSDB server daemon which resides in a persistent file on the data path vSwtich filesystem.
5.2
ovsdb-server
/usr/local/etc/openvswitch/conf.db
--remote=punix:/usr/local/var/run/openvswitch/db.sock
--detach
目的:创建db.sock
5.3
ovs-vswitchd unix:/usr/local/var/run/openvswitch/db.sock --detach
目的:创建用户态程序daemon
参考:
1
http://networkstatic.net/getting-started-ovsdb/
2
http://www.jb51.cc/article/p-ttclfsct-bgv.html