Packet forwarding method, system, network device, storage medium and program product
Patent Information
- Application Number
- PCT/CN2026/080371
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-04-14
- Filing Date
- 2026-02-27
- Publication Date
- 2026-10-22
Smart Images

Figure CN2026080371_22102026_PF_FP_ABST
Abstract
Description
Message forwarding methods, systems, network devices, storage media and software products
[0001] This disclosure claims priority to Chinese Patent Application No. 202510472114.4, filed on April 16, 2025, entitled "Message Forwarding Method, System, Network Device, Storage Medium and Program Product", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This disclosure relates to the field of Internet technology, and in particular to a message forwarding method, system, network device, storage medium, and program product. Background Technology
[0003] In a wide area network architecture, the Provider Edge Router (PE) learns forwarding routes from upstream devices and then advertises the learned forwarding routes to the Customer Edge Router (CE), so that the CE sends the packet to the PE according to the forwarding route, and the PE forwards the packet.
[0004] If a PE reconnects to an upstream device for some reason, after restoring the connection and learning the forwarding routes, the PE needs to write the software routing table from the forwarding routes into the hardware forwarding routing table. During this writing process, the PE may have already received packets from the CE. Because the hardware forwarding routing table does not contain the necessary forwarding entries, the PE may discard these packets, resulting in a traffic black hole phenomenon. Summary of the Invention
[0005] To overcome the problems existing in related technologies, this disclosure provides a message forwarding method, system, network device, storage medium, and program product.
[0006] According to a first aspect of the present disclosure, a message forwarding method is provided, applied to a PE (Preinstallation Equipment), the method comprising:
[0007] In response to receiving at least one initial summary route, and the sending device of the at least one initial summary route includes a delayed route reflector (RR), the initial summary route sent by the delayed RR is determined as the candidate summary route;
[0008] The candidate summary route is sent to the client edge router (CE) so that the CE can determine the PE as a valid forwarding device based on the candidate summary route.
[0009] According to a second aspect of the present disclosure, a message forwarding method is provided, applied to a CE, the method comprising:
[0010] In response to receiving at least one summarized route from the PE, it is detected whether the at least one summarized route contains a candidate summarized route, wherein the candidate summarized route is the summarized route containing a smaller number of paths in the at least one summarized route; the candidate summarized route is received from the delayed RR while the PE maintains a connection with the delayed RR;
[0011] If the candidate summary route is not included in the at least one summary route, then the PE is determined to be an invalid forwarding device.
[0012] According to a third aspect of the present disclosure, a message forwarding method is provided, applied to delay response (RR), the method comprising:
[0013] If it is determined that a connection is maintained with the provider edge router (PE), the initial summary route is sent to the PE after the detailed routes from the wide area network are aggregated into an initial summary route;
[0014] If it is determined that the connection with the PE is restored, after aggregating the detailed routes from the wide area network into an initial summary route, the initial summary route is sent to the PE after a preset delay, the preset delay being greater than or equal to the time it takes for the PE to write the hardware routing table entry.
[0015] According to a fourth aspect of the present disclosure, a packet forwarding system is provided, the packet forwarding system comprising: a RR, a delayed RR, a CE, and at least one PE, wherein,
[0016] Both the RR and the delayed RR are used to send the initial summarized route to the at least one PE after aggregating the detailed routes from the wide area network into an initial summarized route;
[0017] The delay RR is also used to, in the case of determining that the connection with the PE has been restored, after aggregating the detailed routes from the wide area network into an initial summary route, send the summary route to the at least one PE after a preset delay duration, wherein the preset delay duration is greater than or equal to the duration for which the PE writes the hardware routing table entry.
[0018] Any of the at least one PE is configured to, in response to receiving at least one initial summary route and the sending device of the at least one initial summary route includes the delayed RR, determine the initial summary route sent by the delayed RR as the candidate summary route; and send the candidate summary route to the CE so that the CE determines the PE as a valid forwarding device based on the candidate summary route;
[0019] The CE is configured to, in response to receiving at least one summarized route from any PE, detect whether the at least one summarized route contains a candidate summarized route; if the at least one summarized route does not contain the candidate summarized route, then the PE is determined to be an invalid forwarding device.
[0020] According to a fifth aspect of the present disclosure, a message forwarding apparatus is provided for use in a PE (Preinstallation Equipment), the apparatus comprising:
[0021] A determination module is configured to determine the initial summary route sent by the delayed route reflector (RR) as the candidate summary route in response to receiving at least one initial summary route and the sending device of the at least one initial summary route includes a delayed route reflector (RR).
[0022] The sending module is used to send the candidate summary route to the CE, so that the CE can determine the PE as a valid forwarding device based on the candidate summary route.
[0023] According to a sixth aspect of the present disclosure, a message forwarding apparatus is provided, applied to a CE, the apparatus comprising:
[0024] A detection module is configured to, in response to receiving at least one summary route from a PE, detect whether the at least one summary route contains a candidate summary route, wherein the candidate summary route is a summary route containing a smaller number of paths among the at least one summary route; the candidate summary route is received from the delay RR while the PE maintains a connection with the delay RR;
[0025] The determination module is configured to determine the PE as an invalid forwarding device if the candidate summary route is not included in the at least one summary route.
[0026] According to a seventh aspect of the present disclosure, a message forwarding apparatus is provided for use in delay response (RR), the apparatus comprising:
[0027] The sending module is configured to, after aggregating detailed routes from the wide area network into an initial summary route, send the initial summary route to the PE, while ensuring a connection is maintained with the PE, so that the PE sends the initial summary route to the CE as a candidate summary route.
[0028] The delayed transmission module is used to send the initial summarized route to the PE after a predetermined delay, after aggregating the detailed routes from the wide area network into an initial summarized route, once it is determined that the connection with the PE has been restored. The predetermined delay is greater than or equal to the time it takes for the PE to write the hardware routing table entry.
[0029] According to an eighth aspect of the present disclosure, a network device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method described in the first, second, or third aspect.
[0030] According to a ninth aspect of the present disclosure, a network device is provided for use as a delayed route reflector (RR), the delayed RR being connected to at least one provider edge router (PE) network;
[0031] When the network device determines that it is maintaining a connection with the at least one PE, it aggregates detailed routes from the wide area network into an initial summary route and then sends the initial summary route to the at least one PE.
[0032] When the network device determines that it has restored connection with any PE, after aggregating the detailed routes from the wide area network into the initial summary route, it sends the initial summary route to the PE after a preset delay, wherein the preset delay is greater than or equal to the time it takes for the PE to write the hardware routing table entry.
[0033] According to a tenth aspect of the present disclosure, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the method described in the first, second, or third aspect.
[0034] According to an eleventh aspect of the present disclosure, a computer program product is provided, including instructions that, when executed on a computer, cause the computer to perform the method described in the first, second, or third aspect.
[0035] The technical solutions provided in this disclosure may have the following beneficial effects:
[0036] This technical solution adds a delayed route reflector to the packet forwarding system, enabling the PE to receive summarized routes from both the RR and the delayed RR. The PE then forwards all summarized routes received from both RRs to the CE, and the CE uses the summarized route received from the delayed RR as a candidate summarized route. In scenarios where the PE reconnects with both RRs and the delayed RR, the delayed RR sends the summarized route to the PE after a preset delay, where the preset delay is greater than or equal to the time taken for the PE to write the hardware routing table entry. Therefore, before the delayed RR sends the summarized route to the PE, the summarized route sent by the PE to the CE only includes the summarized route from the RR, excluding the summarized route from the delayed RR. Consequently, when determining which PE to forward, the CE can identify the PE as an invalid forwarding route and not send packets to be forwarded to the PE. Thus, in scenarios where the PE reconnects with both RRs and the delayed RR, before the PE writes its software routing table to the hardware forwarding routing table, the PE will not receive packets from the CE, thereby avoiding packet dropping by the PE and preventing traffic black holes.
[0037] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the embodiments of this disclosure will be briefly described below. It should be understood that those skilled in the art can obtain other drawings based on these drawings without any creative effort.
[0039] Figure 1 is a schematic diagram of an exemplary architecture of a typical network system;
[0040] Figure 2A is a schematic diagram of an exemplary architecture of a message forwarding system provided in an embodiment of this disclosure;
[0041] Figure 2B is a schematic diagram of an exemplary architecture of a delayed route reflector provided in an embodiment of this disclosure;
[0042] Figure 3A is an exemplary method flowchart of the message forwarding method provided in this embodiment of the present disclosure;
[0043] Figure 3B is a second exemplary method flowchart of the message forwarding method provided in this embodiment of the present disclosure;
[0044] Figure 3C is a schematic diagram of an exemplary method flow for the message forwarding method provided in this embodiment of the present disclosure;
[0045] Figure 4 is a schematic diagram of the architecture of an exemplary network system provided in an embodiment of this disclosure;
[0046] Figure 5A is a schematic diagram of an exemplary composition of a message forwarding device provided in an embodiment of this disclosure;
[0047] Figure 5B is a second exemplary schematic diagram of the message forwarding device provided in the embodiments of this disclosure;
[0048] Figure 5C is a schematic diagram of an exemplary composition of the message forwarding device provided in the embodiments of this disclosure;
[0049] Figure 6 is an exemplary structural diagram of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0050] The technical solutions of the embodiments of this disclosure will now be described with reference to the accompanying drawings.
[0051] The terminology used in the following embodiments of this disclosure is for the purpose of describing particular embodiments and is not intended to be a limitation of the technical solutions of this disclosure. As used in the specification and appended claims of this disclosure, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise.
[0052] It should also be understood that although the terms "first," "second," etc., may be used in the following embodiments to describe a certain type of object, the objects are not limited to these terms. These terms are used to distinguish specific implementations of that type of object. For example, the terms "first," "second," etc., are used in the following embodiments to describe edge routers, but edge routers are not limited to these terms. These terms are only used to distinguish different edge routers. The same applies to other types of objects that may be described using the terms "first," "second," etc., in the following embodiments, and will not be elaborated here.
[0053] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this disclosure are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0054] The relevant technologies involved in the embodiments of this disclosure will be described below.
[0055] This disclosure relates to a wide area network (WAN) implementation scenario. A WAN connects local area networks (LANs) in different geographical locations, providing remote data communication and resource sharing for users on different LANs. In practical implementation scenarios, multiple LANs can be configured as an autonomous system (AS), thus a WAN can contain multiple ASs. To facilitate network management and control of routing information, WANs deploy provider edge routers (PEs) and route reflectors (RRs).
[0056] PE (Premises Equipment): Configured as an interface between a local area network (LAN) and a wide area network (WAN), used for packet forwarding and route management between connected networks. For example, it advertises summarized routes from remote locations to the LAN's forwarding device CE (Content Controller), and forwards LAN packets from the CE to remote locations based on the summarized routes. PE can use the Border Gateway Protocol (BGP) to transmit packets.
[0057] RR: Configured for centralized management of routes, such as merging multiple subnets of a WAN into a supernet, aggregating routes from multiple subnets into a summary route, and reflecting the summary route to other routers (e.g., PE) or networks. This not only reduces redundant routes but also avoids other routers directly participating in complex routing decisions.
[0058] A typical network system is shown in Figure 1. The network system 10 shown in Figure 1 includes a CE11, a first PE12, a second PE13, an RR14, and a third PE15 for network connection. Among them, CE11 is a forwarding device in the local area network (LAN), the third PE15 is a remote PE in the wide area network (WAN), and the first PE12 and second PE13 can be PEs used to connect the LAN and the WAN. RR14 is used to connect the first PE12, the second PE13, and the third PE15.
[0059] CE11, the first PE12, the second PE13, RR14, and the third PE15 can be network devices such as routers and switches, or devices with forwarding functions such as servers or terminal devices. For example, the first PE12, the second PE13, RR14, and the third PE15 can all be routers, and CE11 can be a switch. CE, PE, and RR can be defined according to the functions and roles of each network device in the network, which will not be detailed here.
[0060] Referring to Figure 1, RR14 is used to receive detailed routes from the remote WAN via the third PE15, aggregate the detailed routes to obtain a summary route, and send the detailed routes and the generated summary routes to the first PE12 and the second PE13. Subsequently, both the first PE12 and the second PE13 advertise the received summary routes to CE11. Based on the BGP routing protocol, since CE11 has received the summary routes sent by the first PE12 and the second PE13, it can determine both the first PE12 and the second PE13 as selectable forwarding devices, i.e., effective forwarding devices, and can send packets to the first PE12 and the second PE13, using both as next-hop forwarding devices to forward packets to the remote WAN via the first PE12 and the second PE13, thereby achieving traffic load sharing between the two PEs.
[0061] Detailed routing refers to specific, fine-grained routing paths, representing the precise IP address range of a single network segment or host. For example, the IP address range 192.168.1.0 / 24 and the network segment 10.0.0.0 / 24. Summary routing, on the other hand, is a coarse-grained routing path formed by aggregating multiple consecutive detailed routes. For example, multiple detailed routes 192.168.1.0 / 24, 192.168.2.0 / 24, and 192.168.3.0 / 24 are aggregated into the summary route 192.168.0.0 / 16.
[0062] It should be noted that in actual implementation scenarios, each detailed route carries its AS-Path attribute, which records the AS numbers of the ASs that the detailed route passes through during its propagation. An AS number is an identifier for an independent network management domain in the Internet. During the aggregation of detailed routes, the AS-Path attributes of the participating detailed routes can be integrated, thus representing the summarized route as an AS path composed of the AS numbers of the detailed routes.
[0063] It should be noted that both the first PE12 and the second PE13 rely on the written hardware forwarding routing table to forward packets. Taking the first PE12 as an example, in the scenario where the first PE12 maintains a connection with RR14, the first PE12 pre-writes the detailed route into the hardware forwarding routing table. Based on this, after receiving a packet from CE11, the first PE12 can forward the packet based on the hardware forwarding routing table.
[0064] However, if the first PE12 restarts or recovers from a fault and needs to reconnect with RR14, upon reconnecting with RR14 and receiving its detailed route, it must simultaneously send the summarized route to CE11 and rewrite the detailed route into its hardware forwarding routing table. Writing the detailed route into the hardware forwarding routing table takes a certain amount of time, during which time the first PE12 has already received packets from CE11. For example, at time T0, the first PE12 reconnects with RR14, receives the detailed route, and forwards the summarized route to CE11; at time T1, the first PE12 receives the packet sent by CE11; and at time T2, the first PE12 completes the writing of the hardware forwarding routing table. Time T2 is later than time T1, and time T1 is later than time T0. Because there is no hardware forwarding routing table upon which forwarding depends, the first PE12 will discard packets after receiving them, resulting in a traffic black hole phenomenon.
[0065] In view of this, embodiments of this disclosure provide a packet forwarding method, system, network device, apparatus, storage medium, and program product. By deploying a delayed route forwarding (RR) in the network system, using the RR and the delayed RR to send summarized routes to the PE, and configuring the delayed RR to delay the announcement of summarized routes to the PE in the scenario of reconnecting with the PE, the summarized routes received by the CE in the scenario of reconnecting with the RR and the delayed RR do not include summarized routes from the delayed RR. Therefore, before sending the summarized routes to the PE, the delayed RR can determine that the PE is an invalid forwarding route and will not send packets to be forwarded to the PE. This ensures that the PE will not receive packets from the CE during the stage before writing the software routing table into the hardware forwarding routing table, thereby avoiding the phenomenon of the PE discarding packets and preventing traffic black holes.
[0066] The technical solutions of this disclosure and how they solve the aforementioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of this disclosure will now be described with reference to the accompanying drawings.
[0067] As shown in Figure 2A, the packet forwarding system 20 provided in this embodiment may include: a network-connected CE 21, a first PE 22, a second PE 23, an RR 24, and a delay RR 25. In this embodiment, CE 21, the first PE 22, the second PE 23, RR 24, and the delay RR 25 may be network devices such as routers and switches.
[0068] The second PE23, acting as the remote PE in the WAN, connects to both RR24 and delayed RR25 networks, and is used to send detailed routes from the remote WAN to RR24 and delayed RR25 respectively. The function of RR24 is similar to that of RR14 in Figure 1; for details, please refer to the description of RR14 in the corresponding embodiment of Figure 1, which will not be repeated here.
[0069] In some embodiments, the delayed RR25 can be implemented as a network device running an open-source operating system (OS). Technicians can develop a BGP neighbor advertisement delay function for the delayed RR25 based on this open-source operating system. This allows the delayed RR25 to generate a summarized route based on the received detailed route and send it to the first PE22 when maintaining a connection with the first PE22. Conversely, when reconnecting to the first PE22, the summarized route is sent to the first PE22 after a preset delay. For example, the delayed RR25 can be a switch running the Software for Open Networking in the Cloud (SONiC) system. An exemplary system architecture of the SONiC system and examples of developing a BGP neighbor advertisement delay function are detailed in the following embodiments.
[0070] Based on the foregoing explanation of detailed routes and summary routes, for example, if delay RR25 receives the first detailed route 192.168.1.0 / 24, the second detailed route 192.168.2.0 / 24, and the third detailed route 192.168.3.0 / 24, where the AS number of the first detailed route 192.168.1.0 / 24 is, for example, AS100, the AS number of the second detailed route 192.168.1.0 / 24 is, for example, AS200, and the AS number of the third detailed route 192.168.3.0 / 24 is, for example, AS300. Delay RR25 aggregates the first detailed route 192.168.1.0 / 24, the second detailed route 192.168.2.0 / 24, and the third detailed route 192.168.3.0 / 24, resulting in, for example, the summarized route 192.168.0.0 / 16. The AS-Path corresponding to the summarized route 192.168.0.0 / 16 is represented, for example, as AS 100{200,300}, meaning the forwarding path of the summarized route is from AS100 to AS200, and then from AS200 to AS300. In this way, each AS number (such as 100, 200, or 300) can represent a one-hop forwarding node, which is beneficial for clearly and intuitively representing the length of the AS-Path of the summarized route, thus facilitating the selection of a better forwarding path.
[0071] The first PE22 is connected to the RR24 and delayed RR25 networks, receiving summarized routes from RR24 and delayed RR25 respectively, and forwarding all received summarized routes to CE21. In this embodiment, the first PE22 can set the priority of the summarized route from delayed RR25 to a higher priority and the priority of the summarized route from RR24 to a lower priority. The priority is used to characterize the priority of the selected forwarding route. This allows CE21, after receiving the summarized route from the first PE22, to select the higher-priority summarized route as the forwarding route, thereby determining a valid forwarding route based on the higher-priority summarized route, and sending the message to be forwarded to the determined valid forwarding route.
[0072] In this way, when the first PE22 reconnects with RR24 and delayed RR25, due to the delayed BGP neighbor advertisement function of delayed RR25, the summary route sent by the first PE22 to CE21 will not include the summary route from delayed RR25, while the summary routes sent by other PEs may include the summary route from delayed RR25. Therefore, the effective forwarding route determined by CE21 through the priority of the summary route will not include the first PE22, thus avoiding the phenomenon of traffic black hole.
[0073] It should be understood that the network devices in Figures 1 and 2A are functional illustrations after logical equivalence. In actual implementation scenarios, any network device in Figures 1 and 2A can be implemented as at least one physical network device. For example, the first PE22 in Figure 2A can be implemented as multiple routers, and RR24 in Figure 2A can be implemented as multiple switches.
[0074] The architecture of delay RR25 will be explained below using the delay RR25 implementation in Figure 2A as an example of a switch deploying a SONiC system.
[0075] As shown in Figure 2B, the structure of a switch deploying a SONiC system can be included in the top-down architecture as follows: user layer, kernel layer and hardware layer.
[0076] The user layer can be configured to include various network applications and management tools to implement specific network functions and management tasks, such as network monitoring, configuration management, and security policies. Optionally, the switch can monitor whether it has restored its connection with the PE based on network monitoring functions, and can also implement BGP neighbor advertisement delay functions through configuration management functions. The user layer can also be configured to provide standardized services and application programming interfaces (APIs), which can be called by the application layer to achieve signaling interaction between the application layer and the kernel layer.
[0077] The kernel layer can be configured to handle control plane and data plane tasks, as well as drivers for controlling and configuring hardware devices, such as network interface card (NIC) drivers. These drivers enable the SONiC system to communicate with hardware devices. Control plane tasks may include, for example, routing protocols, VLAN management, and access control list (ACL) processing to make correct forwarding decisions based on network policies. Data plane tasks may include, for example, data forwarding.
[0078] To maintain high cohesion and reduce coupling between components, the SONiC system can modularly deploy each function in an independent container using Docker containers. Different containers can have different functions. For example, the SONiC system can include containers for Dynamic Host Configuration Protocol Relay (DHCP-Relay), Performance Monitor (Pmon), Link Layer Discovery Protocol (LLDP), Border Gateway Protocol (BGP), Switch State Service (Swss), and Synchronous (Syncd). The switch allows technical personnel to develop custom configurations for each container to customize its functionality. For instance, by customizing the BGP container, including the bgpd module, technical personnel can configure the switch to support BGP neighbor advertisement delay functionality.
[0079] The hardware layer is configured to deploy the physical components of network devices, which may include ASICs, memory, processors (e.g., switching chips), at least one slot, etc., to provide the hardware resources required to perform network functions.
[0080] It should be understood that Figure 2B does not constitute a limitation on the system architecture of the delayed RR in the embodiments of this disclosure. In some other embodiments, the architecture of the SONiC system can be divided into more or fewer layers according to the functions of each part of the SONiC system. The embodiments of this disclosure do not limit this.
[0081] The message forwarding method of this disclosure will be described below from the perspective of various network devices, in conjunction with embodiments.
[0082] Please refer to Figure 3A, which illustrates a message forwarding method provided in this embodiment. This embodiment uses the application of this message forwarding method to a PE (Premises Equipment), where the PE can be the first PE22 in Figure 2A. The message forwarding method includes the following steps:
[0083] In step S311, in response to receiving at least one initial summary route, and if the sending device of the at least one initial summary route includes a delayed RR, the initial summary route sent by the delayed RR is determined as the candidate summary route.
[0084] In step S312, the candidate summary route is sent to the CE.
[0085] In this embodiment, the sending device of the at least one initial summary route includes a delayed RR, indicating that the PE maintains a connection with the delayed RR. The candidate summary route can be used to enable the CE to determine that the PE is a valid forwarding device based on the candidate summary route. In other embodiments, if the sending device of the at least one initial summary route does not include a delayed RR, it indicates that the PE and the delayed RR need to restore their connection. The summary route sent by the PE to the CE does not include the candidate summary route, causing the CE to determine that the PE is an invalid forwarding device, and the PE will not receive packets from the CE. Therefore, the technical solution of this disclosure, by adding a delayed RR to the packet forwarding system, ensures that in the scenario where the PE restores its connection with the RR and the delayed RR, the delayed RR will send the summary route to the PE after a preset delay. During the period before the PE writes its software routing table into its hardware forwarding routing table, the PE will not receive packets from the CE, thereby avoiding the phenomenon of the PE discarding packets and preventing traffic black holes.
[0086] Any initial summary route may include its source address, which can be the network address of the sending device, such as the Internet Protocol (IP) address. Upon receiving any initial summary route, the PE can determine the sending device based on its source address. The sending device for any initial summary route can be a delayed RR or a delayed RR.
[0087] In some implementation scenarios, the CE selects a summarized route with fewer AS-Paths as the forwarding route, and then determines the PE with fewer AS-Paths as a valid forwarding device. To use the initial summarized route sent by the delayed RR as a condition for the CE to select a PE for forwarding, embodiments of this disclosure can deploy the number of paths contained in the initial summarized route, causing the CE to select the initial summarized route sent by the delayed RR as the forwarding path. Then, whether the PE is a valid forwarding device is determined by whether the sent summarized route contains the initial summarized route sent by the delayed RR. Correspondingly, to ensure that when a PE is a valid forwarding device, it selects the initial summarized route sent by the delayed RR for forwarding packets, a route priority can be set based on the sending device of the initial summarized route.
[0088] Route priority is a parameter used to measure the reliability of different routes. The parameter range is typically from 0 to 255; a higher value indicates a higher priority, and the PE (Preinstallation Equipment) will prioritize forwarding packets via that route. For example, for any initial summary route, if the sending device of the initial summary route is the delay RR (Route Receiver), the priority parameter of the initial summary route is set to a first parameter value to set the initial summary route as high priority; if the sending device of the initial summary route is the RR, the priority parameter of the initial summary route is set to a second parameter value, where the second parameter value is less than the first parameter value, to set the initial summary route as low priority.
[0089] For example, taking the BGP local preference parameter as an example, if the sending device of the initial summary route is the delay RR, the BGP local preference parameter of the initial summary route is set to 100; if the sending device of the initial summary route is the RR, the BGP local preference parameter of the initial summary route is set to 50.
[0090] This ensures that, when acting as a valid forwarding device, the PE selects to delay the initial summary route forwarding message sent by the RR.
[0091] Based on the aforementioned relationship between summarized routes and paths, it is clear that any initial summarized route can contain AS paths formed by AS numbers. In practical implementations, the CE can select a forwarding route based on the number of AS paths contained in the summarized route. For example, the CE selects the summarized route with fewer AS paths as the forwarding route. The number of AS paths can refer to the number of AS numbers contained in the AS path. Therefore, to enable the CE to select a summarized route from a delayed RR for forwarding packets, if it is determined that the sending device of the initial summarized route is the delayed RR, the PE does not insert ASs into the AS paths of the initial summarized route, but directly advertises the initial summarized route to the CE. For at least one initial summarized route where the sending device is an RR, a predetermined number of paths are added to the paths contained in the initial summarized route to obtain the summarized route, and the summarized route is sent to the CE.
[0092] It should be understood that the detailed routes referenced by the RR and delayed RR in generating the initial summarized route are detailed routes of the same WAN. The number of paths contained in the initial summarized route from the RR and the initial summarized route from the delayed RR can be the same. For example, the preset number can be 1, that is, for the initial summarized route sent by the RR, the PE can insert 1 AS number into the AS path contained in the initial summarized route. The inserted AS number is, for example, the AS number of the AS where the PE is located.
[0093] As can be seen, by adopting this implementation method, the number of paths in the summary route from the RR can be made greater than the number of paths in the summary route from the delayed RR through the processing of the PE. Thus, the summary route from the delayed RR is processed into a candidate summary route for the CE, so that the CE can refer to the candidate summary route to determine whether the PE is a valid forwarding device. In this way, it helps to avoid the phenomenon of traffic black hole.
[0094] Furthermore, after sending the candidate summarized route to the CE, the PE can receive packets from the CE. Then, the PE can select the candidate summarized route as the forwarding route for the packet based on a priority parameter, and forward the packet according to the candidate summarized route. For example, the PE can determine the summarized route with a priority parameter of a first parameter value as the candidate summarized route.
[0095] The message is sent by the CE to the PE when the PE is determined to be a valid forwarding device. The CE can determine the valid forwarding device based on the candidate summary route. The implementation method on the CE side is described in detail in the following embodiments, and will not be described in detail here.
[0096] It should be noted that, in this embodiment of the disclosure, when maintaining connections with both the delayed RR and the RR, the PE can receive the initial summarized route from the RR and the initial summarized route from the delayed RR in parallel. The above embodiments focus on describing the actions performed by the PE in the scenario where the PE maintains connections with both the delayed RR and the RR. The following describes the actions performed by the PE in the scenario where the PE restores connections with both the delayed RR and the RR.
[0097] When the connection is restored with both the delayed RR and the RR, the PE receives at least one initial summary route, which does not include the initial summary route from the delayed RR. The PE receives the initial summary route from the delayed RR only after a preset delay period following the connection restoration. However, after the PE restores the connection with the RR, it can receive the initial summary route sent by the RR. Therefore, the connection restoration time can refer to the time when the at least one initial summary route is received.
[0098] In some embodiments, after the PE receives at least one initial summarized route, within a preset delay period, the PE can write the detailed route received from the RR into its local hardware routing table. It should be noted that the purpose of developing the BGP neighbor advertisement delay function is to reserve writing time for the PE recovering from reconnection to write the software forwarding routing table into the hardware forwarding routing table. Based on this, in an optional design, the preset delay period can be set as the writing duration, for example, a preset delay period of 600 seconds.
[0099] As can be seen, in the scenario where the PE restores its connection with both the RR and the delayed RR, at the moment of connection restoration, the initial summarized route received by the PE does not include the initial summarized route sent by the delayed RR. Therefore, the summarized route sent by the PE to the CE also does not include the summarized route from the delayed RR. However, the summarized routes sent by other PEs that maintain the connection to the CE include the summarized route from the delayed RR. Consequently, the CE will still select the summarized route from the delayed RR as the forwarding route. This causes the PE to be identified as an invalid forwarding device by the CE because it cannot provide a forwarding route. Consequently, the PE will not receive packets from the CE. Thus, during the period when the PE has not written its software routing table into the hardware forwarding routing table, the PE will not receive packets from the CE, thereby avoiding the phenomenon of the PE discarding packets and preventing a traffic black hole situation.
[0100] Furthermore, after receiving the initial summarized route from the delayed RR, the PE should notify the CE that the routes reachable by the PE include the newly added route. Based on this, in this embodiment, the PE can generate route change (BGP Update) information, which includes the candidate summarized route corresponding to the initial summarized route, and send the route change information to the CE so that the CE determines the PE from an invalid forwarding device to a valid forwarding device.
[0101] Based on the foregoing explanation of the preset delay duration, in the scenario where the PE reconnects with the delayed RR and the RR, when the PE receives the initial summary route from the delayed RR, the PE has already completed writing the hardware routing table. Even if a packet is received, it can forward the packet according to the summary route from the delayed RR, thereby supporting timely load balancing of the CE's traffic while avoiding traffic black holes.
[0102] Please refer to Figure 3B, which shows another message forwarding method provided in this embodiment. This embodiment takes the application of this message forwarding method to a CE as an example. The CE can be implemented as CE21 in the embodiment shown in Figure 2A.
[0103] It should be noted that Figure 3B is the implementation method of the device side corresponding to the implementation scenario shown in Figure 3A. Based on this, the implementation methods that are the same or similar to those in Figure 3A in the embodiment of Figure 3B can be referred to the description in the corresponding embodiment in Figure 3A, which will not be repeated here.
[0104] The message forwarding method includes the following steps:
[0105] In step S321, in response to receiving at least one summary route from the PE, it is detected whether the at least one summary route contains a candidate summary route.
[0106] The candidate summary route refers to the summary route that contains a smaller number of paths among the at least one summary route.
[0107] In step S322, if the candidate summary route is not included in the at least one summary route, the PE is determined to be an invalid forwarding device.
[0108] As described in the embodiment corresponding to Figure 3A, at least one summarized route is obtained by the PE through further processing of at least one initial summarized route received, and the candidate summarized route is a summarized route from the delayed RR. Based on this, in a scenario where the PE maintains connections with both the RR and the delayed RR, the PE can receive initial summarized routes sent in parallel by the RR and the delayed RR, and the candidate summarized route is included in at least one summarized route. In a scenario where the PE reconnects with both the RR and the delayed RR, the PE can immediately receive the initial summarized route from the RR after reconnecting with the RR, but cannot immediately receive the initial summarized route from the delayed RR after reconnecting with the delayed RR. In this implementation scenario, the candidate summarized route is not included in at least one summarized route. Therefore, the candidate summarized route is received from the delayed RR while the PE maintains a connection with the delayed route reflector RR.
[0109] To ensure that the CE determines the effective forwarding device by selecting a candidate summarized route, the PE processes the initial summarized route differently depending on the sending device of the initial summarized route, so that the number of paths contained in the summarized route from the delayed RR is less than the number of paths contained in the summarized route from the RR. The implementation method of the PE processing the initial summarized route differently depending on the sending device of the initial summarized route is detailed in the description of the above embodiments and will not be repeated here. The CE typically selects the summarized route containing fewer paths as the forwarding route, thereby enabling the forwarding device to determine the forwarding device based on the determined forwarding route.
[0110] It should be noted that in actual implementation scenarios, the CE can receive at least one summarized route from multiple PEs, and for any summarized route from any PE, the CE can select the candidate summarized route with fewer paths as the forwarding route. Furthermore, it should be understood that only when a PE restarts due to a fault or interrupts its connection with the RR, will the at least one summarized route sent after the connection is restored not contain the candidate summarized route. Since the number of PEs that interrupted their connection with the RR due to a fault is usually small, it can be assumed that even if there is at least one summarized route from multiple PEs that does not contain the candidate summarized route, the number of PEs corresponding to this at least one summarized route is usually limited. The CE can use the candidate summarized route included in the at least one summarized routes sent by multiple PEs as the forwarding route, rather than selecting the summarized route with relatively fewer paths from the at least one summarized route of that PE on a PE-by-PE basis.
[0111] Furthermore, if the candidate summary route is included in the at least one summary route, it indicates that the PE maintains a connection with the RR and the delayed RR, signifying that the PE has a hardware forwarding routing table and supports forwarding packets based on the hardware forwarding routing table. The CE can then identify the PE as a valid forwarding device and forward packets to the PE, enabling the PE to forward the packets based on the candidate summary route. The PE can determine the candidate summary route based on preset priority parameters and forward the packets based on the candidate summary route. Specific implementation details are provided above and will not be elaborated here.
[0112] If the candidate summary route is not included in the at least one summary route, indicating that the PE, RR and delayed RR are in a state of just reconnection, then after receiving the at least one summary route, a preset delay period is set, and route change information is received from the PE, which includes the candidate summary route, and the PE is determined as a valid forwarding device.
[0113] The candidate summary route is received by the PE from the delay RR after the PE and the delay RR resume connection. Detailed implementation methods are described above and will not be elaborated upon here.
[0114] Based on the above description, whether at least one summarized route contains a candidate summarized route can indicate whether the corresponding PE has lost connection with the RR, and whether it has been written into the hardware forwarding routing table. In this implementation, the CE will only treat the corresponding PE as a valid forwarding route if at least one summarized route contains a candidate summarized route; otherwise, the CE will treat the corresponding PE as an invalid forwarding route. Therefore, during the phase when the PE reconnects with the RR and the delayed RR, and before the PE has written its software routing table into the hardware forwarding routing table, packets will not be forwarded through the PE.
[0115] This can prevent PE from discarding packets and avoid the occurrence of traffic black holes.
[0116] Please refer to Figure 3C, which shows another message forwarding method provided in this embodiment. This embodiment takes the message forwarding method as an example of applying the delayed RR. The architecture of the delayed RR can be described as shown in the embodiment in Figure 2B.
[0117] It should be noted that Figure 3C is the implementation method of the other device side corresponding to the implementation scenario shown in Figure 3A. Based on this, the implementation methods that are the same or similar to those in Figure 3A in the embodiment of Figure 3C can be referred to the description in the corresponding embodiment in Figure 3A, which will not be repeated here.
[0118] The message forwarding method includes the following steps:
[0119] Step S331: If it is determined that the connection with the PE is maintained, after aggregating the detailed routes from the wide area network into an initial summary route, the initial summary route is sent to the PE.
[0120] Step S332: If it is determined that the connection with the PE has been restored, after aggregating the detailed routes from the wide area network into an initial summary route, the initial summary route is sent to the PE after a preset delay period.
[0121] While maintaining a connection with the PE, the delayed RR function is similar to the RR function, receiving detailed routes from the remote WAN through the remote PE and aggregating the detailed routes to obtain an initial summary route, but only sending the generated initial summary route to the PE, so that the PE sends the initial summary route as a candidate summary route to the CE.
[0122] When the connection with the PE is restored, the delayed RR triggers the BGP neighbor advertisement delay function. After receiving the detailed route and obtaining the initial summary route through aggregation, the initial summary route is sent to the PE after a preset delay period. This allows the PE to write the detailed route received from the RR into the hardware forwarding routing table within the preset delay period.
[0123] This ensures that the PE will only be used as a packet forwarding device after the connection is restored and the hardware forwarding routing table of the PE is written, thus avoiding the occurrence of traffic black holes.
[0124] The following describes the message forwarding method of this disclosure embodiment from the perspective of network device interaction in different implementation scenarios, using an exemplary network system as an example.
[0125] As shown in Figure 4, which illustrates an exemplary network system 40 according to an embodiment of this disclosure, the network system 40 may include: a remote PE, an RR and a delayed RR connected to the remote PE network, PE1 and PE2 both connected to the RR and delayed RR networks, and a CE connected to PE1 and PE2 networks. Here, the CE is a network device within a local area network (LAN), the remote PE is a network device within a wide area network (WAN), and PE1 and PE2 are used to connect the LAN and the WAN.
[0126] It should be understood that Figure 4 is merely an illustrative description and does not constitute a limitation on the network system of this disclosure embodiment. PE1 and PE2 in Figure 4 are derived through logical equivalence to distinguish PEs in two operating modes. In actual implementation scenarios, both PE1 and PE2 can be implemented as at least one physical network device. Furthermore, the network system of this disclosure embodiment may also include more or fewer network devices than those shown in Figure 4.
[0127] In the scenario where both PE1 and PE2 are connected to RR and delayed RR:
[0128] The remote PE sends detailed routes of the remote WAN to the RR and delayed RR respectively. The RR and delayed RR then aggregate the detailed routes. For example, the RR generates summary route 1, and the delayed RR generates summary route 2. In this example, summary route 1 and summary route 2 can be the same, and the number of paths contained in summary route 1 is the same as the number of paths contained in summary route 2.
[0129] The RR sends the summary route 1 and the detailed route to PE1 and PE2 respectively, while the delayed RR sends the summary route 2 to PE1 and PE2 respectively.
[0130] Taking PE1 as an example, after receiving summarized route 1 and summarized route 2, PE1 determines that the source device is a delayed RR based on the source IP address of summarized route 1. Therefore, it sets the BGP local priority parameter of summarized route 1 to 50 and inserts a local AS number into the AS path of summarized route 1. After determining that the source device is a delayed RR based on the source IP address of summarized route 2, it sets the BGP local priority parameter of summarized route 2 to 100. Then, it sends summarized route 2 and summarized route 1 with the inserted AS number to CE. PE2's processing of summarized route 1 and summarized route 2 can be the same as PE1's, and will not be elaborated here.
[0131] After receiving summary route 2 and summary route 1 with inserted AS number from PE1, and summary route 2 and summary route 1 with inserted AS number from PE2, CE selects summary route 2 as the forwarding route because summary route 2 has fewer AS paths, and sends messages to PE1 and PE2 respectively as valid forwarding devices.
[0132] Furthermore, after receiving the message from the CE, both PE1 and PE2 select the summary route (i.e., summary route 2) with a BGP local priority parameter of 100 as the forwarding route, and combine it with the local hardware forwarding routing table to forward the CE's message to the remote wide area network.
[0133] In a scenario where PE1 fails, but PE2 remains connected to RR and delayed RR:
[0134] In this scenario, the remote PE sends the detailed routes of the remote WAN to the RR and the delayed RR respectively. The RR and the delayed RR then aggregate the detailed routes. For example, the RR generates a summary route 1, and the delayed RR generates a summary route 2. Subsequently, the RR sends the summary route 1 and the detailed routes to PE1 and PE2 respectively.
[0135] At time T0, PE1 re-establishes connections with RR and delayed RR respectively, and receives summarized route 1 and detailed route sent by RR. Then, PE1 writes the detailed route table entry into the hardware forwarding route table, sets the BGP local priority parameter of summarized route 1 to 50, inserts the local AS number into the AS path of summarized route 1, and sends the summarized route 1 with the inserted AS number to CE.
[0136] Still at time T0, since the delayed RR has reconnected with PE1, the delayed RR only sends summarized route 2 to PE2. After receiving summarized route 1 and summarized route 2, PE2 sets the BGP local priority parameter of summarized route 1 to 50 and inserts a local AS number into the AS path of summarized route 1. After determining that the source device is the delayed RR based on the source IP address of summarized route 2, it sets the BGP local priority parameter of summarized route 2 to 100. Then, it sends summarized route 2 and summarized route 1 with the inserted AS number to CE.
[0137] At time T1, after receiving summarized route 1 with inserted AS number from PE1, and summarized route 2 with inserted AS number from PE2, CE selects summarized route 2 as the forwarding route because it has fewer AS paths. Since the summarized route sent by PE1 does not include summarized route 2, CE treats PE1 as an invalid forwarding device and PE2 as a valid forwarding device, and sends a message to PE2.
[0138] After receiving a message from the CE, PE2 selects the summary route (i.e., summary route 2) with a BGP local priority parameter of 100 as the forwarding route, and forwards the CE's message to the remote WAN in conjunction with the local hardware forwarding routing table.
[0139] The preset delay duration is, for example, 600 seconds. Time T2 is, for example, time T0 delayed by 600 seconds. The delay RR can send the summarized route 2 to PE1. After receiving the summarized route 2, PE1 processes it as described above, and will not repeat it here. Further, PE1 generates route change information and sends it to CE. The route change information includes information about the newly added summarized route 2.
[0140] After receiving the route change information, CE updates its local routing table, identifies PE1 as a valid forwarding device, forms an equal-cost multipath with PE2, and sends packets to PE1 and PE2 respectively at time T3.
[0141] As can be seen, during the period from T0 to T1, the CE treats PE1 as an invalid forwarding device, only sending packets to PE2 for forwarding, thus preventing a traffic black hole from forming due to PE1's inability to forward packets. During the period from T0 to T2, PE1 performs the writing of the hardware routing table, completing the writing at T2. The CE then sends packets to PE1 at T3, which is later than T2, enabling PE1 to support packet forwarding.
[0142] In summary, this technical solution adds a delayed route reflector to the packet forwarding system, enabling the PE to receive summarized routes from both the RR and the delayed RR, and to send all summarized routes received from both RR and delayed RR to the CE. The CE then uses the summarized route received from the delayed RR as a candidate summarized route. In scenarios where the PE reconnects with the RR and delayed RR, the delayed RR will send the summarized route to the PE after a preset delay, where the preset delay is greater than or equal to the time it takes for the PE to write the hardware routing table entry. Therefore, before the delayed RR sends the summarized route to the PE, the summarized route sent by the PE to the CE only includes the summarized route from the RR, excluding the summarized route from the delayed RR. Consequently, when determining which PE to forward, the CE can identify the PE as an invalid forwarding route and will not send packets to be forwarded to the PE. Thus, in scenarios where the PE reconnects with the RR and delayed RR, during the phase before the PE writes its software routing table to the hardware forwarding routing table, the PE will not receive packets from the CE, thereby avoiding packet dropping by the PE and preventing traffic black holes.
[0143] The above embodiments describe various schemes of the packet forwarding method provided in this disclosure from the perspective of the interaction between various network devices and the actions performed by various software and hardware. Those skilled in the art should readily recognize that, in conjunction with the processing steps described in the embodiments disclosed herein, such as delayed transmission of the initial summary route, determination of the sending device for the initial summary route, addition of AS numbers, and setting of route priorities, this disclosure can be implemented not only in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this disclosure.
[0144] For example, if the above implementation steps can be implemented by software modules, corresponding to the above message forwarding method, this disclosure embodiment can also provide a message forwarding device.
[0145] As shown in Figure 5A, a message forwarding device 51 is provided, which may include a determining module 511 and a sending module 512. The message forwarding device 51 may be deployed in the first PE22 shown in Figure 2A, or in PE1 or PE2 shown in Figure 4, and may be used to perform some or all of the operations of the PEs in Figures 3A to 3C.
[0146] For example: the determining module 511 is configured to determine the initial summary route sent by the delayed route reflector (RR) as the candidate summary route in response to receiving at least one initial summary route and the sending device of the at least one initial summary route includes a delayed route reflector (RR); the sending module 512 is configured to send the candidate summary route to the client edge router (CE) so that the CE determines the PE as a valid forwarding device based on the candidate summary route.
[0147] Optionally, the message forwarding device 51 further includes a path adding module. The path adding module is used to add a preset number of paths to the paths contained in the initial summary route for the at least one initial summary route in which the sending device is RR to obtain a summary route; the sending module 512 is also used to send the summary route to the CE.
[0148] Optionally, the message forwarding device 51 further includes a receiving module, configured to receive the initial summary route from the delay RR after a preset delay duration following the connection restoration time if the sending device of the at least one initial summary route does not include the delay RR; the connection restoration time refers to the time when the at least one initial summary route is received, and the preset delay duration is greater than or equal to the duration for the PE to write the hardware routing table entry.
[0149] Optionally, the message forwarding device 51 further includes a generation module. The generation module is used to generate routing change information, which includes candidate summary routes corresponding to the initial summary route.
[0150] The sending module 512 is also configured to send the routing change information to the CE, so that the CE determines the PE from an invalid forwarding device to a valid forwarding device.
[0151] Optionally, the message forwarding device 51 further includes a parameter setting module. For any initial summary route, the parameter setting module is configured to set the priority parameter of the initial summary route to a first parameter value if the sending device of the initial summary route is the delay RR; and to set the priority parameter of the initial summary route to a second parameter value if the sending device of the initial summary route is the RR, wherein the second parameter value is less than the first parameter value.
[0152] Optionally, the packet forwarding device 51 further includes a selection module and a forwarding module. The receiving module is further configured to receive packets from the CE; the selection module is configured to select the candidate summary route as the forwarding route for the packet based on a priority parameter; and the forwarding module is configured to forward the packet according to the candidate summary route.
[0153] As shown in Figure 5B, a message forwarding device 52 is provided, which may include a detection module 521 and a determination module 522. This message forwarding device 52 can be deployed in the CE21 shown in Figure 2A, or in the CE shown in Figure 4, and can be used to perform some or all of the operations of the CE shown in Figures 3A to 3C.
[0154] For example, detection module 521 is configured to detect, in response to receiving at least one summary route from PE, whether the at least one summary route contains a candidate summary route, wherein the candidate summary route refers to a summary route containing a smaller number of paths in the at least one summary route; the candidate summary route is received from the delay RR while the PE maintains a connection with the delay RR; determination module 522 is configured to determine the PE as an invalid forwarding device if the at least one summary route does not contain the candidate summary route.
[0155] Optionally, the packet forwarding device 52 further includes a forwarding module. The determining module 522 is further configured to determine the PE as a valid forwarding device if the candidate summary route is included in the at least one summary route; the forwarding module is configured to forward the packet to the PE, wherein the preset delay duration is greater than or equal to the duration for which the PE writes the hardware routing table entry.
[0156] Optionally, the message forwarding device 52 further includes a receiving module. The receiving module is configured to, if the at least one summarized route does not contain the candidate summarized route, after receiving the at least one summarized route, receive route change information from the PE after a preset delay period. The route change information includes the candidate summarized route, which is received by the PE from the delay RR after the PE and the delay RR have resumed connection. The determining module 522 is further configured to determine the PE as a valid forwarding device.
[0157] As shown in Figure 5C, a message forwarding device 53 is provided, which may include a sending module 531 and a delayed sending module 532. This message forwarding device 53 can be deployed in the delay RR25 shown in Figure 2A, or in the delay RR shown in Figure 4, and can be used to perform some or all of the operations of the delay RR shown in Figures 3A to 3C.
[0158] For example, the sending module 531 is configured to, when it is determined that the connection with the PE is maintained, send the initial summary route to the PE after aggregating the detailed routes from the wide area network into an initial summary route, so that the PE sends the initial summary route to the CE as a candidate summary route; the delayed sending module 532 is configured to, when it is determined that the connection with the PE is restored, send the initial summary route to the PE after a preset delay period after aggregating the detailed routes from the wide area network into an initial summary route.
[0159] It is understandable that the division of the modules in Figures 5A to 5C is only a logical functional division. In actual implementation, the functions of the above modules can be integrated into hardware entities. For example, the function of the determination module 511 in Figure 5A can be integrated into the processor, and the function of the transmission module 512 in Figure 5A can be integrated into the transceiver.
[0160] Please refer to Figure 6, which provides a network device that can be used as any of the network devices in Figures 2A and 4. The network device includes a processor 611, a transceiver 612, and a memory 613, which are connected and communicate via a communication bus 614. The transceiver 612 can be used to exchange information and messages with the peer device of the network device. The memory 613 stores program instructions and routing information involved in message forwarding. When the program instructions are invoked, the processor 611 performs some or all of the operations of any of the network devices in Figures 3A to 3C.
[0161] For example, when a network device is used as a delayed route (RR), as shown in Figure 2B, the delayed RR is connected to at least one provider edge router (PE) network. If the network device determines that it will maintain a connection with the at least one PE, it sends the initial summarized route to the at least one PE after aggregating detailed routes from the wide area network (WAN) into an initial summarized route. If the network device determines that it will restore a connection with any PE, it sends the initial summarized route to the PE after a preset delay, where the preset delay is greater than or equal to the time it takes for the PE to write the hardware routing table entry.
[0162] For the specific implementation process, please refer to the relevant descriptions in Figures 3A to 3C, which will not be repeated here.
[0163] This disclosure also provides a computer-readable storage medium storing instructions for message forwarding, which, when executed on a computer, cause the computer to perform some or all of the steps in the methods described in the foregoing embodiments.
[0164] This disclosure also provides a computer program product including instructions for message forwarding, which, when run on a computer, causes the computer to perform some or all of the steps in the methods described in the foregoing embodiments.
[0165] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0166] In the embodiments provided in this disclosure, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0167] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0168] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0169] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, smartphone, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0170] Although alternative embodiments of this disclosure have been described, those skilled in the art, upon learning the basic inventive concept, can make further changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this disclosure.
[0171] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of this disclosure. It should be understood that the above description is only a specific embodiment of this disclosure and is not intended to limit the scope of protection of this disclosure. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of this disclosure should be included within the scope of protection of this invention.
Claims
1. A packet forwarding method, characterized by, The method is applied to a provider edge router (PE), and the method comprises the following steps: In response to receiving at least one initial aggregate route, and in the case that the sending device of the at least one initial aggregate route comprises a delayed route reflector (RR), determining the initial aggregate route sent by the delayed RR as the candidate aggregate route; Sending the candidate aggregate route to a client edge router (CE) so that the CE determines the PE as a valid forwarding device based on the candidate aggregate route.
2. The method of claim 1, wherein, Further comprising the following steps: For the initial aggregate route in which the sending device is an RR, adding a preset number of paths in the path contained in the initial aggregate route to obtain an aggregate route; Sending the aggregate route to the CE.
3. The method according to claim 1 or 2, characterized in that, Further comprising the following steps: If the sending device of the at least one initial aggregate route does not comprise the delayed RR, receiving an initial aggregate route from the delayed RR after a preset delay time length from the time when the connection is resumed; the time when the connection is resumed refers to the time when the at least one initial aggregate route is received, and the preset delay time length is greater than or equal to the time length for the PE to write a hardware route entry.
4. The method of claim 3, wherein, After receiving the initial aggregate route from the delayed RR, further comprising the following steps: Generating route change information, wherein the route change information comprises the candidate aggregate route corresponding to the initial aggregate route; Sending the route change information to the CE so that the CE determines the PE as a valid forwarding device from an invalid forwarding device.
5. The method of claim 1, wherein, For any initial aggregate route, further comprising the following steps: If the sending device of the initial aggregate route is the delayed RR, setting a priority parameter of the initial aggregate route as a first parameter value; If the sending device of the initial aggregate route is the RR, setting a priority parameter of the initial aggregate route as a second parameter value, wherein the second parameter value is less than the first parameter value.
6. The method of claim 5, wherein, After sending the candidate aggregate route to the CE, further comprising the following steps: Receiving a packet from the CE; Selecting the candidate aggregate route as a forwarding route of the packet based on a priority parameter; Forwarding the packet according to the candidate aggregate route.
7. A method of forwarding a packet, the method comprising: The method is applied to a client edge router (CE), and the method comprises the following steps: In response to receiving at least one aggregate route from a provider edge router (PE), detecting whether the at least one aggregate route comprises a candidate aggregate route, wherein the candidate aggregate route refers to an aggregate route in which the number of paths contained in the at least one aggregate route is smaller; the candidate aggregate route is received from a delayed route reflector (RR) in the case that the PE maintains a connection with the delayed RR; If the at least one aggregate route does not comprise the candidate aggregate route, determining the PE as an invalid forwarding device.
8. The method of claim 7, wherein, Further comprising the following steps: If the at least one aggregate route comprises the candidate aggregate route, determining the PE as a valid forwarding device; Forwarding a packet to the PE.
9. The method of claim 8, wherein, If the at least one aggregate route does not comprise the candidate aggregate route, further comprising the following steps: receive route change information from the PE, the route change information containing the candidate summary route, the candidate summary route being received from the delay RR after the PE and the delay RR resume connection, the preset delay duration being greater than or equal to a duration for the PE to write a hardware route entry; determine the PE as a valid forwarding device.
10. A method of forwarding a packet, the method comprising: The method is applied to a delay route reflector (RR), and the method comprises: after determining that connection with a provider edge router (PE) is maintained, sending an initial summary route to the PE after aggregating detailed routes from a wide area network into the initial summary route; after determining that connection with the PE is resumed, sending the initial summary route to the PE after a delay of a preset delay duration after aggregating detailed routes from a wide area network into the initial summary route, the preset delay duration being greater than or equal to a duration for the PE to write a hardware route entry.
11. A packet forwarding system, characterized by, The packet forwarding system comprises a route reflector (RR), a delay RR, a client edge router (CE) and at least one provider edge router (PE), wherein the RR and the delay RR are both configured to send an initial summary route to the at least one PE after aggregating detailed routes from a wide area network into the initial summary route; the delay RR is further configured to send the summary route to the at least one PE after a delay of a preset delay duration after aggregating detailed routes from a wide area network into the initial summary route in a case where it is determined that connection with the PE is resumed, the preset delay duration being greater than or equal to a duration for the PE to write a hardware route entry; any of the at least one PE is configured to, in response to receiving at least one initial summary route and the sending device of the at least one initial summary route containing the delay RR, determine the initial summary route sent by the delay RR as the candidate summary route, and send the candidate summary route to the CE so that the CE determines the PE as a valid forwarding device based on the candidate summary route; the CE is configured to, in response to receiving at least one summary route of any PE, detect whether the candidate summary route is contained in the at least one summary route, and determine the PE as an invalid forwarding device if the candidate summary route is not contained in the at least one summary route.
12. A packet forwarding device, comprising: The device is applied to a provider edge router (PE) and comprises: a determination module configured to, in response to receiving at least one initial summary route and the sending device of the initial summary route containing a delay route reflector (RR), determine the initial summary route sent by the delay RR as the candidate summary route; a sending module configured to send the candidate summary route to a client edge router (CE) so that the CE determines the PE as a valid forwarding device based on the candidate summary route.
13. The apparatus of claim 12, wherein, The device further comprises a path adding module, The path adding module is configured to, for an initial aggregate route in which a sending device is an RR in the at least one initial aggregate route, add a preset number of paths in a path contained in the initial aggregate route to obtain an aggregate route. The sending module is further configured to send the aggregate route to the CE.
14. A packet forwarding device, comprising: The device is applied to a client edge router (CE), and the device comprises: The detecting module is configured to, in response to receiving at least one aggregate route from a provider edge router (PE), detect whether a candidate aggregate route is contained in the at least one aggregate route, the candidate aggregate route being an aggregate route in which a number of paths contained in the at least one aggregate route is smaller; and the candidate aggregate route being received from a delay route reflector (RR) in a case where the PE is connected to the delay RR. The determining module is configured to, if the candidate aggregate route is not contained in the at least one aggregate route, determine the PE as an invalid forwarding device.
15. The apparatus of claim 14, wherein, The device further comprises a forwarding module, The determining module is further configured to, if the candidate aggregate route is contained in the at least one aggregate route, determine the PE as a valid forwarding device. The forwarding module is configured to forward a packet to the PE.
16. A packet forwarding device, comprising: The device is applied to a delay route reflector (RR), and the device comprises: The sending module is configured to, in a case where it is determined that the PE is connected, send an initial aggregate route to the PE after the initial aggregate route is aggregated from a detailed route from a wide area network. The delay sending module is configured to, in a case where it is determined that the PE is reconnected, send the initial aggregate route to the PE after a preset delay time period after the initial aggregate route is aggregated from a detailed route from a wide area network, the preset delay time period being greater than or equal to a time period in which the PE writes a hardware route table item.
17. A network device comprising a memory, a processor, and a computer program stored on the memory, wherein the computer program, when executed by the processor, causes the network device to perform the method of any one of claims 1-16. The processor executes the computer program to implement the method in any one of claims 1-10.
18. A network device, comprising: The device is applied to a delay route reflector (RR), and the device comprises: The network device is applied to a delay route reflector (RR), and the network device is connected to at least one provider edge router (PE); The network device is applied to a delay route reflector (RR), and the network device is connected to at least one provider edge router (PE); 19. A computer readable storage medium having stored thereon a computer program, characterized in that, The network device is applied to a delay route reflector (RR), and the network device is connected to at least one provider edge router (PE); 20. A computer program product, characterised in that, The computer program is executed by the processor to implement the method in any one of claims 1-10. The computer program is executed by the processor to implement the method in any one of claims 1-10. The computer program is executed by the processor to implement the method in any one of claims 1-10.