SDN 下用ODL实现QoS保障(5)-获取拓扑
来源:互联网 发布:英语视频翻译软件 编辑:程序博客网 时间:2024/05/21 22:49
在postman里面发送如下请求
URL=http://127.0.0.1:8181/restconf/operational/network-topology:network-topology/topology/flow:1
ACTION=GET
其他参数与以前保持一致
返回结果如下:
{ "topology": [ { "topology-id": "flow:1", "node": [ { "node-id": "openflow:3", "opendaylight-topology-inventory:inventory-node-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:3']", "termination-point": [ { "tp-id": "openflow:3:5", "opendaylight-topology-inventory:inventory-node-connector-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:3']/opendaylight-inventory:node-connector[opendaylight-inventory:id='openflow:3:5']" }, { "tp-id": "openflow:3:LOCAL", "opendaylight-topology-inventory:inventory-node-connector-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:3']/opendaylight-inventory:node-connector[opendaylight-inventory:id='openflow:3:LOCAL']" }, { "tp-id": "openflow:3:2", "opendaylight-topology-inventory:inventory-node-connector-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:3']/opendaylight-inventory:node-connector[opendaylight-inventory:id='openflow:3:2']" }, { "tp-id": "openflow:3:1", "opendaylight-topology-inventory:inventory-node-connector-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:3']/opendaylight-inventory:node-connector[opendaylight-inventory:id='openflow:3:1']" }, { "tp-id": "openflow:3:4", "opendaylight-topology-inventory:inventory-node-connector-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:3']/opendaylight-inventory:node-connector[opendaylight-inventory:id='openflow:3:4']" }, { "tp-id": "openflow:3:3", "opendaylight-topology-inventory:inventory-node-connector-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:3']/opendaylight-inventory:node-connector[opendaylight-inventory:id='openflow:3:3']" } ] }, { "node-id": "openflow:4", "opendaylight-topology-inventory:inventory-node-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:4']" }, { "node-id": "openflow:1", "opendaylight-topology-inventory:inventory-node-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:1']" }, { "node-id": "openflow:2", "opendaylight-topology-inventory:inventory-node-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:2']", "termination-point": [ { "tp-id": "openflow:2:1", "opendaylight-topology-inventory:inventory-node-connector-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:2']/opendaylight-inventory:node-connector[opendaylight-inventory:id='openflow:2:1']" }, { "tp-id": "openflow:2:LOCAL", "opendaylight-topology-inventory:inventory-node-connector-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:2']/opendaylight-inventory:node-connector[opendaylight-inventory:id='openflow:2:LOCAL']" }, { "tp-id": "openflow:2:3", "opendaylight-topology-inventory:inventory-node-connector-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:2']/opendaylight-inventory:node-connector[opendaylight-inventory:id='openflow:2:3']" }, { "tp-id": "openflow:2:2", "opendaylight-topology-inventory:inventory-node-connector-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:2']/opendaylight-inventory:node-connector[opendaylight-inventory:id='openflow:2:2']" }, { "tp-id": "openflow:2:5", "opendaylight-topology-inventory:inventory-node-connector-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:2']/opendaylight-inventory:node-connector[opendaylight-inventory:id='openflow:2:5']" }, { "tp-id": "openflow:2:4", "opendaylight-topology-inventory:inventory-node-connector-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:2']/opendaylight-inventory:node-connector[opendaylight-inventory:id='openflow:2:4']" } ] }, { "node-id": "host:00:00:00:00:00:02", "termination-point": [ { "tp-id": "host:00:00:00:00:00:02" } ], "host-tracker-service:attachment-points": [ { "tp-id": "openflow:1:2", "corresponding-tp": "host:00:00:00:00:00:02", "active": true } ], "host-tracker-service:id": "00:00:00:00:00:02", "host-tracker-service:addresses": [ { "id": 1, "mac": "00:00:00:00:00:02", "last-seen": 1510303270225, "ip": "10.0.0.2", "first-seen": 1510303270225 } ] }, { "node-id": "host:00:00:00:00:00:01", "termination-point": [ { "tp-id": "host:00:00:00:00:00:01" } ], "host-tracker-service:attachment-points": [ { "tp-id": "openflow:1:1", "corresponding-tp": "host:00:00:00:00:00:01", "active": true } ], "host-tracker-service:id": "00:00:00:00:00:01", "host-tracker-service:addresses": [ { "id": 0, "mac": "00:00:00:00:00:01", "last-seen": 1510303270184, "ip": "10.0.0.1", "first-seen": 1510303270184 } ] }, { "node-id": "host:00:00:00:00:00:06", "termination-point": [ { "tp-id": "host:00:00:00:00:00:06" } ], "host-tracker-service:attachment-points": [ { "tp-id": "openflow:3:2", "corresponding-tp": "host:00:00:00:00:00:06", "active": true } ], "host-tracker-service:id": "00:00:00:00:00:06", "host-tracker-service:addresses": [ { "id": 5, "mac": "00:00:00:00:00:06", "last-seen": 1510303270726, "ip": "10.0.0.6", "first-seen": 1510303270726 } ] }, { "node-id": "host:00:00:00:00:00:05", "termination-point": [ { "tp-id": "host:00:00:00:00:00:05" } ], "host-tracker-service:attachment-points": [ { "tp-id": "openflow:3:1", "corresponding-tp": "host:00:00:00:00:00:05", "active": true } ], "host-tracker-service:id": "00:00:00:00:00:05", "host-tracker-service:addresses": [ { "id": 4, "mac": "00:00:00:00:00:05", "last-seen": 1510303270554, "ip": "10.0.0.5", "first-seen": 1510303270554 } ] }, { "node-id": "openflow:5", "opendaylight-topology-inventory:inventory-node-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:5']", "termination-point": [ { "tp-id": "openflow:5:4", "opendaylight-topology-inventory:inventory-node-connector-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:5']/opendaylight-inventory:node-connector[opendaylight-inventory:id='openflow:5:4']" }, { "tp-id": "openflow:5:LOCAL", "opendaylight-topology-inventory:inventory-node-connector-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:5']/opendaylight-inventory:node-connector[opendaylight-inventory:id='openflow:5:LOCAL']" }, { "tp-id": "openflow:5:3", "opendaylight-topology-inventory:inventory-node-connector-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:5']/opendaylight-inventory:node-connector[opendaylight-inventory:id='openflow:5:3']" }, { "tp-id": "openflow:5:2", "opendaylight-topology-inventory:inventory-node-connector-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:5']/opendaylight-inventory:node-connector[opendaylight-inventory:id='openflow:5:2']" }, { "tp-id": "openflow:5:1", "opendaylight-topology-inventory:inventory-node-connector-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:5']/opendaylight-inventory:node-connector[opendaylight-inventory:id='openflow:5:1']" } ] }, { "node-id": "host:00:00:00:00:00:04", "termination-point": [ { "tp-id": "host:00:00:00:00:00:04" } ], "host-tracker-service:attachment-points": [ { "tp-id": "openflow:2:2", "corresponding-tp": "host:00:00:00:00:00:04", "active": true } ], "host-tracker-service:id": "00:00:00:00:00:04", "host-tracker-service:addresses": [ { "id": 3, "mac": "00:00:00:00:00:04", "last-seen": 1510303270415, "ip": "10.0.0.4", "first-seen": 1510303270415 } ] }, { "node-id": "host:00:00:00:00:00:03", "termination-point": [ { "tp-id": "host:00:00:00:00:00:03" } ], "host-tracker-service:attachment-points": [ { "tp-id": "openflow:2:1", "corresponding-tp": "host:00:00:00:00:00:03", "active": true } ], "host-tracker-service:id": "00:00:00:00:00:03", "host-tracker-service:addresses": [ { "id": 2, "mac": "00:00:00:00:00:03", "last-seen": 1510303270281, "ip": "10.0.0.3", "first-seen": 1510303270281 } ] }, { "node-id": "host:00:00:00:00:00:08", "termination-point": [ { "tp-id": "host:00:00:00:00:00:08" } ], "host-tracker-service:attachment-points": [ { "tp-id": "openflow:4:2", "corresponding-tp": "host:00:00:00:00:00:08", "active": true } ], "host-tracker-service:id": "00:00:00:00:00:08", "host-tracker-service:addresses": [ { "id": 7, "mac": "00:00:00:00:00:08", "last-seen": 1510303271138, "ip": "10.0.0.8", "first-seen": 1510303271138 } ] }, { "node-id": "host:00:00:00:00:00:07", "termination-point": [ { "tp-id": "host:00:00:00:00:00:07" } ], "host-tracker-service:attachment-points": [ { "tp-id": "openflow:4:1", "corresponding-tp": "host:00:00:00:00:00:07", "active": true } ], "host-tracker-service:id": "00:00:00:00:00:07", "host-tracker-service:addresses": [ { "id": 6, "mac": "00:00:00:00:00:07", "last-seen": 1510303270916, "ip": "10.0.0.7", "first-seen": 1510303270916 } ] } ], "link": [ { "link-id": "openflow:2:2/host:00:00:00:00:00:04", "destination": { "dest-node": "host:00:00:00:00:00:04", "dest-tp": "host:00:00:00:00:00:04" }, "source": { "source-tp": "openflow:2:2", "source-node": "openflow:2" } }, { "link-id": "host:00:00:00:00:00:02/openflow:1:2", "destination": { "dest-node": "openflow:1", "dest-tp": "openflow:1:2" }, "source": { "source-tp": "host:00:00:00:00:00:02", "source-node": "host:00:00:00:00:00:02" } }, { "link-id": "openflow:4:1/host:00:00:00:00:00:07", "destination": { "dest-node": "host:00:00:00:00:00:07", "dest-tp": "host:00:00:00:00:00:07" }, "source": { "source-tp": "openflow:4:1", "source-node": "openflow:4" } }, { "link-id": "host:00:00:00:00:00:01/openflow:1:1", "destination": { "dest-node": "openflow:1", "dest-tp": "openflow:1:1" }, "source": { "source-tp": "host:00:00:00:00:00:01", "source-node": "host:00:00:00:00:00:01" } }, { "link-id": "openflow:4:4", "destination": { "dest-node": "openflow:1", "dest-tp": "openflow:1:4" }, "source": { "source-tp": "openflow:4:4", "source-node": "openflow:4" } }, { "link-id": "openflow:3:5", "destination": { "dest-node": "openflow:5", "dest-tp": "openflow:5:3" }, "source": { "source-tp": "openflow:3:5", "source-node": "openflow:3" } }, { "link-id": "openflow:5:3", "destination": { "dest-node": "openflow:3", "dest-tp": "openflow:3:5" }, "source": { "source-tp": "openflow:5:3", "source-node": "openflow:5" } }, { "link-id": "openflow:5:2", "destination": { "dest-node": "openflow:2", "dest-tp": "openflow:2:5" }, "source": { "source-tp": "openflow:5:2", "source-node": "openflow:5" } }, { "link-id": "openflow:2:5", "destination": { "dest-node": "openflow:5", "dest-tp": "openflow:5:2" }, "source": { "source-tp": "openflow:2:5", "source-node": "openflow:2" } }, { "link-id": "openflow:3:4", "destination": { "dest-node": "openflow:4", "dest-tp": "openflow:4:3" }, "source": { "source-tp": "openflow:3:4", "source-node": "openflow:3" } }, { "link-id": "openflow:4:3", "destination": { "dest-node": "openflow:3", "dest-tp": "openflow:3:4" }, "source": { "source-tp": "openflow:4:3", "source-node": "openflow:4" } }, { "link-id": "host:00:00:00:00:00:05/openflow:3:1", "destination": { "dest-node": "openflow:3", "dest-tp": "openflow:3:1" }, "source": { "source-tp": "host:00:00:00:00:00:05", "source-node": "host:00:00:00:00:00:05" } }, { "link-id": "openflow:4:5", "destination": { "dest-node": "openflow:5", "dest-tp": "openflow:5:4" }, "source": { "source-tp": "openflow:4:5", "source-node": "openflow:4" } }, { "link-id": "openflow:5:4", "destination": { "dest-node": "openflow:4", "dest-tp": "openflow:4:5" }, "source": { "source-tp": "openflow:5:4", "source-node": "openflow:5" } }, { "link-id": "openflow:1:3", "destination": { "dest-node": "openflow:2", "dest-tp": "openflow:2:3" }, "source": { "source-tp": "openflow:1:3", "source-node": "openflow:1" } }, { "link-id": "openflow:1:1/host:00:00:00:00:00:01", "destination": { "dest-node": "host:00:00:00:00:00:01", "dest-tp": "host:00:00:00:00:00:01" }, "source": { "source-tp": "openflow:1:1", "source-node": "openflow:1" } }, { "link-id": "openflow:3:1/host:00:00:00:00:00:05", "destination": { "dest-node": "host:00:00:00:00:00:05", "dest-tp": "host:00:00:00:00:00:05" }, "source": { "source-tp": "openflow:3:1", "source-node": "openflow:3" } }, { "link-id": "openflow:1:5", "destination": { "dest-node": "openflow:5", "dest-tp": "openflow:5:1" }, "source": { "source-tp": "openflow:1:5", "source-node": "openflow:1" } }, { "link-id": "openflow:5:1", "destination": { "dest-node": "openflow:1", "dest-tp": "openflow:1:5" }, "source": { "source-tp": "openflow:5:1", "source-node": "openflow:5" } }, { "link-id": "openflow:3:3", "destination": { "dest-node": "openflow:2", "dest-tp": "openflow:2:4" }, "source": { "source-tp": "openflow:3:3", "source-node": "openflow:3" } }, { "link-id": "openflow:2:4", "destination": { "dest-node": "openflow:3", "dest-tp": "openflow:3:3" }, "source": { "source-tp": "openflow:2:4", "source-node": "openflow:2" } }, { "link-id": "openflow:1:4", "destination": { "dest-node": "openflow:4", "dest-tp": "openflow:4:4" }, "source": { "source-tp": "openflow:1:4", "source-node": "openflow:1" } }, { "link-id": "openflow:2:3", "destination": { "dest-node": "openflow:1", "dest-tp": "openflow:1:3" }, "source": { "source-tp": "openflow:2:3", "source-node": "openflow:2" } }, { "link-id": "host:00:00:00:00:00:04/openflow:2:2", "destination": { "dest-node": "openflow:2", "dest-tp": "openflow:2:2" }, "source": { "source-tp": "host:00:00:00:00:00:04", "source-node": "host:00:00:00:00:00:04" } }, { "link-id": "host:00:00:00:00:00:03/openflow:2:1", "destination": { "dest-node": "openflow:2", "dest-tp": "openflow:2:1" }, "source": { "source-tp": "host:00:00:00:00:00:03", "source-node": "host:00:00:00:00:00:03" } }, { "link-id": "openflow:2:1/host:00:00:00:00:00:03", "destination": { "dest-node": "host:00:00:00:00:00:03", "dest-tp": "host:00:00:00:00:00:03" }, "source": { "source-tp": "openflow:2:1", "source-node": "openflow:2" } }, { "link-id": "host:00:00:00:00:00:06/openflow:3:2", "destination": { "dest-node": "openflow:3", "dest-tp": "openflow:3:2" }, "source": { "source-tp": "host:00:00:00:00:00:06", "source-node": "host:00:00:00:00:00:06" } }, { "link-id": "host:00:00:00:00:00:07/openflow:4:1", "destination": { "dest-node": "openflow:4", "dest-tp": "openflow:4:1" }, "source": { "source-tp": "host:00:00:00:00:00:07", "source-node": "host:00:00:00:00:00:07" } }, { "link-id": "host:00:00:00:00:00:08/openflow:4:2", "destination": { "dest-node": "openflow:4", "dest-tp": "openflow:4:2" }, "source": { "source-tp": "host:00:00:00:00:00:08", "source-node": "host:00:00:00:00:00:08" } }, { "link-id": "openflow:4:2/host:00:00:00:00:00:08", "destination": { "dest-node": "host:00:00:00:00:00:08", "dest-tp": "host:00:00:00:00:00:08" }, "source": { "source-tp": "openflow:4:2", "source-node": "openflow:4" } }, { "link-id": "openflow:1:2/host:00:00:00:00:00:02", "destination": { "dest-node": "host:00:00:00:00:00:02", "dest-tp": "host:00:00:00:00:00:02" }, "source": { "source-tp": "openflow:1:2", "source-node": "openflow:1" } }, { "link-id": "openflow:3:2/host:00:00:00:00:00:06", "destination": { "dest-node": "host:00:00:00:00:00:06", "dest-tp": "host:00:00:00:00:00:06" }, "source": { "source-tp": "openflow:3:2", "source-node": "openflow:3" } } ] } ]}
在返回结果的link节点,我们可以看到其中罗列出了主机或者交换机的一个端口与另一个交换机或者主机的端口之间连接关系。
用这些数据我们可以轻易的画出,交换机之间的拓扑关系如下图所示。
至此,获取拓扑就告一段落了。
阅读全文
0 0
- SDN 下用ODL实现QoS保障(5)-获取拓扑
- SDN 下用ODL实现QoS保障(6)-基于Java获取拓扑的封装
- SDN 下用ODL实现QoS保障(2)-创建网络拓扑
- SDN 下用ODL实现QoS保障(4)-OVS与ODL交互
- SDN 下用ODL实现QoS保障(1)-环境搭建
- SDN 下用ODL实现QoS保障(3)-OVS相关命令介绍
- SDN相关组织之ODL(opendaylight)
- 谈谈SDN保障下的双十一
- SDN之QoS--1:实验环境介绍(Floodlight)
- IPTV qos保障&视频增强
- Ceph QoS 初探(下)
- Ceph QoS 初探(下)
- WINDOWS下利用QOS实现流量控制
- Liunx下Qos功能实现简析
- linux下ipv6的Qos限速实现
- 企业IP电话部署之保障QoS
- QoS保障的不同的方面
- 常用的音视频QoS保障技术
- springmvc定义全局异常处理
- Linux 制作动/静态库-LS11
- 70.设计模式笔记-命令模式
- Spring Boot & Spring MVC 异常处理的N种方法
- Kubernetes离线安装、Kubernetes二进制文件方式安装
- SDN 下用ODL实现QoS保障(5)-获取拓扑
- 七步精通Python机器学习
- boot.img的解包与打包
- Python之33个关键字详解
- thinkphp5 验证码刷新 谷歌浏览器可以,火狐不行解决办法
- docker 镜像的迁移
- 7.1.1 Launcher3 默认桌面应用奇特点
- RTP协议详解(H264码流 & PS流)
- 浅谈几种服务器端模型——epoll