实验四OpenDaylight

(一)基本要求

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

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

(二)进阶要求

  1. 查找资料,整理和记录ODL控制器主要的REST API文档,包括但不限于ODL提供的文档链接,获取拓扑的交换机、获取流表状态数量、获取特定交换机端口的状态、新增修改和删除流表等。
    a. 获取拓扑的交换机
    http://127.0.0.1:8181/apidoc/explorer/index.html#!/network-topology(2013-10-21)/GET_network_topology_get_183

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

    c. 获取流表状态数量
    http://127.0.0.1:8181/apidoc/explorer/index.html#!/opendaylight-inventory(2013-08-19)/GET_flow_statistics_get_265

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

    e. 获取所有交换机端口的状态
    http://127.0.0.1:8181/apidoc/explorer/index.html#!/opendaylight-port-statistics(2013-12-14)/get_all_node_connectors_statistics_post_1

    f. 新增修改和删除流表
    http://127.0.0.1:8181/apidoc/explorer/index.html#!/opendaylight-inventory(2013-08-19)/GET_flow_get_198

    g. 链路信息
    http://127.0.0.1:8181/apidoc/explorer/index.html#!/network-topology(2013-10-21)/GET_link_get_94

    h. 获取拓扑所有交换机
    http://127.0.0.1:8181/apidoc/explorer/index.html#!/opendaylight-inventory(2013-08-19)/GET_nodes_get_1

(三)总结

  1. 本次实验难度适中。
  2. 先在Mininet CLI中运行h1 ping h3,再在Postman处选择动作PUT
  3. 先在Mininet上pingall才会在ODL 的用户界面看到主机
  4. 经过对ODL控制器主要的REST API文档的查找,理解了如何获取拓扑的交换机、获取流表状态数量、获取特定交换机端口的状态、新增修改和删除流表等。
  5. 前期Postman工具使用不熟练,熟练之后就使用Postman工具调用OpenDaylight API接口下发流表。
posted @ 2022-10-16 12:53  smilecomzyb  阅读(25)  评论(0编辑  收藏  举报