zoukankan      html  css  js  c++  java
  • opendaynight(karaf) 和 mininet测试openflow

    ===================================================================================================

    安装mininet方法1:
    1)首先安装git
    sudo apt-get install git

    2)获得mininet的源码
    git clone git://github.com/mininet/mininet

    3)打开mininet文件夹,选择其中一个版本安装
    cd mininet
    git tag #查看可用版本
    git checkout -b 2.2.1 2.2.1#选择一个版本

    4)开始安装
    cd util #进入mininet里的util文件夹
    install.sh -a #安装在home目录
    install.sh -s mydir -a #mydir目录
    install.sh -nfv #安装mininet+用户交换机+openvswitch
    install.sh -s mydir -nfv //user this one

    5)测试
    sudo mn --test pingall


    ===================================================================================================

    安装mininet方法2:

    1) 在https://github.com/mininet/mininet/wiki/Mininet-VM-Images 下载虚拟机

    2) 用virtual box导入

    3) 登录用户名密码:mininet

    4)测试
    sudo mn --test pingall

    ===================================================================================================

    1) 下载karaf,并解压

    https://www.opendaylight.org/technical-community/getting-started-for-developers/downloads-and-documentation

    2)设置JAVA_HOME

    安装java:

    sudo apt-get install default-jre

    在/etc/profile文件末尾加入:
    export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
    export PATH=$JAVA_HOME/bin:$PATH
    export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
    需要重新登录。

    3) ./bin/karaf

    4)查看当前安装的feature

    feature:list -i 

    5)安装必要的feature

    feature:install odl-l2switch-switch-ui

    feature:install odl-mdsal-apidocs

    feature:install odl-dluxapps-applications

    6) 打开网页

    http://yourip:8181/index.html 

    ===================================================================================================

     1) 创建mininet网络

    方案1:

    sudo mn --topo linear,4  --controller=remote,ip=127.0.0.1,port=6633  //linear表示每台交换机链接一台主机  

    方案2:

    from mininet.topo import Topo
    
    class MyTopo(Topo):
        def __init__(self):
            Topo.__init__(self)
    
            h1 = self.addHost('h1')
            h2 = self.addHost('h2')
            h3 = self.addHost('h3')
            h4 = self.addHost('h4')
            s1 = self.addSwitch('s1')
            s2 = self.addSwitch('s2')
            s3 = self.addSwitch('s3')
    
            self.addLink(s1, s2, 4, 4)
            self.addLink(s1, s3, 3, 3)
            self.addLink(s2, s3, 2, 2)
    
            self.addLink(s1, h1, 1, 1)
            self.addLink(s1, h2, 2, 1)
            self.addLink(s2, h3, 3, 1)
            self.addLink(s3, h4, 4, 1)
    
    topos = { 'mytopo': ( lambda: MyTopo() ) }

    sudo mn --custom /home/derek/share/mininet/mytopo.py --topo mytopo --controller=remote,ip=127.0.0.1,port=6633 

    2)在karam页面查看网络拓扑

    ===================================================================================================

  • 相关阅读:
    T100添加合计
    T100整单操作维护交运方式
    错误代码:11300001 数据集配置错误Query:ORA-01652: 无法通过 128 (在表空间 TEMP 中) 扩展 temp 段
    T100 技术汇总
    帆软取年月常用函数
    使用oracle DB_LINK的一个注意点
    单行拆转多行的查询
    SQL-Oracle内实现柱形图式的效果
    SQL-删除重复记录
    MERGE语法详解
  • 原文地址:https://www.cnblogs.com/soul-stone/p/7923219.html
Copyright © 2011-2022 走看看