2019独角兽企业重金招聘Python工程师标准>>>
首先下载Mininet
apt-get install mininetservice openvswitch-controller stopupdate-rc.d openvswitch-controller disablemn --test pingall 这里可能会出现以下错误sudo mn --mac --controller=remote,port=6653 --topo=treeAdding controllerAdding hosts: h1 h2 h3 h4 Adding switches: s1 s2 s3Adding links: * gave up after 3 retries
出现以上问题的解决办法是将linux的内核从4.x降到3.x就可以了降低内核版本
下载Openvswitch对应的版本
Openvswitch下载对应的版本
cd /home
mkdir openvswitch
cd openvswitch
rz #将下载好的Openvswitch上传
tar -xzvf openvswitch-2.4.1.tar.gz
cd openvswitch-2.4.1
apt-get install build-essential fakeroot
apt-get install debhelper autoconf automake libssl-dev pkg-config bzip2 openssl python-all procps python-qt4 python-zope.interface python-twisted-conch ipsec-tools racoon python-twisted-web module-assistant graphviz libtool dkms
上面安装完后:
dpkg-checkbuilddeps
fakeroot debian/rules binary
cd .. #即退出到新创建的openvswitch目录
dpkg -i *.deb
这里如果发现包的依赖问题出错就将相应的程序先卸载,apt-get install相应的依赖程序在重新dpkg -i *.deb这里Openvswitch的Openvswitch-controller可能不能用需要修改一下/usr/bin下的文件
cd /usr/bin
cp ovs-testcontroller ovs-testcontroller.bak #备份
mv ovs-testcontroller ovs-controller #更换名字
/etc/init.d/openvswitch-switch restart #重启
ovs-vsctl --version 查看版本即可
由于版本问题,最后完成后会出现ovs-controller报错
apt-get purge openvswitch-controller #卸载老版本的ovs-controllercd /usr/bin/mv ./ovs-testcontroller ./ovs-testcontroller.bakmv ./ovs-testcontroller ./ovs-controller
问题即可解决