Communication method and device
By receiving and analyzing protocol messages sent by intermediate network devices, obtaining interface attributes on the forwarding path, and selecting the path with the highest priority based on these attributes for forwarding service messages, solving the loss of service messages caused by traditional path switching and The problem of other packet forwarding impacts is realized, and the selection of routes based on the bandwidth of the entire forwarding path is avoided, link congestion and packet loss.
Patent Information
- Application Number
- CN202411481778.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-10-22
AI Technical Summary
When switching existing traditional paths, switching paths based on their own device attributes and interface attributes will result in packet loss or affecting the forwarding of other packets.
By receiving protocol messages sent by intermediate network devices, the interface attributes on each forwarding path are obtained, and based on these attributes and the priority of the path, the highest priority path that meets the threshold is selected for forwarding service messages.
It realizes routing based on the bandwidth of the entire forwarding path, avoids problems such as link congestion and packet loss, and solves the problems of packet loss and other packet forwarding caused by traditional path switching.
Smart Images

Figure CN119402416A_ABST
Abstract
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 message passes through an SR node, the SR node forwards the service message according to the SID list included in the service message. Except for the source node, other nodes on the forwarding path do not need to maintain the path status. Segment Routing over IPv6 (SRv6) refers to the use of SR in an IPv6 network, and forwarding service messages using the node's IPv6 address as the SID.
[0003] In the SRv6 branch solution scenario, there are usually multiple forwarding paths between routers for forwarding service messages. For example, the network includes router A, router B, router C, and router D. There are two forwarding paths between router A and router D, namely, path 1: router A-router D; path 2: router A-router B-router C-router D.
[0004] In the traditional routing method, the route is selected based on the priority, delay, jitter, packet loss rate, and local bandwidth of each forwarding path. For example, when routing is selected based on local bandwidth, if router A first selects path 1 as the forwarding path, router A will periodically determine the bandwidth usage of its two outbound interfaces (for example, outbound interface 1 and outbound interface 2 are connected to router D and router B respectively).
[0005] If the bandwidth utilization of outbound interface 1 of router A exceeds the bandwidth threshold and the bandwidth utilization of outbound interface 2 is lower than the bandwidth threshold, router A will perform path switching and forward the service message through path 2.
[0006] However, the path switching at this time will expose the following problem: although the bandwidth utilization of the outbound interface 2 of router A meets the bandwidth threshold, the bandwidth utilization of the outbound interfaces of other routers on path 2 does not meet the threshold. If router A switches the service message to path 2 for forwarding, it will cause bandwidth congestion on the outbound interfaces of routers B and C, resulting in packet loss of service messages or affecting the forwarding of other messages. 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, the method being 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 method comprising:
[0009] receiving 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, wherein the first interface attribute is bound to the first forwarding path, and the second interface attribute is bound to the second forwarding path;
[0010] Acquire a third interface attribute of the first network device, or 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, 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;
[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, according to the priority of each forwarding path, select the first forwarding path with the highest priority as the path for forwarding service messages.
[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 comprises:
[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, wherein the first interface attribute is bound to the first forwarding path, and the second interface attribute is bound to the second forwarding path;
[0014] a first acquisition 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, configured to select, 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, the first forwarding path with the highest priority as the path for forwarding service messages according to the priority of each forwarding path.
[0016] In a third aspect, the present application provides a network device, including a processor and a machine-readable storage medium, the machine-readable storage medium storing 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 respectively bound to the first forwarding path and the second forwarding path; 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 using the existing Interior Gateway Protocol (IGP), each network device can announce the interface attributes of the outbound interface used to forward service messages on the path within the network, so that the source end of the path can use the interface attributes to implement routing based on the bandwidth of the entire forwarding path, avoiding link congestion, packet loss and other problems. This solves the problem that when switching the path according to the device attributes and interface attributes of the existing traditional path, service messages will be lost or the forwarding of other messages will be affected. 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, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0024] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in this article refers to and includes any or all possible combinations of one or more corresponding listed items.
[0025] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the 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 A flow chart 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 embodiment of the present application, the first network device is used as a source network device, the second network device is used as a destination network device, and multiple forwarding paths have been established between the two network devices. For example, a first forwarding path and a second forwarding path. It is understandable that each forwarding path also includes at least one intermediate network device, or does not include an intermediate network device.
[0030] The first network device, the second network device, and the intermediate network device have established an IGP neighbor relationship, wherein IGP includes but is not limited to Intermediate System to Intermediate System (IS-IS), Open Shortest Path First (OSPF), and the like.
[0031] After the IGP neighbor relationship is established, each network device notifies the routing information reaching the local end to other neighbor devices in the network. For example, each network device generates a first protocol message, and the first protocol message includes the routing information reaching the local end.
[0032] In the embodiment of the present application, the first protocol message generated by each intermediate network device also 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 output interface of a network device used to forward a certain service message; the interface attribute includes interface bandwidth utilization.
[0034] For example, the intermediate network device is on the first forwarding path, and the intermediate network device 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 the intermediate network device receives the service message sent by the first network device, it 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. Through interface 2, the intermediate network device forwards the service message to the second network device.
[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 understandable that the intermediate network device on each forwarding path obtains the interface bandwidth utilization of the outbound interface used to forward the service message, carries it in the first protocol message, 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 that forwards the service message on the first forwarding path.
[0037] In another implementation manner, when the intermediate network device is on the second forwarding path, the intermediate network device obtains the interface bandwidth utilization rate of the interface that forwards the service message 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 message on the first forwarding path and the interface bandwidth utilization of the interface that forwards the service message on the second forwarding path.
[0039] It should be noted that after each network device informs each other of the routing information reaching the local end, each network device can build a network topology reaching other network devices. Through the network topology, each network device can determine its own 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; or, 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, when multiple forwarding paths have been established between it and the second network device, the first network device will be on the first forwarding path and the second forwarding path at the same time.
[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 the service message on the first forwarding path and the interface bandwidth utilization of the interface that forwards the service message on the second forwarding path.
[0045] For example, when the first network device is on the first forwarding path and the second forwarding path at the same time, the interface 3 included in the first network device is on the first forwarding path and is used to forward service messages, and the interface 4 included in the first network device is on the second forwarding path and is used to forward service messages. 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 on the first forwarding path and the second forwarding path at the same time, an interface included in the first network device is also on the first forwarding path and the second forwarding path at the same time and is used to forward service messages. The first network device obtains the interface bandwidth utilization rate of the interface for forwarding service messages on the first forwarding path and the interface bandwidth utilization rate of the interface for forwarding service messages on the second forwarding path.
[0047] For example, when the first network device is on the first forwarding path and the second forwarding path at the same time, the interface 3 included in the first network device is also on the first forwarding path and the second forwarding path at the same time and is used to forward service messages. The first network device obtains the interface bandwidth utilization of the interface 3. The interface bandwidth utilization of the interface 3 can be used as the interface bandwidth utilization of the service message forwarded 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 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, 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 according to the priority of each forwarding path.
[0052] In the embodiment of the present application, the attribute threshold may be specifically a bandwidth threshold, for example, 70%. The priority of each forwarding path is manually configured by a management personnel.
[0053] Optionally, in the embodiment of the present application, it also includes:
[0054] If any interface attribute of all interface attributes bound to the first forwarding path does not satisfy the corresponding attribute threshold, and all interface attributes bound to the second forwarding path satisfy the corresponding attribute threshold, the first network device uses the second forwarding path as a path for forwarding service messages to implement forwarding path switching; 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] Among them, in one implementation, the above-mentioned backup path is specifically a 5G wireless link between network devices. A 5G network card can be configured in each network device, and a 5G wireless link is established through the 5G network card. In addition, a default route is configured in each network device, and the default route indicates a 5G wireless link. When the paths between network devices are unavailable, the default route takes effect and forwards service messages through the 5G wireless link.
[0057] In another implementation, the backup path is specifically other physical links between network devices, and the priority of the other physical links is a minimum value, which is usually in a disabled state.
[0058] Therefore, by applying the communication method 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 respectively bound to the first forwarding path and the second forwarding path; 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, by using the existing IGP protocol, each network device can announce the interface attributes of the outbound interface used to forward service messages on the path within the network, so that the source end of the path uses the interface attributes to implement routing based on the bandwidth of the entire forwarding path, avoiding link congestion, packet loss and other problems. This solves the problem that when switching the path according to the device attributes and interface attributes of the existing traditional path, service messages will be lost or the forwarding of other messages will be affected.
[0060] Optionally, in the embodiment of the present application, when selecting a forwarding path, the first network device may not only select according to 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 bound to the same forwarding path and each forwarding attribute satisfy a corresponding attribute threshold.
[0063] If all interface attributes bound to the first forwarding path and the first forwarding attribute all meet the corresponding attribute thresholds, and all interface attributes bound to the second forwarding path and the second forwarding attribute all 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; or;
[0064] If all interface attributes bound to the first forwarding path and any attribute in the first forwarding attribute do not satisfy the corresponding attribute threshold, and all interface attributes bound to the second forwarding path and the second forwarding attribute both satisfy the corresponding attribute threshold, 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 thresholds, and all interface attributes bound to the second forwarding path and the second forwarding attribute do not meet the corresponding attribute thresholds, 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 the embodiment of the present application, the forwarding attribute is a path attribute used by the network device to forward the service message, and the forwarding attribute includes one or more combinations of path delay, path jitter, and packet loss rate.
[0067] Among them, the calculation methods of path delay, path jitter, and packet loss rate are the same as the existing calculation methods of delay, jitter, and packet loss rate, which are briefly explained here.
[0068] For example, in one implementation, a network device sends a message periodically (for example, every 1 second). The network device records the message sending time and the message receiving time returned by 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 based on the above two times, and the difference 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 announcement (English: Link State Advertisement, abbreviated as: LSA) message.
[0072] The LSP message is a message defined in the IS-IS protocol; the LSA message is a message 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] Based on the existing LSA message, a new type of LSA message is added, namely, interface bandwidth usage LSA. The LSA message includes a type field and an interface bandwidth usage field. The value of the type field is Type-20, and the interface bandwidth usage field is used to carry the above 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 A schematic diagram of the SRv6 network provided in an embodiment of the present application.
[0077] exist Figure 2 In the SRv6 network, network devices A, B, C, and D are included. 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 the SRv6 network, each network device is configured with an IGP protocol. The IGP protocol is used by each network device to announce the routing information reaching itself in the network. In the embodiment of the present application, the ISIS protocol is used as an example. The ISIS protocol is configured in each network device, and the network devices generate LSP messages in accordance with the existing ISIS protocol regulations, and announce routing information to each other in the ISIS domain.
[0080] At the same time, each network device is also configured to publish the interface bandwidth utilization of the outbound interface on the forwarding path in the ISIS protocol. When each network device generates an LSP message, it also carries the interface attribute of the outbound interface on the forwarding path, that is, the interface bandwidth utilization, in the LSP message and announces it to each other in 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, namely path 1 and path 2. Path 1 is network device A—network device B, i.e. link 1; path 2 is network device A—network device D—network device C—network device B, i.e. link 2—link 4—link 3.
[0083] Among them, network device A is the source end; network device B is the destination end; network device C and network device D are intermediate network devices on path 2. On path 1, interface 1 included in network device A is the outbound interface for forwarding service messages on path 1; on path 2, interface 7 included in network device D is the outbound interface for forwarding service messages on path 2; on path 2, interface 5 included in network device C is the outbound interface for forwarding service messages on path 2.
[0084] In one implementation, the example of network device C and network device D sending LSP messages is used for explanation. When network device C generates an LSP message, it carries the interface bandwidth utilization rate (for example, 50%) of interface 5 in the LSP message and sends it to network device A; when network device D generates an LSP message, it carries the interface bandwidth utilization rate (for example, 60%) of interface 7 in the LSP message and sends it to network device A.
[0085] It should be noted that after each network device informs each other of the routing information reaching the local end, each network device can build a network topology reaching other network devices. Through the network topology, each network device can determine its own path to other network devices.
[0086] Thus, network device A reaches network device B through two forwarding paths, namely path 1 and path 2. The administrator can manually configure the attributes of each path on each network device.
[0087] In the embodiment of the present application, through manual configuration, path 1 and path 2 are configured as paths for forwarding a certain service message, and the priority of path 1 is configured to be higher than the priority of path 2.
[0088] After network device A receives the LSP message sent by network device B, network device C, and network device D, it obtains the interface bandwidth utilization of the outbound interface on each path, and then obtains the interface bandwidth utilization of its own interface on each path as the outbound interface from the local. That is, on path 1, the interface bandwidth utilization of interface 1 (for example, 50%); on path 2, the interface bandwidth utilization of interface 2 (for example, 30%).
[0089] Network device A compares whether the interface bandwidth utilization of each outbound interface on each path meets the corresponding bandwidth threshold (e.g., 70%). For example, network device A identifies whether the interface bandwidth utilization (e.g., 50%) of interface 1 on path 1 meets the bandwidth threshold (e.g., 70%). After identification, network device A determines that on path 1, the interface bandwidth utilization of interface 1 meets the bandwidth threshold; similarly, on path 2, the interface bandwidth utilization of interface 2, interface 5, and interface 7 all meet the bandwidth threshold.
[0090] At this time, network device A determines that both path 1 and path 2 can be used to forward the service message. Network device A selects path 1 as the path for forwarding the service message according to the priority of the path.
[0091] In another implementation, take the example of network device C and network device D sending LSP messages. When network device C generates an LSP message, it carries the interface bandwidth utilization rate (for example, 50%) of interface 5 in the LSP message and sends it to network device A; when network device D generates an LSP message, it carries the interface bandwidth utilization rate (for example, 60%) of interface 7 in the LSP message and sends it to network device A.
[0092] After network device A receives the LSP message sent by network device B, network device C, and network device D, it obtains the interface bandwidth utilization of the outbound interface on each path, and then obtains the interface bandwidth utilization of its own interface on each path as the outbound interface from the local. That is, on path 1, the interface bandwidth utilization of interface 1 (for example, 80%); on path 2, the interface bandwidth utilization of interface 2 (for example, 30%).
[0093] Network device A compares whether the interface bandwidth utilization of each outbound interface on each path meets the corresponding bandwidth threshold (e.g., 70%). 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%). After identification, network device A determines that on path 1, the interface bandwidth utilization of interface 1 does not meet the bandwidth threshold; while on path 2, the interface bandwidth utilization of interface 2, interface 5, and interface 7 all meet the bandwidth threshold.
[0094] At this time, network device A determines that path 1 cannot be used to forward service messages, and path 2 can be used to forward service messages. Network device A will switch the path for forwarding service messages from path 1 to path 2, and path 2 will continue to forward service messages.
[0095] In another implementation, take the example of network device C and network device D sending LSP messages. When network device C generates an LSP message, it carries the interface bandwidth utilization rate (for example, 50%) of interface 5 in the LSP message and sends it to network device A; when network device D generates an LSP message, it carries the interface bandwidth utilization rate (for example, 75%) of interface 7 in the LSP message and sends it to network device A.
[0096] After network device A receives the LSP message sent by network device B, network device C, and network device D, it obtains the interface bandwidth utilization of the outbound interface on each path, and then obtains the interface bandwidth utilization of its own interface on each path as the outbound interface from the local. That is, on path 1, the interface bandwidth utilization of interface 1 (for example, 80%); on path 2, the interface bandwidth utilization of interface 2 (for example, 30%).
[0097] Network device A compares the interface bandwidth utilization of each outbound interface on each path to see whether it meets the corresponding bandwidth threshold (e.g., 70%). 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%). 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 interface 2 and interface 5 both meet the bandwidth threshold, while the interface bandwidth utilization of interface 7 does not meet the bandwidth threshold.
[0098] At this time, network device A determines that both path 1 and path 2 are unavailable for forwarding service messages. Network device A will switch paths again, switching the path for forwarding service messages from path 2 to the backup path, and the backup path will continue to forward service messages.
[0099] The above uses the interface bandwidth utilization as an example to illustrate the process of selecting and switching paths by network device A. In actual applications, the interface bandwidth utilization can also be used in combination with other forwarding attributes.
[0100] The network device A is still taken 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, for example, the delay of each path. For example, the delay of path 1 is 30ms; the delay of path 2 is 10ms.
[0103] Network device A compares whether the interface bandwidth utilization of each outbound interface on each path satisfies the corresponding bandwidth threshold (e.g., 70%) and whether the delay of each path satisfies 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 satisfies the bandwidth threshold (e.g., 70%) and whether the delay of path 1 (e.g., 30ms) satisfies 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 interface 2, interface 5, and interface 7 all meet the bandwidth threshold and the delay of path 2 meets the delay threshold.
[0104] At this time, network device A determines that path 1 cannot be used to forward service messages, and path 2 can be used to forward service messages. Network device A will switch the path for forwarding service messages from the backup path to path 2, and path 2 will continue to forward service messages.
[0105] In the above embodiment, there is no intermediate network device in path 1. In actual applications, there will be an intermediate network device in path 1, and the intermediate network device can perform the same steps as network device C and network device D. At the same time, when network device A identifies each interface attribute and forwarding attribute bound to path 1, its identification process is the same as that of 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, the example in which interface 1 and interface 2 included in network device A are respectively on different paths is used for explanation. In actual applications, interface X included in network device A will be on different paths at the same time. For example, network device B and network device D are connected respectively through interface X. At this time, the interface attributes of interface X obtained by network device A can be used as the interface attributes bound to path 1 and the interface attributes bound to path 2 respectively. The subsequent identification process of network device A is the same as the identification process in the above embodiment, and will not be repeated here.
[0107] Based on the same inventive concept, the present application embodiment 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, and a first forwarding path and a second forwarding path have been established between the first network device and the 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, wherein the first interface attribute is bound to the first forwarding path, and the second interface attribute is bound to the second forwarding path;
[0109] A first acquisition unit 320 is configured to acquire a third interface attribute of the first network device, or 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 used to select the first forwarding path with the highest priority as the path for forwarding service messages according to the priority of each forwarding path 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.
[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 satisfy a corresponding attribute threshold, and all interface attributes bound to the second forwarding path satisfy the corresponding attribute threshold; or;
[0113] A 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 acquisition 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 according to the priority of each forwarding path; or;
[0117] The device 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 in 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 both meet the corresponding attribute threshold; or;
[0118] A 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] Wherein, 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 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, and 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 a third interface attribute and / or a fourth interface attribute of the first network device, and 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, by using the existing IGP protocol, each network device can announce the interface attributes of the outbound interface used to forward service messages on the path within the network, so that the source end of the path uses the interface attributes to implement routing based on the bandwidth of the entire forwarding path, avoiding link congestion, packet loss and other problems. This solves the problem that when switching the path according to the device attributes and interface attributes of the existing traditional path, service messages will be lost or the forwarding of other messages will be affected.
[0127] Based on the same inventive concept, the embodiment of the present application also 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 a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk storage. Optionally, the computer-readable storage medium 430 may also be at least one storage device located away 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 gates 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 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 embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only 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 communication device and machine-readable storage medium embodiments, since the method contents involved are basically similar to 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 substitutions, 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, a first forwarding path and a second forwarding path have been established between the first network device and a second network device; the method comprises: receiving 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, wherein the first interface attribute is bound to the first forwarding path, and the second interface attribute is bound to the second forwarding path; Acquire a third interface attribute of the first network device, or 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, 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; 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, according to the priority of each forwarding path, select the first forwarding path with the highest priority as the path for forwarding service messages.
2. The method according to claim 1, characterized in that 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, the second forwarding path is used 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.
3. The method according to claim 1, characterized in that The method further comprises: Acquire 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 the corresponding attribute threshold, and all interface attributes bound to the second forwarding path and the second forwarding attribute all meet the corresponding attribute threshold, then according to the priority of each forwarding path, select 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 attribute in 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 both meet the corresponding attribute threshold, the second forwarding path is used 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 is used as the path for forwarding the service message.
4. The method according to claim 3, characterized in that The interface attribute is the attribute of the outbound interface of the network device used to forward the service message; the interface attribute includes the 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.
5. The method according to claim 1, characterized in that The first protocol message is an LSP message or an LSA message; Wherein, 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.
6. A communication device, characterized in that: The device is applied to a first network device, and 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: 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, wherein the first interface attribute is bound to the first forwarding path, and the second interface attribute is bound to the second forwarding path; a first acquisition 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 selection unit, configured to select, 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, the first forwarding path with the highest priority as the path for forwarding service messages according to the priority of each forwarding path.
7. The device according to claim 6, characterized in that The device also includes: a first processing unit, configured to use the second forwarding path as a path for forwarding the service message if any interface attribute of all interface attributes bound to the first forwarding path does not satisfy a corresponding attribute threshold, and all interface attributes bound to the second forwarding path satisfy a 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.
8. The device according to claim 6, characterized in that The device also includes: A second acquisition 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 satisfy corresponding attribute thresholds, and all interface attributes bound to the second forwarding path and the second forwarding attribute all satisfy corresponding attribute thresholds, then select the first forwarding path with the highest priority as the path for forwarding the service message according to the priority of each forwarding path; or; The device 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 in the first forwarding attribute do not satisfy a corresponding attribute threshold, and all interface attributes bound to the second forwarding path and the second forwarding attribute both satisfy 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 service 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.
9. The device according to claim 8, characterized in that The interface attribute is the attribute of the outbound interface of the network device used to forward the service message; the interface attribute includes the 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.
10. The device according to claim 6, characterized in that The first protocol message is an LSP message or an LSA message; Wherein, 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
Forwarding path determining method and apparatus
CA3177578A1
ICN based distributed resource directory for iot resource discovery and routing
CN108141463A
Method and device for determining forwarding path
CN112491707A
Routing calculation method, device and equipment and storage medium
CN116032816A
Route selection method, device, equipment, system and storage medium
CN116781596A