Method for forwarding message and related equipment

文档序号:195698 发布日期:2021-11-02 浏览:25次 中文

阅读说明:本技术 转发报文的方法及相关设备 (Method for forwarding message and related equipment ) 是由 刘芳 于 2020-04-30 设计创作,主要内容包括:本申请公开了一种转发报文的方法及相关设备,属于路由技术领域。在该方法中,第一转发节点可以根据接收到的报文携带的目的地址确定多条路由中各条路由的负载分担权重;然后根据各条路由的负载分担权重从多条路由中选择一条路由转发该报文。由于任一条路由的负载分担权重用于指示从这多条路由中选中相应路由转发该报文的概率,因此,在本申请中,转发节点不是盲目地进行等价负载分担,而是基于预先配置的负载分担权重来转发报文。如此便可基于等价负载分担过程转发报文中出现的问题来定制各条路由上的负载分担权重,从而避免等价负载分担转发报文时出现的问题再次发生。(The application discloses a method for forwarding a message and related equipment, and belongs to the technical field of routing. In the method, a first forwarding node can determine the load sharing weight of each route in a plurality of routes according to a destination address carried by a received message; and then selecting one route from a plurality of routes according to the load sharing weight of each route to forward the message. Since the load sharing weight of any one route is used to indicate the probability of forwarding the packet by the corresponding route selected from the multiple routes, in this application, the forwarding node does not blindly perform equivalent load sharing, but forwards the packet based on the pre-configured load sharing weight. Therefore, the load sharing weight on each route can be customized based on the problems in the forwarding message in the equivalent load sharing process, so that the problems in the forwarding message in the equivalent load sharing process are avoided.)

1. A method for forwarding a packet is applied to a first forwarding node in a communication network, where the communication network includes multiple forwarding nodes, and the first forwarding node is any one of the multiple forwarding nodes, and the method includes:

the first forwarding node receives a message, wherein the message carries a destination address;

the first forwarding node determines a plurality of routes according to the destination address, wherein the routes are routes from the first forwarding node to the destination node indicated by the destination address;

the first forwarding node acquires the load sharing weight of each route in the plurality of routes, wherein the load sharing weight of any route is used for indicating the probability of forwarding the message from the corresponding route selected from the plurality of routes;

and the first forwarding node selects one route from the plurality of routes to forward the message according to the load sharing weight of each route.

2. The method of claim 1, wherein the load sharing weight for each route is associated with a bandwidth of the each route.

3. The method of claim 2, wherein a proportion of the load sharing weight between any two of the routes is consistent with a proportion of the bandwidth between the any two routes.

4. A method according to claim 2 or 3, wherein the bandwidth of any one route is the minimum or average of the bandwidths of the links comprised by said any one route.

5. The method of claim 4, wherein the bandwidth of each link is a link reserved bandwidth or a link remaining bandwidth.

6. The method as claimed in any of claims 1 to 5, wherein the obtaining, by the first forwarding node, the load sharing weight of each of the plurality of routes comprises:

and the first forwarding node acquires the load sharing weight of each route from the locally stored weight data.

7. The method of claim 6, wherein the method further comprises:

the first forwarding node acquires the bandwidth of each route;

the first forwarding node determines the load sharing weight of each route according to the bandwidth of each route;

and adding the load sharing weight of each route into the weight data.

8. The method of claim 7, wherein the first forwarding node obtaining the bandwidth of the routes comprises:

the first forwarding node receives a first route advertisement message sent by a second forwarding node, the second forwarding node is a next hop forwarding node of a first route from the first forwarding node to the top node in each route, the first route is any one of the routes, and the first route advertisement message carries the destination address and the bandwidth of a link from the second forwarding node to the destination node in the first route;

the first forwarding node acquires the bandwidth of a link from the first forwarding node to the second forwarding node;

and the first forwarding node determines the bandwidth of the first route based on the bandwidth of the link from the first forwarding node to the second forwarding node and the bandwidth of the link carried in the route advertisement message.

9. The method according to claim 8, wherein the bandwidth of the link carried by the first route advertisement packet is the minimum bandwidth on the link from the second forwarding node to the destination node in the first route;

the determining, by the first forwarding node, the bandwidth of the first route based on the bandwidth of the link from the first forwarding node to the second forwarding node and the bandwidth of the link carried in the first route advertisement packet includes:

and the first forwarding node determines a smaller bandwidth of the link between the first forwarding node and the second forwarding node and the bandwidth of the link carried in the first route advertisement message, and takes the smaller bandwidth as the bandwidth of the first route.

10. The method according to claim 7, wherein the bandwidth of the link carried in the first route advertisement message is the remaining bandwidth on the link;

the acquiring, by the first forwarding node, a bandwidth of a link from the first forwarding node to the second forwarding node includes:

the first forwarding node acquires the residual bandwidth of a link from the first forwarding node to the second forwarding node;

the determining, by the first forwarding node, the bandwidth of the first route based on the bandwidth of the link from the first forwarding node to the second forwarding node and the bandwidth of the link carried in the route advertisement packet includes:

and the first forwarding node determines the bandwidth of the first route based on the residual bandwidth of the link from the first forwarding node to the second forwarding node and the residual bandwidth carried in the route advertisement message.

11. The method of claim 10, wherein the determining, by the first forwarding node, the load sharing weight for each route according to the bandwidth of each route comprises:

under the condition that the bandwidth of the first route meets a trigger condition, determining the load sharing weight of each route according to the bandwidth of each route;

the triggering condition is that a variation value between a current bandwidth of a first route and a historical bandwidth of the first route is larger than a reference amplitude, and the historical bandwidth of the first route is a bandwidth used when a load sharing weight of the first route is determined last time before.

12. The method according to any of claims 8 to 11, wherein said first route advertisement packet carries a subtype length value, TLV, which is used to carry the bandwidth of the link in said first route from said second forwarding node to said destination node.

13. The method of claim 6, wherein the method further comprises:

the first forwarding node receives a load sharing weight of each route issued by a control node, wherein the load sharing weight of each route is determined by the control node based on the bandwidth of each route;

the first forwarding node adds the load sharing weight of each route in the weight data.

14. The method as claimed in claim 13, wherein before said first forwarding node receives the load sharing weight of each route issued by the control node, further comprising:

and the first forwarding node reports a link state message to the control node, wherein the link state message carries the destination address and a link bandwidth of a first route between the first forwarding node and a next hop node, and the first route is any one of the routes.

15. The method of claim 6, wherein the method further comprises:

the first forwarding node receives the bandwidth of each route issued by the control node;

the first forwarding node determines the load sharing weight of each route according to the bandwidth of each route;

and adding the load sharing weight of each route into the weight data.

16. A method for forwarding a packet is applied to a first forwarding node in a communication network, where the communication network includes multiple forwarding nodes, and the first forwarding node is any one of the multiple forwarding nodes, and the method includes:

the first forwarding node acquires bandwidths of a plurality of routes, wherein the routes are routes from the first forwarding node to a destination node;

and the first forwarding node determines the load sharing weight of the multiple routes according to the bandwidth of the multiple routes, wherein the load sharing weight of any route is used for indicating the probability of forwarding the message from the corresponding route selected from the multiple routes.

17. The method of claim 16, wherein the first forwarding node obtaining bandwidth for a plurality of routes comprises:

the first forwarding node receives a first route notification message sent by a second forwarding node, the second forwarding node is a next hop forwarding node of a first route from the first forwarding node to the first forwarding node in the plurality of routes, the first route is any one of the plurality of routes, and the first route notification message carries the destination address and a bandwidth of a link from the second forwarding node to the destination node in the first route;

the first forwarding node acquires the bandwidth of a link from the first forwarding node to the second forwarding node;

and the first forwarding node determines the bandwidth of the first route based on the bandwidth of the link from the first forwarding node to the second forwarding node and the bandwidth of the link carried in the route advertisement message.

18. The method of claim 17, wherein the bandwidth of any one route is a minimum of the bandwidths of the links that the any one route includes;

the determining, by the first forwarding node, the bandwidth of the first route based on the bandwidth of the link from the first forwarding node to the second forwarding node and the bandwidth of the link carried in the route advertisement packet includes:

and the first forwarding node determines a smaller bandwidth of the link between the first forwarding node and the second forwarding node and the bandwidth of the link carried in the first route advertisement message, and takes the smaller bandwidth as the bandwidth of the first route.

19. The method according to claim 17, wherein the bandwidth of the link carried in the first route advertisement message is a remaining bandwidth on the link;

the acquiring, by the first forwarding node, a bandwidth of a link from the first forwarding node to the second forwarding node includes:

the first forwarding node acquires the residual bandwidth of a link from the first forwarding node to the second forwarding node;

the determining, by the first forwarding node, the bandwidth of the first route based on the bandwidth of the link from the first forwarding node to the second forwarding node and the bandwidth of the link carried in the route advertisement packet includes:

and the first forwarding node determines the bandwidth of the first route based on the residual bandwidth of the link from the first forwarding node to the second forwarding node and the residual bandwidth carried in the route advertisement message.

20. The method of claim 19, wherein the determining, by the first forwarding node, the load sharing weight for each route according to the bandwidth of each route comprises:

under the condition that the bandwidth of the first route meets a trigger condition, determining the load sharing weight of each route according to the bandwidth of each route;

the triggering condition is that a variation value between a current bandwidth of a first route and a historical bandwidth of the first route is larger than a reference amplitude, and the historical bandwidth of the first route is a bandwidth used when a load sharing weight of the first route is determined last time before.

21. The method according to any of claims 17 to 20, wherein said first route advertisement packet carries a subtype length value, TLV, which is used to carry the bandwidth of the link in said first route from said second forwarding node to said destination node.

22. A message sending method is applied to a control node in a communication network, the communication network further comprises a plurality of forwarding nodes, and the method comprises the following steps:

the control node determines a plurality of routes from a first forwarding node to a destination node and the bandwidth of each route in the plurality of routes, wherein the first forwarding node is any one of the plurality of forwarding nodes;

the control node determines the load sharing weight of each route based on the bandwidth of each route, wherein the load sharing weight of any route is used for indicating the probability of forwarding the message by the corresponding route selected from the multiple routes;

and the control node issues the load sharing weight of each route to the first forwarding node.

23. The method of claim 22, wherein the control node determining a plurality of routes between the first forwarding node to the destination node and a bandwidth of each of the plurality of routes, comprises:

the control node acquires a link state message reported by one or more forwarding nodes in each forwarding node, wherein the link state message carries a destination address of the destination node and a bandwidth of a link between a node reporting the link state message and a next hop node on a route reaching the destination node;

and the control node determines a plurality of routes from the first forwarding node to the destination node and the bandwidth of each route in the plurality of routes according to the reported link state messages.

24. The method according to claim 22 or 23, wherein the bandwidth of any route is determined based on the link residual bandwidth of each link comprised by the respective route;

the control node determines the load sharing weight of each route based on the bandwidth of each route, including:

under the condition that the bandwidth of the first route meets a trigger condition, determining the load sharing weight of each route according to the bandwidth of each route;

the triggering condition is that a variation value between a current bandwidth of a first route and a historical bandwidth of the first route is larger than a reference amplitude, and the historical bandwidth of the first route is a bandwidth used when a load sharing weight of the first route is determined last time before.

25. The method according to claim 23 or 24, wherein each forwarding node comprises an access service gateway, ASG, and a base station side gateway, CSG, connected to the ASG;

the link state messages reported by the one or more forwarding nodes include the link state message reported by the ASG, and the link state message reported by the ASG also carries the bandwidth of the link between the CSG and the next-hop node.

26. A first forwarding node in a communication network, wherein the communication network includes a plurality of forwarding nodes, the first forwarding node is any one of the plurality of forwarding nodes, and the first forwarding node includes:

a receiving module, configured to receive a packet, where the packet carries a destination address;

a determining module, configured to determine, according to the destination address, a plurality of routes that are routes from the first forwarding node to a destination node indicated by the destination address;

an obtaining module, configured to obtain a load sharing weight of each of the multiple routes, where the load sharing weight of any one route is used to indicate a probability that the message is forwarded by a corresponding route selected from the multiple routes;

and the sending module is used for selecting one route from the plurality of routes according to the load sharing weight of each route to forward the message.

27. The first forwarding node of claim 26 wherein the load sharing weight of each route is associated with a bandwidth of each route.

28. The first forwarding node of claim 27 wherein a proportion of load sharing weights between any two of the routes is consistent with a proportion of bandwidth between the any two routes.

29. The first forwarding node of claim 27 or 28 wherein the bandwidth of any one route is a minimum or average of the bandwidths of the links comprised by said any one route.

30. The first forwarding node of claim 29, wherein the bandwidth of each link is a link reserved bandwidth or a link remaining bandwidth.

31. The first forwarding node of any of claims 26 to 30, wherein the obtaining module is configured to:

and acquiring the load sharing weight of each route from the weight data stored locally.

32. The first forwarding node of claim 31,

the obtaining module is further configured to obtain bandwidths of the routes;

the determining module is further configured to determine a load sharing weight of each route according to the bandwidth of each route;

the first forwarding node further comprises a storage module configured to add the load sharing weight of each route to the weight data.

33. The first forwarding node of claim 32, wherein the obtaining module is to:

receiving a first route notification message sent by a second forwarding node, where the second forwarding node is a next hop forwarding node of a first route from the first forwarding node to the first forwarding node in each route, the first route is any one of the routes, and the first route notification message carries the destination address and a bandwidth of a link from the second forwarding node to the destination node in the first route;

acquiring the bandwidth of a link from the first forwarding node to the second forwarding node;

and determining the bandwidth of the first route based on the bandwidth of the link from the first forwarding node to the second forwarding node and the bandwidth of the link carried in the route advertisement message.

34. The first forwarding node of claim 33, wherein the bandwidth of the link carried by the first route advertisement packet is a minimum bandwidth on the link from the second forwarding node to the destination node in the first route;

the acquisition module is configured to:

determining a smaller bandwidth of the link between the first forwarding node and the second forwarding node and the bandwidth of the link carried in the first route advertisement message, and taking the smaller bandwidth as the bandwidth of the first route.

35. The first forwarding node of claim 33, wherein the bandwidth of the link carried in the first route advertisement message is a remaining bandwidth on the link;

the acquisition module is configured to:

acquiring the residual bandwidth of a link from the first forwarding node to the second forwarding node;

and determining the bandwidth of the first route based on the residual bandwidth of the link from the first forwarding node to the second forwarding node and the residual bandwidth carried in the route advertisement message.

36. The first forwarding node of claim 35, wherein the determining module is to:

under the condition that the bandwidth of the first route meets a trigger condition, determining the load sharing weight of each route according to the bandwidth of each route;

the triggering condition is that a variation value between a current bandwidth of a first route and a historical bandwidth of the first route is larger than a reference amplitude, and the historical bandwidth of the first route is a bandwidth used when a load sharing weight of the first route is determined last time before.

37. The first forwarding node according to any of claims 33 to 36, wherein the first route advertisement packet carries a subtype length value TLV, and wherein the sub-TLV is configured to carry a bandwidth of a link in the first route from the second forwarding node to the destination node.

38. The first forwarding node of claim 31,

the receiving module is further configured to receive a load sharing weight of each route issued by a control node, where the load sharing weight of each route is determined by the control node based on a bandwidth of each route;

the first forwarding node further comprises a storage module configured to add the load sharing weight of each route to the weight data.

39. The first forwarding node of claim 38, wherein the sending module is further configured to:

and reporting a link state message to the control node, wherein the link state message carries the destination address and a link bandwidth of a first route between the first forwarding node and a next hop node, and the first route is any one of the routes.

40. The first forwarding node of claim 31,

the receiving module is further configured to receive the bandwidth of each route issued by the control node;

the determining module is further configured to determine a load sharing weight of each route according to the bandwidth of each route;

the first forwarding node further comprises a storage module configured to add the load sharing weight of each route to the weight data.

41. A first forwarding node in a communication network, wherein the communication network includes a plurality of forwarding nodes, the first forwarding node is any one of the plurality of forwarding nodes, and the first forwarding node includes:

an obtaining module, configured to obtain bandwidths of multiple routes, where the multiple routes are routes from the first forwarding node to a destination node;

and the determining module is further configured to determine load sharing weights of the multiple routes according to bandwidths of the multiple routes, where the load sharing weight of any one route is used to indicate a probability that the packet is forwarded by a corresponding route selected from the multiple routes.

42. The first forwarding node of claim 41, wherein the obtaining module is to:

receiving a first route notification message sent by a second forwarding node, where the second forwarding node is a next hop forwarding node of a first route from the first forwarding node to the first forwarding node in the multiple routes, the first route is any one of the multiple routes, and the first route notification message carries the destination address and a bandwidth of a link from the second forwarding node to the destination node in the first route;

acquiring the bandwidth of a link from the first forwarding node to the second forwarding node;

and determining the bandwidth of the first route based on the bandwidth of the link from the first forwarding node to the second forwarding node and the bandwidth of the link carried in the route advertisement message.

43. The first forwarding node of claim 42, wherein the bandwidth of any one route is a minimum of the bandwidths of the links comprised by the any one route;

the acquisition module is configured to:

determining a smaller bandwidth of the link between the first forwarding node and the second forwarding node and the bandwidth of the link carried in the first route advertisement message, and taking the smaller bandwidth as the bandwidth of the first route.

44. The first forwarding node of claim 42, wherein the bandwidth of the link carried in the first route advertisement message is a remaining bandwidth on the link;

the acquisition module is configured to:

acquiring the residual bandwidth of a link from the first forwarding node to the second forwarding node;

and determining the bandwidth of the first route based on the residual bandwidth of the link from the first forwarding node to the second forwarding node and the residual bandwidth carried in the route advertisement message.

45. The first forwarding node of claim 44, wherein the determining module is to:

under the condition that the bandwidth of the first route meets a trigger condition, determining the load sharing weight of each route according to the bandwidth of each route;

the triggering condition is that a variation value between a current bandwidth of a first route and a historical bandwidth of the first route is larger than a reference amplitude, and the historical bandwidth of the first route is a bandwidth used when a load sharing weight of the first route is determined last time before.

46. The first forwarding node of any of claims 42 to 45, wherein the first route advertisement packet carries a subtype-Length-value, TLV, used to carry the bandwidth of the link in the first route from the second forwarding node to the destination node.

47. A control node in a communication network, the communication network further comprising a plurality of forwarding nodes, the control node comprising:

a determining module, configured to determine multiple routes from a first forwarding node to a destination node, and a bandwidth of each of the multiple routes, where the first forwarding node is any one of the multiple forwarding nodes;

the determining module is further configured to determine a load sharing weight of each route based on the bandwidth of each route, where the load sharing weight of any route is used to indicate a probability that the packet is forwarded by a corresponding route selected from the multiple routes;

and the sending module is used for sending the load sharing weight of each route to the first forwarding node.

48. The control node of claim 47, wherein the determination module is to:

acquiring link state messages reported by one or more forwarding nodes in each forwarding node, wherein the link state messages carry destination addresses of the destination nodes and the bandwidth of a link between a node reporting the link state messages and a next hop node on a route reaching the destination nodes;

and determining a plurality of routes from the first forwarding node to the destination node and the bandwidth of each route in the plurality of routes according to the reported link state messages.

49. The method according to claim 47 or 48, wherein the bandwidth of any route is determined based on the link residual bandwidth of each link comprised by the respective route;

the determination module is to:

determining a variation value between a current bandwidth of a first route in the routes and a historical bandwidth of the first route, wherein the first route is any one of the routes, and the historical bandwidth of the first route refers to a bandwidth of the first route used when a load sharing weight of the routes is determined last time before current time;

and if the variation value is larger than the reference amplitude, executing the step of determining the load sharing weight of each route based on the bandwidth of each route.

50. The method according to claim 48 or 49, wherein each forwarding node comprises an access service gateway, ASG, and a base station side gateway, CSG, connected to the ASG;

the link state messages reported by the one or more forwarding nodes include the link state message reported by the ASG, and the link state message reported by the ASG also carries the bandwidth of the link between the CSG and the next-hop node.

51. A system for forwarding packets, the system comprising a plurality of forwarding nodes; it is characterized in that the preparation method is characterized in that,

any of the plurality of forwarding nodes is configured to implement the method of any of claims 1-15 or the method of any of claims 16-21.

52. The system of claim 51, wherein the system further comprises a control node; it is characterized in that the preparation method is characterized in that,

the controlled node is adapted to implement the method of any of claims 22-25.

Technical Field

The present application relates to the field of routing technologies, and in particular, to a method for forwarding a packet and a related device.

Background

With the development of routing technology, any node in a communication network can forward a message based on a configured route. With the complexity of network topology, there may be more than one route between any node and the destination node, and how to forward the packet in this scenario is a problem that needs to be solved at present. For example, in an Ethernet Virtual Private Network (EVPN), each forwarding node may obtain a route to each host based on a Border Gateway Protocol (BGP). Subsequently, for any forwarding node, if the forwarding node receives a message whose destination address is a Media Access Control (MAC) address of a host, the forwarding node forwards the message based on a pre-acquired route to the host.

In the related art, after a forwarding node receives a packet whose destination address is an MAC address of a certain host, if there are multiple routes to the host in routes acquired in advance, one of the multiple routes is selected as a destination route in an equivalent load sharing manner. The packet is then forwarded based on the destination route. The equivalent load sharing method means that the plurality of routes are selected with the same probability. The method for sending the message can only realize equivalent load sharing, and is easy to reduce the utilization rate of bandwidth resources in the network.

Disclosure of Invention

The application provides a method for forwarding a message and related equipment, which can avoid problems in an equivalent load sharing mode. The technical scheme is as follows:

in a first aspect, a method for forwarding a packet is provided, where the method is applied to a first forwarding node in a communication network, where the communication network includes multiple forwarding nodes, and the first forwarding node is any one of the multiple forwarding nodes.

In the method, a first forwarding node receives a message, the message carries a destination address, the first forwarding node determines a plurality of routes according to the destination address, the plurality of routes refer to routes from the first forwarding node to the destination node indicated by the destination address, the first forwarding node obtains load sharing weights of all the routes, and the first forwarding node selects one route from the plurality of routes according to the load sharing weights of all the routes to forward the message. Wherein, the load sharing weight of any route is used to indicate the probability of forwarding the packet from the corresponding route selected from the multiple routes.

Therefore, in the present application, if there are multiple routes from the first forwarding node to the destination node indicated by the destination address carried in the packet, load sharing weights are configured in advance for the multiple routes, so that a route is selected to forward the packet based on the load sharing weights of the routes. Since the load sharing weight of any one route is used to indicate the probability of forwarding the packet by the corresponding route selected from the multiple routes, in this embodiment of the present application, the packet is forwarded based on the pre-configured load sharing weight instead of blindly performing equivalent load sharing. Therefore, the load sharing weight on each route can be customized based on the problems in the forwarding message in the equivalent load sharing process, so that the problems in the forwarding message in the equivalent load sharing process are avoided.

Based on the method provided in the first aspect, in a possible implementation manner, the load sharing weight of each route is associated with the bandwidth of each route.

Under the condition that the bandwidths of all the routes reaching the same destination node from the first forwarding node are not consistent, if the first forwarding node directly transmits a target message to be forwarded by adopting an equivalent load sharing mode when the first forwarding node receives the target message, the flow shared by all the routes is consistent finally. Thus, for a route with a large bandwidth, the bandwidth of the route of the type cannot be fully facilitated by an equivalent load sharing mode, and further the bandwidth utilization rate of the network is reduced. For a route with a smaller bandwidth, traffic on the route of the type is likely to be congested by an equivalent load sharing mode, so that a packet loss retransmission phenomenon is likely to occur in a message transmission process, and thus the message transmission efficiency is low.

Based on the technical problem of the equivalent load sharing manner, in the present application, if there are multiple routes from the first forwarding node to the destination node indicated by the destination address, load sharing weights are configured for the multiple routes in advance, and the load sharing weights of the routes are associated with the bandwidths of the routes, so as to implement load sharing based on the bandwidths of the routes, rather than blindly performing equivalent load sharing, so as to improve the bandwidth utilization rate of the routes with wider bandwidth in the routes, and also avoid congestion of the routes with smaller bandwidth in the routes when transmitting packets.

Based on the method provided in the first aspect, in a possible implementation manner, a ratio of the load sharing weight between any two routes in each route is consistent with a ratio of the bandwidth between any two routes.

The proportion between the load sharing weights among the routes can be configured directly based on the proportion of the bandwidth among the routes, so that the bandwidth resources on the routes in the communication network can be fully utilized.

Based on the method provided by the first aspect, in a possible implementation manner, the bandwidth of any one route is a minimum value or an average value of bandwidths of links included in the any one route.

And load sharing is carried out according to the minimum bandwidth on each route so as to further avoid the phenomenon of traffic congestion caused by the limitation of the minimum bandwidth when each route transmits the message. Or, the load sharing weight can be configured based on the average bandwidth, so that the flexibility of configuring the load sharing weight is improved.

Based on the method provided in the first aspect, in a possible implementation manner, the bandwidth of each link is a link reserved bandwidth or a link remaining bandwidth, so that the flexibility of configuring the load sharing weight is improved.

Based on the method provided in the first aspect, in a possible implementation manner, an implementation process of the first forwarding node obtaining the load sharing weight of each of the plurality of routes may be: and the first forwarding node acquires the load sharing weight of each route from the weight data stored locally.

In order to improve the efficiency of message transmission, the load sharing weight of each route may be determined in advance, and the load sharing weight of each route is stored locally, so that the load sharing weight of each route may be obtained quickly in the forwarded message.

Based on the method provided in the first aspect, in a possible implementation manner, in the method, the first forwarding node may further obtain a bandwidth of each route, determine a load sharing weight of each route according to the bandwidth of each route, and add the load sharing weight of each route in the weight data.

In a possible implementation manner, the forwarding node can configure the load sharing weight of each route based on the bandwidth of each route, and the process of configuring the load sharing weight in advance does not need to control participation of the node, so that the flexibility of the manner of configuring the load sharing weight provided by the application is improved.

Based on the method provided in the first aspect, in a possible implementation manner, the implementation process of the first forwarding node acquiring the bandwidth of each route may be: and the first forwarding node receives a first route notification message sent by the second forwarding node. The second forwarding node is a next hop forwarding node of the first forwarding node on the first route in the routes, the first route is any one of the routes, the first route notification message carries a target destination address and a bandwidth of a link from the second forwarding node to the destination node in the first route, and the first route notification message is used for indicating that the second forwarding node can forward the message to the destination node. And then the first forwarding node acquires the bandwidth of the link between the first forwarding node and the second forwarding node, and determines the bandwidth of the first route based on the bandwidth of the link between the first forwarding node and the second forwarding node and the bandwidth of the link carried in the route notification message.

Therefore, the route advertisement message in the conventional technology can be extended, so that the route advertisement message can carry not only the destination address to be learned (in EVPN, the destination address is an MAC address), but also the bandwidth of the link, so that the first forwarding node can acquire the bandwidth on each route. Therefore, the method for configuring the load sharing weight by the forwarding node provided by the application is more feasible, and the method for forwarding the message provided by the application is favorable for popularization.

Based on the method provided in the first aspect, in a possible implementation manner, if a bandwidth of a link carried in a first route advertisement packet is a minimum bandwidth of a link from a second forwarding node to a destination node in a first route, at this time, based on the bandwidth of the link from the first forwarding node to the second forwarding node and the bandwidth of the link carried in the first route advertisement packet, an implementation process of determining the bandwidth of the first route may be: and the first forwarding node determines the bandwidth of a link between the first forwarding node and the second forwarding node and the smaller bandwidth of the link carried in the first route notification message, and takes the smaller bandwidth as the bandwidth of the first route.

Through the implementation mode, when each forwarding node transmits the link bandwidth, the bandwidth of the link between the forwarding node and the next hop node can be compared with the bandwidth in the received route announcement message, and the smaller value is used as the bandwidth of the link between the forwarding node and the destination node. Therefore, when each forwarding node transmits the route notification message to the next hop, only one minimum bandwidth value is needed, so that the byte number of the route notification message can be reduced, and the phenomenon that excessive network resources are occupied in the process of transmitting the route notification message is avoided.

Based on the method provided in the first aspect, in a possible implementation manner, the bandwidth of the link carried in the first route advertisement message is a remaining bandwidth on the link. In this scenario, the step of acquiring, by the first forwarding node, the bandwidth of the link from the first forwarding node to the second forwarding node is as follows: and acquiring the residual bandwidth of the link from the first forwarding node to the second forwarding node. The implementation process of determining, by the first forwarding node, the bandwidth of the first route based on the bandwidth of the link between the first forwarding node and the second forwarding node and the bandwidth of the link carried in the route advertisement message may be: and the first forwarding node determines the bandwidth of the first route based on the residual bandwidth of the link from the first forwarding node to the second forwarding node and the residual bandwidth carried in the route advertisement message.

In a scenario where the link bandwidth refers to the remaining bandwidth of the link, the bandwidth of the first route may be determined in the manner described above.

Based on the method provided in the first aspect, in a possible implementation manner, in a scenario where the link bandwidth is the remaining bandwidth, an implementation process of determining, by the first forwarding node, the load sharing weight of each route according to the bandwidth of each route may be: and under the condition that the bandwidth of the first route meets the trigger condition, determining the load sharing weight of each route according to the bandwidth of each route. The triggering condition is that a variation value between the current bandwidth of the first route and the historical bandwidth of the first route is larger than a reference amplitude, and the historical bandwidth of the first route is a bandwidth used when the load sharing weight of the first route is determined last time before.

Therefore, when the bandwidth of the link is the link residual bandwidth, since the traffic on the link may change in real time, the link residual bandwidth of the link may also change dramatically, and in this case, the bandwidth on each route also changes dynamically, so that the load sharing weight of each route can be correspondingly dynamically adjusted in the present application, so that the adjusted load sharing weight better meets the requirement of the network.

It should be noted that the determination process that the bandwidth of the first route meets the trigger condition may be implemented by the second forwarding node, at this time, when the second forwarding node determines that the variation value of the bandwidth of the link between the second forwarding node and the target node relative to the historical bandwidth is greater than the reference amplitude, it indicates that the bandwidth of the first route meets the trigger condition, at this time, the second forwarding node may trigger to issue a route advertisement message to the first forwarding node, and when receiving the route advertisement message, the first forwarding node directly adjusts the load sharing weight based on the received route advertisement message.

The above-mentioned judgment process that the bandwidth of the first route meets the trigger condition may also be implemented by the first forwarding node. In this scenario, each forwarding node periodically issues a route advertisement message, and at this time, after receiving the route advertisement message each time, the first forwarding node determines the bandwidth of the first route first, and only when the bandwidth of the first route in the plurality of routes meets the trigger condition, the load sharing weight of each route is adjusted.

Based on the method provided in the first aspect, in a possible implementation manner, the first route advertisement packet carries a subtype length value TLV, and the sub-TLV is used to carry a bandwidth of a link from the second forwarding node to the destination node in the first route.

That is, a sub-TLV may be directly extended in the route advertisement packet in the conventional technique to carry the link bandwidth, so that the method for forwarding the packet provided by the present application may be implemented, and the method for forwarding the packet provided by the present application may be smoothly evolved in and out in the conventional technique.

Based on the method provided in the first aspect, in a possible implementation manner, in the method, the first forwarding node may receive a load sharing weight of each route issued by the control node, where the load sharing weight of each route is determined by the control node based on a bandwidth of each route, and then add the load sharing weight of each route to the weight data.

In a possible implementation manner, the control node may configure the load sharing weight of each route based on the bandwidth of each route, and each forwarding node does not need to configure itself, so that the flexibility of the manner of configuring the load sharing weight provided by the present application is improved.

Based on the method provided in the first aspect, in a possible implementation manner, before the first forwarding node receives the load sharing weight of each route issued by the control node, the first forwarding node may also report a link state packet to the control node, where the link state packet carries a target destination address and a link bandwidth between the first forwarding node and a next hop node on the first route, and the first route is any one of the multiple routes.

If the control node configures the load sharing weight of each route based on the bandwidth of each route, each forwarding node needs to report the bandwidth of the link where the forwarding node is located to the control node in advance, so that the control node can configure the load sharing weight on each forwarding node. In the method, the bandwidth of the link where the link is located can be reported to the control node by directly using the link state message in the conventional technology without expanding other messages, so that the flexibility of the method for forwarding the message provided by the method is improved.

Based on the method provided in the first aspect, in a possible implementation manner, the first forwarding node may further receive the bandwidth of each route sent by the control node, and then the first forwarding node determines the load sharing weight of each route according to the bandwidth of each route, and adds the load sharing weight of each route to the weight data.

In another possible implementation manner, the control node may issue the determined bandwidth pair of each route to the forwarding node, and the forwarding node determines the load sharing weight of each route based on the bandwidth of each route, so as to reduce the data processing pressure of the control node, and also improve the flexibility of the manner of configuring the load sharing weight provided by the present application.

In a second aspect, a method for forwarding a packet is provided, where the method is applied to a first forwarding node in a communication network, where the communication network includes multiple forwarding nodes, and the first forwarding node is any one of the multiple forwarding nodes. In the method, a first forwarding node acquires the bandwidth of a plurality of routes, wherein the routes are routes from the first forwarding node to a destination node; the first forwarding node determines load sharing weights of the multiple routes according to the bandwidths of the multiple routes, wherein the load sharing weight of any route is used for indicating the probability of forwarding the message by the corresponding route selected from the multiple routes.

The above-mentioned technical solution is provided that the first forwarding node configures load sharing weights for the plurality of routes in advance, so as to select a route to forward a packet based on the load sharing weights of the routes in the following. Since the load sharing weight of any one route is used to indicate the probability of forwarding the packet by the corresponding route selected from the multiple routes, in this embodiment of the present application, the packet is forwarded based on the pre-configured load sharing weight instead of blindly performing equivalent load sharing. Therefore, the load sharing weight on each route can be customized based on the problems in the forwarding message in the equivalent load sharing process, so that the problems in the forwarding message in the equivalent load sharing process are avoided.

Based on the method provided in the second aspect, in a possible implementation manner, the implementation process of the first forwarding node acquiring bandwidths of the multiple routes may be: the method comprises the steps that a first forwarding node receives a first route notification message sent by a second forwarding node, the second forwarding node is a next hop forwarding node of the first forwarding node on a first route in a plurality of routes, the first route is any one of the plurality of routes, and the first route notification message carries a destination address and a bandwidth of a link from the second forwarding node to the destination node in the first route; the method comprises the steps that a first forwarding node acquires the bandwidth of a link from the first forwarding node to a second forwarding node; and the first forwarding node determines the bandwidth of the first route based on the bandwidth of the link from the first forwarding node to the second forwarding node and the bandwidth of the link carried in the route notification message.

Therefore, the route advertisement message in the conventional technology can be extended, so that the route advertisement message can carry not only the destination address to be learned (in EVPN, the destination address is an MAC address), but also the bandwidth of the link, so that the first forwarding node can acquire the bandwidth on each route. Therefore, the method for configuring the load sharing weight by the forwarding node provided by the application is more feasible, and the method for forwarding the message provided by the application is favorable for popularization.

Based on the method provided by the second aspect, in a possible implementation manner, the bandwidth of any one route is the minimum value of the bandwidths of the links included in any one route. In this scenario, the implementation process of determining, by the first forwarding node, the bandwidth of the first route based on the bandwidth of the link between the first forwarding node and the second forwarding node and the bandwidth of the link carried in the route advertisement packet may be: and the first forwarding node determines the bandwidth of a link between the first forwarding node and the second forwarding node and the smaller bandwidth of the link carried in the first route notification message, and takes the smaller bandwidth as the bandwidth of the first route.

Through the implementation mode, when each forwarding node transmits the link bandwidth, the bandwidth of the link between the forwarding node and the next hop node can be compared with the bandwidth in the received route announcement message, and the smaller value is used as the bandwidth of the link between the forwarding node and the destination node. Therefore, when each forwarding node transmits the route notification message to the next hop, only one minimum bandwidth value is needed, so that the byte number of the route notification message can be reduced, and the phenomenon that excessive network resources are occupied in the process of transmitting the route notification message is avoided.

Based on the method provided in the first aspect, in a possible implementation manner, the bandwidth of the link carried in the first route advertisement message is a remaining bandwidth on the link. In this scenario, the step of acquiring, by the first forwarding node, the bandwidth of the link from the first forwarding node to the second forwarding node is as follows: and acquiring the residual bandwidth of the link from the first forwarding node to the second forwarding node. The implementation process of determining, by the first forwarding node, the bandwidth of the first route based on the bandwidth of the link between the first forwarding node and the second forwarding node and the bandwidth of the link carried in the route advertisement message may be: and the first forwarding node determines the bandwidth of the first route based on the residual bandwidth of the link from the first forwarding node to the second forwarding node and the residual bandwidth carried in the route advertisement message.

In a scenario where the link bandwidth refers to the remaining bandwidth of the link, the bandwidth of the first route may be determined in the manner described above.

Based on the method provided in the first aspect, in a possible implementation manner, in a scenario where the link bandwidth is the remaining bandwidth, an implementation process of determining, by the first forwarding node, the load sharing weight of each route according to the bandwidth of each route may be: and under the condition that the bandwidth of the first route meets the trigger condition, determining the load sharing weight of each route according to the bandwidth of each route. The triggering condition is that a variation value between the current bandwidth of the first route and the historical bandwidth of the first route is larger than a reference amplitude, and the historical bandwidth of the first route is a bandwidth used when the load sharing weight of the first route is determined last time before.

Therefore, when the bandwidth of the link is the link residual bandwidth, since the traffic on the link may change in real time, the link residual bandwidth of the link may also change dramatically, and in this case, the bandwidth on each route also changes dynamically, so that the load sharing weight of each route can be correspondingly dynamically adjusted in the present application, so that the adjusted load sharing weight better meets the requirement of the network.

Based on the method provided in the first aspect, in a possible implementation manner, the first route advertisement packet carries a subtype length value TLV, and the sub-TLV is used to carry a bandwidth of a link from the second forwarding node to the destination node in the first route.

That is, a sub-TLV may be directly extended in the route advertisement packet in the conventional technique to carry the link bandwidth, so that the method for forwarding the packet provided by the present application may be implemented, and the method for forwarding the packet provided by the present application may be smoothly evolved in and out in the conventional technique.

In a third aspect, a packet sending method is provided, where the method is applied to a control node in a communication network, and the communication network further includes multiple forwarding nodes. In the method, the control node may determine a plurality of routes from a first forwarding node to a destination node indicated by a destination address, the first forwarding node being any one of the plurality of forwarding nodes, and a bandwidth of each of the plurality of routes; the control node determines the load sharing weight of each route based on the bandwidth of each route; the control node issues load sharing weights of all routes to the first forwarding node, and the load sharing weight of any route is used for indicating the probability of forwarding the message from a corresponding route selected from the routes.

In this application, the control node may configure the load sharing weight of each route to implement the method for forwarding a packet provided in the above first aspect. Therefore, load sharing is carried out based on the bandwidth of each route instead of carrying out equivalent load sharing blindly, so that the bandwidth utilization rate of the route with wider bandwidth in each route is improved, and the congestion phenomenon of the route with smaller bandwidth in each route when a message is transmitted is avoided.

Based on the method provided by the third aspect, in a possible implementation manner, the determining, by the control node, a plurality of routes from the first forwarding node to the destination node indicated by the destination address, and the implementation procedure of the bandwidth of each of the plurality of routes may be: the control node acquires a link state message reported by one or more forwarding nodes in each forwarding node, wherein the link state message carries a destination address corresponding to the destination node and the bandwidth of a link between the node reporting the link state message and a next hop node on a route reaching the destination node; and the control node determines a plurality of routes from the first forwarding node to the destination node and the bandwidth of each route in the plurality of routes according to the reported link state messages.

The control node can determine the bandwidth of the route based on the link state message in the traditional technology, and the compatibility of the method for forwarding the message provided by the application and the traditional technology is improved.

Based on the method provided in the third aspect, in a possible implementation manner, the bandwidth of any route is determined based on link remaining bandwidths of links included in the corresponding route. In this scenario, the implementation process of determining the load sharing weight of each route by the control node based on the bandwidth of each route may be as follows: and under the condition that the bandwidth of the first route meets the trigger condition, determining the load sharing weight of each route according to the bandwidth of each route. The triggering condition is that a variation value between the current bandwidth of the first route and the historical bandwidth of the first route is larger than a reference amplitude, and the historical bandwidth of the first route is a bandwidth used when the load sharing weight of the first route is determined last time before.

Therefore, when the bandwidth of the link is the link residual bandwidth, since the traffic on the link may change in real time, the link residual bandwidth of the link may also change dramatically, and in this case, the bandwidth on each route also changes dynamically, so that the load sharing weight of each route can be correspondingly dynamically adjusted in the present application, so that the adjusted load sharing weight better meets the requirement of the network.

Based on the method provided in the third aspect, in a possible implementation manner, each forwarding node includes an access service gateway ASG and a base station side gateway CSG, and the CSG is connected to the ASG. In this scenario, the link state packet reported by the one or more forwarding nodes includes a link state packet reported by an ASG, and the link state packet reported by the ASG also carries a bandwidth of a link between the CSG and the next-hop node.

In the EVPN technology, considering that the number of CSGs in the communication network is usually large, in order to avoid network congestion at the control node, the CSG may transmit a link state packet to the ASG based on the IGP, so as to report the link state packet to the control node through the ASG link state packet, thereby improving the efficiency of forwarding the packet provided by the present application.

The detailed technical effect of the method for forwarding a packet provided in the third aspect may also refer to the technical effect of the related scheme in which the control node configures the load sharing weight in the first aspect, and a detailed description is not further provided herein.

In a fourth aspect, a first forwarding node in a communication network is provided, where the communication network includes a plurality of forwarding nodes, and the first forwarding node is any one of the plurality of forwarding nodes. The first forwarding node has a function of implementing the behavior of the method for forwarding the packet in the first aspect or the second aspect. The first forwarding node includes at least one module, and the at least one module is configured to implement the method for forwarding a packet provided in the first aspect or the second aspect.

In a fifth aspect, a control node in a communication network is provided, the communication network further comprising a plurality of forwarding nodes. Wherein the control node has a function of implementing the behavior of the method for forwarding the packet in the third aspect. The control node includes at least one module, where the at least one module is configured to implement the method for forwarding a packet provided in the third aspect.

In a sixth aspect, a first forwarding node in a communication network is provided, where the communication network includes a plurality of forwarding nodes, and the first forwarding node is any one of the plurality of forwarding nodes;

wherein the first forwarding node comprises a memory and a processor;

the memory is used for storing a computer program;

the processor is configured to execute a computer program stored in the memory to perform the method of any of the first or second aspects described above.

In a seventh aspect, there is provided a control node in a communication network, the control node comprising a memory and a processor;

the memory is used for storing a computer program;

the processor is adapted to execute a computer program stored in the memory to perform the method of any of the above third aspects.

In an eighth aspect, a chip is provided, where the chip is disposed in a first forwarding node in a communication network, where the communication network includes a plurality of forwarding nodes, and the first forwarding node is any one of the plurality of forwarding nodes.

Wherein the chip comprises a processor and an interface circuit;

the interface circuit is used for receiving the instruction and transmitting the instruction to the processor;

the processor is configured to perform the method of any one of the first or second aspects described above.

In a ninth aspect, a chip is provided, the chip being disposed in a control node in a communication network.

Wherein the chip comprises a processor and an interface circuit;

the interface circuit is used for receiving the instruction and transmitting the instruction to the processor;

the processor is configured to perform the method of any of the above third aspects.

A tenth aspect provides a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to perform any of the methods of the first, second or third aspects described above for forwarding a packet.

In an eleventh aspect, there is provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the methods of forwarding a message of the first, second or third aspects described above.

In a twelfth aspect, a system for forwarding packets is provided, where the system includes multiple forwarding nodes;

wherein any forwarding node is configured to implement any method for forwarding a packet according to the first aspect or the second aspect.

Based on the system provided in the twelfth aspect, in a possible implementation manner, the system may further include a control node, where the control node is configured to implement any method for forwarding a packet in the third aspect.

The technical effects obtained by the above fourth to twelfth aspects are similar to the technical effects obtained by the corresponding technical means in the first to third aspects, and are not described herein again.

Drawings

Fig. 1 is a schematic system architecture diagram of a communication network according to an embodiment of the present application;

fig. 2 is a system architecture diagram of another communication network provided in an embodiment of the present application;

fig. 3 is a flowchart of a method for forwarding a packet according to an embodiment of the present application;

fig. 4 is a flowchart of a method for obtaining load sharing weights according to an embodiment of the present disclosure;

fig. 5 is a schematic flow chart of advertising bandwidth according to an embodiment of the present application;

fig. 6 is a schematic diagram of a format of a route advertisement packet according to an embodiment of the present application;

fig. 7 is a schematic diagram of another format of a route advertisement packet according to an embodiment of the present application;

fig. 8 is a flowchart of another method for obtaining load sharing weights according to an embodiment of the present application;

fig. 9 is a schematic diagram of reporting a link state packet by each forwarding node according to an embodiment of the present application;

fig. 10 is a schematic structural diagram of a network device according to an embodiment of the present application;

fig. 11 is a schematic structural diagram of a network device according to an embodiment of the present application;

fig. 12 is a schematic structural diagram of a first forwarding node in a communication network according to an embodiment of the present application;

fig. 13 is a schematic structural diagram of a first forwarding node in another communication network according to an embodiment of the present application;

fig. 14 is a schematic structural diagram of a control node in a communication network according to an embodiment of the present application;

fig. 15 is a schematic structural diagram of another network device according to an embodiment of the present application.

Detailed Description

To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.

Before explaining the embodiments of the present application in detail, an application scenario of the embodiments of the present application is explained.

Load sharing refers to sharing traffic to a plurality of links in the case where there are a plurality of links to a destination node indicated by a destination address. The load sharing can fully utilize network resources. On the other hand, when one link in the load sharing links fails, the traffic can be continuously forwarded from other links, thereby improving the reliability of network communication.

At present, traditional mobile and home broadband services in an operator network tend to be saturated, and enterprise private lines based on enterprise-to-enterprise (B2B) become important service growth points of operators. Therefore, most operators gradually provide bandwidth services for enterprises, and open enterprise private lines to provide private network services.

In the process of opening a special line of an enterprise, the following two situations are usually faced. On one hand, in order to save cost, different operator networks are leased mutually, and the intermediate leased networks pass through other operator networks to construct an enterprise private line, and the bandwidth plans of main and standby plane links of the enterprise private line are inconsistent, so that the utilization rates of the main and standby links are different.

On the other hand, currently, most of operator networks use Virtual Leased Line (VLL) and Virtual Private LAN Service (VPLS) technologies to carry enterprise private lines, but these technologies do not support traffic transmission load sharing in multi-home networks. Therefore, although the technologies ensure the reliability of the enterprise private line, the technologies cause the waste of network resources.

With the evolution of the technology, the existing EVPN technology can solve the problem that the VLL \ VPLS technology cannot realize load sharing. In EVPN, the route issuing process of MAC addresses between two layers of networks is transferred from a data plane to a control plane through an extended BGP protocol. Therefore, each forwarding node in the network can learn the relevant information of each next hop node reaching the same MAC address in the control plane, namely, learn different routes reaching the same MAC address, so that when the forwarding node receives a message with the destination address being the same MAC address in the data plane, the forwarding node can realize load sharing based on the different previously learned routes.

The message forwarding method provided by the embodiment of the application can be applied to the scene of load sharing of the traffic in the EVPN. Optionally, the message forwarding method provided in this embodiment of the present application may also be applied to other scenarios where a message needs to be forwarded in a load sharing manner, which is not illustrated herein.

Fig. 1 is a schematic system architecture diagram of a communication network according to an embodiment of the present application. As shown in fig. 1, the communication network 100 includes a plurality of forwarding nodes, and 6 forwarding nodes are illustrated in fig. 1 as an example. These six forwarding nodes are labeled R1, R2, R3, R4, R5, R6, respectively, in fig. 1.

As shown in fig. 1, the forwarding node R1 is connected to the forwarding node R2, the forwarding node R4, and the forwarding node R5, respectively. The forwarding node R2 is connected to the forwarding node R3. The forwarding node R3, the forwarding node R4, and the forwarding node R5 are connected, respectively. When traffic is transmitted from the forwarding node R1 to the forwarding node R6, the forwarding node R1 may have three routes to transmit a message to the forwarding node R6 when it receives any message in the traffic. These three routes are respectively: r1 → R2 → R3 → R6; r1 → R4 → R6; r1 → R5 → R6.

Therefore, when the forwarding node R1 receives the packet, if the destination node of the packet is the forwarding node R6 or another node that can be reached by the forwarding node R6, at this time, the forwarding node R1 determines that there are currently three routes that can forward the packet based on the network architecture shown in fig. 1, and the forwarding node R1 may select an entry label route from the three routes to forward the packet by the method for forwarding a packet provided in this embodiment of the present application.

The communication network to which the embodiments of the present application are applied can be further described as an EVPN network.

Fig. 2 is a schematic system architecture diagram of another communication network according to an embodiment of the present application. As shown in fig. 2, the communication network 200 includes a plurality of customer edge devices (CEs), which are illustrated as CE1 and CE2 in fig. 2, and a plurality of provider edge devices (PEs), which are illustrated as PE1, PE2, and PE3 in fig. 1. The user edge device or the operator edge device may be a forwarding node such as a router or a switch.

As shown in fig. 2, CE1 is connected to PE1 and PE2, PE1 and PE2 are connected to PE3, and PE3 is connected to CE 2. The transmission direction of the data stream is CE2 → CE 1. When the forwarding node PE3 receives the packet sent by the CE2, a next hop node may be selected from the PE1 or the PE2 to forward the packet based on the method provided in the embodiment of the present application, thereby implementing load sharing of the data stream.

It should be noted that fig. 2 is only an example of the EVPN network, and does not limit the specific structure of the EVPN network.

In addition, fig. 2 is only used to illustrate one possible application scenario of the communication network provided in the embodiment of the present application, and the message forwarding method provided in the embodiment of the present application may also be applied to other types of communication networks, which is not illustrated here.

The following explains the message forwarding method provided in the embodiment of the present application in detail.

Fig. 3 is a flowchart of a method for forwarding a packet according to an embodiment of the present application. The method may be applied in the communication network shown in fig. 1 or fig. 2. The following embodiments describe how a forwarding node in a communication network forwards a packet by taking a first forwarding node in the communication network as an example, where the first forwarding node is any one of a plurality of forwarding nodes included in the communication network. As shown in fig. 3, the method includes the following steps:

step 301: the first forwarding node receives a message, and the message carries a destination address.

In this embodiment of the present application, when the first forwarding node receives any packet, since the packet carries a destination address corresponding to the destination node, the first forwarding node is configured to indicate that the packet needs to be forwarded to the destination node. The first forwarding node may forward the message based on the destination address through steps 302 through 304 described below.

The first forwarding node may be a head node in a communication network, or may be an intermediate node that transmits the packet.

In addition, for EVPN techniques, the destination address in step 301 may be the MAC address of the destination node.

Step 302: the first forwarding node determines a plurality of routes from the destination address, the plurality of routes being routes from the first forwarding node to the destination node indicated by the destination address.

For a first forwarding node, a forwarding table entry is preconfigured in the first forwarding node, where the forwarding table entry includes identifiers of multiple next-hop nodes reaching a destination node, and the identifiers of the multiple next-hop nodes are respectively used to indicate a route reaching the destination node. Therefore, when receiving the target packet carrying the target destination address, the first forwarding node may determine each route to the destination node through the forwarding table entry.

Step 303: the first forwarding node obtains the load sharing weight of each route in the plurality of routes, and the load sharing weight of any route is used for indicating the probability of forwarding the message from the corresponding route selected from the plurality of routes.

In this embodiment of the present application, when the bandwidths of the routes from the first forwarding node to the same destination node are not consistent, and the first forwarding node receives a target packet to be forwarded, if an equivalent load sharing manner is directly adopted to transmit the target packet, the flows shared by the routes are finally consistent. Thus, for a route with a large bandwidth, the bandwidth of the route of the type cannot be fully facilitated by an equivalent load sharing mode, and further the bandwidth utilization rate of the network is reduced. For a route with a smaller bandwidth, traffic on the route of the type is likely to be congested by an equivalent load sharing mode, so that a packet loss retransmission phenomenon is likely to occur in a message transmission process, and thus the message transmission efficiency is low.

Based on the above technical problem of the equivalent load sharing manner, in a possible implementation manner, if there are multiple routes from the first forwarding node to the destination node indicated by the destination address, load sharing weights may be configured in advance for the multiple routes, respectively, where the load sharing weight of any route is used to indicate a probability that a corresponding route is selected from the multiple routes to forward the target packet, so as to subsequently select a route as the target route to forward the packet based on the load sharing weights of the routes in step 304. The load sharing weight of each route is associated with the bandwidth of each route, so that load sharing based on the bandwidth of each route is realized, equivalent load sharing is not performed blindly, the bandwidth utilization rate of the route with wider bandwidth in each route is improved, and the congestion phenomenon of the route with smaller bandwidth in each route during message transmission is avoided.

In order to improve the efficiency of forwarding the packet, in this embodiment of the application, the first forwarding node may store the load sharing weight of each route in the local weight data in advance. Thus, the implementation manner of step 303 may be: the first forwarding node obtains the load sharing weight of each route from the weight data stored locally. The weight data includes load sharing weights of routes corresponding to the destination addresses. The weight data may be stored in a forwarding entry.

Furthermore, for any of the plurality of routes, the bandwidth of the route may refer to the minimum value of the bandwidths of the links included in the route. That is, load sharing is performed according to the minimum bandwidth on each route, so as to further avoid traffic congestion caused by the limitation of the minimum bandwidth when each route transmits a packet. Wherein. A route is a transmission path composed of a plurality of adjacent forwarding nodes, and therefore, the minimum bandwidth on the route refers to the minimum bandwidth among the bandwidths of links between any two adjacent forwarding nodes on the route. For example, for the route R1 → R2 → R3 → R6 shown in fig. 1, if the bandwidth of the link between R1 and R2 is 10 Gigabit Ethernet (GE), the bandwidth of the link between R2 and R3 is 50GE, and the bandwidth of the link between R3 and R6 is 20GE, the bandwidth of the link between R1 and R2 is 10GE as the bandwidth of the route.

Optionally, for any one of the routes, the bandwidth of the route may also refer to an average value of bandwidths of links included in the route. That is, the bandwidth of a route may refer to the average bandwidth over the route. For example, for the route R1 → R2 → R3 → R6 shown in fig. 1, the bandwidth 10GE of the link between R1 and R2, the bandwidth 50GE of the link between R2 and R3, and the bandwidth 20GE of the link between R3 and R6 may be used as the bandwidth of the route, and the average 27GE of these three bandwidths may be used as the bandwidth of the route.

The manner of acquiring the bandwidth of the link between any two adjacent forwarding nodes on each route will be explained in detail in the following embodiments, and the description will not be made first.

In addition, the load sharing weight of each route and the bandwidth association of each route may refer to: the ratio between the load sharing weights of each route is consistent with the ratio between the bandwidths of the routes. Thus, in one possible implementation, the proportion of the load sharing weight between any two of the routes is consistent with the proportion of the bandwidth between the any two routes.

For example, for the communication network of fig. 1, it is assumed that the bandwidth of the route R1 → R2 → R3 → R6 is 10GE, and the bandwidth of the route R1 → R4 → R6 is 20 GE; route R1 → R5 → R6 has a bandwidth of 10 GE. The ratio between the load sharing weights of the three routes may be 1:2: 1. In this scenario, the load sharing weight of the route R1 → R2 → R3 → R6 may be set to 1, the load sharing weight of the route R1 → R4 → R6 may be set to 2, and the load sharing weight of the route R1 → R5 → R6 may be set to 1. As above, the bandwidth of each route here may be the minimum bandwidth of each route, or the average bandwidth.

In this embodiment of the present application, the load sharing weight of a route is used to indicate the probability that the route is selected in each selected route, so as to implement offloading according to the load sharing weight of each route. For example, for the communication network shown in fig. 1, it is assumed that the load sharing weight of the route R1 → R2 → R3 → R6 is set to 1, the load sharing weight of the route R1 → R4 → R6 is set to 2, and the load sharing weight of the route R1 → R5 → R6 is set to 1. Then, after 80G of traffic is transmitted at R1, 20G of the 80G of traffic is transmitted through the route R1 → R2 → R3 → R6, and 40G of traffic is transmitted through the route R1 → R4 → R6. 20G of traffic is transported via the route R1 → R5 → R6.

In addition, for any route, the bandwidth of each link included in the route may be reserved for the link or may be the remaining bandwidth of the link. The embodiments of the present application do not limit this. The link reserved bandwidth refers to a bandwidth of a link when the link is idle, and may also be referred to as a link interface bandwidth. Link remaining bandwidth refers to the bandwidth remaining after traffic is transmitted on the link. For example, the link reserved bandwidth of a link is 10GE, and if 2GE is currently used, the link residual bandwidth of the link is 8 GE.

When the bandwidth of the link is the bandwidth reserved for the link, the bandwidth of each route does not change basically under the condition that the network topology does not change, and under the scene, the load sharing weight on each route is fixed and unchanged. When the bandwidth of the link is the link residual bandwidth, the traffic on the link may change in real time, so the link residual bandwidth of the link may also change dramatically, and in this case, the bandwidth on each route also changes dynamically, so that the load sharing weight of each route may be adjusted dynamically, so that the adjusted load sharing weight better meets the requirement of the network. The specific implementation of dynamically adjusting the load sharing weight will be described in detail in the following embodiments, and will not be discussed here.

In addition, the setting of the load sharing weight of each route based on the bandwidth of each route may be implemented by the first forwarding node or by the control node, which is also described in detail in the following embodiments and will not be described here.

In the embodiment of the present application, the load sharing weight may also be configured based on other information on the route, so that the first forwarding node may fully utilize the network resource after shunting based on the configured load sharing weight. For example, the load sharing weight of each route may also be associated with the transmission delay on each route, so that the congestion phenomenon in the network may be alleviated after the load is distributed according to the configured load sharing weight, thereby improving the efficiency of message forwarding.

Step 304: the first forwarding node selects one route from the routes to forward the message according to the load sharing weight of each route.

Since the load sharing weight of the route is used to indicate the probability that the route is selected at each selected route, one route from the plurality of routes can be selected as the target route in a random selection manner based on the load sharing weight of each route.

For example, for the communication network shown in fig. 1, it is assumed that the load sharing weight of the route R1 → R2 → R3 → R6 is set to 1, the load sharing weight of the route R1 → R4 → R6 is set to 2, and the load sharing weight of the route R1 → R5 → R6 is set to 1. Then node R1 randomly selects one of the three routes when forwarding the packet. Wherein, the probability that the route R1 → R2 → R3 → R6 is selected is 25%, the probability that the route R1 → R4 → R6 is selected is 50%, and the probability that the route R1 → R5 → R6 is selected is 25%.

After the target route is determined, the packet may be forwarded according to the target route. For example, for the communication network shown in fig. 1, it is assumed that the target route is R1 → R2 → R3 → R6, and at this time, the first forwarding node forwards the packet to the forwarding node R2.

To sum up, if there are multiple routes from the first forwarding node to the destination node indicated by the destination address carried in the packet, load sharing weights are configured for the multiple routes in advance, so that a route is selected to forward the packet based on the load sharing weights of the routes. Since the load sharing weight of any one route is used to indicate the probability of forwarding the packet by the corresponding route selected from the multiple routes, in this embodiment of the present application, the packet is forwarded based on the pre-configured load sharing weight instead of blindly performing equivalent load sharing. Therefore, the load sharing weight on each route can be customized based on the problems in the forwarding message in the equivalent load sharing process, so that the problems in the forwarding message in the equivalent load sharing process are avoided.

The embodiment shown in fig. 3 is used to explain how the first forwarding node can share traffic according to the load sharing weight. As can be seen from the implementation of step 303 in the embodiment shown in fig. 3, for the first forwarding node, the load sharing weights of the routes may be obtained in advance, and then the load sharing weights of the routes are stored in the local weight data. The following embodiment will explain in detail how to obtain the load sharing weight of each route. In addition, since the process of configuring the load sharing weight may be implemented by the first forwarding node itself, or may be implemented by a control node in the communication network. Therefore, the following will explain in detail the implementation manner of obtaining the load sharing weight of each route in the first forwarding node in advance through two embodiments.

Fig. 4 is a flowchart of a method for obtaining load sharing weights according to an embodiment of the present disclosure. The method is applied to the first forwarding node, namely the forwarding node configures the load sharing weight of each route based on the bandwidth of each route. As shown in fig. 4, the method includes the following steps:

step 401: the first forwarding node obtains bandwidths of a plurality of routes, wherein the routes are routes from the first forwarding node to the destination node.

In EVPN technology, each forwarding node in a communication network has a BGP accumulated interior gateway protocol metric (AIGP) function. In this function, for each forwarding node on a route to a certain destination node, the MAC address of the destination node is gradually notified to the forwarding node of the previous hop from the forwarding node of the last hop, so that each forwarding node on the route can learn the MAC address of the destination node and can forward the packet to the destination node through which next hop nodes pass, and the learned MAC address and the next hop nodes are added to the forwarding table entry.

The above-mentioned advertising of the MAC address of the destination node in the BGP AIGP function can be realized by a route advertisement packet. Therefore, in the embodiment of the present application, in order to enable each forwarding node to configure the load sharing weight of each route reaching the same destination node, the BGP AIGP function may be extended, so that each forwarding node may also advertise the bandwidth of the link reaching the destination node when advertising the MAC address of the destination node.

Therefore, in a possible implementation manner, the implementation procedure of step 401 may be: the method comprises the steps that a first forwarding node receives a first route notification message sent by a second forwarding node, the second forwarding node is a next hop forwarding node of the first forwarding node on a first route, the first route is any one of the routes, the first route notification message carries a target destination address and the bandwidth of a link from the second forwarding node to the destination node in the first route, and the first route notification message is used for indicating that the second forwarding node can forward the message to the destination node; the method comprises the steps that a first forwarding node acquires the bandwidth of a link from the first forwarding node to a second forwarding node; and the first forwarding node determines the bandwidth of the first route based on the bandwidth of the link from the first forwarding node to the second forwarding node and the bandwidth of the link carried in the route notification message.

As can be seen from the embodiment shown in fig. 3, the link bandwidth may be the link residual bandwidth or the link reserved bandwidth. The above implementation is explained below by taking the link bandwidth as the link residual bandwidth as an example. At this time, the bandwidth of the link carried in the first route advertisement message is the remaining bandwidth on the link. In this scenario, the step of acquiring, by the first forwarding node, the bandwidth of the link from the first forwarding node to the second forwarding node is as follows: and acquiring the residual bandwidth of the link from the first forwarding node to the second forwarding node. The implementation process of determining, by the first forwarding node, the bandwidth of the first route based on the bandwidth of the link between the first forwarding node and the second forwarding node and the bandwidth of the link carried in the route advertisement message may be: and the first forwarding node determines the bandwidth of the first route based on the residual bandwidth of the link from the first forwarding node to the second forwarding node and the residual bandwidth carried in the route advertisement message.

In addition, the first forwarding node may be a head node or an intermediate node in the communication network. If the first forwarding node is an intermediate node, it indicates that there are other forwarding nodes upstream of the first forwarding node. At this time, after the first forwarding node receives the route advertisement message of the second forwarding node, if there are other forwarding nodes upstream of the first forwarding node, the first forwarding node may further continue to send the route advertisement message to the upstream forwarding node, so that the upstream forwarding node may also learn the target destination address of the destination node. Therefore, in a possible implementation manner, after determining the bandwidth of the first route, the first forwarding node may further send a second route advertisement packet to the third forwarding node, where the second route advertisement packet carries the target destination address and the bandwidth of the first route. The third forwarding node is a forwarding node that sends the target packet to the first forwarding node, that is, the third forwarding node is an upstream node of the first forwarding node, so that the upstream node can configure load sharing weights on each route that reaches the destination node by referring to the first forwarding node.

That is, in the present application, the route advertisement packet in the conventional technology is extended, so that the route advertisement packet can not only carry the destination address to be learned (in EVPN, the destination address is an MAC address), but also carry the bandwidth of the link. As explained above in step 303 of fig. 3, the bandwidth of the link may be the reserved bandwidth of the link or the remaining bandwidth of the link. Will not be explained in detail here

Likewise, based on the explanation in step 303 in fig. 3, the bandwidth on the route may be the minimum bandwidth or the average bandwidth. When the bandwidth on the route is the minimum bandwidth, the bandwidth of the link from the second forwarding node to the destination node in the first route carried in the first route advertisement message may refer to the minimum bandwidth on the link from the second forwarding node to the destination node. At this time, starting from the previous hop forwarding node of the last hop node on the first route, when each forwarding node receives the bandwidth sent by the next hop forwarding node, the bandwidth of the link between the forwarding node and the next hop node is determined, and then a smaller value is determined to be carried in the route advertisement message sent by the forwarding node to the previous hop node from the received bandwidth and the determined bandwidth. In this way, the bandwidth carried in the route advertisement packet received by each forwarding node is the minimum bandwidth on the link from the next hop node of the forwarding node to the destination node.

In a scenario where a bandwidth of a link carried in the first route advertisement message is a minimum bandwidth on a link from the second forwarding node to the destination node in the first route, the first forwarding node may determine, based on the bandwidth of the link from the first forwarding node to the second forwarding node and the bandwidth of the link carried in the first route advertisement message, that the bandwidth of the first route is implemented in the following manner: and the first forwarding node determines the bandwidth of a link between the first forwarding node and the second forwarding node and the smaller bandwidth of the link carried in the first route notification message, and takes the smaller bandwidth as the bandwidth of the first route.

Fig. 5 is a schematic flow chart of advertising bandwidth according to an embodiment of the present application. As shown in fig. 5, in the data plane, a data flow is transmitted from a base station side gateway (CSG) 1 to a Customer Premise Equipment (CPE), where the CPE may also be referred to as a customer end device or a customer premises equipment. In the control plane, when an Access Service Gateway (ASG) 1 transmits an MAC address of a destination node, it carries link bandwidth information 20GE from an ASG1 output interface to a CPE, records the information in a route advertisement message, and transmits the route advertisement message to a Radio Service Gateway (RSG) 1. The RSG1 calculates the bandwidth value (50GE) of the link from itself to the next hop (ASG1) and the minimum value 20GE of the received bandwidth (20GE), and regenerates the route advertisement message for delivery to the ASG 3. ASG3 calculates the bandwidth value (40GE) of the link from itself to the next hop (RSG1) and the minimum 20GE of the received bandwidth (20GE), and regenerates the route advertisement message for delivery to CSG 1. CSG1 calculates the bandwidth value (10GE) of the link from itself to the next hop (ASG3) and the minimum value 10GE of the received bandwidth (20GE), and CSG1 obtains the minimum bandwidth of 10GE on the route CSG1 → ASG3 → RSG1 → ASG1 → CPE.

Similarly, when the ASG2 transfers the MAC address of the destination node, the MAC address carries the link bandwidth information 20GE from the egress interface of the ASG2 to the CPE, records the information in the route advertisement message, and transfers the route advertisement message to the RSG 2. The RSG2 calculates the bandwidth value (40GE) of the link from itself to the next hop (ASG2) and the minimum value 20GE of the received routing bandwidth (20GE), and regenerates the route advertisement message to be transferred to the ASG 4. ASG4 calculates the bandwidth value (30GE) of the link from itself to the next hop (RSG2) and the minimum value 20GE of the received bandwidth (20GE), and regenerates the route advertisement message for delivery to CSG 1. CSG1 calculates the minimum value 20GE of the bandwidth (20GE) and the bandwidth (25GE) received for the link between itself and the next hop (ASG4), and CSG1 gets the minimum bandwidth value 20GE on the route CSG1 → ASG4 → RSG2 → ASG2 → CPE.

Based on the above two procedures, CSG1 may obtain a minimum bandwidth for each of the two routes. The ratio between the load sharing weights of the two routes can thus be set to 1: and 2, achieving the purpose of carrying out non-equivalent load sharing based on the routing bandwidth.

In addition, for the communication network shown in fig. 5, all routers implement routing interworking. BGP neighbor relation is established between RSG1/2, ASG1/2 and ASG3/4, and BGP neighbor relation is established between ASG3/4 and CSG. In EVPN, a route notification message is transmitted through BGP, and the BGP AIGP function is expanded on a router, so that the router can carry bandwidth information hop by hop through the route notification message. As shown in fig. 5, when the EVPN remote router ASG1/2 device advertises, through BGP hop-by-hop based on a route advertisement message, the MAC address of a destination node to which the CPE is connected, the route advertisement message is extended to carry hop-by-hop link bandwidth information, that is, bandwidth information of an iterated next-hop device is extended to the route advertisement message every time the route advertisement message passes through one device. When the route notification message is transmitted to the next device, the next device takes the bandwidth of the link between itself and the next hop and the relatively small bandwidth between the bandwidth carried in the route notification message as the bandwidth information to be notified to the next device. As shown in fig. 5, when ASG1 transfers the route advertisement packet in the head-to-branch direction (i.e. the direction from CPE to CSG 1), ASG 3526 — > carries the link bandwidth between ASG1 — > CPEs to RSG1, RSG1 calculates the min (RSG1 — > ASG1, ASG1 — > CPEs) bandwidth to be transferred to ASG3, and ASG3 also calculates the smaller bandwidth value to be transferred to CSG 1. The transfer process of ASG2 is similar to ASG1 and will not be repeated here. The CSG1 finally calculates the bandwidth ratio of the two routes as the weight of the non-equivalent load sharing.

Optionally, the bandwidth of the link from the second forwarding node to the destination node in the first route carried in the first route advertisement message may also refer to a bandwidth of a link between each two adjacent forwarding nodes on the link between the second forwarding node and the destination node. In this scenario, each forwarding node does not need to compare the bandwidth carried in the route advertisement message with the bandwidth between itself and the next hop node, and only needs to continuously add the bandwidth of the link between itself and the next hop node in the route advertisement message, and finally the first forwarding node calculates the minimum bandwidth on each link from itself to the destination node in a unified manner, so as to obtain the minimum bandwidth on the first route. The implementation mode can reduce the operation time of each forwarding node, but the routing notification message is easy to be larger, thereby causing the waste of network resources.

The above explains the route advertisement message by taking the bandwidth of the route as the minimum value of the bandwidth of each link included in the route as an example. If the bandwidth of the route is the average value of the bandwidths of the links included in the route, each node may also issue the route advertisement message in the manner described above, and details thereof will not be described here.

Fig. 6 is a schematic diagram of a format of a route advertisement message provided in request for comments (RFC) 7311. The contents of this document and relevant portions of this document are generally incorporated by reference into this document as if reproduced in their entirety, to the extent that any conflict or conflict arises between these descriptions and the present document, the present description shall control. As shown in fig. 6, the route advertisement packet is an AIGP TLV, where the type of the AIGP TLV is defined as 1, the length of the AIGP TLV is defined as 11, and the value is used to carry the advertised MAC address and the accumulated link cost value of the destination node reached by the router itself. The meaning of type definition 1 and the definition of length definition 11 can be explained in RFC7311, and are not explained in detail here.

Therefore, in a possible implementation manner, as shown in fig. 7, a sub-TLV (sub-TLV) may be newly added in the route advertisement packet of RFC7311, and for the first route advertisement packet sent by the second forwarding node to the first forwarding node, the newly added sub-TLV in the first route advertisement packet is used to carry the bandwidth of the link from the second forwarding node to the destination node in the first route. The type of the newly added sub-TLV may be set to 2, the length may be set to 11, and the value may multiplex a maximum link bandwidth (maximum link bandwidth) value in the IGP sub-TLV. It should be noted that although the value of the newly added sub-TLV may multiplex the maximum link width value in the IGP sub-TLV, the bandwidth of the link carried by the newly added sub-TLV may be the minimum bandwidth on the link, may also be the average bandwidth on the link, or may also be the bandwidth between each adjacent forwarding node included in the link.

It should be noted that fig. 7 is only a schematic diagram of a possible format of the route advertisement packet to which the new sub TLV is added, and does not limit the format of the route advertisement packet provided in the embodiment of the present application.

Furthermore, currently, there is a sub-TLV definition related to the link bandwidth in RFC5305 in the ISIS protocol, so that the first forwarding node can collect the bandwidth on the link from itself to the next-hop node through the sub-TLV for the link bandwidth. After collecting the bandwidth on the link from the node to the next hop through RFC5305, the route advertisement message can be issued based on RFC 7311. And will not be described in detail herein.

The above description is explained by taking the first forwarding node itself to determine the bandwidth of each route as an example. In another possible implementation manner, the bandwidth of each route may also be determined by the control node, then the control node issues the bandwidth of each route to the first forwarding node, and then the first forwarding node determines the load sharing weight of each route based on the bandwidth of each route. The implementation of the control node determining the bandwidth of each route will be described in detail in the embodiment shown in fig. 8, which will not be described herein.

Step 402: and the first forwarding node determines the load sharing weight of each route according to the bandwidths of the routes.

The implementation of step 402 has already been described in detail in the embodiment shown in fig. 3, and will not be repeated here.

Furthermore, as can be seen from the above explanation in step 303 in fig. 3, the bandwidth of the link may be the reserved bandwidth of the link or the remaining bandwidth of the link. In addition, when the bandwidth of the link is the link residual bandwidth, since the traffic on the link may change in real time, the link residual bandwidth of the link may also change dramatically, and in this case, the bandwidth on each route also changes dynamically, so that the load sharing weight of each route may be correspondingly dynamically adjusted, so that the adjusted load sharing weight better meets the requirement of the network.

In one possible implementation manner, the implementation process of dynamically adjusting the load sharing weight may be: for a first route of the routes, the second forwarding node may be configured to periodically issue route advertisement messages, such that the first forwarding node may periodically determine the bandwidth of the first route. In this scenario, after determining the bandwidth of the first route each time, the first forwarding node may determine whether a change value between the currently determined bandwidth of the first route and the historical remaining bandwidth needs to be greater than a reference amplitude. If the load sharing weight of each route is not larger than the preset load sharing weight, the load sharing weight of each route is readjusted, and if the load sharing weight of each route is not larger than the preset load sharing weight, the load sharing weight of each route does not need to be adjusted. That is, the first forwarding node determines the load sharing weight of each route according to the bandwidth of each route only when the bandwidth of the first route meets the trigger condition. The trigger condition is that a variation value between the current bandwidth of the first route and the historical bandwidth of the first route is greater than a reference value, and the historical bandwidth of the first route is a bandwidth used when the load sharing weight of the first route is determined last time before.

In another possible implementation manner, the implementation process of dynamically adjusting the load sharing weight may be: when the second forwarding node determines that the variation value of the bandwidth of a link reaching a target node relative to the historical bandwidth is larger than the reference amplitude, the second forwarding node can be triggered to issue a route notification message to the first forwarding node, and when the first forwarding node receives the route notification message, the first forwarding node indicates that the bandwidth of the current first route meets the triggering condition, so that the load sharing weight can be directly adjusted based on the received route notification message.

For example, for a tail node on any route, if the remaining bandwidth of a link from the tail node to a destination node is changed drastically, a new round of route notification packet is triggered to be issued. To inform the first forwarding node to adjust the load sharing weight on each route in time.

That is, in the embodiment of the present application, the adjustment of the load sharing weight may be triggered by other forwarding nodes, or may be triggered by the first forwarding node.

In summary, in the embodiment of the present application, the route advertisement packet in the conventional technology is extended, so that the route advertisement packet can not only carry the destination address to be learned, but also carry the bandwidth of the link, thereby implementing the technical scheme in the embodiment of the present application for sharing traffic according to the bandwidth ratio to improve the utilization rate of the link bandwidth.

Fig. 8 is a flowchart of another method for obtaining load sharing weights according to an embodiment of the present application. The method is applied to a control node in a communication network. As shown in fig. 8, the method includes the following steps:

step 801: the control node determines the bandwidth of each of a plurality of routes, the plurality of routes being routes from a first forwarding node to a destination node, the first forwarding node being any one of the plurality of forwarding nodes.

In this embodiment of the present application, in order to enable a control node to configure load sharing weights of routes, in a possible implementation manner, each forwarding node in a communication network may report a link state packet to the control node, where the link state packet is carried on a route to a target node indicated by a certain destination address, and an identifier of a link between a reporter and a neighboring node and a bandwidth of the link, so that the control node may restore, based on the link state packet reported by each forwarding node, each route from a first forwarding node to the certain destination node and a bandwidth of each route, thereby configuring load sharing weights of each route based on the bandwidth of each route.

Thus, the implementation of step 801 may be: the control node receives link state messages reported by one or more forwarding nodes in each forwarding node, the link state messages carry target destination addresses and link bandwidths from the nodes reporting the link state messages to next-hop nodes on routes reaching the destination nodes indicated by the target destination addresses, and the control node determines a plurality of routes from a first forwarding node to the destination nodes indicated by the target addresses and the bandwidths of the routes in the plurality of routes according to the reported link state messages.

The bandwidth of each route may also be the minimum bandwidth on the route, so that when the control node determines any route, a minimum bandwidth may be determined according to the bandwidth of a link between any two adjacent forwarding nodes in each forwarding node forming the route, and the minimum bandwidth is used as the bandwidth of the route.

The bandwidth of each route may also be an average bandwidth on the route, so that when any route is determined by the control node, an average bandwidth may be determined according to the bandwidth of a link between any two adjacent forwarding nodes in each forwarding node forming the route, and the average bandwidth is used as the bandwidth of the route.

In addition, the bandwidth of the link between any two adjacent forwarding nodes may be a reserved bandwidth of the link or a remaining bandwidth of the link, which is not described in detail herein.

In a possible implementation manner, each forwarding node may report a link-state packet to the control node through an existing BGP link-state (LS) protocol. At this time, the link status packet includes a sub TLV, and the sub TLV is used for a bandwidth of a link bandwidth from the node reporting the link status packet to the next hop node. The specific format of the link status message will be described in detail in the following embodiments, and will not be described herein. Further, the control node may be a network control engineering NCE (network control engine) or a controller in other networks.

Further, as shown in fig. 5, in the EVPN technique, each forwarding node in the communication network includes an ASG and a CSG. In this scenario, each forwarding node may report a link state packet to the control node. Optionally, considering that the number of CSGs in the communication network is generally large, in order to avoid network congestion at the control node, the CSG may transfer a link state packet to the ASG based on the IGP, so as to report the link state packet to the control node through the ASG link state packet. At this time, the link state messages reported by the one or more forwarding nodes include a link state message reported by the ASG, and the link state message reported by the ASG not only includes a bandwidth of a link between the ASG and a next-hop node, but also carries a bandwidth of a link between the CSG and the next-hop node.

Fig. 9 is a schematic diagram of reporting a link status packet by each forwarding node according to an embodiment of the present application. As shown in fig. 9, all forwarding nodes (CSG, ASG, RSG) implement routing interworking via IGP (ISIS/OSPF). The ASG, the RSG and the control node establish BGP-LS intercommunication. The CSG may transfer, based on the IGP, the destination address of the packet that may be forwarded by the device, the identifier of the link from the device to the ASG on the route to the destination node indicated by the destination address, and the bandwidth information of the link to the ASG through the link state packet, so as to report, to the control node, the destination address, the identifier of the link from the device to the ASG, and the bandwidth information of the link through the ASG. The ASG and the RSG also send the destination address of the message which can be forwarded by the equipment and the bandwidth information of the link between the equipment and the next jump forwarding node on the route of the destination node indicated by the destination address to the control node through the link state message based on BGP-LS. That is, for ASG3, when uploading the bandwidth information of the link between the device and the next hop forwarding node, ASG3 also reports the bandwidth information of the link between CSG1 and ASG3 together. Similarly, the relevant forwarding flow of ASG4 may refer to ASG3, which is not described in detail herein.

After receiving the link state packets reported by each forwarding node, the control node may report the link state packets for multiple destination addresses, so that the control node may select a specific destination address (that is, a specific EVPN instance), that is, a destination address, and then perform route restoration through each link state packet carrying the destination address. As shown in fig. 9, the control node may restore detailed hop-by-hop information of two routes from the EVPN service CSG to the CPE based on the MAC address carrying the CPE or the MAC address of the node to which the CPE is connected. After the control node restores the two routes, the bandwidth of each of the two routes can be determined based on the bandwidth information of the links on the segments in the reported link state message, so that the minimum bandwidth of CSG1 → ASG3 → RSG1 → ASG1 → CPE is 10GE, and the minimum bandwidth of CSG1 → ASG4 → RSG2 → ASG2 → CPE is 20 GE. Therefore, the control node may determine that the load sharing ratio of the two routes is 1:2, and issue the sharing ratio to the CSG1, so as to achieve the purpose of non-equivalent sharing ratio through the CSG 1.

Therefore, for the EVPN shown in fig. 5, all devices transmit bandwidth information of the link to the control node based on the BGP-LS link bandwidth reporting function, and the control node can check the bandwidth condition of the link by restoring the EVPN service link information. The control node starts the load sharing weight calculation function of the EVPN non-equivalent route to determine the load sharing weight of each route, and dynamically issues the calculation result to the forwarding node, so that the overall control of the control node on the network bandwidth utilization is improved on the whole, the network utilization rate is optimized, and the defect of equivalent load sharing in the traditional technology is effectively overcome.

In addition, the link state packet may be a link state packet defined in the RFC7752 protocol, and since the sub-TLV capable of carrying the link bandwidth is defined in the link state packet defined in the RFC7752 protocol, the sub-TLV in the link state packet defined in the RFC7752 protocol may be directly used to report the link bandwidth information to the control node. Regarding the specific format of the link status message defined in the RFC7752 protocol and the sub-TLV that can carry the link bandwidth, the embodiment of the present application is not described in detail here.

Step 802: and the control node determines the load sharing weight of each route based on the bandwidth of each route.

The implementation of step 802 is described in detail in the embodiment shown in fig. 3, and the description is not repeated here.

It should be noted that, if the bandwidth of any route is determined based on the link residual bandwidth of each link included in the corresponding route, in this scenario, the implementation process of determining the load sharing weight of each route by the control node based on the bandwidth of each route in step 802 may be: and under the condition that the bandwidth of the first route meets the trigger condition, determining the load sharing weight of each route according to the bandwidth of each route. The triggering condition is that a variation value between the current bandwidth of the first route and the historical bandwidth of the first route is larger than a reference amplitude, and the historical bandwidth of the first route is a bandwidth used when the load sharing weight of the first route is determined last time before.

By the implementation mode, the load sharing weight of each route can be dynamically adjusted based on the change of the residual bandwidth. For specific content, reference may be made to detailed explanation of the load sharing weight of each route based on the change of the remaining bandwidth by the first forwarding node in the embodiment of fig. 3, which is not described herein again.

Step 803: and the control node issues the load sharing weight of each route to the first forwarding node.

Through the embodiment shown in fig. 8, the control node can uniformly issue the load sharing weight of each route, so as to control the bandwidth utilization rate of each route in the network.

In another possible implementation manner, after determining the bandwidth of each route for the first forwarding node, the control node may further issue each route bandwidth to the first forwarding node, and the first forwarding node determines the load sharing weight of each route based on the bandwidth of each route, which is not described in detail herein.

Next, the structure of each node in the communication network provided in the embodiment of the present application is explained.

Fig. 10 is a schematic structural diagram of a network device according to an embodiment of the present application, where the network device may be any forwarding node in a plurality of forwarding nodes included in a communication network in any embodiment of the present application, may be a head node, and may be an intermediate node where a plurality of routes exist for reaching a destination node. The network device 1000 may be a switch, a router, or other network device that forwards messages. In this embodiment, the network device 1000 includes: main control board 1010, interface board 1030, and interface board 1040. A plurality of interface boards may include a switch network board (not shown) for performing data exchange between the interface boards (the interface boards are also called line cards or service boards).

The main control board 1010 is used to complete functions of system management, device maintenance, protocol processing, and the like. The interface boards 1030 and 1040 are used to provide various service interfaces (e.g., POS interface, GE interface, ATM interface, etc.), and implement forwarding of messages. The main control board 1010 mainly has 3 types of functional units: the system comprises a system management control unit, a system clock unit and a system maintenance unit. The main control board 1010, the interface board 1030 and the interface board 1040 are connected to the system backplane through a system bus to realize intercommunication. The interface board 1030 includes one or more processors 1031 thereon. The processor 1031 is used for controlling and managing the interface board, communicating with a central processing unit on the main control board, and forwarding messages. The memory 1032 of the interface board 1030 is configured to store a forwarding table entry, and the processor 1031 forwards the packet by looking up the forwarding table entry stored in the memory 1032.

Interface board 1030 includes one or more network interfaces 1033 configured to receive the packet sent by the previous-hop node, and send the processed packet to the next-hop node according to the instruction of processor 1031. In this embodiment, the packet forwarded by the forwarding node may include three major types, where the first type is a data packet, the second type is a route advertisement packet, and the third type is a link state packet. When the forwarded packet is a data packet, the specific implementation process of the network interface 1033 may refer to step 301 in the embodiment of fig. 3, and is configured to receive the data packet to be forwarded. When the forwarded packet is a route advertisement packet, the specific implementation process of the network interface 1033 may refer to step 401 in the embodiment of fig. 4, and is configured to receive a route advertisement packet sent by a next hop node. Further, in a scenario that the forwarding node is an intermediate node, the one or more network interfaces 1033 are further configured to send the route advertisement packet related in step 401 to the forwarding node of the previous hop, so that each forwarding node can implement itself to configure the load sharing weight. In addition, when the forwarded message is a link state message, the one or more network interfaces 1033 are further configured to send the link state message involved in step 801 to the control node, so that the control node can issue the load sharing weight configured for the forwarding node through steps 801 to 803 in fig. 8. Processor 1031 may be configured to refer to step 401 and step 402 to determine load sharing weights on each route and the link status messages related in step 801, and specific functions of processor 1031 are not described in detail here.

It can be understood that, as shown in fig. 10, the present embodiment includes a plurality of interface boards, and a distributed forwarding mechanism is adopted, and operations on the interface board 1040 are substantially similar to those of the interface board 1030 in this mechanism, and are not described again for brevity. In addition, it is understood that the processor 1031 and/or 1041 in the interface board in fig. 10 may be a dedicated hardware or chip, such as a network processor or an application specific integrated circuit (application specific integrated circuit), to implement the above functions, which is a manner of processing the forwarding plane by using the dedicated hardware or chip. The specific implementation of the network processor using such dedicated hardware or chip can refer to the embodiment shown in fig. 11 below. In another embodiment, the processor 1031 and/or 1041 may also use a general-purpose processor, such as a general-purpose CPU, to implement the functions described above, and specifically refer to the embodiment shown in fig. 15 below.

In addition, it should be noted that there may be one or more main control boards, and when there are multiple main control boards, the main control board may include an active main control board and a standby main control board. The interface board may have one or more blocks, the more interface boards are provided the stronger the data processing capacity of the device. Under the condition of a plurality of interface boards, the plurality of interface boards can communicate through one or a plurality of exchange network boards, and when a plurality of interface boards exist, the redundant backup of load sharing can be realized together. Under the centralized forwarding architecture, the device does not need a switching network board, and the interface board undertakes the processing function of the service data of the whole system. Under the distributed forwarding architecture, the device comprises a plurality of interface boards, and can realize data exchange among the plurality of interface boards through the exchange network board, thereby providing large-capacity data exchange and processing capacity. Therefore, the data access and processing capabilities of network devices in a distributed architecture are greater than those of devices in a centralized architecture. Which architecture is specifically adopted depends on the specific networking deployment scenario, and is not limited herein.

In particular embodiments, Memory 1032 may be a read-only Memory (ROM) or other type of static storage device that may store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that may store information and instructions, an electrically erasable programmable read-only Memory (EEPROM), a compact disc read-only Memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), a magnetic disk or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 1032 may be a separate memory, and is connected to the processor 1031 through a communication bus. The memory 1032 may also be integrated with the processor 1031.

The memory 1032 is used for storing program codes, and is controlled by the processor 1031 to execute the method for forwarding packets provided by the above embodiments. Processor 1031 is operative to execute program code stored in memory 1032. One or more software modules may be included in the program code. The one or more software modules may be the software modules provided in the embodiments of fig. 12 or fig. 13 below.

In an exemplary embodiment, network interface 1033 may be any device using a transceiver or the like for communicating with other devices or communication networks, such as an ethernet, a Radio Access Network (RAN), a Wireless Local Area Network (WLAN), etc.

Fig. 11 is a schematic structural diagram of another network device provided in this embodiment of the present application, where the network device may be a first forwarding node in multiple forwarding nodes in a communication network provided in any of the foregoing embodiments of the present application, and the first forwarding node may be a head node, and may be an intermediate node where multiple routes exist for reaching a destination node. The network device 1100 may be a switch, router, or other network device that forwards messages. In this embodiment, the network device 1100 includes: main control board 1110, interface board 1130, switch board 1120, and interface board 1140. The main control panel 1110 is used to complete functions of system management, device maintenance, protocol processing, and the like. The switch board 1120 is used for completing data exchange between interface boards (interface boards are also called line cards or service boards). Interface boards 1130 and 1140 are used to provide various service interfaces (e.g., POS interface, GE interface, ATM interface, etc.) and to implement forwarding of data packets. The control plane is formed by the management units of the main control panel 1110 and the management units on the interface boards 1130 and 1140. The main control panel 1110 mainly has 3 types of functional units: the system comprises a system management control unit, a system clock unit and a system maintenance unit. The main control board 1110, the interface boards 1130 and 1140, and the switch board 1120 are connected to the system backplane through the system bus for intercommunication. The central processor 1131 on the interface board 1130 is used for controlling and managing the interface board and communicating with the central processor on the main control board. In a scenario that the forwarding packet is a data packet, the forwarding table entry memory 1134 on the interface board 1130 is used to store a forwarding table entry, and the network processor 1132 forwards the packet by looking up the forwarding table entry stored in the forwarding table entry memory 1134, which may be implemented as step 302 in the embodiment of fig. 3.

In addition, in a scenario where the forwarding packet is a route advertisement packet, the physical interface card 1133 of the interface board 1130 is configured to receive the route advertisement packet involved in step 401 in fig. 4. The specific implementation process is not described in detail herein.

The network processor 1132 is configured to determine the route advertisement packet related in step 401, where the route advertisement packet may be any route advertisement packet in the foregoing embodiment, and specific functions of the network processor 1132 are not described in detail here any more.

The processed route advertisement message may then also be sent to other neighboring forwarding nodes via the physical interface card 1133.

In addition, in a scenario of forwarding a message link advertisement message, the physical interface card 1133 is further configured to send the link state message related in step 801 to the control node, so that the control node can issue load sharing weights configured on each forwarding node through steps 801 to 803 in fig. 8, and specific implementation processes are not described in detail here.

It can be understood that, as shown in fig. 11, the present embodiment includes a plurality of interface boards, and a distributed forwarding mechanism is adopted, and operations on the interface board 1140 are substantially similar to those of the interface board 1130 in this mechanism, and are not described again for brevity. In addition, as described above, the functions of the network processors 1132 and 1142 in fig. 11 may be implemented by an application specific integrated circuit (application specific integrated circuit) instead.

In addition, it should be noted that there may be one or more main control boards, and when there are multiple main control boards, the main control board may include an active main control board and a standby main control board. The interface board may have one or more blocks, the more interface boards are provided the stronger the data processing capacity of the device. There may also be one or more physical interface cards on an interface board. The exchange network board may not have one or more blocks, and when there are more blocks, the load sharing redundancy backup can be realized together. Under the centralized forwarding architecture, the device does not need a switching network board, and the interface board undertakes the processing function of the service data of the whole system. Under the distributed forwarding architecture, the device can have at least one switching network board, and the data exchange among a plurality of interface boards is realized through the switching network board, so that the large-capacity data exchange and processing capacity is provided. Therefore, the data access and processing capabilities of network devices in a distributed architecture are greater than those of devices in a centralized architecture. Which architecture is specifically adopted depends on the specific networking deployment scenario, and is not limited herein.

Fig. 12 is a schematic structural diagram of a first forwarding node in a communication network according to an embodiment of the present application. The communication network includes a plurality of forwarding nodes, and the first forwarding node is any one of the plurality of forwarding nodes. As shown in fig. 12, the first forwarding node 1200 includes:

a receiving module 1201, configured to receive a message, where the message carries a destination address. The specific implementation manner may refer to step 301 in the embodiment of fig. 3.

A determining module 1202, configured to determine a plurality of routes according to the destination address, where the plurality of routes are routes from the first forwarding node to the destination node indicated by the destination address. The specific implementation manner may refer to step 302 in the embodiment of fig. 3.

An obtaining module 1203, configured to obtain a load sharing weight of each route in the multiple routes, where the load sharing weight of any route is used to indicate a probability that a corresponding route selected from the multiple routes forwards the packet. The specific implementation manner may refer to step 303 in the embodiment of fig. 3.

A sending module 1204, configured to select one route from multiple routes according to the load sharing weight of each route to forward the packet. The specific implementation manner may refer to step 304 in the embodiment of fig. 3.

Optionally, the load sharing weight of each route is associated with the bandwidth of each route.

Optionally, the ratio of the load sharing weight between any two routes in each route is consistent with the ratio of the bandwidth between any two routes.

Optionally, the bandwidth of any one route is a minimum value or an average value of bandwidths of links included in any one route.

Optionally, the bandwidth of each link is a link reserved bandwidth or a link residual bandwidth.

Optionally, the obtaining module is configured to:

and acquiring the load sharing weight of each route from the weight data stored locally.

Optionally, the obtaining module is further configured to obtain a bandwidth of each route;

the determining module is further used for determining the load sharing weight of each route according to the bandwidth of each route;

the first forwarding node further comprises a storage module for adding load sharing weights for each route in the weight data.

Optionally, the obtaining module is configured to:

receiving a first route notification message sent by a second forwarding node, wherein the second forwarding node is a next hop forwarding node of a first forwarding node on a first route in each route, the first route is any one of the routes, and the first route notification message carries a destination address and a bandwidth of a link from the second forwarding node to the destination node in the first route;

acquiring the bandwidth of a link from a first forwarding node to a second forwarding node;

and determining the bandwidth of the first route based on the bandwidth of the link between the first forwarding node and the second forwarding node and the bandwidth of the link carried in the route notification message.

Optionally, the bandwidth of the link carried by the first route advertisement message is the minimum bandwidth on the link from the second forwarding node to the destination node in the first route;

the acquisition module is used for:

and determining the bandwidth of a link between the first forwarding node and the second forwarding node and the smaller bandwidth in the bandwidth of the link carried in the first route notification message, and taking the smaller bandwidth as the bandwidth of the first route.

Optionally, the first route advertisement packet carries a subtype length value TLV, and the sub-TLV is configured to carry a bandwidth of a link from the second forwarding node to the destination node in the first route.

Optionally, the bandwidth of the link carried in the first route advertisement message is a remaining bandwidth on the link;

the acquisition module is used for:

acquiring the residual bandwidth of a link between a first forwarding node and a second forwarding node;

and determining the bandwidth of the first route based on the residual bandwidth of the link from the first forwarding node to the second forwarding node and the residual bandwidth carried in the route advertisement message.

Optionally, the determining module is configured to:

under the condition that the bandwidth of the first route meets the triggering condition, determining the load sharing weight of each route according to the bandwidth of each route;

the triggering condition is that a variation value between the current bandwidth of the first route and the historical bandwidth of the first route is larger than a reference amplitude, and the historical bandwidth of the first route is a bandwidth used when the load sharing weight of the first route is determined last time before.

Optionally, the first route advertisement packet carries a sub-TLV, and the sub-TLV is configured to carry a bandwidth of a link from the second forwarding node to the destination node in the first route.

Optionally, the receiving module is further configured to:

receiving load sharing weight of each route issued by a control node, wherein the load sharing weight of each route is determined by the control node based on the bandwidth of each route;

the first forwarding node further comprises a storage module for adding load sharing weights for each route in the weight data.

Optionally, the sending module is further configured to:

and reporting a link state message to the control node, wherein the link state message carries a destination address and a link bandwidth between a first forwarding node and a next hop node on a first route, and the first route is any one of a plurality of routes.

Alternatively,

the receiving module is also used for receiving the bandwidth of each route issued by the control node;

the determining module is further used for determining the load sharing weight of each route according to the bandwidth of each route;

the first forwarding node further comprises a storage module for adding load sharing weights for each route in the weight data.

To sum up, if there are multiple routes from the first forwarding node to the destination node indicated by the destination address carried in the packet, load sharing weights are configured for the multiple routes in advance, so that a route is selected to forward the packet based on the load sharing weights of the routes. Since the load sharing weight of any one route is used to indicate the probability of forwarding the packet by the corresponding route selected from the multiple routes, in this embodiment of the present application, the packet is forwarded based on the pre-configured load sharing weight instead of blindly performing equivalent load sharing. Therefore, the load sharing weight on each route can be customized based on the problems in the forwarding message in the equivalent load sharing process, so that the problems in the forwarding message in the equivalent load sharing process are avoided.

It should be noted that: in the first forwarding node provided in the foregoing embodiment, when forwarding a packet, only the division of each functional module is described as an example, and in practical applications, the function distribution may be completed by different functional modules as needed, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the first forwarding node and the method for forwarding a packet provided in the foregoing embodiments belong to the same concept, and specific implementation processes thereof are described in detail in the method embodiments and are not described herein again.

Fig. 13 is a schematic structural diagram of a first forwarding node in another communication network according to an embodiment of the present application. The communication network includes a plurality of forwarding nodes, and the first forwarding node is any one of the plurality of forwarding nodes. As shown in fig. 13, the first forwarding node 1300 includes:

an obtaining module 1301, configured to obtain bandwidths of multiple routes, where the multiple routes are routes from a first forwarding node to a destination node. The specific implementation manner may refer to step 401 in the embodiment of fig. 4.

The determining module 1302 is further configured to determine load sharing weights of the multiple routes according to bandwidths of the multiple routes, where the load sharing weight of any route is used to indicate a probability that a corresponding route selected from the multiple routes forwards a packet. The specific implementation manner may refer to step 402 in the embodiment of fig. 4.

Optionally, the obtaining module is configured to:

receiving a first route notification message sent by a second forwarding node, wherein the second forwarding node is a next hop forwarding node of a first forwarding node on a first route in a plurality of routes, the first route is any one of the plurality of routes, and the first route notification message carries a destination address and a bandwidth of a link from the second forwarding node to the destination node in the first route;

acquiring the bandwidth of a link from a first forwarding node to a second forwarding node;

and determining the bandwidth of the first route based on the bandwidth of the link between the first forwarding node and the second forwarding node and the bandwidth of the link carried in the route notification message.

Optionally, the bandwidth of any route is a minimum value of the bandwidth of each link included in any route;

the acquisition module is used for:

and determining the bandwidth of a link between the first forwarding node and the second forwarding node and the smaller bandwidth in the bandwidth of the link carried in the first route notification message, and taking the smaller bandwidth as the bandwidth of the first route.

Optionally, the bandwidth of the link carried in the first route advertisement message is a remaining bandwidth on the link;

the acquisition module is used for:

acquiring the residual bandwidth of a link between a first forwarding node and a second forwarding node;

and determining the bandwidth of the first route based on the residual bandwidth of the link from the first forwarding node to the second forwarding node and the residual bandwidth carried in the route advertisement message.

Optionally, the determining module is configured to:

under the condition that the bandwidth of the first route meets the triggering condition, determining the load sharing weight of each route according to the bandwidth of each route;

the triggering condition is that a variation value between the current bandwidth of the first route and the historical bandwidth of the first route is larger than a reference amplitude, and the historical bandwidth of the first route is a bandwidth used when the load sharing weight of the first route is determined last time before.

Optionally, the first route advertisement packet carries a subtype length value TLV, and the sub-TLV is configured to carry a bandwidth of a link from the second forwarding node to the destination node in the first route.

To sum up, if there are multiple routes from the first forwarding node to the destination node indicated by the destination address carried in the packet, load sharing weights are configured for the multiple routes in advance, so that a route is selected to forward the packet based on the load sharing weights of the routes. Since the load sharing weight of any one route is used to indicate the probability of forwarding the packet by the corresponding route selected from the multiple routes, in this embodiment of the present application, the packet is forwarded based on the pre-configured load sharing weight instead of blindly performing equivalent load sharing. Therefore, the load sharing weight on each route can be customized based on the problems in the forwarding message in the equivalent load sharing process, so that the problems in the forwarding message in the equivalent load sharing process are avoided.

It should be noted that: in the first forwarding node provided in the foregoing embodiment, when forwarding a packet, only the division of each functional module is described as an example, and in practical applications, the function distribution may be completed by different functional modules as needed, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the first forwarding node and the method for forwarding a packet provided in the foregoing embodiments belong to the same concept, and specific implementation processes thereof are described in detail in the method embodiments and are not described herein again.

Fig. 14 is a schematic structural diagram of a control node in a communication network according to an embodiment of the present application, where the communication network further includes multiple forwarding nodes. As shown in fig. 14, the control node 1400 includes:

a determining module 1401, configured to determine a plurality of routes from a first forwarding node to a destination node, and a bandwidth of each of the plurality of routes, where the first forwarding node is any one of the plurality of forwarding nodes. The specific implementation manner may refer to step 801 in the embodiment of fig. 8.

The determining module 1401 is further configured to determine a load sharing weight of each route based on a bandwidth of each route, where the load sharing weight of any route is used to indicate a probability that a corresponding route selected from the multiple routes forwards a packet. The specific implementation manner may refer to step 802 in the embodiment of fig. 8.

A sending module 1402, configured to issue load sharing weights of each route to the first forwarding node. The specific implementation manner may refer to step 803 in the embodiment of fig. 8.

Optionally, the determining module is configured to:

acquiring link state messages reported by one or more forwarding nodes in each forwarding node, wherein the link state messages carry destination addresses of destination nodes and bandwidths of links between the nodes reporting the link state messages and next-hop nodes on routes reaching the destination nodes;

and determining a plurality of routes from the first forwarding node to the destination node and the bandwidth of each route in the plurality of routes according to the reported link state messages.

Optionally, the bandwidth of any route is determined based on link remaining bandwidth of each link included in the corresponding route;

the determination module is to:

determining a change value between a current bandwidth of a first route in each route and a historical bandwidth of the first route, wherein the first route is any one of the routes, and the historical bandwidth of the first route refers to the bandwidth of the first route used when the load sharing weight of each route is determined last time before the current time;

and in the case that the variation value is larger than the reference amplitude, executing the step of determining the load sharing weight of each route based on the bandwidth of each route.

Optionally, each forwarding node includes an access service gateway ASG and a base station side gateway CSG, and the CSG is connected to the ASG;

the link state messages reported by the one or more forwarding nodes include a link state message reported by an ASG, and the link state message reported by the ASG also carries a bandwidth of a link between the CSG and the next-hop node.

To sum up, if there are multiple routes from the first forwarding node to the destination node indicated by the destination address carried in the packet, load sharing weights are configured for the multiple routes in advance, so that a route is selected to forward the packet based on the load sharing weights of the routes. Since the load sharing weight of any one route is used to indicate the probability of forwarding the packet by the corresponding route selected from the multiple routes, in this embodiment of the present application, the packet is forwarded based on the pre-configured load sharing weight instead of blindly performing equivalent load sharing. Therefore, the load sharing weight on each route can be customized based on the problems in the forwarding message in the equivalent load sharing process, so that the problems in the forwarding message in the equivalent load sharing process are avoided.

It should be noted that: in the foregoing embodiment, when issuing the load sharing weight, the control node is only illustrated by dividing the functional modules, and in practical application, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the control node and the method for forwarding a packet provided in the above embodiments belong to the same concept, and the specific implementation process thereof is described in detail in the method embodiments and will not be described herein again.

Fig. 15 is a schematic structural diagram of a network device according to an embodiment of the present invention. The network device may be any forwarding node in the above embodiments, or may be a controllable node. When the network device is a forwarding node, at this time, the network device 1500 may be a switch, a router, or other network devices that forward a packet, and at this time, specific functions of the network device 1500 may refer to the specific implementation manner of the first forwarding node in the embodiments in fig. 3 and fig. 4, which is not described herein again. When the network device is a control node, at this time, the specific function of the network device 1500 may refer to the specific implementation of the control node in the foregoing embodiment in fig. 8, and is not described herein again. Referring to fig. 15, the network device includes at least one processor 1501, a communication bus 1502, a memory 1503, and at least one communication interface 1504.

The processor 1501 may be a general-purpose Central Processing Unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to control the execution of programs in accordance with the present disclosure. When the network device is operating as any of a plurality of forwarding nodes in a communication network, the processor 1501 is configured to determine load sharing weights for the routes in the embodiments of fig. 3 and 4. When the network device is acting as a control node in a communication network, the processor 1501 is configured to determine load sharing weights for each route in the embodiment of fig. 8. The detailed description of the functions is omitted here.

The communication bus 1502 may include a path that conveys information between the aforementioned components.

The Memory 1503 may be a read-only Memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only Memory (EEPROM), a compact disc read-only Memory (CD-ROM) or other optical disk storage, optical disk storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), a magnetic disk or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to these. Memory 1503 may be stand-alone and coupled to processor 1501 via communication bus 1502. Memory 1503 may also be integrated with processor 1501.

The memory 1503 is used for storing program codes for executing the scheme of the application, and is controlled by the processor 1501 to execute the program codes. The processor 1501 is used to execute program codes stored in the memory 1503. One or more software modules may be included in the program code. The control node or any of the forwarding nodes in the above embodiments may determine the data for developing the application by one or more software modules in the program code in the processor 1501 and the memory 1503. The one or more software modules may be software modules provided in either of the embodiments of fig. 13 or fig. 14.

Communication interface 1504, using any transceiver or the like, is used for communicating with other devices or communication networks, such as ethernet, Radio Access Network (RAN), Wireless Local Area Networks (WLAN), etc. When the network device is used as any forwarding node of a plurality of forwarding nodes in a communication network, the communication interface 1504 is configured to receive a first route advertisement packet sent by a certain adjacent forwarding node, and send a second route advertisement packet to other adjacent forwarding nodes, where a specific implementation manner may refer to step 401 in the embodiment of fig. 4. Alternatively, the communication interface 1504 is configured to report a link status packet to the control node, and the specific implementation manner may refer to step 801 in the embodiment in fig. 8. Alternatively, the communication interface 1504 is configured to receive a data packet and forward the data packet based on a forwarding table entry. In addition, when the network device is used as a control node in a communication network, the communication interface 1504 is configured to receive a link state packet reported by a forwarding node, and a specific implementation manner may refer to step 801 in the embodiment in fig. 8.

In particular implementations, a network device may include multiple processors, such as processor 1501 and processor 1505 shown in FIG. 15, for example, as an example. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).

The network device may be a general-purpose network device or a special-purpose network device. In a specific implementation, the network device may be a desktop, a laptop, a network server, a Personal Digital Assistant (PDA), a mobile phone, a tablet, a wireless terminal device, a communication device, or an embedded device. The embodiment of the application does not limit the type of the network equipment.

It can be understood that, when the network device shown in fig. 15 is the first forwarding node in any of the above method embodiments, this embodiment may also be based on a virtual first forwarding node that is implemented by a general physical server in combination with a Network Function Virtualization (NFV) technology, where the virtual first forwarding node is a virtual router and may virtualize a second, a third, and N forwarding nodes (according to actual needs). The Virtual first forwarding node may be a Virtual Machine (VM) running a program for providing a messaging function, the VM being deployed on a hardware device (e.g., a physical server). A virtual machine refers to a complete computer system with complete hardware system functionality, which is emulated by software, running in a completely isolated environment. Through reading the application, a person skilled in the art can combine the NFV technology to virtually create a plurality of first nodes with the above functions on a general physical server. And will not be described in detail herein.

In the above embodiments, the implementation may be wholly or partly realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., Digital Versatile Disk (DVD)), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.

It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.

The above-mentioned embodiments are provided not to limit the present application, and any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

44页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:位于路由器或交换机内的电路以及应用于路由器或交换机的帧处理方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!