• 写在前面

这次实验遇到了非常多问题,非常非常多,花了很多时间去解决,还是有一些小问题没有解决,但是基本上能完成实验。建议先看完全文再开始做实验。

  • 实验内容

先看一下本次实验的拓扑图:



在该环境下,假设H1 ping H4,初始的路由规则是S1-S2-S5,一秒后,路由转发规则变为S1-S3-S5,再过一秒,规则变为S1-S4-S5,然后再回到最初的转发规则S1-S2-S5。通过这个循环调度的例子动态地改变交换机的转发规则。

  • 参考

Mininet动态改变转发规则实验

  • 实验环境

虚拟机: Oracle VM VirtualBox Ubuntu16.04LTS

PS:原文中说「本实验需要两台虚拟机,分别安装POX(4G)和支持OpenFlow1.3协议的Mininet。」而我只在自己的一台机子上进行实验,也许这就是出现如此多问题的根源?

  • 实验步骤

1. ~/pox目录下新建文件lab_controller.py

# cd pox
# vim lab_controller.py

脚本内容如下:

from pox.core import core

import pox.openflow.libopenflow_01 as of

from pox.lib.util import dpidToStr

from pox.lib.addresses import IPAddr, EthAddr

from pox.lib.packet.arp import arp

from pox.lib.packet.ethernet import ethernet, ETHER_BROADCAST

from pox.lib.packet.packet_base import packet_base

from pox.lib.packet.packet_utils import *

import pox.lib.packet as pkt

from pox.lib.recoco import Timer

import time

log = core.getLogger()

s1_dpid=0

s2_dpid=0

s3_dpid=0

s4_dpid=0

s5_dpid=0

s1_p1=0

s1_p4=0

s1_p5=0

s1_p6=0

s2_p1=0

s3_p1=0

s4_p1=0

pre_s1_p1=0

pre_s1_p4=0

pre_s1_p5=0

pre_s1_p6=0

pre_s2_p1=0

pre_s3_p1=0

pre_s4_p1=0

turn=0

def getTheTime():  #fuction to create a timestamp

  flock = time.localtime()

  then = "[%s-%s-%s" %(str(flock.tm_year),str(flock.tm_mon),str(flock.tm_mday))

  if int(flock.tm_hour)<10:

    hrs = "0%s" % (str(flock.tm_hour))

  else:

    hrs = str(flock.tm_hour)

  if int(flock.tm_min)<10:

    mins = str(flock.tm_min)

    secs = "0%s" % (str(flock.tm_sec))

  else:

    secs = str(flock.tm_sec)

  then +="]%s.%s.%s" % (hrs,mins,secs)

  return then

def _timer_func ():

  global s1_dpid, s2_dpid, s3_dpid, s4_dpid, s5_dpid,turn

  #print getTheTime(), "sent the port stats request to s1_dpid"

  if turn==0:

      msg = of.ofp_flow_mod()

      msg.command=of.OFPFC_MODIFY_STRICT

      msg.priority =100

      msg.idle_timeout = 0

      msg.hard_timeout = 0

      msg.match.dl_type = 0x0800

      msg.match.nw_dst = "10.0.0.4"

      msg.actions.append(of.ofp_action_output(port = 5))

      core.openflow.getConnection(s1_dpid).send(msg)

      turn=1

      return

  if turn==1:

      msg = of.ofp_flow_mod()

      msg.command=of.OFPFC_MODIFY_STRICT

      msg.priority =100

      msg.idle_timeout = 0

      msg.hard_timeout = 0

      msg.match.dl_type = 0x0800

      msg.match.nw_dst = "10.0.0.4"

      msg.actions.append(of.ofp_action_output(port = 6))

      core.openflow.getConnection(s1_dpid).send(msg)

      turn=2

      return

  if turn==2:

      msg = of.ofp_flow_mod()

      msg.command=of.OFPFC_MODIFY_STRICT

      msg.priority =100

      msg.idle_timeout = 0

      msg.hard_timeout = 0

      msg.match.dl_type = 0x0800

      msg.match.nw_dst = "10.0.0.4"

      msg.actions.append(of.ofp_action_output(port = 4))

      turn=0

      return

def _handle_portstats_received (event):

  global s1_p1,s1_p4, s1_p5, s1_p6, s2_p1, s3_p1, s4_p1

  global pre_s1_p1,pre_s1_p4, pre_s1_p5, pre_s1_p6, pre_s2_p1, pre_s3_p1, pre_s4_p1

  if event.connection.dpid==s1_dpid:

    for f in event.stats:

      if int(f.port_no)<65534:

        if f.port_no==1:

          pre_s1_p1=s1_p1

          s1_p1=f.rx_packets

        if f.port_no==4:

          pre_s1_p4=s1_p4

          s1_p4=f.tx_packets

          #s1_p4=f.tx_bytes

        if f.port_no==5:

          pre_s1_p5=s1_p5

          s1_p5=f.tx_packets

        if f.port_no==6:

          pre_s1_p6=s1_p6

          s1_p6=f.tx_packets

    for f in event.stats:  //非常非常非常坑,原文这一行行首多了一个空格,这里已经是修改好的

       if int(f.port_no)<65534:

         if f.port_no==1:

           pre_s2_p1=s2_p1

           s2_p1=f.rx_packets

           #s2_p1=f.rx_bytes

  if event.connection.dpid==s3_dpid:

     for f in event.stats:

       if int(f.port_no)<65534:

         if f.port_no==1:

           pre_s3_p1=s3_p1

           s3_p1=f.rx_packets

  if event.connection.dpid==s4_dpid:

     for f in event.stats:

       if int(f.port_no)<65534:

         if f.port_no==1:

           pre_s4_p1=s4_p1

           s4_p1=f.rx_packets

def _handle_ConnectionUp (event):

  global s1_dpid, s2_dpid, s3_dpid, s4_dpid, s5_dpid

  print "ConnectionUp: ",dpidToStr(event.connection.dpid)

  #remember the connection dpid for switch

  for m in event.connection.features.ports:

    if m.name == "s1-eth1":

      s1_dpid = event.connection.dpid

      print "s1_dpid=", s1_dpid

    elif m.name == "s2-eth1":

      s2_dpid = event.connection.dpid

      print "s2_dpid=", s2_dpid

    elif m.name == "s3-eth1":

      s3_dpid = event.connection.dpid

    elif m.name == "s4-eth1":

      s4_dpid = event.connection.dpid

      print "s4_dpid=", s4_dpid

    elif m.name == "s5-eth1":

      s5_dpid = event.connection.dpid

      print "s5_dpid=", s5_dpid

  if s1_dpid<>0 and s2_dpid<>0 and s3_dpid<>0 and s4_dpid<>0:

    Timer(1, _timer_func, recurring=True)

def _handle_PacketIn(event):

  global s1_dpid, s2_dpid, s3_dpid, s4_dpid, s5_dpid

  packet=event.parsed

  if event.connection.dpid==s1_dpid:

     a=packet.find('arp')

     if a and a.protodst=="10.0.0.4":

       msg = of.ofp_packet_out(data=event.ofp)

       msg.actions.append(of.ofp_action_output(port=4))

       event.connection.send(msg)

     if a and a.protodst=="10.0.0.5":

       msg = of.ofp_packet_out(data=event.ofp)

       msg.actions.append(of.ofp_action_output(port=5))

       event.connection.send(msg)

     if a and a.protodst=="10.0.0.6":

       msg = of.ofp_packet_out(data=event.ofp)

       msg.actions.append(of.ofp_action_output(port=6))

       event.connection.send(msg)

     if a and a.protodst=="10.0.0.1":

       msg = of.ofp_packet_out(data=event.ofp)

       msg.actions.append(of.ofp_action_output(port=1))

       event.connection.send(msg)

     if a and a.protodst=="10.0.0.2":

       msg = of.ofp_packet_out(data=event.ofp)

       msg.actions.append(of.ofp_action_output(port=2))

       event.connection.send(msg)

     if a and a.protodst=="10.0.0.3":

       msg = of.ofp_packet_out(data=event.ofp)

       msg.actions.append(of.ofp_action_output(port=3))

       event.connection.send(msg)

     msg = of.ofp_flow_mod()

     msg.priority =100

     msg.idle_timeout = 0

     msg.hard_timeout = 0

     msg.match.dl_type = 0x0800

     msg.match.nw_dst = "10.0.0.1"

     msg.actions.append(of.ofp_action_output(port = 1))

     event.connection.send(msg)

     msg = of.ofp_flow_mod()

     msg.priority =100

     msg.idle_timeout = 0

     msg.hard_timeout = 0

     msg.match.dl_type = 0x0800

     msg.match.nw_dst = "10.0.0.2"

     msg.actions.append(of.ofp_action_output(port = 2))

     event.connection.send(msg)

     msg = of.ofp_flow_mod()

     msg.priority =100

     msg.idle_timeout = 0

     msg.hard_timeout = 0

     msg.match.dl_type = 0x0800

     msg.match.nw_dst = "10.0.0.3"

     msg.actions.append(of.ofp_action_output(port = 3))

     event.connection.send(msg)

     msg = of.ofp_flow_mod()

     msg.priority =100

     msg.idle_timeout = 0

     msg.hard_timeout = 1

     msg.match.dl_type = 0x0800

     msg.match.nw_dst = "10.0.0.4"

     msg.actions.append(of.ofp_action_output(port = 4))

     event.connection.send(msg)

     msg = of.ofp_flow_mod()

     msg.priority =100

     msg.idle_timeout = 0

     msg.hard_timeout = 0

     msg.match.dl_type = 0x0800

     msg.match.nw_dst = "10.0.0.5"

     msg.actions.append(of.ofp_action_output(port = 5))

     event.connection.send(msg)

     msg = of.ofp_flow_mod()

     msg.priority =100

     msg.idle_timeout = 0

     msg.hard_timeout = 0

     msg.match.dl_type = 0x0800

     msg.match.nw_dst = "10.0.0.6"

     msg.actions.append(of.ofp_action_output(port = 6))

     event.connection.send(msg)

  elif event.connection.dpid==s2_dpid:

     msg = of.ofp_flow_mod()

     msg.priority =10

     msg.idle_timeout = 0

     msg.hard_timeout = 0

     msg.match.in_port = 1

     msg.match.dl_type=0x0806

     msg.actions.append(of.ofp_action_output(port = 2))

     event.connection.send(msg)

     msg = of.ofp_flow_mod()

     msg.priority =10

     msg.idle_timeout = 0

     msg.hard_timeout = 0

     msg.match.in_port = 1

     msg.match.dl_type=0x0800

     msg.actions.append(of.ofp_action_output(port = 2))

     event.connection.send(msg)

     msg = of.ofp_flow_mod()

     msg.priority =10

     msg.idle_timeout = 0

     msg.hard_timeout = 0

     msg.match.in_port = 2

     msg.match.dl_type=0x0806

     msg.actions.append(of.ofp_action_output(port = 1))

     event.connection.send(msg)

     msg = of.ofp_flow_mod()

     msg.priority =10

     msg.idle_timeout = 0

     msg.hard_timeout = 0

     msg.match.in_port = 2

     msg.match.dl_type=0x0800

     msg.actions.append(of.ofp_action_output(port = 1))

     event.connection.send(msg)

  elif event.connection.dpid==s3_dpid:

     msg = of.ofp_flow_mod()

     msg.priority =10

     msg.idle_timeout = 0

     msg.hard_timeout = 0

     msg.match.in_port = 1

     msg.match.dl_type=0x0806

     msg.actions.append(of.ofp_action_output(port = 2))

     event.connection.send(msg)

     msg = of.ofp_flow_mod()

     msg.priority =10

     msg.idle_timeout = 0

     msg.hard_timeout = 0

     msg.match.in_port = 1

     msg.match.dl_type=0x0800

     msg.actions.append(of.ofp_action_output(port = 2))

     event.connection.send(msg)

     msg = of.ofp_flow_mod()

     msg.priority =10

     msg.idle_timeout = 0

     msg.hard_timeout = 0

     msg.match.in_port = 2

     msg.match.dl_type=0x0806

     msg.actions.append(of.ofp_action_output(port = 1))

     event.connection.send(msg)

     msg = of.ofp_flow_mod()

     msg.priority =10

     msg.idle_timeout = 0

     msg.hard_timeout = 0

     msg.match.in_port = 2

     msg.match.dl_type=0x0800

     msg.actions.append(of.ofp_action_output(port = 1))

     event.connection.send(msg)

  elif event.connection.dpid==s4_dpid:

     msg = of.ofp_flow_mod()

     msg.priority =10

     msg.idle_timeout = 0

     msg.hard_timeout = 0

     msg.match.in_port = 1

     msg.match.dl_type=0x0806

     msg.actions.append(of.ofp_action_output(port = 2))

     event.connection.send(msg)

     msg = of.ofp_flow_mod()

     msg.priority =10

     msg.idle_timeout = 0

     msg.hard_timeout = 0

     msg.match.in_port = 1

     msg.match.dl_type=0x0800

     msg.actions.append(of.ofp_action_output(port = 2))

     event.connection.send(msg)

     msg = of.ofp_flow_mod()

     msg.priority =10

     msg.idle_timeout = 0

     msg.hard_timeout = 0

     msg.match.in_port = 2

     msg.match.dl_type=0x0806

     msg.actions.append(of.ofp_action_output(port = 1))

     event.connection.send(msg)

     msg = of.ofp_flow_mod()

     msg.priority =10

     msg.idle_timeout = 0

     msg.hard_timeout = 0

     msg.match.in_port = 2

     msg.match.dl_type=0x0800

     msg.actions.append(of.ofp_action_output(port = 1))

     event.connection.send(msg)

  elif event.connection.dpid==s5_dpid:

     a=packet.find('arp')

     if a and a.protodst=="10.0.0.4":

       msg = of.ofp_packet_out(data=event.ofp)

       msg.actions.append(of.ofp_action_output(port=4))

       event.connection.send(msg)

     if a and a.protodst=="10.0.0.5":

       msg = of.ofp_packet_out(data=event.ofp)

       msg.actions.append(of.ofp_action_output(port=5))

       event.connection.send(msg)

     if a and a.protodst=="10.0.0.6":

       msg = of.ofp_packet_out(data=event.ofp)

       msg.actions.append(of.ofp_action_output(port=6))

       event.connection.send(msg)

     if a and a.protodst=="10.0.0.1":

       msg = of.ofp_packet_out(data=event.ofp)

       msg.actions.append(of.ofp_action_output(port=1))

       event.connection.send(msg)

     if a and a.protodst=="10.0.0.2":

       msg = of.ofp_packet_out(data=event.ofp)

       msg.actions.append(of.ofp_action_output(port=2))

       event.connection.send(msg)

     if a and a.protodst=="10.0.0.3":

       msg = of.ofp_packet_out(data=event.ofp)

       msg.actions.append(of.ofp_action_output(port=3))

       event.connection.send(msg)

     msg = of.ofp_flow_mod()

     msg.priority =100

     msg.idle_timeout = 0

     msg.hard_timeout = 0

     msg.match.dl_type = 0x0800

     msg.match.nw_dst = "10.0.0.1"

     msg.actions.append(of.ofp_action_output(port = 1))

     event.connection.send(msg)

     msg = of.ofp_flow_mod()

     msg.priority =100

     msg.idle_timeout = 0

     msg.hard_timeout = 0

     msg.match.dl_type = 0x0800

     msg.match.nw_dst = "10.0.0.2"

     msg.actions.append(of.ofp_action_output(port = 2))

     event.connection.send(msg)

     msg = of.ofp_flow_mod()

     msg.priority =100

     msg.idle_timeout = 0

     msg.hard_timeout = 0

     msg.match.dl_type = 0x0800

     msg.match.nw_dst = "10.0.0.3"

     msg.actions.append(of.ofp_action_output(port = 3))

     event.connection.send(msg)

     msg = of.ofp_flow_mod()

     msg.priority =100

     msg.idle_timeout = 0

     msg.hard_timeout = 0

     msg.match.dl_type = 0x0800

     msg.match.nw_dst = "10.0.0.4"

     msg.actions.append(of.ofp_action_output(port = 4))

     event.connection.send(msg)

     msg = of.ofp_flow_mod()

     msg.priority =100

     msg.idle_timeout = 0

     msg.hard_timeout = 0

     msg.match.dl_type = 0x0800

     msg.match.nw_dst = "10.0.0.5"

     msg.actions.append(of.ofp_action_output(port = 5))

     event.connection.send(msg)

     msg = of.ofp_flow_mod()

     msg.priority =100

     msg.idle_timeout = 0

     msg.hard_timeout = 0

     msg.match.dl_type = 0x0800

     msg.match.nw_dst = "10.0.0.6"

     msg.actions.append(of.ofp_action_output(port = 6))

     event.connection.send(msg)

def launch ():

  global start_time

  core.openflow.addListenerByName("PortStatsReceived",_handle_portstats_received)

  core.openflow.addListenerByName("ConnectionUp", _handle_ConnectionUp)

  core.openflow.addListenerByName("PacketIn",_handle_PacketIn)

这段代码原文中是有问题的,如果执行会出现下面的错误:

2. 在~/mininet中创建文件mym.py

# cd mininet
# vim mym.py

脚本内容如下:

#!/usr/bin/python

from mininet.topo import Topo

from mininet.net import Mininet

from mininet.node import CPULimitedHost

from mininet.link import TCLink

from mininet.util import dumpNodeConnections

from mininet.log import setLogLevel

from mininet.node import Controller 

from mininet.cli import CLI

from functools import partial

from mininet.node import RemoteController

import os

class MyTopo(Topo):

    "Single switch connected to n hosts."

    def __init__(self):

        Topo.__init__(self)

        s1=self.addSwitch('s1')

        s2=self.addSwitch('s2')

        s3=self.addSwitch('s3')

        s4=self.addSwitch('s4')

        s5=self.addSwitch('s5') 

        h1=self.addHost('h1')

        h2=self.addHost('h2')

        h3=self.addHost('h3')

        h4=self.addHost('h4')

        h5=self.addHost('h5')

        h6=self.addHost('h6')

        self.addLink(h1, s1, bw=1, delay='10ms', loss=0, max_queue_size=1000, use_htb=True)

        self.addLink(h2, s1, bw=1, delay='10ms', loss=0, max_queue_size=1000, use_htb=True) 

        self.addLink(h3, s1, bw=1, delay='10ms', loss=0, max_queue_size=1000, use_htb=True)

        self.addLink(s1, s2, bw=1, delay='10ms', loss=0, max_queue_size=1000, use_htb=True) 

        self.addLink(s1, s3, bw=1, delay='10ms', loss=0, max_queue_size=1000, use_htb=True) 

        self.addLink(s1, s4, bw=1, delay='10ms', loss=0, max_queue_size=1000, use_htb=True) 

        self.addLink(s2, s5, bw=1, delay='10ms', loss=0, max_queue_size=1000, use_htb=True) 

        self.addLink(s3, s5, bw=1, delay='10ms', loss=0, max_queue_size=1000, use_htb=True)  

        self.addLink(s4, s5, bw=1, delay='10ms', loss=0, max_queue_size=1000, use_htb=True) 

        self.addLink(s5, h4, bw=1, delay='10ms', loss=0, max_queue_size=1000, use_htb=True) 

        self.addLink(s5, h5, bw=1, delay='10ms', loss=0, max_queue_size=1000, use_htb=True) 

        self.addLink(s5, h6, bw=1, delay='10ms', loss=0, max_queue_size=1000, use_htb=True) 

def perfTest():

    "Create network and run simple performance test"

    topo = MyTopo()

    net = Mininet(topo=topo, host=CPULimitedHost, link=TCLink, controller=partial(RemoteController, ip='10.0.0.13', port=6633))
//这里的 ip 改为本地 IP 地址,例如我的是 10.0.2.15 否则会连接不上控制器
net.start() print "Dumping host connections" dumpNodeConnections(net.hosts) h1,h2,h3=net.get('h1','h2','h3') h4,h5,h6=net.get('h4','h5','h6') h1.setMAC("0:0:0:0:0:1") h2.setMAC("0:0:0:0:0:2") h3.setMAC("0:0:0:0:0:3") h4.setMAC("0:0:0:0:0:4") h5.setMAC("0:0:0:0:0:5") h6.setMAC("0:0:0:0:0:6") CLI(net) net.stop() if __name__ == '__main__': setLogLevel('info') perfTest()

这里又是一个坑,参照原文执行会得到以下错误:



因为做实验的时候是在同一台机子上进行,POX 控制器也是部署在本机上,因此在创建拓扑结构时要把控制器的 IP 地址改为本地的 IP 地址

查看 IP 地址:

ifconfig

3. 运行脚本

首先运行 lab_controller.py

# cd pox
# ./pox.py lab_controller



然后运行 mym.py

# cd mininet
# python mym.py



这时观察 pox 控制台,发现出现了一堆 warning 先不理...



在 mininet 中执行 h1 ping -i 0.1 h4,即每秒从 h1 传送 10 个包到 h4



原文中提到「查看虚POX打印出来的结果显示先从 s1_p4 (switch 1, port 4) 发出 10 个包,然后是从 s1_p5 ,接着从 s1_p6 ,

如此循环调度」但是实际过程中在 POX 控制台并没有看到这些信息,重复尝试几次之后,依然看不见。后来在网上看到 POX 是有图形化界面的,也就是 poxdesk,之后利用 pox 的 Web 界面再次进行实验。

poxdesk 安装:

# cd ./pox/ext
# git clone https://github.com/MurphyMc/poxdesk
# cd poxdesk
# wget http://downloads.sourceforge.net/qooxdoo/qooxdoo-2.0.2-sdk.zip
# unzip qooxdoo-2.0.2-sdk.zip
# mv qooxdoo-2.0.2-sdk qx
# cd poxdesk
# ./generate.py
# cd ../../..

参考:SDN常用控制器安装部署之POX篇

到这里 poxdesk 就安装好了。重做实验的流程都不变,只是在执行 pox 脚本时代码改为

./pox.py lab_controller web messenger messenger.log_service messenger.ajax_transport openflow.of_service poxdesk
//通用的命令为:./pox.py 脚本名 web messenger messenger.log_service messenger.ajax_transport openflow.of_service poxdesk

之后再运行 mininet 脚本

然后在浏览器中打开 http://pox-ip:8000/poxdesk 来访问界面,其中pox-ip是本机 IP 地址,例如我的是10.0.2.15

依次点击左下角pox->TableViewer->左上角Switch->第一个交换机00_00_00_00_00_01 观察目的主机 h4 对应的那一行(也就是 nw_dst 为 10.0.0.4/32 的那一行)可以发现 OUTPUT一直在5、6两个端口之间变动





这里还是有一个问题,实验开头说路由规则会在三种情况之间变化,但是这样看来只有两种情况,不知道是什么原因,个人推测应该问题应该出在 POX 脚本上

  • 总结

1. 实验过程中遇到的问题

  • 因为之前的实验在关闭 mininet 之后就可以了,开始实验前我都没有执行

    「sudo mn -c」

    然而这次实验在运行 mininet 脚本之后,想要再次进行实验必须先输入 「sudo mn -c」,否则会报错
  • 在运行 pox 时会出现这样的错误 「error: [Errno 98] Address already in ues」这是因为在上一次实验结束的时候没有关闭 pox 控制器。解决方法:重启...
  • 在 h1 ping h4 一段时间后会出现错误,具体是为什么还没有弄清
  • 其他的问题在实验步骤中都有提到了

2. 收获

  • 熟悉Mininet自定义拓扑脚本的编写
  • 熟悉编写POX脚本动态改变转发规则
  • 这是 Mininet 系列实验做到现在遇到最多问题的一次,主要是原文中代码的错误本身就比较多。解决问题的过程远比实验本身重要的多,收获也更多。

Mininet 系列实验(六)的更多相关文章

  1. Mininet 系列实验(四)

    实验内容 本次实验拓扑图: 在该环境下,h0 向 h1 发送数据包,由于在 mininet 脚本中设置了连接损耗率,在传输过程中会丢失一些包,本次实验的目的是展示如何通过控制器计算路径损耗速率(h0- ...

  2. Mininet 系列实验(三)

    实验内容 基础 Mininet 可视化界面进行自定义拓扑及拓扑设备自定义设置,实现自定义脚本应用. 参考 Mininet可视化应用 实验环境 虚拟机: Oracle VM VirtualBox Ubu ...

  3. Mininet 系列实验(一)

    关于SDN的第一个实验,似乎实验室里的前辈们也都是从这里开始的. 实验内容 使用源码安装Mininet 参考 Mininet使用源码安装 实验环境 虚拟机:Oracle VM VirtualBox U ...

  4. Mininet系列实验(六):Mininet动态改变转发规则实验

    一. 实验目的 熟悉Mininet自定义拓扑脚本的编写:熟悉编写POX脚本动态改变转发规则 二.实验原理 在SDN环境中,控制器可以通过对交换机下发流表操作来控制交换机的转发行为.在本实验中,基于Mi ...

  5. Mininet 系列实验(二)

    实验内容 分别通过命令行创建.Python脚本编写以及交互式界面创建来熟悉Mininet的基本功能. 参考 Mininet命令延伸实验扩展 实验环境 虚拟机:Oracle VM VirtualBox ...

  6. Mininet 系列实验(七)

    实验内容 本实验在基于 Mininet 脚本的不同拓扑环境下使用 OpenDaylight 控制交换机行为.任务一:一台交换机两台主机,从1端口进入的数据流转发到 2 端口,从 2 端口进入的数据流转 ...

  7. Mininet 系列实验(五)

    实验内容 实现一个单个交换机的拓扑,添加一个交换机,和N个主机到网络中.交换机和主机之间的每个链路能够设置带宽.延迟时间.以及丢包率.创建一个包含一个交换机和四个主机的网络,使用iperf测试主机之间 ...

  8. Mininet系列实验(七):Mininet脚本实现控制交换机行为

    1 实验目的 熟悉Mininet自定义拓扑脚本的编写: 掌握使用“ovs-vsctl”命令直接控制Open vSwitch. 2 实验原理 在SDN环境中,控制器可以通过对交换机下发流表操作来控制交换 ...

  9. Mininet系列实验(五):Mininet设置带宽之简单性能测试

    1.实验目的 该实验通过Mininet学习python自定义拓扑实现,可在python脚本文件中设计任意想要的拓扑,简单方便,并通过设置交换机和主机之间链路的带宽.延迟及丢包率,测试主机之间的性能.在 ...

随机推荐

  1. NO--13微信小程序,左右联动

    写在前面: 从2016年张小龙发布微信小程序这种新的形态,到2017年小程序的不温不火,再到今年小程序的大爆发,从一度刷爆朋友圈的‘头脑王者’,再到春节聚会坐在一起的火爆小游戏“跳一跳",都 ...

  2. shell编程基础(转载)

    Shell编程基础 原作者 Leal:请参阅页面底部的编者列表. 授权许可: 创作共享署名协议 GNU 自由文档许可证 注意:本文仍然在持续的修订之中,且错漏之处可能较多.如果能够阅读英语的话,可以考 ...

  3. 如何判断Map中的key或value是什么类型

    在上班写工具类时,遇到了一个问题,将xml文件的节点都放入map容器中时,map的value也是一个map,导致取map的value时,需要判断这个value的数据类型,用到了一下说的这些知识: 对于 ...

  4. Windows Server平台 confluence6.7.1安装与破解

    1.1硬件需求建议: CPU:32/64 bit 2.27GHz双核心以上之CPU: 内存:8GB以上: 硬盘:300GB,7200转以上: 建议数据库.Confluence等各自独立一台服务器. 1 ...

  5. sqli-labs学习笔记 DAY5

    DAY 5 sqli-labs lesson 26a 闭合符号为单引号和括号,并且不回显错误,如果服务器是Linux,尝试%a0代替空格,这里尝试使用布尔型 数据库名长度:?id=1')&&a ...

  6. SmartRaiden 和 Lighting Network 进行去中心化跨链原子资产交换

    作者介绍 虫洞社区·签约作者 steven bai 前言 如果能够进行以太坊和比特币跨链原子资产交换,是不是一件很酷的事情? 目前链下的扩容方式有很多,最广为人知的就是比特币的闪电网络和以太坊的雷电网 ...

  7. [leetcode-921-Minimum Add to Make Parentheses Valid]

    Given a string S of '(' and ')' parentheses, we add the minimum number of parentheses ( '(' or ')', ...

  8. Daily Scrum (2015/10/30)

    据组员们反映其他组都会有休息时间,所以我和PM讨论把每周5晚上作为日常休息时间,这一天组员们自由阅读.

  9. Scrum Meeting 10.27

    1.会议内容: 姓名 今日任务 明日任务 预估时间(h) 徐越 配置SQLserver 学习本地和服务器之间的通信 4 卞忠昊 找上届代码的bug 学习安卓布局(layout)的有关知识,研究上届学长 ...

  10. In-band Network Function Telemetry

    文章名称:In-band Network Function Telemetry 发表时间:2018 期刊来源:SIGCOMM I Introduction (介绍) NFV运行在商品服务器上,在网络功 ...