Message forwarding equipment and method, communication device and network system

文档序号:1878260 发布日期:2021-11-23 浏览:27次 中文

阅读说明:本技术 一种报文转发设备和方法、通信装置及网络系统 (Message forwarding equipment and method, communication device and network system ) 是由 任江兴 喻径舟 王临春 亚利克斯·塔尔 于 2020-05-19 设计创作,主要内容包括:本申请实施例涉及一种报文转发设备和方法、通信装置以及网络系统。报文转发设备接收的第一报文包括报文数据和标识本地设备出接口的第一标识信息。报文转发设备包括对第一报文进行上行转发处理的上行模块、根据第一标识信息对第一报文进行调度和/或交换的交换模块及根据第一报文获取封装信息的下行模块。上行模块、交换模块和下行模块中两者或三者为并行处理,第一报文经上行模块、交换模块和下行模块处理后获得第二报文。报文转发设备还包括根据封装信息编辑第二报文获得第三报文并将第三报文通过本地设备出接口发给第N跳设备的编辑和发送模块。本申请实施例的报文转发设备和方法、通信装置以及网络系统,提高了并行度,降低了时延。(The embodiment of the application relates to message forwarding equipment and method, a communication device and a network system. The first message received by the message forwarding device includes message data and first identification information for identifying the output interface of the local device. The message forwarding device comprises an uplink module for performing uplink forwarding processing on the first message, a switching module for scheduling and/or switching the first message according to the first identification information, and a downlink module for acquiring encapsulation information according to the first message. Two or three of the uplink module, the switching module and the downlink module are processed in parallel, and the first message is processed by the uplink module, the switching module and the downlink module to obtain a second message. The message forwarding equipment also comprises an editing and sending module which edits the second message according to the encapsulation information to obtain a third message and sends the third message to the Nth hop equipment through the local equipment output interface. The message forwarding equipment and method, the communication device and the network system in the embodiment of the application improve the parallelism and reduce the time delay.)

1. A message forwarding device, wherein a first message received by the message forwarding device includes first identification information and message data, where the first identification information is used to identify an output interface of a local device, and the message forwarding device includes:

the uplink module is used for carrying out uplink forwarding processing on the first message;

the switching module is used for scheduling and/or switching the first message according to the first identification information;

a downlink module, configured to query a package information table according to the first packet to obtain package information;

two or three of the uplink module, the switching module and the downlink module are processed in parallel, and the first message is processed by the uplink module, the switching module and the downlink module to obtain a second message;

and the editing and sending module is used for editing the second message according to the encapsulation information to obtain a third message, and sending the third message to the nth hop device through the local device output interface identified by the first identification information, wherein the third message comprises the message data, N is a positive integer and is not less than 1.

2. The message forwarding device according to claim 1, wherein the switching module, the downlink module, and the editing and sending module are sequentially connected in series, wherein:

the uplink module is connected with the exchange module and the downlink module in parallel, and the uplink module is connected with the editing and sending module in series; or

The uplink module is connected with the switching module in parallel, and the uplink module is sequentially connected with the downlink module and the editing and sending module in series; or

The switching module, the uplink module and the editing and sending module are sequentially connected in series, and the uplink module is connected with the downlink module in parallel.

3. The message forwarding device of claim 1, wherein the upstream module, the downstream module, and the editing and sending module are connected in series, wherein:

the exchange module is connected with the uplink module and the downlink module in parallel, and the exchange module is sequentially connected with the editing and sending module in series; or

The uplink module, the exchange module and the editing and sending module are sequentially connected in series, and the exchange module is connected with the downlink module in parallel.

4. The message forwarding device according to claim 1, wherein the upstream module, the switching module, and the editing and sending module are sequentially connected in series, the downstream module is connected in parallel with both the upstream module and the switching module, and the downstream module is connected in series with the editing and sending module.

5. The message forwarding device according to claim 1, wherein the upstream module, the downstream module and the switching module are connected in parallel, the upstream module is connected in series with the editing and sending module, the downstream module is connected in series with the editing and sending module, and the switching module is connected in series with the editing and sending module.

6. The message forwarding device according to any one of claims 1 to 5, wherein the uplink module performs uplink forwarding processing on the first message, and includes: the first message also comprises first target information, and the uplink module queries a forwarding information table according to the first target information to acquire second identification information to complete uplink forwarding processing;

the editing and sending module edits the second message according to the encapsulation information to obtain a third message, and the method comprises the following steps: carrying the second identification information in the third message;

the second identification information is used for identifying an output interface of an nth hop device, so that the nth hop device can edit the received third message and then forward the third message from the output interface of the nth hop device identified by the second identification information in the third message.

7. The message forwarding device of claim 6, wherein:

the first destination information comprises a destination Media Access Control (MAC) address, and the forwarding information table comprises a MAC table; or the like, or, alternatively,

the first destination information comprises a destination internet protocol, IP, address and the forwarding information table comprises a routing table.

8. The message forwarding device according to claim 6 or 7, wherein the first message further includes second destination information, and the second destination information is used for the nth hop device identification, so that the nth hop device edits the received third message and forwards the third message from the nth hop device outgoing interface identified by the second identification information.

9. The message forwarding device of claim 8, wherein the second destination information comprises one or more of the following information: a destination Internet Protocol (IP) address, a destination Media Access Control (MAC) address and a device identifier of the Nth hop device.

10. The message forwarding device according to any one of claims 6 to 9, wherein when N is greater than or equal to 2, the first message further includes one or more third identification information, the one or more third identification information is used to identify an outgoing interface of one or more intermediate devices between the local device and the nth hop device, and the third identification information corresponds to the outgoing interface of the intermediate device one to one.

11. The message forwarding device according to any one of claims 6 to 10, wherein the second identification information is one or more, the one or more second identification information are used to identify one or more egress interfaces of the nth hop device, respectively, and the second identification information corresponds to the egress interfaces of the nth hop device in a one-to-one manner.

12. The message forwarding device according to any one of claims 1-11, wherein the encapsulation information table comprises an address resolution protocol, ARP, table, and the downlink module queries the address resolution protocol, ARP, table according to the destination internet protocol, IP, address of the first message and the first identification information to obtain the encapsulation information.

13. The message forwarding device according to any one of claims 1 to 11, wherein the first message further includes first index information, and the downlink module queries the encapsulation information table according to the first index information to obtain the encapsulation information.

14. The message forwarding device according to any one of claims 1 to 13, wherein the uplink module performs uplink forwarding processing on the first message, and includes: the uplink module queries the forwarding information table according to the first target information of the first message to obtain second index information;

the editing and sending module edits the second message according to the encapsulation information to obtain a third message, and the method comprises the following steps: carrying the second index information in the third message;

the second index information is used for a downlink module of the nth hop device to obtain corresponding encapsulation information, so that the nth hop device can search for the corresponding encapsulation information according to the second index information in the received third message.

15. A network system comprising a message forwarding device according to any one of claims 1 to 14 and an nth hop device.

16. A message forwarding method is characterized in that the message forwarding method is used for forwarding a first message, the first message includes first identification information and message data, wherein the first identification information is used for identifying an output interface of a local device, and the message forwarding method includes:

carrying out uplink forwarding processing on the first message;

scheduling and/or exchanging the first message according to the first identification information;

inquiring a packaging information table according to the first message to acquire packaging information;

two or three of the steps of uplink forwarding processing, scheduling and/or exchanging and obtaining encapsulation information are processed in parallel, and the first message is processed by the uplink forwarding processing, scheduling and/or exchanging and obtaining encapsulation information to obtain a second message;

and editing the second message according to the encapsulation information to obtain a third message, and sending the third message to an Nth hop device through the local device output interface identified by the first identification information, wherein the third message comprises the message data, N is a positive integer, and N is not less than 1.

17. The message forwarding method according to claim 16, wherein the performing the uplink forwarding processing on the first message includes: the first message also comprises first target information, and a forwarding information table is inquired according to the first target information to obtain second identification information to complete uplink forwarding processing;

the editing the second message according to the encapsulation information to obtain a third message includes: carrying the second identification information in the third message;

the second identification information is used for identifying an output interface of an nth hop device, so that the nth hop device can edit the received third message and then forward the third message from the output interface of the nth hop device identified by the second identification information in the third message.

18. The message forwarding method according to claim 17, wherein:

the first destination information comprises a destination Media Access Control (MAC) address, and the forwarding information table comprises a MAC table; or

The first destination information comprises a destination internet protocol, IP, address and the forwarding information table comprises a routing table.

19. The message forwarding method according to any of claims 16-18, wherein the message forwarding method comprises: and judging whether the first target information of the first message belongs to local equipment, and sending the third message to the Nth hop equipment from the local equipment output interface under the condition that the judgment result is yes.

20. The message forwarding method according to claim 19, wherein the determining whether the first destination information belongs to a local device comprises: the first destination information also comprises a local device identifier, and whether the local device identifier belongs to the local device is judged.

21. The packet forwarding method according to any of claims 16-20, wherein the obtaining encapsulation information according to the first packet query encapsulation information table comprises:

inquiring an ARP table according to the destination Internet Protocol (IP) address of the first message and the first identification information to acquire the encapsulation information; or

The first message also comprises first index information, and the encapsulation information is obtained by inquiring the encapsulation information table according to the first index information.

22. The message forwarding method according to any one of claims 16 to 20, wherein the performing the uplink forwarding processing on the first message includes: inquiring a forwarding information table according to the first target information of the first message to obtain second index information;

the editing the second message according to the encapsulation information to obtain a third message includes: carrying the second index information in the third message;

the second index information is used for the nth hop device to obtain the encapsulation information, so that the nth hop device can search for corresponding encapsulation information according to the second index information in the received third message.

23. A message forwarding device is characterized by comprising a processor, a memory and a transceiver;

the transceiver is used for receiving signals and/or transmitting signals;

the memory for storing computer code;

the processor configured to execute the computer code to cause the message forwarding device to perform the method according to any of claims 16-22.

24. A communication device comprising a processor and interface circuitry;

the interface circuit is used for receiving computer execution instructions and transmitting the computer execution instructions to the processor; the processor executes the computer-executable instructions to perform the method of any of claims 16-22.

25. A communication device comprising a processor and a memory;

the memory is used for storing computer execution instructions;

the processor is configured to execute computer-executable instructions stored by the memory to cause the communication device to perform the method of any of claims 16-22.

26. A computer-readable storage medium for storing computer-executable instructions that, when executed, cause the method of any one of claims 16-22 to be implemented.

Technical Field

The present application relates to the field of communications technologies, and in particular, to a message forwarding apparatus and method, a communication device, and a network system.

Background

The low delay is a core requirement of the Network, a Data Center Network (DCN) has a very high requirement on the low delay, and the delay requirement of a single forwarding chip is controlled within a set time. Low latency will also become the core competitiveness of next generation forwarding chips. In the prior art, the forwarding chip adopts a serial pipeline structure, so that the time delay is long, and the message transmission efficiency is not favorably improved.

Disclosure of Invention

The present application provides a message forwarding apparatus and method, a communication device, and a network system, to overcome the above problems in the prior art, so as to improve the parallelism and reduce the time delay.

Therefore, the embodiment of the application adopts the following technical scheme:

in a first aspect, a first packet received by a packet forwarding device includes first identification information and packet data, where the first identification information is used to identify an egress interface of a local device, and the packet forwarding device includes: the uplink module is used for carrying out uplink forwarding processing on the first message; the switching module is used for scheduling and/or switching the first message according to the first identification information; the downlink module is used for inquiring the encapsulation information table according to the first message to obtain encapsulation information; two or three of the uplink module, the switching module and the downlink module are processed in parallel, and the first message is processed by the uplink module, the switching module and the downlink module to obtain a second message; and the editing and sending module is used for editing the second message according to the encapsulation information to obtain a third message, and sending the third message to the Nth hop device through the local device output interface identified by the first identification information, wherein the third message comprises message data, N is a positive integer and is not less than 1.

Optionally, the switching module, the downlink module, and the editing and sending module are sequentially connected in series, wherein: the uplink module is connected with the exchange module and the downlink module in parallel, and the uplink module is connected with the editing and sending module in series; or the uplink module is connected with the switching module in parallel, and the uplink module is sequentially connected with the downlink module and the editing and sending module in series; or the exchange module, the uplink module and the editing and sending module are sequentially connected in series, and the uplink module is connected with the downlink module in parallel.

Optionally, the uplink module, the downlink module, and the editing and sending module are connected in series, wherein: the switching module is connected with the uplink module and the downlink module in parallel, and the switching module is sequentially connected with the editing and sending module in series; or the uplink module, the exchange module and the editing and sending module are sequentially connected in series, and the exchange module is connected with the downlink module in parallel.

Optionally, the uplink module, the switching module, and the editing and sending module are sequentially connected in series, the downlink module is connected in parallel with both the uplink module and the switching module, and the downlink module is connected in series with the editing and sending module.

Optionally, the uplink module, the downlink module and the switching module are connected in parallel, the uplink module is connected in series with the editing and sending module, the downlink module is connected in series with the editing and sending module, and the switching module is connected in series with the editing and sending module.

Optionally, the uplink module performs uplink forwarding processing on the first packet, including: the uplink module queries a forwarding information table according to the first target information to acquire second identification information to complete uplink forwarding processing; the editing and sending module edits the second message according to the encapsulation information to obtain a third message, and the method comprises the following steps: carrying the second identification information in a third message; the second identification information is used for identifying an output interface of the nth hop device, so that the nth hop device can edit the received third message and then forward the third message from the output interface of the nth hop device identified by the second identification information in the third message.

Optionally, the first destination information includes a destination media access control MAC address, and the forwarding information table includes a media access control MAC table; or, the first destination information includes a destination internet protocol, IP, address and the forwarding information table includes a routing table.

Optionally, the first packet further includes second destination information, where the second destination information is used for identifying an nth hop device, so that the nth hop device edits the received third packet and forwards the third packet from an nth hop device output interface identified by the second identification information.

Optionally, the second purpose information comprises one or more of the following information: a destination Internet Protocol (IP) address, a destination Media Access Control (MAC) address and an equipment identifier of the Nth hop equipment.

Optionally, when N is greater than or equal to 2, the first packet further includes one or more third identification information, the one or more third identification information is used to identify an outgoing interface of one or more intermediate devices between the local device and the nth hop device, and the third identification information corresponds to the outgoing interface of the intermediate device one to one.

Optionally, the second identification information is one or more, the one or more second identification information are used to identify one or more N-th hop device outgoing interfaces respectively, and the second identification information corresponds to the N-th hop device outgoing interfaces in a one-to-one manner.

Optionally, the encapsulation information table includes an address resolution protocol ARP table, and the downlink module queries the address resolution protocol ARP table according to the destination internet protocol IP address of the first packet and the first identification information to obtain the encapsulation information.

Optionally, the first packet further includes first index information, and the downlink module queries the encapsulation information table according to the first index information to obtain the encapsulation information.

Optionally, the uplink module performs uplink forwarding processing on the first packet, including: the uplink module queries a forwarding information table according to the first target information of the first message to obtain second index information; the editing and sending module edits the second message according to the encapsulation information to obtain a third message, and the method comprises the following steps: carrying the second index information in a third message; the second index information is used for the downlink module of the nth hop device to obtain corresponding encapsulation information, so that the nth hop device can search for the corresponding encapsulation information according to the second index information in the received third message.

In a second aspect, an embodiment of the present application further provides a network system, including the packet forwarding device and the nth hop device in the first aspect.

In a third aspect, an embodiment of the present application further provides a message forwarding method, where the message forwarding method is configured to forward a first message, where the first message includes first identification information and message data, where the first identification information is used to identify an outgoing interface of a local device, and the message forwarding method includes: carrying out uplink forwarding processing on the first message; scheduling and/or exchanging the first message according to the first identification information; inquiring a packaging information table according to the first message to obtain packaging information; two or three of the steps of uplink forwarding processing, scheduling and/or exchanging and obtaining encapsulation information are processed in parallel, and the first message is processed by the uplink forwarding processing, scheduling and/or exchanging and obtaining encapsulation information to obtain a second message; and editing the second message according to the encapsulation information to obtain a third message, and sending the third message to the Nth hop device through the local device output interface identified by the first identification information, wherein the third message comprises message data, N is a positive integer and is not less than 1.

Optionally, performing uplink forwarding processing on the first packet includes: the first message also comprises first target information, and the forwarding information table is inquired according to the first target information to obtain second identification information to complete uplink forwarding processing; editing the second message according to the encapsulation information to obtain a third message, including: carrying the second identification information in a third message; the second identification information is used for identifying an output interface of the nth hop device, so that the nth hop device can edit the received third message and then forward the third message from the output interface of the nth hop device identified by the second identification information in the third message.

Optionally, the first destination information includes a destination media access control MAC address, and the forwarding information table includes a media access control MAC table; or the first destination information comprises a destination internet protocol, IP, address and the forwarding information table comprises a routing table.

Optionally, the packet forwarding method includes: and judging whether the first target information of the first message belongs to the local equipment, and sending a third message to the Nth hop equipment from the local equipment output interface under the condition that the judgment result is yes.

Optionally, the determining whether the first destination information belongs to the local device includes: the first destination information also comprises a local device identifier, and whether the local device identifier belongs to the local device is judged.

Optionally, querying the encapsulation information table according to the first message to obtain the encapsulation information includes: inquiring an ARP table according to the target IP address of the first message and the first identification information to obtain encapsulation information; or the first message also comprises first index information, and the encapsulation information is obtained by inquiring the encapsulation information table according to the first index information.

Optionally, performing uplink forwarding processing on the first packet includes: inquiring a forwarding information table according to the first target information of the first message to obtain second index information; editing the second message according to the encapsulation information to obtain a third message, including: carrying the second index information in a third message; the second index information is used for the nth hop device to acquire the encapsulation information, so that the nth hop device can search the corresponding encapsulation information according to the second index information in the received third message.

In a fourth aspect, an embodiment of the present application further provides a packet forwarding device, including a processor, a memory, and a transceiver; a transceiver for receiving and/or transmitting signals; a memory for storing computer code; a processor for executing computer code to cause the message forwarding device to perform the method of the third aspect.

In a fifth aspect, an embodiment of the present application further provides a communication apparatus, including a processor and an interface circuit; the interface circuit is used for receiving computer execution instructions and transmitting the instructions to the processor; the processor executes the computer-executable instructions to perform the method of the third aspect described above.

In a sixth aspect, an embodiment of the present application further provides a communication apparatus, including a processor and a memory; the memory is used for storing computer execution instructions; the processor is configured to execute computer-executable instructions stored in the memory to cause the communication device to perform the method of the third aspect.

In a seventh aspect, this application embodiment further provides a computer-readable storage medium, where the computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed, the method of the third aspect is implemented.

In an eighth aspect, the present application further provides a computer program product, where the computer program product includes a computer program, and when the computer program is executed, the method of the third aspect is implemented.

In the above technical solution, the first message received by the message forwarding device includes first identification information and message data, where the first identification information is used to identify the local device output interface, so that two or three of the step of performing uplink forwarding processing on the first message by the uplink module of the message forwarding device, the step of scheduling and/or exchanging the first message by the exchange module according to the first identification information, and the step of acquiring encapsulation information by the downlink module according to the first message query encapsulation information table can be processed simultaneously, that is, parallelism can be improved, thereby effectively reducing latency, improving message transmission speed, and avoiding memory conflict latency from accumulating to the whole, so that table entry duplication is not needed, and further alleviating a memory wall.

Additional features and advantages of the invention will be set forth in the detailed description which follows.

Drawings

The drawings that accompany the detailed description can be briefly described as follows.

Fig. 1 is a schematic view of a scenario in which a message is forwarded between a plurality of message forwarding devices;

fig. 2 is a detailed process diagram of forwarding a message in the scenario shown in fig. 1 in the prior art;

fig. 3 is a schematic structural diagram of a message forwarding device in the prior art;

fig. 4 is a detailed process diagram of forwarding a message in the scenario shown in fig. 1 in the embodiment of the present application;

FIG. 5 is a graph comparing prior art serial processing and parallel processing of an embodiment of the present application;

FIG. 6 is a detailed flow diagram of a prior art serial process and a parallel process of an embodiment of the present application;

fig. 7 is a flowchart of a message forwarding method according to a first embodiment of the present application;

fig. 8 is a flowchart of a message forwarding method according to a second embodiment of the present application;

fig. 9 is a flowchart of a message forwarding method according to a third embodiment of the present application;

fig. 10 is a flowchart of a message forwarding method according to a fourth embodiment of the present application;

fig. 11A to 11D are schematic structural diagrams of a message forwarding device according to a first embodiment of the present application;

fig. 12A and 12B are schematic structural diagrams of a message forwarding device according to a second embodiment of the present application;

fig. 13 is a schematic structural diagram of a message forwarding device according to a third embodiment of the present application;

fig. 14 is a schematic structural diagram of a message forwarding device according to a fourth embodiment of the present application.

Detailed Description

The technical solution in the embodiments of the present invention will be described below with reference to the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments.

Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise.

Wherein in the description of the present specification, "/" indicates a meaning, for example, a/B may indicate a or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two.

In the description of the present specification, the terms "first", "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.

A switch (also known as a switching hub) is a network device for electrical (optical) signal forwarding that provides an exclusive electrical signal path for any two network nodes accessing the switch. The role of a switch is understood to be to connect machines together to form a local area network. Routers are distinguished from switches in that they are used to connect different network segments and to find the most suitable path for data transmission in the network. The router is generated behind the switch to connect various devices in the network, and automatically selects and sets a route according to the channel condition, and sends signals in a front-back order by an optimal path.

Fig. 1 is a schematic view of a scenario in which a packet is forwarded between a plurality of packet forwarding devices. The message forwarding device may be a router/switch. As shown in fig. 1, the message is forwarded among the device 1, the device 2, and the device 3 (see the path indicated by the arrow).

Fig. 2 is a detailed process diagram of forwarding a message in the scenario shown in fig. 1 in the prior art. As shown in fig. 2, device 1 checks the routing table to obtain an interface that is Port1, that is, the output interface of device 1 determines that device 1 is Port1, forwards the packet to device 2 through Port1, checks the routing table to obtain an interface that is Port1, that is, the output interface of device 2 determines that device 2 is Port1, forwards the packet from Port1 to device 3, checks the routing table to obtain an interface that is Port2, that is, the output interface of device 3 determines that device 3 is Port2, and sends the packet from Port 2. The total forwarding delay of the packet is the sum of the delay of the device 1, the delay of the device 2 and the delay of the device 3.

Fig. 3 is a schematic structural diagram of a message forwarding device in the prior art. As shown in fig. 3, the forwarding chip of the conventional switch/router employs a serial pipeline structure. Specifically, the message needs to sequentially pass through an uplink module, an exchange module, a downlink module, and an editing module in the forwarding chip. Wherein, the uplink module looks up FIB (routing table) according to the message header content to obtain the output interface of the local device; at the switching module, the message is sent to the route of the local equipment output interface based on the local equipment output interface, and relevant scheduling and/or switching operations are/is carried out; in a downlink module, searching for package information of a message based on an output interface of local equipment; and the editing module edits the message according to the packaging information and then forwards the edited message from the local equipment output interface.

The following describes the packet forwarding process in detail with reference to fig. 2 and fig. 3. Specifically, the method can comprise the following steps:

step one, a message enters the device 2, a routing table of the device 2 is searched by an IP1 at an uplink module of the device 2, and interface information Port1 is obtained by referring to Table 1.

Routing prefix Outbound interface information
IP1 Port1

Table 1. routing table for device 2

Step two, the switching module of the device 2 enters a queue according to the port1 of the output interface information, and schedules and switches the queue to the downlink module 1 corresponding to the port 1;

and step three, in the downlink module 1 and the editing module 1 of the equipment 2, using the IP1 and the Port1 to search an Address Resolution Protocol (ARP) table, referring to the table 2, acquiring a two-layer header of the message needing to be newly encapsulated, encapsulating the message and sending the encapsulated message from the Port 1.

Look-up key Encapsulating information
IP1&Port1 DMAC2&SMAC2

Table 2 address resolution protocol, ARP, table for device 2

There is another way to get Index1 in the routing table in step one at the same time, where Index1 is used to Index the encapsulation information directly, see tables 3 and 4.

Routing prefix Outbound interface information Index
IP1 Port1 Index1

Table 3. routing table with index for device 2

Serial number Encapsulating information
Index1 DMAC2&SMAC2

TABLE 4 Equipment 2 indexes encapsulation information with index

Step four, in the device 3, the message may be forwarded again by using a method similar to the above step one, step two, and step three, and then the message is sent out from the egress interface port2 of the device 3. Wherein, the routing table of the device 3 refers to table 5, and the ARP table of the device 3 refers to table 6.

Routing prefix Outbound interface information
IP1 Port2

Table 5. routing table of device 3

Look-up key Encapsulating information
IP1&Port2 DMAC3&SMAC3

Table 6 address resolution protocol, ARP, table for device 3

Similarly, the device 3 may Index the encapsulation information in an Index manner

In the above devices 2 and 3, the three modules, i.e., the uplink module, the switching module and the downlink module, have a dependency relationship and are tightly coupled. Specifically, the switching module and the downlink module need to perform the next processing according to the processing result (Port) of the uplink module, so the three modules are executed in series, and thus the total delay is equal to the sum of the delays of the three modules, and the delay is long, which is not beneficial to improving the message transmission efficiency.

In view of this, the embodiment of the present application provides a message forwarding method, which can be applied to the application scenario shown in fig. 1.

Fig. 4 is a detailed process diagram of forwarding a message in the scenario shown in fig. 1 in this embodiment. As shown in fig. 4, the device 1 may determine, for example, that the outgoing interface of the device 2 is a Port3 according to the received packet, and forward the outgoing interface information of the device 2 to the device 2 in the packet, specifically, the packet received by the device 2 may include a packet header DMAC1, a SMAC1, an IP1, an OP Port3, and Data (packet Data). Because the message received by the device 2 includes the output interface information Port3 of the device 2, the device 2 can perform processing such as exchanging routes, inquiring and packaging information and the like according to the output interface information, and can perform uplink forwarding processing at the same time, i.e. parallel processing is realized, the parallelism is improved, and the time delay is reduced.

With continued reference to fig. 4, the device 2 may further determine an outgoing interface of the downstream device/the nth hop device (next nth hop device), where N is a positive integer and is greater than or equal to 1, so that the downstream device/the nth hop device may exchange and query encapsulation information according to outgoing interface information included in the message after receiving the message, and may perform uplink forwarding processing at the same time, so that the downstream device/the nth hop device may implement parallel processing. For example, the outgoing interface of the decision device 3 (1 st hop device) of the device 2 is, for example, a Port6, and the packet sent by the device 2 may include DMAC2, SMAC2, IP1, and OP ═ Port6, and packet Data.

In addition, it should be noted that, since the first device (device 1) receiving the message does not have the upstream device to provide the current egress interface information, the first device may obtain the egress interface information according to the conventional procedure. For example, in device 1, the routing table is queried according to the destination IP address of the packet to obtain the egress interface information of the current device (e.g., Prot1), and at the same time, the egress interface information of the downstream device (e.g., egress interface Port3 of device 2) is obtained. Starting from the second device (device 2), the message forwarding method of the embodiment of the present application can be executed.

FIG. 5 is a graph comparing prior art serial processing and parallel processing of an embodiment of the present application. As shown in fig. 5, during serial processing, forwarding of device 1 and table lookup of device 2 are performed serially, and forwarding of device 2 and table lookup of device 3 are performed serially; in the parallel processing of the embodiment of the present application, the forwarding of the device 1 and the table lookup of the device 2 may be executed in parallel in the device 1, the forwarding of the device 2 and the table lookup of the device 3 may be executed in parallel in the device 2, and the forwarding of the device 3 and the table lookup of the device 4 may be executed in parallel in the device 3. Here, "forwarding" may refer to at least one of scheduling and/or exchanging and obtaining encapsulation information, and "table lookup" may refer to table lookup and obtaining egress interface information of a downstream device/nth hop device (e.g., 1 st hop device).

That is, in the present application, the upstream processing in the device is independent of the switching and downstream processing, and can be performed in parallel. Specifically, a forwarding decision behavior of an uplink flow is decoupled from switching and downlink encapsulation, a forwarding decision (i.e., a table lookup operation for determining an interface) is delivered to an upstream device to be completed, decision information is carried into a current device along with a message, the current device performs switching and downlink encapsulation (i.e., a forwarding operation) according to the decision information, and a forwarding decision of a downstream device (i.e., a table lookup operation for determining an interface) is completed in parallel.

Fig. 6 is a detailed flowchart of a serial process of the related art and a parallel process of the embodiment of the present application. As shown in fig. 6, in the conventional serial forwarding architecture, the forwarding decision is made first, and then the forwarding decision is implemented, so that the ingress and egress processing flows must be serial. Taking the device B as an example for explanation, after receiving the message forwarded by the device a, the device B performs other uplink processing, then performs table lookup to obtain a local output interface, then performs scheduling, flow control, switching according to the local output interface, performs downlink encapsulation processing, and the like, and forwards the message to the device C. The process of the device a and the device C for processing the message is similar to that of the device B. In the parallel forwarding architecture of the application, an uplink flow is decoupled from a queuing scheduling flow and a downlink flow in a network node, and has no dependency relationship, and the uplink flow, the queuing scheduling flow and the downlink flow can be executed simultaneously in parallel to reduce the pipeline delay. Taking the device B as an example for explanation, the message forwarded by the device a to the device B includes the outgoing interface information of the device B, and the message enters the device B and carries the outgoing interface information of the current device B found by the upstream (device a). Simultaneously, the following steps I and II are executed in parallel:

step one, equipment B carries out enqueue scheduling, flow control and exchange according to the outgoing interface information carried by the message, and searches new encapsulation information;

step two, performing other uplink processing and table look-up to obtain an output interface of the equipment C;

step three, converging the processing results of the step one and the step two, modifying the message, encapsulating the new encapsulation information searched in the step one and the outlet interface information of the equipment C searched in the step two in the message, and sending the message from the outlet interface of the current equipment B.

That is to say, in the parallel-to-parallel architecture of the present application, an egress decision (executed by an upstream device) and a decision implementation (executed by a current device) are separated, and a routing table of each routing node directly decides egress interface information of a 1 st hop/nth hop device, and carries egress interface related information in a packet encapsulation header. Because the message entering the device carries the information of the outlet interface, the message can directly enter the queuing scheduling and carry out outlet packaging, and simultaneously, the operations of searching the outlet interface of the 1 st hop/Nth hop device of the current device and the like are executed in parallel.

The following describes in detail a packet forwarding method provided in the embodiment of the present application with reference to fig. 7 to fig. 10. The message forwarding method is used for forwarding a first message, wherein the first message comprises first identification information and message data, and the first identification information is used for identifying an output interface of a local device.

Fig. 7 is a flowchart of a message forwarding method according to a first embodiment of the present application. As shown in fig. 7, the message forwarding method includes the following steps:

step S100, perform uplink forwarding processing on the first packet.

And step S102, scheduling and/or exchanging the first message according to the first identification information. The scheduling of the first packet according to the first identification information may include when the packet is sent from the local device egress interface, and the exchanging according to the first identification information may include entering the packet into a route on which the local device egress interface is located.

And step S104, inquiring the encapsulation information table according to the first message to obtain encapsulation information.

Wherein, two or three of the uplink forwarding process of step S100, the scheduling and/or exchanging of step S102, and the obtaining of the encapsulation information of step S104 are processed in parallel. The message forwarding method further includes step S106, obtaining a second message after the first message is subjected to uplink forwarding processing, scheduling and/or exchanging and processing of obtaining encapsulation information, editing the second message according to the encapsulation information to obtain a third message, and sending the third message to the nth hop device through the local device output interface identified by the first identification information, where the third message includes message data, N is a positive integer, and N is greater than or equal to 1.

The local device directly decides the output interface information of the nth hop device and carries the output interface information (namely, the output interface of the nth hop device) in the encapsulation head of the third message, so that the third message can be subjected to uplink forwarding processing when the nth hop device receives the third message, and meanwhile, scheduling and/or switching can be carried out according to the output interface of the nth hop device, thereby realizing the separation processing of forwarding decision and outlet decision. In other words, it is equivalent to propagate the outgoing interface of the nth hop device outward by N hops, and a virtual router with a radius of N is formed around each device, and the routing table of the upstream device can directly obtain the outgoing interface of the nth hop device.

In addition, it should be noted that the uplink forwarding processing in step S100, the scheduling and/or exchanging in step S102, and the obtaining of the encapsulation information in step S104 may be performed only by obtaining corresponding information in the first message, for example, in step S102, the first identification information in the first message is obtained to schedule and/or exchange the first message, and the message data in the first message may directly enter the third message. Alternatively, the message data in the first message may enter the third message after any one of the uplink forwarding processing in step S100, the scheduling and/or exchanging in step S102, and the step of obtaining the encapsulation information in step S104.

When the first message includes the first destination information, performing the uplink forwarding processing on the first message may include querying a forwarding information table according to the first destination information to obtain second identification information to complete the uplink forwarding processing, and editing the second message according to the encapsulation information to obtain a third message including carrying the second identification information in the third message. The second identification information is used for identifying an output interface of the nth hop device, so that the nth hop device can edit the received third message and then forward the third message from the output interface of the nth hop device identified by the second identification information in the third message. The second identification information may be one or more, the one or more second identification information are used to identify one or more N-th hop device outgoing interfaces respectively, and the second identification information corresponds to the N-th hop device outgoing interfaces one to one. In addition, when N is greater than or equal to 2, the first packet may further include one or more third identification information, where the one or more third identification information is used to identify an outgoing interface of one or more intermediate devices between the local device and the nth hop device, and the third identification information corresponds to the outgoing interface of the intermediate device one to one.

Further, the forwarding information table may include second identification information, and at this time, the second identification information may be directly obtained by indexing according to the first destination information; or, the forwarding information table may include the first destination information and the second identification information, so that the second identification information corresponding to the first destination information may be obtained by querying the second identification information according to the first destination information.

The first destination information may include a destination MAC address, and the forwarding information table may include a MAC table, so that the MAC table may be queried according to the destination MAC address to obtain the second identification information; alternatively, the first destination information may comprise a destination internet protocol IP address, and the forwarding information table may comprise a routing table, so that the routing table may be queried according to the destination internet protocol IP address to obtain the second identification information.

Optionally, querying the encapsulation information table according to the first message to obtain the encapsulation information may include querying an ARP table according to a destination IP address of the first message and the first identification information to obtain the encapsulation information.

Referring to fig. 4, the following is specifically described:

step one, a message enters into the device 1, and the IP1 is used for searching a routing table to obtain local outgoing interface information Port1 and outgoing interface information Port3 of the device 2. Wherein the routing table of device 1 is seen in table 7.

Routing prefix Local out interface information Downstream device egress interface information
IP1 Port1 Port3

Table 7. routing table of device 1

Step two, device 1 encapsulates Port3 in a message and sends it to device 2 through local outbound interface Port 1. At this time, the first packet received by the device 2 may include a destination media access control MAC address (DMAC1), a source MAC address (SMAC1), a destination internet protocol IP address (IP1), first identification information (e.g., Port3) for identifying a local device egress interface, and packet Data (Data), as shown in table 8.

DMAC1 SMAC1 IP1 Port3 Data

Table 8. message content sent by device 1 to device 2

Step three, the device 2 receives the first message and analyzes the IP1 and Port3 fields carried by the first message; the following step four and step five are executed simultaneously in parallel.

Fourthly, the equipment 2 carries out enqueue scheduling and flow control according to the Port3, and searches new MAC header encapsulation information DMAC2 and SMAC2 according to the Port 3;

look-up key Encapsulating information
IP1&Port3 DMAC2&SMAC2

Table 9 MAC encapsulation information table of device 2

Step five, at the same time, the IP1 is used for searching a routing table at the device 2 to obtain the output interface information Port6 of the 1 st hop device such as the device 3;

routing prefix Downstream device egress interface information
IP1 Port6

Table 10. routing table for device 2

And step six, converging the processing results of the step four and the step five, modifying the message, namely encapsulating the DMAC2 obtained in the step four, the SMAC2 and the Port6 obtained in the step five into the message, and sending the message from the Port3 of the device 2 to the device 3. Specifically, the third packet sent by the device 2 to the device 3 may include encapsulation information DMAC2 and SMAC2, a destination internet protocol IP address (IP1), second identification information (e.g., Port6) for identifying an egress interface of the nth hop device, and packet Data (Data), as shown in table 11.

DMAC2 SMAC2 IP1 Port6 Data

TABLE 11 message content sent by device 2 to device 3

Step seven, the device 3 receives the message, analyzes the IP1 and the Port6 carried by the message, and repeatedly executes the step four, the step five and the step six. The routing table of the device 3 may be shown in table 12, and the MAC encapsulation information table of the device 3 may be shown in table 13.

Routing prefix Downstream device egress interface information
IP1 Port7

Table 12. routing table for device 3

Look-up key Encapsulating information
IP1&port6 DMAC3&SMAC3

Table 13 MAC encapsulation information table of device 3

It should be noted that the above step flow is only a typical flow. The real flow will contain more operations and the parallel case is the same as the typical flow.

The above describes the current device deciding the outgoing interface of the 1 st hop device. Furthermore, the range can be expanded, that is, the current device can obtain the outgoing interface of the nth hop device by looking up the routing table in the uplink forwarding process, wherein N is greater than or equal to 2. Optionally, in order to enable the nth hop device to forward the packet from the outbound interface identified by the second identification information, the first packet may further include second destination information, where the second destination information is used for the nth hop device to identify, so that the nth hop device edits the received third packet and then forwards the edited third packet from the outbound interface of the nth hop device identified by the second identification information.

Wherein the second destination information may include one or more of the following information: a destination Internet Protocol (IP) address, a destination Media Access Control (MAC) address and a device identifier of the Nth hop device. Alternatively, to identify the nth hop device, the message may include a field similar to "Counter", hop-by-hop-1, and if the field is reduced to a preset value corresponding to the nth hop device, such as 0, the nth hop device is indicated. Or the message may also include an "offset" field, and the label corresponding to the offset is obtained hop by +1, where the label carries a flag bit indicating whether the N-th hop is performed.

In the following, taking N as 2 and the second destination information as the device identifier, such as device 3 as an example, the routing table of device 1 may be as shown in table 14.

Routing prefix Local out interface information Downstream device egress interface information
IP1 Port1 [email protected] equipment3

Table 14. routing table of device 1

At this time, the device 1 may obtain the egress interface information of the 2 nd hop device (device 3) by looking up the routing table during the uplink forwarding process, and encapsulate the egress interface information into a packet. The content of the message sent by device 1 to device 2 is shown in table 15.

DMAC1 SMAC1 IP1 [email protected] device 3 Data

Table 15. message content sent by device 1 to device 2

The device 2 forwards the label according to the [email protected] device 3 carried in the message;

after receiving the message, the device 3 may execute two or three of the steps of uplink forwarding processing, scheduling and/or exchanging and obtaining encapsulation information in parallel, and similarly, in the device 3, may also obtain the egress interface information of the 2 nd hop device of the device 3.

In addition to the above-mentioned manner of obtaining the encapsulation information by querying the ARP table through the IP address of the destination internet protocol and the first identification information, the encapsulation information may also be obtained in an indexing manner, specifically, at this time, the first packet may further include the first Index information Index1, and querying the ARP table according to the first packet to obtain the encapsulation information may include querying the ARP table according to the first Index information Index1 to obtain the encapsulation information.

Optionally, the performing the uplink forwarding processing on the first packet may further include querying a forwarding information table according to the first destination information of the first packet to obtain second Index information Index2, and editing the second packet according to the encapsulation information to obtain a third packet includes carrying the second Index information in the third packet. The second Index information Index2 is used for the nth hop device to obtain the encapsulation information, so that the nth hop device can search for corresponding encapsulation information according to the second Index information Index2 in the received third message.

The forwarding information table may include the second Index information Index2, so that the second Index information Index2 may be directly obtained by indexing according to the first destination information; alternatively, the forwarding information table may include the first destination information and the second Index information Index2, so that the second Index information Index2 may be obtained by querying the second Index information corresponding to the first destination information according to the first destination information.

In this way, in fig. 4, the MAC encapsulation information may also be directly indexed by an Index, and thus, the upstream device needs to encapsulate the Index into the message for carrying. At this time, the first packet forwarded by the device 1, received by the device 2, may include a destination media access control MAC address (DMAC1), a source MAC address (SMAC1), a destination internet protocol IP address (IP1), first identification information (e.g., Port3) for identifying an outgoing interface of the local device, first Index information Index1, and packet Data (Data), as shown in table 16.

DMAC1 SMAC1 IP1 Port3 Index1 Data

Table 16. message content forwarded by device 1 received by device 2

The routing table looked up by the device 2 may be as shown in table 17, and the encapsulation information table looked up by the device 2 may be as shown in table 18.

Routing prefix Downstream device egress interface information MAC encapsulation information Index of downstream equipment
IP1 Port6 Index1

Table 17. routing table for device 2

Serial number Encapsulating information
Index1 DMAC2&SMAC2

Table 18 MAC encapsulation information table of device 2

The third packet sent by the device 2 to the device 3 may include encapsulation information DMAC2 and SMAC2, a destination internet protocol IP address (IP1), second identification information (e.g., Port6) for identifying an egress interface of the nth-hop device, second Index information Index2, and packet Data (Data), as shown in table 19.

DMAC2 SMAC2 IP1 Port6 Index2 Data

TABLE 19 message content sent by device 2 to device 3

The table of the package information looked up by the device 3 may be as shown in table 20.

Serial number Encapsulating information
Index2 DMAC3&SMAC3

Table 20 MAC encapsulation information table of device 3

When a plurality of message forwarding devices exist in the network system, in a scheme of querying a forwarding information table according to first destination information to obtain second identification information, before sending a third message from a local device output interface identified by first identification information, optionally, the message forwarding method includes judging whether the first destination information of the first message belongs to the local device, and sending the third message from the local device output interface to an nth hop device if the judgment result is yes.

Wherein the first destination information may be the destination media access control MAC address or the destination internet protocol IP address mentioned above.

Or, the first destination information may further include a local device identifier, and determining whether the first destination information belongs to the local device includes determining whether the local device identifier belongs to the local device. At this time, the first packet received by the device 2 in fig. 4 may include a destination media access control MAC address (DMAC), a Source MAC Address (SMAC), a destination internet protocol IP address (IP1), first identification information for identifying an outgoing interface of the local device (e.g., Port3), a local device identification (device 2), first Index information Index1, and packet Data (Data), as shown in table 21.

DMAC1 SMAC1 IP1 [email protected] device 2 Index1 Data

Table 21. message content forwarded by device 1 received by device 2

Correspondingly, the third packet may also include an nth hop device identifier (e.g., device 3), as shown in table 22. Thus, after the nth hop device receives the third message, it may be determined whether the nth hop device identifier belongs to the nth hop device, and if so, the third message is forwarded through the nth hop device output interface after being processed and edited by the nth hop device.

DMAC2 SMAC2 IP1 [email protected] device 3 Index2 Data

Table 22. message content sent by device 2 to device 3

With continuing reference to fig. 7, in the message forwarding method of the first embodiment shown in fig. 7, the uplink forwarding processing of step S100 is performed in two paths with the scheduling and/or exchanging of step S102 and the obtaining of encapsulation information of step S104. The scheduling and/or exchanging of step S102 and the obtaining of the package information of step S104 are performed in series. At this time, the uplink forwarding process of step S100 may be performed in parallel/simultaneously with the scheduling and/or switching of step S102; alternatively, the uplink forwarding process of step S100 may be performed in parallel/simultaneously with the obtaining of the encapsulation information of step S104; alternatively, the upstream forwarding process of step S100 may be performed in parallel/simultaneously with both the scheduling and/or exchanging of step S102 and the acquiring of encapsulation information of step S104.

Fig. 8 is a flowchart of a message forwarding method according to a second embodiment of the present application. The difference from the message forwarding method of the first embodiment shown in fig. 7 is that, in the message forwarding method of the second embodiment shown in fig. 8, the scheduling and/or exchanging of step S102 is performed in two paths with the uplink forwarding processing of step S100 and the obtaining of encapsulation information of step S104. The uplink forwarding process of step S100 and the obtaining of the encapsulation information of step S104 are executed serially. At this time, the scheduling and/or exchanging of step S102 may be performed in parallel/simultaneously with the uplink forwarding processing of step S100; alternatively, the scheduling and/or exchanging of step S102 may be performed in parallel/simultaneously with the obtaining of the encapsulation information of step S104; alternatively, the scheduling and/or exchanging of step S102 may be performed in parallel/simultaneously with both the upstream forwarding process of step S100 and the acquiring of encapsulation information of step S104.

Fig. 9 is a flowchart of a message forwarding method according to a third embodiment of the present application. The difference between the packet forwarding method of the first embodiment shown in fig. 7 and the packet forwarding method of the second embodiment shown in fig. 8 is that, in the packet forwarding method of the third embodiment shown in fig. 9, the obtaining of encapsulation information in step S104 is performed in two paths with the uplink forwarding processing in step S100 and the scheduling and/or switching in step S102. The uplink forwarding process of step S100 and the scheduling and/or switching of step S102 are performed in series. At this time, the obtaining of the encapsulation information in step S104 may be performed in parallel/simultaneously with the uplink forwarding processing in step S100; alternatively, the obtaining of the encapsulation information of step S104 may be performed in parallel/simultaneously with the scheduling and/or exchanging of step S102; alternatively, the obtaining of the encapsulation information of step S104 may be performed in parallel/simultaneously with both the uplink forwarding process of step S100 and the scheduling and/or exchanging of step S102.

Fig. 10 is a flowchart of a message forwarding method according to a fourth embodiment of the present application. The difference from the message forwarding method of the embodiment shown in fig. 7-9 is that, in the message forwarding method of the fourth embodiment shown in fig. 10, the uplink forwarding process of step S100, the scheduling and/or switching of step S102, and the obtaining encapsulation information of step S104 are divided into three paths and processed simultaneously. That is, since the first packet already carries the first identification information for identifying the output interface of the local device, the queuing scheduling can be directly entered, the encapsulation information can be obtained according to the first identification information, and the uplink processing such as the search of the output interface of the nth hop device is executed in parallel.

It should be noted that, in the message forwarding method of the first embodiment, since the step S102 and the step S104 are executed in series, the step S102 may perform exchange or exchange and scheduling according to the first identification information. Specifically, at step 102, the switching is performed according to the first identification information, so that the packet enters the route where the local device outgoing interface is located, then, at step S104, the encapsulation information table is queried according to the first packet to obtain the encapsulation information, and finally, at step S106, the encapsulation information is edited and then forwarded by the local device outgoing interface. For example, the output interface of the local device (e.g., device 2 in fig. 4) identified by the first identification information in the first message is Port3, when the first message enters the local device through another output interface, the first message is exchanged according to the first identification information, enters the route where Port3 is located, then queries the encapsulation information table according to the first message to obtain encapsulation information, and finally performs encapsulation according to the encapsulation information in step S106 described below to obtain a third message, and forwards the third message from Port 3. At this time, the upstream forwarding process of step S100 may be performed simultaneously with the switching. Optionally, scheduling may also be performed at step 102 based on the first identification information to determine when the packet is to be forwarded from Port 3. In the message forwarding methods of the second, third and fourth embodiments, there is no context between the execution of step S102 and the execution of step S104, so step S102 can only perform scheduling according to the first identification information to determine when the third message is forwarded from the local device egress interface in step S106 described below.

In the above embodiment of the present application, two or three of the uplink forwarding processing in step S100, the scheduling and/or exchanging in step S102, and the obtaining of the encapsulation information in step S104 are processed in parallel, that is, the uplink processing, the exchanging, and the downlink processing in the device are independent, and then can be processed in parallel, and compared with a scheme in which the network delay is the sum of the uplink forwarding processing in step S100, the scheduling and/or exchanging in step S102, and the obtaining of the encapsulation information in step S104 when executed serially, the scheme of the present application can effectively reduce the delay, improve the message transmission efficiency, and the memory conflict delay is not accumulated to the overall delay, so that table copy is not needed, and the memory wall is further alleviated.

Based on the same concept as the above method embodiments, the embodiment of the present application further provides a message forwarding device. The following description will be made with reference to fig. 11A to 11D, fig. 12A and 12B, and fig. 13 and 14.

Fig. 11A to 11D are schematic structural diagrams of a message forwarding device according to a first embodiment of the present application. The first message received by the message forwarding device includes first identification information and message data, wherein the first identification information is used for identifying the local device output interface. As shown in fig. 11A to 11D, the message forwarding device includes an uplink module for performing uplink forwarding processing on the first message, a switch module for scheduling and/or switching the first message according to the first identifier information, and a downlink module for querying the encapsulation information table according to the first message to obtain encapsulation information. And two or three of the uplink module, the switching module and the downlink module are processed in parallel, and the first message is processed by the uplink module, the switching module and the downlink module to obtain a second message. The message forwarding device further comprises an editing and sending module, wherein the editing and sending module is used for editing the second message according to the encapsulation information to obtain a third message, and sending the third message to the nth hop device through the local device output interface identified by the first identification information, the third message comprises message data, N is a positive integer, and N is greater than or equal to 1.

In the message forwarding device of the first embodiment shown in fig. 11A to 11D, the switching module, the downlink module, and the editing and sending module are sequentially connected in series, where: the upstream module is connected in parallel with both the switching module and the downstream module, and the upstream module is connected in series with the editing and sending module, as shown in fig. 11A and 11B; or, the uplink module is connected in parallel with the switching module, and the uplink module is sequentially connected in series with the downlink module and the editing and sending module, as shown in fig. 11C; alternatively, the switching module, the uplink module and the editing and sending module are sequentially connected in series, and the uplink module is connected in parallel with the downlink module, as shown in fig. 11D. That is, the downstream module is serially connected between the switching module and the editing and transmitting module, and the upstream module is connected in parallel with both the switching module and the downstream module, at which point the upstream module can be processed simultaneously in parallel with the switching module, or the upstream module can be processed simultaneously in parallel with the downstream module, or the upstream module can be processed simultaneously in parallel with both the switching module and the downstream module. Alternatively, the upstream module may be connected in parallel only with the switch module for concurrent processing in parallel with the switch module, or the upstream module may be connected in parallel only with the downstream module for concurrent processing in parallel with the downstream module.

In addition, in the message forwarding device in the foregoing embodiment, the first message may further include first destination information, the performing, by the uplink module, uplink forwarding processing on the first message may include querying a forwarding information table according to the first destination information to obtain second identification information, and the editing and sending module edits the second message according to the encapsulation information to obtain a third message, including carrying the second identification information in the third message. The second identification information is used for identifying an output interface of the nth hop device, so that the nth hop device can edit the received third message and then forward the third message from the output interface of the nth hop device identified by the second identification information in the third message. The first destination information may include a destination MAC address, and the forwarding information table may include a MAC table. Alternatively, the first destination information may comprise a destination internet protocol, IP, address, in which case the forwarding information table may comprise a routing table.

Further, the package information can be obtained in, but not limited to, the following two ways: 1) the encapsulation information table comprises an Address Resolution Protocol (ARP) table, and the downlink module queries the ARP table according to the target Internet Protocol (IP) address of the first message and the first identification information to acquire encapsulation information. Or, 2) the first message further includes first index information, and the downlink module queries the encapsulation information table according to the first index information to obtain encapsulation information.

Optionally, the uplink module performs uplink forwarding processing on the first packet, where the uplink forwarding processing includes querying a forwarding information table according to first destination information of the first packet to obtain second index information, and the editing and sending module edits the second packet according to the encapsulation information to obtain a third packet, where the editing and sending module carries the second index information in the third packet. The second index information is used for the downlink module of the nth hop device to obtain corresponding encapsulation information, so that the nth hop device can search for the corresponding encapsulation information according to the second index information in the received third message.

Fig. 12A and 12B are schematic structural diagrams of a message forwarding device according to a second embodiment of the present application. The difference from the message forwarding device of the first embodiment shown in fig. 11A-11D is that, in the message forwarding device of the second embodiment shown in fig. 12A and 12B, an upstream module, a downstream module, and an editing and sending module are connected in series, where: the switching module is connected with the uplink module and the downlink module in parallel, and the switching module is sequentially connected with the editing and sending module in series, as shown in fig. 12A; alternatively, the uplink module, the switching module, and the editing and sending module are sequentially connected in series, and the switching module is connected in parallel with the downlink module, as shown in fig. 12B. That is, the downstream module may be serially connected between the upstream module and the editing and transmitting module, and the switching module may be connected in parallel with both the upstream module and the downstream module, in which case the switching module may be processed concurrently in parallel with the upstream module, or the switching module may be processed concurrently in parallel with the downstream module, or the switching module may be processed concurrently in parallel with both the upstream module and the downstream module. Alternatively, the switching module may be connected in parallel only with the downstream module for concurrent processing in parallel with the downstream module.

Fig. 13 is a schematic structural diagram of a message forwarding device according to a third embodiment of the present application. The difference between the message forwarding apparatus of the first embodiment shown in fig. 11 and the message forwarding apparatus of the second embodiment shown in fig. 12A and 12B is that, in the message forwarding apparatus of the second embodiment shown in fig. 13, an upstream module, a switching module, and an editing and sending module are sequentially connected in series, a downstream module is connected in parallel with both the upstream module and the switching module, and a downstream module is connected in series with the editing and sending module. That is, the switch module is connected in series between the upstream module and the editing and transmitting module, and the downstream module is connected in parallel with both the upstream module and the switch module, at which time the downstream module can be processed simultaneously in parallel with the upstream module, or the downstream module can be processed simultaneously in parallel with the switch module, or the downstream module can be processed simultaneously in parallel with both the upstream module and the switch module.

Fig. 14 is a schematic structural diagram of a message forwarding device according to a fourth embodiment of the present application. As shown in fig. 14, the uplink module, the downlink module and the switching module are connected in parallel, the uplink module is connected in series with the editing and sending module, the downlink module is connected in series with the editing and sending module, and the switching module is connected in series with the editing and sending module. That is, the uplink module, the switching module and the downlink module are connected in parallel and connected in series with the editing and transmitting module. In the foregoing embodiment, the uplink module, the switching module, and the downlink module are executed in parallel in two paths. In addition, the switching module and the downstream module are serial in the first embodiment, and the upstream module and the switching module are serial in the third embodiment, but the switching module, the upstream module and the downstream module are also independent, and may be further parallel, as shown in the message forwarding devices of the second embodiment and the fourth embodiment.

In summary, in the message forwarding device in the prior art, the output interface information needed by the switch module and the downlink module is obtained by looking up the routing table by the uplink module of the current device, so that the switch module/the downlink module and the uplink module have a dependency relationship and cannot be parallel to each other, which results in a large delay. In the parallel lookup, forwarding, separation and forwarding scheme of the present application, the routing table of each routing node directly determines the outgoing interface information of the downstream device, and carries the outgoing interface information in the packet encapsulation header, and after receiving the packet, the network device concurrently executes the following two steps: 1. performing other forwarding operations such as enqueuing, scheduling, downlink packaging and the like according to the output interface information in the message header; 2. and searching the routing table by using the destination address to acquire the outbound interface information of the 1 st hop. And then summarizing the results of the parallel execution of the step 1 and the step 2, uniformly modifying the message and then sending the message to the 1 st hop equipment. In addition, the packet may carry an Index, which is used to query the 1 st hop device for the encapsulation information table. Optionally, each routing node may also directly decide the egress interface information of the next nth hop device. Label forwarding can be adopted between the current equipment and the N-hop equipment, and the N-hop equipment forwards the message according to the output interface information carried by the message, so that the downlink packaging process of the N-hop equipment can be further processed simultaneously with enqueuing, scheduling and the like in a parallel mode.

That is to say, the present application hands the output interface information of the current device to the upstream device to obtain, and there is no dependency between the processing of the switching module/downlink module of the current device and the processing of the uplink module to look up the routing table to obtain the output interface information of the downstream device, and the processing can be performed in parallel, so that the time delay is reduced, the memory conflict time delay is not accumulated to the whole time delay, so that the table entry replication is not needed, and the memory wall is further relieved.

The embodiment of the present application further provides a network system, which includes the message forwarding device and the N-th hop device in the foregoing embodiment.

In addition, the embodiment of the present application further provides a message forwarding device, where the message forwarding device includes a processor, a memory, and a transceiver. Wherein the transceiver is adapted to receive signals and/or transmit signals, the memory is adapted to store computer code, and the processor is adapted to execute the computer code to cause the message forwarding device to perform the message forwarding method described above.

In addition, an embodiment of the present application further provides a communication apparatus, which includes a processor and an interface circuit. The interface circuit receives a computer execution instruction and transmits the computer execution instruction to the processor, and the processor runs the computer execution instruction to execute the message forwarding method.

Further, an embodiment of the present application also provides a communication apparatus, which includes a processor and a memory. The memory stores computer-executable instructions, and the processor is configured to execute the computer-executable instructions stored in the memory, so that the communication device executes the message forwarding method.

It is understood that the processor in the embodiments of the present application may be a Central Processing Unit (CPU), other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. The general purpose processor may be a microprocessor, but may be any conventional processor.

The method steps in the embodiments of the present application may be implemented by hardware, or may be implemented by software instructions executed by a processor. The software instructions may consist of corresponding software modules that may be stored in Random Access Memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), Erasable Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), registers, a hard disk, a removable hard disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an ASIC.

In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.

It is to be understood that the various numerical references referred to in the embodiments of the present application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of the present application.

27页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种实现端口自适应的全线速分布交换装置的配置方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!