A routing processing method, device and system

By carrying the flow effective time parameter in the routing control message, the time-limited effective information is automatically disseminated among multiple network devices using the extended BGP UPDATE message. This solves the problem that the existing technology cannot achieve the dissemination of time-limited effective information among multiple network devices, and realizes the time-limited effective effect of traffic policies and the linkage control between devices.

CN111030929BActive Publication Date: 2024-11-22HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201911108921.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2015-10-16
Publication Date
2024-11-22
Estimated Expiration
2035-10-16

AI Technical Summary

Technical Problem

Existing routing protocols cannot disseminate time-limited effectiveness information across multiple network devices, failing to meet the requirement for time-limited effectiveness of traffic policies. In particular, configuration is cumbersome and error-prone in scenarios involving multiple routers working together.

Method used

By carrying flow activation time parameters in routing control messages, extended BGP UPDATE messages are used to automatically broadcast time-limited activation information to multiple network devices. It supports start time type, duration type, and periodic activation policy to achieve automatic broadcasting across AS domains.

Benefits of technology

It enables the automatic dissemination of time-limited effectiveness information across multiple network devices, reducing configuration workload, lowering maintenance difficulty, and meeting the time-limited effectiveness requirements of traffic policies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111030929B_ABST
    Figure CN111030929B_ABST
Patent Text Reader

Abstract

A routing processing method, device and system. The method includes: a first network device obtains a flow effective time parameter and a route associated with the flow effective time parameter, the flow effective time parameter includes a start time value and a duration value, and the flow effective time parameter is used to indicate that the route is valid within the time interval specified by the flow effective time parameter; the first network device processes the service traffic corresponding to the route within the specified time interval, and generates a routing control message, the routing control message carries the effective time parameter and the route; the first network device sends the routing control message to the second network device. Thereby, the automatic dissemination of time-limited effective information is realized, the demand for time-limited effective implementation of traffic policies is met, the configuration workload is reduced, and the maintenance difficulty is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] In modern network applications, there is a growing trend towards refined management. For example, users expect to control certain traffic in a specified time period. For example, in order to ensure reliable bandwidth for video transmission during the prime time at night, network operators want to limit the data traffic of ordinary Internet users, but not limit it during other time periods. To achieve this goal, it is necessary to deploy a time-limited service traffic control policy.

[0003] By deploying access control list (ACL) rules on routers, the effective time period of business traffic can be controlled. However, for application scenarios with multiple routers, ACL rules need to be configured on each router, which makes the configuration work cumbersome and prone to errors. In particular, for some business traffic control scenarios, all routers at the edge of the network need to be linked (for example: anti-distributed denial of service (Anti-DDOS) scenarios), which further increases the configuration workload.

[0004] Moreover, existing routing protocols do not support time-limited effectiveness. For example, the Border Gateway Protocol (BGP) is a dynamic routing protocol used between autonomous systems (AS), which supports the dissemination of Internet Protocol (IP) routing, Virtual Private Network (VPN) routing and Border Gateway Protocol flow specifications (BGP FlowSpec). BGP does not support the setting of effective time periods, and it is even more impossible to achieve the linkage of multiple routers in the network (for example, synchronous effectiveness, idle failure, etc.). Therefore, existing routing protocols cannot meet the requirements for time-limited effectiveness of traffic policies. Summary of the invention

[0005] In view of this, the embodiments of the present application provide a routing processing method, device and system to solve the problem that in the business traffic control scenario of multiple network devices, the time-limited effective information of multiple network devices cannot be disseminated, and the time-limited effective requirements for the implementation of traffic policies cannot be met.

[0006] The technical solutions provided in the embodiments of the present application are as follows.

[0007] In a first aspect, a routing processing method is provided, the method comprising:

[0008] The first network device acquires a flow effective time parameter and a route associated with the flow effective time parameter, wherein the flow effective time parameter includes a start time value and a duration value, and the flow effective time parameter is used to indicate that the route associated with the flow effective time parameter is valid within a time interval specified by the flow effective time parameter;

[0009] The first network device processes the service traffic corresponding to the route associated with the flow effective time parameter within the specified time interval, and generates a route control message, wherein the route control message carries the effective time parameter and the route associated with the flow effective time parameter;

[0010] The first network device sends the routing control message to the second network device.

[0011] Optionally, the first network device receives the flow effectiveness time parameter and a route associated with the flow effectiveness time parameter from a management device.

[0012] Optionally, the flow effective time parameter also includes a start time type, and the start time type is immediate, delayed, or scheduled; when the start time type is immediate, the start time of the specified time interval is the time when the first network device starts processing the routing control message; when the start time type is delayed, the flow effective time parameter also includes a delay value, and the start time of the specified time interval is the start time value plus the delay value; when the start time type is scheduled, the start time of the specified time interval is the start time value.

[0013] Optionally, the flow effective time parameter also includes a duration type, and the duration type is continuous effectiveness, absolute failure, or idle failure; when the duration type is continuous effectiveness, the duration value is an invalid value; when the duration type is absolute failure, the end time of the specified time interval is the start time of the specified time interval plus the duration value; when the duration type is idle failure, the end time of the specified time interval is the moment when the time for the service traffic corresponding to the route associated with the flow effective time parameter that has not been processed reaches the duration value.

[0014] Optionally, the flow effective time parameter also includes a duration type and a period value, the duration type is absolute failure, the period value is used to indicate that the route associated with the flow effective time parameter is periodically effective, and is used to indicate the duration of the period, the period value is greater than or equal to the duration value, wherein the start time of the periodic effectiveness is the start time value or the time when the first network device starts processing the routing control message, each period interval of the periodic effectiveness includes the specified time interval, the start time of the specified time interval is the start time of each period interval of the periodic effectiveness, and the duration of the specified time interval is the duration value.

[0015] Based on the above, the flow effective time parameter can implement more abundant time-limited effective strategies by defining the start time type, duration type, delay value and cycle value. For example, time-limited effective strategies such as delay control, cycle control or idle failure can be implemented, so that more complex linkage control can be implemented for multiple network devices.

[0016] Optionally, the routing control message further includes at least one of the following parameters: a flow identifier, a flow description, a flow creation time, and a revocation invalid routing mark.

[0017] Optionally, the routing control message is an extended BGP update UPDATE message, and the extended BGP UPDATE message includes network layer reachability information NLRI, and the NLRI carries the route associated with the flow effective time parameter, and the flow effective time parameter is used to indicate that the route associated with the flow effective time parameter is effective within a specified time interval.

[0018] Optionally, the extended BGP UPDATE message includes flow extension attributes, the flow extension attributes include a flow effective time field, the flow effective time field is used to carry the flow effective time parameters; the flow effective time field includes a flow effective time type field, a first length field, a start time value field and a duration value field; wherein the valid time type field is used to indicate the type of the flow effective time field, the first length field is used to indicate the length of the flow effective time field, the start time value field is used to carry the start time value, and the duration value field is used to carry the duration value.

[0019] Optionally, the flow effective time field also includes a start time type field, a duration type field and a delay value field, wherein the start time type field is used to indicate immediate effectiveness, delayed effectiveness or timed effectiveness, the duration type field is used to indicate continuous effectiveness, absolute failure or idle failure, and the delay value field is used to carry a delay value.

[0020] Optionally, the flow effective time field also includes a period value field, and the period value field is used to carry a period value.

[0021] Optionally, the flow extension attribute also includes a flow identification field, which includes a flow identification type field, a second length field, an autonomous system AS identification field, a router identification field and a flow identification value field, wherein the flow identification type field is used to indicate the type of the flow identification field, the second length field is used to indicate the length of the flow identification field, the AS identification field is used to indicate the AS where the first network device is located, the router identification field is used to identify the first network device, and the flow identification value field is used to carry the flow identification.

[0022] Optionally, the stream extension attribute also includes a stream description field, the stream description field includes a stream description type field, a third length field and a stream description value field, wherein the stream description type field is used to indicate the type of the stream description field, the third length field is used to indicate the length of the stream description field, and the stream description value field is used to carry the stream description.

[0023] Optionally, the stream extension attribute also includes a stream creation time field, and the stream creation time field includes a stream creation time type field, a fourth length field and a stream creation time value field, wherein the stream creation time type field is used to indicate the type of the stream creation time field, the fourth length field is used to indicate the length of the stream creation time field, and the stream creation time value field is used to carry the stream creation time value.

[0024] Optionally, the flow extension attribute also includes a revoke invalid route mark field.

[0025] Based on BGP, a routing control message is generated, so that the flow effective time parameter is carried in an extended BGP UPDATE message and propagated in multiple network devices. Moreover, automatic propagation across AS domains can be realized based on BGP.

[0026] In a second aspect, a routing processing method is provided, wherein the method comprises:

[0027] The second network device receives a routing control message from the first network device, the routing control message carrying a flow effective time parameter and a route associated with the flow effective time parameter, the flow effective time parameter including a start time value and a duration value, the flow effective time parameter being used to indicate that the route associated with the flow effective time parameter is valid within a time interval specified by the flow effective time parameter;

[0028] The second network device processes the service traffic corresponding to the route associated with the flow effective time parameter within the specified time interval;

[0029] The second network device sends the routing control message to other network devices, and the other network devices do not include the first network device.

[0030] Optionally, the flow effective time parameter also includes a start time type, and the start time type is immediate, delayed, or scheduled; when the start time type is immediate, the start time of the specified time interval is the time when the second network device starts processing the routing control message; when the start time type is delayed, the flow effective time parameter also includes a delay value, and the delay value is added to the start time value at the start time of the specified time interval; when the start time type is scheduled, the start time of the specified time interval is the start time value.

[0031] Optionally, the flow effective time parameter also includes a duration type, and the duration type includes continuous effectiveness, absolute failure, and idle failure; when the duration type is continuous effectiveness, the duration value is an invalid value; when the duration type is absolute failure, the end time of the specified time interval is the start time of the specified time interval plus the duration value; when the duration type is idle failure, the end time of the specified time interval is the moment when the time for the service traffic corresponding to the route associated with the flow effective time parameter that has not been processed reaches the duration value.

[0032] Optionally, the flow effective time parameter also includes a duration type and a period value, the duration type is absolute failure, the period value is used to indicate that the route associated with the flow effective time parameter is periodically effective, and is used to indicate the duration of the period, the period value is greater than or equal to the duration value, wherein the start time of the periodic effectiveness is the start time value or the time when the second network device starts processing the routing control message, each period interval of the periodic effectiveness includes the specified time interval, the start time of the specified time interval is the start time of each period interval of the periodic effectiveness, and the duration of the specified time interval is the duration value.

[0033] Optionally, the second network device modifies the flow effectiveness time parameter.

[0034] Optionally, the routing control message further includes at least one of the following parameters: a flow identifier, a flow description, a flow creation time, and a revocation invalid routing mark.

[0035] Optionally, the routing control message is an extended BGP update UPDATE message, and the extended BGP UPDATE message includes network layer reachability information NLRI, and the NLRI carries the route associated with the flow effective time parameter, and the flow effective time parameter is used to indicate that the route associated with the flow effective time parameter is effective within a specified time interval.

[0036] Optionally, the extended BGP UPDATE message includes flow extension attributes, the flow extension attributes include a flow effective time field, the flow effective time field is used to carry the flow effective time parameters; the flow effective time field includes a flow effective time type field, a first length field, a start time value field and a duration value field; wherein the valid time type field is used to indicate the type of the flow effective time field, the first length field is used to indicate the length of the flow effective time field, the start time value field is used to carry the start time value, and the duration value field is used to carry the duration value.

[0037] Optionally, the flow effective time field also includes a start time type field, a duration type field and a delay value field, wherein the start time type field is used to indicate immediate effectiveness, delayed effectiveness or timed effectiveness, the duration type field is used to indicate continuous effectiveness, absolute failure or idle failure, and the delay value field is used to carry a delay value.

[0038] Optionally, the flow effective time field also includes a period value field, and the period value field is used to carry a period value.

[0039] Optionally, the flow extension attribute also includes a flow identification field, which includes a flow identification type field, a second length field, an autonomous system AS identification field, a router identification field and a flow identification value field, wherein the flow identification type field is used to indicate the type of the flow identification field, the second length field is used to indicate the length of the flow identification field, the AS identification field is used to indicate the AS where the first network device is located, the router identification field is used to identify the first network device, and the flow identification value field is used to carry the flow identification.

[0040] Optionally, the stream extension attribute also includes a stream description field, the stream description field includes a stream description type field, a third length field and a stream description value field, wherein the stream description type field is used to indicate the type of the stream description field, the third length field is used to indicate the length of the stream description field, and the stream description value field is used to carry the stream description.

[0041] Optionally, the stream extension attribute also includes a stream creation time field, and the stream creation time field includes a stream creation time type field, a fourth length field and a stream creation time value field, wherein the stream creation time type field is used to indicate the type of the stream creation time field, the fourth length field is used to indicate the length of the stream creation time field, and the stream creation time value field is used to carry the stream creation time value.

[0042] Optionally, the flow extension attribute also includes a revoke invalid route mark field.

[0043] According to a third aspect, a first network device is provided, including:

[0044] an acquisition unit, configured to acquire a flow effective time parameter and a route associated with the flow effective time parameter, wherein the flow effective time parameter includes a start time value and a duration value, and the flow effective time parameter is used to indicate that the route associated with the flow effective time parameter is valid within a time interval specified by the flow effective time parameter;

[0045] A processing unit, configured to process the service flow corresponding to the route associated with the flow effective time parameter within the specified time interval, and generate a route control message, wherein the route control message carries the effective time parameter and the route associated with the flow effective time parameter;

[0046] A sending unit is used to send the routing control message to the second network device.

[0047] Optionally, the acquiring unit is configured to receive the flow effectiveness time parameter and a route associated with the flow effectiveness time parameter from a management device.

[0048] Optionally, the flow effective time parameter also includes a start time type, and the start time type is immediate, delayed, or scheduled; when the start time type is immediate, the start time of the specified time interval is the time when the processing unit starts processing the routing control message; when the start time type is delayed, the flow effective time parameter also includes a delay value, and the start time of the specified time interval is the start time value plus the delay value; when the start time type is scheduled, the start time of the specified time interval is the start time value.

[0049] Optionally, the flow effective time parameter also includes a duration type, and the duration type is continuous effectiveness, absolute failure, or idle failure; when the duration type is continuous effectiveness, the duration value is an invalid value; when the duration type is absolute failure, the end time of the specified time interval is the start time of the specified time interval plus the duration value; when the duration type is idle failure, the end time of the specified time interval is the moment when the time for the service traffic corresponding to the route associated with the flow effective time parameter that has not been processed reaches the duration value.

[0050] Optionally, the flow effective time parameter also includes a duration type and a period value, the duration type is absolute expiration, the period value is used to indicate that the route associated with the flow effective time parameter is periodically effective, and is used to indicate the duration of the period, the period value is greater than or equal to the duration value, wherein the start time of the periodic effectiveness is the start time value or the time when the processing unit starts processing the routing control message, each period interval of the periodic effectiveness includes the specified time interval, the start time of the specified time interval is the start time of each period interval of the periodic effectiveness, and the duration of the specified time interval is the duration value.

[0051] Optionally, the routing control message further includes at least one of the following parameters: a flow identifier, a flow description, a flow creation time, and a revocation invalid routing mark.

[0052] Optionally, the routing control message is an extended BGP update UPDATE message, and the extended BGP UPDATE message includes network layer reachability information NLRI, and the NLRI carries the route associated with the flow effective time parameter, and the flow effective time parameter is used to indicate that the route associated with the flow effective time parameter is effective within a specified time interval.

[0053] Optionally, the extended BGP UPDATE message includes flow extension attributes, the flow extension attributes include a flow effective time field, the flow effective time field is used to carry the flow effective time parameters; the flow effective time field includes a flow effective time type field, a first length field, a start time value field and a duration value field; wherein the valid time type field is used to indicate the type of the flow effective time field, the first length field is used to indicate the length of the flow effective time field, the start time value field is used to carry the start time value, and the duration value field is used to carry the duration value.

[0054] Optionally, the flow effective time field also includes a start time type field, a duration type field and a delay value field, wherein the start time type field is used to indicate immediate effectiveness, delayed effectiveness or timed effectiveness, the duration type field is used to indicate continuous effectiveness, absolute failure or idle failure, and the delay value field is used to carry a delay value.

[0055] Optionally, the flow effective time field also includes a period value field, and the period value field is used to carry a period value.

[0056] Optionally, the flow extension attribute also includes a flow identification field, which includes a flow identification type field, a second length field, an autonomous system AS identification field, a router identification field and a flow identification value field, wherein the flow identification type field is used to indicate the type of the flow identification field, the second length field is used to indicate the length of the flow identification field, the AS identification field is used to indicate the AS where the first network device is located, the router identification field is used to identify the first network device, and the flow identification value field is used to carry the flow identification.

[0057] Optionally, the stream extension attribute also includes a stream description field, the stream description field includes a stream description type field, a third length field and a stream description value field, wherein the stream description type field is used to indicate the type of the stream description field, the third length field is used to indicate the length of the stream description field, and the stream description value field is used to carry the stream description.

[0058] Optionally, the stream extension attribute also includes a stream creation time field, and the stream creation time field includes a stream creation time type field, a fourth length field and a stream creation time value field, wherein the stream creation time type field is used to indicate the type of the stream creation time field, the fourth length field is used to indicate the length of the stream creation time field, and the stream creation time value field is used to carry the stream creation time value.

[0059] Optionally, the flow extension attribute also includes a revoke invalid route mark field.

[0060] In a fourth aspect, a second network device is provided, including:

[0061] a receiving unit, configured to receive a routing control message from a first network device, wherein the routing control message carries a flow effective time parameter and a route associated with the flow effective time parameter, wherein the flow effective time parameter includes a start time value and a duration value, and the flow effective time parameter is used to indicate that the route associated with the flow effective time parameter is valid within a time interval specified by the flow effective time parameter;

[0062] A processing unit, configured to process the service flow corresponding to the route associated with the flow effective time parameter within the specified time interval;

[0063] A sending unit is used to send the routing control message to other network devices, and the other network devices do not include the first network device.

[0064] Optionally, the flow effective time parameter also includes a start time type, and the start time type is immediate, delayed, or scheduled; when the start time type is immediate, the start time of the specified time interval is the time when the processing unit starts processing the routing control message; when the start time type is delayed, the flow effective time parameter also includes a delay value, and the delay value is added to the start time value at the start time of the specified time interval; when the start time type is scheduled, the start time of the specified time interval is the start time value.

[0065] Optionally, the flow effective time parameter also includes a duration type, and the duration type includes continuous effectiveness, absolute failure, and idle failure; when the duration type is continuous effectiveness, the duration value is an invalid value; when the duration type is absolute failure, the end time of the specified time interval is the start time of the specified time interval plus the duration value; when the duration type is idle failure, the end time of the specified time interval is the moment when the time for the service traffic corresponding to the route associated with the flow effective time parameter that has not been processed reaches the duration value.

[0066] Optionally, the flow effective time parameter also includes a duration type and a period value, the duration type is absolute expiration, the period value is used to indicate that the route associated with the flow effective time parameter is periodically effective, and is used to indicate the duration of the period, the period value is greater than or equal to the duration value, wherein the start time of the periodic effectiveness is the start time value or the time when the processing unit starts processing the routing control message, each period interval of the periodic effectiveness includes the specified time interval, the start time of the specified time interval is the start time of each period interval of the periodic effectiveness, and the duration of the specified time interval is the duration value.

[0067] Optionally, the second network device further includes: a modification unit, configured to modify the flow effectiveness time parameter.

[0068] Optionally, the routing control message further includes at least one of the following parameters: a flow identifier, a flow description, a flow creation time, and a revocation invalid routing mark.

[0069] Optionally, the routing control message is an extended BGP update UPDATE message, and the extended BGP UPDATE message includes network layer reachability information NLRI, and the NLRI carries the route associated with the flow effective time parameter, and the flow effective time parameter is used to indicate that the route associated with the flow effective time parameter is effective within a specified time interval.

[0070] Optionally, the extended BGP UPDATE message includes flow extension attributes, the flow extension attributes include a flow effective time field, the flow effective time field is used to carry the flow effective time parameters; the flow effective time field includes a flow effective time type field, a first length field, a start time value field and a duration value field; wherein the valid time type field is used to indicate the type of the flow effective time field, the first length field is used to indicate the length of the flow effective time field, the start time value field is used to carry the start time value, and the duration value field is used to carry the duration value.

[0071] Optionally, the flow effective time field also includes a start time type field, a duration type field and a delay value field, wherein the start time type field is used to indicate immediate effectiveness, delayed effectiveness or timed effectiveness, the duration type field is used to indicate continuous effectiveness, absolute failure or idle failure, and the delay value field is used to carry a delay value.

[0072] Optionally, the flow effective time field also includes a period value field, and the period value field is used to carry a period value.

[0073] Optionally, the flow extension attribute also includes a flow identification field, which includes a flow identification type field, a second length field, an autonomous system AS identification field, a router identification field and a flow identification value field, wherein the flow identification type field is used to indicate the type of the flow identification field, the second length field is used to indicate the length of the flow identification field, the AS identification field is used to indicate the AS where the first network device is located, the router identification field is used to identify the first network device, and the flow identification value field is used to carry the flow identification.

[0074] Optionally, the stream extension attribute also includes a stream description field, the stream description field includes a stream description type field, a third length field and a stream description value field, wherein the stream description type field is used to indicate the type of the stream description field, the third length field is used to indicate the length of the stream description field, and the stream description value field is used to carry the stream description.

[0075] Optionally, the stream extension attribute also includes a stream creation time field, and the stream creation time field includes a stream creation time type field, a fourth length field and a stream creation time value field, wherein the stream creation time type field is used to indicate the type of the stream creation time field, the fourth length field is used to indicate the length of the stream creation time field, and the stream creation time value field is used to carry the stream creation time value.

[0076] Optionally, the flow extension attribute also includes a revoke invalid route mark field.

[0077] In a fifth aspect, a network system is provided, characterized in that the network system includes a first network device and a second network device, the first network device is the first network device described in the third aspect, and the second network device is any second network device described in the fourth aspect.

[0078] Through the implementation method of the present application, the first network device obtains the flow effective time parameter and the route associated with the flow effective time parameter, the flow effective time parameter includes a start time value and a duration value, and the flow effective time parameter is used to indicate that the route is valid within the time interval specified by the flow effective time parameter; the first network device sends the effective time parameter and the route to other network devices through the route control message. Thus, the automatic dissemination of the time-limited effective information is realized, the demand for the time-limited effective implementation of the traffic policy is met, the configuration workload is reduced, and the maintenance difficulty is reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] Figure 1 A flowchart of a routing processing method executed by a first network device according to an embodiment of the present application;

[0080] Figure 2 This is a schematic diagram of the format of the flow effective time field in an embodiment of the present application;

[0081] Figure 3 A schematic diagram of the format of the flow identification field of an embodiment of the present application;

[0082] Figure 4 A schematic diagram of the format of the flow description field of an embodiment of the present application;

[0083] Figure 5 A schematic diagram of the format of the stream creation time field in an embodiment of the present application;

[0084] Figure 6 A flowchart of a routing processing method executed by a second network device in an embodiment of the present application;

[0085] Figure 7 A flowchart of a routing processing method executed by a management device in an embodiment of the present application;

[0086] Figure 8 This is a schematic diagram of the application scenario structure of an embodiment of the present application;

[0087] Fig. 9 is a schematic structural diagram of a first network device according to an embodiment of the present invention;

[0088] Fig.10 A schematic diagram of the hardware structure of a first network device according to an embodiment of the present invention;

[0089] Fig.11 is a schematic structural diagram of a second network device according to an embodiment of the present invention;

[0090] Fig.12 A schematic diagram of the hardware structure of a second network device according to an embodiment of the present invention;

[0091] Fig.13 Schematic diagram of the structure of a network system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0092] The embodiment of the present application provides a routing processing method, device and system to solve the problem that in the business flow control scenario of multiple network devices, the time-limited effective information of multiple network devices cannot be spread, and the time-limited effective requirement for the flow policy cannot be met.

[0093] The following describes the embodiments in detail.

[0094] In order to make the purpose, features, and advantages of the invention of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly described below in conjunction with the drawings in the embodiments of the present application. Obviously, the embodiments described below are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0095] The terms "first", "second", "third" and "fourth" in the specification, claims and drawings of this application are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" are not exclusive. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, and may also include steps or units that are not listed.

[0096] It should be understood that the technical solutions of the embodiments of the present application can be applied to various routing protocol scenarios. For example, scenarios based on BGP dissemination of IP routing, VPN routing and BGP FlowSpec; routing scenarios based on Intermediate System-to-Intermediate System (IS-IS); and routing scenarios based on Open Shortest Path First (OSPF).

[0097] Figure 1 A flowchart of a routing processing method executed by a first network device. Figure 1 As shown, the first network device may be located in the first AS, and the first network device may be a border router (BR). Specifically, the BR may be a network forwarding device such as a router or a switch with three-layer functions. For example, in a network architecture scenario based on control-forwarding separation, a management device governs the first AS, and the management device controls the first network device through a control channel protocol. The management device may be a network management device or an application device, etc. The routing processing method performed by the first network device includes:

[0098] S102, the first network device obtains a flow effective time parameter and a route associated with the flow effective time parameter, wherein the flow effective time parameter includes a start time value and a duration value, and the flow effective time parameter is used to indicate that the route associated with the flow effective time parameter is valid within a time interval specified by the flow effective time parameter;

[0099] S104, the first network device processes the service traffic corresponding to the route associated with the flow effective time parameter within the specified time interval, and generates a route control message, wherein the route control message carries the effective time parameter and the route associated with the flow effective time parameter;

[0100] S106: The first network device sends the routing control message to the second network device.

[0101] In an embodiment, a flow valid time parameter refers to a valid time interval of a route associated with the flow valid time parameter. When a route is applied to a forwarding plane, it corresponds to a service flow. Therefore, the flow valid time parameter can also be regarded as a valid time interval of a flow associated with the flow valid time parameter. The flow valid time parameter and the route associated with the flow valid time parameter can be configured in the first network device or in a management device. Optionally, the specific implementation method of configuring the flow valid time parameter and the route associated with the flow valid time parameter in the first network device can be: configuring the flow valid time parameter and the route that needs to be effective within a limited time in the first network device by manual configuration. Alternatively, configuring the flow valid time parameter and the rule filter in the first network device by manual configuration, and filtering out the route that meets the filtering rule in the first network device according to the rule filter. The route can specifically be a route table item. The filtering rule can be an AS path, a community attribute, a prefix, etc., so as to determine the route that needs to be effective within a limited time according to the filtering rule. In addition, in a network architecture scenario based on control-forward separation, the above configuration process can be completed in the management device. Then, the management device sends the flow effective time parameter and the route associated with the flow effective time parameter to the first network device through an interface based on the control channel protocol. The control channel protocol can be a network configuration protocol (Netconf), a simple network management protocol (SNMP), a simple object access protocol (SOAP), or a representational state transfer application programming interface supporting hypertext transfer protocol (RESTful API over HTTP). The flow effective time parameter includes a starting time value (Starting time value) and a duration value (Duration value). The starting time value is used to indicate the effective start time of the route associated with the flow effective time parameter. The starting time value is usually expressed as a time difference from 0:00 on January 1, 1970, which can be accurate to microseconds or milliseconds, and 0 is an invalid value. The duration value is used to indicate the duration of validity of the route associated with the flow validity time parameter, which can be accurate to microseconds or milliseconds, and 0 is an invalid value.Therefore, the flow effective time parameter is used to indicate that the route associated with the flow effective time parameter is valid within the time interval specified by the flow effective time parameter. The start time of the specified time interval is the start time value, and the end time of the specified time interval is the start time value plus the duration value. For example, if the start time value is 18:00 on January 1, 2015, and the duration value is 120 minutes, then the expiration time of the route is 20:00 on January 1, 2015.

[0102] In an embodiment, the first network device generates a routing control message, and the routing control message carries the effective time parameter and the route associated with the flow effective time parameter. Optionally, the specific form of the routing control message can be multiple. For example, the routing control message is generated based on BGP, specifically an extended BGP update UPDATE message, and the extended BGP UPDATE message can be based on IP routing, VPN routing or BGP FlowSpec. For another example, the routing control message is generated based on IS-IS, specifically an extended IS-IS link state packet (Link State Packet, LSP). For another example, the routing control message is generated based on OSPF, specifically an extended OSPF link state update packet (LinkState Update Packet, LS Update Packet).

[0103] In an embodiment, the first network device processes the service traffic corresponding to the route associated with the flow effective time parameter according to the flow effective time parameter. When processing the route, the first network device checks the flow effective time parameter corresponding to the route. If the flow effective time parameter exists, the first network device will control the effective time of the route according to the flow effective time parameter and process the service traffic corresponding to the route. If the flow effective time parameter does not exist, the first network device will process it according to the ordinary route. For example, the first network device runs BGP, and the first network device optimizes the route according to the route optimization principle. If the preferred route has the corresponding flow effective time parameter, the effective time of the route will be controlled according to the flow effective time parameter, and the service traffic corresponding to the route will be processed. The route optimization principle is, for example: if the next hop of the route is unreachable, ignore this route; select the route with a larger local preference; select the route originated / aggregated by the local router; select the route with a shorter ASpath; select the route with the starting point type of the internal gateway protocol (International Group Program, IGP) and the external gateway protocol (Exterior Group Program, EGP) type in turn; select the route with a smaller multi-exit descriminator (MED); give priority to the route learned from the external border gateway protocol (External Border Gateway protocol, EBGP); give priority to the route with the lowest metric of the AS internal IGP; select the route with a smaller RouterID, etc. The above rules can be used alone or in combination.

[0104] In an embodiment, the first network device sends the routing control message to the second network device. The first network device may propagate the effective time parameter and the route associated with the flow effective time parameter to the second network device through the routing control message. After receiving the routing control message, the second network device may process the service traffic corresponding to the route associated with the flow effective time parameter according to the flow effective time parameter.

[0105] Optionally, the execution order of processing the service traffic corresponding to the route associated with the flow effective time parameter within the specified time interval in step S104, generating a route control message in step S104, and sending the route control message to the second network device in step 106 is not limited. For example, processing the service traffic corresponding to the route associated with the flow effective time parameter within the specified time interval can be performed before or after generating a route control message and sending the route control message to the second network device, or in parallel.

[0106] In the prior art, the existing routing protocols do not support time-limited effectiveness, and cannot meet the demand for time-limited effectiveness of traffic policies. Through ACL, only a single router can be deployed locally, and it cannot adapt to the scenario of multiple routers being linked.

[0107] The routing processing method provided in this embodiment generates a routing control message through a first network device, the routing control message carries the effective time parameter and the route associated with the flow effective time parameter, and transmits the routing control message to a second network device, thereby realizing automatic propagation of the flow effective time parameter in multiple network devices, meeting the requirement of time-limited effectiveness for traffic policy implementation, reducing configuration workload, and reducing maintenance difficulty.

[0108] Optionally, the step of the first network device acquiring the flow effective time parameter and the route associated with the flow effective time parameter includes: the first network device receives the flow effective time parameter and the route associated with the flow effective time parameter from a management device.

[0109] According to the above description of this embodiment, the flow effective time parameter can be locally configured in the first network device, and in the control-forwarding separation network architecture scenario, the flow effective time parameter can be configured in the management device, and then sent to the first network device by the management device. The configuration process of the flow effective time parameter can be static configuration by the network administrator, or automatic configuration according to a predetermined rule.

[0110] Optionally, the flow validation time parameter also includes a starting time type, and the starting time type is immediate validation, delayed validation, or timing validation; when the starting time type is immediate validation, the starting time of the specified time interval is the time when the first network device starts processing the routing control message; when the starting time type is delayed validation, the flow validation time parameter also includes a delay, and the delay value is added to the starting time value at the starting time of the specified time interval; when the starting time type is timing validation, the starting time of the specified time interval is the starting time value.

[0111] For example, when the start time type is the immediate effect, no matter what the start time value is, the start time value is defaulted to an invalid value, and the first network device takes the moment when it starts processing the routing control message as the start time. The moment when the routing control message is started refers to the moment when the network device receives the routing control message, parses and optimizes the route associated with the flow effective time parameter carried by the routing control message, and installs the route into the forwarding information base (FIB) of the forwarding plane. The immediate effect is equivalent to the prior art, in which a network device without time parameter control obtains the route and directly takes effect. Taking the traditional BGP UPDATE message as an example, by deploying and transmitting the BGP UPDATE message, the network device that receives the BGP UPDATE message will directly process the BGP UPDATE message. Therefore, setting the immediate effect in the start time type can also achieve the same effect as the prior art. Optionally, the end time of the specified time interval is the moment when the first network device starts processing the routing control message plus the duration value.

[0112] When the start time type is the delayed effectiveness, the start time of the specified time interval is the start time value plus the delay value. Correspondingly, the end time of the specified time interval is the sum of the start time value and the duration value plus the delay value. For example, the start time value is 18:00 on January 1, 2015, and the duration value is 120 minutes, then the end time (i.e., the expiration time of the route) is 20:00 on January 1, 2015. If the start time type is delayed effectiveness and the delay value is 30 minutes, then the actual start time value is 18:30 on January 1, 2015, and the actual end time (i.e., the expiration time of the route) is 20:30 on January 1, 2015.

[0113] When the start time type is the timed effectiveness, optionally, the end time of the specified interval is the start time value plus the duration value.

[0114] It is not restrictive and other start time types can be defined according to actual management requirements.

[0115] Optionally, the flow validation time parameter also includes a duration type (Duration Type), wherein the duration type is permanent validation, hard invalidation, or idle invalidation; when the duration type is permanent validation, the duration value is an invalid value; when the duration type is hard invalidation, the end time of the specified time interval is the start time of the specified time interval plus the duration value; when the duration type is idle invalidation, the end time of the specified time interval is the moment when the time for the service traffic corresponding to the route associated with the flow validation time parameter to be unprocessed reaches the duration value.

[0116] For example, when the duration type is the continuous effectiveness, no matter what the duration value is, the duration value will be defaulted to an invalid value, and the corresponding route will remain in effect until a route control message indicating that the route is revoked is received. Therefore, the continuous effectiveness can be equivalent to the prior art, in which a network device without time parameter control obtains a route and directly takes effect, and remains in a valid state. Taking the traditional BGP UPDATE message as an example, by deploying and transmitting the BGP UPDATE message, the network device that receives the BGP UPDATE message will directly process the BGPUPDATE message. Furthermore, the network device will always keep the route carried by the BGPUPDATE valid without receiving further instructions. Therefore, setting the continuous effectiveness in the duration type is compatible with the prior art implementation method of achieving continuous effectiveness of routes by directly deploying route control messages. Correspondingly, the start time of the specified time interval is the start time value.

[0117] When the duration type is the absolute expiration, the end time of the specified time interval is the start time of the specified time interval plus the duration value. Optionally, when the start time type is not limited or the start time type is timed, the start time of the specified time interval is the start time value, and the end time of the specified time interval is the start time value plus the duration value; when the start time type is delayed, the start time of the specified time interval is the start time value plus the delay value, and the end time of the specified time interval is the sum of the start time value and the duration value plus the delay value; when the start time type is immediate, the start time of the specified time interval is the time when the first network device starts processing the routing control message, and the end time of the specified time interval is the time when the first network device starts processing the routing control message plus the duration value. For example, the start time value is 18:00 on January 1, 2015, the duration value is 120 minutes, and the duration type is the absolute failure, then the route failure (ie, failure) time is 20:00 on January 1, 2015.

[0118] When the duration type is the idle failure, optionally, when the start time type is not limited or the start time type is timed effective, the start time of the specified time interval is the start time value; when the start time type is immediately effective, the start time of the specified time interval is the time when the first network device starts to process the routing control message. When the duration type is the idle failure, within the duration value, the service traffic corresponding to the route associated with the flow effective time parameter is not processed (it can be understood as: after the route takes effect, no service traffic corresponding to the route is generated and needs to be processed), and the route associated with the flow effective time parameter is invalid. Therefore, idle failure means that when the route is in a state of continuous effectiveness, when the idle time of the route reaches the duration value, the route triggers failure. For example, the start time value is 18:00 on January 1, 2015, the duration value is 30 minutes, and the duration type is the idle failure. After the route takes effect, if the idle time of the route (i.e., the duration of no service traffic corresponding to the route that needs to be processed) does not reach 30 minutes, the timer will restart; if the idle time of the route (i.e., the duration of no service traffic corresponding to the route that needs to be processed) reaches 30 minutes, the route trigger will fail. If the duration of the route not being applied to the corresponding service traffic does not reach 30 minutes, the route will continue to remain in effect until the duration of the route not being applied to the corresponding service traffic reaches 30 minutes and fails.

[0119] Optionally, the flow effective time parameter also includes a duration type and a period value (Period value), the duration type is absolute failure, the period value is used to indicate that the route associated with the flow effective time parameter is periodically effective, and is used to indicate the duration of the period, the period value is greater than or equal to the duration value, wherein the start time of the periodic effectiveness is the start time value or the time when the first network device starts processing the routing control message, each period interval of the periodic effectiveness includes the specified time interval, the start time of the specified time interval is the start time of each period interval of the periodic effectiveness, and the duration of the specified time interval is the duration value.

[0120] For example, when the cycle value is valid, the route associated with the flow effective time parameter will be repeatedly executed and effective for the cycle interval with the cycle value. According to the above, the start time of the first cycle interval is the start time value or the time when the first network device starts to process the routing control message, and the duration of the first cycle interval is the cycle value. Starting from the second cycle interval, the start time of each cycle interval is the end time of the previous cycle interval, and the duration is the cycle value. Each cycle interval includes a specified time interval, and the route associated with the flow effective time parameter will be repeatedly executed and effective for the cycle interval with the cycle value until a routing control message is received that the route is revoked. In addition, when the cycle value is less than the duration value, the cycle value will become invalid.

[0121] For example, when the duration type is absolute expiration, the period value is valid. For example, the start time value is 18:00 on January 1, 2015, the duration value is 30 minutes, and the period value is 120 minutes. The route takes effect at 18:00 on January 1, 2015, and expires at 18:30 on January 1, 2015. Since the period value is valid (the start time of the period value is 18:00 on January 1, 2015), the route takes effect for a new round at 20:00 on January 1, 2015, and the duration value is 30 minutes, that is, the route takes effect at 20:00 on January 1, 2015, and expires at 20:30 on January 1, 2015. Then, the route takes effect for a new round at 22:00 on January 1, 2015, and the above process is repeated.

[0122] Optionally, if the period value is smaller than the duration value, the first network device may use a notification message to notify the parameter sender that an error exists in the period value defined by the parameter sender, for example, use BGP notification to notify the parameter sender that an error exists in the period value defined by the parameter sender.

[0123] Based on the above, the flow effective time parameter can implement more abundant time-limited effective strategies by defining the start time type, duration type, delay value and cycle value. For example, time-limited effective strategies such as delay control, cycle control or idle failure can be implemented, so that more complex linkage control can be implemented for multiple network devices.

[0124] Optionally, the first network device modifies the flow effectiveness time parameter.

[0125] Specifically, the first network device may modify any parameter in the flow effectiveness time parameter, such as modifying the start time value, or changing the start time type.

[0126] Optionally, the routing control message further includes at least one of the following parameters: a flow identifier, a flow description, a flow creation time, and a revocation invalid routing mark.

[0127] For example, a flow identifier (Flow ID) is used to uniquely identify a flow and can be used in some control scenarios (such as fault diagnosis and logs) to simplify the identification of flows. There is no need to indicate the specific content and configuration rules of the flow, but the identification process is simplified through the flow identifier. Specifically, the flow identifier may include an AS identifier (AS ID), a router identifier (Router ID) and a flow identifier value (Flow ID value). Among them, the AS identifier is the identifier of the AS where the originating network device is located. In this embodiment, the AS identifier is the identifier of the AS where the first network device is located. The router identifier is the identifier of the originating network device. In this embodiment, the router identifier is the identifier of the first network device. AS ID+Router ID+Flow ID value can uniquely identify a flow.

[0128] A flow description is used to describe a routing control message, for example, to describe a time-limited effect or purpose of the routing control message.

[0129] The flow creation time refers to the creation time of the routing control message in the origin network device. In this embodiment, the origin network device refers to the first network device. The flow creation time can be used for diagnosis or log tracing.

[0130] Normally, the network device will not actively cancel the currently invalidated route, but only mark the route as invalid. In any case, the network device can passively cancel the invalidated route by receiving the route control message of canceling the route. The invalidated route cancellation mark is used to indicate whether to actively cancel the route that has completely expired. When the invalidated route cancellation mark is set, the network device will actively cancel the currently invalidated route.

[0131] According to the foregoing, the routing control message can be generated based on BGP, IS-IS or OSPF, and the following explains and describes the three application scenarios respectively.

[0132] Application scenario 1: The routing control message may be generated based on BGP.

[0133] Optionally, the routing control message is an extended BGP UPDATE message, and the extended BGP UPDATE message includes network layer reachability information NLRI, and the NLRI carries the route associated with the flow effective time parameter, and the flow effective time parameter is used to indicate that the route associated with the flow effective time parameter is effective within a specified time interval.

[0134] According to the above, the routing control message can be generated based on BGP, specifically an extended BGP UPDATE message, and the extended BGP UPDATE message can be based on IP routing, VPN routing or BGP FlowSpec. The extended BGP UPDATE message carries a flow effective time parameter and a route associated with the flow effective time parameter, and specifically encapsulates the route associated with the flow effective time parameter in the NLRI in the extended BGP UPDATE message. The flow effective time parameter is used to indicate that the route associated with the flow effective time parameter is effective within a specified time interval.

[0135] Optionally, the extended BGP UPDATE message includes flow extension attributes, the flow extension attributes include a flow effective time field, the flow effective time field is used to carry the flow effective time parameters; the flow effective time field includes a flow effective time type field, a first length field, a start time value field and a duration value field; wherein the valid time type field is used to indicate the type of the flow effective time field, the first length field is used to indicate the length of the flow effective time field, the start time value field is used to carry the start time value, and the duration value field is used to carry the duration value.

[0136] For example, currently BGP defines 16 attribute types, such as AS path, community attribute, and extended community attribute. This application extends BGP and defines a new attribute type, namely, flow extension attribute. The flow extension attribute is parallel to the existing 16 attribute types. The extended BGP UPDATE message includes flow extension attributes. The flow extension attribute includes a flow effective time field, such as Figure 2 As shown, Figure 2The format diagram of the flow effective time field. The flow effective time field can be defined in the type-length-value (TLV) format. The flow effective time field is used to carry the flow effective time parameter; the flow effective time field includes a flow effective time type field, a length field, a start time value field and a duration value field; wherein the effective time type field is used to indicate the type of the flow effective time field, the length field is used to indicate the length of the flow effective time field, the start time value field is used to carry the start time value, and the duration value field is used to carry the duration value. The start time value field and the duration value field both include two fields, seconds (second) and microseconds (micro second), and the final value is the sum of the values ​​in the two fields of seconds and microseconds. For example, the value of the start time value field is: start time value (seconds) + start time value (microseconds). Among them, non-restrictively, the flow effective time type field and the length field each occupy 2 bytes, and the start time value field and the duration value field each occupy 8 bytes.

[0137] Optionally, the flow effective time field also includes a start time type field, a duration type field and a delay value field, wherein the start time type field is used to indicate immediate effectiveness, delayed effectiveness or timed effectiveness, the duration type field is used to indicate continuous effectiveness, absolute failure or idle failure, and the delay value field is used to carry a delay value.

[0138] For example, Figure 2 As shown, the flow effective time field also includes a start time type field, a duration type field and a delay value field. In a non-limiting manner, the start time type field and the duration type field each occupy 2 bytes, and the delay value field occupies 8 bytes. The delay value field includes two fields, second and microsecond, and the final value is the sum of the values ​​in the second and microsecond fields.

[0139] The start time type field is used to indicate immediate effect, delayed effect, or scheduled effect. As shown in Table 1, the first column of Table 1 is the component type (Type), and the second column is the functional description. 0, 1, and 2 in the first column of Table 1 are only exemplary and can be specifically defined by standard organizations. Table 1 defines three commonly used types, which are non-limiting and other types can also be defined.

[0140] Table 1 Definition of start time type

[0141]

[0142] The duration type field is used to indicate continuous validity, absolute failure, or idle failure. As shown in Table 2, the first column of Table 2 is the component type (Type), and the second column is the functional description. 0, 1, and 2 in the first column of Table 2 are only exemplary and can be specifically defined by standard organizations. Table 2 defines three commonly used types, which are non-limiting and other types can also be defined.

[0143] Table 2 Definition of duration types

[0144]

[0145] Optionally, the flow effective time field also includes a period value field, and the period value field is used to carry a period value.

[0146] For example, Figure 2 As shown, the flow effective time field also includes a period value field. In a non-limiting manner, the period value field occupies 8 bytes. The period value field includes two fields, second and microsecond, and the final value is the sum of the values ​​in the second and microsecond fields.

[0147] The functions and effects of the flow effective time field and the fields included in the flow effective time field have been described in the previous part of this embodiment and will not be repeated here.

[0148] Optionally, the flow extension attribute also includes a flow identification field, which includes a flow identification type field, a second length field, an autonomous system AS identification field, a router identification field and a flow identification value field, wherein the flow identification type field is used to indicate the type of the flow identification field, the second length field is used to indicate the length of the flow identification field, the AS identification field is used to indicate the AS where the first network device is located, the router identification field is used to identify the first network device, and the flow identification value field is used to carry the flow identification.

[0149] For example, Figure 3 As shown, the flow identification field can be defined in TLV format. The flow identification field includes a flow identification type field, a length field, an autonomous system AS identification field, a router identification field and a flow identification value field. In a non-limiting manner, the flow identification type field and the length field each occupy 2 bytes, and the autonomous system AS identification field, the router identification field and the flow identification value field each occupy 4 bytes. In the implementation of BGP, the flow identification field is used to uniquely identify a FlowSpec rule or an IP prefix.

[0150] Optionally, the stream extension attribute also includes a stream description field, the stream description field includes a stream description type field, a third length field and a stream description value field, wherein the stream description type field is used to indicate the type of the stream description field, the third length field is used to indicate the length of the stream description field, and the stream description value field is used to carry the stream description.

[0151] For example, Figure 4 As shown, the stream extension attribute also includes a stream description field, and the stream description field can be defined in TLV format. The stream description field includes a stream description type field, a length field, and a stream description value field. In a non-limiting manner, the stream description type field and the length field each occupy 2 bytes, and the stream description value field is of variable length and does not exceed 256 bytes.

[0152] Optionally, the stream extension attribute also includes a stream creation time field, and the stream creation time field includes a stream creation time type field, a fourth length field and a stream creation time value field, wherein the stream creation time type field is used to indicate the type of the stream creation time field, the fourth length field is used to indicate the length of the stream creation time field, and the stream creation time value field is used to carry the stream creation time value.

[0153] For example, Figure 5 As shown, the stream extended attribute also includes a stream creation time field, and the stream creation time field can be defined in TLV format, and the stream creation time field includes a stream creation time type field, a length field, and a stream creation time value field. In a non-limiting manner, the stream creation time type field and the length field each occupy 2 bytes, and the stream creation time value field occupies 8 bytes. The period value field includes two fields, second and microsecond, and the final value is the sum of the values ​​in the second and microsecond fields.

[0154] Optionally, the flow extension attribute also includes a revoke invalid route mark field.

[0155] For example, the invalid route revocation mark field may be defined as an independent field, or may be carried in an existing field, such as carried in a flow effective time field.

[0156] The functions and effects of the flow identification field, the flow description field, the flow creation time field and the revoke invalid route mark field have been described in the previous part of this embodiment and will not be repeated here.

[0157] Based on BGP, a routing control message is generated, so that the flow effective time parameter is carried in an extended BGP UPDATE message and propagated in multiple network devices. Moreover, automatic propagation across AS domains can be realized based on BGP.

[0158] Application scenario 2: the routing control message may be generated based on IS-IS.

[0159] Optionally, the routing control message is an extended IS-IS LSP, and the extended IS-IS LSP includes a flow rule reachability (FlowSpec Reachability) field, and the FlowSpec Reachability field includes a flow effective time field, and the flow effective time field is used to carry the flow effective time parameter; the flow effective time field includes a flow effective time type field, a length field, a start time value field and a duration value field; wherein the effective time type field is used to indicate the type of the flow effective time field, the length field is used to indicate the length of the flow effective time field, the start time value field is used to carry the start time value, and the duration value field is used to carry the duration value.

[0160] Optionally, the flow effective time field also includes a start time type field, a duration type field and a delay value field, wherein the start time type field is used to indicate immediate effectiveness, delayed effectiveness or timed effectiveness, the duration type field is used to indicate continuous effectiveness, absolute failure or idle failure, and the delay value field is used to carry a delay value.

[0161] Optionally, the flow effective time field also includes a period value field, and the period value field is used to carry a period value.

[0162] For example, the extended IS-IS LSP includes a FlowSpec Reachability field, the FlowSpec Reachability field is in the TLV format, and the flow effective time field is carried in the FlowSpec Reachability field in the sub-TLV format. Figure 2 The format is similar to that shown in the figure, except that in the extended IS-IS LSP, the flow effective time type field and length field each occupy 1 byte. Similarly, the FlowSpec Reachability field can also carry a flow identification field, a flow description field, a flow creation time field, and a revocation invalid route marking field. The formats of the flow identification field, flow description field, and flow creation time field are the same as those in the figure. Figure 3-Figure 5 The formats shown are similar, with the only difference being that in the extended IS-IS LSP, the type field and the length field each occupy 1 byte.

[0163] Application scenario 3: the routing control message may be generated based on OSPF.

[0164] Optionally, the routing control message is an extended OSPF LS Update Packet, the extended OSPF LS Update Packet includes a flow rule opaque link state advertisement (FlowSpec Opaque Link State Advertisement, FlowSpec Opaque LSA) field, the FlowSpec Opaque LSA field includes a flow effective time field, the flow effective time field is used to carry the flow effective time parameter; the flow effective time field includes a flow effective time type field, a length field, a start time value field and a duration value field; wherein the effective time type field is used to indicate the type of the flow effective time field, the length field is used to indicate the length of the flow effective time field, the start time value field is used to carry the start time value, and the duration value field is used to carry the duration value.

[0165] Optionally, the flow effective time field also includes a start time type field, a duration type field and a delay value field, wherein the start time type field is used to indicate immediate effectiveness, delayed effectiveness or timed effectiveness, the duration type field is used to indicate continuous effectiveness, absolute failure or idle failure, and the delay value field is used to carry a delay value.

[0166] Optionally, the flow effective time field also includes a period value field, and the period value field is used to carry a period value.

[0167] For example, the extended OSPF LS Update Packet includes a FlowSpec Opaque LSA field, and the flow effective time field is carried in the FlowSpec Opaque LSA field in the format of TLV. Figure 2 Similarly, the FlowSpec Opaque LSA field can also carry a flow identification field, a flow description field, a flow creation time field, and a revocation invalid route mark field. The formats of the flow identification field, flow description field, and flow creation time field are the same as those of Figure 3-Figure 5 The format shown is the same.

[0168] Based on the solution of the embodiment, a routing control message is generated by a first network device, the routing control message carries the effective time parameter and the route associated with the flow effective time parameter, and the routing control message is transmitted to a second network device. Thus, the flow effective time parameter is automatically propagated in multiple network devices, meeting the requirement of time-limited effectiveness for traffic policy implementation, reducing configuration workload, and reducing maintenance difficulty.

[0169] Figure 6 Flow chart of the routing processing method executed by the second network device in the embodiment of the present application. This embodiment of the present application describes the routing processing method from the perspective of the second network device. Figure 6 As shown, the second network device performs the following steps:

[0170] S602, the second network device receives a routing control message from the first network device, the routing control message carrying a flow effective time parameter and a route associated with the flow effective time parameter, the flow effective time parameter including a start time value and a duration value, the flow effective time parameter being used to indicate that the route associated with the flow effective time parameter is valid within a time interval specified by the flow effective time parameter;

[0171] S604, the second network device processes the service traffic corresponding to the route associated with the flow effective time parameter within the specified time interval;

[0172] S606: The second network device sends the routing control message to other network devices, and the other network devices do not include the first network device.

[0173] Specifically, Figure 6 The routing processing method performed by the second network device shown is the same as that in the above-mentioned embodiment. Figure 1 The routing processing method performed by the first network device shown is similar, except that: the second network device does not directly configure the flow effective time parameter and the route associated with the flow effective time parameter, but receives a routing control message from the first network device, the routing control message carrying the flow effective time parameter and the route associated with the flow effective time parameter. After receiving the routing control message, the second network device, as a peer of the first network device, processes the service traffic corresponding to the route associated with the flow effective time parameter according to the flow effective time parameter, and spreads the routing control message to other network devices.

[0174] Optionally, the flow effective time parameter also includes a start time type, and the start time type is immediate, delayed, or scheduled; when the start time type is immediate, the start time of the specified time interval is the time when the second network device starts processing the routing control message; the time of starting to process the routing control message refers to: after the network device receives the routing control message, it parses and optimizes the route associated with the flow effective time parameter carried by the routing control message, and installs the route into the FIB of the forwarding plane; when the start time type is delayed, the flow effective time parameter also includes a delay value, and the delay value is added to the start time value at the start time of the specified time interval; when the start time type is scheduled, the start time of the specified time interval is the start time value.

[0175] Optionally, the flow effective time parameter also includes a duration type, and the duration type includes continuous effectiveness, absolute failure, and idle failure; when the duration type is continuous effectiveness, the duration value is an invalid value; when the duration type is absolute failure, the end time of the specified time interval is the start time of the specified time interval plus the duration value; when the duration type is idle failure, the end time of the specified time interval is the moment when the time for the service traffic corresponding to the route associated with the flow effective time parameter to be processed reaches the duration value.

[0176] Optionally, the flow effective time parameter also includes a duration type and a period value, the duration type is absolute failure, the period value is used to indicate that the route associated with the flow effective time parameter is periodically effective, and is used to indicate the duration of the period, the period value is greater than or equal to the duration value, wherein the start time of the periodic effectiveness is the start time value or the time when the second network device starts processing the routing control message, each period interval of the periodic effectiveness includes the specified time interval, the start time of the specified time interval is the start time of each period interval of the periodic effectiveness, and the duration of the specified time interval is the duration value.

[0177] Optionally, the second network device modifies the flow effectiveness time parameter.

[0178] Optionally, the routing control message further includes at least one of the following parameters: a flow identifier, a flow description, a flow creation time, and a revocation invalid routing mark.

[0179] Optionally, the routing control message is an extended BGP update UPDATE message, and the extended BGP UPDATE message includes network layer reachability information NLRI, and the NLRI carries the route associated with the flow effective time parameter, and the flow effective time parameter is used to indicate that the route associated with the flow effective time parameter is effective within a specified time interval.

[0180] Optionally, the extended BGP UPDATE message includes flow extension attributes, the flow extension attributes include a flow effective time field, the flow effective time field is used to carry the flow effective time parameters; the flow effective time field includes a flow effective time type field, a first length field, a start time value field and a duration value field; wherein the valid time type field is used to indicate the type of the flow effective time field, the first length field is used to indicate the length of the flow effective time field, the start time value field is used to carry the start time value, and the duration value field is used to carry the duration value.

[0181] Optionally, the flow effective time field also includes a start time type field, a duration type field and a delay value field, wherein the start time type field is used to indicate immediate effectiveness, delayed effectiveness or timed effectiveness, the duration type field is used to indicate continuous effectiveness, absolute failure or idle failure, and the delay value field is used to carry a delay value.

[0182] Optionally, the flow effective time field also includes a period value field, and the period value field is used to carry a period value.

[0183] Optionally, the flow extension attribute also includes a flow identification field, which includes a flow identification type field, a second length field, an autonomous system AS identification field, a router identification field and a flow identification value field, wherein the flow identification type field is used to indicate the type of the flow identification field, the second length field is used to indicate the length of the flow identification field, the AS identification field is used to indicate the AS where the first network device is located, the router identification field is used to identify the first network device, and the flow identification value field is used to carry the flow identification.

[0184] Optionally, the stream extension attribute also includes a stream description field, the stream description field includes a stream description type field, a third length field and a stream description value field, wherein the stream description type field is used to indicate the type of the stream description field, the third length field is used to indicate the length of the stream description field, and the stream description value field is used to carry the stream description.

[0185] Optionally, the stream extension attribute also includes a stream creation time field, and the stream creation time field includes a stream creation time type field, a fourth length field and a stream creation time value field, wherein the stream creation time type field is used to indicate the type of the stream creation time field, the fourth length field is used to indicate the length of the stream creation time field, and the stream creation time value field is used to carry the stream creation time value.

[0186] Optionally, the flow extension attribute also includes a revoke invalid route mark field.

[0187] The specific implementation process of the routing processing method executed by the second network device can be found in the aforementioned Figure 1-Figure 5 Similarly, in the routing processing method executed by the second network device, the routing control message can also be generated based on IS-IS or OSPF, and the specific implementation method is described in the above embodiment.

[0188] Based on the solution of the embodiment, the second network device receives the routing control message, processes the routing control message, and transmits the routing control message to other network devices, thereby realizing the automatic propagation of the flow effective time parameter in multiple network devices, meeting the requirement of time-limited effectiveness for traffic policy implementation, reducing configuration workload, and lowering maintenance difficulty.

[0189] Figure 7 This is a flow chart of a routing processing method executed by a management device in an embodiment of the present application. This embodiment of the present application describes the routing processing method from the perspective of a management device. Figure 7 As shown, the management device performs the following steps:

[0190] S702: The management device sets a flow validity time parameter, where the flow validity time parameter includes a start time value and a duration value.

[0191] S704, the management device determines a route associated with the flow effective time parameter, where the flow effective time parameter is used to indicate that the route associated with the flow effective time parameter is effective within a time interval specified by the flow effective time parameter;

[0192] S706: The management device sends the flow validity time parameter and the route associated with the flow validity time parameter to the first network device.

[0193] Specifically, in a network architecture scenario based on control-forwarding separation, the RIB is stored in a management device, and the flow effective time parameter is directly configured on the management device. Then the management device establishes a mapping relationship between the flow effective time parameter and the RIB according to the pre-set rules. According to the flow effective time parameter, the route associated with the flow effective time parameter is determined in the RIB. The management device sends the flow effective time parameter and the route associated with the flow effective time parameter to the first network device through an interface based on a control channel protocol. The control channel protocol can be Netconf, SNMP, SOAP or RESTful API over HTTP.

[0194] Based on the solution of the embodiment, the flow effective time parameter and the route associated with the flow effective time parameter are configured by the management device, and then the flow effective time parameter and the route associated with the flow effective time parameter are sent to the first network device. Thus, in the network architecture scenario where control and forwarding are separated, the centralized configuration and automatic dissemination of the flow effective time parameter information are realized.

[0195] Figure 8 This is a schematic diagram of the application scenario structure of an embodiment of the present application. Figure 8 The invention shows the application mode of using the extended BGP UPDATE message to carry the flow effective time parameter in the inter-domain flowspec injection scenario of Anti-DDOS.

[0196] Figure 8 The network shown includes the Internet, a service provider network, and an enterprise or Internet Data Center (IDC). An ordinary user PC5 accesses the server of the enterprise or IDC via the Internet border router R1, the service provider network border routers R2 and R3, the enterprise or IDC border router R5, the firewall (Fire Wall, FW) and the intrusion prevention system (IPS). Attacker PC1-PC4 may launch multi-point attacks from different locations. Attacker PC1-PC4 conducts traffic attacks on the enterprise or IDC server via R1, R2, R3, R5, FW and IPS.

[0197] When the server of an enterprise or IDC is attacked by DDOS, IPS or FW generates an attack traffic control policy after detecting the attack traffic. Since the attack traffic comes from multiple points such as PC1, PC2, PC3 and PC4, the duration of each attack point may be different. When configuring the attack traffic control policy, the duration type in the flow effective time parameter can be set to idle failure. Assuming that the idle failure is set to 30 minutes, this means that if no attack traffic is detected within 30 minutes, the attack stops and the attack traffic policy becomes invalid. IPS or FW sends the flow effective time parameter (start time type: effective immediately, duration type: idle failure) and the route associated with the flow effective time parameter to R5. R5 processes the attack traffic corresponding to the route associated with the flow effective time parameter according to the flow effective time parameter. And R5 generates an extended BGP UPDATE message, which carries the effective time parameter and the route associated with the flow effective time parameter. An EBGP session is established between R5 and R3, and R5 sends the extended BGP UPDATE message to R3. After receiving the extended BGP UPDATE message, R3 processes the attack traffic corresponding to the route associated with the flow effective time parameter according to the flow effective time parameter, and spreads the extended BGP UPDATE message to R4 and R2. In the same operation mode, R2 spreads the extended BGP UPDATE message to R1. In this way, with the spread of the extended BGP UPDATE message, the attack traffic is controlled and blocked on R5, R3, R4, R2, and R1 in turn. When idle failure takes effect, that is, as the attack traffic is blocked or stopped, the routes on R5, R3, R4, R2, and R1 become invalid one after another. Each border router can actively revoke the completely invalidated routes on its own device based on the configured revoke invalid route mark, or it can receive the revoke invalid route message from IPS or FW to passively revoke the completely invalidated routes.

[0198] Fig. 9 Schematic diagram of the structure of the first network device 900 according to an embodiment of the present invention. Fig. 9 The first network device shown in the figure can execute the corresponding steps executed by the first network device in the method of the above embodiment. Fig. 9 As shown, the first network device 900 includes an acquisition unit 902, a processing unit 904 and a sending unit 906, wherein:

[0199] The acquisition unit 902 is used to acquire a flow effective time parameter and a route associated with the flow effective time parameter, wherein the flow effective time parameter includes a start time value and a duration value, and the flow effective time parameter is used to indicate that the route associated with the flow effective time parameter is valid within a time interval specified by the flow effective time parameter;

[0200] The processing unit 904 is used to process the service flow corresponding to the route associated with the flow effective time parameter within the specified time interval, and generate a route control message, wherein the route control message carries the effective time parameter and the route associated with the flow effective time parameter;

[0201] The sending unit 906 is configured to send the routing control message to the second network device.

[0202] Optionally, the acquiring of the flow effective time parameter and the route associated with the flow effective time parameter includes: the acquiring unit 902 is configured to receive the flow effective time parameter and the route associated with the flow effective time parameter from a management device.

[0203] Optionally, the flow effective time parameter also includes a start time type, and the start time type is immediate, delayed, or scheduled; when the start time type is immediate, the start time of the specified time interval is the time when the processing unit starts processing the routing control message; when the start time type is delayed, the flow effective time parameter also includes a delay value, and the start time of the specified time interval is the start time value plus the delay value; when the start time type is scheduled, the start time of the specified time interval is the start time value.

[0204] Optionally, the flow effective time parameter also includes a duration type, and the duration type is continuous effectiveness or absolute time expiration absolute expiration or idle time expiration idle expiration; when the duration type is continuous effectiveness, the duration value is an invalid value; when the duration type is absolute time expiration absolute expiration, the end time of the specified time interval is the start time of the specified time interval plus the duration value; when the duration type is idle time expiration idle expiration, the end time of the specified time interval is the moment when the time for the service traffic corresponding to the route associated with the flow effective time parameter to be unprocessed reaches the duration value.

[0205] Optionally, the flow effective time parameter also includes a duration type and a period value, the duration type is the absolute expiration, the period value is used to indicate that the route associated with the flow effective time parameter is periodically effective, and is used to indicate the duration of the period, the period value is greater than or equal to the duration value, wherein the start time of the periodic effectiveness is the start time value or the time when the processing unit 904 starts processing the routing control message, each period interval of the periodic effectiveness includes the specified time interval, the start time of the specified time interval is the start time of each period interval of the periodic effectiveness, and the duration of the specified time interval is the duration value.

[0206] Optionally, the routing control message further includes at least one of the following parameters: a flow identifier, a flow description, a flow creation time, and a revocation invalid routing mark.

[0207] Optionally, the routing control message is an extended BGP update UPDATE message, and the extended BGP UPDATE message includes network layer reachability information NLRI, and the NLRI carries the route associated with the flow effective time parameter, and the flow effective time parameter is used to indicate that the route associated with the flow effective time parameter is effective within a specified time interval.

[0208] Optionally, the extended BGP UPDATE message includes flow extension attributes, the flow extension attributes include a flow effective time field, the flow effective time field is used to carry the flow effective time parameters; the flow effective time field includes a flow effective time type field, a first length field, a start time value field and a duration value field; wherein the valid time type field is used to indicate the type of the flow effective time field, the first length field is used to indicate the length of the flow effective time field, the start time value field is used to carry the start time value, and the duration value field is used to carry the duration value.

[0209] Optionally, the flow effective time field also includes a start time type field, a duration type field and a delay value field, wherein the start time type field is used to indicate immediate effectiveness, delayed effectiveness or timed effectiveness, the duration type field is used to indicate continuous effectiveness, absolute failure or idle failure, and the delay value field is used to carry a delay value.

[0210] Optionally, the flow effective time field also includes a period value field, and the period value field is used to carry a period value.

[0211] Optionally, the flow extension attribute also includes a flow identification field, which includes a flow identification type field, a second length field, an autonomous system AS identification field, a router identification field and a flow identification value field, wherein the flow identification type field is used to indicate the type of the flow identification field, the second length field is used to indicate the length of the flow identification field, the AS identification field is used to indicate the AS where the first network device is located, the router identification field is used to identify the first network device, and the flow identification value field is used to carry the flow identification.

[0212] Optionally, the stream extension attribute also includes a stream description field, the stream description field includes a stream description type field, a third length field and a stream description value field, wherein the stream description type field is used to indicate the type of the stream description field, the third length field is used to indicate the length of the stream description field, and the stream description value field is used to carry the stream description.

[0213] Optionally, the stream extension attribute also includes a stream creation time field, and the stream creation time field includes a stream creation time type field, a fourth length field and a stream creation time value field, wherein the stream creation time type field is used to indicate the type of the stream creation time field, the fourth length field is used to indicate the length of the stream creation time field, and the stream creation time value field is used to carry the stream creation time value.

[0214] Optionally, the flow extension attribute also includes a revoke invalid route mark field.

[0215] Fig. 9 The first network device shown can execute the corresponding steps executed by the first network device in the method of the above embodiment, thereby realizing automatic propagation of flow effective time parameters in multiple network devices, meeting the requirements for time-limited effectiveness of traffic policy implementation, reducing configuration workload, and lowering maintenance difficulty.

[0216] Fig.10 Schematic diagram of the hardware structure of the first network device 1000 according to an embodiment of the present invention. Fig.10 The first network device shown can execute the corresponding steps executed by the first network device in the method of the above embodiment. Optionally, the first network device can be a BR, and specifically, the BR can be a network forwarding device such as a router or a switch with three-layer functions.

[0217] like Fig.10 As shown, the first network device 1000 includes a processor 1001, a memory 1002, an interface 1003 and a bus 1004, wherein the interface 1003 can be implemented wirelessly or wired, and specifically can be a component such as a network card, and the above-mentioned processor 1001, memory 1002 and interface 1003 are connected via the bus 1004.

[0218] The interface 1003 may specifically include a transmitter and a receiver, which are used to support the first network device and the second network device and the controller in the above embodiment to send and receive information. As an example, the interface 1003 is used to support Figure 1 The processor 1001 is used to execute the processes S102 and S106. Figure 1 The processing process involving the first network device and / or other processes used for the technology described in this application. As an example, the processor 1001 is used to support Figure 1 The memory 1002 is used to store program codes and data of the first network device.

[0219] Understandably, Fig.10 Only a simplified design of the first network device is shown. In practical applications, the first network device may include any number of interfaces, processors, memories, etc., and all first network devices that can implement the present invention are within the protection scope of the present invention.

[0220] Fig.11 11 is a schematic diagram of the structure of the second network device 1100 according to an embodiment of the present invention. Fig.11 The second network device shown in the figure can execute the corresponding steps executed by the second network device in the method of the above embodiment. Fig.11 As shown, the second network device 1100 includes a receiving unit 1102, a processing unit 1104 and a sending unit 1106, wherein:

[0221] The receiving unit 1102 is configured to receive a routing control message from the first network device, the routing control message carrying a flow effective time parameter and a route associated with the flow effective time parameter, the flow effective time parameter including a start time value and a duration value, the flow effective time parameter being used to indicate that the route associated with the flow effective time parameter is valid within a time interval specified by the flow effective time parameter;

[0222] The processing unit 1104 is configured to process the service flow corresponding to the route associated with the flow effective time parameter within the specified time interval;

[0223] The sending unit 1106 is configured to send the routing control message to other network devices, where the other network devices do not include the first network device.

[0224] Optionally, the flow effective time parameter also includes a start time type, and the start time type is immediate, delayed, or scheduled; when the start time type is immediate, the start time of the specified time interval is the time when the processing unit starts processing the routing control message; when the start time type is delayed, the flow effective time parameter also includes a delay value, and the delay value is added to the start time value at the start time of the specified time interval; when the start time type is scheduled, the start time of the specified time interval is the start time value.

[0225] Optionally, the flow effective time parameter also includes a duration type, and the duration type includes continuous effectiveness or absolute time expiration absolute expiration or idle time expiration idle expiration; when the duration type is continuous effectiveness, the duration value is an invalid value; when the duration type is absolute time expiration absolute expiration, the end time of the specified time interval is the start time of the specified time interval plus the duration value; when the duration type is idle time expiration idle expiration, the end time of the specified time interval is the moment when the time for the service traffic corresponding to the route associated with the flow effective time parameter to be unprocessed reaches the duration value.

[0226] Optionally, the flow effective time parameter also includes a duration type and a period value, the duration type is absolute expiration, the period value is used to indicate that the route associated with the flow effective time parameter is periodically effective, and is used to indicate the duration of the period, the period value is greater than or equal to the duration value, wherein the start time of the periodic effectiveness is the start time value or the time when the processing unit 1104 starts processing the routing control message, each period interval of the periodic effectiveness includes the specified time interval, the start time of the specified time interval is the start time of each period interval of the periodic effectiveness, and the duration of the specified time interval is the duration value.

[0227] Optionally, the second network device further includes: a modification unit, configured to modify the flow effectiveness time parameter.

[0228] Optionally, the routing control message further includes at least one of the following parameters: a flow identifier, a flow description, a flow creation time, and a revocation invalid routing mark.

[0229] Optionally, the routing control message is an extended BGP update UPDATE message, and the extended BGP UPDATE message includes network layer reachability information NLRI, and the NLRI carries the route associated with the flow effective time parameter, and the flow effective time parameter is used to indicate that the route associated with the flow effective time parameter is effective within a specified time interval.

[0230] Optionally, the extended BGP UPDATE message includes flow extension attributes, the flow extension attributes include a flow effective time field, the flow effective time field is used to carry the flow effective time parameters; the flow effective time field includes a flow effective time type field, a first length field, a start time value field and a duration value field; wherein the valid time type field is used to indicate the type of the flow effective time field, the first length field is used to indicate the length of the flow effective time field, the start time value field is used to carry the start time value, and the duration value field is used to carry the duration value.

[0231] Optionally, the flow effective time field also includes a start time type field, a duration type field and a delay value field, wherein the start time type field is used to indicate immediate effectiveness, delayed effectiveness or timed effectiveness, the duration type field is used to indicate continuous effectiveness, absolute failure or idle failure, and the delay value field is used to carry a delay value.

[0232] Optionally, the flow effective time field also includes a period value field, and the period value field is used to carry a period value.

[0233] Optionally, the flow extension attribute also includes a flow identification field, which includes a flow identification type field, a second length field, an autonomous system AS identification field, a router identification field and a flow identification value field, wherein the flow identification type field is used to indicate the type of the flow identification field, the second length field is used to indicate the length of the flow identification field, the AS identification field is used to indicate the AS where the first network device is located, the router identification field is used to identify the first network device, and the flow identification value field is used to carry the flow identification.

[0234] Optionally, the stream extension attribute also includes a stream description field, the stream description field includes a stream description type field, a third length field and a stream description value field, wherein the stream description type field is used to indicate the type of the stream description field, the third length field is used to indicate the length of the stream description field, and the stream description value field is used to carry the stream description.

[0235] Optionally, the stream extension attribute also includes a stream creation time field, and the stream creation time field includes a stream creation time type field, a fourth length field and a stream creation time value field, wherein the stream creation time type field is used to indicate the type of the stream creation time field, the fourth length field is used to indicate the length of the stream creation time field, and the stream creation time value field is used to carry the stream creation time value.

[0236] Optionally, the flow extension attribute also includes a revoke invalid route mark field.

[0237] Fig.11 The second network device shown can execute the corresponding steps executed by the second network device in the method of the above embodiment, thereby realizing automatic propagation of flow effective time parameters in multiple network devices, meeting the requirements for time-limited effectiveness of traffic policy implementation, reducing configuration workload, and lowering maintenance difficulty.

[0238] Fig.12 Schematic diagram of the hardware structure of the second network device 1200 according to an embodiment of the present invention. Fig.12 The second network device shown can execute the corresponding steps executed by the second network device in the method of the above embodiment. Optionally, the second network device can be a BR. Specifically, the BR can be a network forwarding device such as a router or a switch with three-layer functions.

[0239] like Fig.12 As shown, the second network device 1200 includes a processor 1201, a memory 1202, an interface 1203 and a bus 1204, wherein the interface 1203 can be implemented wirelessly or wired, and specifically can be a component such as a network card, and the above-mentioned processor 1201, memory 1202 and interface 1203 are connected via the bus 1204.

[0240] The interface 1203 may specifically include a transmitter and a receiver, which are used to support the second network device to send and receive information with the first network device and other network devices in the above embodiment. As an example, the interface 1203 is used to support Figure 6 The processor 1201 is used to execute the processes S602 and S606. Figure 6 The processing process involving the second network device and / or other processes used for the technology described in this application. As an example, the processor 1201 is used to support Figure 6 The memory 1202 is used to store program codes and data of the second network device.

[0241] Understandably, Fig.12Only a simplified design of the second network device is shown. In practical applications, the second network device may include any number of interfaces, processors, memories, etc., and all second network devices that can implement the present invention are within the protection scope of the present invention.

[0242] In addition, if Fig.13 As shown, the embodiment of the present invention further provides a network system 1300. The network system may include the aforementioned Fig. 9 or Fig.10 The first network device and Fig.11 or Fig.12 The second network device provided by the corresponding embodiment. The first network device and the second network device are not described in detail here.

[0243] The steps of the method or algorithm described in conjunction with the disclosure of the present invention can be implemented in hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, register, hard disk, mobile hard disk, CD-ROM or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a user device. Of course, the processor and the storage medium can also be present in the user device as discrete components.

[0244] Those skilled in the art will appreciate that in one or more of the above examples, the functions described in the present invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented using software, the functions may be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium may be any available medium that a general or special-purpose computer can access.

[0245] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.

Claims

1. A routing processing method, characterized in that: The method comprises: The first network device acquires a flow effective time parameter and a route associated with the flow effective time parameter, wherein the flow effective time parameter includes a start time value and a duration value, and the flow effective time parameter is used to indicate that the route associated with the flow effective time parameter is valid within a time interval specified by the flow effective time parameter; The first network device generates a message, the message carrying the flow validity time parameter and a route associated with the flow validity time parameter; The first network device sends the message to the second network device, where the message instructs the second network device to process the service traffic corresponding to the route associated with the flow effective time parameter within the specified time interval.

2. The method according to claim 1, characterized in that The first network device acquires the flow validity time parameter and the routing step associated with the flow validity time parameter, including: The first network device receives the flow validity time parameter and a route associated with the flow validity time parameter from a management device.

3. The method according to claim 1 or 2, characterized in that: The flow effective time parameter also includes a start time type, and the start time type is immediate effect, delayed effect, or scheduled effect; When the start time type is immediately effective, the start time of the specified time interval is the time when the first network device starts processing the message; When the start time type is the delayed effectiveness, the flow effectiveness time parameter also includes a delay value, and the start time of the specified time interval is the start time value plus the delay value; When the start time type is the timed effectiveness, the start time of the specified time interval is the start time value.

4. The method according to claim 1 or 2, characterized in that: The flow validity time parameter also includes a duration type, and the duration type is continuous validity or absolute invalidation or idle invalidation; When the duration type is the continuously effective duration, the duration value is an invalid value; When the duration type is the absolute expiration, the end time of the specified time interval is the start time of the specified time interval plus the duration value; When the duration type is the idle failure, the end time of the specified time interval is the time when the time for which the service flow corresponding to the route associated with the flow effective time parameter is not processed reaches the duration value.

5. The method according to claim 1 or 2, characterized in that: The flow effective time parameter also includes a duration type and a period value, the duration type is absolute failure, the period value is used to indicate that the route associated with the flow effective time parameter is periodically effective, and is used to indicate the duration of the period, the period value is greater than or equal to the duration value, wherein the start time of the periodic effectiveness is the start time value or the time when the first network device starts processing the message, each period interval of the periodic effectiveness includes the specified time interval, the start time of the specified time interval is the start time of each period interval of the periodic effectiveness, and the duration of the specified time interval is the duration value.

6. The method according to claim 1 or 2, characterized in that: The message also includes at least one of the following parameters: a flow identifier, a flow description, and a revocation invalid routing mark.

7. The method according to claim 1 or 2, characterized in that: The message is an extended BGP update UPDATE message, and the extended BGP UPDATE message includes network layer reachability information NLRI, and the NLRI carries the route associated with the flow effective time parameter, and the flow effective time parameter is used to indicate that the route associated with the flow effective time parameter is effective within a specified time interval.

8. The method according to claim 7, characterized in that The extended BGP UPDATE message includes a flow extension attribute, wherein the flow extension attribute includes a flow effective time field, and the flow effective time field is used to carry the flow effective time parameter; The flow effective time field includes a flow effective time type field, a first length field, a start time value field and a duration value field; wherein the flow effective time type field is used to indicate the type of the flow effective time field, the first length field is used to indicate the length of the flow effective time field, the start time value field is used to carry the start time value, and the duration value field is used to carry the duration value.

9. The method according to claim 8, characterized in that The flow effective time field also includes a start time type field, a duration type field and a delay value field, wherein the start time type field is used to indicate immediate effectiveness, delayed effectiveness or timed effectiveness, the duration type field is used to indicate continuous effectiveness, absolute failure or idle failure, and the delay value field is used to carry a delay value.

10. The method according to claim 8 or 9, characterized in that: The flow effective time field also includes a period value field, and the period value field is used to carry a period value.

11. The method according to claim 8 or 9, characterized in that: The flow extension attribute also includes a flow identification field, which includes a flow identification type field, a second length field, an autonomous system AS identification field, a router identification field and a flow identification value field, wherein the flow identification type field is used to indicate the type of the flow identification field, the second length field is used to indicate the length of the flow identification field, the AS identification field is used to indicate the AS where the first network device is located, the router identification field is used to identify the first network device, and the flow identification value field is used to carry the flow identification.

12. The method according to claim 8 or 9, characterized in that: The stream extension attribute also includes a stream description field, which includes a stream description type field, a third length field and a stream description value field, wherein the stream description type field is used to indicate the type of the stream description field, the third length field is used to indicate the length of the stream description field, and the stream description value field is used to carry the stream description.

13. The method according to claim 8 or 9, characterized in that: The flow extended attribute also includes a revoke invalid route mark field.

14. The method according to any one of claims 1, 2, 8 and 9, characterized in that: The method further comprises: The first network device processes the service traffic corresponding to the route associated with the flow effective time parameter within the specified time interval.

15. A routing processing method, characterized in that: The method comprises: The second network device receives a message from the first network device, the message carrying a flow effective time parameter and a route associated with the flow effective time parameter, the flow effective time parameter including a start time value and a duration value, the flow effective time parameter being used to indicate that the route associated with the flow effective time parameter is valid within a time interval specified by the flow effective time parameter; The second network device processes the service traffic corresponding to the route associated with the flow effective time parameter within the specified time interval according to the message.

16. The method according to claim 15, characterized in that The flow effective time parameter also includes a start time type, and the start time type is immediate effect, delayed effect, or scheduled effect; When the start time type is immediately effective, the start time of the specified time interval is the time when the second network device starts processing the message; When the start time type is the delayed effectiveness, the flow effectiveness time parameter also includes a delay value, and the delay value is added to the start time value at the start time of the specified time interval; When the start time type is the timed effectiveness, the start time of the specified time interval is the start time value.

17. The method according to claim 15 or 16, characterized in that The flow validity time parameter also includes a duration type, and the duration type includes continuous validity, absolute invalidation, or idle invalidation; When the duration type is the continuously effective duration, the duration value is an invalid value; When the duration type is the absolute expiration, the end time of the specified time interval is the start time of the specified time interval plus the duration value; When the duration type is the idle failure, the end time of the specified time interval is the time when the time for which the service flow corresponding to the route associated with the flow effective time parameter is not processed reaches the duration value.

18. The method according to claim 15 or 16, characterized in that The flow effective time parameter also includes a duration type and a period value, the duration type is absolute failure, the period value is used to indicate that the route associated with the flow effective time parameter is periodically effective, and is used to indicate the duration of the period, the period value is greater than or equal to the duration value, wherein the start time of the periodic effectiveness is the start time value or the time when the second network device starts processing the message, each period interval of the periodic effectiveness includes the specified time interval, the start time of the specified time interval is the start time of each period interval of the periodic effectiveness, and the duration of the specified time interval is the duration value.

19. The method according to claim 15 or 16, characterized in that The method further includes: the second network device modifying the flow validity time parameter.

20. The method according to claim 15 or 16, characterized in that The message also includes at least one of the following parameters: a flow identifier, a flow description, and a revocation invalid routing mark.

21. The method according to claim 15 or 16, characterized in that The message is an extended BGP update UPDATE message, and the extended BGP UPDATE message includes network layer reachability information NLRI, and the NLRI carries the route associated with the flow effective time parameter, and the flow effective time parameter is used to indicate that the route associated with the flow effective time parameter is effective within a specified time interval.

22. The method according to claim 21, characterized in that The extended BGP UPDATE message includes a flow extension attribute, wherein the flow extension attribute includes a flow effective time field, and the flow effective time field is used to carry the flow effective time parameter; The flow effective time field includes a flow effective time type field, a first length field, a start time value field and a duration value field; wherein the flow effective time type field is used to indicate the type of the flow effective time field, the first length field is used to indicate the length of the flow effective time field, the start time value field is used to carry the start time value, and the duration value field is used to carry the duration value.

23. The method according to claim 22, characterized in that The flow effective time field also includes a start time type field, a duration type field and a delay value field, wherein the start time type field is used to indicate immediate effectiveness, delayed effectiveness or timed effectiveness, the duration type field is used to indicate continuous effectiveness, absolute failure or idle failure, and the delay value field is used to carry a delay value.

24. The method according to claim 22 or 23, characterized in that The flow effective time field also includes a period value field, and the period value field is used to carry a period value.

25. The method according to claim 22 or 23, characterized in that The flow extension attribute also includes a flow identification field, which includes a flow identification type field, a second length field, an autonomous system AS identification field, a router identification field and a flow identification value field, wherein the flow identification type field is used to indicate the type of the flow identification field, the second length field is used to indicate the length of the flow identification field, the AS identification field is used to indicate the AS where the first network device is located, the router identification field is used to identify the first network device, and the flow identification value field is used to carry the flow identification.

26. The method according to claim 22 or 23, characterized in that The stream extension attribute also includes a stream description field, which includes a stream description type field, a third length field and a stream description value field, wherein the stream description type field is used to indicate the type of the stream description field, the third length field is used to indicate the length of the stream description field, and the stream description value field is used to carry the stream description.

27. The method according to claim 22 or 23, characterized in that The flow extended attribute also includes a revoke invalid route mark field.

28. The method according to any one of claims 15-16, 22-23, characterized in that: The method further comprises: The second network device sends the message to other network devices, and the other network devices do not include the first network device.

29. A first network device, characterized in that: include: an acquisition unit, configured to acquire a flow effective time parameter and a route associated with the flow effective time parameter, wherein the flow effective time parameter includes a start time value and a duration value, and the flow effective time parameter is used to indicate that the route associated with the flow effective time parameter is valid within a time interval specified by the flow effective time parameter; A processing unit, configured to generate a message, wherein the message carries the effective time parameter and the route associated with the flow effective time parameter; The sending unit is used to send the message to the second network device, wherein the message instructs the second network device to process the service flow corresponding to the route associated with the flow effective time parameter within the specified time interval.

30. The first network device according to claim 29, characterized in that: The step of obtaining a flow effective time parameter and a route associated with the flow effective time parameter includes: The acquiring unit is configured to receive the flow effective time parameter and the route associated with the flow effective time parameter from a management device.

31. The first network device according to claim 29 or 30, characterized in that: The flow effective time parameter also includes a start time type, and the start time type is immediate effect, delayed effect, or scheduled effect; When the start time type is immediately effective, the start time of the specified time interval is the time when the processing unit starts processing the message; When the start time type is the delayed effectiveness, the flow effectiveness time parameter also includes a delay value, and the start time of the specified time interval is the start time value plus the delay value; When the start time type is the timed effectiveness, the start time of the specified time interval is the start time value.

32. The first network device according to claim 29 or 30, characterized in that: The flow validity time parameter also includes a duration type, and the duration type is continuous validity or absolute invalidation or idle invalidation; When the duration type is the continuously effective duration, the duration value is an invalid value; When the duration type is the absolute expiration, the end time of the specified time interval is the start time of the specified time interval plus the duration value; When the duration type is the idle failure, the end time of the specified time interval is the time when the time for which the service flow corresponding to the route associated with the flow effective time parameter is not processed reaches the duration value.

33. The first network device according to claim 29 or 30, characterized in that: The flow effective time parameter also includes a duration type and a period value, the duration type is absolute failure, the period value is used to indicate that the route associated with the flow effective time parameter is periodically effective, and is used to indicate the duration of the period, the period value is greater than or equal to the duration value, wherein the start time of the periodic effectiveness is the start time value or the time when the processing unit starts processing the message, each period interval of the periodic effectiveness includes the specified time interval, the start time of the specified time interval is the start time of each period interval of the periodic effectiveness, and the duration of the specified time interval is the duration value.

34. The first network device according to claim 29 or 30, characterized in that: The message also includes at least one of the following parameters: a flow identifier, a flow description, and a revocation invalid routing mark.

35. The first network device according to claim 29 or 30, characterized in that: The message is an extended BGP update UPDATE message, and the extended BGP UPDATE message includes network layer reachability information NLRI, and the NLRI carries the route associated with the flow effective time parameter, and the flow effective time parameter is used to indicate that the route associated with the flow effective time parameter is effective within a specified time interval.

36. The first network device according to claim 35, characterized in that The extended BGP UPDATE message includes a flow extension attribute, wherein the flow extension attribute includes a flow effective time field, and the flow effective time field is used to carry the flow effective time parameter; The flow effective time field includes a flow effective time type field, a first length field, a start time value field and a duration value field; wherein the flow effective time type field is used to indicate the type of the flow effective time field, the first length field is used to indicate the length of the flow effective time field, the start time value field is used to carry the start time value, and the duration value field is used to carry the duration value.

37. The first network device according to claim 36, characterized in that: The flow effective time field also includes a start time type field, a duration type field and a delay value field, wherein the start time type field is used to indicate immediate effectiveness, delayed effectiveness or timed effectiveness, the duration type field is used to indicate continuous effectiveness, absolute failure or idle failure, and the delay value field is used to carry a delay value.

38. The first network device according to claim 36 or 37, characterized in that: The flow effective time field also includes a period value field, and the period value field is used to carry a period value.

39. The first network device according to claim 36 or 37, characterized in that: The flow extension attribute also includes a flow identification field, which includes a flow identification type field, a second length field, an autonomous system AS identification field, a router identification field and a flow identification value field, wherein the flow identification type field is used to indicate the type of the flow identification field, the second length field is used to indicate the length of the flow identification field, the AS identification field is used to indicate the AS where the first network device is located, the router identification field is used to identify the first network device, and the flow identification value field is used to carry the flow identification.

40. The first network device according to claim 36 or 37, characterized in that: The stream extension attribute also includes a stream description field, which includes a stream description type field, a third length field and a stream description value field, wherein the stream description type field is used to indicate the type of the stream description field, the third length field is used to indicate the length of the stream description field, and the stream description value field is used to carry the stream description.

41. The first network device according to claim 36 or 37, characterized in that: The flow extended attribute also includes a revoke invalid route mark field.

42. The first network device according to any one of claims 29-30, 36-37, characterized in that: The processing unit is further configured to process the service flow corresponding to the route associated with the flow effective time parameter within the specified time interval.

43. A second network device, characterized in that: include: a receiving unit, configured to receive a message from a first network device, the message carrying a flow effective time parameter and a route associated with the flow effective time parameter, the flow effective time parameter including a start time value and a duration value, the flow effective time parameter being used to indicate that the route associated with the flow effective time parameter is valid within a time interval specified by the flow effective time parameter; A processing unit is used to process the service flow corresponding to the route associated with the flow effective time parameter within the specified time interval according to the message.

44. The second network device according to claim 43, characterized in that: The flow effective time parameter also includes a start time type, and the start time type is immediate effect, delayed effect, or scheduled effect; When the start time type is immediately effective, the start time of the specified time interval is the time when the processing unit starts processing the message; When the start time type is the delayed effectiveness, the flow effectiveness time parameter also includes a delay value, and the delay value is added to the start time value at the start time of the specified time interval; When the start time type is the timed effectiveness, the start time of the specified time interval is the start time value.

45. The second network device according to claim 43 or 44, characterized in that: The flow validity time parameter also includes a duration type, and the duration type includes continuous validity, absolute invalidation, or idle invalidation; When the duration type is the continuously effective duration, the duration value is an invalid value; When the duration type is the absolute expiration, the end time of the specified time interval is the start time of the specified time interval plus the duration value; When the duration type is the idle failure, the end time of the specified time interval is the time when the time for which the service flow corresponding to the route associated with the flow effective time parameter is not processed reaches the duration value.

46. ​​The second network device according to claim 43 or 44, characterized in that: The flow effective time parameter also includes a duration type and a period value, the duration type is absolute failure, the period value is used to indicate that the route associated with the flow effective time parameter is periodically effective, and is used to indicate the duration of the period, the period value is greater than or equal to the duration value, wherein the start time of the periodic effectiveness is the start time value or the time when the processing unit starts processing the message, each period interval of the periodic effectiveness includes the specified time interval, the start time of the specified time interval is the start time of each period interval of the periodic effectiveness, and the duration of the specified time interval is the duration value.

47. The second network device according to claim 43 or 44, characterized in that: The second network device further includes: a modification unit, configured to modify the flow validity time parameter.

48. The second network device according to claim 43 or 44, characterized in that: The message also includes at least one of the following parameters: a flow identifier, a flow description, and a revocation invalid routing mark.

49. The second network device according to claim 43 or 44, characterized in that: The message is an extended BGP update UPDATE message, and the extended BGP UPDATE message includes network layer reachability information NLRI, and the NLRI carries the route associated with the flow effective time parameter, and the flow effective time parameter is used to indicate that the route associated with the flow effective time parameter is effective within a specified time interval.

50. The second network device according to claim 49, characterized in that: The extended BGP UPDATE message includes a flow extension attribute, wherein the flow extension attribute includes a flow effective time field, and the flow effective time field is used to carry the flow effective time parameter; The flow effective time field includes a flow effective time type field, a first length field, a start time value field and a duration value field; wherein the flow effective time type field is used to indicate the type of the flow effective time field, the first length field is used to indicate the length of the flow effective time field, the start time value field is used to carry the start time value, and the duration value field is used to carry the duration value.

51. The second network device according to claim 50, characterized in that: The flow effective time field also includes a start time type field, a duration type field and a delay value field, wherein the start time type field is used to indicate immediate effectiveness, delayed effectiveness or timed effectiveness, the duration type field is used to indicate continuous effectiveness, absolute failure or idle failure, and the delay value field is used to carry a delay value.

52. The second network device according to claim 50 or 51, characterized in that: The flow effective time field also includes a period value field, and the period value field is used to carry a period value.

53. The second network device according to claim 50 or 51, characterized in that: The flow extension attribute also includes a flow identification field, which includes a flow identification type field, a second length field, an autonomous system AS identification field, a router identification field and a flow identification value field, wherein the flow identification type field is used to indicate the type of the flow identification field, the second length field is used to indicate the length of the flow identification field, the AS identification field is used to indicate the AS where the first network device is located, the router identification field is used to identify the first network device, and the flow identification value field is used to carry the flow identification.

54. The second network device according to claim 50 or 51, characterized in that: The stream extension attribute also includes a stream description field, which includes a stream description type field, a third length field and a stream description value field, wherein the stream description type field is used to indicate the type of the stream description field, the third length field is used to indicate the length of the stream description field, and the stream description value field is used to carry the stream description.

55. The second network device according to claim 50 or 51, characterized in that: The flow extended attribute also includes a revoke invalid route mark field.

56. The second network device according to any one of claims 43-44, 50-51, characterized in that: Also includes a sending unit, The sending unit is used to send the message to other network devices, and the other network devices do not include the first network device.

57. A network system, characterized in that: The network system includes a first network device and a second network device, the first network device is the first network device described in any one of claims 29 to 42, and the second network device is the second network device described in any one of claims 43 to 56.

58. A computer-readable storage medium, characterized in that: The method comprises computer instructions, which, when executed on a computer device, cause the computer device to execute the method according to any one of claims 1 to 28.