CN115022229A - Load sharing calculation method based on policy routing - Google Patents

Load sharing calculation method based on policy routing Download PDF

Info

Publication number
CN115022229A
CN115022229A CN202210833551.0A CN202210833551A CN115022229A CN 115022229 A CN115022229 A CN 115022229A CN 202210833551 A CN202210833551 A CN 202210833551A CN 115022229 A CN115022229 A CN 115022229A
Authority
CN
China
Prior art keywords
load sharing
next hop
weight
policy routing
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210833551.0A
Other languages
Chinese (zh)
Inventor
李源源
吴永越
兰星
文浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu DBAPPSecurity Co Ltd
Original Assignee
Chengdu DBAPPSecurity Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu DBAPPSecurity Co Ltd filed Critical Chengdu DBAPPSecurity Co Ltd
Priority to CN202210833551.0A priority Critical patent/CN115022229A/en
Publication of CN115022229A publication Critical patent/CN115022229A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/14Routing performance; Theoretical aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering

Abstract

The invention relates to the technical field of network communication, and discloses a load sharing calculation method based on policy routing, which comprises the following steps: configuring a plurality of next hop information according to six-tuple content in the policy routing, wherein the six-tuple content comprises an input interface, a source address, a destination address, a user, a service and an application; and calculating a load sharing result according to the weight information corresponding to the next hop information and the configured load sharing algorithm. The invention is used for solving the related problem of policy routing weight sharing. The invention provides a specific load sharing calculation method for service forwarding when one strategy route has a plurality of exits at the same time, increases the application scenes of the strategy route to a certain extent, and can calculate the flow sharing condition according to the weights of a plurality of gateways of the strategy route.

Description

Load sharing calculation method based on policy routing
Technical Field
The invention relates to the technical field of network communication, in particular to a load sharing calculation method based on policy routing, which is used for solving the related problem of policy routing weight sharing.
Background
Policy routing is a more flexible packet routing forwarding mechanism than routing based on the target network. The router will decide how to handle the data packets to be routed through the routing map, which decides the next forwarding router for a data packet. Policy routing is a technique for modifying routing information in order to change the way network traffic travels, and is implemented primarily by changing routing attributes (including reachability).
In addition, policy routing is an intelligent and balanced policy approach. When a policy routing has multiple next hop gateways or egress interfaces, load sharing calculation of a service needs to be performed according to configurations of different next hops, and forwarding of the service is guided according to a calculation result.
So far, policy routing is more and more widely applied, and application scenarios are increased. Most of the existing patents related to policy routing describe the specific implementation manner of policy routing or a single routing situation. Aiming at the problem, the invention mainly solves the problems that when a plurality of next hop gateways exist in a strategy route, the service can be evenly shared to each gateway according to the relevant configuration, and the flow sharing condition is calculated according to the weight of the plurality of gateways in the strategy route.
Disclosure of Invention
The invention aims to provide a load sharing calculation method based on a policy routing, which realizes the function of calculating the traffic sharing condition according to the weights of a plurality of gateways of the policy routing and has the effect of solving the related problems of the weight sharing of the policy routing.
The invention is realized by the following technical scheme: a load sharing calculation method based on policy routing comprises the following steps:
configuring a plurality of next hop information according to six-tuple content in the policy routing, wherein the six-tuple content comprises an input interface, a source address, a destination address, a user, a service and an application;
and calculating a load sharing result according to the weight information corresponding to the next hop information and the configured load sharing algorithm.
In order to better implement the present invention, further, the process of configuring multiple pieces of next hop information according to the content of the six-element group in the policy routing includes:
the incoming interface carries out the next matching of strategy routing on the incoming message of the specified network card, and the incoming messages of other network cards are forwarded according to the guidance of a destination address;
on the basis of the incoming of the corresponding input interface, the source address and the destination address of the message are matched by the source address and the destination address, if the matching is successful, the residual quintuple matching of the strategy route is carried out, and if the matching is unsuccessful, the message is forwarded according to the target static route or other routes;
the message is sent from a designated user and then is matched with the service and the application;
and when all the contents of the six-element group are matched, forwarding is carried out according to the correspondingly configured next hop information.
To better implement the present invention, further, the configured load sharing algorithm includes:
configuring a plurality of next hop gateways, configuring weight values, multiplying the ratio of each configured weight value to all weight values by the n power of 2, rounding the multiplied value, and completing the load sharing algorithm.
In order to better implement the present invention, further, the process of calculating the load sharing result includes:
the process of calculating the load sharing result comprises the following steps:
calculating the weight ratio of gateway configuration items in each next hop of information;
multiplying the weight ratios by the power n of 2 in sequence, wherein n =0 and n =1, rounding the value P obtained by multiplying by the power n, and rounding; when the rounded value is less than 1, n +1 starts to produce the product again; the rounded value is more than 1, and the rounded value is recorded as the load sharing ratio W;
taking the difference between the calculated value P and the rounded W to obtain an absolute value;
after the calculation of all the configuration weight ratios and the absolute difference values is finished, adding the difference values of P and W obtained by each product, and if the sum of the difference values is more than 0.1 x n, recalculating n + 1; if the sum of the difference values is less than or equal to 0.1 x n, performing the next calculation;
the final ratio is the rounded load sharing ratio W.
Compared with the prior art, the invention has the following advantages and beneficial effects:
(1) the invention provides a specific load sharing calculation method for service forwarding when a policy route has a plurality of exits at the same time, and increases the application scenes of the policy route to a certain extent;
(2) in the present invention policy routing has multiple exits. The policy routing can configure a plurality of next hop exits, and different exits have corresponding weights.
Drawings
The invention is further described in connection with the following figures and examples, all of which are intended to be open ended and within the scope of the invention.
Fig. 1 is a flowchart of a load sharing calculation method based on policy routing according to the present invention.
Fig. 2 is a calculation flow of a load sharing algorithm of the load sharing calculation method based on policy routing provided by the present invention.
Fig. 3 is a schematic diagram of a specific composition of a hexahydric group of the load sharing calculation method based on policy routing provided by the present invention.
Detailed Description
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it should be understood that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments, and therefore should not be considered as a limitation to the scope of protection. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
In the description of the present invention, it is to be noted that, unless otherwise explicitly specified or limited, the terms "disposed," "connected," and "connected" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through an intermediary, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Example 1:
a load sharing calculation method based on policy routing in this embodiment, as shown in fig. 1 to fig. 3, includes the following steps:
configuring a plurality of next hop information according to six-tuple content in the policy routing, wherein the six-tuple content comprises an input interface, a source address, a destination address, a user, a service and an application;
and calculating a load sharing result according to the weight information corresponding to the next hop information and the configured load sharing algorithm.
In this embodiment, to solve the problem of sharing the traffic under the condition of multiple gateways in the existing policy routing, the present application provides a calculation method of sharing the traffic load under multiple gateways through the implementation principle of policy routing from the practical application scenario, so as to solve the problem of sharing the policy routing weight. The application provides a weight sharing calculation mode based on a strategy route, which mainly comprises three parts, namely a strategy route forming part, a load sharing calculation flow and a specific calculation process of load sharing. And calculating to obtain the final flow sharing ratio under different gateways according to the weight configuration of different gateways. The strategy route mainly comprises an incoming interface, a matching item, an address, a service, an application and next hop information. As shown in fig. 3, the specific composition situation is that a six-tuple can be selected to perform accurate matching on a message entering through an assigned entry interface (network card), and load sharing of policy routing is performed only after each matching item is matched.
It should be noted that the hexahydric group information provided by the present application is set according to the information required by the load in the current field, and the hexahydric group information can be further optimized into other information with the advancement of the technology in the field.
Example 2:
in this embodiment, further optimization is performed on the basis of embodiment 1, and a process of configuring a plurality of next hop information according to the content of the six-element group in the policy routing includes:
the incoming interface carries out the next step matching of strategy routing on the message incoming from the appointed interface, and the messages incoming from other interfaces are forwarded according to the guidance of a destination address;
the two network cards on the network element have messages coming in at the same time, and the messages which are not matched with the strategy route and enter the interface are directly forwarded according to the destination route.
On the basis of the incoming of the corresponding input interface, the source address and the destination address of the message are matched by the source address and the destination address, if the matching is successful, the next step of matching of the strategy route is carried out, and if the matching is unsuccessful, the forwarding is carried out according to the destination route;
the message is sent from a designated user and then is matched with the service and the application;
and when all the contents of the six-element group are matched, forwarding is carried out according to the correspondingly configured next hop information.
In this embodiment, the interface entry refers to performing policy routing next matching on a message entering through a specified interface, and forwarding messages entering through other interfaces according to the direction of a destination address; the source address and the destination address are matched on the basis of the incoming corresponding to the incoming interface, the next step of matching of the strategy route is carried out if the matching is successful, and the forwarding is carried out according to the destination route if the matching is unsuccessful; the user means that the message is sent from a specified user, and then the service and the application are matched. Only when the six conditions are matched, forwarding is carried out according to the next hop of the corresponding configuration. The next hop information includes a gateway or an egress interface for forwarding the traffic and a corresponding weight.
Other parts of this embodiment are the same as embodiment 1, and thus are not described again.
Example 3:
in this embodiment, further optimization is performed on the basis of the foregoing embodiment 1 or 2, and when multiple pieces of next hop information exist in a policy route, a load balancing ratio of multiple next hops is calculated according to a weight value configured for each next hop. The specific implementation flow is shown in fig. 2. The load sharing algorithm comprises the steps of configuring a plurality of next hop gateways, configuring weight values ci, wherein the configuration weight values are c1, c2 and c3 in sequence; the value obtained by multiplying the ratio of each configuration weight value to all weight values by the power n of 2 is Pi, and Wi is the value obtained by rounding off Pi.
The rest of this embodiment is the same as embodiment 1 or 2, and therefore, the description thereof is omitted.
Example 4:
in this embodiment, further optimization is performed on the basis of any one of the embodiments 1 to 3, and the process of calculating the load sharing result includes:
calculating the weight ratio of the gateway configuration items in each next hop information;
examples are as follows:
three different next hops are configured in the same policy route, the weight configuration is respectively 50, 100 and 150, the ratio is 1:2:3 (c 1: c2: c 3), and the occupation ratio is 1/6, 2/6 and 3/6;
multiplication of the power 0 of 2 with 1/6 to obtain 1/6, rounding to less than 1, n + 1;
multiplying the power of 1 of 2 by 1/6 to obtain 2/6, wherein the power is less than 1 after rounding off, and n + 1;
multiplying the power 2 with 1/6 to obtain 2/3(P1), rounding to 1(W1), and continuing the next operation;
rounding off 2/3 in the fourth to obtain a value 1, and taking an absolute value to obtain 1/3 (| P1-W1 |) by taking a difference with 2/3;
sixthly, multiplying the power of 2 by 2/6 and 3/6 respectively, and repeating the fifth step to obtain strips 1/3 and 0 respectively;
seventhly, adding the three calculated values (| Pi-Wi |) to obtain 2/3;
(viii) comparing 2/3 with 0.1 x 4 (power 2 of 2), 2/3=0.67>0.4, and if not, continue to calculate n + 1;
ninthly, multiplying 1/6, 2/6 and 3/6 by the power of 2 in sequence, and subtracting the value (1, 3, 4) obtained by rounding to obtain 1/3,1/3 and 0;
the sum of the differences found in ninthly 2/3, 2/3<0.8, compared to 0.1 x 8 (power 3 of 2), meets the requirement;
the final load sharing Wi ratio is: after 8 (ratios Pi) the resulting values are rounded off, i.e.: 1:3: 4;
multiplying each weight ratio by the n power of 2 in sequence, wherein n =0 and n =1, rounding the value P obtained by multiplying, and then rounding; when the rounded value is less than 1, n +1 starts to produce the product again; the rounded value is more than 1, the rounded value is recorded as W, no matter how many ratios the weight is configured to, the finally obtained load sharing ratio is always the nth power of 2, and the calculation method is strict and reliable;
taking the difference between the calculated value P and the rounded W and taking the absolute value;
after all the calculation of the configuration weight ratio and the absolute difference value is finished, adding the difference values of P and W obtained by each product, and if the sum of the difference values is greater than 0.1 x n, recalculating n + 1; if the sum of the difference values is less than or equal to 0.1 x n, performing the next calculation;
the final ratio is the ratio of W after rounding.
Other parts of this embodiment are the same as any of embodiments 1 to 3, and thus are not described again.
Example 5:
this embodiment is further optimized on the basis of any one of the above embodiments 1 to 4, and in the existing patents related to policy routing, the present embodiment mainly provides a specific implementation manner or a specific routing manner for policy routing, and there is no corresponding invention for routing or traffic load sharing when a plurality of exits exist in a single policy routing at the same time. The invention provides a specific load sharing calculation method for service forwarding when a policy route has a plurality of exits at the same time, and increases the application scenes of the policy route to a certain extent. Unlike the CN201210303955.5 patent, the method, the apparatus and the switching device for implementing policy routing are mainly to configure forwarding traffic outlets according to the size of policy priority. The method mainly calculates the flow sharing condition according to the weight of a plurality of gateways of the strategy route; unlike the CN201410709183.4 load sharing method and routing device, this patent determines its own load sharing information by negotiation according to different routing devices in the network. The method mainly calculates the flow sharing condition according to the weight of a plurality of gateways of the strategy route; many other patents are related to implementation methods of policy routing or individual load sharing, and this patent mainly aims at the service load sharing under the condition that multiple gateways exist in policy routing, and is different from other patents in sharing calculation.
Other parts of this embodiment are the same as any of embodiments 1 to 4, and thus are not described again.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention in any way, and all simple modifications and equivalent variations of the above embodiments according to the technical spirit of the present invention are included in the scope of the present invention.

Claims (4)

1. A load sharing calculation method based on policy routing is characterized by comprising the following steps:
configuring a plurality of next hop information according to six-tuple content in the policy routing, wherein the six-tuple content comprises an input interface, a source address, a destination address, a user, a service and an application;
and calculating a load sharing result according to the weight information corresponding to the next hop information and the configured load sharing algorithm.
2. The method according to claim 1, wherein the step of configuring the next hop information according to the content of the hexahydric group in the policy routing comprises:
the incoming interface carries out the next step of matching of strategy routing on the message incoming from the appointed network card, and the message incoming from other network cards is forwarded according to the guidance of a destination address;
on the basis of the incoming of the corresponding input interface, the source address and the destination address of the message are matched by the source address and the destination address, if the matching is successful, the residual quintuple matching of the strategy route is carried out, and if the matching is unsuccessful, the message is forwarded according to the target static route or other routes;
the message is sent from a designated user and then is matched with the service and the application;
and when all the contents of the six-element group are matched, forwarding is carried out according to the correspondingly configured next hop information.
3. The method according to claim 1, wherein the configured load sharing algorithm comprises:
configuring a plurality of next hop gateways, configuring weight values, multiplying the ratio of each configured weight value to all weight values by the n power of 2, rounding the multiplied value, and completing the load sharing algorithm.
4. The method for calculating load sharing based on policy routing according to any one of claims 1-3, wherein the process of calculating the load sharing result comprises:
calculating the weight ratio of the gateway configuration items in each next hop information;
multiplying the weight ratios by the power n of 2 in sequence, wherein n =0 and n =1, rounding the value P obtained by multiplying by the power n, and rounding; when the rounded value is less than 1, n +1 starts to produce the product again; the rounded value is more than 1, and the rounded value is recorded as the load sharing ratio W;
taking the difference between the calculated value P and the rounded W and taking the absolute value;
after the calculation of all the configuration weight ratios and the absolute difference values is finished, adding the difference values of P and W obtained by each product, and if the sum of the difference values is more than 0.1 x n, recalculating n + 1; if the sum of the difference values is less than or equal to 0.1 x n, performing the next calculation;
the final ratio is the rounded load sharing ratio W.
CN202210833551.0A 2022-07-15 2022-07-15 Load sharing calculation method based on policy routing Pending CN115022229A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210833551.0A CN115022229A (en) 2022-07-15 2022-07-15 Load sharing calculation method based on policy routing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210833551.0A CN115022229A (en) 2022-07-15 2022-07-15 Load sharing calculation method based on policy routing

Publications (1)

Publication Number Publication Date
CN115022229A true CN115022229A (en) 2022-09-06

Family

ID=83082465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210833551.0A Pending CN115022229A (en) 2022-07-15 2022-07-15 Load sharing calculation method based on policy routing

Country Status (1)

Country Link
CN (1) CN115022229A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744563A (en) * 2004-08-31 2006-03-08 杭州华为三康技术有限公司 Method for realizing strate gic route in Ethernet switch
CN101729427A (en) * 2010-01-20 2010-06-09 杭州华三通信技术有限公司 Multilink load sharing and routing method and router
CN112104549A (en) * 2020-08-07 2020-12-18 新华三信息安全技术有限公司 Method and device for realizing load sharing
CN113888440A (en) * 2021-10-20 2022-01-04 上海热芯视觉科技有限公司 FPGA-based infrared image noise reduction method and system
CN114401222A (en) * 2021-12-28 2022-04-26 网络通信与安全紫金山实验室 Data forwarding method and device based on policy routing and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744563A (en) * 2004-08-31 2006-03-08 杭州华为三康技术有限公司 Method for realizing strate gic route in Ethernet switch
CN101729427A (en) * 2010-01-20 2010-06-09 杭州华三通信技术有限公司 Multilink load sharing and routing method and router
CN112104549A (en) * 2020-08-07 2020-12-18 新华三信息安全技术有限公司 Method and device for realizing load sharing
CN113888440A (en) * 2021-10-20 2022-01-04 上海热芯视觉科技有限公司 FPGA-based infrared image noise reduction method and system
CN114401222A (en) * 2021-12-28 2022-04-26 网络通信与安全紫金山实验室 Data forwarding method and device based on policy routing and storage medium

Similar Documents

Publication Publication Date Title
CN113395210B (en) Method for calculating forwarding path and network equipment
Korilis et al. Capacity allocation under noncooperative routing
Korilis et al. Avoiding the Braess paradox in non-cooperative networks
CN102594664B (en) Flow forwarding method and device
Rosberg et al. Performance analyses of optical burst-switching networks
Giorgetti et al. Path encoding in segment routing
US9350684B2 (en) Packet network routing
CN102377680A (en) Route convergence method and device
EP1358738A2 (en) Device and method for limiting tunnel traffic in a communications network
CN106878170B (en) Method and device for determining forwarding path
EP4333380A1 (en) Packet forwarding method and apparatus, and dragonfly network
CN106453088B (en) A kind of static routing configuration method and terminal
CN105915465B (en) Method, equipment and system for adjusting priority of BGP flow-spec table
US7797444B2 (en) Data transfer apparatus and data transfer system
CN103220217A (en) Route generating method and equipment
CN115022229A (en) Load sharing calculation method based on policy routing
Cameron et al. Prioritized deflection routing in optical burst switching networks
CN107770083A (en) A kind of exchange network, controller and load-balancing method
CN109474506A (en) Establish the method and device of Virtual Private Network vpn service
CN108496391B (en) Routing for wireless mesh communication networks
Urvoy-Keller et al. Traffic engineering in a multipoint-to-point network
US20080117892A1 (en) Method for Iterative Routing with the Aid of a Path-Dependent Routing Metric
Zalesky et al. Reduced load Erlang fixed point analysis of optical burst switched networks with deflection routing and wavelength reservation
Thachayani et al. Combined probabilistic deflection and retransmission scheme for loss minimization in OBS networks
Naji et al. Performance analysis comparison of optical burst switching networks’ contention resolution techniques

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination