zoukankan      html  css  js  c++  java
  • Frenetic Python实验(三)

    实验5 repeater

    这个实验在HelloSDNWorld里面做的实验是一样的。HelloSDNWorld

    目的:模拟一个有多个端口的中继器。

    This application implements a simple switch-based repeater for a single switch and an arbitrary number of ports.

    1.终端1运行控制器。

    2.终端2运行mininet:

    sudo mn --topo=single,10 --controller=remote
    

    3.终端3执行应用脚本:

    $ python -m frenetic.examples.repeater
    

    控制器信息:

    4.终端2执行pingall:

    mininet> pingall
    

    pingall in the Mininet window should yield 100% successfully sent packets.

    当然,和上面一样,成功率达不到100%。

    实验6 discovery

    Located in the discovery subdirectory, this multi-object Python application performs a topology discovery on the given network. It finds all internal (switch-to-switch) links and all connected hosts.

    目的:本实验的多目标的Python应用脚本,用于在给定网络拓扑中发现网络内部链路(交换机-交换机)以及所有连接host的链路,并在终端3打印出来。

    1.终端1运行控制器。

    2.终端2运行mininet:

    sudo mn --topo=tree,3,3 --controller=remote
    

    与之前实验不一样的是,生成的网络拓扑结构是一颗树。

    3.终端3运行应用脚本:

    $ python -m frenetic.examples.discovery.discovery
    

    控制器信息:

    4.在终端2执行pingall:

    mininet> pingall
    

    查看终端3,应用进程发现了给出mininet网络拓扑中的内部链路等:

    Running this app should yield the internal links in the above topology listed on the console log.

    理论上,pingall执行完毕之后,终端3会发现所有的内部链路,但是有22个host。。并且由于有些节点流表信息没有更新,导致执行pingall的时间会非常漫长。

    2016/11/30

  • 相关阅读:
    装饰器和表达生成式
    函数
    字符编码
    函数基础
    列表,字典与集合
    Linux Semaphore
    tp5安装easyWeChat
    wx.request
    小程序设计规范
    小程序的概念和特点
  • 原文地址:https://www.cnblogs.com/qq952693358/p/6119311.html
Copyright © 2011-2022 走看看