Packet forwarding method, data communication device, and storage medium

By using the combination of the first line card and the second line card in the data communication device, the message forwarding path is determined using global next hop information, and the problem of limited number of terminals caused by the storage limitation of MAC chips in the prior art is solved, and the support of larger-scale terminals is achieved.

WO2025118904A1PCT designated stage expired Publication Date: 2025-06-12RUIJIE NETWORKS CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/130360
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-06
Filing Date
2024-11-07
Publication Date
2025-06-12

AI Technical Summary

Technical Problem

When existing data communication devices support a large number of terminals, the storage limitation of MAC chips results in a small number of terminals that can be forwarded to, which cannot meet the needs of large-scale terminals.

Method used

By introducing the first line card and the second line card into the data communication device, the global target next hop information stored in the first line card is used to determine the global target next hop information of the message, and based on the information, the second line card with the corresponding local target next hop information is determined, and the message is transmitted to the second line card for forwarding.

Benefits of technology

It realizes that the forwarding of messages is accurately completed when the local lower hop information stored in each line card is different. The supported terminal scale can be superimposed on the terminal scales supported by multiple line cards, greatly increasing the number of terminals that messages can be forwarded to.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024130360_12062025_PF_FP_ABST
    Figure CN2024130360_12062025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a packet forwarding method, a data communication device, and a storage medium. The method is applied to a data communication device comprising a first line card and a second line card. The method comprises: on the basis of first information stored in the first line card, determining global target next hop information corresponding to a received packet, wherein the first information comprises global next hop information capable of being forwarded to a terminal and corresponding to the first line card and the second line card in the data communication device, and the global next hop information comprises the global target next hop information; on the basis of the global target next hop information, determining the second line card corresponding to the packet, wherein the second line card stores local target next hop information corresponding to the global target next hop information; and transmitting the packet to the second line card for forwarding.
Need to check novelty before this filing date? Find Prior Art

Description

Message forwarding method, data communication equipment and storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on December 6, 2023, with application number 202311670777.4 and application name “Message forwarding method, data communication equipment and readable storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The embodiments of the present application relate to the field of communication technology, and in particular to a message forwarding method, data communication equipment, and storage medium. Background Art

[0004] Data communication devices, such as switches and routers, are packet forwarding devices within a network, responsible for selecting packet forwarding paths. When a packet enters a data communication device, it retrieves the packet's corresponding egress information based on the terminal device's Internet Protocol (IP) address's IP prefix and adjacency information (i.e., next hop information) stored in a line card's Media Access Control (MAC) chip. This information is then edited and forwarded.

[0005] Summary of the Invention

[0006] Embodiments of the present application provide a message forwarding method, data communication equipment, and storage medium.

[0007] According to a first aspect of an embodiment of the present application, a message forwarding method is provided, which is applied to a data communication device including a first line card and a second line card. The method includes:

[0008] Determining, based on first information stored in the first line card, global target next hop information corresponding to the received message, wherein the first information is used to indicate global next hop information of forwardable terminals corresponding to the first line card and the second line card in the data communication device, the global next hop information including the global target next hop information;

[0009] Determining a second line card corresponding to the message according to the global target next hop information, wherein the second line card stores local target next hop information corresponding to the global target next hop information; and

[0010] The message is transmitted to the second line card for forwarding.

[0011] The message forwarding method provided in the embodiment of the present application can first determine the global target next hop information corresponding to the received message based on the global next hop information of the forwardable terminals corresponding to all line cards in the data communication device stored in the first line card, and then determine the second line card that stores the local target next hop information corresponding to the global target next hop information based on the global target next hop information, and transmit the message to the second line card for forwarding. Therefore, even if the local next hop information stored on each line card in the data communication device is different, the message forwarding can be accurately completed, thereby achieving the effect of the terminal scale supported by the data communication device being the sum of the terminal scales supported by multiple line cards, greatly increasing the number of terminals to which the message can be forwarded.

[0012] In one possible implementation, determining the second line card corresponding to the message based on the global target next hop information includes: determining the local target next hop information and the second line card corresponding to the global target next hop information based on the correspondence between the global next hop information and the local target next hop information stored on the second line card, wherein the local target next hop information corresponds to the second line card; or determining the second line card corresponding to the message based on the line card tag carried in the global target next hop information.

[0013] In one possible implementation, transmitting the message to the second line card for forwarding includes: transmitting the message to the second line card; determining the first port corresponding to the message in the second line card based on the local target next hop information; and forwarding the message through the first port.

[0014] In a possible implementation, the global target next hop information includes: address information of a media access control (MAC) chip in the second line card; and transmitting the message to the second line card includes: transmitting the message to the MAC chip in the second line card according to the address information.

[0015] In a possible implementation, before forwarding the message through the first port, the method further includes: editing the message through the MAC chip according to the local target next hop information.

[0016] In a possible implementation manner, the editing the message by the MAC chip includes: updating the next hop information in the message to the local target next hop information by the MAC chip.

[0017] In combination with the first aspect and the above-mentioned possible implementation methods, in another possible implementation method, a third line card is also provided in the data communication device. Before determining the global target next hop information corresponding to the received message based on the first information stored in the first line card, the method also includes: receiving the message through the third line card in the data communication device; and transmitting the message from the third line card to the first line card.

[0018] In a possible implementation, a field programmable gate array (FPGA) chip is provided on the first line card, and the first information is stored on the FPGA chip.

[0019] In combination with the first aspect and the above-mentioned possible implementation methods, in another possible implementation method, at least two fourth line cards are provided in the data communication device, the first line card is a line card among the at least two fourth line cards in the data communication device, and each of the fourth line cards includes one of the FPGA chips.

[0020] In combination with the first aspect and the above-mentioned possible implementation methods, in another possible implementation method, the data communication device also includes an aggregation port AP, which is respectively connected to the at least two fourth line cards; before determining the global target next hop information corresponding to the received message based on the first information stored in the first line card, the method also includes: determining the first line card from the at least two fourth line cards based on the message characteristics of the message; and transmitting the message to the FPGA chip of the first line card through the AP.

[0021] According to a second aspect of an embodiment of the present application, a data communication device is provided, including a first line card and a second line card. The data communication device further includes:

[0022] a determining unit configured to determine, based on first information stored in the first line card, global target next hop information corresponding to the received message, wherein the first information is used to indicate global next hop information of forwardable terminals corresponding to the first line card and the second line card in the data communication device, the global next hop information including the global target next hop information;

[0023] The determining unit is further configured to determine a second line card corresponding to the message according to the global target next hop information, wherein the second line card stores local target next hop information corresponding to the global target next hop information; and

[0024] The processing unit is configured to transmit the message to the second line card for forwarding.

[0025] In one possible implementation, the determination unit is further configured to determine the local target next hop information and the second line card corresponding to the global target next hop information based on the correspondence between the global next hop information and the local target next hop information stored on the second line card, wherein the local target next hop information corresponds to the second line card; or, it is further configured to determine the second line card corresponding to the message based on the line card tag carried in the global target next hop information.

[0026] In a possible implementation, the processing unit is further configured to transmit the message to the second line card; determine a first port corresponding to the message in the second line card according to the local target next hop information; and forward the message through the first port.

[0027] In combination with the second aspect, in a possible implementation, the global target next hop information includes: address information of the media access control MAC chip in the second line card; and the processing unit is further configured to transmit the message to the MAC chip in the second line card according to the address information.

[0028] In a possible implementation, the processing unit is further configured to edit the message through the MAC chip according to the local target next hop information.

[0029] In a possible implementation manner, the processing unit is further configured to update the next hop information in the message to the local target next hop information through the MAC chip.

[0030] The processing unit is specifically used to transmit the message from the FPGA chip to the MAC chip according to the address information; and edit the message through the MAC chip according to the local target next hop information stored in the MAC chip, determine the first port in the second line card, and forward the edited message through the first port.

[0031] In combination with the second aspect and the above-mentioned possible implementation methods, in another possible implementation method, the data communication device also includes a third line card, a receiving unit and a transmission unit; wherein, the receiving unit is used to receive the message through the third line card in the data communication device before the determination unit determines the global target next hop information corresponding to the received message based on the first information stored in the first line card; and the transmission unit is used to transmit the message from the third line card to the first line card.

[0032] In another possible implementation, a field programmable gate array (FPGA) chip is provided on the first line card, and the first information is stored on the FPGA chip.

[0033] In combination with the second aspect and the above-mentioned possible implementation methods, in another possible implementation method, at least two fourth line cards are provided in the data communication device, the first line card is one of the at least two fourth line cards in the data communication device, and each of the fourth line cards includes one of the FPGA chips.

[0034] In combination with the second aspect and the above-mentioned possible implementation methods, in another possible implementation method, the data communication device also includes an AP, which is respectively connected to the at least two fourth line cards; the determination unit is also used to determine the first line card from the at least two fourth line cards based on the message characteristics of the message before determining the global target next hop information corresponding to the received message based on the first information stored in the first line card; and the transmission unit is used to transmit the message to the FPGA chip of the first line card through the AP.

[0035] For specific implementation methods, reference may be made to the behavior function of the data communication device in the message forwarding method provided in the first aspect or the possible implementation methods of the first aspect.

[0036] According to a third aspect of an embodiment of the present application, a data communication device is provided, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the message forwarding method as described in the first aspect and the possible implementation method of the first aspect is implemented.

[0037] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the message forwarding method as described in the first aspect and its possible implementation method is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0039] FIG1 is a schematic diagram of an Ethernet forwarding structure provided by the related art.

[0040] FIG2 is a schematic diagram of a method for forwarding messages by a switch provided by the related art.

[0041] FIG3 is a schematic diagram of a method for forwarding messages by a router provided by the related art.

[0042] FIG4 is one of the flow charts of a message forwarding method provided in an embodiment of the present application.

[0043] FIG5 is a second flowchart of a message forwarding method provided in an embodiment of the present application.

[0044] FIG6 is a schematic diagram of a message forwarding method provided in an embodiment of the present application.

[0045] FIG7 is a third flowchart of a message forwarding method provided in an embodiment of the present application.

[0046] FIG8 is a fourth flowchart of a message forwarding method provided in an embodiment of the present application.

[0047] FIG9 is a schematic diagram showing the composition of a data communication device provided in an embodiment of the present application.

[0048] FIG10 is a schematic diagram showing the composition of another data communication device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0050] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "first," "second," and the like generally distinguish objects of a class and do not limit the number of objects. For example, the first object may be one or more.

[0051] In this document, the term "and / or" simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the related objects are in an "or" relationship.

[0052] The terms "at least one" and "at least one of" in the specification and claims of this application refer to any one, any two, or a combination of more than two of the objects included. For example, at least one of a, b, and c can be represented by: "a", "b", "c", "a and b", "a and c", "b and c", and "a, b, and c", where a, b, and c can be single or multiple. Similarly, "at least two" means two or more, and its meaning is similar to "at least one".

[0053] The implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0054] Data communication devices such as switches and routers are packet forwarding devices in a network, responsible for selecting packet forwarding paths. For example, in the Ethernet Layer 3 unicast forwarding model, a Layer 3 switch stores a port hardware forwarding table containing IP address and port information. When an Ethernet packet enters the Layer 3 switch, the switch retrieves the destination IP address from the packet and queries the port hardware forwarding table based on the IP prefix in the destination IP address to obtain the port information corresponding to the destination IP address. The switch then forwards the Ethernet packet out of the port indicated by the port information.

[0055] For example, as shown in Figure 1, personal computer (PC) A needs to access PC B. The destination IP address of the Ethernet packet it sends has an IP prefix of 2.1.1.2. The routing table on the Layer 3 switch stores that the port corresponding to the IP prefix 2.1.1.2 is port 2. After determining port 2, the Layer 3 switch will send the Ethernet packet out of port 2 to achieve access to PC B.

[0056] When any terminal, such as terminal 1, accesses the network, a core gateway device (e.g., a switch or router) is required to store the Address Resolution Protocol (ARP) and Neighbor Discovery (ND) entries corresponding to terminal 1. This allows the core gateway device to edit and forward messages using the MAC chip in the core gateway device based on the stored information corresponding to terminal 1. For example, the information corresponding to terminal 1 is shown in Table 1 below.

[0057] Table 1

[0058] Among them, the IP prefix 1.1.1.1 is the prefix of the IP address of the above-mentioned terminal 1; the MAC address 1111.2222.3333 is the MAC address of the terminal 1; Id100 in the adjacency editing information is the identifier of the adjacency editing information, which is used to quickly find the adjacency editing information, port1 is the transmission port corresponding to the terminal 1 in the above-mentioned core gateway device, and the virtual local area network identifier (virtual local area network id, vid) 10 is the virtual local area network identifier corresponding to the terminal 1.

[0059] It should be noted that the core gateway device can determine the line card corresponding to a message through the adjacency editing information (ie, next hop information), complete the editing of the message in the line card, and forward the edited message to the corresponding terminal through the port in the line card.

[0060] However, the terminal scale supported by core gateway devices is highly dependent on the storage performance of the MAC chip. As campuses grow larger, the number of campus terminals also increases, and the host routing capacity of core gateway devices is no longer sufficient to support the large number of campus terminals. If the core gateway device's terminal access target is to support 500,000 terminals, the core gateway device's MAC chip must store 500,000 IP prefixes, 500,000 MAC address information, and 500,000 adjacency edit information. To ensure successful packet forwarding, the MAC chips of all line cards in the core gateway device must store the same IP prefix and adjacency edit information. However, due to the limited storage capacity of the MAC chip, the number of terminals to which packets can be forwarded is limited. For example, assuming that there are multiple line cards in the core gateway device, each line card is equipped with a MAC chip. The MAC chip with the worst performance can store at most 80,000 IP prefixes, 80,000 MAC address information and 80,000 adjacent editing information. Then, in order to ensure that the message can be transmitted to the line card to which the forwarding port corresponding to the message belongs regardless of which line card it enters, so as to edit and forward the message, the MAC chip of each line card in the core gateway device needs to store the same information, that is, the MAC chip of each line card needs to store the 80,000 IP prefixes, the 80,000 MAC address information and the 80,000 adjacent editing information. As a result, the core gateway device can only support 80,000 terminals.

[0061] The following is an illustrative description of a method for forwarding messages by a switch with reference to the accompanying drawings.

[0062] For example, taking the aforementioned switch as a box-type switch, as shown in Figure 2, the box-type switch requires that packets entering the device from any line card in the box-type switch be forwarded through the same path. Therefore, all line cards in the entire device must store the same IP prefix, global next hop information, and MAC address information. If a low-performance line card exists in the box-type switch, the IP prefix, global next hop information, and MAC address information stored by all line cards in the entire device will be the same as the IP prefix, global next hop information, and MAC address information stored by the low-performance line card, thereby reducing the number of forwarding terminals supported by the entire device. As shown in Figure 2, the message entering from line card 1 will complete the search for IP prefix, global next hop information, and MAC address information through the MAC chip of line card 1. If the output port corresponding to the message found based on the IP prefix, global next hop information, and MAC address information is a port in line card 1, then there is no need to go through the Fast Ethernet (FE) card, but the message can be edited directly in line card 1 and forwarded to the corresponding terminal through the port in line card 1. If the output port corresponding to the message found based on the IP prefix, global next hop information, and MAC address information is a port in line card 2, then the message must first be transmitted to line card 2 through the FE card, and then the message must be edited in line card 2 and forwarded to the corresponding terminal through the port in line card 2.

[0063] There are two types of line cards in a router. One type is a standard line card that doesn't utilize FPGA chips to expand IP prefix capacity or improve forwarding performance. Instead, it relies solely on software forwarding within the central processing unit (CPU). (That is, the CPU controls software to forward packets.) The other type is a new type of line card that utilizes FPGA chips for hardware forwarding.

[0064] If the message is transferred from an ordinary line card, it can be forwarded through software. The resource distribution of the line card for software forwarding is no different from that of the above-mentioned switch. As shown in Figure 3, the thin arrow represents the traffic entering from line card a that supports software forwarding. The CPU completes the lookup of the IP prefix, global next hop information, and MAC address information. If the output port corresponding to the message is a port in line card a, the message is edited and forwarded through line card a. If the output port corresponding to the message is a port in another line card, the message needs to be transmitted to the other line card (such as line card b) through the FE card, and then the message is edited and forwarded in line card b. Although the router supports up to 500,000 forwarding terminals, due to the need to rely on CPU software control and the limitations of CPU performance, the forwarding performance of software forwarding is poor, usually below 40G.

[0065] If a packet enters from a new line card, the new line card's FPGA chip can be used for hardware forwarding. As shown in Figure 3, the thick arrow indicates that after a packet enters the device from a new line card, it is first directed to the new line card's FPGA chip. This FPGA chip stores global IP prefix and global next-hop information. The FPGA chip then performs a route lookup. Based on the IP address information carried in the packet, it determines the IP prefix of the desired forwarding destination and then finds the corresponding next-hop information based on this IP prefix. Based on this next-hop information, the line card that should process the packet is then determined and the packet is forwarded to the MAC chip on that line card for packet editing and forwarding. However, to ensure that every packet entering from a new line card is found on the corresponding line card for editing and forwarding, the MAC chips on all line cards in the router must store the same global IP prefix, global next-hop information, and MAC address information. For example, a router's MAC chip can store up to 95,000 IP prefixes, next-hops, and MAC addresses, which means the router can only support a maximum of 95,000 forwarding destinations.

[0066] It can be understood that the global IP prefix may be the IP prefix of all forwardable terminals supported by the router, and the global next hop information may be the next hop information of all forwardable terminals supported by the router.

[0067] Embodiments of the present application provide a message forwarding method, data communication equipment, and storage medium. The message forwarding method provided in the embodiments of the present application can be executed by a message forwarding device, a data communication device, or a functional module within the data communication device. The embodiments of the present application illustrate the message forwarding method provided in the embodiments of the present application by using a data communication device executing the message forwarding method as an example.

[0068] Figure 4 shows a flowchart of a message forwarding method provided in an embodiment of the present application. The message forwarding method provided in an embodiment of the present application is applied to a data communication device including a first line card and a second line card, wherein the first line card may include an FPGA chip. As shown in Figure 4 , the message forwarding method provided in an embodiment of the present application may include the following steps 401 to 403.

[0069] Step 401: A data communication device determines global target next hop information corresponding to a received message based on first information stored in a first line card.

[0070] The first information may indicate global next hop information of forwardable terminals corresponding to all line cards in the data communication device, and the global next hop information of forwardable terminals corresponding to all line cards includes global target next hop information corresponding to the received message.

[0071] In one possible implementation, the first line card includes an FPGA chip, and the first information is stored in the FPGA chip. In one possible implementation, the data communication device may be any device that can edit and forward messages, such as a switch or a router.

[0072] In a possible implementation, the message may be an Ethernet message.

[0073] In a possible implementation, the message may be received from any line card in the data communication device.

[0074] In a possible implementation, the data communication device may include multiple line cards, including the first line card.

[0075] In a possible implementation, each line card in the data communication device may correspond to a group of forwardable terminals, and all line cards in the data communication device correspond to the sum of forwardable terminals, that is, the forwardable terminals supported by the data communication device.

[0076] In a possible implementation, a piece of information in the global next hop information corresponds to a forwardable terminal supported by the data communication device. The first information may indicate all global next hop information corresponding to all forwardable terminals supported by the data communication device.

[0077] It can be understood that the global next hop information indicated by the first information may be the next hop information corresponding to all forwardable terminals supported by the data communication device.

[0078] Those skilled in the art will appreciate that the forwardable terminal may be a terminal for the data communication device to forward messages.

[0079] In one possible implementation, after the above-mentioned data communication device receives the above-mentioned message, the FPGA chip in the first line card can determine the above-mentioned global target next hop information corresponding to the IP prefix from the above-mentioned first information based on the IP prefix in the IP address information in the message.

[0080] Step 402: The data communication device determines the second line card corresponding to the message according to the global target next hop information.

[0081] The second line card stores local target next hop information corresponding to the global target next hop information.

[0082] In a possible implementation, the second line card may be the same as or different from the first line card, that is, the second line card may be the same line card as the first line card, or may be any line card in the data communication device except the first line card.

[0083] In one possible implementation, the second line card stores a plurality of local next-hop information, which may be the next-hop information corresponding to all forwardable terminals supported by the second line card. The plurality of local next-hop information corresponds one-to-one to all forwardable terminals corresponding to the second line card, and the local target next-hop information may be one of the plurality of local next-hop information stored in the second line card.

[0084] .

[0085] In one possible implementation, determining the second line card corresponding to the message based on the global target next hop information includes: determining the local target next hop information and the second line card corresponding to the global target next hop information based on the correspondence between the global next hop information and the local target next hop information stored on the second line card, wherein the local target next hop information corresponds to the second line card; or determining the second line card corresponding to the message based on the line card tag carried in the global target next hop information.

[0086] The following is an exemplary description of a specific method for the data communication device to determine the second line card.

[0087] For example, assuming that the data communication equipment includes line card 1, line card 2, line card 3 and line card 4, each line card can only store 10,000 local next hop information (that is, support 10,000 forwardable terminals). If the index of the global next hop information in the data communication equipment is arranged in the order of line card 1, line card 2, line card 3 and line card 4, then 40,000 global next hop information can be stored in the above-mentioned FPGA chip. Among them, the global next hop information with an index of 1 in the FPGA chip (i.e., the first global next hop information) corresponds to the local next hop information with an index of 1 in line card 1; the global next hop information with an index of 10001 in the FPGA chip (i.e., the 10001th global next hop information) corresponds to the local next hop information with an index of 1 in line card 2; the global next hop information with an index of 20001 in the FPGA chip (i.e., the 20001th global next hop information) corresponds to the local next hop information with an index of 1 in line card 3; the global next hop information with an index of 30001 in the FPGA chip (i.e., the 30001th global next hop information) corresponds to the local next hop information with an index of 1 in line card 4.

[0088] It can be seen that through the correspondence between the global next hop information and the local next hop information, the data communication device can determine the local target next hop information corresponding to the global target next hop information and the second line card to which the local target next hop information belongs based on the global target next hop information.

[0089] As another example, assume that the data communication device includes line cards 1 and 2, and each line card can only store 10,000 pieces of local next hop information. In this case, the FPGA chip can store 20,000 pieces of global next hop information. Each piece of global next hop information can include a line card index. For example, the global next hop information "global next hop information ID: 100; port: 1; vid: 10; line card ID: 1" in the FPGA chip corresponds to the local next hop information "local next hop information ID: 100; port: 1; vid: 10" in line card 1. The global next hop information "global next hop information ID: 500; port: 1; vid: 10; line card ID: 2" in the FPGA chip corresponds to the local next hop information "local next hop information ID: 500; port: 1; vid: 10" in line card 2, and so on. In this way, the data communication device can directly identify the second line card based on the line card ID in the global next hop information.

[0090] Step 403: The data communication device transmits the message to the second line card for forwarding.

[0091] In a possible implementation, step 403 may include: transmitting the message to the second line card; determining a first port corresponding to the message in the second line card according to the local target next hop information; and forwarding the message through the first port.

[0092] In a possible implementation, the global target next hop information includes: address information of the MAC chip in the second line card. For example, in conjunction with Figure 4 , as shown in Figure 5 , the step 403 can be implemented through the following steps 403a and 403b.

[0093] Step 403a: The data communication device transmits the message from the first line card to the MAC chip of the second line card according to the address information.

[0094] The MAC chip is the MAC chip in the second line card, and the address information is the address information of the MAC chip.

[0095] In a possible implementation, each line card in the above data communication device includes a MAC chip.

[0096] In a possible implementation, the MAC chips included in any two line cards in the above data communication device may be the same or different.

[0097] Step 403b: The data communication device edits the message through the MAC chip according to the local target next hop information stored in the MAC chip, determines the first port in the second line card, and forwards the edited message through the first port.

[0098] In a possible implementation, the first port is a port corresponding to the terminal to which the message needs to be forwarded.

[0099] In a possible implementation, each line card in the above data communication device includes multiple ports, and each port corresponds to a forwardable terminal.

[0100] In a possible implementation, the data communication device may update the information in the next hop field in the message to the local target next hop information to complete editing of the message, so that the message can be redirected to the next hop device indicated by the local target next hop information.

[0101] For example, as shown in FIG6 , when a message enters line card A (i.e., the first line card described above), the data communication device can first determine the global target next hop information corresponding to the message from multiple global next hop information stored in the FPGA of the data communication device based on the first information stored in the FPGA chip of line card A. Then, based on the global target next hop information, the corresponding second line card is determined to be line card C. Furthermore, based on the address information of the MAC chip of line card C (i.e., the second line card described above) in the global target next hop information, the FPGA chip can transmit the message and the local target next hop information of line card C corresponding to the global target next hop information to the MAC chip of line card C via the FE card. Finally, the MAC chip can edit the message based on the local target next hop information and, after determining that the forwarding port corresponding to the message is the first port of line card C based on the local target next hop information, forward the edited message to the corresponding terminal via the first port. Of course, line card A may not send the local target next hop information of line card C directly to line card C, but instead send the index of the local target next hop information in all local next hop information stored in line card C, so that the MAC chip can quickly determine the local target next hop information stored by the MAC chip itself according to the index, and edit the above-mentioned message based on the local target next hop information, and after determining that the forwarding port corresponding to the message is the first port of line card C according to the local target next hop information, forward the edited message to the corresponding terminal through the first port.

[0102] In an embodiment of the present application, since the data communication device can accurately transmit the message to the MAC chip based on the address information of the MAC chip in the above-mentioned second line card in the above-mentioned global target next hop information, and edit and forward the message through the MAC chip based on the above-mentioned local target next hop information stored in the MAC chip, therefore, in this embodiment, the local IP prefix and local next hop information stored in any two line cards in the data communication device except the first line card (global next hop information is stored on the first line card) can be different, so that the terminal scale supported by the data communication device can be the effect of superposition of the terminal scale supported by multiple line cards, thereby improving the terminal scale that the data communication device can support.

[0103] In the message forwarding method provided in the embodiment of the present application, since the global target next hop information corresponding to the received message can be determined first based on the global next hop information of the forwardable terminals corresponding to all line cards in the data communication device stored in the FPGA chip, and then the second line card storing the local target next hop information corresponding to the global target next hop information is determined based on the global target next hop information, and the message is transmitted to the second line card for editing and forwarding, even if the local next hop information stored in each line card in the data communication device is different, the editing and forwarding of the message can also be completed accurately, thereby achieving the effect that the terminal specifications supported by the data communication device can be the superposition of the terminal specifications supported by multiple line cards, which can greatly improve the terminal scale that the data communication device can support.

[0104] It should be noted that in addition to using an FPGA chip to store the global next-hop information of all forwardable terminals corresponding to line cards, other large-scale storage chips or modules can also be used to store global next-hop information. This application does not impose any restrictions on this. In one possible implementation, as shown in Figure 7 in conjunction with Figure 4, before the above step 401, the message forwarding method provided in this embodiment of the application can also include the following steps 404 and 405.

[0105] Step 404: The data communication device receives a message through a third line card in the data communication device.

[0106] In a possible implementation, the third line card may be any line card in the data communication device.

[0107] Step 405: The data communication device transmits the message from the third line card to the first line card.

[0108] In a possible implementation, the data communication device may transmit the message from the third line card to the FE card, and then transmit the message to the FPGA chip in the first line card through the FE card.

[0109] In an embodiment of the present application, since the above-mentioned message will be directed to the above-mentioned FPGA chip regardless of which line card it is received from, there is no need to query the line card that receives the message, but the query can be performed through the FPGA chip that stores all forwardable terminal information, thereby improving the forwarding capability of the data communication equipment.

[0110] In a possible implementation, at least two fourth line cards are provided in the data communication device, the first line card is one of the at least two fourth line cards in the data communication device, and each fourth line card includes an FPGA chip.

[0111] In an embodiment of the present application, since the above-mentioned first line card can be one of the at least two fourth line cards in the above-mentioned data communication equipment that include an FPGA chip, that is, the data communication equipment can include multiple line cards of the same type as the above-mentioned first line card, multiple messages can be processed simultaneously through the multiple fourth line cards, thereby avoiding message queuing caused by only one FPGA chip performing message forwarding, thereby expanding the forwarding bandwidth of the entire machine.

[0112] In one possible implementation, the first line card is one of the at least two fourth line cards, and the data communication device may further include an AP port, each of which is connected to the at least two fourth line cards. For example, in conjunction with FIG4 , as shown in FIG8 , before step 401, the message forwarding method provided in this embodiment of the present application may further include steps 406 and 407.

[0113] Step 406: The data communication device determines the first line card from the at least two fourth line cards based on message characteristics of the message. In one possible implementation, the message characteristics may include at least one of the following: a hardware interface type required by the message sender, a protocol address type required to be mapped by the message sender, a hardware address length, a protocol length, a message type, a MAC address of the message sender, an IP address of the message sender, a MAC address of the message receiver, an IP address of the message receiver, etc.

[0114] For example, taking the above-mentioned message characteristics including the above-mentioned message type as an example, each of the above-mentioned at least two fourth line cards can be preset as a line card for forwarding messages of a certain message type. After receiving the above-mentioned message, the above-mentioned data communication equipment can determine the line card corresponding to the message type of the message among the at least two fourth line cards as the above-mentioned first line card according to the message type of the message.

[0115] For another example, assuming the message characteristics include the message recipient's IP address, each of the at least two fourth line cards may correspond to a preset IP address list, which is a list of IP addresses excluding the IP address prefixes of the forwardable terminals corresponding to all of the line cards. After receiving the message, the data communication device may determine the IP address list to which the IP address belongs based on the message recipient's IP address, and then determine the line card among the at least two fourth line cards that corresponds to the IP address list as the first line card. For example, in addition to storing the global next-hop information of the forwardable terminals corresponding to all line cards in the data communication device, each fourth line card may also be configured with a preset IP address list. For example, line card 1 may configure a preset IP address list of a to b, and line card 2 may configure a preset IP address list of c to d. If the destination IP address of a message received by the data communication device is a, the message will be directed to line card 1 for processing, thereby achieving balanced traffic diversion.

[0116] In a possible implementation, the data communication device may further determine, based on the line card to which the ingress port of the message belongs, a line card among the at least two fourth line cards that is physically closest to the line card as the first line card.

[0117] Step 407: The data communication device transmits the message to the first line card through the AP port.

[0118] In one possible implementation, multiple physical ports can be bundled together to form a logical port to expand link bandwidth and provide greater connectivity. This logical port can be referred to as an Aggregate Port (AP). Typically, an AP port can include a Registered Jack (RJ) 45 interface. Each of the at least two fourth line cards can be configured as a member port of the AP port (i.e., a physical port in the logical port). Each of the at least two fourth line cards can be connected to a member port of the AP port via an interface of the line card, thereby transmitting a message to a corresponding fourth line card via the AP port.

[0119] In one possible implementation, the AP port is respectively connected to the at least two fourth line cards, that is, the at least two fourth line cards can be configured as a member port of the AP port; when a message is directed to the AP port, the AP port can determine which fourth line card to assign the message to for processing, thereby achieving balanced traffic diversion.

[0120] In an embodiment of the present application, since the above-mentioned data communication equipment includes multiple line cards carrying FPGA chips, the above-mentioned message can be diverted to the above-mentioned AP port, and then the above-mentioned first line card is determined from the multiple line cards according to the message characteristics of the message, and then the message is transmitted to the first line card through the AP port, so that balanced diversion to different FPGA chips for processing can be achieved, thereby improving the flexibility of message processing.

[0121] The embodiment of the present application can divide the functional modules of the above-mentioned data communication device according to the above-mentioned method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. In actual implementation, there may be other division methods.

[0122] FIG9 shows a possible schematic diagram of the structure of the data communication device involved in the above embodiment, where the functional modules are divided according to their functions. The data communication device includes a first line card and a second line card. As shown in FIG9 , the data communication device 90 may include a determination unit 91 and a processing unit 92.

[0123] The determination unit 91 can be used to determine the global target next hop information corresponding to the received message based on the first information stored in the above-mentioned first line card, wherein the first information includes the global next hop information of the forwarding terminal corresponding to the first line card and the second line card in the data communication equipment 90, and the global next hop information includes the global target next hop information.

[0124] The determining unit 91 may be further configured to determine a second line card corresponding to the message according to the global target next hop information, where the second line card stores local target next hop information corresponding to the global target next hop information.

[0125] The processing unit 92 may be configured to transmit the message to the second line card for editing and forwarding.

[0126] In one possible implementation, the global target next hop information may include address information of a MAC chip in the second line card. For example, processing unit 92 may be configured to transmit the message from the first line card to the MAC chip based on the address information; edit the message via the MAC chip based on the local target next hop information stored in the MAC chip; determine a first port in the second line card; and forward the edited message via the first port.

[0127] In one possible implementation, the data communication device 90 may further include a receiving unit and a transmitting unit. The receiving unit may be configured to receive the message via a third line card in the data communication device 90 before the determining unit 91 determines the global target next hop information corresponding to the received message based on the first information stored in the first line card. The transmitting unit may be configured to transmit the message from the third line card to the first line card.

[0128] In a possible implementation, the first line card is provided with a field programmable gate array (FPGA) chip, and the first information is stored in the FPGA chip.

[0129] In a possible implementation, at least two fourth line cards are provided in the data communication device. The first line card may be a line card among the at least two fourth line cards in the data communication device 90 . Each fourth line card includes an FPGA chip.

[0130] In one possible implementation, the data communication device 90 may further include an AP port, each of which is connected to the at least two fourth line cards. The determination unit 91 may also be configured to determine the first line card from the at least two fourth line cards based on message characteristics before determining the global target next hop information corresponding to the received message based on the first information stored in the first line card. The transmission unit may be configured to transmit the message to the FPGA chip of the first line card via the AP port.

[0131] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0132] It should be noted that the specific working process of each functional module in the data communication device provided in the embodiment of the present application can refer to the specific description of the corresponding process in the method embodiment, and the embodiment of the present application will not be described in detail here. The data communication device provided in the embodiment of the present application is used to execute the above-mentioned message forwarding method, and thus can achieve the same effect as the above-mentioned message forwarding method.

[0133] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0134] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0135] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0136] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0137] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0138] As shown in Figure 10, an embodiment of the present application also provides a data communication device 100, including a processor 101 and a memory 102, and the memory 102 stores a program or instruction that can be run on the processor 101. When the program or instruction is executed by the processor 101, it implements the various steps of the above-mentioned message forwarding method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0139] An embodiment of the present application also provides a readable storage medium, which stores a program or instruction. When the program or instruction is executed by the processor, the various processes of the above-mentioned message forwarding method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0140] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A message forwarding method, applied to a data communication device comprising a first line card and a second line card, wherein: The method comprises: Determine, according to the first information stored in the first line card, the global target next hop information corresponding to the received message, wherein the first information is used to indicate the global next hop information of the forwardable terminal corresponding to the first line card and the second line card in the data communication device, and the global next hop information includes the global target next hop information; Determining a second line card corresponding to the message according to the global target next hop information, wherein the second line card stores local target next hop information corresponding to the global target next hop information; and The message is transmitted to the second line card for forwarding.

2. The method according to claim 1, wherein: The determining, according to the global target next hop information, a second line card corresponding to the message includes: Determine the local target next hop information and the second line card corresponding to the global target next hop information according to the correspondence between the global next hop information and the local target next hop information stored on the second line card, wherein the local target next hop information corresponds to the second line card; or The second line card corresponding to the message is determined according to the line card tag carried in the global target next hop information.

3. The method according to claim 1, wherein: The transmitting the message to the second line card for forwarding includes: transmitting the message to the second line card; Determine the first port corresponding to the message in the second line card according to the local target next hop information; and The message is forwarded through the first port.

4. The method according to claim 3, wherein: The global target next hop information includes address information of a media access control MAC chip in the second line card; The transmitting the message to the second line card includes: transmitting the message to the MAC chip in the second line card according to the address information.

5. The method according to claim 4, wherein: Before forwarding the message through the first port, the method further includes: The message is edited through the MAC chip according to the local target next hop information.

6. The method according to claim 5, wherein: The editing of the message by the MAC chip includes: The next hop information in the message is updated to the local target next hop information through the MAC chip.

7. The method according to any one of claims 3 to 6, wherein: Before determining the first port corresponding to the message in the second line card according to the local target next hop information, the method further includes: Determine the local target next hop information according to the global target next hop information of the first line card, and transmit the local target next hop information to the second line card; or, An index corresponding to the local target next hop information is determined according to the global target next hop information of the first line card, and the index is transmitted to the second line card, wherein the index is used by the second line card to determine the local target next hop information stored in the MAC chip.

8. The method according to any one of claims 1 to 7, wherein: The data communication device is further provided with a third line card. Before determining the global target next hop information corresponding to the received message according to the first information stored in the first line card, the method further includes: Receiving the message through the third line card in the data communication device; and The message is transmitted from the third line card to the first line card.

9. The method according to any one of claims 1 to 8, wherein: The first line card is provided with a field programmable gate array (FPGA) chip, and the first information is stored in the FPGA chip.

10. The method according to claim 9, wherein: At least two fourth line cards are arranged in the data communication device, the first line card is one of the at least two fourth line cards, and each of the fourth line cards includes one FPGA chip.

11. The method according to claim 10, wherein: Before determining the global target next hop information corresponding to the received message according to the first information stored in the first line card, the method further includes: determining the first line card from the at least two fourth line cards according to a message feature of the message; and The message is transmitted to the FPGA chip of the first line card.

12. The method according to claim 10, wherein: The data communication device further comprises an aggregation port AP, wherein the AP is respectively connected to the at least two fourth line cards; The transmitting the message to the FPGA chip of the first line card includes: transmitting the message to the FPGA chip of the first line card through the AP.

13. A data communication device, comprising a first line card and a second line card, wherein: The data communication device further comprises: A determining unit is configured to determine the global target next hop information corresponding to the received message according to the first information stored in the first line card, wherein the first information is used to indicate the first in the data communication device global next hop information of the forwardable terminals corresponding to the line card and the second line card, the global next hop information including the global target next hop information; The determining unit is further configured to determine a second line card corresponding to the message according to the global target next hop information, wherein the second line card stores local target next hop information corresponding to the global target next hop information; and The processing unit is configured to transmit the message to the second line card for forwarding.

14. The data communication device according to claim 13, wherein: The determination unit is further configured to determine the local target next hop information and the second line card corresponding to the global target next hop information according to the correspondence between the global next hop information and the local target next hop information stored on the second line card, wherein the local target next hop information corresponds to the second line card; or is further configured to determine the second line card corresponding to the message according to the line card tag carried in the global target next hop information.

15. The data communication device according to claim 13, wherein: The processing unit is further configured to transmit the message to the second line card; determine a first port corresponding to the message in the second line card according to the local target next hop information; and forward the message through the first port.

16. The data communication device according to claim 15, wherein: The global target next hop information includes address information of a media access control MAC chip in the second line card; and, The processing unit is further configured to transmit the message to the MAC chip in the second line card according to the address information.

17. The data communication device according to claim 16, wherein: The processing unit is further configured to edit the message through the MAC chip according to the local target next hop information.

18. The data communication device according to claim 17, wherein: The processing unit is further configured to update the next hop information in the message to the local target next hop information through the MAC chip.

19. The data communication device according to any one of claims 13 to 18, wherein: The data communication device is also provided with a third line card, a receiving unit and a transmission unit; wherein, The receiving unit is configured to receive the message through the third line card in the data communication device; and The transmission unit is configured to transmit the message from the third line card to the first line card.

20. A data communication device, comprising a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the message forwarding method according to any one of claims 1 to 12 is implemented.

21. A computer-readable storage medium, wherein a program or instruction is stored on the storage medium, and when the program or instruction is executed by a processor, the message forwarding method according to any one of claims 1 to 12 is implemented.

Citation Information

Patent Citations

  • Unicast message intercommunication method and device between Dune switching wire clamping board and flexible wire clamping board

    CN106302264A

  • Multicast message sending method, related device and network equipment

    CN111786890A

  • Message forwarding method and device, line card and storage medium

    CN113852547A

  • Message forwarding method and electronic equipment

    CN116886602A

  • Gateway device network connectivity response method and device

    WO2017000790A1