2019 SDN上机第4次作业
1.解压安装OpenDayLight控制器
tar zxvf distribution-karaf-0.4.4-Beryllium-SR4.tar.gz
2.启动并安装插件
feature:install odl-restconf
feature:install odl-l2switch-switch-ui
feature:install odl-openflowplugin-all
feature:install odl-mdsal-apidocs
feature:install odl-dlux-core
feature:install odl-dlux-node
feature:install odl-dlux-yangui
3.用Python脚本搭建如下拓扑,连接OpenDayLight控制器
from mininet.topo import Topo
class Mytopo(Topo):
def __init__(self):
Topo.__init__(self)
sw=self.addSwitch('s1')
count=1
for i in range(3):
host = self.addHost('h{}'.format(count))
self.addLink(host,sw,1,count)
count = count + 1
topos = {'mytopo': (lambda:Mytopo())}
4.在控制器提供的WEB UI中下发流表使h2 20s内ping不通h3,20s后恢复
5.借助Postman通过OpenDayLight的北向接口下发流表,再利用OpenDayLight北向接口查看已下发的流表