- Learning OpenDaylight
- Reza Toghraee
- 452字
- 2021-07-09 20:08:09
L2 switch
Project type: Main
L2 switch is an MD-SAL-based implementation of a learning switch with optimizations on how a packet should be forwarded. L2 switch is a basic layer 2 switch feature within ODL. It includes layer 2-specific handling and also provides several reusable services, as follows:
- PacketHandler: This provides an infrastructure in an ODL controller to process incoming packets and forward them as required. It gives a pluggable architecture for handling the life cycle of a packet (term from OpenFlow's OFPT_PACKET_IN message) in the ODL controller. This infrastructure can limit to handle only packets with reason as No matching flow (table-miss flow entry).
Packets are decoded, modified and transmitted as part of PacketHandler.
- AddressTracker (Endpoint tracker): AddressTracker builds and maintains a mapping table that may have multiple attributes such as:
-
- Host MAC address
- Connected switch ID
- Switch port number
- VLAN, VNI (VXLAN),
- MPLS tag.
- Path Computation Service: This provides an optimal path (route) between hosts. It can be the shortest path, lowest cost, and so on, similar to the algorithms of routing protocols. Path Communication Service leverages and modifies topology data. It can also work with multiple topologies.
- Flow Writer Service: This service takes care of programming all the intermediate switches with appropriate flows once an optimal path has been computed between two hosts. It keeps track of mapping, from metaflow to individual flows, such that appropriate flows can be reprogrammed when a port goes down or an entire switch goes down.
- STP Service: This is the spanning tree protocol service that allows ODL to participate in a spanning tree. It is useful when ODL is deployed in a hybrid network (SDN and non-SDN with layer 2 connections) and you need to let ODL participate in a spanning tree. For a spanning tree, standard protocols are available.
Additional functionality that can be implemented by the L2 switch includes MAC address aging, packet filtering, static MAC addresses, and so on:

Remember that the L2 switch is a software module running on the ODL server. When one of the switches in the SDN domain receives a packet that doesn't have any entry that matches with its headers (source, destination MAC and IP, and so on), then the switch encapsulates the whole packet in an OpenFlow PACKET_IN message and sends it to the ODL. This packet is decapsulated and handed over to the L2 switch module to handle (find where the packet needs to be forwarded).
The L2 switch module performs MAC address learning using the OpenFlow-PACKET_IN messages it receives from the switches in the SDN domain. It is similar to a standard L2 switch. The following is a list of switch actions:

The following diagram illustrates the communication between L2 switch components:

- Linux運維之道(第3版)
- Red Hat Enterprise Linux 8系統(tǒng)管理實戰(zhàn)
- 蘋果電腦玩全攻略 OS X 10.8 Mountain Lion
- 曝光:Linux企業(yè)運維實戰(zhàn)
- 計算機系統(tǒng)開發(fā)與優(yōu)化實戰(zhàn)
- 嵌入式操作系統(tǒng)(Linux篇)(微課版)
- 竹林蹊徑:深入淺出windows驅(qū)動開發(fā)
- Learning Magento 2 Administration
- 精解Windows 10
- Introduction to R for Quantitative Finance
- Windows 10從新手到高手
- Windows 7實戰(zhàn)從入門到精通(超值版)
- Linux應用大全 基礎與管理
- Linux操作系統(tǒng)案例教程(第2版)
- Microsoft Azure Administrator:Exam Guide AZ-103