实验 6:OpenDaylight 实验——OpenDaylight 及 Postman实现流表下发


一、 实验目的

熟悉 Postman 的使用;熟悉如何使用 OpenDaylight 通过 Postman 下发流表。


二 、实验 任务

流表有软超时和硬超时的概念,分别对应流表中的 idle_timeout 和 hard_timeout。
idle timeout:如果值为非0,那么在对应的时间内如果没有数据包匹配流表,时间到该流表将被删除;值为 0 不设软超时机制。
hard timeout:如果值为非0,那么在对应的时间内不论是否有数据包匹配流表,时间到流表都会被删除;值为 0 不设硬超时机制。


三 、 实验步骤

1. 实验环境

安装了 ubuntu-16.04-desktop amd64 的虚拟机


2. 实验过程

SDNLAB 实验参考资料:https://www.sdnlab.com/22563.html

(1)Postman 安装
https://www.postman.com/downloads/
下载 Linux 版本,解压到/home/amu448/下即可。进入目录,运行 Postman 文件即可


(2)清理旧数据

启动 OpenDaylight,通过 Postman 的 Delete 动作清空残留流表
DELETE
http://127.0.0.1:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/
清空 Mininet 数据

$ sudo mn-c


(3)生成拓扑并连接 OpenDaylight

$ sudo mn --topo=single,3 --controller=remote,ip=127.0.0.1,port=6633 --switch ovsk,protocols=OpenFlow13


(4)使用 Postman 填入 JSON 格式的 http 请求

先在 Mininet CLI 中运行 h1 ping h3,再在 Postman 处选择动作 PUT,填入硬超时 流表内容(见附录),可以先阅读一下流表的内容,关注 match 匹配字段以及对 应的 instructions 指令中的动作 action,这里是直接 drop 数据包。为了让流表能 够匹配,将优先级 priority 调到最大。点击右上角 send,发送请求。


实验小结

本次实验熟悉了Postman 的使用,在实验过程中,没遇到什么严重问题。

posted on 2020-10-21 12:28  FZU_阿木_031702448  阅读(115)  评论(0编辑  收藏  举报