[go: up one dir, main page]

CN120166028A - Automatic configuration method, controller and system of spanning tree protocol based on DPU in K8s cluster - Google Patents

Automatic configuration method, controller and system of spanning tree protocol based on DPU in K8s cluster Download PDF

Info

Publication number
CN120166028A
CN120166028A CN202510257650.2A CN202510257650A CN120166028A CN 120166028 A CN120166028 A CN 120166028A CN 202510257650 A CN202510257650 A CN 202510257650A CN 120166028 A CN120166028 A CN 120166028A
Authority
CN
China
Prior art keywords
spanning tree
tree protocol
virtual switch
configuration
cluster
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202510257650.2A
Other languages
Chinese (zh)
Inventor
郎爽
荆慧
黄明亮
张宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yusur Technology Co ltd
Original Assignee
Yusur Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yusur Technology Co ltd filed Critical Yusur Technology Co ltd
Priority to CN202510257650.2A priority Critical patent/CN120166028A/en
Publication of CN120166028A publication Critical patent/CN120166028A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/70Virtual switches
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Security & Cryptography (AREA)
  • Automation & Control Theory (AREA)
  • Small-Scale Networks (AREA)

Abstract

The application provides an automatic configuration method, a controller and a system of a spanning tree protocol in a K8s cluster based on a DPU (distributed processing unit), wherein the method comprises the steps of monitoring whether a spanning tree protocol configuration example in the K8s cluster is changed in configuration data in real time, if so, updating a bridging device table of a virtual switch database according to the spanning tree protocol configuration example, enabling the virtual switch in the DPU to receive the updated spanning tree protocol configuration data and correspondingly configure or start a corresponding spanning tree protocol STP and/or a rapid spanning tree protocol RSTP, monitoring whether the virtual switch configures or starts the STP and/or the RSTP in real time, and if so, updating the state of a custom resource definition unit aiming at the spanning tree protocol to enable a user to know the current spanning tree protocol setting state of the virtual switch. The application can realize the automatic configuration of the spanning tree protocol in the K8s cluster, effectively improve the real-time performance and the reliability of the automatic configuration, and further effectively improve the efficiency and the quality of network operation and maintenance.

Description

Automatic configuration method, controller and system of spanning tree protocol in K8s cluster based on DPU
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method, a controller, and a system for automatically configuring a spanning tree protocol in a K8s cluster based on a DPU.
Background
The K8s (Kubernetes) cluster is an open-source container orchestration system cluster, OVN-Kubernetes are Kubernetes network components based on an open virtual network OVN (Open VirtualNetwork), and focus mainly on the implementation of virtualized networks and Overlay networks (Overlay networks), whereas traditional network device management functions are not of importance. Thus, to remedy this deficiency, a solution is needed that can provide fine control over the network topology to meet the performance, security and manageability requirements. And has the function of customizing the configuration spanning tree protocol according to specific network architecture and application requirements. The functionality of the software defined network SDN (Software Defined Network) of the existing virtual switch OVS (Open vSwitch) is extended.
The existing OVN-Kubernetes design was initially designed to provide high performance and flexibility for Kubernetes networks, with core functionality focused on the implementation of virtualized and Overlay networks, rather than traditional network device management functions such as spanning tree protocol STP and rapid spanning tree protocol RSTP. Thus, its functionality may not include these legacy network protocols.
However, since OVNs-Kubernetes does not provide direct spanning tree protocol support for STP and RSTP, network administrators must manually configure and manage these conventional network protocols. Such manual configuration increases management complexity and risk of error introduction, particularly in large scale or dynamically changing network environments.
Therefore, there is a need to devise a method that can automatically configure spanning tree protocol in K8s clusters.
Disclosure of Invention
In view of this, embodiments of the present application provide a method, controller, and system for automatic configuration of a DPU-based spanning tree protocol in a K8s cluster that obviates or mitigates one or more of the disadvantages of the prior art.
One aspect of the present application provides a method for automatically configuring a spanning tree protocol based on a DPU in a K8s cluster, including:
Monitoring whether a spanning tree protocol configuration example in a K8s cluster is changed in real time, if so, updating a bridging device table of a virtual switch database according to the spanning tree protocol configuration example, so that a virtual switch arranged in a data processor DPU receives the current updated configuration data based on the updated bridging device table of the virtual switch database, judging whether the configuration data contains spanning tree protocol configuration data, and if so, correspondingly configuring or starting a corresponding spanning tree protocol STP and/or a fast spanning tree protocol RSTP according to the spanning tree protocol configuration data;
Monitoring whether the virtual switch configures or starts a corresponding Spanning Tree Protocol (STP) and/or a Rapid Spanning Tree Protocol (RSTP) in real time, if so, correspondingly updating the state of a custom resource definition unit aiming at the spanning tree protocol so that a user can acquire the current spanning tree protocol setting state of the virtual switch from the custom resource definition unit.
In some embodiments of the present application, the updating the bridge device table of the virtual switch database according to the spanning tree protocol configuration instance includes:
analyzing the resource expected state field of the spanning tree protocol configuration instance, and mapping the analyzed resource expected state field into a custom setting option of a bridge equipment table of a virtual switch database;
Combining the mapped custom setting options with original custom setting options in the virtual switch database;
updating a bridging device table of the virtual switch database based on a database operation structure;
and correspondingly updating the state of the custom resource definition unit aiming at the spanning tree protocol according to the updated bridging device table of the virtual switch database.
In some embodiments of the present application, before the real-time monitoring whether the configuration data change occurs to the spanning tree protocol configuration instance in the K8s cluster, the method further includes:
And establishing connection with the virtual switch database, and performing communication connection with the daemon of the virtual switch through the virtual switch database protocol.
In some embodiments of the present application, the custom resource definition unit for spanning tree protocol is created in the K8s cluster in advance and is used for controlling the issuing of spanning tree protocol configuration data of the virtual switch, wherein the spanning tree protocol configuration data comprises various configuration parameters corresponding to spanning tree protocol STP and/or rapid spanning tree protocol RSTP;
Correspondingly, the spanning tree protocol configuration instance is created in the K8s cluster in advance and is used for configuring various configuration parameters corresponding to spanning tree protocol STP and/or rapid spanning tree protocol RSTP of the virtual switch according to the spanning tree protocol configuration data issued by the custom resource definition unit.
In some embodiments of the present application, the configuration parameters corresponding to the spanning tree protocol STP include a priority parameter, a timer parameter, a survivable maximum time parameter of a bridge protocol data unit BPDU in the network, and a transition time parameter of a designated virtual switch port from a blocking state to a forwarding state of the spanning tree protocol STP.
In some embodiments of the present application, the configuration parameters corresponding to the rapid spanning tree protocol RSTP include a priority parameter of the rapid spanning tree protocol RSTP, an address parameter of a virtual switch, an aging time parameter of the virtual switch, a version parameter, a maximum aging time parameter of a bridge, a forwarding delay time parameter of the bridge, and a maximum number of parameters of the bridge protocol data units BPDUs allowed to be sent per second.
In some embodiments of the present application, the updating the status of the custom resource definition unit for the spanning tree protocol includes:
And updating an operation state monitoring field of a custom resource definition unit aiming at the spanning tree protocol, wherein the operation state monitoring field comprises a unique identifier of bridging equipment, root bridge information, a designated bridge, a designated port and bridge port information.
Another aspect of the present application provides a controller comprising:
The spanning tree protocol configuration module is used for monitoring whether the spanning tree protocol configuration example in the K8s cluster is changed in real time, if so, updating a bridging device table of a virtual switch database according to the spanning tree protocol configuration example, so that a virtual switch arranged in a data processor DPU receives the currently updated configuration data based on the updated bridging device table of the virtual switch database, judging whether the configuration data contains the spanning tree protocol configuration data, and if so, correspondingly configuring or starting a corresponding spanning tree protocol STP and/or a rapid spanning tree protocol RSTP according to the spanning tree protocol configuration data;
The virtual switch monitoring module is used for monitoring whether the virtual switch configures or starts the corresponding spanning tree protocol STP and/or the rapid spanning tree protocol RSTP in real time, if yes, the state of the custom resource definition unit aiming at the spanning tree protocol is correspondingly updated, so that a user can acquire the current spanning tree protocol setting state of the virtual switch from the custom resource definition unit.
A third aspect of the present application provides an automatic configuration system of a spanning tree protocol based on a DPU in a K8s cluster, including a controller, a host, and a data processor DPU disposed in the K8s cluster;
The controller is used for executing the automatic configuration method of the DPU-based spanning tree protocol in the K8s cluster;
The host is provided with a virtual switch agent, the data processor DPU is provided with a virtual switch, and the controller is in communication connection with the virtual switch through the virtual switch agent.
In some embodiments of the application, the controller is further communicatively coupled to at least one of a distributed search engine, a service monitoring system, and a distributed real-time data tracking system, respectively.
A third aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the method for automatically configuring a DPU-based spanning tree protocol in a K8s cluster when the computer program is executed.
A fourth aspect of the application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method for automatically configuring a DPU-based spanning tree protocol in a K8s cluster.
A fifth aspect of the application provides a computer program product comprising a computer program which, when executed by a processor, implements a method for automatically configuring a DPU-based spanning tree protocol in a K8s cluster as described.
The automatic configuration method of the spanning tree protocol based on the DPU in the K8s cluster is characterized in that whether the configuration data of a spanning tree protocol configuration instance in the K8s cluster is changed or not is monitored in real time, if yes, the bridging device table of the virtual switch database is updated according to the spanning tree protocol configuration instance, so that a virtual switch arranged in the DPU receives the configuration data updated currently based on the updated bridging device table of the virtual switch database, whether the configuration data contains the spanning tree protocol configuration data is judged, if yes, the corresponding spanning tree protocol STP and/or the rapid spanning tree protocol RSTP are correspondingly configured or started according to the spanning tree protocol configuration data, if yes, the state of a custom resource definition unit aiming at the spanning tree protocol is correspondingly updated, a user can acquire the current spanning tree protocol setting state of the virtual switch, automatic configuration of the spanning tree protocol in the K8s cluster can be realized, the effective configuration efficiency and the network quality can be improved, and the network operation efficiency can be further improved.
Additional advantages, objects, and features of the application will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and drawings.
It will be appreciated by those skilled in the art that the objects and advantages that can be achieved with the present application are not limited to the above-described specific ones, and that the above and other objects that can be achieved with the present application will be more clearly understood from the following detailed description.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate and together with the description serve to explain the application. The components in the figures are not necessarily to scale, emphasis instead being placed upon illustrating the principles of the application. Corresponding parts in the drawings may be exaggerated, i.e. made larger relative to other parts in an exemplary device actually manufactured according to the present application, for convenience in showing and describing some parts of the present application. In the drawings:
fig. 1 is a schematic flow chart of a first method for automatically configuring a spanning tree protocol based on a DPU in a K8s cluster according to an embodiment of the present application.
Fig. 2 is a schematic flow chart of a second method for automatically configuring a spanning tree protocol based on a DPU in a K8s cluster according to an embodiment of the present application.
Fig. 3 is a schematic structural diagram of a controller according to an embodiment of the application.
Fig. 4 is a schematic diagram of a first architecture of an automatic configuration system of a spanning tree protocol based on a DPU in a K8s cluster according to an embodiment of the present application.
Fig. 5 is a schematic diagram of a second architecture of an automatic configuration system of a spanning tree protocol based on a DPU in a K8s cluster according to an embodiment of the present application.
Fig. 6 is a schematic diagram of an implementation interaction of an automatic configuration method of a spanning tree protocol based on a DPU in a K8s cluster according to an application example of the present application.
Detailed Description
The present application will be described in further detail with reference to the following embodiments and the accompanying drawings, in order to make the objects, technical solutions and advantages of the present application more apparent. The exemplary embodiments of the present application and the descriptions thereof are used herein to explain the present application, but are not intended to limit the application.
It should be noted here that, in order to avoid obscuring the present application due to unnecessary details, only structures and/or processing steps closely related to the solution according to the present application are shown in the drawings, while other details not greatly related to the present application are omitted.
It should be emphasized that the term "comprises/comprising" when used herein is taken to specify the presence of stated features, elements, steps or components, but does not preclude the presence or addition of one or more other features, elements, steps or components.
It is also noted herein that the term "coupled" may refer to not only a direct connection, but also an indirect connection in which an intermediate is present, unless otherwise specified.
Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
Since the existing solutions can only manage STP and RSTP protocols of the network device by means of manual management and configuration. Modern cloud native and automation network architectures emphasize auto-configuration and self-healing capabilities, while manually managing STP and RSTP protocols is contrary to these principles. Lack of automation support may result in slow network deployment and failure recovery, affecting the flexibility and reliability of the service. Manually configured STP and RSTP parameters require continuous maintenance and updating as network topologies change and demands evolve. This not only increases the operational burden, but may also lead to a risk of inconsistent or erroneous configuration, affecting the stability and performance of the overall network. Existing manual management approaches often lack the ability to integrate into an overall monitoring and management platform. The lack of real-time monitoring and automatic alarm mechanisms can lead to response time delays to network problems, thereby affecting the efficiency of troubleshooting and performance optimization.
In summary, OVN-Kubernetes mainly faces the challenges of manual management and configuration under the condition of not supporting STP and RSTP, which not only affects the efficiency and quality of network operation and maintenance, but also limits the application scenario and applicability of the network operation and maintenance in the aspect of traditional network management.
In order to solve the above problems, embodiments of the present application provide an automatic configuration method of a spanning tree protocol based on a DPU in a K8s cluster, a controller, a system, an electronic device, a computer readable storage medium, and a computer program product for executing the automatic configuration method of the spanning tree protocol based on the DPU in the K8s cluster, respectively, which are specifically described in detail by the following embodiments.
Based on this, the embodiment of the present application provides an automatic configuration method of a spanning tree protocol based on a DPU in a K8s cluster, which may be implemented by a controller, referring to fig. 1, and the automatic configuration method of the spanning tree protocol based on the DPU in the K8s cluster specifically includes the following contents:
Step 100, monitoring whether a spanning tree protocol configuration example in a K8s cluster is changed in real time, if yes, updating a bridging device table of a virtual switch database according to the spanning tree protocol configuration example, so that a virtual switch arranged in a DPU receives the current updated configuration data based on the updated bridging device table of the virtual switch database, judging whether the configuration data contains spanning tree protocol configuration data, and if yes, correspondingly configuring or starting a corresponding spanning tree protocol STP and/or a fast spanning tree protocol RSTP according to the spanning tree protocol configuration data.
Step 200, monitoring whether the virtual switch configures or starts a corresponding Spanning Tree Protocol (STP) and/or a Rapid Spanning Tree Protocol (RSTP) in real time, if yes, correspondingly updating the state of a custom resource definition unit aiming at the spanning tree protocol so that a user can acquire the current spanning tree protocol setting state of the virtual switch from the custom resource definition unit.
It can be understood that the spanning tree protocol configuration instance is created in the K8s cluster in advance and is used for configuring various configuration parameters corresponding to the spanning tree protocol STP and/or the rapid spanning tree protocol RSTP of the virtual switch according to the spanning tree protocol configuration data issued by the custom resource definition unit. Custom resource definition units for spanning tree protocols may be abbreviated OvsStp CRD.
In one or more embodiments of the present application, the spanning tree protocol configuration instance may be abbreviated as OvsStp instance or OvsStp CRD instance, the virtual switch database may refer to an Open vSwitch database, which may be abbreviated as OVSDB, and the bridge device table may be abbreviated as bridge table. The controller may be written as OvsStp controller.
It is appreciated that data processor DPU (Data Processing Unit) is also referred to as a data processing unit. A DPU is a processor dedicated to network and storage acceleration, typically used in High Performance Computing (HPC) and data centers. It can reduce the load on the CPU, providing higher network throughput and lower latency.
The virtual switch OVS (Open vSwitch) is a virtual switch software, which is mainly used in the VM environment of the virtual machine, and is used as a virtual switch to support multiple virtualization technologies. In this virtualized environment of a certain machine, a virtual switch has mainly two roles, namely, passing traffic between VMs of the virtual machines and realizing communication between the VMs and an external network. It provides some important functions and drivers for VPP.
From the above description, it can be seen that the automatic configuration method of the spanning tree protocol based on the DPU in the K8s cluster provided by the embodiment of the present application develops a OvsStp controller responsible for monitoring and processing OvsStp CRD changes. The controller may map the configuration in the CRD to a custom setting option (other_config option) of the bridge device table of the virtual switch OVS via the OVSDB protocol. The controller synchronizes the state changes of STP and RSTP by monitoring the bridge equipment table of the virtual switch OVS, and ensures the real-time performance and the correctness of configuration.
In order to further improve the reliability and effectiveness of updating the bridge device table of the virtual switch database according to the spanning tree protocol configuration example, in the automatic configuration method of the spanning tree protocol based on the DPU in the K8s cluster provided in the embodiment of the present application, referring to fig. 2, step 100 in the automatic configuration method of the spanning tree protocol based on the DPU in the K8s cluster specifically includes the following contents:
step 110, monitoring whether the spanning tree protocol configuration example in the K8s cluster is changed in real time, if yes, analyzing the resource expected state field of the spanning tree protocol configuration example, and mapping the analyzed resource expected state field into the custom setting option of the bridge equipment table of the virtual switch database.
And 120, merging the mapped custom setting options with original custom setting options in the virtual switch database.
And step 130, updating a bridge device table of the virtual switch database based on the database operation structure body.
And 140, correspondingly updating the state of the custom resource definition unit for the spanning tree protocol according to the updated bridging device table of the virtual switch database, so that the virtual switch arranged in the DPU receives the current updated configuration data based on the updated bridging device table of the virtual switch database, judges whether the configuration data contains the spanning tree protocol configuration data, and if yes, correspondingly configures or starts the corresponding spanning tree protocol STP and/or the rapid spanning tree protocol RSTP according to the spanning tree protocol configuration data.
It can be appreciated that the resource expected state field can be abbreviated as spec field, and the custom setting option can be abbreviated as otherconfig option or other_config option.
In order to further improve the efficiency and reliability of the automatic configuration of the spanning tree protocol based on the DPU in the K8s cluster, in the method for automatically configuring the spanning tree protocol based on the DPU in the K8s cluster according to the embodiment of the present application, referring to fig. 2, before step 100 in the method for automatically configuring the spanning tree protocol based on the DPU in the K8s cluster, the method specifically further includes the following:
and 010, establishing connection with the virtual switch database, and performing communication connection with the daemon of the virtual switch through the virtual switch database protocol.
Specifically, a connection is established with the OVS database (OVSDB) through the libovsdb library and secure TLS communication is performed with the OVS daemon through the OVSDB protocol. The libovsdb library is a OVSDB client library that is specifically designed for handling OVSDB interactions, providing a powerful and flexible API that makes it more efficient and convenient to manage and operate the network infrastructure.
In order to further improve the application reliability and effectiveness of a custom resource definition unit for a spanning tree protocol and a spanning tree protocol configuration example, in the automatic configuration method of the spanning tree protocol in a K8s cluster based on the DPU provided by the embodiment of the application, the custom resource definition unit for the spanning tree protocol is created in the K8s cluster in advance and is used for controlling the issuing of spanning tree protocol configuration data of the virtual switch, wherein the spanning tree protocol configuration data comprises various configuration parameters corresponding to a spanning tree protocol STP and/or a rapid spanning tree protocol RSTP;
Correspondingly, the spanning tree protocol configuration instance is created in the K8s cluster in advance and is used for configuring various configuration parameters corresponding to spanning tree protocol STP and/or rapid spanning tree protocol RSTP of the virtual switch according to the spanning tree protocol configuration data issued by the custom resource definition unit.
Specifically, an administrator first creates a Custom Resource Definition (CRD) in the Kubernetes cluster for control of Spanning Tree Protocol (STP) and Rapid Spanning Tree Protocol (RSTP) configuration issues for Open VSwitch (OVS). The CRD defines a custom resource type named OVSSTPConfig that contains a number of configuration parameters. These parameters allow the user to fine-tune the behavior of STP and RSTP.
An instance OvsStp may then be created to specifically configure STP and RSTP parameters of the OVS. For example, RSTP functionality is enabled by configuring rstpEnable to true and setting various RSTP parameters such as priority, path cost, port edge attributes, etc. rstpEnable commands are used to enable RSTP functions on the device.
In one embodiment of the application, the configuration parameters corresponding to the spanning tree protocol STP include a priority parameter stpPriority, a timer parameter stpHelloTime, a survivable maximum time parameter stpMaxAge of the bridge protocol data unit BPDU in the network, and a transition time parameter stpForwardDelay of a designated virtual switch port from a blocking state to a forwarding state.
In one embodiment of the present application, the configuration parameters corresponding to the rapid spanning tree protocol RSTP include a priority parameter RstpPriority of the rapid spanning tree protocol RSTP, an address parameter RSTPADDRESS of the virtual switch, an aging time parameter RSTPAGEINGTIME of the virtual switch, a version parameter rstpForceProtocolVersion, a maximum aging time parameter rstpMaxAge of the bridge, a forwarding delay time parameter rstpForwardDelay of the bridge, and a maximum number of parameters rstpTransmitHoldCount of the bridge protocol data units BPDUs allowed to be transmitted per second.
In order to further improve the efficiency and reliability of the automatic configuration of the spanning tree protocol based on the DPU in the K8s cluster, in the method for automatically configuring the spanning tree protocol based on the DPU in the K8s cluster according to the embodiment of the present application, referring to fig. 2, step 200 in the method for automatically configuring the spanning tree protocol based on the DPU in the K8s cluster specifically includes the following contents:
Step 210, monitoring whether the virtual switch configures or starts a corresponding Spanning Tree Protocol (STP) and/or a Rapid Spanning Tree Protocol (RSTP) in real time, if yes, updating an operation state monitoring field of a custom resource definition unit aiming at the spanning tree protocol so that a user can acquire the current spanning tree protocol setting state of the virtual switch from the custom resource definition unit.
The running state monitoring field is a status field, and comprises a unique identifier rstp _bridge_id of the bridge device, root bridge information rstp _root_id and rstp _root_path_cost, a designated bridge rstp _ designated _id, a designated port rstp _ designated _port_id and bridge port information rstp _bridge_port_id.
From a software level, the present application further provides a controller for executing the automatic configuration method of the DPU-based spanning tree protocol in a K8s cluster, see fig. 3, wherein the controller specifically comprises the following contents:
The spanning tree protocol configuration module 10 is configured to monitor whether a spanning tree protocol configuration instance in the K8s cluster has configuration data change in real time, if so, update a bridging device table of a virtual switch database according to the spanning tree protocol configuration instance, so that a virtual switch arranged in a DPU receives the configuration data updated currently based on the updated bridging device table of the virtual switch database, and judge whether the configuration data contains spanning tree protocol configuration data, if so, correspondingly configure or start a corresponding spanning tree protocol STP and/or a fast spanning tree protocol RSTP according to the spanning tree protocol configuration data.
The virtual switch monitoring module 20 is configured to monitor in real time whether the virtual switch configures or starts a corresponding spanning tree protocol STP and/or a fast spanning tree protocol RSTP, and if yes, correspondingly update a state of a custom resource definition unit for the spanning tree protocol, so that a user obtains a current spanning tree protocol setting state of the virtual switch from the custom resource definition unit.
The embodiment of the controller provided by the present application may be specifically used to execute the processing flow of the embodiment of the automatic configuration method of the spanning tree protocol based on the DPU in the K8s cluster in the above embodiment, and the functions thereof are not described herein, and may refer to the detailed description of the embodiment of the automatic configuration method of the spanning tree protocol based on the DPU in the K8s cluster.
The portion of the controller that performs the automatic configuration of the DPU-based spanning tree protocol in the K8s cluster may be done in the server or the client device. Specifically, the selection may be made according to the processing capability of the client device, and restrictions of the use scenario of the user. The application is not limited in this regard. If all operations are done in the client device, the client device may further comprise a processor for specific handling of the automatic configuration of the DPU based spanning tree protocol in the K8s cluster.
The client device may have a communication module (i.e. a communication unit) and may be connected to a remote server in a communication manner, so as to implement data transmission with the server. The server may include a server on the side of the task scheduling center, and in other implementations may include a server of an intermediate platform, such as a server of a third party server platform having a communication link with the task scheduling center server. The server may include a single computer device, a server cluster formed by a plurality of servers, or a server structure of a distributed device.
Any suitable network protocol may be used between the server and the client device, including those not yet developed on the filing date of the present application. The network protocols may include, for example, TCP/IP protocol, UDP/IP protocol, HTTP protocol, HTTPS protocol, etc. Of course, the network protocol may also include, for example, RPC protocol (Remote Procedure Call Protocol ), REST protocol (Representational STATE TRANSFER) or the like used above the above-described protocol.
From the above description, it can be seen that the controller provided by the embodiment of the present application can implement automatic configuration of the spanning tree protocol in the K8s cluster, and can effectively improve instantaneity and reliability of the automatic configuration, thereby effectively improving efficiency and quality of network operation and maintenance.
The present application also provides an automatic configuration system of a spanning tree protocol based on a DPU in a K8s cluster, see fig. 4, which includes a controller for executing all or part of the automatic configuration method of the spanning tree protocol based on the DPU in the K8s cluster, and the automatic configuration system of the spanning tree protocol based on the DPU in the K8s cluster specifically includes the following contents:
A controller, a host and a data processor DPU arranged in a K8s cluster;
The controller is configured to execute the automatic configuration method of the spanning tree protocol based on the DPU in the K8s cluster provided in the foregoing embodiment.
The host is provided with a virtual switch agent, the data processor DPU is provided with a virtual switch, and the controller is in communication connection with the virtual switch through the virtual switch agent.
Referring to fig. 5, in an automatic configuration system of a DPU-based spanning tree protocol in a K8s cluster, the controller is further communicatively coupled to at least one of a distributed search engine, a service monitoring system, and a distributed real-time data tracking system, respectively.
In order to further explain the above embodiment, the present application further provides a specific application example of an automatic configuration method of a spanning tree protocol based on a DPU in a K8s cluster, which is implemented by adopting an automatic configuration system of a spanning tree protocol based on a DPU in a K8s cluster, and the application example of the present application develops OvsStp a controller by introducing Custom Resource Definition (CRD), and utilizes a mechanism of OVSDB and Open vSwitch, so that the disadvantage that OVn-Kubernetes does not support STP and RSTP management is effectively solved. A CRD named OVSSTPConfig is created for controlling the configuration of STP and RSTP of the OVS. These configurations include priorities of STP and RSTP, various time parameters such as hello-time, max-age, forward-delay, etc., and other related configuration options. The user may specifically configure STP and RSTP parameters of the OVS by creating an instance of OvsStp. For example, RSTP functionality may be enabled and various parameters set to meet network topology and performance requirements.
It will be appreciated that the container group Pod is the smallest deployment unit in the Kubernetes cluster, which is the encapsulation of the container and provides some shared resources and context. VPP refers to the abbreviation of Vector Packet Processor for fd.io, a fast, scalable layer 2-4 multi-platform network stack. It can run in the Linux user space of a variety of architectures including x86, ARM, and Power architectures. The Data Plane Development Kit (DPDK) is an open source software project managed by the Linux foundation. It provides a set of data plane libraries and a network interface controller polling mode driver for offloading TCP packet processing from the operating system kernel to processes running in user space. Such offloading enables higher computational efficiency and higher packet throughput than can be achieved using interrupt driven processing provided in the kernel. BPDU (Bridge Protocol Data Unit) is a control message used in the spanning tree Protocol (STP, spanning Tree Protocol) and its modified versions (e.g., the fast spanning tree Protocol RSTP, rapid Spanning Tree Protocol) for exchanging spanning tree information and maintaining network topology. BPDUs help switches in the network elect a Root Bridge. The root bridge is the reference point for all paths in the network. The switch knows the topology of the network by periodically sending BPDUs. This allows for a quick adjustment in case of topology changes, thus avoiding loops. The BPDUs are the basis of a spanning tree protocol that can identify and block loops in the network by exchanging BPDUs, ensuring that network data does not enter endless loops. The BPDUs contain the information of the switches and the path costs, which are used by the spanning tree protocol to calculate and select the best path.
Referring to fig. 6, a specific application example of the automatic configuration method of the spanning tree protocol based on the DPU in the K8s cluster, which is implemented by adopting the automatic configuration system of the spanning tree protocol based on the DPU in the K8s cluster, specifically includes the following contents:
and step 1, creating a CRD for OVS STP configuration.
A Custom Resource Definition (CRD) is first created in the Kubernetes cluster for control of Spanning Tree Protocol (STP) and Rapid Spanning Tree Protocol (RSTP) configuration issues for Open VSwitch (OVS). The CRD defines a custom resource type called OVSSTPConfig, which contains a number of configuration parameters, such as stpPriority, stpHelloTime, stpMaxAge, stpForwardDelay and RstpPriority, rstpAgeingTime. These parameters allow the user to fine-tune the behavior of STP and RSTP.
Step 2, creating OvsStp examples and configuring stp and rstp.
An instance OvsStp may be created to specifically configure STP and RSTP parameters of the OVS. For example, RSTP functionality is enabled by configuring rstpEnable to true, and setting various RSTP parameters, such as priority, path cost, port edge attributes, etc. It will be appreciated that the abbreviations appearing in the present application are not case-specific, e.g., STP and STP are synonymous and all represent spanning tree protocols.
Specifically, the stp configuration process is as follows:
1) Turning on stp;
2) A priority parameter of a Spanning Tree Protocol (STP) is configured stpPriority for deciding which switch or Bridge device (Bridge) in the network becomes the Root Bridge. In the spanning tree protocol, the root bridge is the most important node in the network topology, and all paths are built around the root bridge. Ranging from 0 to 65,535 because it occupies a 16-bit field. The 16-bit field may represent a range of values from 0 to 2-16-1, i.e., 0 to 65,535. Such a scope design provides sufficient accuracy and flexibility to ensure that network administrators can carefully control and manage the behavior of spanning tree protocols.
3) Configuration stpHelloTime, which is a timer parameter in the Spanning Tree Protocol (STP), determines the time interval for the Root Bridge (Root Bridge) of the spanning tree protocol to send "Hello" BPDU (Bridge Protocol Data Units). The value of this parameter ranges from 1 to 10 seconds. The transmission period, stp-Hello-time, specifies the time interval for the root bridge to transmit "Hello" BPDUs. BPDUs are control messages used by the spanning tree protocol to exchange information and maintain the network topology. By periodically sending BPDUs, the spanning tree protocol is able to detect changes in the network topology in time, such as link failures or the joining of new devices.
4) The shorter hello-time interval can accelerate the speed of detecting the network topology change, thereby accelerating the convergence of the network. Setting too short may increase network load and unnecessary BPDU traffic.
5) And (stpMaxAge) a configuration for specifying a maximum time that BPDU (Bridge Protocol Data Unit) can survive in the network. It determines the time it takes for a switch to consider a path to be dead after stopping receiving BPDUs on that path. The default value is typically 20 seconds. Values within this range allow network administrators to adjust the survival time of BPDUs to optimize network performance and stability, depending on the specific network requirements and topology. In large networks, a longer stp-max-age may ensure that the BPDU has enough time to propagate to all parts of the network. In a network with frequent topology change, a shorter stp-max-age can enable the spanning tree protocol to detect and respond to path change more quickly, so that the convergence speed of the network is improved.
6) A configuration stpForwardDelay is used to specify the transition time of a switch port from Blocking state (Blocking) to Forwarding state (Forwarding). This transition time includes two phases, learning (Learning) and Listening (Listening). When the network topology changes, the spanning tree protocol requires some time to recalculate and stabilize the topology. The stp-forward-delay ensures that the port goes through a learning and listening state before changing from a blocking state to a forwarding state, avoiding the generation of a temporary loop. In the topology change process, the port is ensured to learn the correct MAC address table entry before forwarding the data packet, so that the data packet is effectively forwarded. Parameters range from 4 to 30 seconds, with a default value of typically 15 seconds. In environments where network topology changes frequently, stp-forward-delay ensures that there is enough time to stabilize the network before ports begin forwarding traffic, avoiding packet loss and loops. In a large network, proper adjustment of stp-forward-delay can help the spanning tree protocol to better manage topology changes and improve the reliability of the network.
Specifically, rstp configuration procedure is as follows:
1) Configuring rstpEnable as true, and starting an RSTP function;
2) Configuration RstpPriority configures the priority of the root bridge, the lower the value the more likely it is to be the root bridge. Maximum 0xFFFF, default value is 0x8000. The network administrator can optimize the performance and routing of the network by setting a lower priority value to ensure that certain specific devices become root bridges in the spanning tree protocol. Assuming three OVS virtual switches A, B, C in the network, their priorities are 32,768 by default. If the administrator wishes switch A to be the root bridge, its priority can be set to 16,384, while the default priorities of the other two switches are preserved. So that switch a will preferentially become the root bridge. In this way, the network administrator can ensure optimization and reliability of the network topology.
3) And a configuration RSTPADDRESS for configuring address parameters of the switch in the fast spanning tree Protocol (RSTP, rapid Spanning Tree Protocol). The RSTPADDRESS parameter represents the switch address configured in the RSTP network. This address is typically the MAC address of the switch that is used to uniquely identify the switch in the network. In the RSTP protocol, the switch will send and receive BPDU (bridge protocol data unit) messages that will contain the switch's address for path selection and network convergence in the protocol.
4) Configuration RSTPAGEINGTIME is one parameter that configures switch age (AGEING TIME) in the fast spanning tree Protocol (RSTP, rapid Spanning Tree Protocol). It determines how long an entry in the MAC address table remains without communication. The RSTPAGEINGTIME parameter defines the time that the switch remains an entry in the MAC address table. During this period, if no traffic is detected for the entry, the entry will be deleted. By controlling the aging time of the MAC address table, the switch can more efficiently manage the network topology, preventing stale (stale) entries from occupying entries. The value range is 10 to 1,000,000 seconds. Default value the default burn-in time for most switches is 300 seconds.
5) RstpForceProtocolVersion is a parameter for configuring the fast spanning tree protocol version. It allows the forced setting switch to use a specific spanning tree protocol version. By setting rstp-force-protocol-version parameters, the switch may be forced to use the specified spanning tree protocol version, and in some network environments, it may be desirable to maintain compatibility with the old device or particular configuration, so that older STP versions may be specified for use by the parameters. An acceptable integer value for this parameter is typically 0 or 2:0, representing the standard Spanning Tree Protocol (STP), and 2 representing the Rapid Spanning Tree Protocol (RSTP).
6) RstpMaxAge is a configuration option for setting the maximum aging time of the bridge in RSTP (rapid spanning tree protocol). This parameter determines the maximum time in the spanning tree protocol for the bridge to save BPDU (bridge protocol data unit) information. If no new BPDU is received beyond this time, the bridge will consider the path as no longer valid and recalculate the spanning tree. By setting rstp-max-age, the time at which the bridge saves the BPDU information before re-evaluating the path can be decided. This time setting may help avoid loops in the network while ensuring that the spanning tree can be recalculated in time after a path failure. The acceptable integer value for this parameter is between 6 and 40, in seconds. Minimum 6-minimum aging time for BPDU information is 6 seconds. Maximum 40. Maximum aging time for BPDU information is 40 seconds.
7) Configuration rstpForwardDelay is a configuration option for setting the forwarding delay time of the bridge in RSTP (rapid spanning tree protocol). This parameter determines the time that a port needs to go through the learn and snoop states before going from the blocking state to the forwarding state. This mechanism can effectively avoid temporary loops and broadcast storms. When the network topology changes, the port does not immediately go to the forwarding state, but a period of learning and monitoring phase can be passed, so that the generation of a temporary loop can be prevented. In the learning stage, the bridge learns the mapping relation between the MAC address and the port in the network, so that the data frame can be correctly forwarded in the forwarding stage. The acceptable integer value for this parameter is between 4 and 30, in seconds.
8) Configuration rstpTransmitHoldCount is a configuration option to set the maximum number of BPDUs (spanning tree protocol data units) allowed to be transmitted per second in RSTP (rapid spanning tree protocol). This parameter determines how many BPDUs can be transmitted in a time interval, thereby controlling the frequency of transmission of BPDUs in the network. By limiting the number of BPDUs transmitted per second, it is possible to prevent excessive BPDUs in the network from causing unnecessary network load. Proper BPDU transmission frequency can ensure efficient operation of the spanning tree protocol without affecting the overall performance of the network. The acceptable integer value for this parameter is between 1 and 10.
And 3, developing OvsStp a controller.
A OvsStp controller was developed to monitor and handle CRD object changes as defined above. The controller needs to:
A connection is established with the OVS database (OVSDB) through the libovsdb library and secure TLS communication is performed with the OVS daemon through the OVSDB protocol.
Listening OvsStp CRD to create, update and delete events, map the spec field of the CRD to the other_config option of the bridge table of OVSDB.
The original other_config is obtained, the new configuration in the CRD is combined with it, and then the bridge table of OVSDB is operated (added, deleted, changed, checked) by the ovsdb.
Specifically, the Ovs Stp controller listens for and processes the CRD object changes defined above, establishes a connection with the Open vSwitch database (OVSDB) through the libovsdb library, and performs secure tls communication with the Open vSwitch daemon through the OVSDB protocol, after establishing a connection with the OVSDB server, in order to manage and configure the stp functions and parameters of the OVS, the controller maps the spec field of CRD to otherconfig options of Bridge of OVS db, obtains the original otherconfig, merges the two, and then operates (adds, deletes, changes, checks) Bridge's stp otherconfig of OVSDB through the ovsdb.
And 4, performing internal processing configuration updating of the OVS.
After receiving the configuration update, open vSwitch enables the corresponding STP or RSTP function according to parameters specified in the configuration (e.g., stpEnable =true or rstpEnable =true). Ports (ports) on each bridge (bridge) of the OVS will be managed according to STP or RSTP protocol states. Each port has a state (e.g., disabled, blocking, listening, learning, forwarding, etc.) that is dynamically adjusted by the protocol according to the network topology and configuration.
Specifically, the Open vSwitch, upon receiving a configuration update, enables the corresponding STP or RSTP function according to a parameter specified in the configuration (e.g., stp_enable=true or RSTP _enable=true). Participating in SPANNING TREE Protocol or RAPID SPANNING TREE Protocol operation in the network. Ports (ports) on each Open vSwitch bridge will be managed according to STP or RSTP protocol states. Each port has a state (e.g., disabled, blocking, listening, learning, forwarding, etc.) that is dynamically adjusted by the protocol according to the network topology and configuration.
And 5, synchronizing the controllers.
The OvsStp controller also needs to monitor the bridge table of the OVS, and if a change in STP state of the bridge is detected, update the status field of the corresponding OvsStp CRD so that the user can learn the STP state of the current OVS through the CRD.
Specifically, ovs stp controller listens to the bridge table of ovs and if the status configuration of the stp of the received bridge changes, sets the status of the corresponding OvsStp crd.
And 6, adjusting the configuration by a user.
The user may view the status field OvsStp CRD to see if it meets expectations based on status and network diagnostic results. If not, the spec configuration of OvsStp CRD may be adjusted. By adjusting configuration parameters (such as hello-time, max-age, forward-delay, etc.), the Open vSwitch can dynamically adjust network topology, optimizing performance and reliability.
Specifically, the user may view ovsstpcrd the state, view whether to compound expectations based on the state and network diagnostics, and if not, adjust ovs STP crd the spec configuration (e.g., adjust the state transition time of the ports based on STP and RSTP configuration parameters, such as hello-time, max-age, forward-delay, etc., open vSwitch for the purpose of quickly converging the network topology).
The status field is mainly used to monitor and diagnose the running state of RSTP in the network, for example:
(1) The unique identifier of the bridging device, that is, each bridging device can be uniquely identified through rstp _bridge_id, so that the management and maintenance are convenient.
(2) Root bridge information, namely, the root bridge of the current network topology and the path cost to the root bridge can be known through rstp _root_id and rstp _root_path_cost, so that the advantages and disadvantages of the network path are known.
(3) The assigned bridge and port-through rstp _ designated _id and rstp _ designated _port_id, the assigned bridge and port for each network segment can be known to help maintain the spanning tree topology.
(4) And the bridge port information is that each port participating in the spanning tree protocol on the bridge equipment can be known through rstp _bridge_port_id, so that configuration and management are convenient.
In summary, the automatic configuration method of the spanning tree protocol based on the DPU in the K8s cluster provided by the application example has the following beneficial effects:
1) Flexibility and extensibility
Custom Resource Definition (CRD) STP and RSTP configurations of the OVS can be flexibly extended and customized by defining the CRD without modifying the OVS source code.
And the expandability of the configuration parameters, namely the configuration parameters in the CRD can be flexibly adjusted according to the requirements, so as to meet the requirements of different network environments.
2) Automation and simplified management
And the automatic configuration issuing is realized by automatically issuing the configuration in the CRD to the OVS through the OvsStp controller, so that the complexity and the error risk of manual configuration are reduced.
And in the Kubernetes environment, STP and RSTP configurations of a plurality of OVS examples are managed through unified CRD, so that management efficiency is improved.
3) Real-time monitoring and dynamic adjustment
The controller can synchronize STP state of OVS to status field of CRD in real time, which is convenient for manager to know current network topology state.
And dynamically adjusting, namely dynamically adjusting configuration parameters in the CRD by an administrator according to real-time monitoring and network diagnosis results, rapidly responding to network changes and improving the reliability and stability of the network.
4) Improving network reliability
And (3) preventing a network loop, namely ensuring the stability and the rapid convergence of the network topology by finely configuring STP and RSTP parameters such as hello-time, max-age, forward-delay and the like.
And optimizing path selection, namely configuring rstpPriority and other parameters, so that network path selection can be optimized, and the high efficiency of data transmission is ensured.
5) Safety of
Secure communication, namely performing TLS secure communication with OVSDB through libovsdb library, and ensuring the security and integrity of configuration data in the transmission process.
6) Compatibility and standardization
The protocol is compatible with the existing protocol, the scheme is compatible with STP and RSTP protocol standards, and the protocol is suitable for the existing network equipment and configuration.
Standardized management, namely, the standardized degree of network configuration and management is improved through the standardized management of the Kubernetes CRD and the controller.
8) Easy to integrate and deploy
The scheme utilizes the native function of the Kubernetes, is easy to integrate into the existing Kubernetes cluster, and is convenient to deploy and maintain.
The operation is simplified, an administrator can perform STP and RSTP configuration management of the OVS through a familiar Kubernetes tool and interface, and learning and operation cost is reduced.
The embodiment of the application also provides an electronic device, which may include a processor, a memory, a receiver and a transmitter, where the processor is configured to execute the automatic configuration method of the spanning tree protocol based on the DPU in the K8s cluster according to the foregoing embodiment, and the processor and the memory may be connected by a bus or other manners, for example, by using a bus connection. The receiver may be connected to the processor, memory, by wire or wirelessly.
The processor may be a central processing unit (Central Processing Unit, CPU). The Processor may also be other general purpose processors, digital Signal Processors (DSP), application SPECIFIC INTEGRATED Circuits (ASIC), field-Programmable gate arrays (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above.
The memory is used as a non-transitory computer readable storage medium and can be used for storing non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions/modules corresponding to an automatic configuration method of a spanning tree protocol based on a DPU in a K8s cluster in the embodiment of the application. The processor executes various functional applications and data processing of the processor by running non-transitory software programs, instructions and modules stored in the memory, that is, the method for automatically configuring the DPU-based spanning tree protocol in the K8s cluster in the method embodiment is implemented.
The memory may include a storage program area that may store an operating system, application programs required for at least one function, and a storage data area that may store data created by the processor, etc. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory may optionally include memory located remotely from the processor, the remote memory being connectable to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory that, when executed by the processor, perform the method of automatically configuring a DPU-based spanning tree protocol in a K8s cluster in an embodiment.
In some embodiments of the present application, a user equipment may include a processor, a memory, and a transceiver unit, which may include a receiver and a transmitter, the processor, the memory, the receiver, and the transmitter may be connected by a bus system, the memory being configured to store computer instructions, the processor being configured to execute the computer instructions stored in the memory to control the transceiver unit to transmit and receive signals.
As an implementation manner, the functions of the receiver and the transmitter in the present application may be considered to be implemented by a transceiver circuit or a dedicated chip for transceiver, and the processor may be considered to be implemented by a dedicated processing chip, a processing circuit or a general-purpose chip.
As another implementation manner, a manner of using a general-purpose computer may be considered to implement the server provided by the embodiment of the present application. I.e. program code for implementing the functions of the processor, the receiver and the transmitter are stored in the memory, and the general purpose processor implements the functions of the processor, the receiver and the transmitter by executing the code in the memory.
The embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor, is configured to implement the steps of the automatic configuration method of the spanning tree protocol based on DPU in the K8s cluster. The computer readable storage medium may be a tangible storage medium such as Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, floppy disks, hard disk, a removable memory disk, a CD-ROM, or any other form of storage medium known in the art.
The embodiment of the application also provides a computer program product comprising a computer program which is executed by a processor to implement the steps of the automatic configuration method of the DPU-based spanning tree protocol in the K8s cluster.
Those of ordinary skill in the art will appreciate that the various illustrative components, systems, and methods described in connection with the embodiments disclosed herein can be implemented as hardware, software, or a combination of both. The particular implementation is hardware or software dependent on the specific application of the solution and the design constraints. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, a plug-in, a function card, or the like. When implemented in software, the elements of the application are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine readable medium or transmitted over transmission media or communication links by a data signal carried in a carrier wave.
It should be understood that the application is not limited to the particular arrangements and instrumentality described above and shown in the drawings. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and shown as examples. The method processes of the present application are not limited to the specific steps described and shown, but various changes, modifications and additions, or the order between steps may be made by those skilled in the art after appreciating the spirit of the present application.
In this disclosure, features that are described and/or illustrated with respect to one embodiment may be used in the same way or in a similar way in one or more other embodiments and/or in combination with or instead of the features of the other embodiments.
The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, and various modifications and variations can be made to the embodiments of the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1.一种基于DPU的生成树协议在K8s集群中的自动配置方法,其特征在于,包括:1. A method for automatic configuration of a spanning tree protocol based on a DPU in a K8s cluster, comprising: 实时监听K8s集群中的生成树协议配置实例是否发生配置数据变更,若是,则根据该生成树协议配置实例更新虚拟交换机数据库的桥接设备表,以使得设置在数据处理器DPU中的虚拟交换机基于更新后的所述虚拟交换机数据库的桥接设备表接收当前更新的所述配置数据,并判断所述配置数据中是否包含有生成树协议配置数据,若是,则根据生成树协议配置数据对应配置或启动对应的生成树协议STP和/或快速生成树协议RSTP;Monitor in real time whether the spanning tree protocol configuration instance in the K8s cluster has any configuration data changes. If so, update the bridge device table of the virtual switch database according to the spanning tree protocol configuration instance, so that the virtual switch set in the data processor DPU receives the currently updated configuration data based on the updated bridge device table of the virtual switch database, and determines whether the configuration data contains spanning tree protocol configuration data. If so, configure or start the corresponding spanning tree protocol STP and/or rapid spanning tree protocol RSTP according to the spanning tree protocol configuration data; 实时监听所述虚拟交换机是否配置或启动对应的生成树协议STP和/或快速生成树协议RSTP,若是,则对应更新针对生成树协议的自定义资源定义单元的状态,以使得用户自该自定义资源定义单元获知所述虚拟交换机当前的生成树协议设置状态。Monitor in real time whether the virtual switch is configured or started with the corresponding spanning tree protocol STP and/or rapid spanning tree protocol RSTP. If so, update the status of the custom resource definition unit for the spanning tree protocol accordingly, so that the user can learn the current spanning tree protocol setting status of the virtual switch from the custom resource definition unit. 2.根据权利要求1所述的基于DPU的生成树协议在K8s集群中的自动配置方法,其特征在于,所述根据该生成树协议配置实例更新虚拟交换机数据库的桥接设备表,包括:2. According to the automatic configuration method of the spanning tree protocol based on DPU in the K8s cluster according to claim 1, it is characterized in that the updating of the bridge device table of the virtual switch database according to the spanning tree protocol configuration instance comprises: 解析该生成树协议配置实例的资源期望状态字段,并将解析到的该资源期望状态字段映射为虚拟交换机数据库的桥接设备表的自定义设置选项;Parsing the resource expected state field of the spanning tree protocol configuration instance, and mapping the parsed resource expected state field to a custom setting option of a bridge device table of a virtual switch database; 将映射后的所述自定义设置选项与所述虚拟交换机数据库中原始的自定义设置选项进行合并;Merging the mapped custom setting options with the original custom setting options in the virtual switch database; 基于数据库操作结构体更新所述虚拟交换机数据库的桥接设备表;Update the bridging device table of the virtual switch database based on the database operation structure; 根据更新后的所述虚拟交换机数据库的桥接设备表对应更新针对生成树协议的自定义资源定义单元的状态。The state of the custom resource definition unit for the spanning tree protocol is correspondingly updated according to the updated bridging device table of the virtual switch database. 3.根据权利要求1所述的基于DPU的生成树协议在K8s集群中的自动配置方法,其特征在于,在所述实时监听K8s集群中的生成树协议配置实例是否发生配置数据变更之前,还包括:3. The automatic configuration method of the spanning tree protocol based on DPU in the K8s cluster according to claim 1 is characterized in that before the real-time monitoring of whether the spanning tree protocol configuration instance in the K8s cluster has a configuration data change, it also includes: 与虚拟交换机数据库建立连接,并通过虚拟交换机数据库协议与虚拟交换机的守护进程进行通信连接。Establish a connection with the virtual switch database and communicate with the daemon process of the virtual switch through the virtual switch database protocol. 4.根据权利要求2所述的基于DPU的生成树协议在K8s集群中的自动配置方法,其特征在于,所述针对生成树协议的自定义资源定义单元预先在所述K8s集群中被创建,且用于控制所述虚拟交换机的生成树协议配置数据的下发;所述生成树协议配置数据包括:生成树协议STP和/或快速生成树协议RSTP对应的各类配置参数;4. According to the automatic configuration method of the spanning tree protocol based on DPU in the K8s cluster of claim 2, it is characterized in that the custom resource definition unit for the spanning tree protocol is created in advance in the K8s cluster and is used to control the distribution of the spanning tree protocol configuration data of the virtual switch; the spanning tree protocol configuration data includes: various configuration parameters corresponding to the spanning tree protocol STP and/or the rapid spanning tree protocol RSTP; 相对应的,所述生成树协议配置实例预先在所述K8s集群中被创建,且用于自所述自定义资源定义单元下发的所述生成树协议配置数据,配置所述虚拟交换机的生成树协议STP和/或快速生成树协议RSTP对应的各类配置参数。Correspondingly, the spanning tree protocol configuration instance is created in advance in the K8s cluster, and is used to configure the spanning tree protocol configuration data issued from the custom resource definition unit to configure various configuration parameters corresponding to the spanning tree protocol STP and/or rapid spanning tree protocol RSTP of the virtual switch. 5.根据权利要求4所述的基于DPU的生成树协议在K8s集群中的自动配置方法,其特征在于,所述生成树协议STP对应的各类配置参数包括:所述生成树协议STP的优先级参数、定时器参数、网桥协议数据单元BPDU在网络中的可存活最大时间参数以及指定虚拟交换机端口在从阻塞状态到转发状态之间的过渡时间参数。5. According to the automatic configuration method of the spanning tree protocol based on DPU in the K8s cluster according to claim 4, it is characterized in that the various configuration parameters corresponding to the spanning tree protocol STP include: the priority parameter of the spanning tree protocol STP, the timer parameter, the maximum survivable time parameter of the bridge protocol data unit BPDU in the network, and the transition time parameter of the specified virtual switch port from the blocking state to the forwarding state. 6.根据权利要求4所述的基于DPU的生成树协议在K8s集群中的自动配置方法,其特征在于,所述快速生成树协议RSTP对应的各类配置参数包括:所述快速生成树协议RSTP的优先级参数、虚拟交换机的地址参数、虚拟交换机老化时间参数、版本参数、桥的最大老化时间参数、桥的转发延迟时间参数以及每秒钟允许发送网桥协议数据单元BPDU的最大数量参数。6. According to the automatic configuration method of the DPU-based spanning tree protocol in the K8s cluster according to claim 4, it is characterized in that the various configuration parameters corresponding to the rapid spanning tree protocol RSTP include: the priority parameter of the rapid spanning tree protocol RSTP, the address parameter of the virtual switch, the aging time parameter of the virtual switch, the version parameter, the maximum aging time parameter of the bridge, the forwarding delay time parameter of the bridge, and the maximum number parameter of the bridge protocol data unit BPDU allowed to be sent per second. 7.根据权利要求1所述的基于DPU的生成树协议在K8s集群中的自动配置方法,其特征在于,所述对应更新针对生成树协议的自定义资源定义单元的状态,包括:7. The automatic configuration method of the spanning tree protocol based on DPU in the K8s cluster according to claim 1, characterized in that the corresponding update of the state of the custom resource definition unit for the spanning tree protocol includes: 更新针对生成树协议的自定义资源定义单元的运行状态监控字段,其中,所述运行状态监控字段包括:桥接设备的唯一标识符、根桥信息、指定桥、指定端口和桥接端口信息。The running status monitoring field of the custom resource definition unit for the spanning tree protocol is updated, wherein the running status monitoring field includes: a unique identifier of a bridging device, root bridge information, a designated bridge, a designated port, and bridge port information. 8.一种控制器,其特征在于,包括:8. A controller, comprising: 生成树协议配置模块,用于实时监听K8s集群中的生成树协议配置实例是否发生配置数据变更,若是,则根据该生成树协议配置实例更新虚拟交换机数据库的桥接设备表,以使得设置在数据处理器DPU中的虚拟交换机基于更新后的所述虚拟交换机数据库的桥接设备表接收当前更新的所述配置数据,并判断所述配置数据中是否包含有生成树协议配置数据,若是,则根据生成树协议配置数据对应配置或启动对应的生成树协议STP和/或快速生成树协议RSTP;A spanning tree protocol configuration module is used to monitor in real time whether a spanning tree protocol configuration instance in a K8s cluster has any configuration data changes. If so, the bridging device table of the virtual switch database is updated according to the spanning tree protocol configuration instance, so that the virtual switch set in the data processor DPU receives the currently updated configuration data based on the updated bridging device table of the virtual switch database, and determines whether the configuration data contains spanning tree protocol configuration data. If so, the corresponding spanning tree protocol STP and/or rapid spanning tree protocol RSTP are configured or started according to the spanning tree protocol configuration data; 虚拟交换机监听模块,用于实时监听所述虚拟交换机是否配置或启动对应的生成树协议STP和/或快速生成树协议RSTP,若是,则对应更新针对生成树协议的自定义资源定义单元的状态,以使得用户自该自定义资源定义单元获知所述虚拟交换机当前的生成树协议设置状态。The virtual switch monitoring module is used to monitor in real time whether the virtual switch is configured or started with the corresponding spanning tree protocol STP and/or rapid spanning tree protocol RSTP. If so, the status of the custom resource definition unit for the spanning tree protocol is updated accordingly, so that the user can learn the current spanning tree protocol setting status of the virtual switch from the custom resource definition unit. 9.一种基于DPU的生成树协议在K8s集群中的自动配置系统,其特征在于,包括:设置在K8s集群中的控制器、主机和数据处理器DPU;9. An automatic configuration system of a spanning tree protocol based on a DPU in a K8s cluster, characterized by comprising: a controller, a host and a data processor DPU arranged in the K8s cluster; 所述控制器用于执行权利要求1至7任一项所述的基于DPU的生成树协议在K8s集群中的自动配置方法;The controller is used to execute the automatic configuration method of the spanning tree protocol based on the DPU in the K8s cluster according to any one of claims 1 to 7; 所述主机中设有虚拟交换机代理器;所述数据处理器DPU中设有虚拟交换机,所述控制器经由所述虚拟交换机代理器与所述虚拟交换机之间通信连接。The host is provided with a virtual switch agent; the data processor DPU is provided with a virtual switch, and the controller is connected to the virtual switch through the virtual switch agent. 10.根据权利要求9所述的基于DPU的生成树协议在K8s集群中的自动配置系统,其特征在于,所述控制器还分别与分布式搜索引擎、服务监控系统以及分布式实时数据追踪系统中的至少一个通信连接。10. The automatic configuration system of the DPU-based spanning tree protocol in the K8s cluster according to claim 9 is characterized in that the controller is also communicated with at least one of the distributed search engine, the service monitoring system and the distributed real-time data tracking system.
CN202510257650.2A 2025-03-05 2025-03-05 Automatic configuration method, controller and system of spanning tree protocol based on DPU in K8s cluster Pending CN120166028A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202510257650.2A CN120166028A (en) 2025-03-05 2025-03-05 Automatic configuration method, controller and system of spanning tree protocol based on DPU in K8s cluster

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202510257650.2A CN120166028A (en) 2025-03-05 2025-03-05 Automatic configuration method, controller and system of spanning tree protocol based on DPU in K8s cluster

Publications (1)

Publication Number Publication Date
CN120166028A true CN120166028A (en) 2025-06-17

Family

ID=96010427

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202510257650.2A Pending CN120166028A (en) 2025-03-05 2025-03-05 Automatic configuration method, controller and system of spanning tree protocol based on DPU in K8s cluster

Country Status (1)

Country Link
CN (1) CN120166028A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1525715A (en) * 2003-02-26 2004-09-01 华为技术有限公司 A Method for Realizing Multiple Spanning Tree Protocol on Single Spanning Tree Switching Chip
US20190173782A1 (en) * 2017-12-04 2019-06-06 iS5 Communications Inc. Multiple rstp domain separation
US20200314006A1 (en) * 2019-03-29 2020-10-01 Juniper Networks, Inc. Scalable multi-tenant underlay network supporting multi-tenant overlay network
CN112671583A (en) * 2020-12-25 2021-04-16 北京华耀科技有限公司 Topology pruning method and device for ring network and virtual switch
CN118964116A (en) * 2024-07-01 2024-11-15 中科驭数(北京)科技有限公司 A DPU chip system management method and device based on Kubernetes
CN119011309A (en) * 2023-05-22 2024-11-22 英特尔公司 Network interface device based computing
CN119383068A (en) * 2024-12-25 2025-01-28 深圳市丰润达科技有限公司 Spanning tree protocol synchronization method, device, equipment and storage medium based on MLAG protocol

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1525715A (en) * 2003-02-26 2004-09-01 华为技术有限公司 A Method for Realizing Multiple Spanning Tree Protocol on Single Spanning Tree Switching Chip
US20190173782A1 (en) * 2017-12-04 2019-06-06 iS5 Communications Inc. Multiple rstp domain separation
US20200314006A1 (en) * 2019-03-29 2020-10-01 Juniper Networks, Inc. Scalable multi-tenant underlay network supporting multi-tenant overlay network
CN112671583A (en) * 2020-12-25 2021-04-16 北京华耀科技有限公司 Topology pruning method and device for ring network and virtual switch
CN119011309A (en) * 2023-05-22 2024-11-22 英特尔公司 Network interface device based computing
CN118964116A (en) * 2024-07-01 2024-11-15 中科驭数(北京)科技有限公司 A DPU chip system management method and device based on Kubernetes
CN119383068A (en) * 2024-12-25 2025-01-28 深圳市丰润达科技有限公司 Spanning tree protocol synchronization method, device, equipment and storage medium based on MLAG protocol

Similar Documents

Publication Publication Date Title
US10680948B2 (en) Hybrid packet processing
US10931574B2 (en) Universal customer premise equipment
CN115918139A (en) Active Guarantees for Network Slicing
CN113452830B (en) Batch control method of android cloud mobile phone, computer readable medium and electronic device
CN104081718B (en) Network controller for remote system management
US8458305B2 (en) Method and system for matching and repairing network configuration
KR101221551B1 (en) Network controller based pass-through communication mechanism between local host and management controller
CN110178342B (en) Scalable application level monitoring of SDN networks
CN115941456A (en) Network Policy Generation for Continuous Deployment
TWI477110B (en) Data communication method and data communication system
US20110292807A1 (en) Method and system for sideband communication architecture for supporting manageability over wireless lan (wlan)
CN116980271A (en) Vendor-independent profile-based modeling of service access endpoints in a multi-tenant environment
CN113810206B (en) A network automation orchestration management method, entity, controller and electronic equipment
US10931521B2 (en) Software defined network system with auto-deployed switch and method for deploying switch
CN109644159B (en) Data Packet Forwarding Unit in Data Transmission Network
WO2018085973A1 (en) Network slice management method, and unit and system
US11916739B2 (en) Mitigation of physical network misconfigurations for clustered nodes
CN120166028A (en) Automatic configuration method, controller and system of spanning tree protocol based on DPU in K8s cluster
WO2021224931A1 (en) System and a method to efficiently exchange echo and stats messages between sdn controller and the open vswitches
CN117478583A (en) Network link switching method, device, equipment and storage medium
CN117061424A (en) Containerized router using virtual networking
CN116530130A (en) Proactive guarantees for virtualized services
US20240056814A1 (en) Supporting computer networking device connections to controllers using different connection protocols
CN119603138A (en) A switch network configuration method and system based on cloud native environment
EP4612883A1 (en) System and method for coordinated observability data generation and collection in distributed systems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination