2019 SDN上机第2次作业
1.利用mininet创建如下拓扑,要求拓扑支持OpenFlow 1.3协议,主机名、交换机名以及端口对应正确,请给出拓扑Mininet执行结果,展示端口连接情况 创建fattree2.py文档,并编写py代码,代码如下: 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): def __init__(self): Topo.__init__(self) s=[] for i in range(2): sw = self.addSwitch('s{}'.format(i+1)) switchs.append(sw) count=1 for sw in switchs[0:2]: for i in range(3): host = self.addHost('h{}'.format(count)) self.addLink(sw,host) count += 1 self.addLink(switchs[0]