CN114553799B - Multicast forwarding method, device, equipment and medium based on programmable data plane - Google Patents
Multicast forwarding method, device, equipment and medium based on programmable data plane Download PDFInfo
- Publication number
- CN114553799B CN114553799B CN202210035797.3A CN202210035797A CN114553799B CN 114553799 B CN114553799 B CN 114553799B CN 202210035797 A CN202210035797 A CN 202210035797A CN 114553799 B CN114553799 B CN 114553799B
- Authority
- CN
- China
- Prior art keywords
- multicast
- information
- message
- switch
- multicast port
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 52
- 238000001514 detection method Methods 0.000 claims description 13
- 230000008859 change Effects 0.000 claims description 10
- 230000004083 survival effect Effects 0.000 claims description 9
- 238000004590 computer program Methods 0.000 claims description 5
- 230000004044 response Effects 0.000 claims description 4
- 238000004891 communication Methods 0.000 abstract description 13
- 230000005540 biological transmission Effects 0.000 abstract description 10
- 230000007246 mechanism Effects 0.000 abstract description 5
- 238000005516 engineering process Methods 0.000 description 6
- 238000012545 processing Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 239000000523 sample Substances 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000006798 recombination Effects 0.000 description 1
- 238000005215 recombination Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/20—Support for services
- H04L49/201—Multicast operation; Broadcast operation
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application provides a multicast forwarding method, a device, equipment and a medium based on a programmable data plane, and belongs to the technical field of communication. The method comprises the following steps: the exchanger receives a P4 file sent by the controller, wherein the P4 file carries forwarding guide information, and the forwarding guide information comprises message type information, an execution strategy and multicast bit information; compiling the P4 file by the exchanger to obtain message type information, an execution strategy and multicast bit information; the exchanger obtains multicast port information by initializing the multicast bit information; when receiving the target message matched with the message type information, the switch forwards the target message to a multicast port corresponding to the multicast port information based on an execution strategy. The application can solve the limitation of traditional multicast to message protocol by utilizing the programmable data plane which has independent characteristics of protocol and equipment, and optimize the fault-tolerant mechanism for packet loss and packet error in multicast transmission.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, and a medium for multicast forwarding based on a programmable data plane.
Background
Multicasting is a network technology that can send identical packets to a group of clients at the same time. Hosts may request to join or leave a group from routers, and routers and switches in the network selectively replicate and transfer data, i.e., transfer intra-group data only to those hosts joining the group.
IP multicasting is the provision of dynamic many-to-many connections between a group of senders (at least 1) and a group of receivers. The format of the IP multicast message is identical to that of the unicast message and is distinguished only by using a special destination address (IPv 4 class D address) which represents a specific multicast group. However, the use of this technique is greatly limited, and first, the existing multicast protocol does not support custom messages; secondly, in point-to-point connections, the TCP protocol has a very sophisticated scenario of handling packet losses, while in multipoint connections, some errors cannot be handled simply. Meanwhile, the TCP protocol commonly used in the industry is not suitable for the traditional multicast mode, which greatly limits the use of multicast technology.
Disclosure of Invention
The main purpose of the embodiment of the application is to provide a multicast forwarding method, a device, equipment and a medium based on a programmable data plane, which can solve the limitation of traditional multicast to a message protocol by utilizing the programmable data plane which has independent characteristics of the protocol and the equipment, and optimize the fault-tolerant mechanism for packet loss and packet error in multicast transmission.
To achieve the above object, a first aspect of an embodiment of the present application provides a multicast forwarding method for a programmable data plane, which is applied to a multicast network, where the multicast network includes a controller and a switch, and the method includes:
the exchanger receives a P4 file sent by the controller, wherein the P4 file carries forwarding guide information, and the forwarding guide information comprises message type information, an execution strategy and multicast bit information;
the exchanger compiles the P4 file to obtain the message type information, the execution strategy and the multicast bit information;
the switch obtains multicast port information by initializing the multicast bit information;
and when receiving a target message matched with the message type information, the switch forwards the target message to a multicast port corresponding to the multicast port information based on the execution strategy.
In some embodiments, when the switch receives a packet that matches the packet type information, before forwarding the packet to a multicast port corresponding to the multicast port information based on the execution policy, the method further includes:
the exchanger receives pipeline configuration information obtained by compiling the P4 file by the controller;
and initializing the pipeline configuration information by the switch to establish end-to-end connection of the multicast ports corresponding to the multicast port information by the switch.
In some embodiments, the switch initializes the pipe configuration information to establish an end-to-end connection of the multicast port corresponding to the multicast port information, including:
the exchanger obtains pipeline initialization configuration information by initializing the pipeline configuration information;
and the switch sends a detection packet to the corresponding multicast port according to the pipeline initialization configuration information and the multicast port information so as to establish end-to-end connection between the switch and the corresponding multicast port.
In some embodiments, when the switch receives the target message matched with the message type information, forwarding the target message to a multicast port corresponding to the multicast port information based on the execution policy, including:
the switch analyzes the received first message to obtain message header information corresponding to the first message;
determining a multicast port corresponding to the multicast port information according to the message header information;
matching and reorganizing the message header information according to the multicast port and the message type information to obtain a target message;
and forwarding the target message to the multicast port corresponding to the multicast port information based on the execution strategy.
In some embodiments, when the switch receives the target message matched with the message type information, forwarding the target message to a multicast port corresponding to the multicast port information based on the execution policy, and further including:
acquiring the target message corresponding to the multicast port;
the target message is sent to the controller for message information storage;
setting message storage time in the controller according to the survival time of the detection packet;
and deleting the target message when the storage time of the target message exceeds the set message storage time.
In some embodiments, the method further comprises:
and when the switch does not receive the response information returned by the multicast port within the preset time, the switch receives a second message sent by the controller based on the TCP protocol and sends the second message to the multicast port.
In some embodiments, the method further comprises:
and when receiving the multicast member equipment change indication information, the switch changes the multicast port information in the multicast bit information according to the multicast member equipment change indication information.
A second aspect of an embodiment of the present application proposes a multicast forwarding device based on a programmable data plane, including:
the file receiving module is used for receiving a P4 file sent by the controller by the exchanger, wherein the P4 file carries forwarding guide information, and the forwarding guide information comprises message type information, an execution strategy and multicast bit information;
the compiling module is used for compiling the P4 file by the switch to obtain the message type information, the execution strategy and the multicast bit information;
an initialization module, configured to initialize the multicast bit information by the switch to obtain multicast port information;
and the message forwarding module is used for forwarding the target message to the multicast port corresponding to the multicast port information based on the execution strategy when the switch receives the target message matched with the message type information.
A third aspect of the embodiments of the present application proposes a computer device, the computer device comprising a memory and a processor, wherein the memory stores a program, and the processor is configured to execute the multicast forwarding method based on a programmable data plane according to any one of the embodiments of the first aspect of the present application when the program is executed by the processor.
A fourth aspect of the embodiments of the present application proposes a computer readable storage medium storing a computer program for executing a multicast forwarding method based on a programmable data plane according to any of the embodiments of the first aspect of the present application when the computer program is executed by a computer.
The multicast forwarding method, device, equipment and medium based on the programmable data plane provided by the embodiment of the application are applied to a multicast network, wherein the multicast network comprises a controller and a switch, and the P4 file sent by the controller is received through the switch, wherein the P4 file carries forwarding guide information, and the forwarding guide information comprises message type information, execution strategy and multicast bit information and is used for guiding forwarding of the compiled P4 file. And compiling the P4 file by the switch to obtain message type information, an execution strategy and multicast bit information. Then, the switch obtains multicast port information by initializing the multicast bit information. When receiving the target message matched with the message type information, the switch forwards the target message to a multicast port corresponding to the multicast port information based on an execution strategy. The application can solve the limitation of the traditional multicast network to the message protocol by utilizing the programmable data plane which has the characteristics of independence of protocol and independence of equipment, and optimizes the fault-tolerant mechanism for packet loss and packet error in multicast transmission.
Drawings
Fig. 1 is a flowchart of a multicast forwarding method based on a programmable data plane according to an embodiment of the present application;
fig. 2 is a flowchart of a multicast forwarding method based on a programmable data plane according to another embodiment of the present application;
fig. 3 is a flowchart of step S230 in fig. 2;
fig. 4 is a flowchart of step S140 in fig. 1;
fig. 5 is another flowchart of step S140 in fig. 1;
fig. 6 is a schematic hardware structure of a computer device according to an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
It should be noted that although functional block division is performed in a device diagram and a logic sequence is shown in a flowchart, in some cases, the steps shown or described may be performed in a different order than the block division in the device, or in the flowchart. The terms first, second and the like in the description and in the claims and in the above-described figures, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the application only and is not intended to be limiting of the application.
Multicast (Multicast), also known as multi-target broadcast, multicast, is a transmission scheme used in networks that allows the delivery of a transmitted message to a selected subset of all possible destinations, i.e., to a variety of addresses explicitly indicated, is a method of communication between a sender and multiple receivers. Specifically, when the active host sends information demand to the multipoint target host, the active host only sends one data, the destination address of the data is a multicast group address, thus, all the members belonging to the group can receive a copy of the data sent by the active host, and in the multicast mode, only the members which are really needed by information can receive the information, but other hosts can not receive the information. Therefore, the multicast mode solves the problems of repeated copying of data and repeated occupation of bandwidth under the unicast condition and the waste of bandwidth resources under the broadcast mode.
IP multicasting is the provision of dynamic many-to-many connections between a group of senders (at least 1) and a group of receivers. The format of the IP multicast message is identical to that of the unicast message and is distinguished only by using a special destination address (IPv 4 class D address) which represents a specific multicast group. However, the use of this technique is greatly limited, and first, the existing multicast protocol does not support custom messages; secondly, in point-to-point connections, the TCP protocol has a very sophisticated scenario of handling packet losses, while in multipoint connections, some errors cannot be handled simply. Meanwhile, the TCP protocol commonly used in the industry is not suitable for the traditional multicast mode, which greatly limits the use of multicast technology.
Based on this, the main purpose of the embodiments of the present application is to propose a multicast forwarding method, apparatus, device and medium based on a programmable data plane, which can utilize the programmable data plane having independent characteristics of devices independent of protocols, and can solve the limitation of the conventional multicast network to the message protocol, and optimize the fault tolerance mechanism for packet loss and packet error in multicast transmission.
Embodiments of the application are operational with numerous general purpose or special purpose computer system environments or configurations. For example: server computers, hand-held or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
Referring to fig. 1, a multicast forwarding method based on a programmable data plane according to an embodiment of a first aspect of the present application is applied to a multicast network including a controller and a switch, the method including, but not limited to, steps S110 to S140.
S110, the exchanger receives a P4 file sent by the controller, wherein the P4 file carries forwarding guide information, and the forwarding guide information comprises message type information, an execution strategy and multicast bit information;
s120, the exchanger compiles the P4 file to obtain message type information, an execution strategy and multicast bit information;
s130, the exchanger obtains multicast port information by initializing the multicast bit information;
and S140, when the switch receives the target message matched with the message type information, forwarding the target message to a multicast port corresponding to the multicast port information based on the execution strategy.
Specifically, the multicast network receives a P4 file sent by the controller through the switch, wherein the P4 file carries forwarding guide information, and the forwarding guide information comprises message type information, an execution strategy and multicast bit information. The message type information includes a message format and a protocol type, an execution policy is that an action is executed correspondingly, and Multicast bit (multicast_bits) information is used to obtain corresponding Multicast port information that needs to be transmitted by the message. And the exchanger compiles the P4 file through a compiler to obtain message type information, an execution strategy and multicast bit information. And then, the switch obtains the multicast port information by initializing the multicast bit information. When receiving the target message matched with the message type information, the switch forwards the target message to a multicast port corresponding to the multicast port information based on an execution strategy.
It should be noted that the present application adopts a programmable data plane as an implementation carrier of the multicast network, the programmable data plane uses a control plane (equivalent to a controller in the multicast network) and a data plane (equivalent to a switch in the multicast network) separated by numerical control, and the programmable data plane has characteristics of independence of protocols and independence of devices, so that transmission of messages of a custom protocol in the multicast network, namely, a point-to-point protocol including a TCP protocol which is not supported by a traditional multicast mode, can be implemented.
In some embodiments, as shown in fig. 2, the method further includes, but is not limited to, steps S210 through S220 prior to step S140.
S210, the exchanger receives pipeline configuration information obtained by compiling the P4 file by the controller;
s220, the exchanger initializes the pipeline configuration information to establish the end-to-end connection of the exchanger and the multicast port corresponding to the multicast port information.
Specifically, the controller loads the P4 file, compiles the P4 file through a compiler to obtain pipeline configuration information, and issues the pipeline configuration information to a data plane, namely a switch. And initializing the channel configuration information by the switch to establish end-to-end connection of the multicast ports corresponding to the switch and the multicast port information, namely realizing end-to-end connection of the switch and the corresponding multicast ports at a forwarding layer of the switch, thereby reducing the load of a service end in the multicast network.
In some embodiments, as shown in fig. 3, step S230 specifically includes, but is not limited to, steps S310 to S320.
S310, the exchanger obtains pipeline initialization configuration information by initializing the pipeline configuration information;
and S320, the switch sends a detection packet to the corresponding multicast port according to the pipeline initialization configuration information and the multicast port information so as to establish end-to-end connection between the switch and the corresponding multicast port.
Specifically, the switch obtains the pipeline initialization configuration information by initializing the loaded pipeline configuration information, and sends a probe packet to the corresponding multicast port through the pipeline initialization configuration information and the multicast port information according to the written specific code behavior requirement, wherein the probe packet is used for establishing a connection of a reliable protocol with each client of a multicast group in the multicast network, such as establishing a TCP connection.
It should be noted that, when accessing the multicast network, the multicast source may perform client authentication on the client device of the multicast group, and issue corresponding authority information after the client authentication passes, so as to control the subsequent multicast message transmission of the client device, and prevent the client device that is not authenticated from arbitrarily transmitting the multicast message to the multicast network, thereby improving the security of the multicast source control process in the multicast network. Meanwhile, the programmable data plane utilized by the application has the independent running state characteristic of equipment, and can change the port information of the client in the multicast group network in real time, thereby realizing the convenient change of the members in the multicast group.
In some embodiments, as shown in fig. 4, step S140 specifically includes, but is not limited to, steps S410 to S440.
S410, the switch analyzes the received first message to obtain message header information corresponding to the first message;
s420, determining a multicast port corresponding to the multicast port information according to the message header information;
s430, matching and reorganizing the message header information according to the multicast port and the message type information to obtain a target message;
s440, forwarding the target message to the multicast port corresponding to the multicast port information based on the executing strategy.
Specifically, the server sends a first message, and the switch analyzes the received first message to obtain message header information corresponding to the first message. And matching flow table information in the switch according to the message header information, thereby determining a multicast port corresponding to the multicast port information to be sent by the first message, reading the multicast port number of the multicast port according to the bit, and carrying out matching recombination processing on the message header information according to the multicast port and the message type information to obtain the target message. And finally, forwarding the target message to a multicast port corresponding to the multicast port information based on the execution strategy of the P4 file after compiling. For example, when the received first message is an IPv4 message, after the header information of the IPv4 message is parsed, the multicast port corresponding to the multicast port information is matched, so that an end-to-end TCP connection between the switch and the multicast port is established, and reliable protocol messages can be sent.
In some embodiments, as shown in fig. 5, step S140 specifically further includes, but is not limited to, steps S510 to S540.
S510, obtaining a target message corresponding to a multicast port;
s520, sending the target message to a controller for message information storage;
s530, setting message storage time in a controller according to the survival time of the detection packet;
s540, deleting the target message when the storage time of the target message exceeds the set message storage time.
Specifically, when matching and reorganizing message header information according to multicast port and message type information to obtain a target message, forwarding the target message to a multicast port corresponding to the multicast port information based on an execution strategy of a compiled P4 file, and simultaneously, transmitting the obtained target message to a controller by a switch to store the message information, wherein the information transmitted to the controller by the switch is commonly called Packet-in information. And then, the controller sets message storage Time in the controller according To the survival Time (TTL) of the detection packet, and deletes the target message when the storage Time of the target message exceeds the set message storage Time.
Note that the TTL survival time refers to how many routers this packet is allowed to pass before reaching its destination. Each time a packet passes through a router, its lifetime is reduced by one by the router, and when the lifetime drops to zero, the router discards the packet. Therefore, the controller can set the dynamic message storage time according to the survival time of the detection packet, and delete the target message when the storage time of the target message exceeds the set message storage time.
In some embodiments, the multicast forwarding method based on the programmable data plane further comprises: and when the switch does not receive the response information returned by the multicast port within the preset time, the switch receives a second message sent by the controller based on the TCP protocol and sends the second message to the multicast port.
Specifically, the switch forwards the target message to the multicast port corresponding to the multicast port information based on the execution strategy, and when the switch does not receive the response information returned by the multicast port within the preset time, that is, the multicast port does not receive the target message, the current multicast network has a lost transmission error. The controller will send Packet-out information to the switch based on the reliable transmission protocol of TCP, i.e. the controller will send a second message to the switch based on the TCP protocol, which may be the same message as the first message, wherein the information sent by the controller to the switch is collectively referred to as Packet-out information. The switch processes the second message again according to the multicast forwarding method based on the programmable data plane, and sends the second message to the multicast port.
In some embodiments, the multicast forwarding method based on the programmable data plane further comprises: when receiving the multicast member device change indication information, the switch changes the multicast port information in the multicast bit information according to the multicast member device change indication information.
Specifically, in order to better improve the application of the multicast technology, the programmable data plane of the application is in a real-time running state, that is, the switch can accept a new P4 file issued by the controller in real time, and when the switch receives the change indication information of the multicast member equipment, the switch changes the multicast port information in the multicast bit information according to the change indication information of the multicast member equipment.
The embodiment of the application also provides a multicast forwarding device based on the programmable data plane, which comprises a file receiving module, a compiling module, an initializing module and a message forwarding module, wherein the file receiving module is used for receiving a P4 file sent by a controller by a switch, the P4 file carries forwarding guide information, and the forwarding guide information comprises message type information, an execution strategy and multicast bit information; the compiling module is used for compiling the P4 file by the exchanger to obtain message type information, an execution strategy and multicast bit information; the initialization module is used for initializing the multicast bit information by the switch to obtain multicast port information; and the message forwarding module is used for forwarding the target message to a multicast port corresponding to the multicast port information based on an execution strategy when the switch receives the target message matched with the message type information. The application can solve the limitation of traditional multicast to message protocol by utilizing the programmable data plane which has independent characteristics of protocol and equipment, and optimize the fault-tolerant mechanism for packet loss and packet error in multicast transmission. The multicast forwarding device based on the programmable data plane in the embodiment of the present application is used for executing the multicast forwarding method based on the programmable data plane in the above embodiment, and the specific processing procedure is the same as that of the multicast forwarding method based on the programmable data plane in the above embodiment, and is not described in detail herein.
The embodiment of the application also provides a computer device, which comprises a memory and a processor, wherein the memory stores a program, and the processor is used for executing the multicast forwarding method based on the programmable data plane according to any one of the embodiments of the first aspect of the application when the program is executed by the processor.
The hardware structure of the computer device is described in detail below with reference to fig. 6. The computer device includes: a processor 601, a memory 602, an input/output interface 603, a communication interface 604, and a bus 605.
The processor 601 may be implemented by a general-purpose CPU (Central Processin Unit, central processing unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc. for executing related programs to implement the technical scheme provided by the embodiments of the present application;
the Memory 602 may be implemented in the form of a ROM (Read Only Memory), a static storage device, a dynamic storage device, or a RAM (Random Access Memory ). The memory 602 may store an operating system and other application programs, and when the technical solutions provided in the embodiments of the present disclosure are implemented by software or firmware, relevant program codes are stored in the memory 602, and the processor 601 invokes a multicast forwarding method based on a programmable data plane for executing the embodiments of the present disclosure;
an input/output interface 603 for implementing information input and output;
the communication interface 604 is configured to implement communication interaction between the device and other devices, and may implement communication in a wired manner (e.g. USB, network cable, etc.), or may implement communication in a wireless manner (e.g. mobile network, WIFI, bluetooth, etc.); and a bus 605 for transferring information between the various components of the device (e.g., the processor 601, memory 602, input/output interface 603, and communication interface 604);
wherein the processor 601, the memory 602, the input/output interface 603 and the communication interface 604 are communicatively coupled to each other within the device via a bus 605.
Embodiments of the present application also provide a computer readable storage medium storing a computer program for executing the programmable data plane based multicast forwarding method according to any one of the embodiments of the first aspect of the present application when the computer program is executed by a computer.
The memory, as a non-transitory computer readable storage medium, may be used to store non-transitory software programs as well as non-transitory computer executable programs. 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 optionally includes memory remotely located relative to 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 embodiments described in the embodiments of the present application are for more clearly describing the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application, and those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.
It will be appreciated by those skilled in the art that the solutions shown in fig. 1-5 are not limiting on the embodiments of the application and may include more or fewer steps than shown, or certain steps may be combined, or different steps.
The above described apparatus embodiments are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, i.e. may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Those of ordinary skill in the art will appreciate that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof.
The terms "first," "second," "third," "fourth," and the like in the description of the application and in the above figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present application, "at least one (item)" means one or more, and "a plurality" means two or more. "and/or" for describing the association relationship of the association object, the representation may have three relationships, for example, "a and/or B" may represent: only a, only B and both a and B are present, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b or c may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including multiple instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing a program.
The preferred embodiments of the present application have been described above with reference to the accompanying drawings, and are not thereby limiting the scope of the claims of the embodiments of the present application. Any modifications, equivalent substitutions and improvements made by those skilled in the art without departing from the scope and spirit of the embodiments of the present application shall fall within the scope of the claims of the embodiments of the present application.
Claims (7)
1. A multicast forwarding method based on a programmable data plane, characterized by being applied to a multicast network, the multicast network comprising a controller and a switch, the method comprising:
the exchanger receives a P4 file sent by the controller, wherein the P4 file carries forwarding guide information, and the forwarding guide information comprises message type information, an execution strategy and multicast bit information;
the exchanger compiles the P4 file to obtain the message type information, the execution strategy and the multicast bit information;
the switch obtains multicast port information by initializing the multicast bit information;
the exchanger receives pipeline configuration information obtained by compiling the P4 file by the controller;
the exchanger initializes the pipeline configuration information to establish end-to-end connection of the exchanger and the multicast port corresponding to the multicast port information;
when receiving a target message matched with the message type information, the switch forwards the target message to a multicast port corresponding to the multicast port information based on the execution strategy;
when receiving a target message matched with the message type information, the switch forwards the target message to a multicast port corresponding to the multicast port information based on the execution strategy, and the method comprises the following steps:
the switch analyzes the received first message to obtain message header information corresponding to the first message;
determining a multicast port corresponding to the multicast port information according to the message header information;
matching and reorganizing the message header information according to the multicast port and the message type information to obtain a target message;
forwarding the target message to the multicast port corresponding to the multicast port information based on the execution strategy;
the target message is sent to the controller for message information storage;
setting message storage time in the controller according to the survival time of the detection packet sent by the switch, wherein the survival time of the detection packet is determined according to the number of routers through which the detection packet is allowed to pass before reaching the destination;
and deleting the target message when the storage time of the target message exceeds the set message storage time.
2. The programmable data plane based multicast forwarding method according to claim 1, wherein the switch establishes an end-to-end connection of the switch and the multicast port corresponding to the multicast port information by initializing the pipe configuration information, comprising:
the exchanger obtains pipeline initialization configuration information by initializing the pipeline configuration information;
and the switch sends a detection packet to the corresponding multicast port according to the pipeline initialization configuration information and the multicast port information so as to establish end-to-end connection between the switch and the corresponding multicast port.
3. The programmable data plane based multicast forwarding method according to claim 1, wherein the method further comprises:
and when the switch does not receive the response information returned by the multicast port within the preset time, the switch receives a second message sent by the controller based on the TCP protocol and sends the second message to the multicast port.
4. The programmable data plane based multicast forwarding method according to claim 1, wherein the method further comprises:
and when receiving the multicast member equipment change indication information, the switch changes the multicast port information in the multicast bit information according to the multicast member equipment change indication information.
5. A programmable data plane based multicast forwarding device, comprising:
the file receiving module is used for receiving a P4 file sent by the controller by the exchanger, wherein the P4 file carries forwarding guide information, and the forwarding guide information comprises message type information, an execution strategy and multicast bit information;
the compiling module is used for compiling the P4 file by the switch to obtain the message type information, the execution strategy and the multicast bit information;
an initialization module, configured to initialize the multicast bit information by the switch to obtain multicast port information; the exchanger receives pipeline configuration information obtained by compiling the P4 file by the controller; the exchanger initializes the pipeline configuration information to establish end-to-end connection of the exchanger and the multicast port corresponding to the multicast port information;
the message forwarding module is used for forwarding the target message to a multicast port corresponding to the multicast port information based on the execution strategy when the switch receives the target message matched with the message type information; when receiving a target message matched with the message type information, the switch forwards the target message to a multicast port corresponding to the multicast port information based on the execution strategy, and the method comprises the following steps: the switch analyzes the received first message to obtain message header information corresponding to the first message; determining a multicast port corresponding to the multicast port information according to the message header information; matching and reorganizing the message header information according to the multicast port and the message type information to obtain a target message; forwarding the target message to the multicast port corresponding to the multicast port information based on the execution strategy; the target message is sent to the controller for message information storage; setting message storage time in the controller according to the survival time of the detection packet sent by the switch, wherein the survival time of the detection packet is determined according to the number of routers through which the detection packet is allowed to pass before reaching the destination; and deleting the target message when the storage time of the target message exceeds the set message storage time.
6. A computer device comprising a memory and a processor, wherein the memory stores a program, which when executed by the processor, is configured to perform:
a programmable data plane based multicast forwarding method according to any of claims 1 to 4.
7. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a computer, is adapted to perform:
a programmable data plane based multicast forwarding method according to any of claims 1 to 4.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210035797.3A CN114553799B (en) | 2022-01-10 | 2022-01-10 | Multicast forwarding method, device, equipment and medium based on programmable data plane |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210035797.3A CN114553799B (en) | 2022-01-10 | 2022-01-10 | Multicast forwarding method, device, equipment and medium based on programmable data plane |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN114553799A CN114553799A (en) | 2022-05-27 |
| CN114553799B true CN114553799B (en) | 2023-11-03 |
Family
ID=81671358
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210035797.3A Active CN114553799B (en) | 2022-01-10 | 2022-01-10 | Multicast forwarding method, device, equipment and medium based on programmable data plane |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114553799B (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115086392B (en) * | 2022-06-01 | 2023-07-07 | 珠海高凌信息科技股份有限公司 | Data plane and switch based on heterogeneous chip |
| CN115460039B (en) * | 2022-08-17 | 2023-07-11 | 珠海高凌信息科技股份有限公司 | High-capacity TDM switching system and method based on logic network and storage medium |
| CN118174975A (en) * | 2022-12-08 | 2024-06-11 | 中兴通讯股份有限公司 | Data transmission method, system, electronic device and storage medium |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104113484A (en) * | 2013-04-19 | 2014-10-22 | 中兴通讯股份有限公司 | Message forwarding processing method and device |
| CN104660511A (en) * | 2015-01-16 | 2015-05-27 | 杭州华三通信技术有限公司 | Transmission method and equipment for multicast message in SDN network |
| CN105357130A (en) * | 2015-11-25 | 2016-02-24 | 上海斐讯数据通信技术有限公司 | System for information transmission, and controller for information transmission |
| CN106375223A (en) * | 2016-10-25 | 2017-02-01 | 上海斐讯数据通信技术有限公司 | SDN-based data forwarding system and method |
| WO2018205982A1 (en) * | 2017-05-11 | 2018-11-15 | 中兴通讯股份有限公司 | Method and device for implementing broadcast and multicast in software-defined network and storage medium |
| US10243857B1 (en) * | 2016-09-09 | 2019-03-26 | Marvell Israel (M.I.S.L) Ltd. | Method and apparatus for multipath group updates |
| CN110224942A (en) * | 2018-03-01 | 2019-09-10 | 中兴通讯股份有限公司 | A kind of message processing method, device and storage medium |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8713295B2 (en) * | 2004-07-12 | 2014-04-29 | Oracle International Corporation | Fabric-backplane enterprise servers with pluggable I/O sub-system |
| CN104022960B (en) * | 2013-02-28 | 2017-05-31 | 新华三技术有限公司 | Method and apparatus based on OpenFlow protocol realizations PVLAN |
-
2022
- 2022-01-10 CN CN202210035797.3A patent/CN114553799B/en active Active
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104113484A (en) * | 2013-04-19 | 2014-10-22 | 中兴通讯股份有限公司 | Message forwarding processing method and device |
| CN104660511A (en) * | 2015-01-16 | 2015-05-27 | 杭州华三通信技术有限公司 | Transmission method and equipment for multicast message in SDN network |
| CN105357130A (en) * | 2015-11-25 | 2016-02-24 | 上海斐讯数据通信技术有限公司 | System for information transmission, and controller for information transmission |
| US10243857B1 (en) * | 2016-09-09 | 2019-03-26 | Marvell Israel (M.I.S.L) Ltd. | Method and apparatus for multipath group updates |
| CN106375223A (en) * | 2016-10-25 | 2017-02-01 | 上海斐讯数据通信技术有限公司 | SDN-based data forwarding system and method |
| WO2018205982A1 (en) * | 2017-05-11 | 2018-11-15 | 中兴通讯股份有限公司 | Method and device for implementing broadcast and multicast in software-defined network and storage medium |
| CN110224942A (en) * | 2018-03-01 | 2019-09-10 | 中兴通讯股份有限公司 | A kind of message processing method, device and storage medium |
Non-Patent Citations (2)
| Title |
|---|
| 王沁 ; 袁玲玲 ; 张燕 ; 许娜 ; 李 ; .HFC网络组播技术研究与实现.小型微型计算机系统.2009,(11),全文. * |
| 面向服务定制的未来网络架构;刘韵洁;张娇;黄韬;潘恬;;重庆邮电大学学报(自然科学版)(01);全文 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN114553799A (en) | 2022-05-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN114553799B (en) | Multicast forwarding method, device, equipment and medium based on programmable data plane | |
| CN101286867B (en) | Software updating method and system of network equipment | |
| CN101834783B (en) | Method and device for forwarding messages and network equipment | |
| US20060221861A1 (en) | Multicast routing over unidirectional links | |
| JP6598771B2 (en) | Distributed data transmission in data networks | |
| TWI599201B (en) | Network system and method of establishing data connection | |
| WO2020214469A1 (en) | Efficient message transmission and loop avoidance in an rpl network | |
| CN102638453A (en) | Voice data kernel forwarding method based on Linux system server | |
| CN109729397A (en) | Streaming method, system and server | |
| CN118590470B (en) | Non-invasive multicast forwarding method and system of cloud platform | |
| JP2006074132A (en) | Multicast communication method and gateway device | |
| CN101808043B (en) | Method and device for detecting service message forwarding state of TRUNK members | |
| CN112468363A (en) | Method and device for detecting link connectivity | |
| CN102685009A (en) | Method and device for detecting multicast transmission path | |
| CN102404210A (en) | Method and device for incrementally calculating network message checksum | |
| CN106685600B (en) | A Method of Message Transmission Between Workstations in Local Area Network | |
| CN115348596B (en) | Data transmission method and system for coal mine working face, electronic equipment and storage medium | |
| CN112910997A (en) | Method for acquiring resources of local area network | |
| CN101510901B (en) | Communication method, communication apparatus and system between distributed equipment | |
| CN111416760B (en) | Information synchronization method, terminal and information synchronization system | |
| WO2024032094A1 (en) | Instant messaging system and method | |
| CN103780503A (en) | Load balancing realization method and apparatus | |
| US20110286451A1 (en) | Method, apparatus and computer product for sending or receiving data over multiple networks | |
| CN114915920B (en) | Message transmission method, device, robot and storage medium | |
| CN111953786A (en) | System, method and device for recording messages in whole network, network equipment and storage medium |
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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |