系统教程
您现在的位置是:首页>服务器系统>Ubuntu系统内容

Ubuntu14.04 Mininet中将Openvswitch升级步骤

时间:2018-04-29 出处:未知复制分享人气(次) 【

首先下载Mininet:
apt-get install mininet
service openvswitch-controller stop
update-rc.d openvswitch-controller disable
mn --test pingall 这里可能会出现以下错误
sudo mn --mac --controller=remote,port=6653 --topo=tree
Adding controller
Adding hosts: h1 h2 h3 h4 
Adding switches: s1 s2 s3
Adding links: * gave up after 3 retries
 
出现以上问题的解决办法是将linux的内核从4.x降到3.x就可以了,降低内核版本:http://www.linuxdiyf.com/linux/31372.html
 
下载Openvswitch对应的版本
Openvswitch下载对应的版本(http://openvswitch.org/releases/)
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-controller
cd /usr/bin/
mv ./ovs-testcontroller ./ovs-testcontroller.bak
mv ./ovs-testcontroller ./ovs-controller
问题即可解决。
    最新资讯
    热门内容
    小米移动电源能为iPad mini充几次电