Multicast message processing method and switching equipment
By using the method of matching multicast fields and forwarding entries in multicast packets, the multicast problem caused by folded multicast entries in the switching network is solved, and multicast packets are accurately sent, ensuring that packets are not copied too much. to reach the destination chip.
Patent Information
- Application Number
- CN202410832640.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-06-25
AI Technical Summary
In the switching network, multicast packets are multi-duplicated due to the folding of multicast entries, which cannot be effectively solved by existing technologies.
By introducing multicast fields into multicast messages, including the first field, the second field and the third field, using bitmaps to represent the destination board and destination chip, and matching forwarding entries to ensure that multicast messages are accurately sent to The destination board and destination chip to avoid multiple copies.
It effectively solves the multiple copy problem caused by multicast table entries being folded, ensuring that multicast packets can reach the destination chip correctly and without multiple copies.
Smart Images

Figure CN118631769A
Abstract
Description
Technical Field
[0001] The present specification relates to the field of communication technology, and in particular to a method for processing a multicast message and a switching device. Background Art
[0002] LC: Line card, message processing board.
[0003] SFC: network board, message switching board.
[0004] When multicast is currently performed on a switching network, it is usually performed on-demand based on the multicast ID. Because the switching network chip is not a forwarding chip, the multicast table entries are usually very small, resulting in the folding of multicast messages on the switching network. For example, the switching network multicast table entry specification is 2K, so the messages with multicast IDs 1 and 2K+1 will check the same multicast table entry 1. If the destinations of 1 and 2K+1 are different, only the union can be taken, that is, the destination ports corresponding to the multicast IDs 1 and 2K+1 are added to the multicast table entry 1. Summary of the invention
[0005] In order to overcome the problems existing in the related art, this specification provides a method for processing a multicast message and a switching device.
[0006] According to a first aspect of an embodiment of this specification, a method for processing a multicast message is provided, the method comprising:
[0007] The network board receives and identifies the multicast message;
[0008] Acquire a multicast field from the multicast message, and determine a destination board and / or a destination chip on the destination board corresponding to the multicast message according to the multicast field;
[0009] The multicast message is sent to a destination board and / or a destination chip on the destination board.
[0010] The network board receives and identifies the multicast message, including:
[0011] The network board receives the message from the line card board, and analyzes whether the message carries a multicast field. If so, it determines that the message is a multicast message.
[0012] The multicast field includes: a first field, a second field and a third field;
[0013] The first field is used to indicate the multicast type;
[0014] The second field is used to indicate the length of the bitmap;
[0015] The third field is used to represent a bit map, and the bit map is used to represent a destination board and / or a destination chip on the destination board of the multicast message.
[0016] The step of determining the destination board and / or the destination chip on the destination board corresponding to the multicast message according to the multicast field includes:
[0017] The third field is converted into binary according to the length of the bitmap represented by the second field, and then the non-zero bytes in the binary are converted into a hexadecimal result;
[0018] Determine the destination board and / or the destination chip on the destination board corresponding to the multicast message according to the result and the forwarding table entry;
[0019] The forwarding table entry includes a correspondence between a hexadecimal value and an outbound interface.
[0020] The sending of the multicast message to a destination board and / or a destination chip on the destination board includes:
[0021] Using the result to match the forwarding table entry, obtaining a matching outbound interface;
[0022] The multicast message is sent to the destination board and / or the destination chip on the destination board through the matched outbound interface.
[0023] It can be seen from the above embodiments that the network board can determine the destination board of the multicast message and / or the destination chip on the destination board by identifying the multicast field in the multicast message, so that the multicast message can be sent to the destination board and / or the destination chip on the destination board, thereby solving the problem of multiple copies of multicast messages in the switching network because the multicast table entries are folded.
[0024] According to a second aspect of an embodiment of this specification, a switching device is provided, the switching device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following method when executing the program:
[0025] The network board in the switching device receives and identifies the multicast message;
[0026] Acquire a multicast field from the multicast message, and determine a destination board and / or a destination chip on the destination board corresponding to the multicast message according to the multicast field;
[0027] The multicast message is sent to a destination board and / or a destination chip on the destination board.
[0028] According to a third aspect of an embodiment of this specification, a switching device is provided, the switching device comprising:
[0029] A receiving module, used for receiving and identifying multicast messages;
[0030] A processing module, used for obtaining a multicast field from a multicast message, and determining a destination board and / or a destination chip on the destination board corresponding to the multicast message according to the multicast field;
[0031] The sending module is used to send the multicast message to the destination board and / or the destination chip on the destination board.
[0032] The receiving module is used to receive a message from the line card board and analyze whether the message carries a multicast field. If so, it determines that the message is a multicast message.
[0033] The multicast field includes: a first field, a second field and a third field;
[0034] The first field is used to indicate the multicast type;
[0035] The second field is used to indicate the length of the bitmap;
[0036] The third field is used to represent a bit map, and the bit map is used to represent a destination board and / or a destination chip on the destination board of the multicast message.
[0037] The processing module is used to convert the third field into binary according to the length of the bitmap represented by the second field, and then convert the non-zero bytes in the binary into a hexadecimal result;
[0038] Determine the destination board and / or the destination chip on the destination board corresponding to the multicast message according to the result and the forwarding table entry;
[0039] The forwarding table entry includes a correspondence between a hexadecimal value and an outbound interface.
[0040] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the specification and, together with the description, serve to explain the principles of the specification.
[0042] Figure 1 This is a flowchart of a method for processing a multicast message according to an exemplary embodiment of this specification.
[0043] Figure 2 It is a schematic diagram of a network architecture shown in this specification according to an exemplary embodiment. DETAILED DESCRIPTION
[0044] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this specification. Instead, they are merely examples of devices and methods consistent with some aspects of this specification as detailed in the appended claims.
[0045] The terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit this specification. The singular forms "a", "the" and "the" used in this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0046] It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0047] In order to solve the problem that the multicast message on the current switching network is multicast-copied on the switching network based on the multicast ID on the switching header, and the multicast table entry is folded and the message is multi-copied due to the limitation of the multicast specification of the switching network chip, the present disclosure provides a method for processing multicast messages, such as Figure 1 As shown, the method includes:
[0048] The S101 network board receives and identifies the multicast message;
[0049] S102 obtains a multicast field from the multicast message, and determines a destination board and / or a destination chip on the destination board corresponding to the multicast message according to the multicast field;
[0050] S103 sends the multicast message to the destination board and / or the destination chip on the destination board.
[0051] In this embodiment, the above method can be applied to a switching device in a switching network.
[0052] In step S101, a network board SFC (message switching board) receives a forwarding message from a line card LC (message processing board).
[0053] In this example, after receiving the forwarding message from the line card board, the network board can obtain information in the forwarding message header to determine whether there is a multicast field. If so, it can be determined that the forwarding message is a multicast message.
[0054] In this example, when the line card board sends a multicast message to the network board, it can add a multicast field in the forwarding header. The multicast field carries information indicating the destination board and / or the destination chip on the destination board to which the multicast message is to be sent, so as to instruct the network board to send the multicast message to the destination board and / or the destination chip on the destination board in a targeted manner according to the multicast field, thereby avoiding the problem of multicast table entries being folded and multiple copies of messages.
[0055] In this embodiment, the multicast field may include: the multicast field includes: a first field, a second field and a third field:
[0056] The first field is used to indicate the multicast type;
[0057] The second field is used to indicate the length of the bitmap;
[0058] The third field is used to represent a bitmap, and the bitmap is used to represent the destination board and / or the destination chip on the destination board of the multicast message.
[0059] In this embodiment, the first field can occupy 1B and be represented by 0 or 1. For example, when it is 0, it indicates that the message is a multicast message, but the technical solution in this application is not used (that is, it is processed in the current way). When it is 1, it indicates that the message is a multicast message and is processed using the technical solution in the application. It should be noted that other identifiers can be used as substitutes in other embodiments, and this application does not limit it.
[0060] The second field can occupy 1B.
[0061] The third field occupies corresponding bits according to the value of the second field.
[0062] In an example, the first field, the second field, and the third field may be implemented in a TLV format, as shown in the following example:
[0063] T: multicast type:
[0064] 0: Indicates the use of the old multicast mode;
[0065] 1: Indicates that the new multicast mode is used.
[0066] L: indicates the length of the bitmap field added later.
[0067] V (occupied based on L value): indicates the corresponding destination device Bitmap value.
[0068] In this embodiment, when the network board receives the multicast message sent by the line card board, it identifies the T field in the TLV field, and if it is 1, executes step S102.
[0069] When executing step S102, the third field is converted into binary according to the length of the bitmap represented by the second field, and then the non-zero bytes in the binary are converted into hexadecimal.
[0070] In this embodiment, a forwarding table entry is configured in the network board, and the forwarding table entry includes: a correspondence between BID+BITMAP, a Key value (hexadecimal) and an outbound interface, as shown in Table 1:
[0071] Table number BID+BITMAP Key Outbound interface 0 BID0+0b0000 0x00 Invalid value (0xFFFF) 1 BID0+0b0001 0x01 P3 2 BID0+0b0010 0x02 P3 3 BID0+0b0011 0x03 P3 4 BID1+0b0000 0x10 Invalid value (0xFFFF) 5 BID1+0b0001 0x11 Trunk1 composed of P0 and P1 6 BID1+0b0010 0x12 Trunk1 composed of P0 and P1 7 BID1+0b0011 0x13 Trunk1 composed of P0 and P1 8 BID2+0b0000 0x20 Invalid value (0xFFFF) 9 BID2+0b0001 0x21 P2 10 BID2+0b0010 0x22 P2 11 BID2+0b0011 0x23 P2
[0072] Table 1
[0073] The Key is the result of converting the third field into binary and then converting the non-zero bytes in the binary into hexadecimal.
[0074] After obtaining the structure, the corresponding output interface can be obtained by matching Table 1, thereby solving the problem of multicast replication of multicast messages on the switching network based on the multicast ID on the switching header. Due to the limitations of the multicast specifications of the switching network chip, the multicast table entries are folded and the messages are replicated multiple times.
[0075] To explain the present application in detail, the embodiments of the present disclosure are described with reference to the following examples.
[0076] like Figure 2 As shown, it is assumed that the multicast field is 0x01 0x01 0x34, where
[0077] T is 0x01
[0078] L is 0x01
[0079] V is 0x34
[0080] The binary value of hexadecimal 0x34 is 0b 00 11 01 00. Take the first two digits 00, which are 0 and do not need to be copied. Then take the last two digits 11, which are not 0. The result of conversion to hexadecimal is 0x13, where 1 represents BID1 and 3 represents chip0 and chip1. Corresponding to the two digits 11 taken out, by querying Table 1, it can be known that the output port is trunk1 composed of P0 and P1. After knowing the above information, the corresponding number of messages can be copied and sent.
[0081] Then take the last two digits 01, not 0, and use the key 0x21, where 2 represents BID2 and 1 represents chip0. Corresponding to the two digits 01 taken out, query Table 1 to obtain P2, and send the copied message from P2.
[0082] Then take the lowest two digits 00, which are 0 and do not need to be copied.
[0083] This can solve the problem that the multicast message on the current switching network is multicast-copied on the switching network based on the multicast ID on the switching header, and the multicast table entries are folded and the messages are duplicated due to the limitation of the multicast specification of the switching network chip.
[0084] For example, Figure 2 As shown in the figure, the multicast message from LC0 only needs to be copied to chip0 of LC1. The content of the multicast field is 0x01 0x01 0x10.
[0085] On SFC0: use 0x10
[0086] Hexadecimal 0x10 is 0b 00 01 00 00 in binary
[0087] Take the first two digits 00, which are 0 and do not need to be copied.
[0088] Then take the last two digits 01, not 0, and use the key 0x11 to check the table generated above to obtain the copy to trunk1. Subsequently, based on the hash value in the switching network header, select P0 or P1 as the egress port and send the copied message out.
[0089] Then take the last two digits 00, which are 0 and do not need to be copied.
[0090] Then take the last two digits 00, which are 0 and do not need to be copied.
[0091] After the message reaches the fabric chip of LC1, there are corresponding entries on the fabric, as shown in Table 2:
[0092]
[0093]
[0094] Table 2
[0095] For 00 01 00 00 in the message, a corresponding copy of query table 2 is also made.
[0096] Take the bit of the corresponding slot, LC1 corresponds to 01, not 0, and send the copied message from P0 through the key 0x11.
[0097] Through the above method, the multicast message can reach the destination chip correctly and without excessive duplication.
[0098] In this embodiment, when the line card sends a multicast message, after checking the multicast table and before sending it to the switching network, it is necessary to add a bitmap (bitmap) of the destination chip of the destination board to which this multicast ID needs to be copied. This bitmap can be added to the result area of the multicast table or a separate table 3 can be added. The key is the multicast ID, and the result is the bitmap of the destination chip of the destination board to which this multicast ID needs to be copied.
[0099]
[0100] Table 3
[0101] Based on the above embodiments, an embodiment of the present disclosure further provides a switching device, the switching device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following method when executing the program:
[0102] The network board in the switching device receives and identifies the multicast message;
[0103] Acquire a multicast field from the multicast message, and determine a destination board and / or a destination chip on the destination board corresponding to the multicast message according to the multicast field;
[0104] The multicast message is sent to a destination board and / or a destination chip on the destination board.
[0105] Based on the above embodiments, the present disclosure further provides a switching device, the switching device comprising:
[0106] A receiving module, used for receiving and identifying multicast messages;
[0107] A processing module, used for obtaining a multicast field from a multicast message, and determining a destination board and / or a destination chip on the destination board corresponding to the multicast message according to the multicast field;
[0108] The sending module is used to send the multicast message to the destination board and / or the destination chip on the destination board.
[0109] The multicast field includes: a first field, a second field and a third field;
[0110] The first field is used to indicate the multicast type;
[0111] The second field is used to indicate the length of the bitmap;
[0112] The third field is used to represent a bit map, and the bit map is used to represent a destination board and / or a destination chip on the destination board of the multicast message.
[0113] The processing module is used to convert the third field into binary according to the length of the bitmap represented by the second field, and then convert the non-zero bytes in the binary into a hexadecimal result;
[0114] Determine the destination board and / or the destination chip on the destination board corresponding to the multicast message according to the result and the forwarding table entry;
[0115] The forwarding table entry includes a correspondence between a hexadecimal value and an outbound interface.
[0116] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. A person of ordinary skill in the art can understand and implement it without paying creative labor.
[0117] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0118] Those skilled in the art will readily appreciate other embodiments of the specification after considering the specification and practicing the invention claimed herein. The specification is intended to cover any variations, uses or adaptations of the specification that follow the general principles of the specification and include common knowledge or customary techniques in the art that are not claimed in the specification. The specification and examples are to be considered exemplary only, and the true scope and spirit of the specification are indicated by the following claims.
[0119] It should be understood that the present description is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.
[0120] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.
Claims
1. A method for processing a multicast message, characterized in that: The method comprises: The network board receives and identifies the multicast message; Acquire a multicast field from the multicast message, and determine a destination board and / or a destination chip on the destination board corresponding to the multicast message according to the multicast field; The multicast message is sent to a destination board and / or a destination chip on the destination board.
2. The method according to claim 1, characterized in that The network board receives and identifies the multicast message, including: The network board receives the message from the line card board, and analyzes whether the message carries a multicast field. If so, it determines that the message is a multicast message.
3. The method according to claim 1, characterized in that The multicast field includes: a first field, a second field and a third field; The first field is used to indicate the multicast type; The second field is used to indicate the length of the bitmap; The third field is used to represent a bit map, and the bit map is used to represent a destination board and / or a destination chip on the destination board of the multicast message.
4. The method according to claim 3, characterized in that The method of determining the destination board and / or the destination chip on the destination board corresponding to the multicast message according to the multicast field includes: The third field is converted into binary according to the length of the bitmap represented by the second field, and then the non-zero bytes in the binary are converted into a hexadecimal result; Determine the destination board and / or the destination chip on the destination board corresponding to the multicast message according to the result and the forwarding table entry; The forwarding table entry includes a correspondence between a hexadecimal value and an outbound interface.
5. The method according to claim 4, characterized in that The sending of the multicast message to a destination board and / or a destination chip on the destination board includes: Using the result to match the forwarding table entry, obtaining a matching outbound interface; The multicast message is sent to the destination board and / or the destination chip on the destination board through the matched outbound interface.
6. A switching device, characterized in that: The switching device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following method when executing the program: The network board in the switching device receives and identifies the multicast message; Acquire a multicast field from the multicast message, and determine a destination board and / or a destination chip on the destination board corresponding to the multicast message according to the multicast field; The multicast message is sent to a destination board and / or a destination chip on the destination board.
7. A switching device, characterized in that: The switching device comprises: A receiving module, used for receiving and identifying multicast messages; A processing module, used for obtaining a multicast field from a multicast message, and determining a destination board and / or a destination chip on the destination board corresponding to the multicast message according to the multicast field; The sending module is used to send the multicast message to the destination board and / or the destination chip on the destination board.
8. The switching device according to claim 7, characterized in that: The receiving module is used to receive a message from the line card board and analyze whether the message carries a multicast field. If so, it determines that the message is a multicast message.
9. The switching device according to claim 7, characterized in that: The multicast field includes: a first field, a second field and a third field; The first field is used to indicate the multicast type; The second field is used to indicate the length of the bitmap; The third field is used to represent a bit map, and the bit map is used to represent a destination board and / or a destination chip on the destination board of the multicast message.
10. The switching device according to claim 9, characterized in that: The processing module is used to convert the third field into binary according to the length of the bitmap represented by the second field, and then convert the non-zero bytes in the binary into a hexadecimal result; Determine the destination board and / or the destination chip on the destination board corresponding to the multicast message according to the result and the forwarding table entry; The forwarding table entry includes a correspondence between a hexadecimal value and an outbound interface.
Citation Information
Patent Citations
Multicast message forwarding method and device
CN108259365A
Multicast data message forwarding method and device
CN108809836A
Multicast message transmission method, master control board, and equipment
CN109617821A
Multicast message sending method, related device and network equipment
CN111786890A
Multicast message forwarding method and device and switch
CN115842773A
