A message forwarding method, a first network device, a control device, a storage medium, and a computer program product.

By automatically generating DGSQ identifiers and link family tables using neighbor information and BGP attribute information in the GSE network, the problems of high maintenance workload and low forwarding efficiency caused by manual configuration are solved, and efficient packet forwarding is achieved.

CN118802739BActive Publication Date: 2026-01-06CHINA MOBILE COMM LTD RES INST +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410841276.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2026-01-06
Estimated Expiration
2044-06-26

AI Technical Summary

Technical Problem

In a fully dispatched Ethernet (GSE) network, manually configuring the mapping relationship between DGSQ ID and IP is labor-intensive and difficult to maintain, resulting in a decrease in packet forwarding efficiency.

Method used

The first network device sends neighbor information to the control device, receives DGSQ identification information and link family table, determines routing information based on the BGP attribute information of the packet, generates a mapping table for packet forwarding, and the control device generates DGSQ identification information and link family table and sends them to the network device.

Benefits of technology

It improves message forwarding efficiency, reduces manual configuration and maintenance workload, and enhances network flexibility and ease of maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118802739B_ABST
    Figure CN118802739B_ABST
Patent Text Reader

Abstract

This application provides a packet forwarding method, a first network device, a control device, a storage medium, and a computer program product. The method is applied to a first network device and includes: the first network device sending neighbor information to a control device and receiving first DGSQ identification information and a link family table sent by the control device; wherein the first DGSQ identification information includes DGSQ identification information corresponding to one or more network devices; receiving a first packet sent by one or more second network devices and determining routing information based on the BGP attribute information of the first packet; wherein the routing information includes one or more of the IP information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and MPLS labels; generating a mapping relationship table based on the routing information, the mapping relationship table being used to at least represent the mapping relationship between the IP information and the second DGSQ identification information; and performing packet forwarding through the mapping relationship table, thereby improving packet forwarding efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of transmission and Internet Protocol (IP), and more particularly to a message forwarding method, a first network device, a control device, a storage medium, and a computer program product. Background Technology

[0002] In current Global Scheduling Ethernet (GSE) networks, the forwarding mechanism is no longer based on IP addresses, but rather on packet container information for routing and forwarding. Initially, the mapping between Dynamic Global Scheduling Queue (DGSQ) identifiers (IDs) and IP addresses needs to be manually configured on the switches according to the service deployment. Once the network topology changes, manual reconfiguration is required.

[0003] However, manually configuring the mapping relationship between DGSQ IDs and IPs involves a large workload for operation and maintenance, and is not easy to maintain, resulting in a decrease in packet forwarding efficiency. Therefore, there is an urgent need to propose a mechanism for establishing the DGSQ ID and IP mapping relationship suitable for GSE networks to replace the manual establishment process, thereby improving packet forwarding efficiency. Summary of the Invention

[0004] This application implements a method for forwarding packets, a first network device, a control device, a storage medium, and a computer program product that can replace the process of manually establishing the mapping relationship between DGSQ ID and IP, thereby improving packet forwarding efficiency.

[0005] The technical solution of this application embodiment is implemented as follows:

[0006] In a first aspect, embodiments of this application provide a message forwarding method, the method being applied to a first network device, the method comprising:

[0007] The device sends neighbor information to the control device and receives first DGSQ identification information and a link family table from the control device; wherein, the neighbor information is used at least by the control device to generate the first DGSQ identification information and the link family table, the link family table is used at least by the second network device to send a first message to the first network device, the link family table includes next-hop device information corresponding to one or more network devices, and the first DGSQ identification information includes DGSQ identification information corresponding to the one or more network devices;

[0008] The first packet sent by one or more second network devices is received based on the link family table, and routing information is determined based on the Border Gateway Protocol (BGP) attribute information of the first packet; wherein, the routing information includes one or more of the IP information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and a Multi-Protocol Label Switching (MPLS) label, and the second DGSQ identification information is obtained based on the first DGSQ identification information;

[0009] A mapping table is generated based on the routing information, and packets are forwarded through the mapping table; wherein, the mapping table is at least used to represent the mapping relationship between the IP information and the second DGSQ identification information.

[0010] Secondly, embodiments of this application provide a message forwarding method, the method being applied to a control device, the method comprising:

[0011] Receive neighbor information sent by one or more network devices; wherein the neighbor information includes at least the neighbor device information corresponding to the network device;

[0012] A first DGSQ identifier and a link family table are generated based on the neighbor device information; wherein, the first DGSQ identifier includes the DGSQ identifier corresponding to the network device, and the DGSQ identifier corresponding to the network device includes one or more of the following: network device number, network device port number, and priority information;

[0013] The first DGSQ identification information and the link family table are sent to the first network device so that the first network device can forward packets based on the first DGSQ identification information and the link family table.

[0014] Thirdly, embodiments of this application provide a first network device, the first network device comprising: a first transmitting unit, a first receiving unit, a determining unit, a first generating unit, and a forwarding unit; wherein...

[0015] The first sending unit is configured to send neighbor information to the control device; wherein the neighbor information is used at least by the control device to generate the first DGSQ identification information and the link family table;

[0016] The first receiving unit is configured to receive first DGSQ identification information and a link family table sent by the control device; wherein, the link family table is at least used by the second network device to send a first message to the first network device, the link family table includes next-hop device information corresponding to one or more network devices, and the first DGSQ identification information includes DGSQ identification information corresponding to the one or more network devices; and to receive the first message sent by one or more second network devices.

[0017] The determining unit is configured to determine routing information based on the BGP attribute information of the first packet; wherein the routing information includes one or more of the IP information corresponding to the second network device, the second DGSQ identifier information corresponding to the second network device, and the MPLS label, and the second DGSQ identifier information is obtained based on the first DGSQ identifier information;

[0018] The first generation unit is configured to generate a mapping relationship table based on the routing information; wherein the mapping relationship table is at least used to represent the mapping relationship between the IP information and the second DGSQ identification information;

[0019] The forwarding unit is used to forward packets through the mapping table.

[0020] Fourthly, embodiments of this application provide a first network device, the first network device comprising: a first processor and a first memory; wherein,

[0021] The first memory is used to store computer programs that can run on the processor;

[0022] The first processor is configured to execute the message forwarding method as described above when running the computer program.

[0023] Fifthly, embodiments of this application provide a control device, the control device comprising: a second receiving unit, a second generating unit, and a second transmitting unit; wherein,

[0024] The second receiving unit is configured to receive neighbor information sent by one or more network devices; wherein the neighbor information includes at least neighbor device information corresponding to the network device;

[0025] The second generation unit is used to generate first DGSQ identification information and a link family table based on the neighbor device information; wherein, the first DGSQ identification information includes DGSQ identification information corresponding to the network device, and the DGSQ identification information corresponding to the network device includes one or more of the following: network device number, network device port number, and priority information;

[0026] The second sending unit is configured to send the first DGSQ identification information and the link family table to the first network device, so that the first network device can forward packets based on the first DGSQ identification information and the link family table.

[0027] Sixthly, embodiments of this application provide a control device, the control device comprising: a second processor and a second memory; wherein,

[0028] The second memory is used to store computer programs that can run on the processor;

[0029] The second processor is configured to execute the message forwarding method as described above when running the computer program.

[0030] In a seventh aspect, embodiments of this application provide a computer-readable storage medium storing computer program code, which, when executed by a computer, implements the message forwarding method described above.

[0031] Eighthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the message forwarding method described above.

[0032] This application provides a packet forwarding method, a first network device, a control device, a storage medium, and a computer program product. The first network device sends neighbor information to the control device and receives first DGSQ identification information and a link family table from the control device. The neighbor information is used at least by the control device to generate the first DGSQ identification information and the link family table. The link family table is used at least by a second network device to send a first packet to the first network device. The link family table includes next-hop device information corresponding to one or more network devices. The first DGSQ identification information includes DGSQ identification information corresponding to one or more network devices. The first network device receives the first packet sent by one or more second network devices and determines routing information based on the BGP attribute information of the first packet. The routing information includes IP information corresponding to the second network device and a second DGSQ identifier corresponding to the second network device. The DGSQ identifier information includes one or more MPLS labels, and the second DGSQ identifier information is obtained based on the first DGSQ identifier information; a mapping table is generated based on routing information, and packets are forwarded through the mapping table; the control device receives neighbor information sent by one or more network devices; wherein the neighbor information includes at least the neighbor device information corresponding to the network device; the first DGSQ identifier information and a link family table are generated based on the neighbor device information; wherein the first DGSQ identifier information includes the DGSQ identifier information corresponding to the network device, and the DGSQ identifier information corresponding to the network device includes one or more of the following: network device number, network device port number, and priority information; the first DGSQ identifier information and the link family table are sent to the first network device so that the first network device can forward packets based on the first DGSQ identifier information and the link family table. Therefore, the first network device can receive the first DGSQ identification information and link family table sent by the control device, and then receive the first packet sent by one or more second network devices. It can then determine routing information based on the BGP attribute information of the first packet. This routing information may include one or more of the IP information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and MPLS labels. This allows the first network device to generate a mapping table based on the IP information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and the MPLS labels. This mapping table at least represents the mapping relationship between IP information and the second DGSQ identification information. Packet forwarding can then be performed through the mapping table, thereby improving packet forwarding efficiency. Attached Figure Description

[0033] Figure 1 This is a schematic diagram of the message forwarding method proposed in the embodiments of this application. Figure 1 ;

[0034] Figure 2 This is a schematic diagram of the GSE network technology architecture proposed in the embodiments of this application;

[0035] Figure 3 This is a schematic diagram of the Common header structure proposed in an embodiment of this application;

[0036] Figure 4 This is a schematic diagram of the first BGP attribute format proposed in the embodiments of this application;

[0037] Figure 5 This is a schematic diagram of the TLVs format proposed in the embodiments of this application;

[0038] Figure 6 This is a schematic diagram of the message forwarding method proposed in the embodiments of this application. Figure 2 ;

[0039] Figure 7 This is a schematic diagram of the message forwarding method proposed in the embodiments of this application. Figure 3 ;

[0040] Figure 8 This is a schematic diagram of the message forwarding method proposed in the embodiments of this application. Figure 4 ;

[0041] Figure 9 This is a schematic diagram of the composition structure of the first network device proposed in the embodiments of this application. Figure 1 ;

[0042] Figure 10 This is a schematic diagram of the composition structure of the first network device proposed in the embodiments of this application. Figure 2 ;

[0043] Figure 11 This is a schematic diagram of the composition structure of the control device proposed in the embodiments of this application. Figure 1 ;

[0044] Figure 12 This is a schematic diagram of the composition structure of the control device proposed in the embodiments of this application. Figure 2 . Detailed Implementation

[0045] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for explaining the relevant application and not for limiting the application. Furthermore, it should be noted that, for ease of description, only the parts related to the relevant application are shown in the accompanying drawings.

[0046] In the current GSE network, the forwarding mechanism is no longer based on IP addresses, but instead uses a mechanism based on packet container information for routing and forwarding. Initially, the mapping relationship between DGSQ identification information (ID) and IP addresses needs to be manually configured on the switches according to the service deployment. Once the network topology changes, manual configuration is required again. However, manually configuring the mapping relationship between DGSQ IDs and IP addresses involves a large workload for operation and maintenance and is not easy to maintain.

[0047] The current GSE network lacks a suitable mechanism for establishing DGSQ ID and IP mapping relationships to achieve GSE header encapsulation on network devices and subsequent packet forwarding. After the full scheduling operating system (GSOS) configures DGSQ information on all network edge processing nodes (GSPs) and network core switching nodes (GSFs), there is no dedicated control protocol to publish DGSQ ID and network segment routing mapping information, making manual configuration too costly. Therefore, there is an urgent need to propose a mechanism for establishing DGSQ ID and IP mapping relationships suitable for GSE networks to replace the manual process and improve packet forwarding efficiency.

[0048] To address the issue of high maintenance workload and decreased packet forwarding efficiency caused by manually configuring the mapping relationship between DGSQ IDs and IPs, this application provides a packet forwarding method, a first network device, a control device, a storage medium, and a computer program product. The first network device sends neighbor information to the control device and receives first DGSQ identification information and a link family table from the control device. The neighbor information is used at least by the control device to generate the first DGSQ identification information and the link family table. The link family table is used at least by a second network device to send a first packet to the first network device. The link family table includes next-hop device information corresponding to one or more network devices, and the first DGSQ identification information includes DGSQ identification information corresponding to one or more network devices. The first network device receives the first packet sent by one or more second network devices and determines routing information based on the BGP attribute information of the first packet. The routing information includes the IP address corresponding to the second network device. The control device receives one or more of the following: P information, second DGSQ identification information corresponding to the second network device, and MPLS labels, wherein the second DGSQ identification information is obtained based on the first DGSQ identification information; a mapping table is generated based on routing information, and packets are forwarded through the mapping table; the control device receives neighbor information sent by one or more network devices, wherein the neighbor information includes at least the neighbor device information corresponding to the network device; a first DGSQ identification information and a link family table are generated based on the neighbor device information; wherein the first DGSQ identification information includes the DGSQ identification information corresponding to the network device, and the DGSQ identification information corresponding to the network device includes one or more of the following: network device number, network device port number, and priority information; the first DGSQ identification information and the link family table are sent to the first network device so that the first network device forwards packets based on the first DGSQ identification information and the link family table. Therefore, the first network device can receive the first DGSQ identification information and link family table sent by the control device, and then receive the first packet sent by one or more second network devices. It can then determine the routing information based on the BGP attribute information of the first packet. This routing information may include one or more of the IP information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and the MPLS label. This allows the first network device to generate a mapping table based on the IP information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and the MPLS label. The first network device can then forward packets through the mapping table, thereby improving the packet forwarding efficiency.

[0049] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.

[0050] Example 1

[0051] This application provides a message forwarding method, which is applied to a first network device. Figure 1 This is a schematic diagram of the message forwarding method proposed in the embodiments of this application. Figure 1 ,like Figure 1 As shown, the message forwarding method may include the following steps:

[0052] Step 101: Send neighbor information to the control device and receive the first DGSQ identification information and link family table sent by the control device; wherein, the neighbor information is used at least by the control device to generate the first DGSQ identification information and the link family table, the link family table is used at least by the second network device to send the first packet to the first network device, the link family table includes the next-hop device information corresponding to one or more network devices, and the first DGSQ identification information includes the DGSQ identification information corresponding to one or more network devices.

[0053] In embodiments of this application, the first network device can send neighbor information to the control device and receive the first DGSQ identification information and link family table sent by the control device.

[0054] It should be noted that, in the embodiments of this application, the first network device may be a network edge processing node (GSP) device, and the GSP device may include a switch device. This application does not specifically limit the type of the first network device.

[0055] It should be noted that in the embodiments of this application, the control device may be a full scheduling operating system (GSOS), and this application does not specifically limit the type of control device.

[0056] It should be noted that, in the embodiments of this application, the neighbor information may include the neighbor device information corresponding to the first network device. The first network device can discover the neighbor device information through the Link Layer Discovery Protocol (LLDP). This application does not specifically limit the types of information included in the neighbor information.

[0057] It should be noted that, in the embodiments of this application, the first DGSQ identification information includes DGSQ identification information corresponding to one or more network devices. The information content included in the DGSQ identification information is shown in Table 1 below. The DGSQ identification information may include one or more of the following: network device number (DGSP-ID), network device port number (Dport), and priority information (Pri). This application does not specifically limit the information type and quantity included in the first DGSQ identification information.

[0058] Table 1

[0059]

[0060] Step 102: Receive a first message sent by one or more second network devices, and determine routing information based on the BGP attribute information of the first message; wherein, the routing information includes one or more of the IP information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and MPLS labels, and the second DGSQ identification information is obtained based on the first DGSQ identification information.

[0061] In the embodiments of this application, after the first network device sends neighbor information to the control device and receives the first DGSQ identification information and link family table sent by the control device, it can receive a first message sent by one or more second network devices and determine routing information based on the BGP attribute information of the first message.

[0062] It should be noted that, in the embodiments of this application, Figure 2 This is a schematic diagram of the GSE network technology architecture proposed in the embodiments of this application, such as... Figure 2 As shown, the architecture mainly includes network edge processing node (GSP) devices, network core switching node (GSF) devices, and full scheduling operating system (GSOS) devices. Assuming the first network device is a GSP-A1 device, the second network device can be any network device other than the first network device; the second network device can be any other GSP device or GSF device. GPU-A and GPU-B represent graphics processors, and this application does not specifically limit the device type of the second network device.

[0063] It should be noted that, in the embodiments of this application, the routing information may include one or more of the IP information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and the MPLS label. This application does not specifically limit the number and type of information included in the routing information.

[0064] It should be noted that, in the embodiments of this application, when the first network device determines routing information based on the BGP attribute information of the first packet, it can obtain the first BGP attribute based on the BGP attribute information of the first packet; then it can determine the Global Virtual Private Network (GVPN) Network Layer Reachability Information (NLRI) based on the extended attributes under the first BGP attribute; wherein, the GVPN NLRI is used to characterize the NLRI under the GVPN sub-address family of the Layer 2 Virtual Private Network (L2VPN) address family; and then the routing information can be determined based on the GVPN NLRI.

[0065] It should be noted that, in the embodiments of this application, the BGP attribute information of the first message includes four types of Wide BGP Communities Attributes: Type 1: Wide Community (extended attribute), Type 2: BGP Wide Community 4:4, Type 3: BGP Wide Community Nx4, and Type 4: BGP Wide Community 16+Nx4. All of these attributes have the same formatted header (Common header). Figure 3 This is a schematic diagram of the Common header structure proposed in an embodiment of this application, as shown below. Figure 3 As shown, Type represents the BGP message type, Flags represents the flag field, Reserved represents the reserved field, and Length represents the total length of the BGP message.

[0066] It should be noted that, in the embodiments of this application, the first BGP attribute can be a Type 1: Wide Community attribute. This application can extend the Type 1: Wide Community attribute by adding a new extended attribute for transmitting DGSQ ID and IP mapping information between network devices. Figure 4 This is a schematic diagram of the first BGP attribute format proposed in the embodiments of this application, such as... Figure 4 As shown, the parameters and format carried by Type 1 Wide BGP Community are as follows: communityvalue indicates the type of community, which is used here to represent DGSQ ID IN GSE ROUTE TARGET; source AS Number is the AS number of the network element that generated the wide BGP community; context AS Number is the AS number of the network element that performed the operation, where the network element includes, but is not limited to, routers, (Software Defined Network, SDN) controllers, route reflectors, policy servers, etc. Figure 5 This is a schematic diagram of the TLVs format proposed in the embodiments of this application, such as... Figure 5 As shown, TLVs represent the Type (message type), length (total message length), and value carried by this attribute.

[0067] Furthermore, in the embodiments of this application, after the first network device obtains the first BGP attribute based on the BGP attribute information of the first message, it can determine the GVPN NLRI based on the extended attributes under the first BGP attribute; wherein, the GVPN NLRI is used to characterize the NLRI under the GVPN sub-address family of the Layer 2 VPN address family; and then the routing information can be determined based on the GVPN NLRI, which is shown in Table 2 below.

[0068] Table 2

[0069]

[0070] Among them, Route Type: is used to identify the GSE network type and indicate that the packet is transmitted in the GSE network; IPPrefix Length: indicates the mask length of the IP prefix; IP Prefix: indicates the IP prefix information; Next-hop: indicates the DGSQID information (second DGSQ identification information); MPLS Label: for subsequent multi-tenant address overlap scenarios.

[0071] In other words, in the embodiments of this application, the first network device can receive a first message sent by one or more second network devices, and determine routing information based on the BGP attribute information of the first message, so that the mapping relationship between DGSQ ID and IP address can be transmitted subsequently based on the corresponding routing information.

[0072] Step 103: Generate a mapping table based on the routing information, and forward packets through the mapping table; wherein, the mapping table is used to represent at least the mapping relationship between IP information and the second DGSQ identification information.

[0073] In the embodiments of this application, after receiving a first message sent by one or more second network devices and determining routing information based on the BGP attribute information of the first message, the first network device can generate a mapping table based on the routing information and forward the message through the mapping table.

[0074] It should be noted that, in the embodiments of the application, when the first network device generates a mapping table based on routing information, it can generate a first mapping table based on IP information and second DGSQ identification information, or generate a second mapping table based on IP information, second DGSQ identification information and MPLS label.

[0075] Furthermore, in the embodiments of this application, when the first network device generates the first mapping relationship table based on the IP information and the second DGSQ identification information, it can determine the first correspondence between the IP information and the second DGSQ identification information; then it can generate the first mapping relationship table based on the first correspondence.

[0076] It should be noted that, in the embodiments of the application, the IP information may include the mask length of the IP prefix and the IP prefix information. This application does not specifically limit the amount and type of information included in the IP information.

[0077] For example, in an embodiment of this application, after receiving a first message sent by one or more second network devices and determining routing information based on the BGP attribute information of the first message, the first network device can determine a first correspondence between IP information and second DGSQ identification information based on the routing information; then it can generate a first mapping table based on the first correspondence.

[0078] It should be noted that, in the embodiments of this application, when the first network device generates the second mapping relationship table based on IP information, the second DGSQ identification information, and the MPLS label, it can determine the second correspondence between IP information, the second DGSQ identification information, and the MPLS label; and then it can generate the second mapping relationship table based on the second correspondence.

[0079] In other words, in the embodiments of this application, after the first network device receives a first message sent by one or more second network devices and determines the routing information based on the BGP attribute information of the first message, it can generate two mapping relationship tables as needed based on the routing information, namely a first mapping relationship or a second mapping relationship table. For example, if there is a multi-tenant scenario, a second correspondence between IP information, second DGSQ identification information and MPLS label can be determined; and then a second mapping relationship table can be generated based on the second correspondence.

[0080] It should be noted that, in the embodiments of this application, after the first network device generates the first mapping table or the second mapping table, it can forward packets through the first mapping table or the second mapping table.

[0081] Furthermore, in the embodiments of this application, when the first network device forwards packets through the first mapping table or the second mapping table, it can, after receiving the second packet sent by the computing side, determine the third DGSQ identifier information corresponding to the target IP information in the second packet based on the first mapping table; or, determine the fourth DGSQ identifier information and the target MPLS label corresponding to the target IP information based on the second mapping table; then, it can generate a third packet based on the second packet and the third DGSQ identifier information; or, it can generate a third packet based on the second packet, the fourth DGSQ identifier information, and the target MPLS label; and then, it can forward the third packet to the third network device so that the third network device can forward packets based on the third DGSQ identifier information, or forward packets based on the fourth DGSQ identifier information and the target MPLS label.

[0082] It should be noted that, in the embodiments of this application, the computing side may include a computing card and a network card, and this application does not specifically limit the content included in the computing side.

[0083] It should be noted that, in the embodiments of this application, if the number of tenants connected to the third network device meets the preset conditions, the first network device can determine the third DGSQ identification information corresponding to the target IP information in the second message based on the first mapping relationship table; or, if the number of tenants connected to the third network device does not meet the preset conditions, the first network device can determine the fourth DGSQ identification information and the target MPLS label corresponding to the target IP information based on the second mapping relationship table.

[0084] For example, in an embodiment of this application, if the number of tenants connected to the third network device is less than 2, it is determined that the preset condition is met, and the third DGSQ identifier information corresponding to the target IP information in the second message can be determined based on the first mapping relationship table. If the number of tenants connected to the third network device is greater than or equal to 2, it is determined that the preset condition is not met, and the first network device can determine the fourth DGSQ identifier information and the target MPLS label corresponding to the target IP information based on the second mapping relationship table.

[0085] It should be noted that, in the embodiments of this application, the third network device may be an intermediate network device for the first network device to forward packets, and this application does not specifically limit the device type of the third network device.

[0086] It should be noted that, in the embodiments of this application, the number of tenants connected to the third network device can be the number of tenants connected to the destination network device for which the third network device forwards packets. This application does not specifically limit the size of the number of tenants.

[0087] It should be noted that, in the embodiments of this application, when the first network device generates a third packet based on the second packet and the third DGSQ identification information; or, when generating a third packet based on the second packet, the fourth DGSQ identification information, and the target MPLS label, the third DGSQ identification information can be encapsulated into the header of the second packet to generate the third packet; or, the fourth DGSQ identification information and the target MPLS label can be encapsulated into the header of the second packet to generate the third packet.

[0088] For example, in the embodiments of this application, Figure 6 This is a schematic diagram of the message forwarding method proposed in the embodiments of this application. Figure 2 ,like Figure 6 As shown, when tenant 1 sends a message to tenant 3, after receiving the second message, the first network device (source GSP) can determine the fourth DGSQ identifier information and the target MPLS label (100) corresponding to the target IP information in the second message based on the second mapping table. Then, it can encapsulate the fourth DGSQ identifier information and the target MPLS label into the header of the second message to generate the third message. The third message can then be forwarded to the third network device (GSF) so that the third network device can determine the next-hop device information based on the fourth DGSQ identifier information for message forwarding. Finally, after reaching the destination GSP device, the destination GSP device can determine whether the message is sent to tenant 3 or tenant 4 based on the target MPLS label (100).

[0089] In other words, in the embodiments of this application, the first network device can learn the mapping relationship between the DGSQ ID and IP of other second network devices based on routing information. When forwarding packets to that network segment or IP, it can directly look up the mapping relationship table between IP and DGSQ ID locally for forwarding and encapsulate the DGSQ-ID information into the GSE packet header. Subsequent forwarding no longer needs to check the IP address for forwarding. The intermediate GSF device (third network device) can look up the next-hop device information based on the DGSQ ID for forwarding, thereby greatly improving the packet forwarding efficiency.

[0090] In summary, the first network device can receive a first packet sent by one or more second network devices, and determine routing information based on the BGP attribute information of the first packet. It can then generate a first mapping table based on the IP information and second DGSQ identifier information in the routing information, or generate a second mapping table based on the IP information, second DGSQ identifier information, and MPLS label in the routing information. After receiving a second packet sent by the computing side, it can determine the third DGSQ identifier information corresponding to the target IP information in the second packet based on the first mapping table; or determine the fourth DGSQ identifier information and target MPLS label corresponding to the target IP information based on the second mapping table. Then, it can generate a third packet based on the second packet and the third DGSQ identifier information; or, it can generate a third packet based on the second packet, the fourth DGSQ identifier information, and the target MPLS label. Finally, it can forward the third packet to a third network device, enabling the third network device to forward the packet based on the third DGSQ identifier information, or based on the fourth DGSQ identifier information and the target MPLS label, thereby improving packet forwarding efficiency.

[0091] This application provides a packet forwarding method. The method is applied to a first network device. The first network device sends neighbor information to a control device and receives first DGSQ identification information and a link family table from the control device. The neighbor information is used at least by the control device to generate the first DGSQ identification information and the link family table. The link family table is used at least by a second network device to send a first packet to the first network device. The link family table includes next-hop device information corresponding to one or more network devices. The first DGSQ identification information includes DGSQ identification information corresponding to one or more network devices. The method receives the first packet sent by one or more second network devices and determines routing information based on the BGP attribute information of the first packet. The routing information includes one or more of the IP information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and MPLS labels. The second DGSQ identification information is obtained based on the first DGSQ identification information. A mapping table is generated based on the routing information, and packet forwarding is performed through the mapping table. Therefore, the first network device can receive the first DGSQ identification information and link family table sent by the control device, and then receive the first packet sent by one or more second network devices. It can then determine the routing information based on the BGP attribute information of the first packet. This routing information may include one or more of the IP information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and the MPLS label. This allows the first network device to generate a mapping table based on the IP information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and the MPLS label. The first network device can then forward packets through the mapping table, thereby improving the packet forwarding efficiency.

[0092] Example 2

[0093] Based on the above embodiments, another embodiment of this application provides a message forwarding method, which is applied to a control device. Figure 7 This is a schematic diagram of the message forwarding method proposed in the embodiments of this application. Figure 3 ,like Figure 7 As shown, the message forwarding method may include the following steps:

[0094] Step 201: Receive neighbor information sent by one or more network devices; wherein the neighbor information includes at least the neighbor device information corresponding to the network device.

[0095] In embodiments of this application, the control device may receive neighbor information sent by one or more network devices; wherein the neighbor information includes at least the neighbor device information corresponding to the network device.

[0096] It should be noted that in the embodiments of this application, the control device may be a full scheduling operating system (GSOS), and this application does not specifically limit the type of control device.

[0097] It should be noted that, in the embodiments of this application, the control device can receive neighbor information sent by one or more network devices. For example, it can receive neighbor information sent by a first network device or neighbor information sent by one or more second network devices.

[0098] It should be noted that, in the embodiments of this application, the neighbor information may include the neighbor device information corresponding to the network device, and this application does not specifically limit the types of information included in the neighbor information.

[0099] It should be noted that, in the embodiments of this application, after receiving neighbor information sent by one or more network devices, the control device can obtain the interconnection interfaces of all network devices and then send the connection relationship table to all network devices.

[0100] Step 202: Generate first DGSQ identification information and link family table based on neighbor device information; wherein, the first DGSQ identification information includes DGSQ identification information corresponding to the network device, and the DGSQ identification information corresponding to the network device includes one or more of the following: network device number, network device port number, and priority information.

[0101] In embodiments of this application, after receiving neighbor information sent by one or more network devices, the control device can generate first DGSQ identification information and a link family table based on the neighbor device information.

[0102] It should be noted that, in the embodiments of this application, as shown in Table 3 below, the DGSQ identification information corresponding to the network device may include one or more of the following: network device number (GSP-ID), network device port number, and priority information. This application does not specifically limit the information type and quantity included in the DGSQ identification information corresponding to the network device.

[0103] Table 3

[0104] GSP-ID port Priority DGSQ-ID GSP-B2 2 / 1 0 GSP-B2-2 / 1-0

[0105] Step 203: Send the first DGSQ identification information and the link family table to the first network device so that the first network device can forward packets based on the first DGSQ identification information and the link family table.

[0106] In the embodiments of this application, after the control device generates the first DGSQ identification information and the link family table based on the neighbor device information, it can send the first DGSQ identification information and the link family table to the first network device so that the first network device can forward packets based on the first DGSQ identification information and the link family table.

[0107] It should be noted that, in the embodiments of this application, the control device may also send the first DGSQ identification information and the link family table to one or more second network devices, so that the second network devices generate a first packet based on the IP information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and the MPLS label, and send the first packet to the first network device based on the link family table; wherein, the second DGSQ identification information is obtained based on the first DGSQ identification information.

[0108] In other words, in the embodiments of this application, the control device can aggregate the port information of all network devices, arrange the global first DGSQ identifier information, and send the first DGSQ identifier information to all network devices.

[0109] In summary, the control device can send the first DGSQ identification information and the link family table to the first network device, and can also send the first DGSQ identification information and the link family table to one or more second network devices. This allows the second network devices to generate a first packet based on the IP information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and the MPLS label. The first packet is then sent to the first network device based on the link family table. This enables the first network device to determine routing information based on the BGP attribute information of the first packet and generate a mapping table based on the routing information. Packet forwarding can then be performed through the mapping table, thereby improving packet forwarding efficiency.

[0110] This application provides a packet forwarding method applied to a control device. The control device receives neighbor information sent by one or more network devices. The neighbor information includes at least neighbor device information corresponding to the network device. Based on the neighbor device information, a first DGSQ identifier and a link family table are generated. The first DGSQ identifier includes DGSQ identifier information corresponding to the network device, which includes one or more of the following: network device number, network device port number, and priority information. The first DGSQ identifier and the link family table are sent to a first network device, enabling the first network device to forward packets based on the first DGSQ identifier and the link family table. Therefore, the control device can generate the first DGSQ identifier and the link family table based on the neighbor device information. The first DGSQ identifier can include DGSQ identifier information corresponding to all network devices globally. Then, the control device can send the first DGSQ identifier and the link family table to the first network device, enabling the first network device to forward packets based on the first DGSQ identifier and the link family table, thereby improving packet forwarding efficiency.

[0111] Example 3

[0112] Based on the above embodiments, another embodiment of this application provides a message forwarding method, which is applied to a first network device and a control device. Figure 8 This is a schematic diagram of the message forwarding method proposed in the embodiments of this application. Figure 4 ,like Figure 8 As shown, the message forwarding method may include the following steps:

[0113] Step 301: The control device receives neighbor information sent by one or more network devices; wherein the neighbor information includes at least the neighbor device information corresponding to the network device.

[0114] It should be noted that in the embodiments of this application, the control device may be a full scheduling operating system (GSOS), and this application does not specifically limit the type of control device.

[0115] It should be noted that, in the embodiments of this application, the control device can receive neighbor information sent by one or more network devices. For example, it can receive neighbor information sent by a first network device or neighbor information sent by one or more second network devices.

[0116] It should be noted that, in the embodiments of this application, the neighbor information may include the neighbor device information corresponding to the network device, and this application does not specifically limit the types of information included in the neighbor information.

[0117] It should be noted that, in the embodiments of this application, after receiving neighbor information sent by one or more network devices, the control device can obtain the interconnection interfaces of all network devices and then send the connection relationship table to all network devices.

[0118] Step 302: The control device generates first DGSQ identification information and a link family table based on the neighbor device information; wherein, the first DGSQ identification information includes the DGSQ identification information corresponding to the network device, and the DGSQ identification information corresponding to the network device includes one or more of the following: network device number, network device port number, and priority information.

[0119] It should be noted that, in the embodiments of this application, as shown in Table 3 above, the DGSQ identification information corresponding to the network device may include one or more of the network device number (GSP-ID), network device port number, and priority information. This application does not specifically limit the information type and quantity included in the DGSQ identification information corresponding to the network device.

[0120] Step 303: The control device sends the first DGSQ identification information and the link family table to the first network device.

[0121] It should be noted that, in the embodiments of this application, the control device may also send the first DGSQ identification information and the link family table to one or more second network devices, so that the second network devices generate a first packet based on the IP information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and the MPLS label, and send the first packet to the first network device based on the link family table; wherein, the second DGSQ identification information is obtained based on the first DGSQ identification information.

[0122] In other words, in the embodiments of this application, the control device can aggregate the port information of all network devices, arrange the global first DGSQ identifier information, and send the first DGSQ identifier information to all network devices.

[0123] Step 304: The first network device receives a first message sent by one or more second network devices, and determines routing information based on the BGP attribute information of the first message; wherein, the routing information includes one or more of the IP information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and MPLS labels, and the second DGSQ identification information is obtained based on the first DGSQ identification information.

[0124] It should be noted that, in the embodiments of this application, as... Figure 2As shown, the GSE network architecture mainly includes network edge processing node (GSP) devices, network core switching node (GSF) devices, and full scheduling operating system (GSOS) devices. Assuming the first network device is a GSP-A1 device, the second network device can be any network device other than the first network device. The second network device can be any other GSP device or GSF device; this application does not specifically limit the type of the second network device.

[0125] It should be noted that, in the embodiments of this application, the routing information may include one or more of the IP information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and the MPLS label. This application does not specifically limit the number and type of information included in the routing information.

[0126] It should be noted that, in the embodiments of this application, when the first network device determines routing information based on the BGP attribute information of the first packet, it can obtain the first BGP attribute based on the BGP attribute information of the first packet; then it can determine the Global Virtual Private Network (GVPN) Network Layer Reachability Information (NLRI) based on the extended attributes under the first BGP attribute; wherein, the GVPN NLRI is used to characterize the NLRI under the GVPN sub-address family of the Layer 2 VPN address family; and then the routing information can be determined based on the GVPN NLRI.

[0127] It should be noted that, in the embodiments of this application, the BGP attribute information of the first message includes four types of Wide BGP Communities Attributes, namely: Type 1: Wide Community (extended attribute), Type 2: BGP Wide Community 4:4, Type 3: BGP Wide Community Nx4, and Type 4: BGP Wide Community 16+Nx4. All of the above attributes have the same format header (Common header), such as... Figure 3 As shown, Type represents the BGP message type, Flags represents the flag field, Reserved represents the reserved field, and Length represents the total length of the BGP message.

[0128] It should be noted that, in the embodiments of this application, the first BGP attribute can be a Type 1: Wide Community attribute. This application can extend the Type 1: Wide Community attribute by adding a new extended attribute for transmitting DGSQ ID and IP mapping information between network devices, such as... Figure 4 As shown, the parameters and format carried by Type 1 Wide BGP Community are as follows: The community value indicates the type of community, here used to represent DGSQ ID IN GSE ROUTE TARGET; the source AS Number is the AS number of the network element that generated the wide BGP community; and the context AS Number is the AS number of the network element that performed the operation. These network elements include, but are not limited to, routers, Software Defined Network (SDN) controllers, route reflectors, policy servers, etc. Figure 5 As shown, TLVs represent the Type (message type), length (total message length), and value carried by this attribute.

[0129] Furthermore, in the embodiments of this application, after the first network device obtains the first BGP attribute based on the BGP attribute information of the first message, it can determine the GVPN NLRI based on the extended attributes under the first BGP attribute; wherein, the GVPN NLRI is used to characterize the NLRI under the GVPN sub-address family of the Layer 2 VPN address family; and then the routing information can be determined based on the GVPN NLRI, which is shown in Table 2 above.

[0130] In other words, in the embodiments of this application, the first network device can receive a first message sent by one or more second network devices, and determine routing information based on the BGP attribute information of the first message, so that the mapping relationship between DGSQ ID and IP address can be transmitted subsequently based on the corresponding routing information.

[0131] Step 305: The first network device generates a mapping table based on the routing information and forwards packets through the mapping table; wherein, the mapping table is used at least to represent the mapping relationship between IP information and the second DGSQ identification information.

[0132] It should be noted that, in the embodiments of the application, when the first network device generates a mapping table based on routing information, it can generate a first mapping table based on IP information and second DGSQ identification information, or generate a second mapping table based on IP information, second DGSQ identification information and MPLS label.

[0133] Furthermore, in the embodiments of this application, when the first network device generates the first mapping relationship table based on the IP information and the second DGSQ identification information, it can determine the first correspondence between the IP information and the second DGSQ identification information; then it can generate the first mapping relationship table based on the first correspondence.

[0134] It should be noted that, in the embodiments of the application, the IP information may include the mask length of the IP prefix and the IP prefix information. This application does not specifically limit the amount and type of information included in the IP information.

[0135] For example, in an embodiment of this application, after receiving a first message sent by one or more second network devices and determining routing information based on the BGP attribute information of the first message, the first network device can determine a first correspondence between IP information and second DGSQ identification information based on the routing information; then it can generate a first mapping table based on the first correspondence.

[0136] It should be noted that, in the embodiments of this application, when the first network device generates the second mapping relationship table based on IP information, the second DGSQ identification information, and the MPLS label, it can determine the second correspondence between IP information, the second DGSQ identification information, and the MPLS label; and then it can generate the second mapping relationship table based on the second correspondence.

[0137] In other words, in the embodiments of this application, after the first network device receives a first message sent by one or more second network devices and determines the routing information based on the BGP attribute information of the first message, it can generate two mapping relationship tables as needed based on the routing information, namely a first mapping relationship or a second mapping relationship table. For example, if there is a multi-tenant scenario, a second correspondence between IP information, second DGSQ identification information and MPLS label can be determined; and then a second mapping relationship table can be generated based on the second correspondence.

[0138] It should be noted that, in the embodiments of this application, after the first network device generates the first mapping table or the second mapping table, it can forward packets through the first mapping table or the second mapping table.

[0139] Furthermore, in the embodiments of this application, when the first network device forwards packets through the first mapping table or the second mapping table, it can, after receiving the second packet sent by the computing side, determine the third DGSQ identifier information corresponding to the target IP information in the second packet based on the first mapping table; or, determine the fourth DGSQ identifier information and the target MPLS label corresponding to the target IP information based on the second mapping table; then, it can generate a third packet based on the second packet and the third DGSQ identifier information; or, it can generate a third packet based on the second packet, the fourth DGSQ identifier information, and the target MPLS label; and then, it can forward the third packet to the third network device so that the third network device can forward packets based on the third DGSQ identifier information, or forward packets based on the fourth DGSQ identifier information and the target MPLS label.

[0140] It should be noted that, in the embodiments of this application, the computing side may include a computing card and a network card, and this application does not specifically limit the content included in the computing side.

[0141] It should be noted that, in the embodiments of this application, if the number of tenants connected to the third network device meets the preset conditions, the first network device can determine the third DGSQ identification information corresponding to the target IP information in the second message based on the first mapping relationship table; or, if the number of tenants connected to the third network device does not meet the preset conditions, the first network device can determine the fourth DGSQ identification information and the target MPLS label corresponding to the target IP information based on the second mapping relationship table.

[0142] For example, in an embodiment of this application, if the number of tenants connected to the third network device is less than 2, it is determined that the preset condition is met, and the third DGSQ identifier information corresponding to the target IP information in the second message can be determined based on the first mapping relationship table. If the number of tenants connected to the third network device is greater than or equal to 2, it is determined that the preset condition is not met, and the first network device can determine the fourth DGSQ identifier information and the target MPLS label corresponding to the target IP information based on the second mapping relationship table.

[0143] It should be noted that, in the embodiments of this application, the third network device may be an intermediate network device for the first network device to forward packets, and this application does not specifically limit the device type of the third network device.

[0144] It should be noted that, in the embodiments of this application, the number of tenants connected to the third network device can be the number of tenants connected to the destination network device for which the third network device forwards packets. This application does not specifically limit the size of the number of tenants.

[0145] It should be noted that, in the embodiments of this application, when the first network device generates a third packet based on the second packet and the third DGSQ identification information; or, when generating a third packet based on the second packet, the fourth DGSQ identification information, and the target MPLS label, the third DGSQ identification information can be encapsulated into the header of the second packet to generate the third packet; or, the fourth DGSQ identification information and the target MPLS label can be encapsulated into the header of the second packet to generate the third packet.

[0146] For example, in the embodiments of this application, such as Figure 6 As shown, when tenant 1 sends a message to tenant 3, after receiving the second message, the first network device (source GSP) can determine the fourth DGSQ identifier information and the target MPLS label (100) corresponding to the target IP information in the second message based on the second mapping table. Then, it can encapsulate the fourth DGSQ identifier information and the target MPLS label into the header of the second message to generate the third message. The third message can then be forwarded to the third network device (GSF) so that the third network device can determine the next-hop device information based on the fourth DGSQ identifier information for message forwarding. Finally, after reaching the destination GSP device, the destination GSP device can determine whether the message is sent to tenant 3 or tenant 4 based on the target MPLS label (100).

[0147] In other words, in the embodiments of this application, the first network device can learn the mapping relationship between the DGSQ ID and IP of other second network devices based on routing information. When forwarding packets to that network segment or IP, it can directly look up the mapping relationship table between IP and DGSQ ID locally for forwarding and encapsulate the DGSQ-ID information into the GSE packet header. Subsequent forwarding no longer needs to check the IP address for forwarding. The intermediate GSF device (third network device) can look up the next-hop device information based on the DGSQ ID for forwarding, thereby greatly improving the packet forwarding efficiency.

[0148] In summary, the first network device can receive a first packet sent by one or more second network devices, and determine routing information based on the BGP attribute information of the first packet. It can then generate a first mapping table based on the IP information and second DGSQ identifier information in the routing information, or generate a second mapping table based on the IP information, second DGSQ identifier information, and MPLS label in the routing information. After receiving a second packet sent by the computing side, it can determine the third DGSQ identifier information corresponding to the target IP information in the second packet based on the first mapping table; or determine the fourth DGSQ identifier information and target MPLS label corresponding to the target IP information based on the second mapping table. Then, it can generate a third packet based on the second packet and the third DGSQ identifier information; or, it can generate a third packet based on the second packet, the fourth DGSQ identifier information, and the target MPLS label. Finally, it can forward the third packet to a third network device, enabling the third network device to forward the packet based on the third DGSQ identifier information, or based on the fourth DGSQ identifier information and the target MPLS label, thereby improving packet forwarding efficiency.

[0149] This application provides a packet forwarding method applied to a first network device and a control device. The first network device sends neighbor information to the control device and receives first DGSQ identification information and a link family table sent by the control device. The neighbor information is used at least by the control device to generate the first DGSQ identification information and the link family table. The link family table is used at least by a second network device to send a first packet to the first network device. The link family table includes next-hop device information corresponding to one or more network devices, and the first DGSQ identification information includes DGSQ identification information corresponding to one or more network devices. The method also receives the first packet sent by one or more second network devices and determines routing information based on the BGP attribute information of the first packet. The routing information includes IP information corresponding to the second network device and a second DGSQ identifier corresponding to the second network device. The system includes one or more information and MPLS labels, with the second DGSQ identification information obtained based on the first DGSQ identification information; a mapping table is generated based on routing information, and packets are forwarded through the mapping table; the control device receives neighbor information sent by one or more network devices; wherein the neighbor information includes at least the neighbor device information corresponding to the network device; the system generates the first DGSQ identification information and a link family table based on the neighbor device information; wherein the first DGSQ identification information includes the DGSQ identification information corresponding to the network device, and the DGSQ identification information corresponding to the network device includes one or more of the following: network device number, network device port number, and priority information; the system sends the first DGSQ identification information and the link family table to the first network device, so that the first network device forwards packets based on the first DGSQ identification information and the link family table. Therefore, the first network device can receive the first DGSQ identification information and link family table sent by the control device, and then receive the first packet sent by one or more second network devices. It can then determine the routing information based on the BGP attribute information of the first packet. This routing information may include one or more of the IP information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and the MPLS label. This allows the first network device to generate a mapping table based on the IP information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and the MPLS label. The first network device can then forward packets through the mapping table, thereby improving the packet forwarding efficiency.

[0150] Example 4

[0151] Based on the above embodiments, another embodiment of this application provides a packet forwarding method. This method can extend the BGP wide community (BGP attribute information) of packets by adding a new BGP wide community attribute for transmitting the mapping relationship between DGSQ IDs and IP addresses between devices. Based on the mechanism of Multiple Protocol Extended Border Gateway Protocol (MP-BGP), this application defines a new sub-address family—the Global Virtual Private Network (GVPN) address family—under the Layer 2 Virtual Private Network (L2VPN) address family. A new Network Layer Reachability Information (NLRI), namely GVPN NLRI, is added under this address family. Furthermore, a routing type suitable for GSE networks is proposed for transmitting the mapping relationship between DGSQ IDs and IP addresses. The entire network device configuration process can be completed through the GVPN route advertising and learning phases.

[0152] It should be noted that, in the embodiments of this application, as... Figure 2 As shown, the control device (GSOS) plans and orchestrates and issues device identification information to all devices, including DGSP-ID, Dport, and Pri information. These three together constitute the DGSQ ID information (the first DGSQ identification information). The information content included in the DGSQ identification information is shown in Table 1 above.

[0153] It should be noted that, in the embodiments of this application, after the network devices are connected, they discover their neighbors through the Link Layer Discovery Protocol (LLDP) and send the neighbor information to the GSOS (control device). After obtaining the interconnection interfaces of all network devices, the GSOS distributes the connection relationship table to all network devices (GSP, GSF). After the GSOS summarizes the port information of all GSPs globally, it arranges the global DGSQ ID (first DGSQ identification information) and distributes the DGSQ information (first DGSQ identification information) to all GSP devices.

[0154] It should be noted that, in the embodiments of this application, the GSOS (control device) can issue a next-hop link family table to all network devices (GSP, GSF) to reach the DGSQ, that is, the next-hop link family to reach each GSP.

[0155] For example, in an embodiment of this application, as shown in Table 4 below, the GSOS (control device) can send a link table to the GSP-A1.

[0156] Table 4

[0157]

[0158] For example, in an embodiment of this application, as shown in Table 5 below, the GSOS (control device) can send a link table to the GSF-A1.

[0159] Table 5

[0160]

[0161] It should be noted that, in the embodiments of this application, the network device can define four types of Wide BGP Communities Attributes in the BGP widecommunity (BGP attribute information) of the packet, namely: Type 1: Wide Community, Type 2: BGP Wide Community 4:4, Type 3: BGP WideCommunity Nx4, and Type 4: BGP Wide Community 16+Nx4. All of the above attributes have the same format header (Common header), such as... Figure 3 As shown.

[0162] It should be noted that in the embodiments of this application, different types of Wide BGP CommunitiesAttribute carry different parameters. This application can extend the Type 1: Wide Community attribute by adding a new extended attribute for transmitting DGSQ ID and IP mapping information between network devices, such as... Figure 4 As shown, the parameters and format carried by Type 1 WideBGP Community are as follows: The community value indicates the type of community, here used to represent DGSQ ID IN GSE ROUTE TARGET; the source AS Number is the AS number of the network element that generated the wide BGP community; and the context AS Number is the AS number of the network element that performed the operation. These network elements include, but are not limited to, routers, Software Defined Network (SDN) controllers, route reflectors, policy servers, etc. Figure 5As shown, TLVs represent the Type (message type), length (total message length), and value carried by this attribute.

[0163] It should be noted that, in the embodiments of this application, a new sub-address family—GVPN address family—is defined under the L2VPN address family based on the MP-BGP mechanism. A new NLRI, namely GVPN NLRI, is added under this address family. Furthermore, a routing type suitable for GSE networks is proposed to transmit the mapping relationship between DGSQ IDs and IP addresses. Partial format of this routing is shown in Table 2 above.

[0164] It should be noted that, in the embodiments of this application, the GVPN route publishing (phase 1) and learning (phase 2) publishing processes are as follows: Phase 1: After receiving the DGSQ ID information (first DGSQ identification information) issued by the GSOS (control device), the source GSP device (second network device) collects the local network segment routes and sends the IP network segment routes to other devices in the network through GVPN routes (routing information). The routes (routing information) contain information such as IP prefix, subnet mask length, and DGSQ ID (second DGSQ identification information).

[0165] It should be noted that, in the embodiments of this application, the source GSP network device can be any GSP network device in the GSE network, and this application does not specifically limit the type and number of source GSP network devices.

[0166] It should be noted that, in the embodiments of this application, in stage 2: after other devices in the network receive the GVPN route sent by the source GSP device (GSP-A1), they learn the IP network segment route (IP information) and the DGSQ information (second DGSQ identification information) of the source GSP node as needed, based on the RT value carried in the GVPN route (routing information), and save them to the corresponding DGSQ and IP route mapping table. When there is a change in IP address, a new device coming online, or an IP address changing from Server1 to Server2, BGP will send an update message to update the local routing table.

[0167] It should be noted that, in the embodiments of this application, other devices in the network may include all network devices (GSP, GSF) except for the source GSP network device, including the first network device, that is, the first network device can receive GVPN routes (routing information) sent by the source GSP device (GSP-A1), and can also receive GVPN routes (routing information) sent by other network devices (one or more second network devices).

[0168] It should be noted that in the embodiments of this application, if a multi-tenant scenario exists later, the network devices on both sides carry the MPLS label corresponding to the tenant when sending packets, and the field values ​​are required to be consistent to generate a logically isolated routing table. The final table of mapping relationships (IP-DGSQ-ID-MPLS label (on demand)) can be generated.

[0169] For example, in an embodiment of this application, after receiving a first message sent by one or more second network devices, the first network device can obtain a first BGP attribute (Type 1: Wide Community attribute) based on the BGP attribute information (BGP wide community) of the first message; then it can determine the Global Virtual Private Network (GVPN) Network Layer Reachability Information (NLRI) based on the extended attributes under the first BGP attribute; wherein, the GVPN NLRI is used to characterize the NLRI under the GVPN sub-address family of the Layer 2 Virtual Private Network (L2VPN) address family; and then routing information can be determined based on the GVPN NLRI.

[0170] In other words, in the embodiments of this application, the first network device can receive a first message sent by one or more second network devices, and determine routing information based on the BGP attribute information of the first message, so that the mapping relationship between DGSQ ID and IP address can be transmitted subsequently based on the corresponding routing information.

[0171] It should be noted that, in the embodiments of this application, after the first network device determines the routing information based on the BGP attribute information of the first packet, it can generate a mapping table based on the routing information and forward packets through the mapping table.

[0172] It should be noted that, in the embodiments of the application, when the first network device generates a mapping table based on routing information, it can generate a first mapping table based on IP information and second DGSQ identification information, or generate a second mapping table based on IP information, second DGSQ identification information and MPLS label.

[0173] Furthermore, in the embodiments of this application, when the first network device generates the first mapping relationship table based on the IP information and the second DGSQ identification information, it can determine the first correspondence between the IP information and the second DGSQ identification information; then it can generate the first mapping relationship table based on the first correspondence.

[0174] It should be noted that, in the embodiments of the application, the IP information may include the mask length of the IP prefix and the IP prefix information. This application does not specifically limit the amount and type of information included in the IP information.

[0175] For example, in an embodiment of this application, after receiving a first message sent by one or more second network devices and determining routing information based on the BGP attribute information of the first message, the first network device can determine a first correspondence between IP information and second DGSQ identification information based on the routing information; then it can generate a first mapping table based on the first correspondence.

[0176] It should be noted that, in the embodiments of this application, when the first network device generates the second mapping relationship table based on IP information, the second DGSQ identification information, and the MPLS label, it can determine the second correspondence between IP information, the second DGSQ identification information, and the MPLS label; and then it can generate the second mapping relationship table based on the second correspondence.

[0177] In other words, in the embodiments of this application, after the first network device receives a first message sent by one or more second network devices and determines the routing information based on the BGP attribute information of the first message, it can generate two mapping relationship tables as needed based on the routing information, namely a first mapping relationship or a second mapping relationship table. For example, if there is a multi-tenant scenario, a second correspondence between IP information, second DGSQ identification information and MPLS label can be determined; and then a second mapping relationship table can be generated based on the second correspondence.

[0178] It should be noted that, in the embodiments of this application, after the first network device generates the first mapping table or the second mapping table, it can forward packets through the first mapping table or the second mapping table.

[0179] Furthermore, in the embodiments of this application, when the first network device forwards packets through the first mapping table or the second mapping table, it can, after receiving the second packet sent by the computing side, determine the third DGSQ identifier information corresponding to the target IP information in the second packet based on the first mapping table; or, determine the fourth DGSQ identifier information and the target MPLS label corresponding to the target IP information based on the second mapping table; then, it can generate a third packet based on the second packet and the third DGSQ identifier information; or, it can generate a third packet based on the second packet, the fourth DGSQ identifier information, and the target MPLS label; and then, it can forward the third packet to the third network device so that the third network device can forward packets based on the third DGSQ identifier information, or forward packets based on the fourth DGSQ identifier information and the target MPLS label.

[0180] It should be noted that, in the embodiments of this application, the computing side may include a computing card and a network card, and this application does not specifically limit the content included in the computing side.

[0181] It should be noted that, in the embodiments of this application, if the number of tenants connected to the third network device meets the preset conditions, the first network device can determine the third DGSQ identification information corresponding to the target IP information in the second message based on the first mapping relationship table; or, if the number of tenants connected to the third network device does not meet the preset conditions, the first network device can determine the fourth DGSQ identification information and the target MPLS label corresponding to the target IP information based on the second mapping relationship table.

[0182] For example, in an embodiment of this application, if the number of tenants connected to the third network device is less than 2, it is determined that the preset condition is met, and the third DGSQ identifier information corresponding to the target IP information in the second message can be determined based on the first mapping relationship table. If the number of tenants connected to the third network device is greater than or equal to 2, it is determined that the preset condition is not met, and the first network device can determine the fourth DGSQ identifier information and the target MPLS label corresponding to the target IP information based on the second mapping relationship table.

[0183] It should be noted that, in the embodiments of this application, the third network device may be an intermediate network device for the first network device to forward packets, and this application does not specifically limit the device type of the third network device.

[0184] It should be noted that, in the embodiments of this application, the number of tenants connected to the third network device can be the number of tenants connected to the destination network device for which the third network device forwards packets. This application does not specifically limit the size of the number of tenants.

[0185] It should be noted that, in the embodiments of this application, the first network device may generate a third message based on the second message and the third DGSQ identification information; or, it may generate a third message based on the second message, the fourth DGSQ identification information, and the target MPLS label.

[0186] For example, in an embodiment of this application, the first network device may encapsulate the third DGSQ identification information into the header of the second message to generate the third message; or, it may encapsulate the fourth DGSQ identification information and the target MPLS label into the header of the second message to generate the third message.

[0187] For example, in the embodiments of this application, such as Figure 6As shown, when tenant 1 sends a message to tenant 3, after receiving the second message, the first network device (source GSP) can determine the fourth DGSQ identifier information and the target MPLS label (100) corresponding to the target IP information in the second message based on the second mapping table. Then, it can encapsulate the fourth DGSQ identifier information and the target MPLS label into the header of the second message to generate the third message. The third message can then be forwarded to the third network device (GSF) so that the third network device can determine the next-hop device information based on the fourth DGSQ identifier information for message forwarding. Finally, after reaching the destination GSP device, the destination GSP device can determine whether the message is sent to tenant 3 or tenant 4 based on the target MPLS label (100).

[0188] In other words, in the embodiments of this application, the first network device can learn the mapping relationship between the DGSQ ID and IP of other second network devices based on routing information. When forwarding packets to that network segment or IP, it can directly look up the mapping relationship table between IP and DGSQ ID locally for forwarding and encapsulate the DGSQ-ID information into the GSE packet header. Subsequent forwarding no longer needs to check the IP address for forwarding. The intermediate GSF device (third network device) can look up the next-hop device information based on the DGSQ ID for forwarding, thereby greatly improving the packet forwarding efficiency.

[0189] In summary, the first network device can receive a first packet sent by one or more second network devices, and determine routing information based on the BGP attribute information of the first packet. It can then generate a first mapping table based on the IP information and second DGSQ identifier information in the routing information, or generate a second mapping table based on the IP information, second DGSQ identifier information, and MPLS label in the routing information. After receiving a second packet sent by the computing side, it can determine the third DGSQ identifier information corresponding to the target IP information in the second packet based on the first mapping table; or determine the fourth DGSQ identifier information and target MPLS label corresponding to the target IP information based on the second mapping table. Then, it can generate a third packet based on the second packet and the third DGSQ identifier information; or, it can generate a third packet based on the second packet, the fourth DGSQ identifier information, and the target MPLS label. Finally, it can forward the third packet to a third network device, enabling the third network device to forward the packet based on the third DGSQ identifier information, or based on the fourth DGSQ identifier information and the target MPLS label, thereby improving packet forwarding efficiency.

[0190] This application provides a packet forwarding method applied to a first network device and a control device. The first network device sends neighbor information to the control device and receives first DGSQ identification information and a link family table sent by the control device. The neighbor information is used at least by the control device to generate the first DGSQ identification information and the link family table. The link family table is used at least by a second network device to send a first packet to the first network device. The link family table includes next-hop device information corresponding to one or more network devices, and the first DGSQ identification information includes DGSQ identification information corresponding to one or more network devices. The method also receives the first packet sent by one or more second network devices and determines routing information based on the BGP attribute information of the first packet. The routing information includes IP information corresponding to the second network device and a second DGSQ identifier corresponding to the second network device. The system includes one or more information and MPLS labels, with the second DGSQ identification information obtained based on the first DGSQ identification information; a mapping table is generated based on routing information, and packets are forwarded through the mapping table; the control device receives neighbor information sent by one or more network devices; wherein the neighbor information includes at least the neighbor device information corresponding to the network device; the system generates the first DGSQ identification information and a link family table based on the neighbor device information; wherein the first DGSQ identification information includes the DGSQ identification information corresponding to the network device, and the DGSQ identification information corresponding to the network device includes one or more of the following: network device number, network device port number, and priority information; the system sends the first DGSQ identification information and the link family table to the first network device, so that the first network device forwards packets based on the first DGSQ identification information and the link family table. Therefore, the first network device can receive the first DGSQ identification information and link family table sent by the control device, and then receive the first packet sent by one or more second network devices. It can then determine the routing information based on the BGP attribute information of the first packet. This routing information may include one or more of the IP information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and the MPLS label. This allows the first network device to generate a mapping table based on the IP information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and the MPLS label. The first network device can then forward packets through the mapping table, thereby improving the packet forwarding efficiency.

[0191] Example 5

[0192] Based on the above embodiments, this application provides a first network device. Figure 9 Schematic diagram of the composition structure of the first network device Figure 1 ,like Figure 9As shown, the first network device 10 includes: a first transmitting unit 11, a first receiving unit 12, a determining unit 13, a first generating unit 14, and a forwarding unit 15; wherein,

[0193] The first sending unit 11 is used to send neighbor information to the control device; wherein, the neighbor information is used at least by the control device to generate first DGSQ identification information and link family table;

[0194] The first receiving unit 12 is configured to receive the first DGSQ identification information and the link family table sent by the control device; wherein the link family table is at least used by the second network device to send a first message to the first network device, the link family table includes next-hop device information corresponding to one or more network devices, and the first DGSQ identification information includes DGSQ identification information corresponding to the one or more network devices; and to receive the first message sent by one or more second network devices.

[0195] The determining unit 13 is used to determine routing information based on the BGP attribute information of the first packet; wherein, the routing information includes one or more of the IP information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and the MPLS label, and the second DGSQ identification information is obtained based on the first DGSQ identification information;

[0196] The first generation unit 14 is used to generate a mapping relationship table based on the routing information; wherein the mapping relationship table is used at least to represent the mapping relationship between the IP information and the second DGSQ identification information;

[0197] The forwarding unit 15 is used to forward packets through the mapping table.

[0198] In the embodiments of this application, further, Figure 10 Schematic diagram of the composition structure of the first network device Figure 2 ,like Figure 10 As shown, the first network device 10 proposed in this application embodiment may further include a first processor 16, a first memory 17 storing instructions executable by the first processor 16, and further, the first network device 10 may further include a first communication interface 18 and a first bus 19 for connecting the first processor 16, the first memory 17 and the first communication interface 18.

[0199] In the embodiments of this application, the first processor 16 can be at least one of the following: Application-Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), Central Processing Unit (CPU), Controller, Microcontroller, and Microprocessor. It is understood that for different devices, the electronic device used to implement the above-mentioned processor function can also be other types, and this application embodiment does not specifically limit this. The first network device 10 may further include a first memory 17, which can be connected to the first processor 16. The first memory 17 is used to store executable program code, which includes computer operation instructions. The first memory 17 may include high-speed RAM memory and may also include non-volatile memory, such as at least two disk drives.

[0200] In embodiments of this application, the first bus 19 is used to connect the first communication interface 18, the first processor 16, and the first memory 17, as well as the mutual communication between these devices.

[0201] In embodiments of this application, the first memory 17 is used to store instructions and data.

[0202] Further, in the embodiments of this application, the first processor 16 is configured to send neighbor information to the control device and receive first DGSQ identification information and a link family table sent by the control device; wherein, the link family table includes next-hop device information corresponding to one or more network devices, and the first DGSQ identification information includes DGSQ identification information corresponding to the one or more network devices; receive a first packet sent by one or more second network devices based on the link family table, and determine routing information based on the Border Gateway Protocol (BGP) attribute information of the first packet; wherein, the routing information includes one or more of the Internet Protocol (IP) information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and a Multiprotocol Label Switching (MPLS) label, and the second DGSQ identification information is obtained based on the first DGSQ identification information; generate a mapping table based on the routing information, and forward packets through the mapping table.

[0203] In practical applications, the first memory 17 can be volatile memory, such as random-access memory (RAM); or non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); or a combination of the above types of memory, and provide instructions and data to the first processor 16.

[0204] This application provides a first network device that sends neighbor information to a control device and receives first DGSQ identification information and a link family table from the control device. The neighbor information is used at least by the control device to generate the first DGSQ identification information and the link family table. The link family table is used at least by a second network device to send a first packet to the first network device. The link family table includes next-hop device information corresponding to one or more network devices. The first DGSQ identification information includes DGSQ identification information corresponding to one or more network devices. The device receives the first packet sent by one or more second network devices and determines routing information based on the BGP attribute information of the first packet. The routing information includes one or more of the IP information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and MPLS labels. The second DGSQ identification information is obtained based on the first DGSQ identification information. A mapping table is generated based on the routing information, and packets are forwarded through the mapping table. Therefore, the first network device can receive the first DGSQ identification information and link family table sent by the control device, and then receive the first packet sent by one or more second network devices. It can then determine the routing information based on the BGP attribute information of the first packet. This routing information may include one or more of the IP information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and the MPLS label. This allows the first network device to generate a mapping table based on the IP information corresponding to the second network device, the second DGSQ identification information corresponding to the second network device, and the MPLS label. The first network device can then forward packets through the mapping table, thereby improving the packet forwarding efficiency.

[0205] This application provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements the message forwarding method described above.

[0206] Specifically, the program instructions corresponding to a message forwarding method in this embodiment can be stored on storage media such as optical discs, hard disks, and USB flash drives. When the program instructions corresponding to a message forwarding method in the storage media are read or executed by an electronic device, the following steps are included:

[0207] The system sends neighbor information to the control device and receives first dynamic global scheduling queue (DGSQ) identifier information and link family table sent by the control device; wherein, the neighbor information is at least used by the control device to generate the first DGSQ identifier information and the link family table, the link family table is at least used by the second network device to send a first packet to the first network device, the link family table includes next-hop device information corresponding to one or more network devices, and the first DGSQ identifier information includes DGSQ identifier information corresponding to the one or more network devices;

[0208] The system receives the first message sent by one or more of the second network devices and determines routing information based on the Border Gateway Protocol (BGP) attribute information of the first message; wherein the routing information includes one or more of the Internet Protocol (IP) information corresponding to the second network device, the second DGSQ identifier information corresponding to the second network device, and the Multiprotocol Label Switching (MPLS) label, and the second DGSQ identifier information is obtained based on the first DGSQ identifier information;

[0209] A mapping table is generated based on the routing information, and packets are forwarded through the mapping table; wherein, the mapping table is at least used to represent the mapping relationship between the IP information and the second DGSQ identification information.

[0210] This application also provides a computer program product, including a computer program that can be executed by a first processor 16 of a first network device 10 to perform the steps described in any of the foregoing methods.

[0211] In the embodiments of this application, further, Figure 11 Schematic diagram of the control equipment's composition. Figure 1 ,like Figure 11 As shown, the control device 20 includes: a second receiving unit 21, a second generating unit 22, and a second transmitting unit 23; wherein,

[0212] The second receiving unit 21 is configured to receive neighbor information sent by one or more network devices; wherein the neighbor information includes at least neighbor device information corresponding to the network device;

[0213] The second generation unit 22 is used to generate first DGSQ identification information and a link family table based on the neighbor device information; wherein, the first DGSQ identification information includes DGSQ identification information corresponding to the network device, and the DGSQ identification information corresponding to the network device includes one or more of the following: network device number, network device port number, and priority information;

[0214] The second sending unit 23 is used to send the first DGSQ identification information and the link family table to the first network device, so that the first network device forwards packets based on the first DGSQ identification information and the link family table.

[0215] In the embodiments of this application, further, Figure 12 Schematic diagram of the control equipment's composition. Figure 2 ,like Figure 12 As shown, the control device 20 proposed in this application embodiment may further include a second processor 24, a second memory 25 storing instructions executable by the second processor 24, and further, the control device 20 may further include a second communication interface 26 and a second bus 27 for connecting the second processor 24, the second memory 25 and the second communication interface 26.

[0216] In the embodiments of this application, the second processor 24 can be at least one of the following: Application-Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field-Programmable Gate Array (FPGA), Central Processing Unit (CPU), controller, microcontroller, and microprocessor. It is understood that for different devices, the electronic device used to implement the above-mentioned processor function can also be other types, and this application embodiment does not specifically limit this. The control device 20 may also include a second memory 25, which can be connected to the second processor 24. The second memory 25 is used to store executable program code, which includes computer operation instructions. The second memory 25 may include high-speed RAM memory and may also include non-volatile memory, such as at least two disk drives.

[0217] In embodiments of this application, the second bus 27 is used to connect the second communication interface 26, the second processor 24, and the second memory 25, as well as the mutual communication between these devices.

[0218] In embodiments of this application, the second memory 25 is used to store instructions and data.

[0219] Further, in an embodiment of this application, the second processor 24 is configured to receive neighbor information sent by one or more network devices; wherein the neighbor information includes at least neighbor device information corresponding to the network device; generate first DGSQ identification information and a link family table based on the neighbor device information; wherein the first DGSQ identification information includes DGSQ identification information corresponding to the network device, and the DGSQ identification information corresponding to the network device includes one or more of network device number, network device port number, and priority information; and send the first DGSQ identification information and the link family table to the first network device, so that the first network device forwards packets based on the first DGSQ identification information and the link family table.

[0220] In practical applications, the second memory 25 can be volatile memory, such as random-access memory (RAM); or non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); or a combination of the above types of memory, and provide instructions and data to the second processor 24.

[0221] This application provides a control device that receives neighbor information sent by one or more network devices. The neighbor information includes at least neighbor device information corresponding to the network devices. Based on the neighbor device information, the control device generates first DGSQ identification information and a link family table. The first DGSQ identification information includes DGSQ identification information corresponding to the network devices, which includes one or more of the following: network device number, network device port number, and priority information. The control device sends the first DGSQ identification information and the link family table to a first network device, enabling the first network device to forward packets based on the first DGSQ identification information and the link family table. Therefore, the control device can generate the first DGSQ identification information and the link family table based on the neighbor device information. The first DGSQ identification information may include DGSQ identification information corresponding to all network devices globally. Then, the control device can send the first DGSQ identification information and the link family table to the first network device, enabling the first network device to forward packets based on the first DGSQ identification information and the link family table, thereby improving packet forwarding efficiency.

[0222] This application provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements the message forwarding method described above.

[0223] Specifically, the program instructions corresponding to a message forwarding method in this embodiment can be stored on storage media such as optical discs, hard disks, and USB flash drives. When the program instructions corresponding to a message forwarding method in the storage media are read or executed by an electronic device, the following steps are included:

[0224] Receive neighbor information sent by one or more network devices; wherein the neighbor information includes at least the neighbor device information corresponding to the network device;

[0225] A first DGSQ identifier and a link family table are generated based on the neighbor device information; wherein, the first DGSQ identifier includes the DGSQ identifier corresponding to the network device, and the DGSQ identifier corresponding to the network device includes one or more of the following: network device number, network device port number, and priority information;

[0226] The first DGSQ identification information and the link family table are sent to the first network device so that the first network device can forward packets based on the first DGSQ identification information and the link family table.

[0227] This application also provides a computer program product, including a computer program that can be executed by a second processor 24 of a control device 20 to perform the steps described in any of the foregoing methods.

[0228] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0229] This application is described with reference to schematic and / or block diagrams of implementations of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the schematic and / or block diagrams can be implemented by computer program instructions, and combinations of blocks in the schematic and / or block diagrams can be implemented. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the schematic and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0230] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in the implementation flow diagram. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0231] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0232] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application.

Claims

1. A packet forwarding method, characterized by, The method is applied to a first network device, and the method comprises: sending neighbor information to a control device, and receiving first dynamic global scheduling queue (DGSQ) identification information and a link family table sent by the control device; wherein the neighbor information is used at least for the control device to generate the first DGSQ identification information and the link family table, the link family table is used at least for a second network device to send a first message to the first network device, the link family table comprises next hop device information corresponding to one or more network devices, and the first DGSQ identification information comprises DGSQ identification information corresponding to the one or more network devices; receiving the first message sent by one or more second network devices, and determining routing information based on boundary gateway protocol (BGP) attribute information of the first message; wherein the routing information comprises one or more of internet protocol (IP) information corresponding to the second network device, second DGSQ identification information corresponding to the second network device, and a multi-protocol label switching (MPLS) label, and the second DGSQ identification information is obtained based on the first DGSQ identification information; generating a mapping relationship table based on the routing information, and forwarding a message through the mapping relationship table; wherein the mapping relationship table is used at least to represent a mapping relationship between the IP information and the second DGSQ identification information.

2. The method of claim 1, wherein, The method of determining the routing information based on the BGP attribute information of the first message comprises: obtaining first BGP attribute based on the BGP attribute information of the first message; determining global private virtual network network layer reachability information (GVPN NLRI) based on an extended attribute under the first BGP attribute; wherein the GVPN NLRI is used to represent NLRI under a GVPN sub-address family of a layer two virtual private network (L2VPN) address family; determining the routing information based on the GVPN NLRI.

3. The method of claim 1, wherein, The method of generating the mapping relationship table based on the routing information comprises: generating a first mapping relationship table based on the IP information and the second DGSQ identification information, or generating a second mapping relationship table based on the IP information, the second DGSQ identification information, and the MPLS label.

4. The method of claim 3, wherein, The method of generating the first mapping relationship table based on the IP information and the second DGSQ identification information comprises: determining a first correspondence relationship between the IP information and the second DGSQ identification information; wherein the IP information at least comprises a mask length of an IP prefix and IP prefix information; generating the first mapping relationship table based on the first correspondence relationship.

5. The method of claim 3, wherein, The method of generating the second mapping relationship table based on the IP information, the second DGSQ identification information, and the MPLS label comprises: determining a second correspondence relationship among the IP information, the second DGSQ identification information, and the MPLS label; generating the second mapping relationship table based on the second correspondence relationship.

6. The method according to claim 4 or 5, characterized in that, The method of forwarding the message through the mapping relationship table comprises: determining third DGSQ identification information corresponding to target IP information in the second packet based on a first mapping relationship table, or determining fourth DGSQ identification information and target MPLS label corresponding to the target IP information based on a second mapping relationship table, wherein the computing side includes a computing card and a network card; generating a third packet based on the second packet and the third DGSQ identification information, or generating the third packet based on the second packet, the fourth DGSQ identification information and the target MPLS label; forwarding the third packet to a third network device, so that the third network device performs packet forwarding based on the third DGSQ identification information, or performs packet forwarding based on the fourth DGSQ identification information and the target MPLS label.

7. The method of claim 6, wherein, determining third DGSQ identification information corresponding to target IP information in the second packet based on a first mapping relationship table, or determining fourth DGSQ identification information and target MPLS label corresponding to the target IP information based on a second mapping relationship table, including: if the number of tenants connected to the third network device satisfies a preset condition, determining third DGSQ identification information corresponding to target IP information in the second packet based on the first mapping relationship table; or if the number of tenants connected to the third network device does not satisfy the preset condition, determining fourth DGSQ identification information and target MPLS label corresponding to the target IP information based on the second mapping relationship table.

8. The method of claim 6, wherein, generating a third packet based on the second packet and the third DGSQ identification information, or generating the third packet based on the second packet, the fourth DGSQ identification information and the target MPLS label, including: encapsulating the third DGSQ identification information into a packet header of the second packet to generate the third packet, or encapsulating the fourth DGSQ identification information and the target MPLS label into a packet header of the second packet to generate the third packet.

9. A method of forwarding a packet, the method comprising: The method is applied to a control device, and the method includes: receiving neighbor information sent by one or more network devices; wherein the neighbor information at least includes neighbor device information corresponding to the network device; generating first DGSQ identification information and a link family table based on the neighbor device information; wherein the first DGSQ identification information includes DGSQ identification information corresponding to the network device, and the DGSQ identification information corresponding to the network device includes one or more of network device number, network device port number and priority information; sending the first DGSQ identification information and the link family table to a first network device; The first DGSQ identification information and the link family table are sent to one or more second network devices, so that the second network devices generate first packets based on IP information corresponding to the second network devices, second DGSQ identification information corresponding to the second network devices and MPLS labels, and send the first packets to the first network device based on the link family table; wherein the second DGSQ identification information is obtained based on the first DGSQ identification information, so that the first network device determines routing information based on BGP attribute information of the first packets, and generates a mapping relationship table based on the routing information, so as to perform packet forwarding through the mapping relationship table, and the mapping relationship table is used at least to represent a mapping relationship between the IP information and the second DGSQ identification information.

10. A first network device, comprising: The first network device comprises a first sending unit, a first receiving unit, a determining unit, a first generating unit and a forwarding unit; wherein, The first sending unit is configured to send neighbor information to a control device; wherein the neighbor information is used at least for the control device to generate first DGSQ identification information and a link family table; The first receiving unit is configured to receive the first DGSQ identification information and the link family table sent by the control device; wherein the link family table is used at least for a second network device to send first packets to the first network device, the link family table comprises next-hop device information corresponding to one or more network devices, and the first DGSQ identification information comprises DGSQ identification information corresponding to the one or more network devices; and receive the first packets sent by one or more second network devices; The determining unit is configured to determine routing information based on BGP attribute information of the first packets; wherein the routing information comprises one or more of IP information corresponding to the second network devices, second DGSQ identification information corresponding to the second network devices and MPLS labels, and the second DGSQ identification information is obtained based on the first DGSQ identification information; The first generating unit is configured to generate a mapping relationship table based on the routing information; wherein the mapping relationship table is used at least to represent a mapping relationship between the IP information and the second DGSQ identification information; The forwarding unit is configured to perform packet forwarding through the mapping relationship table.

11. A first network device, comprising: The first network device comprises a first processor and a first memory; wherein, The first memory is configured to store a computer program capable of running on the processor; The first processor is configured to execute the method in any one of claims 1-8 when running the computer program.

12. A control device characterized by comprising: The control device comprises a second receiving unit, a second generating unit and a second sending unit; wherein, The second receiving unit is configured to receive neighbor information sent by one or more network devices; wherein the neighbor information comprises at least neighbor device information corresponding to the network devices; The second generating unit is configured to generate first DGSQ identification information and a link family table based on the neighbor information; wherein the first DGSQ identification information comprises DGSQ identification information corresponding to the one or more network devices, and the link family table comprises next-hop device information corresponding to the one or more network devices; and The second sending unit is configured to send the first DGSQ identification information and the link family table to the first network device. The second generating unit is configured to generate first DGSQ identification information and a link family table based on the neighbor device information; the first DGSQ identification information comprises DGSQ identification information corresponding to the network device, and the DGSQ identification information corresponding to the network device comprises one or more of a network device number, a network device port number, and priority information; The second sending unit is configured to send the first DGSQ identification information and the link family table to the first network device, and send the first DGSQ identification information and the link family table to one or more second network devices, so that the second network devices generate first packets based on IP information corresponding to the second network devices, second DGSQ identification information corresponding to the second network devices, and MPLS labels, and send the first packets to the first network device based on the link family table; the second DGSQ identification information is obtained based on the first DGSQ identification information, so that the first network device determines routing information based on BGP attribute information of the first packets, and generates a mapping relationship table based on the routing information, so as to perform packet forwarding through the mapping relationship table; the mapping relationship table is used to represent at least a mapping relationship between the IP information and the second DGSQ identification information.

13. A control device characterized by comprising: The control device comprises a second processor and a second memory; wherein The second memory is configured to store a computer program capable of running on the processor; The second processor is configured to execute the method according to any one of claims 9 when running the computer program.

14. A computer-readable storage medium, characterized in that, The storage medium stores computer program code, which, when executed by a computer, executes the method according to any one of claims 1-8 or 9.

15. A computer program product comprising a computer program, characterized in that, The computer program, when executed by a processor, implements the method according to any one of claims 1-8 or 9.

Citation Information

Patent Citations

  • Message processing method and device

    CN114006953A

  • Computing power resource scheduling method and device, electronic equipment and medium

    CN114978978A