Forwarding Method and Device

Update forwarding table entries through the network board to forward multicast or broadcast messages on demand, solving the bandwidth usage and processing performance problems in box switches, and achieving efficient forwarding of multicast or broadcast traffic.

CN115277603BActive Publication Date: 2025-07-04新华三技术有限公司合肥分公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210675253.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-15
Publication Date
2025-07-04
Estimated Expiration
2042-06-15

AI Technical Summary

Technical Problem

In frame switches, the prior art cannot realize on-demand forwarding of multicast or broadcast traffic by the network board, resulting in bandwidth usage and processing performance problems.

Method used

The network board obtains inter-board communication messages sent by the interface board, updates the forwarding table entries to forward multicast or broadcast messages on demand, including obtaining source chip identification and copying table entries information, and decides whether to forward multicast or broadcast messages based on traffic forwarding requirements.

Benefits of technology

It realizes on-demand forwarding of multicast or broadcast traffic by the network board, saves bandwidth and improves scalability, and is suitable for the forwarding needs of different replication table entries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115277603B_ABST
    Figure CN115277603B_ABST
Patent Text Reader

Abstract

The present application provides a forwarding method and apparatus. The method is applied to a network board, and the network board is within a switch. The switch further includes an interface board. The method includes: obtaining a first inter-board communication message sent by the interface board, where the first inter-board communication message includes forwarding information, and the forwarding information includes a first source chip identifier, first copy entry information, and a first traffic forwarding requirement; updating a first forwarding entry that matches the first source chip identifier and the first copy entry information according to the first traffic forwarding requirement, so that after receiving a multicast or broadcast packet, the multicast or broadcast packet is forwarded or not forwarded to a forwarding chip of the interface board indicated by the first source chip identifier according to the updated first forwarding entry.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and in particular, to a forwarding method and apparatus. Background Art

[0002] Currently, chassis switches generally adopt an orthogonal architecture, in which all interface boards included are connected to the network board, and traffic is forwarded through the network board. Under the orthogonal architecture, for multicast and broadcast traffic, the network board usually broadcasts and forwards the traffic to each interface board. However, in some scenarios, some interface boards do not have the need to forward the above traffic. Thus, it occupies the bandwidth between the network board and the interface board, affecting the forwarding of other traffic (for example, unicast traffic).

[0003] For IP multicast traffic, currently, the master control board can calculate the forwarding path. After the master control board calculates the forwarding path, it synchronizes the forwarding path information corresponding to the IP multicast traffic to the network board, and the network board performs on-demand forwarding processing.

[0004] However, in some scenarios, calculating the forwarding path by the master control board also brings the following defects: 1) In the scenario where the master control board does not need to process the forwarding service logic, the master control board does not need to calculate the forwarding path either. Therefore, calculating the forwarding path by the master control board is not universal; 2) In the scenario where the master control board calculates all forwarding paths, the master control board needs to have high processing performance.

[0005] The above defects will cause the master control board to be unable to calculate the forwarding path in some scenarios, and thus the network board cannot perform on-demand forwarding processing. Summary of the Invention

[0006] In view of this, this application provides a forwarding method and apparatus to enable the network board to perform on-demand forwarding on multicast or broadcast traffic.

[0007] In a first aspect, this application provides a forwarding method, which is applied to a network board. The network board is inside a switch, and the switch further includes interface boards. The method includes:

[0008] Obtain a first inter-board communication message sent by the interface board. The first inter-board communication message includes forwarding information, and the forwarding information includes a first source chip identifier, first replication table entry information, and a first traffic forwarding requirement;

[0009] According to the first traffic forwarding requirement, update a first forwarding table entry that matches the first source chip identifier and the first replication table entry information, so that after receiving a multicast or broadcast packet, according to the updated first forwarding table entry, forward or not forward the multicast or broadcast packet to the forwarding chip of the interface board indicated by the first source chip identifier.

[0010] Second aspect, the present application provides a forwarding device, which is applied to a network board. The network board is inside a switch, and the switch further includes an interface board. The device includes:

[0011] An obtaining unit, configured to obtain a first inter-board communication message sent by the interface board. The first inter-board communication message includes forwarding information, and the forwarding information includes a first source chip identifier, first replication entry information, and a first traffic forwarding requirement.

[0012] An updating unit, configured to update a first forwarding table entry that matches the first source chip identifier and the first replication entry information according to the first traffic forwarding requirement, so that after receiving a multicast or broadcast packet, according to the updated first forwarding table entry, forward or not forward the multicast or broadcast packet to the forwarding chip of the interface board indicated by the first source chip identifier.

[0013] Third aspect, the present application provides a network board, including a processor and a machine-readable storage medium. The machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to execute the method provided in the first aspect of the present application.

[0014] Therefore, by applying the forwarding method and device provided in the present application, the network board obtains a first inter-board communication message sent by the interface board. The first inter-board communication message includes forwarding information, and the forwarding information includes a first source chip identifier, first replication entry information, and a first traffic forwarding requirement. According to the first traffic forwarding requirement, the network board updates a first forwarding table entry that matches the first source chip identifier and the first replication entry information, so that after receiving a multicast or broadcast packet, according to the updated first forwarding table entry, forward or not forward the multicast or broadcast packet to the forwarding chip of the interface board indicated by the first source chip identifier.

[0015] In this way, the network board updates the matching forwarding table entry through the obtained forwarding information, realizes the on-demand forwarding of multicast or broadcast traffic according to the updated forwarding table entry, saves the network board bandwidth, and at the same time has good scalability, and can realize on-demand forwarding for different replication entries. Description of the Drawings

[0016] Figure 1 It is a flowchart of the forwarding method provided by an embodiment of the present application;

[0017] Figure 2 It is a structural diagram of the forwarding device provided by an embodiment of the present application;

[0018] Figure 3 It is a hardware structure diagram of the network board provided by an embodiment of the present application. Detailed Embodiments

[0019] Exemplary embodiments will be described in detail herein, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of apparatuses and methods consistent with some aspects of the present application as detailed in the appended claims.

[0020] The terms used in the present application are for the purpose of describing specific embodiments only and are not intended to limit the present application. The singular forms "a", "the", and "said" used in the present application and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0021] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, such 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 the present application, 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 "when" or "while" or "in response to determining".

[0022] The forwarding method provided by the embodiments of the present application will be described in detail below. Refer to Figure 1 , Figure 1 which is a flowchart of the forwarding method provided by the embodiments of the present application. This method is applied to the network board. The forwarding method provided by the embodiments of the present application may include the following steps.

[0023] Step 110: Obtain a first inter-board communication message sent by the interface board, where the first inter-board communication message includes forwarding information, and the forwarding information includes a first source chip identifier, first replication table entry information, and a first traffic forwarding requirement;

[0024] Specifically, a frame switch includes an interface board and a network board. The number of interface boards may be multiple, and each interface board is connected to the network board and forwards traffic through the network board. The network board includes multiple chip interconnection ports, and each chip interconnection port is connected to a forwarding chip on an interface board.

[0025] An inter-board communication link has been established between the interface board and the network board, and this inter-board communication link can forward different types of inter-board communication messages. For example, point-to-point type (connected) inter-board communication messages, point-to-multipoint type inter-board communication messages (connectionless), etc.

[0026] When the interface board has a forwarding requirement for certain traffic or does not have a forwarding requirement for certain traffic, the interface board generates a first inter-board communication message, which includes forwarding information. The forwarding information includes a first source chip identifier, first copy entry information, and a first traffic forwarding requirement.

[0027] The interface board can send the first inter-board communication message between boards in a broadcast manner. Other interface boards ignore the first inter-board communication message, and the network board can obtain the first inter-board communication message and extract the forwarding information from it.

[0028] Among them, the interface board indicated by the first source chip identifier is the forwarding chip; the first copy entry information includes a first copy entry type and a first traffic forwarding domain identifier. The first copy entry type is used to indicate the basis for the interface board to generate the forwarding information, and the first traffic forwarding domain identifier is used to indicate the forwarding domain with the first traffic forwarding requirement; the first traffic forwarding requirement includes receiving traffic forwarding or rejecting traffic forwarding.

[0029] The basis for the interface board to generate the forwarding information includes a three-layer multicast entry, or a two-layer multicast entry, or a broadcast entry.

[0030] In the embodiments of the present application, the interface board can generate the forwarding information according to the existing entries.

[0031] Further, the interface board can generate the forwarding information according to the existing three-layer multicast entries, two-layer multicast entries, and broadcast entries (i.e., VLAN entries).

[0032] In one implementation, the interface board generates a three-layer multicast entry according to the existing multicast protocol. The interface board determines whether the chip identifier of the forwarding chip on the interface board is included in the three-layer multicast entry. If it is included, the interface board determines that the forwarding chip has a traffic forwarding requirement; if it is not included, the interface board determines that the forwarding chip does not have a traffic forwarding requirement.

[0033] Similarly, in another implementation, the interface board generates a static multicast MAC entry (i.e., a two-layer multicast entry) according to the configuration of the administrator. The interface board determines whether the chip identifier of the forwarding chip on the interface board is included in the static multicast MAC entry. If it is included, the interface board determines that the forwarding chip has a traffic forwarding requirement; if it is not included, the interface board determines that the forwarding chip does not have a traffic forwarding requirement.

[0034] Similarly, in another implementation, the interface board generates a VLAN entry (i.e., a broadcast entry) according to the configuration of the administrator. The interface board determines whether the chip identifier of the forwarding chip on the interface board is included in the VLAN entry. If it is included, the interface board determines that the forwarding chip has a traffic forwarding requirement; if it is not included, the interface board determines that the forwarding chip does not have a traffic forwarding requirement.

[0035] Through the above three implementation methods, the interface board generates forwarding information to indicate whether there is a multicast or broadcast traffic forwarding requirement for its own forwarding information. As shown in Table 1 below.

[0036] Table 1 Schematic Table of Forwarding Information

[0037]

[0038] Table 2 Schematic Table of Forwarding Information

[0039]

[0040] Table 3 Schematic Table of Forwarding Information

[0041]

[0042]

[0043] Step 120: According to the first traffic forwarding requirement, update the first forwarding table entry that matches the first source chip identifier and the first copy table entry information, so that after receiving a multicast or broadcast packet, according to the updated first forwarding table entry, forward or not forward the multicast or broadcast packet to the forwarding chip indicated by the first source chip identifier.

[0044] Specifically, according to the description of step 110, after the network board obtains the first source chip identifier, it determines the forwarding chip on the interface board according to the first source chip identifier. Using the first source chip identifier and the first copy table entry, obtain the matching first forwarding table entry from the local forwarding table entries.

[0045] According to the first traffic forwarding requirement, the network board updates the first forwarding table entry to obtain the updated first forwarding table entry. This updated first forwarding table entry enables the network board to forward or not forward multicast or broadcast packets to the corresponding forwarding chip after receiving them.

[0046] Furthermore, the network board establishes a connection with the above-mentioned forwarding chip through the chip interconnection port.

[0047] According to the first traffic forwarding requirement, the network board updates the first forwarding table entry that matches the first source chip identifier and the first copy table entry information. The specific process is as follows: when the first traffic forwarding requirement is to receive traffic forwarding, the network board adds the port identifier of the chip interconnection port to the first forwarding table entry; when the first traffic forwarding requirement is to reject traffic forwarding, the network board deletes the port identifier of the chip interconnection port from the first forwarding table entry.

[0048] For example, interface board 1 is a single forwarding chip single board with a chip number of 1. Interface board 1 has a receiving requirement for broadcast traffic belonging to VLAN 100. The receiving board 1 generates forwarding information and generates an inter-board communication message, which includes the forwarding information.

[0049] Interface board 1 sends the inter-board communication message between boards in a broadcast manner. Other interface boards ignore the inter-board communication message, and the network board can obtain the first inter-board communication message and extract the forwarding information from it. Through the forwarding information, the network board determines that chip number 1 has a receiving requirement for broadcast traffic belonging to VLAN 100. The network board adds the port identifier of the chip interconnection port connected to chip number 1 to the VLAN 100 entry of the network board chip, so as to forward subsequent broadcast traffic to interface board 1, and other interface boards that do not have the requirement to receive VLAN 100 broadcast traffic can no longer receive broadcast traffic belonging to VLAN 100.

[0050] Therefore, by applying the forwarding method provided in this application, the network board obtains the first inter-board communication message sent by the interface board. The first inter-board communication message includes forwarding information, which includes the first source chip identifier, the first replication entry information, and the first traffic forwarding requirement. According to the first traffic forwarding requirement, the network board updates the first forwarding entry table that matches the first source chip identifier and the first replication entry information, so that after receiving a multicast or broadcast packet, according to the updated first forwarding entry table, forward or not forward the multicast or broadcast packet to the forwarding chip of the interface board indicated by the first source chip identifier.

[0051] In this way, the network board updates the matching forwarding entry table through the obtained forwarding information, realizes the on-demand forwarding of multicast or broadcast traffic according to the updated forwarding entry table, saves the network board bandwidth, and at the same time has good scalability, and can realize on-demand forwarding for different replication entry tables.

[0052] Optionally, in the embodiment of this application, it also includes the process of the interface board and the network board interacting with the inter-board communication message after the network board has a normal event.

[0053] Specifically, after the network board has a normal event, for example, after the network board restarts and goes online. The network board sends an inter-board communication message between boards in a broadcast manner to notify each interface board that it has gone online. After receiving the inter-board communication message, the interface board needs to respond to the normal event of the network board. The interface board generates the first inter-board communication message and sends the first inter-board communication message to the network board in a unicast (i.e., point-to-point) manner, so that the network board can obtain the forwarding information generated by the interface board in time after going online and set the forwarding entry table of the network board chip.

[0054] It should be noted that the network board updates the forwarding entry table of the network board chip, which can be updated with reference to the description method of the foregoing embodiment and will not be repeated here.

[0055] Optionally, in the embodiments of the present application, in order to solve the situation where inter-board communication messages are lost in some small-probability cases or the forwarding entry of the network board update network board chip fails, a timing verification mechanism can be added, and the interface board periodically sends forwarding verification information.

[0056] Specifically, the interface board generates a second inter-board communication message, and the second inter-board communication message includes forwarding verification information, and the forwarding verification information includes a second source chip identifier and second replication entry information.

[0057] The interface board can send the second inter-board communication message between boards in a broadcast manner. Other interface boards ignore the second inter-board communication message, and the network board can obtain the second inter-board communication message and extract the forwarding verification information therefrom.

[0058] Among them, the second source chip identifier is used to indicate the forwarding chip of the interface board; the second replication entry information includes a second replication entry type and a replication entry bitmap. The second replication entry type is used to indicate the basis for the interface board to generate the forwarding verification information. The replication entry bitmap includes multiple bits (for example, 16 bits, 32 bits, etc.), and each bit indicates a second traffic forwarding domain identifier. The second traffic forwarding domain identifier is used to indicate the forwarding domain with traffic forwarding requirements; the current value of each bit is used to indicate whether the forwarding domain receives or rejects traffic forwarding.

[0059] When the current value is 1, it means that the forwarding domain indicated by the second traffic forwarding domain identifier receives traffic forwarding; when the current value is 0, it means that the forwarding domain indicated by the second traffic forwarding domain identifier rejects traffic forwarding.

[0060] The basis for the interface board to generate the forwarding verification information includes a three-layer multicast entry, or a two-layer multicast entry, or a broadcast entry.

[0061] In the embodiments of the present application, the interface board can generate the forwarding verification information according to the existing entries.

[0062] Furthermore, the interface board can generate the forwarding verification information according to the existing three-layer multicast entries, two-layer multicast entries, and broadcast entries (i.e., VLAN entries).

[0063] It should be noted that the interface board can generate the forwarding verification information according to the existing entries with reference to the description method of the foregoing embodiments, and will not be repeated here.

[0064] Table 3 Schematic Table of Forwarding Verification Information

[0065]

[0066] After the network board obtains the forwarding verification information, it obtains the second source chip identifier and the second replication entry information therefrom.

[0067] According to the second copy entry information, the network board updates the second forwarding table entry that matches the second source chip identifier.

[0068] Optionally, according to the copy entry bitmap, the network board updates the second forwarding table entry that matches the second source chip identifier. The specific process is as follows: According to the current value of each bit, the network board updates each second forwarding table entry corresponding to each second traffic forwarding domain identifier.

[0069] Optionally, the network board establishes a connection with the interface board through the chip interconnection port.

[0070] According to the current value of each bit, the network board updates each second forwarding table entry corresponding to each second traffic forwarding domain identifier. The specific process is as follows:

[0071] When the current value is 1, the network board determines that the forwarding domain indicated by the second traffic forwarding domain identifier receives traffic forwarding; the network board determines whether the port identifier of the chip interconnection port is already included in the second forwarding table entry.

[0072] If not included, the network board adds the port identifier of the chip interconnection port to the second forwarding table entry; if included, the network board does not update the second forwarding table entry.

[0073] Optionally, when the current value is 0, the network board determines that the forwarding domain indicated by the second traffic forwarding domain identifier rejects traffic forwarding; the network board determines whether the port identifier of the chip interconnection port is already included in the second forwarding table entry.

[0074] If included, the network board deletes the port identifier of the chip interconnection port from the second forwarding table entry; if not included, the network board does not update the second forwarding table entry.

[0075] Based on the same inventive concept, an embodiment of the present application further provides a forwarding device corresponding to the forwarding method. Refer to Figure 2 , Figure 2 For the forwarding device provided in the embodiment of the present application, the device is applied to a network board, the network board is in a switch, and the switch further includes an interface board. The device includes:

[0076] An obtaining unit 210, configured to obtain a first inter-board communication message sent by the interface board, where the first inter-board communication message includes forwarding information, and the forwarding information includes a first source chip identifier, first copy entry information, and a first traffic forwarding requirement;

[0077] An updating unit 220, configured to update a first forwarding table entry that matches the first source chip identifier and the first copy entry information according to the first traffic forwarding requirement, so that after receiving a multicast or broadcast packet, according to the updated first forwarding table entry, forward or not forward the multicast or broadcast packet to the forwarding chip of the interface board indicated by the first source chip identifier.

[0078] Optionally, the first copy entry information includes a first copy entry type and a first traffic forwarding domain identifier. The first copy entry type is used to indicate the basis for the interface board to generate the forwarding information, and the first traffic forwarding domain identifier is used to indicate the forwarding domain with the first traffic forwarding requirement.

[0079] The first traffic forwarding requirement includes receiving traffic forwarding or rejecting traffic forwarding.

[0080] Optionally, the network board establishes a connection with the forwarding chip through a chip interconnection port.

[0081] The updating unit 220 is specifically configured to add the port identifier of the chip interconnection port to the first forwarding entry when the first traffic forwarding requirement is receiving traffic forwarding.

[0082] When the first traffic forwarding requirement is rejecting traffic forwarding, delete the port identifier of the chip interconnection port from the first forwarding entry.

[0083] Optionally, the obtaining unit 210 is specifically configured to obtain a first inter-board communication message broadcast by the interface board; or,

[0084] After the network board goes online, receive the first inter-board communication message sent by the interface board.

[0085] Optionally, the obtaining unit 210 is further configured to obtain a second inter-board communication message broadcast by the interface board. The second inter-board communication message includes forwarding verification information, and the forwarding verification information includes a second source chip identifier and second copy entry information.

[0086] The updating unit 220 is further configured to update a second forwarding entry that matches the second source chip identifier according to the second copy entry information.

[0087] Optionally, the second source chip identifier is used to indicate the forwarding chip of the interface board.

[0088] The second copy entry information includes a second copy entry type and a copy entry bitmap. The second copy entry type is used to indicate the basis for the interface board to generate the forwarding verification information. The copy entry bitmap includes a plurality of bits, and each bit indicates a second traffic forwarding domain identifier. The second traffic forwarding domain identifier is used to indicate the forwarding domain with a traffic forwarding requirement.

[0089] The current value of each bit is used to indicate that the forwarding domain receives traffic forwarding or rejects traffic forwarding.

[0090] Optionally, the updating unit 220 is specifically configured to update each second forwarding table entry corresponding to each second traffic forwarding domain identifier according to the current value of each bit.

[0091] Optionally, the network board is connected to the interface board through a chip interconnection port;

[0092] The updating unit 220 is specifically configured to, when the current value is 1, determine that the forwarding domain indicated by the second traffic forwarding domain identifier receives traffic forwarding;

[0093] Determine whether the port identifier of the chip interconnection port is already included in the second forwarding table entry;

[0094] If not, add the port identifier of the chip interconnection port to the second forwarding table entry.

[0095] Optionally, the updating unit 220 is further specifically configured to, when the current value is 0, determine that the forwarding domain indicated by the second traffic forwarding domain identifier rejects traffic forwarding;

[0096] Determine whether the port identifier of the chip interconnection port is already included in the second forwarding table entry;

[0097] If included, delete the port identifier of the chip interconnection port from the second forwarding table entry.

[0098] Optionally, the basis for the interface board to generate the forwarding information includes a three-layer multicast table entry, or a two-layer multicast table entry, or a broadcast table entry.

[0099] Therefore, by applying the forwarding device provided in this application, the network board obtains a first inter-board communication message sent by the interface board. The first inter-board communication message includes forwarding information, and the forwarding information includes a first source chip identifier, first replication table entry information, and a first traffic forwarding requirement. According to the first traffic forwarding requirement, the network board updates the first forwarding table entry that matches the first source chip identifier and the first replication table entry information, so that after receiving a multicast or broadcast packet, according to the updated first forwarding table entry, forward or not forward the multicast or broadcast packet to the forwarding chip of the interface board indicated by the first source chip identifier.

[0100] In this way, the network board updates the matching forwarding table entry through the obtained forwarding information, realizes the on-demand forwarding of multicast or broadcast traffic according to the updated forwarding table entry, saves the network board bandwidth, and has good scalability at the same time, and can realize on-demand forwarding for different replication table entries.

[0101] Based on the same inventive concept, an embodiment of this application also provides a network board, as Figure 3As shown, it includes a processor 310, a transceiver 320, and a machine-readable storage medium 330. The machine-readable storage medium 330 stores machine-executable instructions that can be executed by the processor 310. The processor 310 is prompted by the machine-executable instructions to execute the forwarding method provided in the embodiments of the present application. The foregoing Figure 2 The forwarding device shown can be implemented by using a network board hardware structure as Figure 3 shown.

[0102] The above computer-readable storage medium 330 may include a random access memory (English: Random Access Memory, abbreviated as: RAM), and may also include a non-volatile memory (English: Non-volatile Memory, abbreviated as: NVM), such as at least one disk storage. Optionally, the computer-readable storage medium 330 may also be at least one storage device located far from the foregoing processor 310.

[0103] The above processor 310 may be a general-purpose processor, including a central processing unit (English: Central Processing Unit, abbreviated as: CPU), a network processor (English: Network Processor, abbreviated as: NP), etc.; it may also be a digital signal processor (English: Digital Signal Processor, abbreviated as: DSP), an application-specific integrated circuit (English: Application Specific Integrated Circuit, abbreviated as: ASIC), a field-programmable gate array (English: Field-Programmable Gate Array, abbreviated as: FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0104] In the embodiments of the present application, the processor 310 reads the machine-executable instructions stored in the machine-readable storage medium 330 and is prompted by the machine-executable instructions to be able to implement the processor 310 itself and call the transceiver 320 to execute the forwarding method described in the foregoing embodiments of the present application.

[0105] In addition, the embodiments of the present application provide a machine-readable storage medium 330. The machine-readable storage medium 330 stores machine-executable instructions. When called and executed by the processor 310, the machine-executable instructions prompt the processor 310 itself and call the transceiver 320 to execute the forwarding method described in the foregoing embodiments of the present application.

[0106] The implementation processes of the functions and roles of each unit in the above device are specifically described in the implementation processes of the corresponding steps in the above method, and will not be elaborated here.

[0107] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the descriptions in the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this application. Those of ordinary skill in the art can understand and implement it without creative efforts.

[0108] For the embodiments of the forwarding device and the machine-readable storage medium, since the method content involved is basically similar to the foregoing method embodiments, the description is relatively simple, and the relevant parts can be referred to the descriptions in the method embodiments.

[0109] The above are only the preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this application shall be included within the scope of protection of this application.

Claims

1. A forwarding method, characterized in that, The method is applied to a network board, which is inside a switch. The switch further includes an interface board. The method includes: Obtain a first inter-board communication message sent by the interface board. The first inter-board communication message includes forwarding information, and the forwarding information includes a first source chip identifier, first copy entry information, and a first traffic forwarding requirement; According to the first traffic forwarding requirement, update a first forwarding entry that matches the first source chip identifier and the first copy entry information, so that after receiving a multicast or broadcast packet, according to the updated first forwarding entry, forward or not forward the multicast or broadcast packet to the forwarding chip of the interface board indicated by the first source chip identifier; The method further includes: Obtain a second inter-board communication message broadcast by the interface board. The second inter-board communication message includes forwarding verification information, and the forwarding verification information includes a second source chip identifier and second copy entry information; According to the second copy entry information, update a second forwarding entry that matches the second source chip identifier; The second source chip identifier is used to indicate the forwarding chip of the interface board; The second copy entry information includes a second copy entry type and a copy entry bitmap. The second copy entry type is used to indicate the basis for the interface board to generate the forwarding verification information. The copy entry bitmap includes multiple bits, and each bit indicates a second traffic forwarding domain identifier. The second traffic forwarding domain identifier is used to indicate a forwarding domain with a traffic forwarding requirement; The current value of each bit is used to indicate whether the forwarding domain receives traffic forwarding or rejects traffic forwarding.

2. The method according to claim 1, wherein The first copy entry information includes a first copy entry type and a first traffic forwarding domain identifier. The first copy entry type is used to indicate the basis for the interface board to generate the forwarding information. The first traffic forwarding domain identifier is used to indicate a forwarding domain with the first traffic forwarding requirement; The first traffic forwarding requirement includes receiving traffic forwarding or rejecting traffic forwarding.

3. The method according to claim 2, wherein The network board establishes a connection with the forwarding chip through a chip interconnection port; The step of updating the first forwarding entry that matches the first source chip identifier and the first copy entry information according to the first traffic forwarding requirement specifically includes: When the first traffic forwarding requirement is to receive traffic forwarding, add the port identifier of the chip interconnection port to the first forwarding entry; When the first traffic forwarding requirement is to reject traffic forwarding, delete the port identifier of the chip interconnection port from the first forwarding entry.

4. The method according to claim 1, wherein The step of obtaining the first inter-board communication message sent by the interface board specifically includes: Obtain the first inter-board communication message broadcast by the interface board; or After the network board is powered on, receive the first inter-board communication message sent by the interface board.

5. The method according to claim 1, characterized in that The step of updating the second forwarding entry that matches the second source chip identifier according to the copy entry bitmap specifically includes: According to the current value of each bit, update each second forwarding entry corresponding to each second traffic forwarding domain identifier.

6. The method according to claim 5, characterized in that, The network board establishes a connection with the interface board through a chip interconnection port; Updating each second forwarding table entry corresponding to each second traffic forwarding domain identifier according to the current value of each bit specifically includes: When the current value is 1, determining that the forwarding domain indicated by the second traffic forwarding domain identifier receives traffic forwarding; Judging whether the port identifier of the chip interconnection port is already included in the second forwarding table entry; If not included, adding the port identifier of the chip interconnection port to the second forwarding table entry.

7. The method according to claim 6, characterized in that, Updating each second forwarding table entry corresponding to each second traffic forwarding domain identifier according to the current value of each bit specifically includes: When the current value is 0, determining that the forwarding domain indicated by the second traffic forwarding domain identifier rejects traffic forwarding; Judging whether the port identifier of the chip interconnection port is already included in the second forwarding table entry; If included, deleting the port identifier of the chip interconnection port from the second forwarding table entry.

8. The method according to claim 1 or 3, characterized in that, The basis for the interface board to generate the forwarding information includes a three-layer multicast table entry, or a two-layer multicast table entry, or a broadcast table entry.

9. A forwarding device, characterized in that, The device is applied to a network board, the network board is inside a switch, the switch further includes an interface board, and the device includes: An obtaining unit, configured to obtain a first inter-board communication message sent by the interface board, where the first inter-board communication message includes forwarding information, and the forwarding information includes a first source chip identifier, first replication table entry information, and a first traffic forwarding requirement; An updating unit, configured to update a first forwarding table entry that matches the first source chip identifier and the first replication table entry information according to the first traffic forwarding requirement, so that after receiving a multicast or broadcast packet, according to the updated first forwarding table entry, forwarding or not forwarding the multicast or broadcast packet to the forwarding chip of the interface board indicated by the first source chip identifier; The obtaining unit is further configured to obtain a second inter-board communication message broadcast by the interface board, where the second inter-board communication message includes forwarding verification information, and the forwarding verification information includes a second source chip identifier and second replication table entry information; The updating unit is further configured to update a second forwarding table entry that matches the second source chip identifier according to the second replication table entry information; The second source chip identifier is used to indicate the forwarding chip of the interface board; The second replication table entry information includes a second replication table entry type and a replication table entry bitmap, the second replication table entry type is used to indicate the basis for the interface board to generate the forwarding verification information, the replication table entry bitmap includes a plurality of bits, each bit indicates a second traffic forwarding domain identifier, and the second traffic forwarding domain identifier is used to indicate a forwarding domain with a traffic forwarding requirement; The current value of each bit is used to indicate that the forwarding domain receives traffic forwarding or rejects traffic forwarding.

Citation Information

Patent Citations

  • Multicast message forwarding method and device

    CN108259365A