Communication method and apparatus

By utilizing packet-by-packet forwarding and a new polling strategy in network devices to select member ports from the aggregation interface, the problems of upper-layer protocol oscillation, packet dropping, and out-of-order delivery in Ethernet link aggregation are solved, ensuring the stability of service functions.

CN119052340BActive Publication Date: 2026-05-05NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NEW H3C TECH CO LTD
Filing Date
2024-08-13
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

In existing Ethernet link aggregation, the flow-by-flow load balancing method causes upper-layer protocol oscillation, protocol packet dropping, and packet out-of-order delivery, while the packet-by-packet load balancing method causes service function failure.

Method used

By obtaining the destination IP address of the protocol message from the network device, selecting member ports from the aggregated interface using a packet-by-packet forwarding method, and sorting them according to the new round-robin strategy, the above problems can be avoided.

Benefits of technology

It avoids upper-layer protocol oscillation, protocol packet dropping, and packet out-of-order delivery in Ethernet link aggregation, ensuring the stability of service functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119052340B_ABST
    Figure CN119052340B_ABST
Patent Text Reader

Abstract

This application provides a communication method and apparatus. The method is applied to a first network device, the first network device including an aggregation interface. The method includes: when an upper-layer protocol included in the first network device generates a first protocol message, obtaining an outgoing interface identifier for forwarding the first protocol message based on the destination IP address included in the first protocol message, the outgoing interface identifier indicating the aggregation interface; selecting a member port for forwarding the first protocol message from the aggregation interface according to a packet-by-packet forwarding method; and sending a second protocol message to a second network device through the member port, the second protocol message including the first protocol message.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Ethernet link aggregation refers to increasing link bandwidth by bundling multiple physical Ethernet links together to form a single logical Ethernet link. Simultaneously, the bundled links dynamically back each other up, effectively improving link reliability.

[0003] like Figure 1 As shown, Figure 1 This is a diagram illustrating existing link aggregation. Figure 1 In this example, network device A and network device B are connected via three physical links. These three physical links are bundled together to form a logical link, Linkaggregation 1. Link aggregation is achieved through interface (port) aggregation. Multiple Ethernet interfaces bundled together form an aggregation group, and the Ethernet interfaces bundled together are called member ports of that aggregation group. Each aggregation group uniquely corresponds to one logical interface, called the aggregation interface.

[0004] After a logical link is established between network device A and network device B, load balancing of traffic within the aggregation group can be achieved by employing different aggregation load balancing types. Aggregation load balancing types include packet-by-packet load balancing and flow-by-flow load balancing. Packet-by-packet load balancing refers to distributing traffic across different member links on a per-packet basis, without distinguishing between individual packets. Flow-by-flow load balancing, on the other hand, distinguishes traffic based on packet characteristics, ensuring that packets belonging to the same traffic flow pass through the same member link.

[0005] However, although any of the aggregation load balancing methods can be selected to achieve load balancing of traffic within the aggregation group, the above two load balancing methods also expose the following defects: 1) When using the flow-by-flow load balancing method, if a physical link within the aggregation group fails or becomes unstable, it is easy to cause upper-layer protocol oscillation and protocol packet dropping; 2) When using the packet-by-packet load balancing method, it is easy to cause packet out-of-order delivery and service function failure. Summary of the Invention

[0006] In view of this, this application provides a communication method and apparatus to solve the problems of upper-layer protocol oscillation, protocol packet dropping, packet out-of-order delivery, and service function failure that occur when using the existing flow-by-flow and packet-by-packet load balancing method to load balance traffic within an aggregation group.

[0007] In a first aspect, this application provides a communication method applied to a first network device, the first network device including an aggregation interface, the method comprising:

[0008] When the upper-layer protocol included in the first network device generates a first protocol message, the outgoing interface identifier for forwarding the first protocol message is obtained according to the destination IP address included in the first protocol message, and the outgoing interface identifier indicates the aggregation interface;

[0009] According to the packet-by-packet forwarding method, select the member port for forwarding the first protocol message from the aggregation interface;

[0010] The second protocol message is sent to the second network device through the member port. The second protocol message includes the first protocol message.

[0011] Secondly, this application provides a communication device applied to a first network device, the first network device including an aggregation interface, the device comprising:

[0012] The acquisition unit is configured to, when the upper-layer protocol included in the first network device generates a first protocol message, acquire an outgoing interface identifier for forwarding the first protocol message based on the destination IP address included in the first protocol message, wherein the outgoing interface identifier indicates the aggregation interface;

[0013] The selection unit is used to select, from the aggregation interface, the member port for forwarding the first protocol message according to the packet-by-packet forwarding method;

[0014] The sending unit is configured to send a second protocol message to the second network device through the member port, the second protocol message including the first protocol message.

[0015] Thirdly, this application provides a network device including a processor and a machine-readable storage medium storing machine-executable instructions that can be executed by the processor, which in turn cause the processor to perform the method provided in the first aspect of this application.

[0016] Therefore, by applying the communication method and apparatus provided in this application, when the upper-layer protocol included in the first network device generates a first protocol message, the first network device obtains an outgoing interface identifier for forwarding the first protocol message based on the destination IP address included in the first protocol message, and the outgoing interface identifier indicates the aggregation interface; according to the packet-by-packet forwarding method, the first network device selects a member port for forwarding the first protocol message from the aggregation interface; through the member port, the first network device sends a second protocol message to the second network device, and the second protocol message includes the first protocol message.

[0017] Thus, according to the new polling strategy, the member ports are reordered to achieve the most dispersed polling results. At the same time, by using a packet-by-packet forwarding method, the member ports used to forward protocol packets generated by this network device are determined from the aggregated interfaces. This avoids problems such as upper-layer protocol oscillation, protocol packet dropping, packet out-of-order, and service function failure that occur when the existing flow-by-flow and packet-by-packet load balancing method is used to load balance traffic within the aggregated group. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of existing link aggregation;

[0019] Figure 2 A flowchart illustrating the communication method provided in the embodiments of this application;

[0020] Figure 3 A schematic diagram illustrating the networking between network devices provided in an embodiment of this application;

[0021] Figure 4 A structural diagram of a communication device provided in an embodiment of this application;

[0022] Figure 5 The network device hardware structure provided in the embodiments of this application. Detailed Implementation

[0023] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0024] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the corresponding listed items.

[0025] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0026] The communication method provided in the embodiments of this application will be described in detail below. See also... Figure 2 , Figure 2 A flowchart illustrating a communication method provided in an embodiment of this application. This method is applied to a first network device. The communication method provided in an embodiment of this application may include the following steps.

[0027] Step 210: When the upper-layer protocol included in the first network device generates a first protocol message, the outgoing interface identifier for forwarding the first protocol message is obtained according to the destination IP address included in the first protocol message, and the outgoing interface identifier indicates the aggregation interface.

[0028] Specifically, the first network device includes multiple upper-layer protocols, each of which can be implemented as a module. The upper-layer protocols are intended to communicate and interact with the upper-layer protocols of the peer network device (e.g., the upper-layer protocols included in the second network device).

[0029] The upper-layer protocol generates a first protocol message, which includes the destination IP address. After receiving the first protocol message, the first network device retrieves the destination IP address from it. Based on the destination IP address, the first network device looks up the forwarding table (FIB) and retrieves the forwarding table entry that matches the destination IP address. This forwarding table entry includes an outgoing interface field.

[0030] The first network device obtains the outgoing interface identifier from the outgoing interface field, which indicates the aggregated interfaces included in the first network device.

[0031] Step 220: Select the member port for forwarding the first protocol message from the aggregation interface according to the packet forwarding method;

[0032] Specifically, according to the description in step 210, the first network device determines the aggregation interface based on the outgoing interface identifier. Based on the packet-by-packet forwarding method, the first network device selects the member interface from the aggregation interfaces for forwarding the first protocol message.

[0033] Optionally, according to the packet-by-packet forwarding method, the first network device selects the member port for forwarding the first protocol message from the aggregated interfaces. The specific process is as follows: the first network device determines the member port from the interface polling table.

[0034] Optionally, the first network device determines the member port from the interface polling table as follows: the first network device obtains the protocol identifier of the upper-layer protocol; the first network device performs a modulo operation on the protocol identifier to obtain the interface index; based on the interface index, the first network device obtains the member port number corresponding to the interface index from the interface polling table; the first network device uses the member port corresponding to the member port number as the member port for forwarding the first protocol message.

[0035] In one example, the upper-layer protocol is the BFD module. BFD module 1 in the first network device has established a BFD session with BFD module 2 in the second network device. During the BFD session, BFD module 1 intends to exchange protocol messages with BFD module 2.

[0036] BFD module 1 generates protocol message 1. The first network device obtains protocol message 1 and retrieves the destination IP address from it. Based on the destination IP address, the first network device retrieves forwarding table entry 1 from the forwarding table. This forwarding table entry 1 includes an outgoing interface identifier indicating aggregation interface 1.

[0037] The first network device obtains the sequence number of protocol message 1 (e.g., the sequence number is 1, which is recorded by the software system of the first network device for each message sent by the upper-layer protocol) and the number of member ports (e.g., 8). It then performs a modulo operation between the sequence number and the number of member ports to obtain the interface index (e.g., 1). Based on interface index 1, the first network device retrieves the member port number corresponding to interface index 1 (e.g., 1 / 1 / 1) from the interface polling table. The first network device uses the member port corresponding to member port number 1 / 1 / 1 as the member port for forwarding the first protocol message.

[0038] The polling table for the above interfaces is shown in Table 1 below.

[0039] Table 1 Interface Polling Table

[0040]

[0041]

[0042] The member port number includes the board number, chip unit number, and interface number. For example, in 0 / 1 / 1, 0 represents the board number; 1 represents the chip unit number; and 1 represents the interface number.

[0043] Step 230: Send a second protocol message to the second network device through the member port. The second protocol message includes the first protocol message.

[0044] Specifically, according to the description of step 220, after the first network device selects a member port, it sends a second protocol message to the second network device through that member port. The second protocol message includes the first protocol message.

[0045] Understandably, after obtaining the outgoing interface identifier, the first network device first encapsulates a Layer 3 header on the outer layer of the first protocol packet. Then, it looks up the ARP table using the destination IP address and obtains the corresponding ARP entry. The first network device then obtains the destination MAC address of the second network device from the ARP entry and encapsulates a Layer 2 header on the outer layer of the Layer 3 header to obtain the second protocol packet.

[0046] Therefore, by applying the communication method provided in this application, when the upper-layer protocol included in the first network device generates a first protocol message, the first network device obtains an outgoing interface identifier for forwarding the first protocol message based on the destination IP address included in the first protocol message, and the outgoing interface identifier indicates the aggregation interface; according to the packet-by-packet forwarding method, the first network device selects a member port for forwarding the first protocol message from the aggregation interface; through the member port, the first network device sends a second protocol message to the second network device, and the second protocol message includes the first protocol message.

[0047] Thus, according to the new polling strategy, the member ports are reordered to achieve the most dispersed polling results. At the same time, by using a packet-by-packet forwarding method, the member ports used to forward protocol packets generated by this network device are determined from the aggregated interfaces. This avoids problems such as upper-layer protocol oscillation, protocol packet dropping, packet out-of-order, and service function failure that occur when the existing flow-by-flow and packet-by-packet load balancing method is used to load balance traffic within the aggregated group.

[0048] Optionally, in this embodiment of the application, the process of the first network device generating an interface polling table is also included, so that the first network device sends the protocol messages generated by the upper-layer protocol of this device to the second network device in a packet-by-packet forwarding manner.

[0049] Specifically, in the embodiments of this application, the first network device includes multiple single boards, each single board including multiple chip units and multiple member ports belonging to the aggregation interface.

[0050] The first network device sequentially polls each board, each chip unit, and each member port. Based on the polling results, the first network device generates an interface polling table, which includes the member port number, which in turn includes the board number, chip unit number, and interface number. It is understood that the interface polling table also includes an interface index.

[0051] Optionally, in the above sequential polling process, the board number is the best polling option, the chip unit number is the second best polling option, and the interface number is the worst polling option.

[0052] In one example, the first network device includes board 1 and board 2; each board includes chip unit 1 and chip unit 2; each board includes 4 member ports, and each chip unit includes 2 member ports; the 8 member ports belong to the same aggregated interface.

[0053] Among them, the board number of board 1 is 0; the board number of board 2 is 1; the chip unit number of chip unit 1 is 1; the chip unit number of chip unit 2 is 2; and the interface numbers are 1 and 2.

[0054] The member port numbers in board 1 are 0 / 1 / 1, 0 / 1 / 2; 0 / 2 / 1, 0 / 2 / 2; the member port numbers in board 2 are 1 / 1 / 1, 1 / 1 / 2, 1 / 2 / 1, 1 / 2 / 2. The first number represents the board number; the second number represents the chip unit number; and the third number represents the interface number.

[0055] When generating the interface polling table, the first network device sorts the eight member port numbers according to a strategy of first polling the individual boards, then polling the chip units, and finally polling the interface numbers. For example, the first network device first selects member port number 0 / 1 / 1, then selects member port number 1 / 1 / 1; then selects member port number 0 / 2 / 1; then selects member port number 1 / 2 / 1; then selects member port number 0 / 1 / 2; then selects member port number 1 / 1 / 2; then selects member port number 0 / 2 / 2; and finally selects member port number 1 / 2 / 2.

[0056] The first network device matches the sorted 8 member port numbers with the preset interface index and stores them sequentially in the interface polling table, as shown in Table 1.

[0057] Thus, in this embodiment of the application, the member ports are reordered according to the new polling strategy to achieve the most dispersed polling result. Subsequently, when determining the member ports of the forwarding protocol messages according to the packet forwarding method, dispersed polling is realized.

[0058] The communication method provided in the embodiments of this application will be described in detail below. See also... Figure 3 , Figure 3 This is a schematic diagram illustrating the networking between network devices provided in an embodiment of this application.

[0059] exist Figure 3In the diagram, network device C connects to network device A's port 2 via port 1, and network device D connects to network device B's port 11 via port 12. Network device A and network device B are connected by eight physical links, with interfaces port3 (0 / 1 / 1), port4 (1 / 1 / 1), port5 (0 / 2 / 1), port6 ​​(1 / 2 / 1), port7 (0 / 1 / 2), port8 (1 / 1 / 2), port9 (0 / 2 / 2), and port10 (1 / 2 / 2). These eight interfaces are bundled together to form an aggregation group, and the logical interface corresponding to this aggregation group is the aggregation interface Bagg1. These three physical links constitute a single logical link, Linkaggregation 1.

[0060] It is understandable that ports3-port10 are member ports of Bagg1.

[0061] BFD module 1, included in network device A, has established a BFD session with BFD module 2, included in network device B. During this BFD session, BFD module 1 intends to exchange protocol messages with BFD module 2.

[0062] In one example, BFD module 1 generates protocol message 1, network device A obtains protocol message 1 and retrieves the destination IP address from it. Based on the destination IP address, network device A retrieves forwarding table entry 1 from the forwarding table, which includes an outgoing interface identifier indicating Bagg1.

[0063] Network device A obtains the sequence number of protocol message 1 (e.g., sequence number 1) and the number of member ports (e.g., 8), and performs a modulo operation on the sequence number and the number of member ports to obtain the interface index (e.g., 1). Based on interface index 1, network device A obtains the member port number (e.g., 1 / 1 / 1) corresponding to interface index 1 from the interface polling table (Table 1 mentioned above). Network device A uses the member port (port4) corresponding to member number 1 / 1 / 1 as the member port for forwarding protocol message 1.

[0064] Network device A sends protocol message 1 to network device B through member port 4.

[0065] In another example, BFD module 1 generates protocol message 2. Network device A obtains protocol message 2 and retrieves the destination IP address from it. Based on the destination IP address, network device A retrieves forwarding table entry 1 from the forwarding table. This forwarding table entry 1 includes an outgoing interface identifier indicating Bagg1.

[0066] Network device A obtains the sequence number of protocol message 1 (e.g., sequence number 2) and the number of member ports (e.g., 8), and performs a modulo operation on the sequence number and the number of member ports to obtain the interface index (e.g., 2). Based on interface index 2, network device A obtains the member port number (e.g., 0 / 2 / 1) corresponding to interface index 2 from the interface polling table (Table 1 mentioned above). Network device A uses the member port (port5) corresponding to member number 0 / 2 / 1 as the member port for forwarding protocol message 2.

[0067] Network device A sends protocol message 2 to network device B through member port 5.

[0068] Understandably, network device A will forward its own protocol messages by forwarding packets one by one, thus polling each member port included on the board.

[0069] It should be noted that when network device A receives a message (including data packets and protocol packets) from another network device that needs to be forwarded, it will forward it in a flow-by-flow forwarding manner.

[0070] Based on the same inventive concept, embodiments of this application also provide a communication device corresponding to the communication method. See also Figure 4 , Figure 4 The communication apparatus provided in this application embodiment is applied to a first network device, the first network device including an aggregation interface, the apparatus comprising:

[0071] The acquisition unit 410 is configured to, when the upper-layer protocol included in the first network device generates a first protocol message, acquire an outgoing interface identifier for forwarding the first protocol message based on the destination IP address included in the first protocol message, wherein the outgoing interface identifier indicates the aggregation interface;

[0072] Selection unit 420 is used to select, from the aggregation interface, a member port for forwarding the first protocol message according to the packet forwarding method;

[0073] The sending unit 430 is used to send a second protocol message to the second network device through the member port, the second protocol message including the first protocol message.

[0074] Optionally, the first network device includes multiple single boards, each single board including multiple chip units and multiple member ports belonging to the aggregation interface;

[0075] The device further includes:

[0076] The polling unit (not shown in the figure) is used to sequentially poll each board, each chip unit, and each member port.

[0077] The generation unit is used to generate the interface polling table based on the sequential polling results. The interface polling table includes member port numbers, which include board numbers, chip unit numbers, and interface numbers.

[0078] Optionally, the selection unit 420 is specifically used to determine the member port from the interface polling table.

[0079] Optionally, the selection unit 420 is further specifically used to obtain the message sequence number and the number of member ports of the first protocol message;

[0080] The interface index is obtained by performing a modulo operation between the message sequence number and the number of member ports;

[0081] Based on the interface index, obtain the member port number corresponding to the interface index from the interface polling table;

[0082] The member port corresponding to the member port number is used as the member port for forwarding the first protocol message.

[0083] Optionally, the single-board number is optimally polled, the chip unit number is second-optimally polled, and the interface number is least optimally polled.

[0084] Therefore, by applying the communication device provided in this application, when the upper-layer protocol included in the first network device generates a first protocol message, the first network device obtains an outgoing interface identifier for forwarding the first protocol message based on the destination IP address included in the first protocol message, and the outgoing interface identifier indicates the aggregation interface; according to the packet-by-packet forwarding method, the first network device selects a member port for forwarding the first protocol message from the aggregation interface; through the member port, the first network device sends a second protocol message to the second network device, and the second protocol message includes the first protocol message.

[0085] Thus, according to the new polling strategy, the member ports are reordered to achieve the most dispersed polling results. At the same time, by using a packet-by-packet forwarding method, the member ports used to forward protocol packets generated by this network device are determined from the aggregated interfaces. This avoids problems such as upper-layer protocol oscillation, protocol packet dropping, packet out-of-order, and service function failure that occur when the existing flow-by-flow and packet-by-packet load balancing method is used to load balance traffic within the aggregated group.

[0086] Based on the same inventive concept, embodiments of this application also provide a network device, such as... Figure 5 As shown, the system includes a processor 510, a transceiver 520, and a machine-readable storage medium 530. The machine-readable storage medium 530 stores machine-executable instructions that can be executed by the processor 510. The processor 510 is prompted by the machine-executable instructions to execute the communication method provided in the embodiments of this application. (The foregoing...) Figure 4The communication device shown can be used as follows: Figure 5 The hardware structure of the network device shown is implemented.

[0087] The aforementioned computer-readable storage medium 530 may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the computer-readable storage medium 530 may also be at least one storage device located remotely from the aforementioned processor 510.

[0088] The processor 510 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0089] In this embodiment, the processor 510 reads the machine-executable instructions stored in the machine-readable storage medium 530, and is prompted by the machine-executable instructions to enable the processor 510 itself and the transceiver 520 to execute the communication method described in the foregoing embodiment.

[0090] In addition, this application provides a machine-readable storage medium 530 that stores machine-executable instructions. When called and executed by the processor 510, the machine-executable instructions cause the processor 510 itself and the transceiver 520 to execute the communication method described in the aforementioned application.

[0091] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.

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

[0093] For the embodiments of communication devices and machine-readable storage media, since the methods involved are basically similar to those of the aforementioned method embodiments, the description is relatively simple, and relevant details can be found in the descriptions of the method embodiments.

[0094] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A communication method, characterized in that, The method is applied to a first network device, the first network device including an aggregation interface, the method comprising: When the upper-layer protocol included in the first network device generates a first protocol message, the outgoing interface identifier for forwarding the first protocol message is obtained according to the destination IP address included in the first protocol message, and the outgoing interface identifier indicates the aggregation interface; According to the packet-by-packet forwarding method, select the member port for forwarding the first protocol message from the aggregation interface; The second protocol message is sent to the second network device through the member port. The second protocol message includes the first protocol message. The first network device includes multiple single boards, each single board including multiple chip units and multiple member ports belonging to the aggregation interface; Before obtaining the outgoing interface identifier for forwarding the first protocol message based on the destination IP address included in the first protocol message when the upper-layer protocol included in the first network device generates the first protocol message, the method further includes: Each board, each chip unit, and each member port is polled sequentially. Based on the sequential polling results, an interface polling table is generated. The interface polling table includes member port numbers, which include board numbers, chip unit numbers, and interface numbers.

2. The method according to claim 1, characterized in that, The step of selecting a member port from the aggregation interface for forwarding the first protocol message according to the packet-by-packet forwarding method specifically includes: The member port is determined from the interface polling table.

3. The method according to claim 2, characterized in that, The step of determining the member port from the interface polling table specifically includes: Obtain the sequence number of the first protocol message and the number of member ports; The interface index is obtained by performing a modulo operation between the message sequence number and the number of member ports; Based on the interface index, obtain the member port number corresponding to the interface index from the interface polling table; The member port corresponding to the member port number is used as the member port for forwarding the first protocol message.

4. The method according to claim 1, characterized in that, The optimal polling method is used for the single-board number, the second-best polling method is used for the chip unit number, and the worst polling method is used for the interface number.

5. A communication device, characterized in that, The device is applied to a first network device, the first network device including an aggregation interface, the device comprising: The acquisition unit is configured to, when the upper-layer protocol included in the first network device generates a first protocol message, acquire an outgoing interface identifier for forwarding the first protocol message based on the destination IP address included in the first protocol message, wherein the outgoing interface identifier indicates the aggregation interface; The selection unit is used to select, from the aggregation interface, the member port for forwarding the first protocol message according to the packet-by-packet forwarding method; The sending unit is configured to send a second protocol message to the second network device through the member port, the second protocol message including the first protocol message; The first network device includes multiple single boards, each single board including multiple chip units and multiple member ports belonging to the aggregation interface; The device further includes: The polling unit is used to sequentially poll each board, each chip unit, and each member port. The generation unit is used to generate an interface polling table based on the sequential polling results. The interface polling table includes member port numbers, which include board numbers, chip unit numbers, and interface numbers.

6. The apparatus according to claim 5, characterized in that, The selection unit is specifically used to determine the member port from the interface polling table.

7. The apparatus according to claim 6, characterized in that, The selection unit is also specifically used to obtain the message sequence number and the number of member ports of the first protocol message; The interface index is obtained by performing a modulo operation between the message sequence number and the number of member ports; Based on the interface index, obtain the member port number corresponding to the interface index from the interface polling table; The member port corresponding to the member port number is used as the member port for forwarding the first protocol message.

8. The apparatus according to claim 6, characterized in that, The optimal polling method is used for the single-board number, the second-best polling method is used for the chip unit number, and the worst polling method is used for the interface number.

Citation Information

Patent Citations

  • Message forwarding method and device for VXLAN gateway

    CN105827495A

  • Message forwarding method and device

    CN110798400A