CN114338569B - Message copying and forwarding method and device - Google Patents
Message copying and forwarding method and device Download PDFInfo
- Publication number
- CN114338569B CN114338569B CN202111672433.8A CN202111672433A CN114338569B CN 114338569 B CN114338569 B CN 114338569B CN 202111672433 A CN202111672433 A CN 202111672433A CN 114338569 B CN114338569 B CN 114338569B
- Authority
- CN
- China
- Prior art keywords
- message
- outlet
- interface
- replication
- multicast group
- 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 38
- 230000010076 replication Effects 0.000 claims abstract description 60
- 238000004364 calculation method Methods 0.000 claims abstract description 24
- 230000002776 aggregation Effects 0.000 claims description 18
- 238000004220 aggregation Methods 0.000 claims description 18
- 238000004891 communication Methods 0.000 claims description 18
- 230000006870 function Effects 0.000 claims description 14
- 238000004590 computer program Methods 0.000 claims description 10
- 238000003860 storage Methods 0.000 claims description 6
- 238000010079 rubber tapping Methods 0.000 claims 1
- 238000009826 distribution Methods 0.000 description 17
- 238000010586 diagram Methods 0.000 description 9
- 238000012545 processing Methods 0.000 description 7
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 230000009471 action Effects 0.000 description 3
- 102100033189 Diablo IAP-binding mitochondrial protein Human genes 0.000 description 1
- 101710101225 Diablo IAP-binding mitochondrial protein Proteins 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a message copying and forwarding method and a device, wherein the method comprises the following steps: after receiving a message to be processed through a first interface in each interface connected with the shunting equipment, determining a first multicast group corresponding to the first interface according to a first corresponding relation between an inlet and the multicast group; determining an outlet set corresponding to the first multicast group according to a second corresponding relation between the outlet set and the multicast group; copying a part of the message to be processed for each outlet included in the determined outlet set to obtain a copied message; respectively calculating the selected fields of the copied messages and the set masks of the outlets; and if the first replication message in each replication message is determined to correspond to the first outlet, and the calculation result corresponding to the first replication message is the first outlet, sending the first replication message through the first outlet. The scheme has wide application range and very strong adaptability.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for forwarding a packet in a replication manner.
Background
At present, in the scenes of traffic management, traffic monitoring and the like, the message needs to be copied and then directionally forwarded to a service server for analysis, and the method can be realized based on a message copying and forwarding system.
As shown in fig. 1, the packet replication and forwarding system includes a splitting device, a splitting switch and respective service systems, where each service system may include a plurality of service servers, and each service server may further include a plurality of network cards, after the packet replication and forwarding system is deployed, the network cards connected to the respective interfaces of the splitting switch are already determined, in order to ensure flow balance of the respective interfaces of the splitting switch, after the splitting device receives a packet, some fields of a Source Media Access Control (SMAC)/Destination Media Access Control (DMAC) Address may be encoded in a format to specify a forwarding Destination outlet (the Destination outlet may include information about the Destination service system, the Destination server, the Destination network card, etc.), which requires that the splitting switch can decode correctly to forward the packet, but not all the splitting switches currently support a decoding function.
In the above method for copying and forwarding the message, the shunting switch is required to support the decoding function to forward the message correctly, and the method cannot be used for the shunting switch which does not support the decoding function, so the usage range of the above method for copying and forwarding the message is limited, and the applicability is poor.
Disclosure of Invention
The embodiment of the invention provides a message copying and forwarding method and device, which are used for solving the problems of limited application range and poor applicability in the prior art.
According to an embodiment of the present invention, a method for forwarding a packet by replication is provided, which is applied to a shunting switch included in a packet forwarding system, where the packet forwarding system further includes a shunting device connected to the shunting switch and each service system, and the method includes:
After receiving a message to be processed through a first interface in each interface connected with the shunting equipment, determining a first multicast group corresponding to the first interface according to a first corresponding relation between an inlet and the multicast group;
determining an outlet set corresponding to the first multicast group according to a second corresponding relation between the outlet set and the multicast group;
Copying a part of the message to be processed for each outlet included in the determined outlet set to obtain a copied message;
calculating the selected field of each copy message and the set mask of each outlet, wherein the selected field carries the outlet designated by the shunt equipment according to a preset coding format, and the set mask of each outlet is set according to the preset coding format;
and if the first replication message in each replication message is determined to correspond to the first outlet, and the calculation result corresponding to the first replication message is the first outlet, sending the first replication message through the first outlet.
Optionally, after receiving the message to be processed through a first interface in each interface connected with the splitting device, the method further includes:
And adding a first interface identifier of the first interface to the message to be processed.
Optionally, the method further comprises:
if it is determined that a second replication message in each replication message corresponds to a second outlet and a calculation result corresponding to the second replication message is not the second outlet, determining whether the second replication message carries the first interface identifier;
and if the second copy message is determined to carry the first interface identifier, discarding the second copy message.
Optionally, the method further comprises:
determining whether each outlet in the outlet set corresponding to each multicast group in the second corresponding relation is a member port of an aggregation port;
And closing the load balancing function of the aggregation port to which the outlet belongs.
According to an embodiment of the present invention, there is further provided a packet duplication forwarding device, which is applied to a shunting switch included in a packet duplication forwarding system, where the packet duplication forwarding system further includes a shunting device connected to the shunting switch and each service system, and the device includes:
The first determining module is used for determining a first multicast group corresponding to a first interface according to a first corresponding relation between an inlet and the multicast group after receiving a message to be processed through the first interface in each interface connected with the shunt equipment;
A second determining module, configured to determine an outlet set corresponding to the first multicast group according to a second correspondence between the outlet set and the multicast group;
The copying module is used for copying one copy of the message to be processed for each outlet included in the determined outlet set to obtain a copied message;
The computing module is used for respectively computing selected fields of the copying messages and setting masks of the outlets, wherein the selected fields carry the outlets designated by the shunting equipment according to a preset coding format, and the setting masks of the outlets are set according to the preset coding format;
And the sending module is used for sending the first replication message through the first outlet if the first replication message in each replication message corresponds to the first outlet and the calculation result corresponding to the first replication message is the first outlet.
Optionally, the method further comprises:
The adding module is used for adding the first interface identifier of the first interface to the message to be processed after the first determining module receives the message to be processed through the first interface in the interfaces connected with the shunting equipment.
Optionally, the device further comprises a discarding module for:
if it is determined that a second replication message in each replication message corresponds to a second outlet and a calculation result corresponding to the second replication message is not the second outlet, determining whether the second replication message carries the first interface identifier;
and if the second copy message is determined to carry the first interface identifier, discarding the second copy message.
Optionally, the device further comprises a closing module for:
determining whether each outlet in the outlet set corresponding to each multicast group in the second corresponding relation is a member port of an aggregation port;
And closing the load balancing function of the aggregation port to which the outlet belongs.
According to an embodiment of the present invention, there is further provided an electronic device including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
And the processor is used for realizing the steps of the method when executing the program stored in the memory.
According to an embodiment of the present invention, there is also provided a computer-readable storage medium having stored therein a computer program which, when executed by a processor, implements the above-mentioned method steps.
The invention has the following beneficial effects:
The embodiment of the invention provides a message copying and forwarding method and device, wherein after a message to be processed is received through a first interface in each interface connected with a shunting device, a first multicast group corresponding to the first interface is determined according to a first corresponding relation between an inlet and the multicast group; determining an outlet set corresponding to the first multicast group according to a second corresponding relation between the outlet set and the multicast group; copying a part of the message to be processed for each outlet included in the determined outlet set to obtain a copied message; calculating the selected field of each copy message and the set mask of each outlet, wherein the selected field carries the outlet designated by the shunt equipment according to a preset coding format, and the set mask of each outlet is set according to the preset coding format; and if the first replication message in each replication message is determined to correspond to the first outlet, and the calculation result corresponding to the first replication message is the first outlet, sending the first replication message through the first outlet. In the scheme, since the distribution device designates the outlets according to the preset coding format and carries the designated outlets in the selected fields of the message, the distribution switch can configure the set mask in advance according to the preset coding format, decoding is not required to be supported, the received message is only required to be copied and then sent to each possible outlet, then calculation is performed based on the selected fields of the copied message and the set mask of each possible outlet, if the first copied message corresponds to the first outlet, and the calculation result corresponding to the first copied message is also the first outlet, that is, the outlet designated by the first copied message is the first outlet, the corresponding copied message can be sent based on the first outlet, and the distribution switch does not need to support decoding.
Drawings
FIG. 1 is a block diagram of a prior art packet forwarding system;
FIG. 2 is a flow chart of a message duplication forwarding method in an embodiment of the present invention;
Fig. 3 is a schematic structural diagram of a message copying and forwarding device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to the present application.
Detailed Description
Aiming at the problem of limited application range in the prior art, the embodiment of the invention provides a message copying and forwarding method, which is applied to a shunting switch included in a message copying and forwarding system shown in fig. 1, wherein the message copying and forwarding system shown in fig. 1 also comprises shunting equipment and each service system connected with the shunting switch, and the flow of the method is shown in fig. 2, and the implementation steps are as follows:
S21: after receiving the message to be processed through a first interface in each interface connected with the distribution equipment, determining a first multicast group corresponding to the first interface according to a first corresponding relation between the inlet and the multicast group.
The shunting switch may be connected to the shunting device through a plurality of interfaces, wherein any one of the interfaces receiving the message may be defined as a first interface, and the received message may be defined as a message to be processed.
The corresponding relation between the entry and the multicast group may be preset, the corresponding relation may be defined as a first corresponding relation, and after receiving the message to be processed, the multicast group corresponding to the first interface may be searched according to the first corresponding relation, and the multicast group may be defined as a first multicast group, and may specifically be a two-layer multicast group.
The first correspondence may be implemented, but is not limited to, using an access control list (Access Control List, ACL), specifically, the matching fields of the respective entries may be set as interfaces, and the action fields may be set to be redirected to the multicast group. The maximum consumption capacity of the first correspondence is the number of interfaces to which the bypass switch is connected to the bypass device, and since the number of interfaces to which the bypass switch is connected to the bypass device is limited, the number of entries of the consumed hardware ACL is very small. It should be noted that, the entries or the multicast groups in the first correspondence may be added or deleted according to actual needs.
S22: and determining an outlet set corresponding to the first multicast group according to the second corresponding relation between the outlet set and the multicast group.
In general, a multicast group may include a plurality of outlets, where the outlets form an outlet set, if there are a plurality of multicast groups, a correspondence between the outlet set and the multicast group may be preset, the correspondence may be defined as a second correspondence, and after determining a first multicast group corresponding to a first interface, the outlet set corresponding to the first multicast group may be searched according to the second correspondence.
S23: and copying a message to be processed for each outlet included in the determined outlet set to obtain a copied message.
This allows the message to be processed to be duplicated in multiple copies.
S24: and respectively calculating the selected fields of the copied messages and the set masks of the outlets.
The selected field carries the outlets designated by the splitting device according to the preset coding format, and the setting mask of each outlet is set according to the preset coding format.
The selected field may be, but is not limited to, a Source MEDIA ACCESS Control Address (SMAC)/Destination Media Access Control (DMAC) set to a message, the SMAC/DMAC may be carried with a specified egress in a preset encoding format, the egress may be, but is not limited to, a service system number, a server number, a network card number, and the like, and a plurality of egress may be specified in a field of the SMAC/DMAC.
The preset coding format is defined by the splitting device, each service system occupies a plurality of bits of the SMAC/DMAC, and the bits are divided and occupied by the server number and the network card number.
Each outlet of the shunt switch can bind a set of information, namely a service system number, a server number and a network card number, and is used for uniquely identifying which service system, which server and which network card are connected with the outlet.
The location, length, server number and network card number occupied length of the service system at the SMAC/DMAC may be specified specifically by a user configuration command, an example of which is as follows:
service service-id[src-mac|dst-mac]offset offset-value server-id-len server-id-size core-id-len core-id-size
Wherein, service-id service system number;
offset-value at the start offset of SMAC/DMAC, network order 0-47;
The length of the Server-id-size Server number, unit bit;
the length of Core-id-size network card number, unit bit.
The service system number, server number and network card number and preset encoding format of each outlet binding on an exemplary distribution switch are shown in the following table:
S25: if the first replication message in each replication message is determined to correspond to the first outlet, and the calculation result corresponding to the first replication message is the first outlet, the first replication message is sent through the first outlet.
Identification of the first duplicate message may be achieved through an ACL, where a matching field of an entry may be set to a selected field, a mask and an exit, and an action field may be set to send a message through the exit, and may be specifically configured to:
permit smac&service-smac-mask=port-n.service-smac
Or alternatively
permit dmac&service-dmac-mask=port-n.service-dmac
service-smac-mask/service-dmac-mask。
The service-smac-mask/service-dmac-mask is set as a mask according to a preset coding format, and the priority of the admit table entry in the ACL is highest, that is, the match with the message is first required. The number of limit entries is the number of bypass switch outlets, and therefore the resources of the ACL occupied are also very limited.
In the scheme, since the distribution device designates the outlets according to the preset coding format and carries the designated outlets in the selected fields of the message, the distribution switch can configure the set mask in advance according to the preset coding format, decoding is not required to be supported, the received message is only required to be copied and then sent to each possible outlet, then calculation is performed based on the selected fields of the copied message and the set mask of each possible outlet, if the first copied message corresponds to the first outlet, and the calculation result corresponding to the first copied message is also the first outlet, that is, the outlet designated by the first copied message is the first outlet, the corresponding copied message can be sent based on the first outlet, and the distribution switch does not need to support decoding.
Optionally, after receiving the message to be processed through a first interface in the interfaces connected to the splitting device, the method further includes:
and adding the first interface identification of the first interface into the message to be processed.
Correspondingly, the method further comprises the steps of:
If the second replication message in each replication message is determined to correspond to the second outlet, and the calculation result corresponding to the second replication message is not the second outlet, determining whether the second replication message carries the first interface identifier;
and if the second copying message carries the first interface identifier, discarding the second copying message.
The identification of the second duplicate packet may be implemented by ACL, where the matching field of the table entry may be set to the first interface identifier, the action field may be set to the drop packet (drop), these table entries may be referred to as drop table entries, and it should be noted that the drop table entries have a lower priority than all the limit table entries, because only the duplicate packets of the limit table entries in the matching are packets that need to be forwarded, and no match is made to the limit table entries and the identifier carrying the first interface is to be discarded, so that the discarding of the redundant duplicate packets may be implemented based on the drop table entries.
Optionally, the method further comprises:
determining whether each outlet in the outlet set corresponding to each multicast group in the second corresponding relation is a member port of the aggregation port;
And closing the load balancing function of the aggregation port to which the outlet belongs.
If the outlet is a member interface of the aggregation port, load balancing based on the aggregation port is performed according to the characteristics of the aggregation port, and since the splitting device has designated the outlet, load balancing on the splitting switch is realized through the designated outlet, and load balancing based on the aggregation port is not needed, at this time, it is needed to determine whether each outlet in the outlet set corresponding to each multicast group in the second corresponding relationship is a member port of the aggregation port; the load balancing function of closing the aggregation port to which the outlet belongs can be realized by the following table:
It should be noted that, in the above method, the splitter switch may include one service board card, or may include a plurality of service boards, that is, the inlet and the outlet may be disposed on the same service board card, or may be disposed on different service boards, and if disposed on different service boards, the message needs to be forwarded through the switch board card.
Based on the same inventive concept, an embodiment of the present invention provides a packet duplication forwarding device, which is applied to a shunting switch included in a packet duplication forwarding system, where the packet duplication forwarding system further includes a shunting device connected to the shunting switch and each service system, and the structure of the device is shown in fig. 3, and includes:
The first determining module 31 is configured to determine, after receiving a message to be processed through a first interface in each interface connected to the splitting device, a first multicast group corresponding to the first interface according to a first correspondence between an entry and the multicast group;
A second determining module 32, configured to determine an outlet set corresponding to the first multicast group according to a second correspondence between the outlet set and the multicast group;
A copying module 33, configured to copy a message to be processed for each of the outlets included in the determined outlet set, to obtain a copy message;
The calculating module 34 is configured to calculate a selected field of each duplicate packet and a set mask of each exit, where the selected field carries an exit specified by the splitting device according to a preset encoding format, and the set mask of each exit is set according to the preset encoding format;
The sending module 35 is configured to send the first replication message through the first outlet if it is determined that the first replication message in each replication message corresponds to the first outlet and the calculation result corresponding to the first replication message is the first outlet.
In the scheme, since the distribution device designates the outlets according to the preset coding format and carries the designated outlets in the selected fields of the message, the distribution switch can configure the set mask in advance according to the preset coding format, decoding is not required to be supported, the received message is only required to be copied and then sent to each possible outlet, then calculation is performed based on the selected fields of the copied message and the set mask of each possible outlet, if the first copied message corresponds to the first outlet, and the calculation result corresponding to the first copied message is also the first outlet, that is, the outlet designated by the first copied message is the first outlet, the corresponding copied message can be sent based on the first outlet, and the distribution switch does not need to support decoding.
Optionally, the method further comprises:
the adding module is used for adding the first interface identification of the first interface to the message to be processed after the first determining module receives the message to be processed through the first interface in the interfaces connected with the shunting equipment.
Optionally, the device further comprises a discarding module for:
If the second replication message in each replication message is determined to correspond to the second outlet, and the calculation result corresponding to the second replication message is not the second outlet, determining whether the second replication message carries the first interface identifier;
and if the second copying message carries the first interface identifier, discarding the second copying message.
Optionally, the device further comprises a closing module for:
determining whether each outlet in the outlet set corresponding to each multicast group in the second corresponding relation is a member port of the aggregation port;
And closing the load balancing function of the aggregation port to which the outlet belongs.
The embodiment of the present application further provides an electronic device, please refer to fig. 4, which includes a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 complete communication with each other through the communication bus 440.
A memory 430 for storing a computer program;
The processor 410 is configured to implement the message duplication forwarding method according to any one of the above embodiments when executing the program stored in the memory 430.
The communication interface 420 is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but may also be a digital signal processor (DIGITAL SIGNAL Processing, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
In the scheme, since the distribution device designates the outlets according to the preset coding format and carries the designated outlets in the selected fields of the message, the distribution switch can configure the set mask in advance according to the preset coding format, decoding is not required to be supported, the received message is only required to be copied and then sent to each possible outlet, then calculation is performed based on the selected fields of the copied message and the set mask of each possible outlet, if the first copied message corresponds to the first outlet, and the calculation result corresponding to the first copied message is also the first outlet, that is, the outlet designated by the first copied message is the first outlet, the corresponding copied message can be sent based on the first outlet, and the distribution switch does not need to support decoding.
Correspondingly, the embodiment of the application also provides a computer readable storage medium, wherein instructions are stored in the computer readable storage medium, and when the computer readable storage medium runs on a computer, the computer is caused to execute the message copying and forwarding method in any one of the above embodiments.
In the scheme, since the distribution device designates the outlets according to the preset coding format and carries the designated outlets in the selected fields of the message, the distribution switch can configure the set mask in advance according to the preset coding format, decoding is not required to be supported, the received message is only required to be copied and then sent to each possible outlet, then calculation is performed based on the selected fields of the copied message and the set mask of each possible outlet, if the first copied message corresponds to the first outlet, and the calculation result corresponding to the first copied message is also the first outlet, that is, the outlet designated by the first copied message is the first outlet, the corresponding copied message can be sent based on the first outlet, and the distribution switch does not need to support decoding.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While alternative embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following appended claims be interpreted as including alternative embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the embodiments of the present invention without departing from the spirit or scope of the embodiments of the invention. Thus, if such modifications and variations of the embodiments of the present invention fall within the scope of the claims and the equivalents thereof, the present invention is also intended to include such modifications and variations.
Claims (10)
1. The message copying and forwarding method is applied to a shunting switch included in a message copying and forwarding system, and the message copying and forwarding system further includes shunting equipment connected with the shunting switch and each service system, and is characterized in that the method includes:
After receiving a message to be processed through a first interface in each interface connected with the shunting equipment, determining a first multicast group corresponding to the first interface according to a first corresponding relation between an inlet and the multicast group;
determining an outlet set corresponding to the first multicast group according to a second corresponding relation between the outlet set and the multicast group;
Copying a part of the message to be processed for each outlet included in the determined outlet set to obtain a copied message;
calculating the selected field of each copy message and the set mask of each outlet, wherein the selected field carries the outlet designated by the shunt equipment according to a preset coding format, and the set mask of each outlet is set according to the preset coding format;
and if the first replication message in each replication message is determined to correspond to the first outlet, and the calculation result corresponding to the first replication message is the first outlet, sending the first replication message through the first outlet.
2. The method of claim 1, further comprising, after receiving the message to be processed through a first interface of the interfaces connected to the tapping device:
And adding a first interface identifier of the first interface to the message to be processed.
3. The method as recited in claim 2, further comprising:
if it is determined that a second replication message in each replication message corresponds to a second outlet and a calculation result corresponding to the second replication message is not the second outlet, determining whether the second replication message carries the first interface identifier;
and if the second copy message is determined to carry the first interface identifier, discarding the second copy message.
4. A method according to any one of claims 1-3, further comprising:
determining whether each outlet in the outlet set corresponding to each multicast group in the second corresponding relation is a member port of an aggregation port;
And closing the load balancing function of the aggregation port to which the outlet belongs.
5. The message copying and forwarding device is applied to a shunting switch included in a message copying and forwarding system, and the message copying and forwarding system further comprises shunting equipment and each service system connected with the shunting switch, and is characterized in that the device comprises:
The first determining module is used for determining a first multicast group corresponding to a first interface according to a first corresponding relation between an inlet and the multicast group after receiving a message to be processed through the first interface in each interface connected with the shunt equipment;
A second determining module, configured to determine an outlet set corresponding to the first multicast group according to a second correspondence between the outlet set and the multicast group;
The copying module is used for copying one copy of the message to be processed for each outlet included in the determined outlet set to obtain a copied message;
The computing module is used for respectively computing selected fields of the copying messages and setting masks of the outlets, wherein the selected fields carry the outlets designated by the shunting equipment according to a preset coding format, and the setting masks of the outlets are set according to the preset coding format;
And the sending module is used for sending the first replication message through the first outlet if the first replication message in each replication message corresponds to the first outlet and the calculation result corresponding to the first replication message is the first outlet.
6. The apparatus as recited in claim 5, further comprising:
The adding module is used for adding the first interface identifier of the first interface to the message to be processed after the first determining module receives the message to be processed through the first interface in the interfaces connected with the shunting equipment.
7. The apparatus of claim 6, further comprising a discard module to:
if it is determined that a second replication message in each replication message corresponds to a second outlet and a calculation result corresponding to the second replication message is not the second outlet, determining whether the second replication message carries the first interface identifier;
and if the second copy message is determined to carry the first interface identifier, discarding the second copy message.
8. The apparatus of any of claims 5-7, further comprising a shutdown module to:
determining whether each outlet in the outlet set corresponding to each multicast group in the second corresponding relation is a member port of an aggregation port;
And closing the load balancing function of the aggregation port to which the outlet belongs.
9. An electronic device, characterized in that the electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are in communication with each other through the communication bus;
a memory for storing a computer program;
A processor for implementing the method steps of any of claims 1-4 when executing a program stored on a memory.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111672433.8A CN114338569B (en) | 2021-12-31 | 2021-12-31 | Message copying and forwarding method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111672433.8A CN114338569B (en) | 2021-12-31 | 2021-12-31 | Message copying and forwarding method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114338569A CN114338569A (en) | 2022-04-12 |
CN114338569B true CN114338569B (en) | 2024-06-14 |
Family
ID=81020299
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111672433.8A Active CN114338569B (en) | 2021-12-31 | 2021-12-31 | Message copying and forwarding method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114338569B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115037565B (en) * | 2022-06-02 | 2023-12-12 | 北京东土军悦科技有限公司 | Multicast data forwarding method, device, network equipment, storage medium and system |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102347890A (en) * | 2010-08-04 | 2012-02-08 | 杭州华三通信技术有限公司 | Processing method and device of multicast message |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6553030B2 (en) * | 2000-12-28 | 2003-04-22 | Maple Optical Systems Inc. | Technique for forwarding multi-cast data packets |
CN101534203B (en) * | 2008-03-13 | 2012-11-07 | 华为技术有限公司 | Method, equipment and system for multicast control |
CN106656524A (en) * | 2015-10-30 | 2017-05-10 | 中兴通讯股份有限公司 | Transmission method, apparatus and system of BIER control information |
CN108234455B (en) * | 2017-12-14 | 2021-03-19 | 北京东土科技股份有限公司 | Message forwarding control method and device, computer device and storage medium |
CN108683615B (en) * | 2018-04-28 | 2022-03-11 | 新华三技术有限公司 | Message distribution method and device and distribution switch |
CN108809836B (en) * | 2018-05-31 | 2020-02-18 | 新华三技术有限公司 | Multicast data message forwarding method and device |
CN113014486B (en) * | 2019-12-20 | 2023-08-01 | 中兴通讯股份有限公司 | BIER message forwarding method, device, equipment and storage medium |
CN113285918B (en) * | 2021-04-08 | 2023-10-24 | 锐捷网络股份有限公司 | ACL filtering table item establishing method and device for network attack |
-
2021
- 2021-12-31 CN CN202111672433.8A patent/CN114338569B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102347890A (en) * | 2010-08-04 | 2012-02-08 | 杭州华三通信技术有限公司 | Processing method and device of multicast message |
Non-Patent Citations (1)
Title |
---|
基于网络处理器的高性能路由器转发面的设计与实现;王鹏;中国优秀硕士学位论文全文数据库 (信息科技辑);20120415;I139-101 * |
Also Published As
Publication number | Publication date |
---|---|
CN114338569A (en) | 2022-04-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108809836B (en) | Multicast data message forwarding method and device | |
CN108111432B (en) | Message forwarding method and device | |
CN108768866B (en) | Cross-card forwarding method and device for multicast message, network equipment and readable storage medium | |
CN106254281B (en) | A kind of message processing method and device based on 802.1BR | |
CN101304389B (en) | Method, apparatus and system for processing packet | |
US10652145B2 (en) | Managing data frames in switched networks | |
CN107947950B (en) | Hardware multicast output interface table item issuing method and NP (network processor) line card board | |
CN114338569B (en) | Message copying and forwarding method and device | |
CN111010343B (en) | Method, device, network equipment and storage medium for forwarding multicast message | |
US10880109B2 (en) | Forwarding multicast data packet | |
CN111654437B (en) | Message forwarding method and device based on data center | |
CN112702221B (en) | BGP abnormal route monitoring method and device | |
CN112929197A (en) | Network communication method, device, equipment and storage medium | |
CN110336759B (en) | RDMA (remote direct memory Access) -based protocol message forwarding method and device | |
CN113904787B (en) | Flow auditing method, device, equipment and computer readable storage medium | |
CN112737982A (en) | Method for forwarding message and CLOS (clock-line-operating System) framework switch | |
CN108900422A (en) | Multicast forward method, device and electronic equipment | |
CN106559439B (en) | A kind of method for processing business and equipment | |
US10484304B2 (en) | Determining actions to be immediately performed on a network packet with an application specific integrated circuit | |
CN110808909A (en) | Message processing method and device across virtual systems | |
CN114866456B (en) | Message sending method and device | |
CN112769693B (en) | Method and device for maintaining multicast group | |
CN109379300B (en) | Data balanced distribution method and device, distribution equipment and storage medium | |
Zhu et al. | OpenStack Oriented Networking-VPP Network Optimization Method | |
CN113452619A (en) | ACL-based traffic flow shunting method and device |
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 |