Mininet and Open vSwitch on CentOS 7

默认mininet支持的系统是Ubuntu|Debian|Fedora|RedHatEnterpriseServer,如何在CentOS 7上安装呢?

Installing Mininet on CentOS7
– I needed VM with 2GB memory to get OS installed.
– I used CentOS-7.0-1406-x86_64-livecd.iso to install the VM. I’m not going to outline steps for installing CentOS.
– I created a local user called mininet and gave it sudo access and ran the remainder as that user.
– Install SSHD
sudo yum -y install openssh-server
sudo chkconfig sshd on
sudo service sshd start

– Disable SELinux to get OVSDB to stasrt
sudo setenforce Permissive

– Modify sudoers secure_path to add /usr/local/bin so the ‘controller’ which be found.
Defaults    secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin

– Install GIT
sudo yum -y install git

– Get Mininet.
git clone git://github.com/mininet/mininet.git
– Update installer mininet/util/install.sh.

修改mininet/util/install.sh:
***ADD the following before the line ‘test -e /etc/fedora-release && DIST=”Fedora”‘. Somewhere around line 47.  May differ.
test -e /etc/centos-release && DIST="CentOS"
if [ "$DIST" = "CentOS" ]; then
    install='sudo yum -y install'
    remove='sudo yum -y erase'
    pkginst='sudo rpm -ivh'
    # Prereqs for this script
    if ! which lsb_release &> /dev/null; then
        $install redhat-lsb-core
    fi
fi

***EDIT
if ! echo $DIST | egrep 'Ubuntu|Debian|Fedora|CentOS'; then
    echo "Install.sh currently only supports Ubuntu, Debian and Fedora."
    exit 1
fi

– Install Mininet and OpenFlow reference.  Not OVS.
mininet/util/install.sh -nf


– Test out Mininet

[mininet@localhost ~]$ sudo mn --test pingall
*** Creating network
*** Adding controller
*** Adding hosts:
h1 h2
*** Adding switches:
s1
*** Adding links:
(h1, s1) (h2, s1)
*** Configuring hosts
h1 h2
*** Starting controller
*** Starting 1 switches
s1
*** Waiting for switches to connect
s1
*** Ping: testing ping reachability
h1 -> h2
h2 -> h1
*** Results: 0% dropped (2/2 received)
*** Stopping 1 controllers
c0
*** Stopping 1 switches
s1 ..
*** Stopping 2 hosts
h1 h2
*** Done
completed in 5.397 seconds

So it seems to work.  But there are a few things to note.

1. The kernel datapath is not installed.  This is totally userspace.  I could not get the kernel module to compile.  Wait until official support of RHEL7.
2. The above is the extent of the testing I did.  There may be other issues that crop up.

Hope this helps anyone that uses CentOS or RHEL 7 with Mininet.

来自:https://techandtrains.com/2014/09/13/mininet-and-open-vswitch-on-centos-7/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值