Message forwarding method and apparatus, and electronic device
By exchanging link quality information with neighboring devices through the domain egress router, congestion adjustment can be achieved, resolving link congestion issues between the domain egress router and external devices, ensuring normal packet transmission, and improving network quality.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2026-04-02
AI Technical Summary
Congestion frequently occurs on the link between the domain egress router and devices outside the domain, affecting packet transmission and reducing network quality.
The domain egress router interacts with neighboring devices to send and receive link quality information, and switches packets from the congested first domain interface to the uncongested second domain interface for transmission through congestion adjustment.
To ensure normal message transmission, improve network quality, and avoid the impact of link congestion.
Smart Images

Figure CN2024122664_02042026_PF_FP_ABST
Abstract
Description
Message forwarding methods, devices and electronic equipment Technical Field
[0001] This application relates to network communication technology, and in particular to message forwarding methods, apparatus and electronic equipment. Background Technology
[0002] In network applications, domain egress routers receive or send packets through links with devices outside the domain. These domain egress routers can be egress routers within an AS (Application System) or egress routers within a network domain (also called a management domain) defined according to actual conditions. As shown in Figure 1, PE2 and PE3 serve as domain egress routers. Here, PE2 and PE3 can be egress routers within the same domain or egress routers from different domains. In Figure 1, PE2 connects to PE4 on the backbone network outside the domain, and PE3 connects to PE5 on the backbone network outside the domain. PE2 receives packets from the backbone network through the link with PE4, or sends packets via its own domain to the backbone network. PE3 receives packets from the backbone network through the link with PE5, or sends packets via its own domain to the backbone network.
[0003] In practice, congestion often occurs on the links between the domain egress router and external devices outside the domain. For example, as shown in Figure 1, congestion may occur on the link between PE2 and PE4, or on the link between PE3 and PE5. This congestion can affect packet transmission and reduce network quality.
[0004] Summary of the Invention
[0005] This application provides a message forwarding method, apparatus, and electronic device to enable any domain egress router to adjust congestion in a timely manner when it detects congestion in the link with a device outside the domain.
[0006] This application provides a message forwarding method, which is applied to a domain egress router, wherein the domain egress router has a first domain interface locally for connecting to devices outside the domain; the method includes:
[0007] Send the current first link quality information of the first domain interface to the neighboring devices of the domain egress router; the first link quality information includes the current link quality information of the first domain interface in the inbound and / or outbound directions;
[0008] Receive the second link quality information of the neighboring device's local second domain interface sent by the neighboring device; the second link quality information includes the link quality information of the second domain interface in the inbound and / or outbound directions;
[0009] The first link quality information and the second link quality information are used for congestion adjustment when the first domain interface is congested in a target direction, so as to switch a packet originally transmitted via the target direction of the first domain interface to transmission via the target direction of the second domain interface, the target direction being the incoming direction or the outgoing direction.
[0010] The embodiment of the present application further provides a packet forwarding device, which is applied to a domain exit router, wherein the domain exit router locally exists a first domain interface used for connecting a device outside a domain; the device comprises:
[0011] a sending unit, configured to send first link quality information of the first domain interface currently to a neighbor device of the domain exit router; the first link quality information comprises link quality information of the first domain interface currently in an incoming direction and / or an outgoing direction;
[0012] a receiving unit, configured to receive second link quality information of a second domain interface currently of the neighbor device sent by the neighbor device; the second link quality information comprises link quality information of the second domain interface currently in the incoming direction and / or the outgoing direction;
[0013] The first link quality information and the second link quality information are used for congestion adjustment when the first domain interface is congested in a target direction, so as to switch a packet originally transmitted via the target direction of the first domain interface to transmission via the target direction of the second domain interface, the target direction being the incoming direction or the outgoing direction.
[0014] The embodiment of the present application further provides an electronic device. The electronic device comprises a processor and a machine readable storage medium; the machine readable storage medium stores machine executable instructions capable of being executed by the processor; and the processor is used for executing the machine executable instructions to realize the steps of the above disclosed method.
[0015] As can be seen from the above technical solutions, the embodiment of the present application realizes congestion adjustment when the first domain interface is congested in a target direction (the incoming direction or the outgoing direction) by any domain exit router and a neighbor device, so as to switch a packet originally transmitted via the target direction of the first domain interface to transmission via the target direction of the second domain interface, by sending first link quality information of a first domain interface currently (the first link quality information comprises link quality information of the first domain interface currently in an incoming direction and / or an outgoing direction) and receiving second link quality information of a second domain interface currently of the neighbor device sent by the neighbor device (the second link quality information comprises link quality information of the second domain interface currently in the incoming direction and / or the outgoing direction), which guarantees normal packet transmission and improves network quality. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0017] Figure 1 is a schematic diagram of the existing network topology;
[0018] Figure 2 is a flowchart of the method provided in an embodiment of this application;
[0019] Figure 3 is an application network diagram provided in an embodiment of this application;
[0020] Figure 4 is a schematic diagram of the available bandwidth attributes in the ingress direction provided in an embodiment of this application;
[0021] Figure 5 is a schematic diagram of the inbound bandwidth used attribute provided in an embodiment of this application;
[0022] Figure 6 is a schematic diagram of the implementation of Embodiment 1 of this application;
[0023] Figure 7 is a schematic diagram of the implementation of Embodiment 2 of this application;
[0024] Figure 8 is a structural diagram of the device provided in an embodiment of this application;
[0025] Figure 9 is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0026] To enable those skilled in the art to better understand the technical solutions provided in the embodiments of this application, and to make the above-mentioned objectives, features and advantages of the embodiments of this application more apparent and understandable, the technical solutions in the embodiments of this application will be further described in detail below with reference to the accompanying drawings.
[0027] Referring to Figure 2, which is a flowchart of a method provided in an embodiment of this application, this process can be applied to a domain egress router. The domain egress router here can be an egress router deployed in a network domain, such as an AS or management domain. Figure 3 illustrates an application network of the process shown in Figure 2, where the domain egress routers are, for example, PE2 and PE3 shown in Figure 3.
[0028] In this embodiment, the domain egress router has a first domain interface locally for connecting external devices, such as the interface Port2_4 on PE2 for connecting external devices compared to PE4, and the interface Port3_5 on PE3 for connecting external devices compared to PE5, as shown in Figure 3.
[0029] In the embodiment, the domain egress router establishes a neighbor connection with other routers. The other routers are referred to as neighbor devices of the domain egress router. As an example, the neighbor connection is a BGP-LS neighbor connection, and the neighbor devices are referred to as BGP-LS neighbor devices. For example, in FIG. 3, PE2 and PE3 are BGP-LS neighbors. Alternatively, the neighbor devices of any domain egress router can be specified according to actual needs, so that the domain egress router establishes a neighbor connection with the neighbor devices.
[0030] As an example, the neighbor devices, such as the BGP-LS neighbor devices, are egress routers of a network domain. For example, in the embodiment, any domain egress router and its neighbor devices are different egress routers of the same network domain, or any domain egress router and its neighbor devices are different egress routers of different network domains, which is not specifically limited in the embodiment. For convenience, the interface of the neighbor device used to connect a device outside the domain is referred to as a second domain interface.
[0031] In the embodiment, any domain egress router and its neighbor devices, such as the BGP-LS neighbor devices, publish routes of at least one same network. The network is, for example, an IP address or a network segment address, which is not specifically limited in the embodiment.
[0032] Specifically, any domain egress router and its neighbor devices publish routes of at least one same network through the first domain interface and the second domain interface, respectively. For example, in FIG. 3, PE2 publishes the route of the network 10.0.1.1 / 24 to PE4 in the out direction through Port2_4. PE3 publishes the route of the network 10.0.1.1 / 24 to PE5 in the out direction through Port3_5. That is, PE2 and PE3, which are BGP-LS neighbors, publish routes of the same network 10.0.1.1 / 24 through the domain interfaces Port2_4 and Port3_5, respectively. In this way, PE4 finally receives two routes to 10.0.1.1 / 24.
[0033] Specifically, any domain egress router and its neighbor device such as the above-mentioned BGP-LS neighbor device will also receive the routes corresponding to at least one same network through the first domain interface and the second domain interface respectively and publish through other interfaces such as the intra-domain interface (connecting intra-domain devices). Taking FIG. 3 as an example, PE2 receives the route of the network, i.e., 172.16.1.0 / 24, in the incoming direction through Port2_4 and publishes the route of 172.16.1.0 / 24 in the outgoing direction through the local intra-domain interface Port2_1. PE3 receives the route of the network, i.e., 172.16.1.0 / 24, in the incoming direction through Port3_5 and publishes the route of 172.16.1.0 / 24 in the outgoing direction through the local intra-domain interface Port3_1. In this way, eventually PE1 will receive two routes to 172.16.1.0 / 24.
[0034] Based on the above description, as shown in FIG. 2, the flow can include the following steps:
[0035] Step 201, any domain egress router sends the current first link quality information of the local first domain interface to a neighbor device such as the above-mentioned BGP-LS neighbor device.
[0036] It should be noted that the interface of the above-mentioned domain egress router connecting the neighbor device such as the above-mentioned BGP-LS neighbor device is not the above-mentioned first domain interface, and similarly, the interface of the neighbor device such as the above-mentioned BGP-LS neighbor device connecting the above-mentioned domain egress router is not the above-mentioned second domain interface.
[0037] As an embodiment, the above-mentioned first link quality information includes the link quality information of the first domain interface in the current incoming direction and / or outgoing direction. Here, the link quality information of the first domain interface in the current incoming direction includes, for example, the available bandwidth of the first domain interface in the current incoming direction and / or the used bandwidth of the first domain interface in the current incoming direction. The incoming direction of the first domain interface refers to the direction in which the first domain interface receives packets.
[0038] Optionally, in this embodiment, the domain egress router can carry the available bandwidth and / or used bandwidth of the first domain interface in the current incoming direction by means of an extended designated packet such as a BGP-LS packet (specifically, an UPDATE packet) and the like.
[0039] For example, this embodiment can add a direction available bandwidth attribute field and / or an incoming direction used bandwidth attribute field in the above-mentioned BGP-LS packet such as an UPDATE packet and the like. The incoming direction available bandwidth attribute field is used to carry the available bandwidth such as the above-mentioned available bandwidth. The incoming direction used bandwidth attribute field is used to carry the used bandwidth such as the above-mentioned used bandwidth.
[0040] Optionally, the above-mentioned ingress direction available bandwidth attribute field can adopt a TLV format. Here, the TLV format mainly includes a type field T, a length field L, and a value field V, as shown in FIG. 4. Table 1 exemplarily shows the TLV:
[0041] Table 1
[0042] Optionally, the above-mentioned ingress direction used bandwidth attribute field can adopt a TLV format. Here, the TLV format mainly includes a type field T, a length field L, and a value field V, as shown in FIG. 5. Table 2 exemplarily shows the TLV:
[0043] Table 2
[0044] As an embodiment, the above-mentioned first link quality information can further include a currently available bandwidth of the first domain interface in an egress direction and / or a currently used bandwidth of the first domain interface in the egress direction. Here, the egress direction of the first domain interface refers to a direction in which the first domain interface transmits a packet.
[0045] The currently available bandwidth of the first domain interface in the egress direction can be carried by means of an egress direction available bandwidth attribute TLV field defined in the prior art and capable of being carried in a packet.
[0046] The currently used bandwidth of the first domain interface in the egress direction can be carried by means of an egress direction used bandwidth attribute TLV field defined in the prior art and capable of being carried in a packet.
[0047] Step 202: receiving second link quality information of a local second domain interface of a neighbor device currently sent by the neighbor device; the second link quality information includes link quality information of the second domain interface in an ingress direction and / or an egress direction, wherein the first link quality information and the second link quality information are used for congestion adjustment when the first domain interface is congested in a target direction, so as to switch a packet originally transmitted via the target direction of the first domain interface to transmission via the target direction of the second domain interface, and the target direction is the ingress direction or the egress direction.
[0048] As an embodiment, the link quality information of the second domain interface in the ingress direction currently can include a currently available bandwidth of the second domain interface in the ingress direction and / or a currently used bandwidth of the second domain interface in the ingress direction. Here, the ingress direction of the second domain interface refers to a direction in which the second domain interface receives a packet.
[0049] Similarly, in the embodiment, the above-mentioned neighbor device such as a BGP-LS neighbor device can carry the currently available bandwidth and / or the currently used bandwidth of the second domain interface in the ingress direction by means of an extended specified packet such as a BGP-LS packet (specifically, an UPDATE packet) and the like. Details can be referred to the description of step 201.
[0050] Similarly, the link quality information of the second domain interface in the current incoming direction can also include available bandwidth of the second domain interface in the current outgoing direction and / or used bandwidth of the second domain interface in the current outgoing direction. The outgoing direction of the second domain interface refers to the direction in which the second domain interface sends packets. The available bandwidth of the second domain interface in the current outgoing direction can be carried in the outgoing direction available bandwidth attribute TLV field defined in the existing definition and carried in the packet. The used bandwidth of the second domain interface in the current outgoing direction can be carried in the outgoing direction used bandwidth attribute TLV field defined in the existing definition and carried in the packet.
[0051] In the embodiment, the domain egress router can perform congestion adjustment based on the first link quality information and the second link quality information when congestion occurs in the target direction of the first domain interface, so as to switch the packets originally transmitted via the target direction of the first domain interface to the target direction of the second domain interface. That is, in the embodiment, the first link quality information and the second link quality information are used as the basis for congestion adjustment when congestion occurs in the target direction of the first domain interface, so as to switch the packets originally transmitted via the target direction of the first domain interface to the target direction of the second domain interface. Examples will be described below, which are not described here.
[0052] So far, the flow shown in FIG. 2 is completed.
[0053] Through the flow shown in FIG. 2, the embodiment interacts with the neighbor device by any domain egress router to send the first link quality information of the local first domain interface (the first link quality information includes the link quality information of the first domain interface in the current incoming direction and / or outgoing direction), and receive the second link quality information of the local second domain interface sent by the neighbor device (the second link quality information includes the link quality information of the second domain interface in the current incoming direction and / or outgoing direction), so that the first link quality information and the second link quality information achieve congestion adjustment when congestion occurs in the target direction (the incoming direction or the outgoing direction) of the first domain interface, so as to switch the packets originally transmitted via the target direction of the first domain interface to the target direction of the second domain interface, which ensures normal transmission of the packets and improves network quality.
[0054] It should be noted that in the flow shown in FIG. 1, the domain egress router will specifically determine whether the first domain interface is congested in the target direction based on the first link quality information, and determine whether the second domain interface is congested in the target direction based on the second link quality information. When it is determined based on the first link quality information that the first domain interface is congested in the target direction, and it is determined based on the second link quality information that the second domain interface is not congested in the target direction, the congestion of the first domain interface in the target direction is adjusted according to the first link quality information and the second link quality information.
[0055] Optionally, as one embodiment, the embodiment can determine congestion by means of available bandwidth. For example, determining that the first domain interface is congested in the target direction based on the first link quality information can include: if it is determined based on the first link quality information that the first available bandwidth of the first domain interface in the target direction is less than a preset available bandwidth threshold lower limit corresponding to the target direction, then it is determined that the first domain interface is congested in the target direction.
[0056] Correspondingly, determining that the second domain interface is not congested in the target direction based on the second link quality information can include: if it is determined based on the second link quality information that the second available bandwidth of the second domain interface in the target direction is greater than or equal to a preset available bandwidth threshold lower limit corresponding to the target direction, then it is determined that the second domain interface is not congested in the target direction.
[0057] As another embodiment, the embodiment can also determine congestion by means of used bandwidth. For example, determining that the first domain interface is congested in the target direction based on the first link quality can include: if it is determined based on the first link quality information that the used bandwidth of the first domain interface in the target direction is greater than or equal to a preset used bandwidth threshold upper limit corresponding to the target direction, then it is determined that the first domain interface is congested in the target direction. Correspondingly, determining that the second domain interface is not congested in the target direction based on the second link quality information can include: if it is determined based on the second link quality information that the used bandwidth of the second domain interface in the target direction is less than a preset used bandwidth threshold upper limit corresponding to the target direction, then it is determined that the second domain interface is not congested in the target direction.
[0058] After it is determined that the first domain interface is congested in the target direction and the second domain interface is not congested in the target direction, the congestion of the first domain interface in the target direction is adjusted according to the first link quality information and the second link quality information, as described above.
[0059] Optionally, adjusting the congestion of the first domain interface in the target direction according to the first link quality information and the second link quality information can include: determining, according to the first link quality information and the second link quality information, whether the current packet carrying capacity of the second domain interface in the target direction is allowed to carry the packets originally transmitted via the target direction of the first domain interface.
[0060] If yes, the priority included in the route of the target network previously issued by the domain egress router to the target device is adjusted; the adjusted priority is lower than the priority before adjustment; the neighbor device, such as the BGP-LS neighbor device, is also connected to the target device, and the priority included in the route of the target network previously issued by the neighbor device to the target device is higher than the adjusted priority; then, the adjusted priority included in the route of the target network is issued to the target device, so that the target device selects the route of the target network issued by the neighbor device to transmit the packet based on the adjusted priority included in the route of the target network issued by the domain egress router and the priority included in the route of the target network issued by the neighbor device when transmitting the packet to the target network. Finally, the packet originally transmitted via the target direction of the first domain interface is switched to the target direction via the second domain interface.
[0061] Of course, if the packet carrying capacity of the second domain interface in the target direction currently does not allow the packet originally transmitted via the target direction of the first domain interface, the congestion adjustment can be ended.
[0062] Optionally, in the embodiment, the determining whether the packet carrying capacity of the second domain interface in the target direction currently allows the packet originally transmitted via the target direction of the first domain interface according to the first link quality information and the second link quality information can specifically include: calculating a first bandwidth difference between a preset target direction bandwidth threshold and a first available bandwidth of the first domain interface in the target direction; the first available bandwidth is obtained based on the first link quality information; calculating a second bandwidth difference between a second available bandwidth of the second domain interface in the target direction and the target direction bandwidth threshold; the second available bandwidth is obtained based on the second link quality information; and if the second bandwidth difference is greater than or equal to the first bandwidth difference, it is determined that the packet carrying capacity of the second domain interface in the target direction currently allows the packet originally transmitted via the target direction of the first domain interface.
[0063] In the embodiment, the target direction bandwidth threshold refers to a threshold when the first domain interface and the second domain interface normally receive packets in the target direction, which can be set according to actual needs. In specific implementation, the target direction bandwidth threshold is generally greater than the lower limit of the preset available bandwidth threshold.
[0064] As an example, the target network can be determined through the following steps: counting the traffic of each network transmitted in the target direction of the first domain interface within a set time period; selecting at least one network as the target network based on the traffic of each network and the target traffic; wherein the sum of the traffic of each target network transmitted in the target direction of the first domain interface is less than or equal to the target traffic; the target traffic refers to the number of packets that the adjustable bandwidth of the second domain interface in the target direction can carry. Here, the adjustable bandwidth of the second domain interface in the target direction is less than or equal to the difference between the second available bandwidth of the second domain interface in the target direction and a preset target direction bandwidth threshold; the second available bandwidth is obtained based on the second link quality information, and the target direction bandwidth threshold refers to the threshold value when the first domain interface normally transmits packets in the target direction.
[0065] Taking the target direction as the infeed direction as an example, the target network can be determined through the following steps:
[0066] Within a set time period, the traffic received by the first domain interface in the inbound direction and destined for each network is counted. The traffic counted for each network within the set time period can be the total number of packets received by the first domain interface in the inbound direction and destined for that network within the set time period. Then, based on the counted traffic of each network and the target traffic of the second domain interface in the inbound direction, at least one target network is selected from among the networks.
[0067] Specifically, the total traffic received by the first domain interface in the inbound direction and destined for each target network is less than or equal to the target traffic. The target traffic here refers to the traffic allowed to be carried by the adjustable bandwidth of the second domain interface in the inbound direction. The adjustable bandwidth of the second domain interface in the inbound direction is determined based on the difference between the available bandwidth of the second domain interface in the inbound direction and a set inbound bandwidth threshold. For example, the adjustable bandwidth of the second domain interface in the inbound direction is the difference between the available bandwidth of the second domain interface in the inbound direction and the aforementioned set inbound bandwidth threshold. The inbound bandwidth threshold refers to the threshold for the first and second domain interfaces to normally receive packets in the inbound direction.
[0068] Optionally, in this embodiment, the networks can be sorted into a sequence according to the traffic received by the first domain interface in the inbound direction and sent to each network in descending order. Then, at least one target network is selected from the sequence according to the principle that the sum of the traffic received by the first domain interface in the inbound direction and sent to each target network is less than or equal to the target traffic of the second domain interface in the inbound direction. This method ensures that the network with the largest traffic is preferentially selected as the target network.
[0069] Taking the target direction as the out direction as an example, the target network in the embodiment can be determined by the following steps: selecting at least one target network from each network based on the traffic of the first domain interface in the out direction to each network and the target traffic of the target second domain interface in the out direction, wherein the sum of the traffic of the first domain interface in the out direction to each target network is less than or equal to the target traffic of the second domain interface in the out direction. Here, the adjustable bandwidth of the second domain interface in the out direction is determined according to the difference between the available bandwidth of the second domain interface in the out direction and the set out direction bandwidth threshold. For example, the adjustable bandwidth of the second domain interface in the out direction is the difference between the available bandwidth of the second domain interface in the out direction and the set out direction bandwidth threshold. The out direction bandwidth threshold refers to the threshold when the first domain interface and the second domain interface normally send packets in the out direction.
[0070] Optionally, in the embodiment, each network can be sorted in descending order of the traffic of the first domain interface in the out direction to each network to obtain a sequence, and at least one target network can be selected from the sequence according to the principle that the sum of the traffic of the first domain interface in the out direction to each target network is less than or equal to the target traffic of the second domain interface in the out direction. In this way, the network with the largest traffic can be guaranteed as the target network.
[0071] As an embodiment, the priority included in the adjusted route of the target network can include: adjusting the multi-exit identifier (MED: MULTI_EXIT_DISC) value included in the route of the target network previously issued by the domain exit router to the target device, the priority indicated by the adjusted MED value is lower than the priority indicated by the unadjusted MED value, and lower than the priority indicated by the MED value included in the route of the target network previously issued by the neighbor device. Generally, the smaller the MED value, the higher the priority. Based on this, in the embodiment, the adjusted MED value of the route of the target network can be: increasing the MED value of the route of the target network (such as increasing by 100).
[0072] Optionally, in the embodiment, after the domain exit router completes the last route adjustment, the adjustment result is notified to the neighbor device such as the BGP-LS neighbor device to indicate the neighbor device such as the BGP-LS neighbor device to prohibit adjusting the route of the target network, to prevent the neighbor device such as the BGP-LS neighbor device from subsequently adjusting the route of the same target network, and to avoid causing route oscillation. The adjustment result at least includes: an indication that the priority of the route of the target network is adjusted.
[0073] Optionally, the notification can be implemented through BGP-LS extension, or implemented through BGP FlowSpec extension, or implemented through other new protocol, and the embodiment is not specifically limited.
[0074] Based on this, when selecting whether a network is a target network, it can be further checked whether the notification of the adjusted priority of the route of the network sent by the neighbor device such as the BGP-LS neighbor device has been received, and if not, it is determined that the network is a target network.
[0075] The flow shown in FIG. 2 is described below through two embodiments 1:
[0076] Embodiment 1:
[0077] The embodiment 1 is described above taking the target direction as the ingress direction as an example:
[0078] Taking the networking shown in FIG. 6 as an example, as shown in FIG. 6, PE2 and PE3 are both domain egress routers, and PE2 and PE3 establish a BGP-LS neighbor.
[0079] PE2 detects the available bandwidth of the local domain interface Port2_4 in the ingress direction. PE3 also detects the available bandwidth of the local domain interface Port3_5 in the ingress direction. Optionally, PE2 and PE3 can detect the available bandwidth of the local domain interface in the ingress direction according to the same period.
[0080] PE2 sends the available bandwidth of the local domain interface Port2_4 in the ingress direction to the BGP-LS neighbor PE3 through the interface Port2_3. PE3 sends the available bandwidth of the local domain interface Port3_5 in the ingress direction to the BGP-LS neighbor PE2 through the interface Port3_2.
[0081] Taking PE2 as an example, PE2 judges whether the available bandwidth of the local domain interface Port2_4 in the ingress direction is less than the preset available bandwidth threshold lower limit corresponding to the ingress direction, if yes, it is determined that the local domain interface Port2_4 in the ingress direction is congested, otherwise, it is determined that the local domain interface Port2_4 in the ingress direction is not congested. The preset available bandwidth threshold lower limit can be set according to actual needs, and the embodiment is not specifically limited. Optionally, the available bandwidth of the first domain interface in the ingress direction can be determined based on the maximum value of the allowed available bandwidth (i.e. total bandwidth) and the used bandwidth of the first domain interface in the ingress direction.
[0082] In addition, PE2 determines whether congestion occurs on the local domain interface Port3_5 of PE3 based on the received available bandwidth of the local domain interface Port3_5 of PE3 in the ingress direction. For example, it is determined that no congestion occurs on the local domain interface Port3_5 in the ingress direction if the available bandwidth of the local domain interface Port3_5 in the ingress direction is greater than or equal to a preset available bandwidth threshold lower limit corresponding to the ingress direction.
[0083] It should be noted that the embodiment 1 is described by taking the available bandwidth sent by PE2 and PE3 as an example. If PE3 does not send the available bandwidth of the local domain interface Port3_5 in the ingress direction, but sends the used bandwidth of the local domain interface Port3_5 in the ingress direction, PE2 can determine the available bandwidth of the local domain interface Port3_5 in the ingress direction based on the maximum allowed available bandwidth (i.e., the total bandwidth) of the local domain interface Port3_5 in the ingress direction and the used bandwidth of the local domain interface Port3_5 in the ingress direction.
[0084] Alternatively, the total bandwidth allowed for all local domain interfaces in the ingress direction can be the same by default in the embodiment, or the total bandwidth allowed for the local domain interface Port3_5 of PE3 in the ingress direction can be pre-configured on PE2. Alternatively, the total bandwidth allowed for the local domain interface Port3_5 of PE3 in the ingress direction is carried by PE3 through the defined total bandwidth attribute TLV. The embodiment is not specifically limited.
[0085] It should be noted that the above is described by taking the available bandwidth as an example. The congestion can also be determined based on the used bandwidth in the embodiment. For example, PE2 detects the used bandwidth of the local domain interface Port2_4 in the ingress direction. PE3 also detects the used bandwidth of the local domain interface Port3_5 in the ingress direction. Alternatively, PE2 and PE3 can detect the used bandwidth of the local domain interface in the ingress direction at the same period.
[0086] PE2 sends the used bandwidth of the local domain interface Port2_4 in the ingress direction to the BGP-LS neighbor (i.e., PE3) through the interface Port2_3. PE3 sends the used bandwidth of the local domain interface Port3_5 in the ingress direction to the BGP-LS neighbor (i.e., PE2) through the interface Port3_2.
[0087] Taking PE2 as an example, PE2 determines whether the used bandwidth of the local domain interface Port2_4 in the ingress direction is greater than or equal to a set used bandwidth threshold upper limit corresponding to the ingress direction. If yes, it is determined that congestion occurs on the local domain interface Port2_4 in the ingress direction. Otherwise, it is determined that no congestion occurs on the local domain interface Port2_4 in the ingress direction. The set used bandwidth threshold upper limit can be set according to actual needs, and the embodiment is not specifically limited.
[0088] In addition, PE2 determines whether the local interface Port3_5 of PE3 is congested based on the used bandwidth of the local interface Port3_5 of PE3 received in the ingress direction. For example, if the used bandwidth of the local interface Port3_5 in the ingress direction is less than the upper limit of the preset used bandwidth threshold in the ingress direction, it is determined that the local interface Port3_5 in the ingress direction is not congested.
[0089] It should be noted that the embodiment 1 is described by taking the used bandwidth of PE2 and PE3 as an example. If PE3 does not send the used bandwidth of the local interface Port3_5 in the ingress direction, but sends the available bandwidth of the local interface Port3_5 in the ingress direction, PE2 can determine the used bandwidth of the local interface Port3_5 in the ingress direction based on the total bandwidth allowed for the local interface Port3_5 in the ingress direction and the available bandwidth of the local interface Port3_5 in the ingress direction. The total bandwidth allowed for the local interface Port3_5 in the ingress direction is described above and will not be described here.
[0090] If PE2 determines that the local interface Port2_4 in the ingress direction is congested and determines that the local interface Port3_5 in the ingress direction of PE3 is not congested, it calculates a first bandwidth difference between the set bandwidth threshold in the ingress direction and the available bandwidth of Port2_4 in the ingress direction. The bandwidth threshold in the ingress direction refers to the threshold when the packet is normally received in the ingress direction, which is generally greater than the preset available bandwidth threshold lower limit. In addition, it calculates a second bandwidth difference between the available bandwidth of Port3_5 in the ingress direction and the set bandwidth threshold in the ingress direction. If it is found that the second bandwidth difference is greater than or equal to the first bandwidth difference, PE2 performs congestion adjustment on the local interface Port2_4. For ease of description, the second bandwidth difference can be recorded as the adjustable bandwidth of the local interface Port3_5 of PE3.
[0091] Specifically, when PE2 performs congestion adjustment on the local interface Port2_4, it first sorts the networks in descending order of the traffic (or the number of packets) sent to each network received by the local interface Port2_4 in the ingress direction to obtain a sequence, and selects at least one target network from the sequence according to the order. The sum of the number of packets sent to each target network received by the local interface Port2_4 in the ingress direction is less than or equal to the number of packets allowed to be carried by the adjustable bandwidth of the local interface Port3_5 of PE3. In this way, the network with the largest number of packets can be selected as the target network.
[0092] The PE2 adjusts the MED value of the route of the target network and publishes in the out direction through the local domain interface Port2_4. The adjusted MED value indicates a priority lower than the priority indicated by the unadjusted MED value. Generally, the smaller the MED value, the higher the priority. Based on this, in this embodiment, the adjusted MED value of the route of the target network can be: increasing the MED value of the route of the target network (such as increasing by 100).
[0093] For example, the target network is the network corresponding to the IP address of PE1, and PE2 and PE3 have both published the route of PE1 to PE4. After the above adjustment, the MED value of the route of PE1 published by PE2 is greater than the MED value of the route of PE1 published by PE3, so as to finally realize that the route of PE1 published by PE3 is superior to the route of PE1 published by PE2. Based on this, when PE4 subsequently sends a packet to PE1, PE4 will prefer the route of PE1 published by PE3 based on the MED value of the route of PE1 published by PE2 and the priority of the route of PE1 published by PE3, that is, the packet sent by PE4 to PE1 is no longer forwarded through PE2 but through PE3. The dotted line shown in FIG. 6 is illustrative.
[0094] In this embodiment, the PE2 adjusts the MED value of the route of the target network and publishes in the out direction through the local domain interface Port2_4 further includes: sending the adjustment result to PE3 through Port2_3. The adjustment result at least includes: an indication that the priority of the route of the target network is adjusted, so as to prevent route oscillation caused by subsequent adjustment of PE3 to the route of the same target network. For example, the target network is the network corresponding to the IP address of PE1, and PE3 no longer adjusts the route of PE1 regardless of whether the local interface is congested.
[0095] The above describes PE2 as an example, and PE3 is similar and will not be described again.
[0096] Thus far, the description of embodiment 1 is completed.
[0097] Embodiment 2:
[0098] The above describes the target direction as the out direction as an example in this embodiment 2:
[0099] For example, the network shown in FIG. 7, PE2 and PE3 are both domain exit routers, and PE2 and PE3 establish a BGP-LS neighbor.
[0100] PE2 detects the available bandwidth of the local domain interface Port2_4 in the out direction. PE3 also detects the available bandwidth of the local domain interface Port3_5 in the out direction. Alternatively, PE2 and PE3 can detect the available bandwidth of the local domain interface in the out direction at the same period. In combination with the above embodiment 1, PE2 can detect the available bandwidth of the local domain interface Port2_4 in the in direction and the out direction at the same period, and PE3 is similar.
[0101] PE2 sends the available bandwidth of the local domain interface Port2_4 in the out direction to the BGP-LS neighbor, i.e. PE3, through the interface Port2_3. PE3 sends the available bandwidth of the local domain interface Port3_5 in the out direction to the BGP-LS neighbor, i.e. PE2, through the interface Port3_2.
[0102] Taking PE2 as an example, PE2 determines whether the available bandwidth of the local domain interface Port2_4 in the out direction is less than the preset available bandwidth threshold lower limit corresponding to the out direction. If yes, it is determined that the local domain interface Port2_4 in the out direction is congested, otherwise, it is determined that the local domain interface Port2_4 in the out direction is not congested.
[0103] In addition, PE2 also determines whether the local domain interface Port3_5 of PE3 is congested based on the received available bandwidth of the local domain interface Port3_5 of PE3 in the out direction. For example, it is determined whether the available bandwidth of Port3_5 in the out direction is greater than or equal to the preset available bandwidth threshold lower limit corresponding to the out direction. If yes, it is determined that Port3_5 in the out direction is not congested.
[0104] It should be noted that the embodiment 1 is described by taking the sending of the available bandwidth by PE2 and PE3 as an example. If PE3 does not send the available bandwidth of the domain interface Port3_5 in the out direction, but sends the used bandwidth of the domain interface Port3_5 in the out direction, PE2 can determine the available bandwidth of the domain interface Port3_5 in the out direction based on the maximum allowed available bandwidth of the domain interface Port3_5 in the out direction (i.e. the total bandwidth) and the used bandwidth of the domain interface Port3_5 in the out direction.
[0105] Alternatively, in the embodiment, the total bandwidth allowed for all domain interfaces in the out direction can be the same by default, or the total bandwidth allowed for the local domain interface Port3_5 of PE3 in the out direction can be pre-configured at PE2. Alternatively, the above-mentioned PE3 carries the total bandwidth allowed for the local domain interface Port3_5 of PE3 in the out direction through the defined total bandwidth attribute TLV. The embodiment is not specifically limited.
[0106] It should be noted that the above is described by taking the available bandwidth as an example, and the embodiment can also determine congestion based on the used bandwidth, which can be referred to Embodiment 1 and will not be described here.
[0107] If PE2 determines that the local interface Port2_4 is congested in the out direction and determines that the local interface Port3_5 on PE3 is not congested in the out direction, a first bandwidth difference between a set out direction bandwidth threshold and the available bandwidth of Port2_4 in the out direction is calculated. The out direction bandwidth threshold refers to a threshold when a message is normally received in the out direction, which is generally greater than the preset available bandwidth threshold lower limit. In addition, a second bandwidth difference between the available bandwidth of Port3_5 in the out direction and the set out direction bandwidth threshold is calculated. If it is found that the second bandwidth difference is greater than or equal to the first bandwidth difference, PE2 performs congestion adjustment on the local interface Port2_4. For ease of description, the second bandwidth difference can be recorded as the adjustable bandwidth of the local interface Port3_5 on PE3.
[0108] Specifically, when PE2 performs congestion adjustment on the local interface Port2_4, a sequence of networks is obtained by sorting the networks in descending order of the traffic (or the number of messages) received by the local interface Port2_4 in the out direction, and at least one target network is selected from the sequence. The sum of the number of messages sent to each target network received by the local interface Port2_4 in the out direction is less than or equal to the adjustable bandwidth of the local interface Port3_5 on PE3. In this way, the network with the largest number of messages can be selected as the target network.
[0109] After PE2 determines the target network, the MED value of the route of the target network is adjusted and is published in the out direction through the local interface Port2_1. The priority indicated by the adjusted MED value is lower than the priority indicated by the unadjusted MED value. Generally, the smaller the MED value, the higher the priority. Therefore, in the embodiment, the adjusted MED value of the route of the target network can be: increasing the MED value of the route of the target network (such as increasing by 100).
[0110] For example, the target network is the network corresponding to the IP address of PE4, and PE2 and PE3 have all published the route of PE4 to PE1. After the above adjustment, the MED value of the route of PE4 published by PE2 is greater than the MED value of the route of PE4 published by PE3, so that the route of PE4 published by PE3 is superior to the route of PE1 published by PE2. Based on this, PE1 will preferentially select the route of PE4 published by PE3 when sending a packet to PE4 based on the MED value of the route of PE4 published by PE2 and the priority of the route of PE4 published by PE3. That is, the packet sent by PE1 to PE4 is no longer forwarded through PE2, but through PE3. The dotted line in FIG. 7 is shown for illustration.
[0111] In this embodiment, PE2 adjusts the MED value of the route of the target network and publishes the adjusted result through the local interface Port2_1 in the out direction, and further includes: sending the adjusted result to PE3 through Port2_3. The adjusted result at least includes: an indication that the priority of the route of the target network is adjusted, to prevent route oscillation caused by subsequent adjustment of the route of the same target network by PE3. For example, the target network is the network corresponding to the IP address of PE4, and PE3 does not adjust the route of PE4 regardless of whether the local interface is congested.
[0112] The above describes PE2 as an example, and PE3 is similar and will not be described again.
[0113] Thus far, the description of embodiment 2 is completed.
[0114] The above describes the method provided by the embodiments of the present application, and the following describes the device provided by the embodiments of the present application.
[0115] Referring to FIG. 8, FIG. 8 is a structure diagram of a device provided by an embodiment of the present application. The device is applied to a domain exit router, and the domain exit router has a first domain interface locally existing for connecting a device outside the domain. The device includes:
[0116] a sending unit configured to send first link quality information currently of the first domain interface to a neighbor device of the domain exit router; the first link quality information includes link quality information currently of the first domain interface in an in direction and / or an out direction;
[0117] a receiving unit configured to receive second link quality information currently of a second domain interface locally of the neighbor device sent by the neighbor device; the second link quality information includes link quality information currently of the second domain interface in the in direction and / or the out direction;
[0118] The first link quality information and the second link quality information are used for congestion adjustment when the first domain interface is congested in the target direction, so as to switch the packets originally transmitted via the target direction of the first domain interface to the target direction of the second domain interface, and the target direction is the incoming direction or the outgoing direction.
[0119] Optionally, the apparatus further comprises:
[0120] The processing unit is configured to determine, based on the first link quality information, that the first domain interface is congested in the target direction, and determine, based on the second link quality information, that the second domain interface is not congested in the target direction, and then perform congestion adjustment on the congestion of the first domain interface in the target direction according to the first link quality information and the second link quality information.
[0121] Optionally, the determination, based on the first link quality information, that the first domain interface is congested in the target direction specifically comprises: determining, based on the first link quality information, a first available bandwidth of the first domain interface in the target direction, and determining that the first domain interface is congested in the target direction if the first available bandwidth is less than a preset available bandwidth threshold lower limit corresponding to the target direction.
[0122] The determination, based on the second link quality information, that the second domain interface is not congested in the target direction specifically comprises: determining, based on the second link quality information, a second available bandwidth of the second domain interface in the target direction, and determining that the second domain interface is not congested in the target direction if the second available bandwidth is greater than or equal to the preset available bandwidth threshold lower limit.
[0123] Optionally, the congestion adjustment on the congestion of the first domain interface in the target direction according to the first link quality information and the second link quality information comprises: determining, according to the first link quality information and the second link quality information, whether the packet carrying capacity of the second domain interface in the target direction currently allows carrying the packets originally transmitted via the target direction of the first domain interface; if yes, adjusting the priority included in the route of the target network previously published by the domain exit router to the target device; the adjusted priority is lower than the adjusted priority; the neighbor device is connected to the target device, and the priority included in the route of the target network previously published by the neighbor device to the target device is higher than the adjusted priority.
[0124] publish the adjusted priority included in the route of the target network to the target device, so that the target device selects the route of the target network published by the neighbor device to send the packet when sending the packet to the target network based on the adjusted priority included in the route of the target network published by the domain egress router and the priority included in the route of the target network published by the neighbor device.
[0125] Optionally, the determining whether the second domain interface currently has the capability to carry the packet originally transmitted via the target direction of the first domain interface according to the first link quality information and the second link quality information comprises: calculating a first bandwidth difference between a preset target direction bandwidth threshold and a first available bandwidth of the first domain interface in the target direction, wherein the target direction bandwidth threshold refers to a threshold when the first domain interface and the second domain interface normally receive the packet in the target direction, and the first available bandwidth is obtained based on the first link quality information; calculating a second bandwidth difference between a second available bandwidth of the second domain interface in the target direction and the target direction bandwidth threshold, wherein the second available bandwidth is obtained based on the second link quality information; and determining that the second domain interface currently has the capability to carry the packet originally transmitted via the target direction of the first domain interface if the second bandwidth difference is greater than or equal to the first bandwidth difference.
[0126] Optionally, the first domain interface is different from a third interface connected to the neighbor device on the domain egress router.
[0127] The congestion adjustment unit is further configured to send a route priority adjustment result to the neighbor device through the third interface, wherein the route priority adjustment result is used to instruct the neighbor device to prohibit adjusting the priority of the route of the target network.
[0128] Optionally, the adjusting the priority included in the route of the target network previously published by the domain egress router to the target device comprises: adjusting a multi-exit identifier (MED) value included in the route of the target network previously published by the domain egress router to the target device, wherein the adjusted MED value indicates a priority lower than a priority indicated by an unadjusted MED value and lower than a priority indicated by a MED value included in the route of the target network published by the neighbor device.
[0129] Optionally, the target network is determined by the following steps: counting the traffic of each network transmitted in the target direction of the first domain interface within a set time period; and selecting at least one network as the target network based on the traffic of each network and a target traffic; wherein the sum of the traffic of each target network transmitted in the target direction of the first domain interface is less than or equal to the target traffic; the target traffic refers to the traffic allowed to be carried by the adjustable bandwidth of the second domain interface in the target direction, the adjustable bandwidth of the second domain interface in the target direction being less than or equal to the difference between the second available bandwidth of the second domain interface in the target direction and a preset target direction bandwidth threshold; the second available bandwidth is obtained based on the second link quality information, and the target direction bandwidth threshold refers to a threshold when the first domain interface normally transmits packets in the target direction.
[0130] Optionally, the first link quality information includes the available bandwidth of the first domain interface in the entry direction and / or the used bandwidth of the first domain interface in the entry direction; and the first available bandwidth refers to the available bandwidth of the first domain interface in the entry direction.
[0131] The second link quality information includes the available bandwidth of the second domain interface in the entry direction and / or the used bandwidth of the second domain interface in the entry direction; and the second available bandwidth refers to the available bandwidth of the second domain interface in the entry direction.
[0132] The available bandwidth of the first domain interface or the second domain interface in the entry direction is carried in an entry direction available bandwidth attribute TLV of a specified packet; the TLV includes a type field T, a length field L and a value field V; the type field is used to indicate the type, the length field is used to indicate the length, and the value field is used to indicate the available bandwidth in the entry direction.
[0133] And / or, the used bandwidth of the first domain interface or the second domain interface in the entry direction is carried in an entry direction used bandwidth attribute TLV of the specified packet; the TLV includes a type field T, a length field L and a value field V; the type field is used to indicate the type, the length field is used to indicate the length, and the value field is used to indicate the used bandwidth in the entry direction.
[0134] Optionally, the first link quality information further comprises: available bandwidth of the first domain interface in the out direction and / or used bandwidth of the first domain interface in the out direction; the second bandwidth information comprises available bandwidth of the second domain interface in the out direction and / or used bandwidth of the second domain interface in the out direction; the first available bandwidth is the available bandwidth of the first domain interface in the out direction; and the second available bandwidth is the available bandwidth of the second domain interface in the out direction.
[0135] So far, the structural description of the apparatus shown in FIG. 8 is completed.
[0136] The embodiment of the present application further provides a hardware structure of the apparatus shown in FIG. 8. Referring to FIG. 9, FIG. 9 is a structural diagram of an electronic device provided by the embodiment of the present application. As shown in FIG. 9, the hardware structure can comprise: a processor and a machine readable storage medium, the machine readable storage medium storing machine executable instructions capable of being executed by the processor; and the processor is used to execute the machine executable instructions to realize the method disclosed in the above examples of the present application.
[0137] Based on the same application concept as the above method, the embodiment of the present application further provides a machine readable storage medium, the machine readable storage medium storing computer instructions, the computer instructions being executed by a processor to realize the method disclosed in the above examples of the present application.
[0138] For example, the machine readable storage medium can be: RAM (Radom Access Memory, random access memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state disk, any type of storage disk (such as optical disk, dvd, etc.), or similar storage medium, or combination thereof.
[0139] The above only describes the embodiments of the present application and is not used to limit the present application. The present application can have various modifications and changes for those skilled in the art. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the scope of claims of the present application.
Claims
1. A packet forwarding method, characterized by, The method is applied to a domain export router, the domain export router comprising a first domain interface for connecting a device outside the domain; the method comprising: sending first link quality information of the first domain interface currently to a neighbor device of the domain export router; the first link quality information comprising link quality information of the first domain interface currently in an incoming direction and / or an outgoing direction; receiving second link quality information of a second domain interface currently of the neighbor device sent by the neighbor device; the second link quality information comprising link quality information of the second domain interface currently in the incoming direction and / or the outgoing direction; the first link quality information and the second link quality information are used for congestion adjustment when the first domain interface is congested in a target direction, to switch packets originally transmitted via the target direction of the first domain interface to transmission via the target direction of the second domain interface, the target direction being the incoming direction or the outgoing direction.
2. The method of claim 1, wherein, The method further comprises: determining that the first domain interface is congested in the target direction based on the first link quality information, and determining that the second domain interface is not congested in the target direction based on the second link quality information, and then performing congestion adjustment on the congestion of the first domain interface in the target direction according to the first link quality information and the second link quality information.
3. The method of claim 2, wherein, The determination that the first domain interface is congested in the target direction based on the first link quality information specifically comprises: determining a first available bandwidth of the first domain interface in the target direction based on the first link quality information, and determining that the first domain interface is congested in the target direction if the first available bandwidth is less than a preset available bandwidth threshold lower limit corresponding to the target direction; The determination that the second domain interface is not congested in the target direction based on the second link quality information specifically comprises: determining a second available bandwidth of the second domain interface in the target direction based on the second link quality information, and determining that the second domain interface is not congested in the target direction if the second available bandwidth is greater than or equal to the preset available bandwidth threshold lower limit.
4. The method of claim 2, wherein, The congestion adjustment on the congestion of the first domain interface in the target direction according to the first link quality information and the second link quality information comprises: determining whether the packet carrying capacity of the second domain interface in the target direction currently allows to carry the packets originally transmitted via the target direction of the first domain interface according to the first link quality information and the second link quality information; if so, adjusting the priority included in the route of a target network previously issued by the domain export router to a target device; the adjusted priority is lower than the priority before adjustment; the neighbor device is connected to the target device and the neighbor device previously issued the route of the target network to the target device includes a priority higher than the adjusted priority; publishing the adjusted priority included in the route of the target network to the target device, so that the target device selects the route of the target network published by the neighbor device to send a packet when sending the packet to the target network based on the adjusted priority included in the route of the target network published by the domain egress router and the priority included in the route of the target network published by the neighbor device.
5. The method of claim 4, wherein, The determining whether the second domain interface currently has the capability to carry the packet originally transmitted via the target direction of the first domain interface in the target direction according to the first link quality information and the second link quality information specifically includes: calculating a first bandwidth difference between a preset target direction bandwidth threshold and a first available bandwidth of the first domain interface in the target direction; the target direction bandwidth threshold refers to a threshold when the first domain interface and the second domain interface normally receive packets in the target direction, and the first available bandwidth is obtained based on the first link quality information; calculating a second bandwidth difference between a second available bandwidth of the second domain interface in the target direction and the target direction bandwidth threshold; the second available bandwidth is obtained based on the second link quality information; if the second bandwidth difference is greater than or equal to the first bandwidth difference, it is determined that the second domain interface currently has the capability to carry the packet originally transmitted via the target direction of the first domain interface in the target direction.
6. The method of claim 4, wherein, The first domain interface is different from a third interface of the domain egress router connected to the neighbor device; The method further includes: sending a route priority adjustment result to the neighbor device through the third interface; the route priority adjustment result is used to instruct the neighbor device to prohibit adjusting the priority of the route of the target network.
7. The method of claim 4, wherein, The adjusting the priority included in the route of the target network previously published by the domain egress router to the target device specifically includes: adjusting a multi-exit identifier (MED) value included in the route of the target network previously published by the domain egress router to the target device; the adjusted MED value indicates a priority lower than a priority indicated by the MED value before the adjustment and lower than a priority indicated by a MED value included in the route of the target network published by the neighbor device.
8. The method of claim 4, wherein, The target network is determined by the following steps: counting the traffic of each network transmitted in the target direction of the first domain interface within a set time period; selecting at least one network as a target network based on the traffic of each network and a target traffic; wherein the sum of the traffic of each target network transmitted in the target direction of the first domain interface is less than or equal to the target traffic; The target traffic refers to traffic that can be carried by an adjustable bandwidth of the second domain interface in the target direction, and the adjustable bandwidth of the second domain interface in the target direction is less than or equal to a difference between a second available bandwidth of the second domain interface in the target direction and a preset target direction bandwidth threshold; the second available bandwidth is obtained based on the second link quality information, and the target direction bandwidth threshold refers to a threshold when the first domain interface normally transmits packets in the target direction.
9. The method of claim 1, wherein, the first link quality information comprises an available bandwidth of the first domain interface in the ingress direction and / or an used bandwidth of the first domain interface in the ingress direction; and the first available bandwidth is the available bandwidth of the first domain interface in the ingress direction; the second link quality information comprises an available bandwidth of the second domain interface in the ingress direction and / or an used bandwidth of the second domain interface in the ingress direction; and the second available bandwidth is the available bandwidth of the second domain interface in the ingress direction; the available bandwidth of the first domain interface or the second domain interface in the ingress direction is carried in an ingress direction available bandwidth attribute TLV of a specified packet; the TLV comprises a type field T, a length field L, and a value field V; the type field is used to indicate a type, the length field is used to indicate a length, and the value field is used to indicate the available bandwidth in the ingress direction; and / or, the used bandwidth of the first domain interface or the second domain interface in the ingress direction is carried in an ingress direction used bandwidth attribute TLV of the specified packet; the TLV comprises a type field T, a length field L, and a value field V; the type field is used to indicate a type, the length field is used to indicate a length, and the value field is used to indicate the used bandwidth in the ingress direction.
10. The method of claim 1 or 9, wherein, the first link quality information further comprises an available bandwidth of the first domain interface in the egress direction and / or an used bandwidth of the first domain interface in the egress direction; and the second bandwidth information comprises an available bandwidth of the second domain interface in the egress direction and / or an used bandwidth of the second domain interface in the egress direction; the first available bandwidth is the available bandwidth of the first domain interface in the egress direction; and the second available bandwidth is the available bandwidth of the second domain interface in the egress direction.
11. A packet forwarding device, characterized by, The device is applied to a domain exit router, and the domain exit router locally exists a first domain interface used to connect a device outside a domain; the device comprises: a sending unit configured to send first link quality information of the first domain interface to a neighbor device of the domain exit router; the first link quality information comprises link quality information of the first domain interface in an ingress direction and / or an egress direction; and the sending unit is further configured to send second link quality information of the second domain interface to the neighbor device of the domain exit router; the second link quality information comprises link quality information of the second domain interface in the ingress direction and / or the egress direction. The receiving unit is configured to receive the second link quality information of the second domain interface of the neighbor device, wherein the second link quality information comprises link quality information of the second domain interface in the ingress direction and / or the egress direction. The first link quality information and the second link quality information are used to perform congestion adjustment when the first domain interface is congested in the target direction, so as to switch the packets originally transmitted via the target direction of the first domain interface to the target direction of the second domain interface, and the target direction is the ingress direction or the egress direction.
12. The apparatus of claim 11, wherein, The apparatus further comprises: The processing unit is configured to determine, based on the first link quality information, that the first domain interface is congested in the target direction, and determine, based on the second link quality information, that the second domain interface is not congested in the target direction, and then perform congestion adjustment on the congestion of the first domain interface in the target direction according to the first link quality information and the second link quality information.
13. The apparatus of claim 12, wherein, The determination of the congestion of the first domain interface in the target direction based on the first link quality information specifically comprises: determining, based on the first link quality information, a first available bandwidth of the first domain interface in the target direction, and determining that the first domain interface is congested in the target direction if the first available bandwidth is less than a preset lower threshold of available bandwidth corresponding to the target direction. The determination of the non-congestion of the second domain interface in the target direction based on the second link quality information specifically comprises: determining, based on the second link quality information, a second available bandwidth of the second domain interface in the target direction, and determining that the second domain interface is not congested in the target direction if the second available bandwidth is greater than or equal to the preset lower threshold of available bandwidth.
14. The apparatus of claim 12, wherein, The congestion adjustment on the congestion of the first domain interface in the target direction according to the first link quality information and the second link quality information comprises: determining, according to the first link quality information and the second link quality information, whether the packet carrying capacity of the second domain interface in the target direction currently allows carrying the packets originally transmitted via the target direction of the first domain interface; if yes, adjusting the priority included in the route of the target network previously published by the domain exit router to the target device; the adjusted priority is lower than the priority before adjustment; the neighbor device is connected to the target device, and the priority included in the route of the target network previously published by the neighbor device to the target device is higher than the adjusted priority; publishing the adjusted priority included in the route of the target network to the target device, so that the target device selects the route of the target network published by the neighbor device to transmit the packets when transmitting the packets to the target network based on the adjusted priority included in the route of the target network published by the domain exit router and the priority included in the route of the target network published by the neighbor device. 15. The apparatus of claim 14, wherein, The determining whether the second domain interface currently has the capability of carrying the packets originally transmitted via the target direction of the first domain interface based on the first link quality information and the second link quality information specifically comprises: calculating a first bandwidth difference between a preset target direction bandwidth threshold and a first available bandwidth of the first domain interface in the target direction; the target direction bandwidth threshold refers to a threshold when the first domain interface and the second domain interface normally receive packets in the target direction, and the first available bandwidth is obtained based on the first link quality information; calculating a second bandwidth difference between a second available bandwidth of the second domain interface in the target direction and the target direction bandwidth threshold; the second available bandwidth is obtained based on the second link quality information; if the second bandwidth difference is greater than or equal to the first bandwidth difference, it is determined that the second domain interface currently has the capability of carrying the packets originally transmitted via the target direction of the first domain interface.
16. The apparatus of claim 14, wherein, The first domain interface is different from a third interface connected to the neighbor device on the domain exit router; The congestion adjustment unit is further configured to: send a routing priority adjustment result to the neighbor device through the third interface; the routing priority adjustment result is used to instruct the neighbor device to prohibit adjusting the priority of the route of the target network.
17. The apparatus of claim 14, wherein The adjusting the priority included in the route of the target network previously published by the domain exit router to the target device specifically comprises: adjusting a multi-exit identifier (MED) value included in the route of the target network previously published by the domain exit router to the target device; the adjusted MED value indicates a priority lower than a priority indicated by the adjusted MED value and lower than a priority indicated by a MED value included in the route of the target network previously published by the neighbor device.
18. The apparatus of claim 14, wherein, The target network is determined by: counting a flow of each network transmitted in the target direction of the first domain interface within a set time period; selecting at least one network as a target network based on the flow of each network and a target flow; wherein a sum of the flows of all target networks transmitted in the target direction of the first domain interface is less than or equal to the target flow; the target flow refers to a flow allowed to be carried by an adjustable bandwidth of the second domain interface in the target direction, the adjustable bandwidth of the second domain interface in the target direction is less than or equal to a difference between the second available bandwidth of the second domain interface in the target direction and a preset target direction bandwidth threshold; the second available bandwidth is obtained based on the second link quality information, and the target direction bandwidth threshold refers to a threshold when the first domain interface normally transmits packets in the target direction.
19. The apparatus of claim 11, wherein The first link quality information includes available bandwidth of the first domain interface in the incoming direction and / or used bandwidth of the first domain interface in the incoming direction; the first available bandwidth is the available bandwidth of the first domain interface in the incoming direction; The second link quality information includes available bandwidth of the second domain interface in the incoming direction and / or used bandwidth of the second domain interface in the incoming direction; the second available bandwidth is the available bandwidth of the second domain interface in the incoming direction; The available bandwidth of the first domain interface or the second domain interface in the incoming direction is carried in an incoming direction available bandwidth attribute TLV of the specified packet; the TLV includes a type field T, a length field L and a value field V; the type field is used to indicate type, the length field is used to indicate length, and the value field is used to indicate the available bandwidth in the incoming direction; And / or, the used bandwidth of the first domain interface or the second domain interface in the incoming direction is carried in an incoming direction used bandwidth attribute TLV of the specified packet; the TLV includes a type field T, a length field L and a value field V; the type field is used to indicate type, the length field is used to indicate length, and the value field is used to indicate the used bandwidth in the incoming direction.
20. The apparatus of claim 1 or 19, wherein, The first link quality information further includes available bandwidth of the first domain interface in the outgoing direction and / or used bandwidth of the first domain interface in the outgoing direction; the second bandwidth information includes available bandwidth of the second domain interface in the outgoing direction and / or used bandwidth of the second domain interface in the outgoing direction; the first available bandwidth is the available bandwidth of the first domain interface in the outgoing direction; and the second available bandwidth is the available bandwidth of the second domain interface in the outgoing direction.
21. An electronic device, comprising: The electronic device includes a processor and a machine readable storage medium; The machine readable storage medium stores machine executable instructions capable of being executed by the processor; The processor is configured to execute the machine executable instructions to implement the method steps of any one of claims 1-10.
Citation Information
Patent Citations
IP (internet protocol) radio access network system and processing method for faults of primary pseudo wires
CN102833774A
Message processing method and network equipment
CN115208829A
System and method for managing congestion in a network environment
US20120201137A1