环境及软件版本说明

===

SN-Controller:

CPU: 2 Cores

RAM: 4GB

Disk: 32GB

Operating System: CentOS7 x86_64 1611(Linux 3.10.0-514) Infrastructure Server

IP1: 10.0.3.100/24 (Public Network)

IP2: 172.16.3.100/24 (SDN Network)

===

OpenDaylight: Boron

下载地址

参考文献

L2 Switch User Guide

《OpenDaylight应用指南》(唐宏 等编著)

L2 Switch架构

L2 Switch项目包含以下几个部分:

  • Packet Handler (包处理) :对发往控制器的数据包进行解析并将数据包正确地转发
  • Loop Remover (环路消除) :消除网络链路中的环路
  • Arp Handler (ARP处理) :解析并处理ARP数据包
  • Address Tracker (地址跟踪) :学习网络中的MAC或IP
  • Host Tracker (主机跟踪) :跟踪网络中的主机位置
  • L2 Switch Main (二层交换主要部件) :根据网络流量对每一个交换机下发流表

安装L2Switch模块

进入karaf控制台,进行以下的指令安装:

opendaylight-user@root>feature:install odl-l2switch-all

odl-l2switch-all包含以下几个模块:

  • odl-l2switch-switch
  • odl-l2switch-switch-rest
  • odl-l2switch-switch-ui
  • odl-l2switch-hosttracker
  • odl-l2switch-addresstracker
  • odl-l2switch-arphandler
  • odl-l2switch-loopremover
  • odl-l2switch-packethandler

功能体验

使用Mininet创建拓扑

Mininet虚拟机参数:

  • HostName:mininet-vm1
  • CPU: 2核
  • RAM: 4GB
  • IP1:10.0.3.101(Public Network)
  • IP2: 172.16.3.101(SDN Network)

在mininet-vm1中创建包含3个交换机,每台交换机各连1台主机的拓扑,并产生网络流量(Ping):

mininet@mininet-vm1:~$ sudo mn --controller=remote,ip=10.0.3.100 --mac --topo=linear,3 --switch ovsk,protocols=OpenFlow13
mininet> pingall

此时在ODL的控制页面中的Topology标签中可以看到网络拓扑。

地址学习检测

在本地使用Rest调试工具(如Opera的RestMan)往ODL控制器发送以下Rest请求,按提示输入用户名(admin)和密码(admin)后,可以查看第一个交换机第一个端口所学习到的MAC和IP地址。

http://10.0.3.100:8181/restconf/operational/opendaylight-inventory:nodes/node/openflow:1/node-connector/openflow:1:1

可以看到响应部分的内容:

{"node-connector": [{"id": "openflow:1:1","flow-node-inventory:state": {"link-down": false,"live": false,"blocked": false},"flow-node-inventory:name": "s1-eth1","flow-node-inventory:maximum-speed": 0,"flow-node-inventory:configuration": "","flow-node-inventory:supported": "","flow-node-inventory:peer-features": "","flow-node-inventory:port-number": "1","flow-node-inventory:advertised-features": "","flow-node-inventory:current-feature": "ten-gb-fd copper","flow-node-inventory:hardware-address": "12:ea:18:e9:ee:28","flow-node-inventory:current-speed": 10000000,"opendaylight-port-statistics:flow-capable-node-connector-statistics": {"transmit-drops": 0,"receive-frame-error": 0,"receive-drops": 0,"receive-crc-error": 0,"bytes": {"transmitted": 10725,"received": 560},"duration": {"nanosecond": 462000000,"second": 560},"receive-errors": 0,"transmit-errors": 0,"receive-over-run-error": 0,"collision-count": 0,"packets": {"transmitted": 129,"received": 8}},"address-tracker:addresses": [{"id": 0,"first-seen": 1494576603869,"mac": "00:00:00:00:00:01","last-seen": 1494576603869,"ip": "10.0.0.1"}]}]
}

主机检测

往ODL控制器发送下面的Rest请求,可以查看到全网络链路的所有主机(包括交换机与普通主机)以及之间的链接情况。

http://10.0.3.100:8181/restconf/operational/network-topology:network-topology/topology/flow:1/

得到的响应内容如下:

{"topology": [{"topology-id": "flow:1","node": [{"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:3: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": 0,"mac": "00:00:00:00:00:03","first-seen": 1494578133413,"last-seen": 1494578133413,"ip": "10.0.0.3"}]},{"node-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: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: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: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']"}],"opendaylight-topology-inventory:inventory-node-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:2']"},{"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": 1,"mac": "00:00:00:00:00:01","first-seen": 1494578133519,"last-seen": 1494578133519,"ip": "10.0.0.1"}]},{"node-id": "openflow:1","termination-point": [{"tp-id": "openflow:1:1","opendaylight-topology-inventory:inventory-node-connector-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:1']/opendaylight-inventory:node-connector[opendaylight-inventory:id='openflow:1:1']"},{"tp-id": "openflow:1:2","opendaylight-topology-inventory:inventory-node-connector-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:1']/opendaylight-inventory:node-connector[opendaylight-inventory:id='openflow:1:2']"},{"tp-id": "openflow:1:LOCAL","opendaylight-topology-inventory:inventory-node-connector-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:1']/opendaylight-inventory:node-connector[opendaylight-inventory:id='openflow:1:LOCAL']"}],"opendaylight-topology-inventory:inventory-node-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:1']"},{"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:2:1","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": 2,"mac": "00:00:00:00:00:02","first-seen": 1494578133523,"last-seen": 1494578133523,"ip": "10.0.0.2"}]},{"node-id": "openflow:3","termination-point": [{"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: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: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']"}],"opendaylight-topology-inventory:inventory-node-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:3']"}],"link": [{"link-id": "host:00:00:00:00:00:03/openflow:3:1","source": {"source-node": "host:00:00:00:00:00:03","source-tp": "host:00:00:00:00:00:03"},"destination": {"dest-tp": "openflow:3:1","dest-node": "openflow:3"}},{"link-id": "openflow:3:1/host:00:00:00:00:00:03","source": {"source-node": "openflow:3","source-tp": "openflow:3:1"},"destination": {"dest-tp": "host:00:00:00:00:00:03","dest-node": "host:00:00:00:00:00:03"}},{"link-id": "host:00:00:00:00:00:02/openflow:2:1","source": {"source-node": "host:00:00:00:00:00:02","source-tp": "host:00:00:00:00:00:02"},"destination": {"dest-tp": "openflow:2:1","dest-node": "openflow:2"}},{"link-id": "openflow:1:2","source": {"source-node": "openflow:1","source-tp": "openflow:1:2"},"destination": {"dest-tp": "openflow:2:2","dest-node": "openflow:2"}},{"link-id": "host:00:00:00:00:00:01/openflow:1:1","source": {"source-node": "host:00:00:00:00:00:01","source-tp": "host:00:00:00:00:00:01"},"destination": {"dest-tp": "openflow:1:1","dest-node": "openflow:1"}},{"link-id": "openflow:2:2","source": {"source-node": "openflow:2","source-tp": "openflow:2:2"},"destination": {"dest-tp": "openflow:1:2","dest-node": "openflow:1"}},{"link-id": "openflow:2:3","source": {"source-node": "openflow:2","source-tp": "openflow:2:3"},"destination": {"dest-tp": "openflow:3:2","dest-node": "openflow:3"}},{"link-id": "openflow:3:2","source": {"source-node": "openflow:3","source-tp": "openflow:3:2"},"destination": {"dest-tp": "openflow:2:3","dest-node": "openflow:2"}},{"link-id": "openflow:1:1/host:00:00:00:00:00:01","source": {"source-node": "openflow:1","source-tp": "openflow:1:1"},"destination": {"dest-tp": "host:00:00:00:00:00:01","dest-node": "host:00:00:00:00:00:01"}},{"link-id": "openflow:2:1/host:00:00:00:00:00:02","source": {"source-node": "openflow:2","source-tp": "openflow:2:1"},"destination": {"dest-tp": "host:00:00:00:00:00:02","dest-node": "host:00:00:00:00:00:02"}}]}]
}

OpenDaylight-Boron学习笔记: 3 L2Switch模块相关推荐

  1. 好程序员web前端分享Nodejs学习笔记之Stream模块

    好程序员web前端分享Nodejs学习笔记之Stream模块 一,开篇分析 流是一个抽象接口,被 Node 中的很多对象所实现.比如对一个 HTTP 服务器的请求是一个流,stdout 也是一个流.流 ...

  2. node.js学习笔记5——核心模块1

    node.js学习笔记5--核心模块1 Node.js核心模块主要内容包括:(1)全局对象 (2)常用工具 (3)事件机制 (4)文件系统访问 (5)HTTP服务器与客户端 一: 全局对象 Node. ...

  3. python学习笔记4(模块

    python学习笔记4(模块) 一.模块 1.1 import语句 1.2 __name__属性 1.3 dir()函数 1.4 包 2.1 导入特定模块: 二.输入与输出 2.1 format使用 ...

  4. STM32F407学习笔记——MG90S舵机模块(基本控制)

    STM32F407学习笔记--MG90S舵机模块(基本控制) 一.基本原理: 通过改变PWM占空比来实现舵机进行不同角度转动,下面给出旋转角度与脉冲时间及对应占空比的关系(时基脉冲=20ms). 旋转 ...

  5. Apollo学习笔记3-定位模块配置

    Apollo学习笔记3-定位模块配置 环境介绍 导航设备参数配置 导航设备配置 (1)杆臂配置 (2)GNSS 航向配置 (3)导航模式配置 (4) USB 接口输出设置 (5)网口配置 (6) PP ...

  6. Python学习笔记__5章 模块

    # 这是学习廖雪峰老师python教程的学习笔记 1.概览 为了编写可维护的代码,我们把很多函数分组,分别放到不同的文件里,这样,每个文件包含的代码就相对较少,在Python中,一个.py文件就称之为 ...

  7. Webpack4 学习笔记二 CSS模块转换

    前言 此内容是个人学习笔记,以便日后翻阅.非教程,如有错误还请指出 webpack 打包css模块 webpack是js模块打包器, 如果在入口文件引入css文件或其它的less.sass等文件,需要 ...

  8. python3常用模块_Python学习笔记三(常用模块)

    Python 学习笔记三 (常用模块) 1.os模块 os模块包装了不同操作系统的通用接口,使用户在不同操作系统下,可以使用相同的函数接口,返回相同结构的结果. os.name:返回当前操作系统名称( ...

  9. OpenDaylight-Boron学习笔记: 4 OVSDB模块

    环境及软件版本说明 === SN-Controller: CPU: 2 Cores RAM: 4GB Disk: 32GB Operating System: CentOS7 x86_64 1611( ...

最新文章

  1. 国外计算机音乐专业,音乐留学干货 | 国外电子音乐专业留学如何?
  2. go语言笔记——append底层实现和Cpp vector无异,只是有返回值,double后返回了新的vector地址而已...
  3. testInt转换成字符串
  4. RTX5 | 配置文件RTX_Config.h(三)
  5. 22 省遭受重大洪灾,机器学习未来能预报么?
  6. oracle dblink设置
  7. opencv findContuors 详解
  8. iOS开发-OC语言 (七)继承、多态、类别
  9. 北大中文核心期刊目录(2004年版)全文
  10. 简历学习课程:1-9课
  11. 【FJ 2016 Day5】冷战(coldwar)
  12. azkaban 调度任务一直处于preparing状态
  13. 动词不定式(infinitive)的用法
  14. python3 联合概率,边缘概率,贝叶斯定理(含详细推导)
  15. 【混合编程jni 】第九篇之Jni总结
  16. jquery国际化 i18n.js
  17. 【OfferX】常见题目
  18. 高压放大器在工作中的应用实例有哪些
  19. 使用Python,Open3D对点云散点投影到面上并可视化,使用3种方法计算面的法向量及与平均法向量的夹角
  20. Adobe Acrobat Pro DC软件介绍及其特点详解

热门文章

  1. Pylint同时屏蔽多个报错信息
  2. 黑马12月开班丨2021年倒计时,你还有机会改变!
  3. 以太猫合约之数据合约分析(二)
  4. 无人机与地面站如何通信
  5. (遇到问题)占用空间远大于文件本身---exFAT移动固态硬盘瞬间装满(已解决-文件系统和默认簇大小的原因)
  6. OPA进阶-简洁的推导式comprehensions
  7. 从Hexo迁移到Hugo最强攻略
  8. 使用scale缩放字体
  9. iphone QQ音乐锁屏歌词实现思路
  10. 初探MUI制作微信APP页面(一)