Openvswitch是一个优秀的开源软件交换机,支持主流的交换机功能,比如二层交换、网络隔离、QoS、流量监控等,而其最大的特点就是支持openflow,openflow定义了灵活的数据包处理规范。为用户提供L1-L4包处理能力。OVS支持多种Linux虚拟化技术,包括Xen、KVM以及VirtualBox。此外,OVS支持硬件交换机。OVS支持丰富的特性
1、安装依赖
yum -y install wget openssl-devel python-sphinx gcc make python-devel openssl-devel kernel-devel graphviz kernel-debug-devel autoconf automake rpm-build redhat-rpm-config libtool python-twisted-core python-zope-interface PyQt4 desktop-file-utils libcap-ng-devel groff checkpolicy selinux-policy-devel gcc-c++ python-six unbound unbound-devel2、下载ovs 压缩包
wget https://www.openvswitch.org/releases/openvswitch-2.11.0.tar.gz3、构建 build 目录:
mkdir -p ~/rpmbuild/SOURCES mv openvswitch-2.11.0.tar.gz /root/rpmbuild/SOURCES/ cd /root/rpmbuild/SOURCES/ tar -xvzf openvswitch-2.11.0.tar.gz4、构建 rpm 包:
rpmbuild -bb --nocheck openvswitch-2.11.0/rhel/openvswitch-fedora.spec5、安装ovs
rpmbuild -bb --nocheck openvswitch-2.11.0/rhel/openvswitch-fedora.spec6、启动ovs
systemctl start openvswitch.service systemctl enable openvswitch.service ovs-vsctl --version