SDN第三次上机作业
1.创建以下拓扑(可采用任意方式)
#!/user/bin/python
from mininet.topo import Topo
class topo1(Topo):
def __init__(self):
Topo.__init__(self)
s1 = self.addSwitch('s1')
s2 = self.addSwitch('s2')
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)
self.addLink(h2, s1)
self.addLink(h3, s1)
self.addLink(h4, s2)
self.addLink(h5, s2)
self.addLink(h6, s2)
self.addLink(s1, s2)
topos = {"topo1": (lambda: topo1())}
2.利用OVS命令下发流表,实现VLAN功能
3.利用OVS命令查看流表
4.验证连通性
5.Wireshark抓包验证