2019 SDN上机第2次作业 CWC
1. 利用mininet创建如下拓扑,要求拓扑支持OpenFlow 1.3协议,主机名、交换机名以及端口对应正确,请给出拓扑Mininet执行结果,展示端口连接情况 利用Python脚本创建拓扑 from mininet.topo import Topo from mininet.net import Mininet from mininet.node import RemoteController,CPULimitedHost from mininet.link import TCLink from mininet.util import dumpNodeConnections class MyTopo(Topo): "Simple topology example." def __init__(self): Topo.__init__(self) switches = [] # add switches (s1 and s2) for i in range(2): sw = self.addSwitch("s{}".format(i + 1)) switches.append(sw) # add hosts and links count = 1 for sw in switches: for i in range(3): h = self.addHost("h{}"