Communication method and device

By receiving and comparing the interface attributes of forwarding paths in the SRv6 network, the path with the highest priority is selected for service packet forwarding, solving the packet loss and link congestion problems caused by traditional path switching and achieving efficient service packet forwarding.

CN119402416BActive Publication Date: 2025-10-03NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411481778.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-10-03
Estimated Expiration
2044-10-22

AI Technical Summary

Technical Problem

In the SRv6 branching solution, traditional path switching is based on the device and interface attributes, which may cause service packet loss or affect the forwarding of other packets.

Method used

By receiving protocol packets sent by intermediate network devices, obtaining and comparing the interface attributes of each forwarding path, the path with the highest priority is selected for service packet forwarding. The interface attributes are advertised between network devices using the IGP protocol to implement route selection based on the bandwidth of the entire forwarding path.

Benefits of technology

It avoids link congestion and packet loss problems and ensures the smooth forwarding of business messages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119402416B_ABST
    Figure CN119402416B_ABST
Patent Text Reader

Abstract

The present application provides a communication method and apparatus, the method comprising: receiving a first protocol message sent by an intermediate network device, the first protocol message comprising a first interface attribute and / or a second interface attribute, the first interface attribute being bound to a first forwarding path, and the second interface attribute being bound to a second forwarding path; obtaining a third interface attribute of the first network device, or obtaining a third interface attribute and a fourth interface attribute of the first network device, the third interface attribute being bound to the first forwarding path, the fourth interface attribute being bound to the second forwarding path, or the third interface attribute being bound to the first forwarding path and the second forwarding path respectively; if all interface attributes bound to the first forwarding path satisfy corresponding attribute thresholds and all interface attributes bound to the second forwarding path satisfy corresponding attribute thresholds, then, according to the priority of the forwarding path, selecting the first forwarding path with the highest priority as the path for forwarding the service message.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a communication method and device. Background Art

[0002] Segment Routing (SR) uses a source node path selection mechanism, where the source node pre-encapsulates the segment identifier (SID) of the segment that the forwarding path will pass through. When a service packet passes through an SR node, the SR node forwards the service packet based on the SID list included in the service packet. Except for the source node, other nodes on the forwarding path do not need to maintain path state. Segment Routing over IPv6 (SRv6) uses SR in an IPv6 network and forwards service packets using the node's IPv6 address as the SID.

[0003] In SRv6 branching scenarios, multiple forwarding paths typically exist between routers for forwarding service packets. For example, a network includes Router A, Router B, Router C, and Router D. There are two forwarding paths between Router A and Router D: Path 1: Router A to Router D; Path 2: Router A to Router B to Router C to Router D.

[0004] In traditional routing, routes are selected based on each forwarding path's priority, latency, jitter, packet loss rate, and local bandwidth. For example, when selecting routes based on local bandwidth, if Router A initially selects Path 1 as the forwarding path, Router A will periodically check the bandwidth usage of its two outbound interfaces (e.g., Outbound Interface 1 and Outbound Interface 2, which connect to Router D and Router B, respectively).

[0005] If the bandwidth utilization of outbound interface 1 on router A exceeds the bandwidth threshold and the bandwidth utilization of outbound interface 2 falls below the bandwidth threshold, router A switches paths and forwards service packets over path 2.

[0006] However, this path switchover presents the following problem: Although the bandwidth utilization of outbound interface 2 on Router A meets the bandwidth threshold, the bandwidth utilization of the outbound interfaces of the other routers on path 2 does not. If Router A switches service packets to path 2 for forwarding, it will cause bandwidth congestion on the outbound interfaces of Routers B and C, resulting in service packet loss or affecting the forwarding of other packets. Summary of the Invention

[0007] In view of this, the present application provides a communication method and apparatus to solve the problem that when switching paths according to the device attributes and interface attributes of the existing traditional path switching, service packets may be lost or the forwarding of other packets may be affected.

[0008] In a first aspect, the present application provides a communication method, which is applied to a first network device, where a first forwarding path and a second forwarding path have been established between the first network device and a second network device; the method includes:

[0009] receiving a first protocol message sent by an intermediate network device on each forwarding path, where the first protocol message includes a first interface attribute and / or a second interface attribute, where the first interface attribute is bound to the first forwarding path, and the second interface attribute is bound to the second forwarding path;

[0010] Obtain a third interface attribute of the first network device, or obtain a third interface attribute and a fourth interface attribute of the first network device, where the third interface attribute is bound to the first forwarding path, the fourth interface attribute is bound to the second forwarding path, or the third interface attribute is bound to the first forwarding path and the second forwarding path respectively;

[0011] If all interface attributes bound to the first forwarding path meet corresponding attribute thresholds and all interface attributes bound to the second forwarding path meet corresponding attribute thresholds, then, based on the priority of each forwarding path, select the first forwarding path with the highest priority as the path for forwarding the service message.

[0012] In a second aspect, the present application provides a communication device, wherein the method is applied to a first network device, wherein a first forwarding path and a second forwarding path have been established between the first network device and a second network device; the device includes:

[0013] a receiving unit, configured to receive a first protocol message sent by an intermediate network device on each forwarding path, wherein the first protocol message includes a first interface attribute and / or a second interface attribute, the first interface attribute being bound to the first forwarding path, and the second interface attribute being bound to the second forwarding path;

[0014] a first acquiring unit, configured to acquire a third interface attribute of the first network device, or to acquire a third interface attribute and a fourth interface attribute of the first network device, wherein the third interface attribute is bound to the first forwarding path, the fourth interface attribute is bound to the second forwarding path, or the third interface attribute is bound to the first forwarding path and the second forwarding path respectively;

[0015] A selection unit is configured to select, if all interface attributes bound to the first forwarding path meet corresponding attribute thresholds and all interface attributes bound to the second forwarding path meet corresponding attribute thresholds, the first forwarding path with the highest priority as the path for forwarding service messages based on the priority of each forwarding path.

[0016] In a third aspect, the present application provides a network device comprising a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to execute the method provided in the first aspect of the present application.

[0017] Therefore, by applying the communication method and device provided by the present application, the first network device receives a first protocol message sent by an intermediate network device on each forwarding path, and the first protocol message includes a first interface attribute and / or a second interface attribute, the first interface attribute is bound to the first forwarding path, and the second interface attribute is bound to the second forwarding path; the first network device obtains the third interface attribute of the first network device, or obtains the third interface attribute and the fourth interface attribute of the first network device, the third interface attribute is bound to the first forwarding path, the fourth interface attribute is bound to the second forwarding path, or the third interface attribute is bound to the first forwarding path and the second forwarding path respectively; if all interface attributes bound to the first forwarding path meet the corresponding attribute threshold and all interface attributes bound to the second forwarding path meet the corresponding attribute threshold, then according to the priority of each forwarding path, the first network device selects the first forwarding path with the highest priority as the path for forwarding the service message.

[0018] In this way, by utilizing the existing Interior Gateway Protocol (IGP), each network device can announce the interface attributes of the outbound interface used to forward service packets along the path within the network. This allows the source end of the path to use these interface attributes to select a route based on the bandwidth of the entire forwarding path, thus avoiding problems such as link congestion and packet loss. This solves the problem that existing traditional path switching, when switching paths based on the device and interface attributes, can cause service packet loss or affect the forwarding of other packets. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A flow chart of a communication method provided in an embodiment of the present application;

[0020] Figure 2 Schematic diagram of SRv6 networking provided in an embodiment of the present application;

[0021] Figure 3 A structural diagram of a communication device provided in an embodiment of the present application;

[0022] Figure 4 The network device hardware structure provided in the embodiment of the present application. DETAILED DESCRIPTION

[0023] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0024] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. As used in this application and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the corresponding listed items.

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

[0026] The communication method provided in the embodiment of the present application is described in detail below. Figure 1 , Figure 1 Flowchart of a communication method provided in an embodiment of the present application. The method is applied to a first network device. The communication method provided in an embodiment of the present application may include the following steps.

[0027] Step 110: Receive a first protocol message sent by an intermediate network device on each forwarding path, where the first protocol message includes a first interface attribute and / or a second interface attribute, where the first interface attribute is bound to the first forwarding path, and the second interface attribute is bound to the second forwarding path;

[0028] Specifically, the SRv6 network includes multiple network devices, for example, a first network device, a second network device, a third network device, etc. In the embodiment of the present application, the first network device and the second network device are taken as examples for description.

[0029] In the embodiments of the present application, a first network device serves as a source network device, and a second network device serves as a destination network device. Multiple forwarding paths are established between the two network devices. For example, a first forwarding path and a second forwarding path are provided. It is understood that each forwarding path may also include at least one intermediate network device, or may not include any intermediate network device.

[0030] An IGP neighbor relationship has been established between the first network device, the second network device, and the intermediate network device. IGPs include, but are not limited to, Intermediate System to Intermediate System (IS-IS) and Open Shortest Path First (OSPF).

[0031] After the IGP neighbor relationship is established, each network device notifies the routing information to the other neighboring devices in the network. For example, each network device generates a first protocol message including the routing information to the local end.

[0032] In an embodiment of the present application, the first protocol message generated by each intermediate network device further includes a first interface attribute and / or a second interface attribute, wherein the first interface attribute is bound to the first forwarding path, and the second interface attribute is bound to the second forwarding path.

[0033] Optionally, in an embodiment of the present application, the interface attribute is an attribute of an outbound interface used by a network device to forward a certain service message; the interface attribute includes interface bandwidth utilization.

[0034] For example, an intermediate network device is on a first forwarding path and includes interface 1 and interface 2. Interface 1 is connected to the first network device, and interface 2 is connected to the second network device. After receiving a service message from the first network device, the intermediate network device determines that the service message should be forwarded to the second network device. After searching the forwarding table, the intermediate network device obtains the outgoing interface for forwarding the service message, for example, interface 2. The intermediate network device forwards the service message to the second network device via interface 2.

[0035] The intermediate network device obtains the interface bandwidth utilization of interface 2, carries the interface bandwidth utilization of interface 2 in a first protocol message, and sends the message to the first network device.

[0036] It is understood that each intermediate network device on the forwarding path obtains the interface bandwidth utilization of the outbound interface used to forward service packets, carries the information in the first protocol packet, and sends it to the first network device. For example, in one implementation, when the intermediate network device is on the first forwarding path, the intermediate network device obtains the interface bandwidth utilization of the interface used to forward service packets on the first forwarding path.

[0037] In another implementation, when the intermediate network device is on the second forwarding path, the intermediate network device obtains the interface bandwidth utilization of the interface that forwards the service packet on the second forwarding path.

[0038] In another implementation, when the intermediate network device is on the first forwarding path and the second forwarding path at the same time, the intermediate network device respectively obtains the interface bandwidth utilization of the interface that forwards the service packets on the first forwarding path and the interface bandwidth utilization of the interface that forwards the service packets on the second forwarding path.

[0039] It should be noted that after each network device announces the routing information to each end, each network device can build a network topology to reach other network devices. Based on the network topology, each network device can determine the path to other network devices.

[0040] In this step, the first network device receives the first protocol message sent by each intermediate network device, and obtains the first interface attribute and / or the second interface attribute therefrom.

[0041] Step 120: Obtain a third interface attribute of the first network device, or obtain a third interface attribute and a fourth interface attribute of the first network device, wherein the third interface attribute is bound to the first forwarding path, and the fourth interface attribute is bound to the second forwarding path, or the third interface attribute is bound to the first forwarding path and the second forwarding path respectively;

[0042] Specifically, according to the description of step 110, after the first network device obtains the first interface attribute and / or the second interface attribute from the first protocol message, it obtains its own third interface attribute locally, or obtains its own third interface attribute and fourth interface attribute locally. The third interface attribute is bound to the first forwarding path, and the fourth interface attribute is bound to the second forwarding path; alternatively, the third interface attribute is bound to the first forwarding path and the second forwarding path, respectively.

[0043] It can be understood that, unlike the aforementioned intermediate network device, the first network device, as the source device of the forwarding path, will be on the first forwarding path and the second forwarding path at the same time when multiple forwarding paths have been established between it and the second network device.

[0044] In one implementation, when the first network device is on the first forwarding path and the second forwarding path at the same time, the first network device respectively obtains the interface bandwidth utilization of the interface that forwards service packets on the first forwarding path and the interface bandwidth utilization of the interface that forwards service packets on the second forwarding path.

[0045] For example, when the first network device is simultaneously on the first forwarding path and the second forwarding path, interface 3 included in the first network device is on the first forwarding path and is used to forward service packets, and interface 4 included in the first network device is on the second forwarding path and is used to forward service packets. The first network device obtains the interface bandwidth utilization of interface 3 and the interface bandwidth utilization of interface 4.

[0046] In another implementation, when the first network device is simultaneously on the first forwarding path and the second forwarding path, an interface included in the first network device is also simultaneously on the first forwarding path and the second forwarding path and is used to forward service packets. The first network device obtains the interface bandwidth utilization of the interface for forwarding service packets on the first forwarding path and the interface bandwidth utilization for forwarding service packets on the second forwarding path, respectively.

[0047] For example, when the first network device is simultaneously on the first forwarding path and the second forwarding path, interface 3 included in the first network device is also simultaneously on the first forwarding path and the second forwarding path and is used to forward service packets. The first network device obtains the interface bandwidth utilization of interface 3. The interface bandwidth utilization of interface 3 can be used as the interface bandwidth utilization for forwarding service packets on different forwarding paths.

[0048] In step 110 and step 120, the interface bandwidth utilization is the quotient of the interface used bandwidth and the interface total bandwidth, wherein the interface total bandwidth is obtained through configuration, and the interface used bandwidth is obtained through statistics of sent and received packets.

[0049] Step 130: If all interface attributes bound to the first forwarding path meet the corresponding attribute thresholds and all interface attributes bound to the second forwarding path meet the corresponding attribute thresholds, then, based on the priority of each forwarding path, select the first forwarding path with the highest priority as the path for forwarding service messages.

[0050] Specifically, according to the description of step 110 and step 120, the first network device obtains the first interface attribute, the second interface attribute, and the third interface attribute; or, after the first network device obtains the first interface attribute, the second interface attribute, the third interface attribute, and the fourth interface attribute, it identifies whether each interface attribute bound to the same forwarding path meets the corresponding attribute threshold.

[0051] If all interface attributes bound to the first forwarding path meet the corresponding attribute thresholds and all interface attribute attributes bound to the second forwarding path meet the corresponding attribute thresholds, the first network device selects the first forwarding path with the highest priority as the path for forwarding the service message based on the priority of each forwarding path.

[0052] In the embodiment of the present application, the attribute threshold may specifically be a bandwidth threshold, for example, 70%.The priority of each forwarding path is manually configured by the administrator.

[0053] Optionally, in the embodiment of the present application, the method further includes:

[0054] If any interface attribute of all interface attributes bound to the first forwarding path does not meet the corresponding attribute threshold, and all interface attributes bound to the second forwarding path meet the corresponding attribute threshold, the first network device uses the second forwarding path as the path for forwarding service packets, thereby switching the forwarding path; or

[0055] If all interface attributes bound to the first forwarding path do not meet the corresponding attribute thresholds and all interface attributes bound to the second forwarding path do not meet the corresponding attribute thresholds, the first network device uses the backup path established between itself and the second network device as the path for forwarding service messages.

[0056] In one implementation, the backup path is specifically a 5G wireless link between network devices. Each network device can be configured with a 5G network card, and a 5G wireless link is established through this 5G network card. Furthermore, each network device is configured with a default route that indicates the 5G wireless link. When all paths between network devices are unavailable, the default route takes effect and forwards service packets over the 5G wireless link.

[0057] In another implementation, the backup path is specifically another physical link between network devices. The priority of the other physical link is the minimum value and is usually in a disabled state.

[0058] Therefore, by applying the communication method provided in the present application, the first network device receives a first protocol message sent by an intermediate network device on each forwarding path, and the first protocol message includes a first interface attribute and / or a second interface attribute, the first interface attribute is bound to the first forwarding path, and the second interface attribute is bound to the second forwarding path; the first network device obtains the third interface attribute of the first network device, or obtains the third interface attribute and the fourth interface attribute of the first network device, the third interface attribute is bound to the first forwarding path, the fourth interface attribute is bound to the second forwarding path, or the third interface attribute is bound to the first forwarding path and the second forwarding path respectively; if all interface attributes bound to the first forwarding path meet the corresponding attribute threshold and all interface attributes bound to the second forwarding path meet the corresponding attribute threshold, then according to the priority of each forwarding path, the first network device selects the first forwarding path with the highest priority as the path for forwarding the service message.

[0059] In this way, using the existing IGP protocol, each network device can advertise the interface attributes of the outbound interface used to forward service packets along the path within the network. This allows the source end of the path to use these interface attributes to select a route based on the bandwidth of the entire forwarding path, thus avoiding problems such as link congestion and packet loss. This solves the problem of existing traditional path switching, where switching paths based on the device and interface attributes can cause service packet loss or affect the forwarding of other packets.

[0060] Optionally, in the embodiment of the present application, when selecting a forwarding path, the first network device may not only select based on the aforementioned interface attributes, but may also combine other forwarding attributes as a reference for selecting a forwarding path.

[0061] Specifically, the first network device obtains a first forwarding attribute of the first forwarding path and a second forwarding attribute of the second forwarding path.

[0062] The first network device identifies whether each interface attribute and each forwarding attribute bound to the same forwarding path meet corresponding attribute thresholds.

[0063] If all interface attributes bound to the first forwarding path and the first forwarding attribute all meet corresponding attribute thresholds, and all interface attributes bound to the second forwarding path and the second forwarding attribute all meet corresponding attribute thresholds, then, based on the priority of each forwarding path, the first network device selects the first forwarding path with the highest priority as the path for forwarding the service message; or;

[0064] If all interface attributes bound to the first forwarding path and any one of the first forwarding attributes do not meet the corresponding attribute thresholds, and all interface attributes bound to the second forwarding path and the second forwarding attributes both meet the corresponding attribute thresholds, the first network device uses the second forwarding path as the path for forwarding the service message; or;

[0065] If all interface attributes bound to the first forwarding path and the first forwarding attribute do not meet the corresponding attribute threshold, and all interface attributes bound to the second forwarding path and the second forwarding attribute do not meet the corresponding attribute threshold, the first network device uses the backup path established between the first network device and the second network device as the path for forwarding service messages.

[0066] Optionally, in an embodiment of the present application, the forwarding attribute is a path attribute used by a network device to forward service packets, and the forwarding attribute includes one or more combinations of path delay, path jitter, and packet loss rate.

[0067] The calculation methods for path delay, path jitter, and packet loss rate are the same as those for existing delay, jitter, and packet loss rate calculations, and are briefly explained here.

[0068] For example, in one implementation, a network device periodically (e.g., every 1 second) sends a message. The network device records the message sending time and the message return reception time along the original path. The difference between the two times is the two-way delay of the path.

[0069] In another implementation, network device 1 records the message sending time, network device 2 records the message receiving time, and sends the message receiving time to network device 1. Network device 1 calculates the difference between the two times, which is the one-way delay of the path.

[0070] The path jitter is the difference between the two delays. The packet loss rate is the quotient of the difference between the number of packets sent by network device 1 and the number of packets received by network device 2 and the total number of packets sent.

[0071] Optionally, in an embodiment of the present application, the first protocol message described in the aforementioned step 110 may specifically be a link state protocol data unit (English: Link State Protocol Data Unit, abbreviated as: LSP) message or a link state advertisement (English: Link State Advertisement, abbreviated as: LSA) message.

[0072] The LSP message is defined in the IS-IS protocol, and the LSA message is defined in the OSPF protocol.

[0073] An interface bandwidth usage field is added to the existing LSP message, and the interface bandwidth usage field is used to carry the above interface attributes.

[0074] In addition to existing LSAs, a new type of LSA, the Interface Bandwidth Usage LSA, is added. This LSA includes a Type field and an Interface Bandwidth Usage field. The Type field is Type-20, and the Interface Bandwidth Usage field carries the aforementioned interface attributes.

[0075] It should be noted that the network device in the above embodiment may specifically be a router. Since the network device can carry multiple services at the same time, different attribute thresholds can be set in the network device according to different service characteristics. For example, if service 1 has a higher bandwidth requirement, a smaller bandwidth threshold (for example, 50%) can be set in the network device, and if service 2 has a lower bandwidth quality requirement, a larger bandwidth threshold (for example, 70%) can be set in the network device. The bandwidth thresholds for social recruitment in each network device may be the same or different.

[0076] The communication method provided in the embodiment of the present application is described in detail below. Figure 2 , Figure 2 This is a schematic diagram of the SRv6 network provided in an embodiment of the present application.

[0077] exist Figure 2 In the example, the SRv6 network includes network devices A, B, C, and D. Each network device has two interfaces, through which it establishes a link connection with the other two network devices (the interface identifier of each network device is as follows: Figure 2 ).

[0078] Network device A establishes link 1 and link 2 with network device B and network device D respectively; network device B establishes link 1 and link 3 with network device A and network device C respectively; network device C establishes link 3 and link 4 with network device B and network device D respectively; network device D establishes link 2 and link 4 with network device A and network device C respectively.

[0079] In an SRv6 network, each network device is configured with the IGP protocol. This IGP protocol is used by each network device to advertise routing information to itself within the network. In this embodiment, the ISIS protocol is used as an example. Each network device is configured with the ISIS protocol, and each network device generates LSP packets according to existing ISIS protocol specifications and advertises routing information to each other within the ISIS domain.

[0080] Each network device also configures the ISIS protocol to advertise the bandwidth utilization of the outbound interfaces along the forwarding path. When generating LSPs, each network device carries the interface attributes of the outbound interfaces along the forwarding path, namely, the bandwidth utilization, in the LSPs and advertises them to each other within the ISIS domain.

[0081] Take network device A as an example.

[0082] For example, network device A reaches network device B through two forwarding paths: path 1 and path 2. Path 1 is network device A to network device B, i.e., link 1; path 2 is network device A to network device D to network device C to network device B, i.e., link 2 to link 4 to link 3.

[0083] Network device A is the source; network device B is the destination; network devices C and D are intermediate network devices on path 2. On path 1, interface 1 of network device A is the outbound interface for forwarding service packets on path 1; on path 2, interface 7 of network device D is the outbound interface for forwarding service packets on path 2; and on path 2, interface 5 of network device C is the outbound interface for forwarding service packets on path 2.

[0084] In one implementation, network devices C and D are used as an example to illustrate the transmission of LSP packets. When network device C generates an LSP packet, it carries the interface bandwidth utilization rate of interface 5 (e.g., 50%) in the LSP packet and sends it to network device A. When network device D generates an LSP packet, it carries the interface bandwidth utilization rate of interface 7 (e.g., 60%) in the LSP packet and sends it to network device A.

[0085] It should be noted that after each network device announces the routing information to each end, each network device can build a network topology to reach other network devices. Based on the network topology, each network device can determine the path to other network devices.

[0086] Thus, network device A reaches network device B through two forwarding paths: path 1 and path 2. Administrators can manually configure the attributes of each path on each network device.

[0087] In the embodiment of the present application, path 1 and path 2 are configured as paths for forwarding a certain service message through manual configuration, and the priority of path 1 is configured to be higher than the priority of path 2.

[0088] After receiving the LSP packets from network devices B, C, and D, network device A obtains the interface bandwidth utilization of the outbound interface on each path. It then locally obtains the interface bandwidth utilization of its own interface on each path as the outbound interface. For example, on path 1, the interface bandwidth utilization of interface 1 is (for example, 50%); on path 2, the interface bandwidth utilization of interface 2 is (for example, 30%).

[0089] Network device A compares the interface bandwidth utilization of each outbound interface on each path to see if it meets the corresponding bandwidth threshold (e.g., 70%). For example, network device A determines whether the interface bandwidth utilization of interface 1 on path 1 (e.g., 50%) meets the bandwidth threshold (e.g., 70%). After identification, network device A determines that the interface bandwidth utilization of interface 1 on path 1 meets the bandwidth threshold. Similarly, on path 2, the interface bandwidth utilization of interfaces 2, 5, and 7 all meet the bandwidth threshold.

[0090] At this point, network device A determines that both path 1 and path 2 can be used to forward the service message. Based on the path priorities, network device A selects path 1 as the path for forwarding the service message.

[0091] In another implementation, network devices C and D are used as an example to illustrate the transmission of LSP packets. When network device C generates an LSP packet, it carries the interface bandwidth utilization rate of interface 5 (e.g., 50%) in the LSP packet and sends it to network device A. When network device D generates an LSP packet, it carries the interface bandwidth utilization rate of interface 7 (e.g., 60%) in the LSP packet and sends it to network device A.

[0092] After network device A receives the LSP packets from network devices B, C, and D, it obtains the interface bandwidth utilization of the outbound interface on each path. It then locally obtains the interface bandwidth utilization of its own interface on each path as the outbound interface. For example, on path 1, the interface bandwidth utilization of interface 1 is (for example, 80%); on path 2, the interface bandwidth utilization of interface 2 is (for example, 30%).

[0093] Network device A compares the interface bandwidth utilization of each outbound interface on each path to see if it meets the corresponding bandwidth threshold (e.g., 70%). For example, network device A determines whether the interface bandwidth utilization of interface 1 on path 1 (e.g., 80%) meets the bandwidth threshold (e.g., 70%). After identification, network device A determines that on path 1, the interface bandwidth utilization of interface 1 does not meet the bandwidth threshold; however, on path 2, the interface bandwidth utilization of interfaces 2, 5, and 7 all meet the bandwidth threshold.

[0094] At this point, network device A determines that path 1 is unavailable for forwarding service packets, but path 2 is available. Network device A switches the path from path 1 to path 2, and subsequently continues forwarding service packets over path 2.

[0095] In another implementation, network devices C and D are used as an example to illustrate the transmission of LSP packets. When network device C generates an LSP packet, it carries the interface bandwidth utilization rate of interface 5 (e.g., 50%) in the LSP packet and sends it to network device A. When network device D generates an LSP packet, it carries the interface bandwidth utilization rate of interface 7 (e.g., 75%) in the LSP packet and sends it to network device A.

[0096] After network device A receives the LSP packets from network devices B, C, and D, it obtains the interface bandwidth utilization of the outbound interface on each path. It then locally obtains the interface bandwidth utilization of its own interface on each path as the outbound interface. For example, on path 1, the interface bandwidth utilization of interface 1 is (for example, 80%); on path 2, the interface bandwidth utilization of interface 2 is (for example, 30%).

[0097] Network device A compares the interface bandwidth utilization of each outbound interface on each path to see if it meets the corresponding bandwidth threshold (e.g., 70%). For example, network device A determines whether the interface bandwidth utilization of interface 1 on path 1 (e.g., 80%) meets the bandwidth threshold (e.g., 70%). After identification, network device A determines that on path 1, the interface bandwidth utilization of interface 1 does not meet the bandwidth threshold; on path 2, the interface bandwidth utilization of interfaces 2 and 5 both meet the bandwidth threshold, while the interface bandwidth utilization of interface 7 does not meet the bandwidth threshold.

[0098] At this point, network device A determines that both path 1 and path 2 are unavailable for forwarding service packets. Network device A switches paths again, switching the path for forwarding service packets from path 2 to the backup path, which then continues forwarding service packets.

[0099] The preceding example uses interface bandwidth utilization to illustrate the path selection and switching process of network device A. In practice, interface bandwidth utilization can also be used in conjunction with other forwarding attributes.

[0100] The network device A is still used as an example.

[0101] In another implementation, according to the aforementioned method, network device A obtains the interface bandwidth utilization of interface 5 (for example, 50%) and the interface bandwidth utilization of interface 7 (for example, 60%), and locally obtains the interface bandwidth utilization of interface 1 (for example, 60%) and the interface bandwidth utilization of interface 2 (for example, 30%).

[0102] Network device A obtains the forwarding attributes of each path, such as the latency of each path. For example, the latency of path 1 is 30ms, and the latency of path 2 is 10ms.

[0103] Network device A compares the interface bandwidth utilization of each outbound interface on each path to see if it meets the corresponding bandwidth threshold (e.g., 70%) and the delay of each path to see if it meets the corresponding delay threshold (e.g., 20ms). For example, network device A identifies whether the interface bandwidth utilization (e.g., 80%) of interface 1 on path 1 meets the bandwidth threshold (e.g., 70%) and whether the delay of path 1 (e.g., 30ms) meets the delay threshold (e.g., 20ms). After identification, network device A determines that on path 1, the interface bandwidth utilization of interface 1 does not meet the bandwidth threshold and the delay of path 1 does not meet the delay threshold; on path 2, the interface bandwidth utilization of interfaces 2, 5, and 7 all meet the bandwidth threshold and the delay of path 2 meets the delay threshold.

[0104] At this point, network device A determines that path 1 is unavailable for forwarding service packets, but path 2 is available. Network device A switches the path from the backup path to path 2, and subsequently continues forwarding service packets over path 2.

[0105] In the above embodiment, there are no intermediate network devices in Path 1. In actual applications, there will be intermediate network devices in Path 1, and these intermediate network devices can perform the same steps as Network Devices C and D. Furthermore, when Network Device A identifies each interface attribute and forwarding attribute bound to Path 1, the identification process is the same as that for Network Device A identifying each interface attribute and forwarding attribute bound to Path 2, and will not be repeated here.

[0106] In the above embodiment, network device A's interfaces 1 and 2 are located on different paths. In actual applications, network device A's interface X may be located on different paths simultaneously. For example, network device A may connect to network device B and network device D through interface X. In this case, the interface attributes of interface X obtained by network device A can be used as the interface attributes bound to path 1 and path 2, respectively. The subsequent identification process for network device A is the same as that in the previous embodiment and will not be repeated here.

[0107] Based on the same inventive concept, the present application also provides a communication device corresponding to the communication method. Figure 3 , Figure 3 A communication device provided in an embodiment of the present application is applied to a first network device, wherein a first forwarding path and a second forwarding path have been established between the first network device and a second network device; the device includes:

[0108] a receiving unit 310, configured to receive a first protocol message sent by an intermediate network device on each forwarding path, wherein the first protocol message includes a first interface attribute and / or a second interface attribute, the first interface attribute being bound to the first forwarding path, and the second interface attribute being bound to the second forwarding path;

[0109] a first acquiring unit 320, configured to acquire a third interface attribute of the first network device, or to acquire a third interface attribute and a fourth interface attribute of the first network device, wherein the third interface attribute is bound to the first forwarding path, the fourth interface attribute is bound to the second forwarding path, or the third interface attribute is bound to the first forwarding path and the second forwarding path respectively;

[0110] The selection unit 330 is configured to select, based on the priority of each forwarding path, the first forwarding path with the highest priority as the path for forwarding service messages if all interface attributes bound to the first forwarding path meet corresponding attribute thresholds and all interface attributes bound to the second forwarding path meet corresponding attribute thresholds.

[0111] Optionally, the device further comprises:

[0112] a first processing unit (not shown in the figure), configured to use the second forwarding path as a path for forwarding the service message if any interface attribute among all interface attributes bound to the first forwarding path does not meet a corresponding attribute threshold, and all interface attributes bound to the second forwarding path meet the corresponding attribute threshold; or

[0113] The second processing unit (not shown in the figure) is used to use the backup path established between the first network device and the second network device as the path for forwarding the service message if all interface attributes bound to the first forwarding path do not meet the corresponding attribute threshold and all interface attributes bound to the second forwarding path do not meet the corresponding attribute threshold.

[0114] Optionally, the device further comprises:

[0115] a second acquiring unit (not shown in the figure), configured to acquire a first forwarding attribute of the first forwarding path and a second forwarding attribute of the second forwarding path;

[0116] The selection unit 330 is further configured to, if all interface attributes bound to the first forwarding path and the first forwarding attribute all meet corresponding attribute thresholds, and all interface attributes bound to the second forwarding path and the second forwarding attribute all meet corresponding attribute thresholds, select the first forwarding path with the highest priority as the path for forwarding the service message based on the priority of each forwarding path; or

[0117] The apparatus further includes: a third processing unit (not shown in the figure), configured to use the second forwarding path as a path for forwarding the service message if all interface attributes bound to the first forwarding path and any attribute of the first forwarding attribute do not meet corresponding attribute thresholds, and all interface attributes bound to the second forwarding path and the second forwarding attribute both meet corresponding attribute thresholds; or;

[0118] The fourth processing unit (not shown in the figure) is used to use the backup path established between the first network device and the second network device as the path for forwarding the business message if all interface attributes bound to the first forwarding path and the first forwarding attribute do not meet the corresponding attribute threshold, and all interface attributes bound to the second forwarding path and the second forwarding attribute do not meet the corresponding attribute threshold.

[0119] Optionally, the interface attribute is an attribute of an outbound interface of a network device used to forward the service message; the interface attribute includes interface bandwidth utilization;

[0120] The forwarding attribute is a path attribute used by the network device to forward the service message;

[0121] The forwarding attributes include one or more combinations of path delay, path jitter, and packet loss rate.

[0122] Optionally, the first protocol message is an LSP message or an LSA message;

[0123] The LSP message includes an interface bandwidth usage field, and the interface bandwidth usage field is used to carry interface attributes; or;

[0124] The LSA message includes a type field and an interface bandwidth usage field. The value of the type field is 20. The interface bandwidth usage field is used to carry interface attributes.

[0125] Therefore, by applying the communication device provided by the present application, the first network device receives the first protocol message sent by the intermediate network device on each forwarding path, and the first protocol message includes a first interface attribute and / or a second interface attribute, the first interface attribute is bound to the first forwarding path, and the second interface attribute is bound to the second forwarding path; the first network device obtains the third interface attribute and / or the fourth interface attribute of the first network device, the third interface attribute is bound to the first forwarding path, and the fourth interface attribute is bound to the second forwarding path; if the first interface attribute and the third interface attribute both meet the corresponding attribute thresholds and the second interface attribute and the fourth interface attribute both meet the corresponding attribute thresholds, then according to the priority of each forwarding path, the first network device selects the first forwarding path with the highest priority as the path for forwarding the service message.

[0126] In this way, using the existing IGP protocol, each network device can advertise the interface attributes of the outbound interface used to forward service packets along the path within the network. This allows the source end of the path to use these interface attributes to select a route based on the bandwidth of the entire forwarding path, thus avoiding problems such as link congestion and packet loss. This solves the problem of existing traditional path switching, where switching paths based on the device and interface attributes can cause service packet loss or affect the forwarding of other packets.

[0127] Based on the same inventive concept, the embodiment of the present application further provides a network device, such as Figure 4 As shown, it includes a processor 410, a transceiver 420 and a machine-readable storage medium 430, the machine-readable storage medium 430 stores machine-executable instructions that can be executed by the processor 410, and the processor 410 is prompted by the machine-executable instructions to execute the communication method provided in the embodiment of the present application. Figure 3 The communication device shown can be used as Figure 4 The network device hardware structure shown is implemented.

[0128] The computer-readable storage medium 430 may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Alternatively, the computer-readable storage medium 430 may be at least one storage device located remotely from the processor 410.

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

[0130] In the embodiment of the present application, the processor 410 reads the machine-executable instructions stored in the machine-readable storage medium 430, and the machine-executable instructions enable the processor 410 itself and call the transceiver 420 to execute the communication method described in the aforementioned embodiment of the present application.

[0131] In addition, an embodiment of the present application provides a machine-readable storage medium 430, which stores machine-executable instructions. When called and executed by the processor 410, the machine-executable instructions prompt the processor 410 itself and the calling transceiver 420 to execute the communication method described in the aforementioned embodiment of the present application.

[0132] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0133] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0134] As for the embodiments of the communication device and the machine-readable storage medium, since the method contents involved are basically similar to those of the aforementioned method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0135] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A communication method, characterized in that: The method is applied to a first network device, where a first forwarding path and a second forwarding path have been established between the first network device and a second network device; the method includes: receiving a first protocol message sent by an intermediate network device on each forwarding path, where the first protocol message includes a first interface attribute and / or a second interface attribute, where the first interface attribute is bound to the first forwarding path, and the second interface attribute is bound to the second forwarding path; Obtain a third interface attribute of the first network device, or obtain a third interface attribute and a fourth interface attribute of the first network device, where the third interface attribute is bound to the first forwarding path, the fourth interface attribute is bound to the second forwarding path, or the third interface attribute is bound to the first forwarding path and the second forwarding path respectively; If all interface attributes bound to the first forwarding path meet corresponding attribute thresholds and all interface attributes bound to the second forwarding path meet corresponding attribute thresholds, selecting the first forwarding path with the highest priority as the path for forwarding the service message based on the priority of each forwarding path; The method further comprises: If any interface attribute of all interface attributes bound to the first forwarding path does not meet the corresponding attribute threshold, and all interface attributes bound to the second forwarding path meet the corresponding attribute threshold, then use the second forwarding path as the path for forwarding the service message; or; If all interface attributes bound to the first forwarding path do not meet the corresponding attribute thresholds and all interface attributes bound to the second forwarding path do not meet the corresponding attribute thresholds, the backup path established between the first network device and the second network device is used as the path for forwarding the service message.

2. The method according to claim 1, characterized in that The method further comprises: Obtaining a first forwarding attribute of the first forwarding path and a second forwarding attribute of the second forwarding path; If all interface attributes bound to the first forwarding path and the first forwarding attribute all meet corresponding attribute thresholds, and all interface attributes bound to the second forwarding path and the second forwarding attribute all meet corresponding attribute thresholds, then, based on the priority of each forwarding path, selecting the first forwarding path with the highest priority as the path for forwarding the service message; or; If all interface attributes bound to the first forwarding path and any of the first forwarding attributes do not meet corresponding attribute thresholds, and all interface attributes bound to the second forwarding path and the second forwarding attributes both meet corresponding attribute thresholds, then use the second forwarding path as the path for forwarding the service message; or; If all interface attributes bound to the first forwarding path and the first forwarding attribute do not meet the corresponding attribute threshold, and all interface attributes bound to the second forwarding path and the second forwarding attribute do not meet the corresponding attribute threshold, the backup path established between the first network device and the second network device will be used as the path for forwarding the service message.

3. The method according to claim 2, characterized in that The interface attributes are attributes of the outbound interface of the network device used to forward the service message; the interface attributes include interface bandwidth utilization; The forwarding attribute is a path attribute used by the network device to forward the service message; The forwarding attributes include one or more combinations of path delay, path jitter, and packet loss rate.

4. The method according to claim 1, wherein The first protocol message is an LSP message or an LSA message; The LSP message includes an interface bandwidth usage field, and the interface bandwidth usage field is used to carry interface attributes; or; The LSA message includes a type field and an interface bandwidth usage field. The value of the type field is 20. The interface bandwidth usage field is used to carry interface attributes.

5. A communication device, characterized in that: The apparatus is applied to a first network device, where a first forwarding path and a second forwarding path have been established between the first network device and a second network device; the apparatus includes: a receiving unit, configured to receive a first protocol message sent by an intermediate network device on each forwarding path, wherein the first protocol message includes a first interface attribute and / or a second interface attribute, the first interface attribute being bound to the first forwarding path, and the second interface attribute being bound to the second forwarding path; a first acquiring unit, configured to acquire a third interface attribute of the first network device, or to acquire a third interface attribute and a fourth interface attribute of the first network device, wherein the third interface attribute is bound to the first forwarding path, the fourth interface attribute is bound to the second forwarding path, or the third interface attribute is bound to the first forwarding path and the second forwarding path respectively; a selecting unit, configured to select, based on the priority of each forwarding path, the first forwarding path with the highest priority as the path for forwarding the service message if all interface attributes bound to the first forwarding path meet corresponding attribute thresholds and all interface attributes bound to the second forwarding path meet corresponding attribute thresholds; Wherein, the device further includes: a first processing unit, configured to use the second forwarding path as a path for forwarding the service message if any interface attribute among all interface attributes bound to the first forwarding path does not meet a corresponding attribute threshold, and all interface attributes bound to the second forwarding path meet the corresponding attribute threshold; or The second processing unit is used to use the backup path established between the first network device and the second network device as the path for forwarding the service message if all interface attributes bound to the first forwarding path do not meet the corresponding attribute threshold and all interface attributes bound to the second forwarding path do not meet the corresponding attribute threshold.

6. The device according to claim 5, characterized in that The device further comprises: a second acquiring unit, configured to acquire a first forwarding attribute of the first forwarding path and a second forwarding attribute of the second forwarding path; The selection unit is further configured to, if all interface attributes bound to the first forwarding path and the first forwarding attribute all meet corresponding attribute thresholds, and all interface attributes bound to the second forwarding path and the second forwarding attribute all meet corresponding attribute thresholds, select, based on the priority of each forwarding path, the first forwarding path with the highest priority as the path for forwarding the service message; or The apparatus further includes: a third processing unit, configured to use the second forwarding path as a path for forwarding the service message if all interface attributes bound to the first forwarding path and any attribute of the first forwarding attribute do not meet a corresponding attribute threshold, and all interface attributes bound to the second forwarding path and the second forwarding attribute both meet a corresponding attribute threshold; or; The fourth processing unit is used to use the backup path established between the first network device and the second network device as the path for forwarding the business message if all interface attributes bound to the first forwarding path and the first forwarding attribute do not meet the corresponding attribute threshold, and all interface attributes bound to the second forwarding path and the second forwarding attribute do not meet the corresponding attribute threshold.

7. The device according to claim 6, characterized in that The interface attributes are attributes of the outbound interface of the network device used to forward the service message; the interface attributes include interface bandwidth utilization; The forwarding attribute is a path attribute used by the network device to forward the service message; The forwarding attributes include one or more combinations of path delay, path jitter, and packet loss rate.

8. The device according to claim 5, characterized in that The first protocol message is an LSP message or an LSA message; The LSP message includes an interface bandwidth usage field, and the interface bandwidth usage field is used to carry interface attributes; or; The LSA message includes a type field and an interface bandwidth usage field. The value of the type field is 20. The interface bandwidth usage field is used to carry interface attributes.

Citation Information

Patent Citations

  • Method and device for determining forwarding path

    CN112491707A

  • Flow control method and device, equipment and medium

    CN118282951A