zoukankan      html  css  js  c++  java
  • 2019 SDN上机第4次作业

    1.安装OpenDayLight控制器,启动并安装插件


    2.用Python脚本搭建如下拓扑


    代码如下:

    from mininet.topo import Topo
    class MyTopo(Topo):
    
        def __init__(self):
    
            # initilaize topology
            Topo.__init__(self)
    
            # add hosts and switches
            h1 = self.addHost('h1')
            h2 = self.addHost('h2')
            h3 = self.addHost('h3')
            s1 = self.addSwitch('s1')
            # add links
            self.addLink(h1, s1, 1, 1)
        self.addLink(h2, s1, 1, 2)
        self.addLink(h3, s1, 1, 3)
    topos = {'mytopo': (lambda: MyTopo())}
    

    pingall的结果:

    3. ODL DLUX下发流表实现hardtimeout


    ODL内部设置:

    ####h2 ping h3: ![](https://img2018.cnblogs.com/blog/1797686/201911/1797686-20191122234540233-1894033242.png) ####实验结果:h2在20s内ping不通h3,20s后恢复

    4.借助Postman调用ODL北向接口下发


    安装postman,并直接解压,进入postman界面:

    ####借助Postman,将JSON报文复制到Body内,将其Send,完成北向接口下发流表: ![](https://img2018.cnblogs.com/blog/1797686/201911/1797686-20191123001914966-306711253.png) ####使用get可以调用接口查看流表: ![](https://img2018.cnblogs.com/blog/1797686/201911/1797686-20191122234920305-219070345.png)
  • 相关阅读:
    OpenCV 3.4.0 + Visual Studio 2015开发环境的配置(Windows 10 X64)
    数值分析4
    数值分析3
    数值分析2
    数值分析1
    绪论0.4
    绪论0.3
    绪论0.2
    绪论0.1
    GitHub之起势
  • 原文地址:https://www.cnblogs.com/0717fei/p/11914854.html
Copyright © 2011-2022 走看看