实验四

实验4:开源控制器实践——OpenDaylight

(一)基本要求

  1. 利用Mininet平台搭建下图所示网络拓扑,并连接OpenDaylight控制器;

     

     

  2. 通过Postman工具调用OpenDaylight提供的API下发流表,实现拓扑内主机h1和h3网络中断10s。

 

 

 

(二)进阶要求
查找资料,整理和记录ODL控制器主要的REST API文档,包括但不限于ODL提供的文档链接,获取拓扑的交换机、获取流表状态数量、获取特定交换机端口的状态、新增修改和删除流表等。
1.获取拓扑的交换机

http://127.0.0.1:8181/apidoc/explorer/index.html#!/network-topology(2013-10-21)

url:http://127.0.0.1:8181/restconf/config/network-topology:network-topology/

 

 

 

 

2.获取拓扑结构

http://127.0.0.1:8181/apidoc/explorer/index.html#!/network-topology(2013-07-12)

 

 

 

 


3.流表信息
获取交换机中某个流表的信息
127.0.0.1:8181/apidoc/explorer/index.html#!/opendaylight-inventory(2013-08-19)/GET_flow_get_215

 

 

 

 


4.组表的查看
127.0.0.1:8181/apidoc/explorer/index.html#!/opendaylight-inventory(2013-08-19)/GET_group_get_141

 

 

 


5.获取特定交换机端口的状态
127.0.0.1:8181/apidoc/explorer/index.html#!/opendaylight-port-statistics(2013-12-14)/get_node_connector_statistics_post_0

 

 

 

 

6.获取指定交换机的信息
127.0.0.1:8181/apidoc/explorer/index.html#!/opendaylight-inventory(2013-08-19)/GET_node_get_5

 

 


实验小结:
  在本次实验中,建立拓扑后,登录opendaylight,在mininet中pingall后,opendaylight才会显示拓扑图。postman启动的方法是先进入到postman目录下,输入./Postman即可启动。在下发流表时,应先输入命令“h1 ping h3”,再在postman中发送put,才会在ping中显示出时间间隔。当时先put再pingall,没有发现中间有间隔10秒时间。实验中学习了postman的工作方式以及通过opendaylight提供的api接口发送delete和put等命令来实现流表的清空和下发。

posted @ 2022-10-13 12:51  WSDT  阅读(32)  评论(0编辑  收藏  举报