2025年OpenDaylight-Boron学习笔记- 3 L2Switch模块

OpenDaylight-Boron学习笔记- 3 L2Switch模块环境及软件版本说明 SN Controller CPU 2 Cores RAM 4GB Disk 32GB Operating System CentOS7 x86 64 1611 Linux 3 10 0 514 Infrastructu Server IP1 10 0 3 100 24 Public Network

大家好,我是讯享网,很高兴认识大家。

环境及软件版本说明

===

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": , "opendaylight-port-statistics:flow-capable-node-connector-statistics": { "transmit-drops": 0, "receive-frame-error": 0, "receive-drops": 0, "receive-crc-error": 0, "bytes<
小讯
上一篇 2025-01-16 18:18
下一篇 2025-02-06 11:03

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/45556.html