Transmission method and device of segment routing strategy, and network transmission system

By using filtering information to filter and send SR policies in the network transmission system, the problems of low transmission efficiency and heavy equipment burden caused by useless SR policies are solved, and more efficient network transmission is achieved.

CN116389345BActive Publication Date: 2025-08-15HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310393579.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-23
Publication Date
2025-08-15
Estimated Expiration
2040-03-23

AI Technical Summary

Technical Problem

The problem of inefficiency in transmission due to a large number of useless SR policies in network transmission systems is that the network equipment has heavy burden for processing.

Method used

The first network device filters the SR policy according to the filter information, and only sends the SR policy that matches the type and contains the device identification to the second network device, and filters the filter information for filtering and sending, reducing the transmission of useless SR policy.

Benefits of technology

It improves the overall efficiency of the network transmission system, reduces the transmission of useless SR policies, and reduces the processing pressure of network equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116389345B_ABST
    Figure CN116389345B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for transmitting a segmented routing strategy, and a network transmission system, which belongs to the field of communication technology and can be applied to a network that supports a segmented routing strategy. The method comprises: when a first network device receives at least one SR policy, one or more SR policies of the at least one SR policy are sent to a second network device according to filtering information. The filtering information comprises: an SR policy address family identifier, and a device identifier of the second network device. The present application reduces the number of SR policies sent to the network device by screening the SR policies based on the filtering information, reduces the data transmission load, and improves the overall efficiency of the network transmission system.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the Chinese patent application with application number 202010207793.X and application date 2020-03-23. Technical Field

[0002] The present application relates to the field of communication technology, and in particular to a transmission method and device for a segmented routing strategy, and a network transmission system. Background Art

[0003] The network transmission system includes a controller and multiple network devices. The controller and the multiple network devices can establish connections based on the Border Gateway Protocol (BGP), and the controller can send segment routing (SR) policies to the network devices. A pair of network devices among the multiple network devices that establish a connection relationship via BGP can be referred to as neighbor network devices. The controller can send SR policies directly to the network devices, or send SR policies to the network devices through the neighbor network devices of the network devices.

[0004] When the controller sends an SR policy to a network device that acts as a route reflector (RR), the RR needs to determine whether the SR policy is sent by the controller to this device. If so, the RR can receive and save the SR policy, and if not, the RR will reflect the SR policy to each neighboring network device connected to it. However, since there are often multiple neighboring network devices connected to an RR, each network device that is a neighbor of the RR will receive a large number of SR policies, which may include SR policies related to the device itself, but may also include a large number of useless SR policies for the device itself, thereby increasing the network transmission burden and the processing burden of the network device that receives the SR policy from the RR, reducing the overall efficiency of the network transmission system. Summary of the Invention

[0005] This application provides a segment routing policy transmission method and apparatus, and a network transmission system, which can reduce the problems of low network transmission efficiency and heavy processing burden on network devices caused by the transmission of a large number of useless SR policies in the network transmission system. The technical solution is as follows:

[0006] In a first aspect, a method for transmitting a segment routing policy is provided, the method comprising: a first network device receiving at least one SR policy; thereafter, the first network device sending one or more SR policies of the at least one SR policy to a second network device based on filtering information. The filtering information based on which the first network device sends the SR policy includes: an SR policy address family identifier and a device identifier of the second network device; the type of the SR policy sent by the first network device to the second network device belongs to the type indicated by the SR policy address family identifier; and the SR policy sent by the first network device to the second network device includes the device identifier of the second network device.

[0007] The first network device may filter the at least one received SR policy based on the SR policy address family identifier and the device identifier of the second network device in the filtering information, and send the filtered SR policy to the second network device. The SR policy filtered by the first network device must meet the following conditions: the type of the SR policy belongs to the type indicated by the SR policy address family identifier, and the SR policy includes the device identifier of the second network device.

[0008] The device identifier of the second network device may be a router identifier (router ID) of the second network device, or other types of device identifiers, such as an identification identifier (ID) of the second network device. The SR policy received by the first network device may be, for example, an SR policy sent by a receiving controller, or an SR policy sent by other network devices, such as a neighboring network device. The SR policy may also be referred to as SR policy routing. The SR policy type indicated by the SR policy address family identifier may include any type of SR policy, such as an Internet Protocol version 4 (IPv4) SR policy, or an Internet Protocol version 6 (IPv6) SR policy, etc.

[0009] In the transmission method of the segmented routing policy provided in the present application, the first network device can send one or more SR policies of at least one received SR policy to the second network device according to the filtering information. The type of the one or more SR policies belongs to the type indicated by the SR policy address family identifier, and the one or more SR policies include the device identifier of the second network device. It can be seen that the SR policy sent by the first network device to the second network device is an SR policy of a specified address type for sending to the second network device, thereby avoiding the first network device sending an SR policy that is irrelevant to the second network device to the second network device, reducing the transmission of useless SR policies in the network transmission system, reducing the load of the network transmission system, and improving the overall efficiency of the network transmission system.

[0010] The transmission method of the segmented routing strategy provided in the present application utilizes a first network device to screen the SR strategy, and the first network device is capable of sending the screened SR strategy to a second network device. In the transmission path formed by the first network device and the second network device (the transmission path may be local relative to the complete transmission path), the first network device may be referred to as a sending end, and the second network device may be referred to as a receiving end. Therefore, the embodiment of the present application is equivalent to implementing the screening of SR strategies at the sending end, thereby reducing the number of SR strategies transmitted in the transmission path and alleviating the processing pressure at the receiving end.

[0011] Optionally, the first network device obtains the address of the second network device, where the address of the second network device corresponds to the device identifier of the second network device; and the first network device sends one or more of the at least one SR policy to the second network device based on the filtering information, including: the first network device sends the one or more SR policies to the second network device based on the address of the second network device and the filtering information. The address of the second network device can be any type of address of the second network device, such as an Internet Protocol (IP) address or a Media Access Control (MAC) address. When the first network device is a device such as a route reflector, the first network device typically needs to send (reflect) SR policies to multiple downstream routers connected to it. However, by associating the address of the second network device with the device identifier of the second network device, the first network device can only send the SR policy related to the second network device (one of the downstream routers) to the second network device. The remaining downstream routers will no longer receive the SR policy related to the second network device, thereby improving the accuracy of SR policy sending and network transmission efficiency.

[0012] Optionally, the filtering information also includes: refined filtering information. At this time, the first network device can filter the SR policy for at least one received SR policy based on the SR policy address family identifier, the device identifier of the second network device and the refined filtering information in the above filtering information, and send the filtered SR policy to the second network device. Among them, the SR policy filtered by the first network device needs to meet the following conditions: the type of the SR policy belongs to the type indicated by the SR policy address family identifier, the SR policy includes the device identifier of the second network device, and the SR policy includes the refined filtering information. When the first network device filters the SR policy for at least one received SR policy, it can filter the SR policy based on three aspects of information: the SR policy address family identifier, the device identifier of the second network device and the refined filtering information.

[0013] Optionally, the type of the refined filtering information includes at least one of an identifier, a policy color, and an endpoint, and the identifier, policy color, and endpoint are attributes that can be carried in the SR policy.

[0014] Optionally, the filtering information may be sent by the second network device to the first network device. In this case, the first network device may determine the correspondence between the address of the second network device and the device identifier in the filtering information sent by the second network device, for example, based on the fact that the filtering information is sent by the second network device.

[0015] Optionally, in the first method of sending filtering information from the second network device to the first network device, the filtering information is carried in an ORF message, and the second network device can achieve the purpose of sending filtering information to the first network device by sending the ORF message to the first network device. Accordingly, the first network device can obtain the filtering information from the second network device, and the filtering information is carried in an outbound router filtering (ORF) message, and the ORF message includes: an address family identifier field, a subsequent address family identifier field, and an ORF entry field; the SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, and the device identifier of the second network device is carried in the ORF entry field.

[0016] Optionally, the ORF message may further include: an ORF type field, and the ORF type field indicates that the ORF message carries the above-mentioned filtering information and is used for screening of the SR policy.

[0017] Optionally, in the second method of sending filtering information from the second network device to the first network device, the filtering information is carried in a Covering Prefixes Outbound Route Filter (CP-ORF) message, and the second network device can achieve the purpose of sending filtering information to the first network device by sending the CP-ORF message to the first network device. Accordingly, the first network device can obtain the filtering information from the second network device, and the filtering information is carried in a Covering Prefixes Outbound Route Filter CP-ORF message, and the CP-ORF message includes: an address family identifier field, a subsequent address family identifier field, and a virtual private network route target field; the SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, and the device identifier of the second network device is carried in the virtual private network route target field.

[0018] Optionally, in the third method of sending filtering information from the second network device to the first network device, the filtering information is carried in a CP-ORF message. The second network device can achieve the purpose of sending filtering information to the first network device by sending the CP-ORF message to the first network device. Accordingly, the first network device can obtain the filtering information from the second network device. The filtering information is carried in an overlay prefix-outbound route filtering CP-ORF message. The CP-ORF message includes: an address family identifier field, a subsequent address family identifier field, a virtual private network route target field, a route type field, and a host address field. The SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, and the device identifier of the second network device is carried in the virtual private network route target field. When the filtering information includes refined filtering information, the refined filtering information is carried in the host address field, and the route type field is used to indicate the type of the refined filtering information. For example, different values of the route type field can correspond to different combinations of refined filtering information. Any one or a combination of the identifier, policy color, and endpoint corresponds to different values of the route type field.

[0019] The first network device receives the filtering information in the form of an ORF message or a CP-ORF message, which can improve the compatibility and inheritance of the system in processing messages.

[0020] The above scenario uses the example of a second network device sending filtering information to a first network device so that the first network device obtains the filtering information. In other scenarios, the first network device may also obtain the filtering information through other means. For example, the first network device obtains the filtering information from a controller. Optionally, the filtering information is carried in a Border Gateway Protocol (BGP) message. In this case, the controller may send the filtering information to the first network device by sending a BGP message to the first network device.

[0021] In this application, the second network device (or controller) can send filtering information to the first network device, so that the first network device can filter the received SR policy based on the filtering information and send the filtered SR policy to the second network device. In this way, not only the transmission efficiency of the network link is improved, but also the second network device as the receiving end can only receive the desired SR policy, reducing the receiving pressure.

[0022] Optionally, the first network device in this application is a route reflector, thereby significantly reducing the number of routes reflected by the route reflector to downstream routers and alleviating network transmission pressure. The first network device can also be other types of network devices that need to solve similar problems in other application scenarios.

[0023] On the second aspect, a method for transmitting a segmented routing policy is provided, the method comprising: a second network device sends filtering information to a first network device, and then the second network device receives the SR policy sent by the first network device, the type of the SR policy belongs to the type indicated by the SR policy address family identifier, and the SR policy includes the device identifier of the second network device. The filtering information includes: the SR policy address family identifier, and the device identifier of the second network device. Since the second network device can send filtering information to the first network device, the first network device can filter the received SR policy according to the filtering information, and send the filtered SR policy expected by the second network device to the second network device. As the receiving end, the second network device only receives the SR policy it expects, which reduces the receiving pressure, and since the number of SR policies to be transmitted is reduced, the transmission efficiency of the network link is also improved.

[0024] Optionally, the filtering information also includes: refined filtering information. At this time, the first network device can filter the SR policy for at least one received SR policy based on the SR policy address family identifier, the device identifier of the second network device and the refined filtering information in the above filtering information, and send the filtered SR policy to the second network device. Among them, the SR policy filtered by the first network device needs to meet the following conditions: the type of the SR policy belongs to the type indicated by the SR policy address family identifier, the SR policy includes the device identifier of the second network device, and the SR policy includes the refined filtering information. When the first network device filters the SR policy for at least one received SR policy, it can first preliminarily filter out some SR policies based on the SR policy address family identifier and the device identifier of the second network device, and then further filter these SR policies based on the refined filtering information.

[0025] Optionally, the type of the refined filtering information includes at least one of an identifier, a policy color, and an endpoint.

[0026] Optionally, in the first method of sending filtering information from the second network device to the first network device, the filtering information is carried in an ORF message, and the second network device can achieve the purpose of sending the filtering information to the first network device by sending the ORF message to the first network device. The ORF message includes: an address family identifier field, a subsequent address family identifier field, and an ORF entry field; the SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, and the device identifier of the second network device is carried in the ORF entry field.

[0027] Optionally, the ORF message may further include: an ORF type field, and the ORF type field indicates that the ORF message carries the above-mentioned filtering information and is used for screening of the SR policy.

[0028] Optionally, in the second manner in which the second network device sends filtering information to the first network device, the filtering information is carried in a CP-ORF message, and the second network device can achieve the purpose of sending the filtering information to the first network device by sending the CP-ORF message to the first network device. The CP-ORF message includes: an address family identifier field, a subsequent address family identifier field, and a virtual private network routing target field; accordingly, the SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, and the device identifier of the second network device is carried in the virtual private network routing target field.

[0029] Optionally, in the third way in which the second network device sends filtering information to the first network device, the filtering information is carried in a CP-ORF message, and the second network device can achieve the purpose of sending filtering information to the first network device by sending the CP-ORF message to the first network device. The CP-ORF message includes: an address family identifier field, a subsequent address family identifier field, a virtual private network routing target field, a routing type field, and a host address field; the SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, and the device identifier of the second network device is carried in the virtual private network routing target field. When the filtering information includes refined filtering information, the refined filtering information is carried in the host address field, and the routing type field is used to indicate the type included in the refined filtering information. For example, different values of the routing type field can correspond to different combinations of refined filtering information, and any one or combination of the identifier, policy color, and endpoint corresponds to different values of the routing type field.

[0030] The second network device sends the filtering information in the form of an ORF message or a CP-ORF message, which can improve the compatibility and inheritance of the system in processing messages.

[0031] Optionally, the method includes: the second network device sending the address of the second network device to the first network device, where the address of the second network device corresponds to the device identifier of the second network device. When the first network device sends the SR policy to the second network device, it can determine the address of the second network device based on the device identifier of the second network device, and send the SR policy to the second network device based on the address of the second network device.

[0032] According to a third aspect, a transmission device for a segmented routing policy is provided, wherein the transmission device for the segmented routing policy includes: a receiving module for receiving at least one segmented routing SR policy; and a sending module for sending one or more SR policies of the at least one SR policy to a second network device according to filtering information, wherein the filtering information includes an SR policy address family identifier and a device identifier of the second network device, and the type of the one or more SR policies belongs to the type indicated by the SR policy address family identifier, and the one or more SR policies include the device identifier of the second network device.

[0033] In the transmission device of the segmented routing policy provided in the present application, the sending module can send one or more SR policies of at least one received SR policy to the second network device according to the filtering information. The type of the one or more SR policies belongs to the type indicated by the SR policy address family identifier, and the one or more SR policies include the device identifier of the second network device. It can be seen that the SR policy sent by the first network device to the second network device is the SR policy for sending to the second network device, thereby avoiding the first network device sending an SR policy that is irrelevant to the second network device to the second network device, reducing the transmission of useless SR policies in the network transmission system, and reducing the load of the network transmission system.

[0034] The present application utilizes a first network device to screen the SR policy, and the first network device is capable of sending the screened SR policy to the second network device. In the transmission path formed by the first network device and the second network device (the transmission path may be local relative to the complete transmission path), the first network device may be referred to as a sending end, and the second network device may be referred to as a receiving end. Therefore, the embodiment of the present application is equivalent to implementing the screening of SR policies at the sending end, thereby reducing the number of SR policies transmitted in the transmission path and alleviating the processing pressure at the receiving end.

[0035] Optionally, the transmission device of the segmented routing strategy also includes: a first acquisition module, used to obtain the address of the second network device, the address of the second network device corresponds to the device identifier of the second network device; the sending module is used to: send the one or more SR policies to the second network device according to the address of the second network device and the filtering information.

[0036] Optionally, the filtering information also includes: refined filtering information. At this time, the first network device can filter the SR policy for at least one received SR policy based on the SR policy address family identifier, the device identifier of the second network device and the refined filtering information in the above filtering information, and send the filtered SR policy to the second network device. Among them, the SR policy filtered by the first network device needs to meet the following conditions: the type of the SR policy belongs to the type indicated by the SR policy address family identifier, the SR policy includes the device identifier of the second network device, and the SR policy includes the refined filtering information. When the first network device filters the SR policy for at least one received SR policy, it can first preliminarily filter out some SR policies based on the SR policy address family identifier and the device identifier of the second network device, and then further filter these SR policies based on the refined filtering information.

[0037] Optionally, the type of the refined filtering information includes at least one of an identifier, a policy color, and an endpoint, and the identifier, policy color, and endpoint are attributes that can be carried in the SR policy.

[0038] Optionally, in the first method in which the second network device sends filtering information to the first network device, the filtering information is carried in an ORF message, and the second network device can achieve the purpose of sending filtering information to the first network device by sending the ORF message to the first network device. Accordingly, the transmission device of the segmented routing policy also includes: a second acquisition module, which is used to obtain the filtering information from the second network device, and the filtering information is carried in the outbound routing filtering ORF message. The ORF message includes: an address family identifier field, a subsequent address family identifier field, and an ORF entry field; the SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, and the device identifier of the second network device is carried in the ORF entry field.

[0039] Optionally, the ORF message may further include: an ORF type field, and the ORF type field indicates that the ORF message carries the above-mentioned filtering information and is used for screening of the SR policy.

[0040] Optionally, in the second method of sending filtering information from the second network device to the first network device, the filtering information is carried in the CP-ORF message, and the second network device can achieve the purpose of sending filtering information to the first network device by sending the CP-ORF message to the first network device. Accordingly, the transmission device of the segmented routing strategy also includes: a third acquisition module, which is used to obtain the filtering information from the second network device. The filtering information is carried in the CP-ORF message, and the CP-ORF message includes: an address family identifier field, a subsequent address family identifier field, and a virtual private network routing target field; accordingly, the SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, and the device identifier of the second network device is carried in the virtual private network routing target field.

[0041] Optionally, in the second method of sending filtering information from the second network device to the first network device, the filtering information is carried in a CP-ORF message. The second network device can achieve the purpose of sending the filtering information to the first network device by sending the CP-ORF message to the first network device. Accordingly, the transmission device of the segment routing policy also includes: a fourth acquisition module, configured to obtain the filtering information from the second network device. The filtering information is carried in an overlay prefix-outbound route filtering CP-ORF message. The CP-ORF message includes: an address family identifier field, a subsequent address family identifier field, a virtual private network route target field, a route type field, and a host address field. The SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field. The device identifier of the second network device is carried in the virtual private network route target field. The refined filtering information is carried in the host address field. The route type field is used to indicate the type of the refined filtering information. For example, different values of the route type field can correspond to different combinations of refined filtering information. Any one or a combination of the identifier, policy color, and endpoint corresponds to different values of the route type field.

[0042] The above example uses the second network device sending filtering information to the first network device so that the first network device obtains the filtering information. The first network device can also obtain the filtering information through other means. For example, the transmission device of the segment routing policy further includes: a fifth acquisition module for obtaining the filtering information from the controller. Optionally, the filtering information is carried in a Border Gateway Protocol (BGP) message. In this case, the controller can send the filtering information to the first network device by sending a BGP message to the first network device.

[0043] It can be seen that in the present application, the second network device (or controller) can send filtering information to the first network device, so that the second network device as the receiving end (such as the client) no longer needs to receive SR policies that are not related to it, thereby improving the operating efficiency of the network device. Moreover, since the first network device can only send SR policy information related to it to the second network device, the network transmission efficiency is also improved.

[0044] Optionally, the transmission device of the segment routing strategy is used in a route reflector. The transmission device of the segment routing strategy can also be used in other network devices that need to solve similar problems in other application scenarios.

[0045] In a fourth aspect, a transmission device for a segmented routing policy is provided, wherein the transmission device for the segmented routing policy includes: a first sending module for sending filtering information to a first network device, wherein the filtering information includes: an SR policy address family identifier, and a device identifier of the second network device; a receiving module for receiving the SR policy sent by the first network device, wherein the type of the SR policy belongs to the type indicated by the SR policy address family identifier, and the SR policy includes the device identifier of the second network device.

[0046] Because the first sending module in the second network device can send filtering information to the first network device, the first network device can pre-filter the SR policy sent to the second network device based on the filtering information. Since the second network device only needs to receive the SR policy related to it, the transmission efficiency of the network link is also improved.

[0047] Optionally, the filtering information also includes: refined filtering information. At this time, the first network device can filter the SR policy for at least one received SR policy based on the SR policy address family identifier, the device identifier of the second network device and the refined filtering information in the above filtering information, and send the filtered SR policy to the second network device. Among them, the SR policy filtered by the first network device needs to meet the following conditions: the type of the SR policy belongs to the type indicated by the SR policy address family identifier, the SR policy includes the device identifier of the second network device, and the SR policy includes the refined filtering information. When the first network device filters the SR policy for at least one received SR policy, it can first preliminarily filter out some SR policies based on the SR policy address family identifier and the device identifier of the second network device, and then further filter these SR policies based on the refined filtering information.

[0048] Optionally, the type of the refined filtering information includes at least one of an identifier, a policy color, and an endpoint.

[0049] Optionally, in the first method of sending filtering information to the first network device, the filtering information is carried in an ORF message. The ORF message includes: an address family identifier field, a subsequent address family identifier field, and an ORF entry field; accordingly, the SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, and the device identifier of the second network device is carried in the ORF entry field.

[0050] Optionally, the ORF message may further include an ORF type field, where the ORF type field indicates that the ORF message carries indication information and is used for screening of SR policies.

[0051] Optionally, in the second manner in which the second network device sends filtering information to the first network device, the filtering information is carried in a CP-ORF message. The CP-ORF message includes: an address family identifier field, a subsequent address family identifier field, and a virtual private network routing target field; accordingly, the SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, and the device identifier of the second network device is carried in the virtual private network routing target field.

[0052] Optionally, in the third manner in which the second network device sends filtering information to the first network device, the filtering information is carried in a CP-ORF message. The CP-ORF message includes: an address family identifier field, a subsequent address family identifier field, a virtual private network route target field, a route type field, and a host address field; the SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, the device identifier of the second network device is carried in the virtual private network route target field, the refined filtering information is carried in the host address field, and the route type field is used to indicate the type included in the refined filtering information.

[0053] Optionally, the transmission device of the segment routing strategy further includes: a second sending module, configured to send the address of the second network device to the first network device, where the address of the second network device corresponds to the device identifier of the second network device.

[0054] In a fifth aspect, a network device is provided, comprising: a processor and a memory, wherein the memory stores a program, and the processor is used to call the program stored in the memory so that the network device executes the transmission method of the segmented routing strategy as described in any design of the first aspect.

[0055] In the sixth aspect, a network device is provided, comprising: a processor and a memory, wherein the memory stores a program, and the processor is used to call the program stored in the memory so that the network device executes the transmission method of the segmented routing strategy as described in any design of the second aspect.

[0056] In a seventh aspect, a network device is provided, comprising a processor, the processor being used to couple with a memory to call a computer program stored in the memory to execute a method for transmitting a segmented routing strategy as described in any one of the designs of the first aspect.

[0057] In an eighth aspect, a network device is provided, comprising a processor, the processor being used to couple with a memory to call a computer program stored in the memory to execute a method for transmitting a segmented routing strategy as described in any one of the designs of the second aspect.

[0058] In a ninth aspect, a computer storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute the method for transmitting the segment routing strategy as described in any one of the designs of the first aspect.

[0059] In a tenth aspect, a computer storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute the transmission method of the segment routing strategy as described in any design of the first aspect.

[0060] In the eleventh aspect, a computer program product comprising instructions is provided. When the computer program product is run on a network device, the network device executes the method for transmitting the segmented routing policy as described in any one of the designs of the first aspect.

[0061] In a twelfth aspect, a computer program product comprising instructions is provided. When the computer program product runs on a network device, the network device executes the method for transmitting the segmented routing policy as described in any one of the designs of the second aspect.

[0062] In the thirteenth aspect, a network transmission system is provided, comprising: a first network device and a second network device. The first network device is used to: receive at least one segment routing SR policy; and send one or more SR policies of the at least one SR policy to the second network device according to filtering information, wherein the filtering information includes an SR policy address family identifier and a device identifier of the second network device, and the type of the one or more SR policies belongs to the type indicated by the SR policy address family identifier, and the one or more SR policies include the device identifier of the second network device. The second network device is used to: receive the SR policy sent by the first network device.

[0063] Optionally, the first network device is used to: obtain the address of the second network device, the address of the second network device corresponds to the device identifier of the second network device; and send the one or more SR policies to the second network device according to the address of the second network device and the filtering information.

[0064] Optionally, the second network device is further configured to: send the address of the second network device to the first network device.

[0065] Optionally, the filtering information also includes: refined filtering information. At this time, the first network device can filter the SR policy for at least one received SR policy based on the SR policy address family identifier, the device identifier of the second network device and the refined filtering information in the above filtering information, and send the filtered SR policy to the second network device. Among them, the SR policy filtered by the first network device needs to meet the following conditions: the type of the SR policy belongs to the type indicated by the SR policy address family identifier, the SR policy includes the device identifier of the second network device, and the SR policy includes the refined filtering information. When the first network device filters the SR policy for at least one received SR policy, it can first preliminarily filter out some SR policies based on the SR policy address family identifier and the device identifier of the second network device, and then further filter these SR policies based on the refined filtering information.

[0066] Optionally, the type of the refined filtering information includes at least one of an identifier, a policy color, and an endpoint, and the identifier, policy color, and endpoint are attributes that can be carried in the SR policy.

[0067] Optionally, the second network device is used to send the filtering information to the first network device. In this case, the filtering information is obtained by the first network device from the second network device.

[0068] Optionally, when the filtering information is obtained by the first network device from the second network device, the filtering information is carried in an outbound route filtering ORF message. The ORF message includes: an address family identifier field, a subsequent address family identifier field, and an ORF entry field; the SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, and the device identifier of the second network device is carried in the ORF entry field.

[0069] Optionally, the ORF message may further include: an ORF type field, and the ORF type field indicates that the ORF message carries the above-mentioned filtering information and is used for screening of the SR policy.

[0070] Optionally, in the case where the filtering information is obtained by the first network device from the second network device, the filtering information is carried in an overlay prefix-outbound route filtering CP-ORF message, and the CP-ORF message includes: an address family identifier field, a subsequent address family identifier field, and a virtual private network routing target field; the SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, and the device identifier of the second network device is carried in the virtual private network routing target field.

[0071] Optionally, in the case where the filtering information is obtained by the first network device from the second network device, the filtering information is carried in the coverage prefix-outbound route filtering CP-ORF message. The CP-ORF message includes: an address family identifier field, a subsequent address family identifier field, a virtual private network routing target field, a routing type field and a host address field. The SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, and the device identifier of the second network device is carried in the virtual private network routing target field. When the filtering information includes refined filtering information, the refined filtering information is carried in the host address field, and the routing type field is used to indicate the type included in the refined filtering information. For example, different values of the routing type field can correspond to different combinations of refined filtering information, and any one or combination of identifiers, policy colors, and endpoints corresponds to different values of the routing type field.

[0072] Optionally, the above scenario uses the example of a second network device sending filtering information to a first network device, so that the first network device obtains the filtering information. In other scenarios, the first network device may also obtain the filtering information through other means. For example, the network transmission system further includes a controller configured to send the filtering information to the first network device. In this case, the filtering information is obtained by the first network device from the controller. Optionally, the filtering information is carried in a BGP message.

[0073] Optionally, the first network device in the present application is a route reflector.

[0074] The technical effects brought about by any design method in the fifth to thirteenth aspects can refer to the technical effects brought about by the corresponding design methods in the first and second aspects, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] Figure 1 A schematic diagram of the structure of a network transmission system provided in an embodiment of the present application;

[0076] Figure 2 A schematic diagram of the structure of a network device provided in an embodiment of the present application;

[0077] Figure 3 A flow chart of a method for transmitting a segment routing strategy provided in an embodiment of the present application;

[0078] Figure 4 A schematic diagram of the structure of an ORF message provided in an embodiment of the present application;

[0079] Figure 5 A schematic diagram of the structure of a CP-ORF message provided in an embodiment of the present application;

[0080] Figure 6 A block diagram of a transmission device for a segment routing strategy provided in an embodiment of the present application;

[0081] Figure 7 A block diagram of another transmission device for a segment routing strategy provided in an embodiment of the present application;

[0082] Figure 8 A schematic diagram of the structure of another network transmission system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0083] In order to make the principles and technical solutions of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0084] The transmission method of the segment routing strategy provided by the present application can be applied in a network transmission system, which includes a controller and multiple network devices. For example, Figure 1 A schematic diagram of the structure of a network transmission system provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the network transmission system includes a controller 01 and multiple network devices. The multiple network devices in the network transmission system can be divided into two categories, namely Figure 1 Route reflectors (RRs) 11, 12, and 13 (RR 11 can be called a primary route reflector, and RRs 12 and 13 can be called secondary route reflectors) and clients 21, 22, 23, and 24 are shown. Figure 1 In the example above, the number of network devices is 7. In actual applications, the number of network devices in the network transmission system can be determined according to needs.

[0085] Controller 01 and some network devices in multiple network devices (such as Figure 1The route reflector 11 in the example can establish a connection based on BGP, and multiple network devices can also establish connections based on BGP. Furthermore, the two network devices at both ends of a BGP-based connection among the multiple network devices are considered neighboring network devices (for example, the route reflector 12 and the client 21 are considered neighboring network devices, and the route reflector 12 and the client 22 are also considered neighboring network devices).

[0086] In one possible scenario, the controller can send SR policies directly to each client (SR policies can also be called SR policy routing). In another possible scenario, the controller can send SR policies to the client through the client's neighboring network devices (such as route reflectors or other clients). Figure 1 Taking the network structure shown as an example, controller 01 sends an SR policy to client 21 via route reflector 12. Route reflector 12 forwards the SR policy sent by controller 01 to client 21. In this scenario, route reflector 12 also forwards the SR policy sent to client 22. Because route reflector 12 reflects SR policies to clients with which it has established a neighbor relationship, client 21 receives not only the SR policies related to itself but also the SR policies related to client 22. Consequently, client 21 receives some SR policies that are useless to it.

[0087] When a route reflector is connected to a large number of clients, each client connected to the SR policy reflector will receive a large number of useless SR policies, thereby increasing the network transmission burden and the burden on the client to process SR policies, reducing the overall efficiency of the network transmission system.

[0088] The above process takes the client receiving the SR policy from the neighboring route reflector as an example. In fact, similar problems may also exist between other network devices with neighbor relationships. For example, Figure 1 The secondary route reflector 12 or 13 shown in the figure may also receive a large number of useless SR policies sent by the primary route reflector 11 .

[0089] An embodiment of the present application provides a method for transmitting a segmented routing policy. This method sets filtering information on a network device that transmits an SR policy, thereby pre-screening the network device to obtain an SR policy related to a receiving network device, thereby reducing useless routing policies (routing policies unrelated to the receiving network device) transmitted in the network transmission system and reducing the load on the network transmission system. Furthermore, the method for transmitting a segmented routing policy provided by the present application is relatively simple, thereby simplifying the process of transmitting an SR policy.

[0090] The transmission method of the segment routing strategy provided by the present application involves a first network device and a second network device in a network transmission system. The first network device and the second network device can be any two network devices in the network transmission system, and there is a sending and receiving relationship of the SR strategy between the two network devices. Figure 1 In the network transmission system shown, the first network device and the second network device can be neighboring network devices, and the first network device is used to send the SR policy to the second network device. In one case, the first network device can be Figure 1 The route reflector 12 in the second network device is Figure 1 In another case, the first network device may be Figure 1 The route reflector 11 in the second network device is Figure 1 The route reflector 12 or 13 in the first network device can carry the device identifier of the destination network device in the SR policy sent to the second network device. Figure 1 In the network structure shown, the device identifier of the destination network device may be a router ID.

[0091] SR policy is a tunnel diversion technology based on SR technology. Network devices with SR policy planning capabilities, such as controllers, deploy a tunnel that meets the requirements based on business needs or service quality requirements, and can notify the corresponding network devices of the tunnel information through BGP messages. The above-mentioned message used to send tunnel information can be called an SR policy, or it can also be called an SR policy route. In some possible situations, other devices in the network that have the ability to deploy or generate SR policies other than the controller can also send SR policies. After being sent by the controller, for example, the SR policy can be received or forwarded by other network devices. The SR policy includes information such as the headend, color, and endpoint, where the headend identifies the device location where the SR policy is generated or implemented, the color is used to distinguish multiple SR policies between the same headend and endpoint pair, and the endpoint indicates the device location at the end of the SR policy, which can be an IPv4 or IPv6 address.

[0092] The first network device includes a processor coupled to a memory, configured to read instructions from the memory, and then execute, according to the instructions, the method performed by the first network device as described in the embodiments of the present application. The second network device also includes a processor coupled to the memory, configured to read instructions from the memory, and then execute, according to the instructions, the method performed by the second network device as described in the embodiments of the present application.

[0093] In each of the first network device and the second network device, the number of processors can be multiple, and the memory coupled to the processor can be independent of the processor or the network device, or can be inside the processor or the network device. The memory can be a physically independent unit, or it can be a storage space on a cloud server or a network hard disk, etc. Optionally, the memory can be one or more. When there are multiple memories, they can be located in the same or different locations and can be used independently or in combination. For example, when the memory is located inside the network device, please refer to Figure 2 , Figure 2 This is a schematic diagram of the structure of a network device provided in an embodiment of the present application. The network device 200 includes: a processor 202 and a memory 201, wherein the memory 201 is used to store programs, and the processor 202 is used to call the programs stored in the memory 201 so that the network device executes corresponding methods or functions. Optionally, as Figure 2 As shown, the network device 200 may further include at least one communication interface 203 and at least one communication bus 204. The memory 201, the processor 202, and the communication interface 203 are communicatively connected via the communication bus 204. The communication interface 203 is used to communicate with other devices under the control of the processor 202, and the processor 202 can call programs stored in the memory 201 via the communication bus 204.

[0094] Figure 3 A flow chart of a method for transmitting a segment routing strategy provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the transmission method of the segment routing policy may include:

[0095] S301: The second network device sends filtering information to the first network device.

[0096] In S301 , the second network device needs to send filtering information to the first network device, so that the first network device obtains the filtering information, so that the first network device can transmit the SR policy based on the filtering information in subsequent operations.

[0097] In the first example, the filtering information includes: an SR policy address family identifier, and a device identifier of the second network device. The SR policy type indicated by the SR policy address family identifier may include any SR policy, such as Internet Protocol version 4 (IPv4) SR policy, or Internet Protocol version 6 (IPv6) SR policy, etc. The device identifier of the second network device may be the Router ID of the second network device, or other types of identifiers, such as the identification (ID) of the second network device, etc. The SR policy address family identifier and the device identifier of the second network device are used to instruct the first network device to filter out the SR policies that need to be sent to the second network device from the received SR policies.

[0098] In the second example, the filtering information includes not only the SR policy address family identifier and the device identifier of the second network device, but also detailed filtering information. Optionally, the detailed filtering information may include various attributes supported by the SR policy, such as a distinguisher, a policy color, and an endpoint, or any combination thereof.

[0099] For example, the first network device may be Figure 1 The route reflector 12 in the second network device is Figure 1 For client 21, in S301, client 21 can send filtering information to route reflector 12. For another example, the first network device can be a first-level route reflector 11, and the second network device can be a second-level route reflector 12. In this case, in S301, second-level route reflector 12 can send filtering information to route reflector 11. In other possible scenarios, the first network device and the second network device can even be two network devices that do not directly establish a neighbor relationship, such as the first network device being a first-level route reflector 11 and the second network device being client 21.

[0100] S302: The first network device receives at least one SR policy.

[0101] The first network device can receive routes of their respective types (including SR policies). The routes received by the first network device can be, for example, routes sent directly from the controller in the network transmission system to the first network device, or routes forwarded by the controller to the first network device through other network devices, or in other network application scenarios, routes sent by other network devices as source devices without passing through the controller, etc. The types of routes received by the first network device may include SR policies that support SR, or routes that support other protocols or policies. If the first network device receives a route that complies with other protocols or policies, it can be processed normally according to the corresponding protocol or policy to ensure normal operation of the system. If the first network device receives an SR policy, it can be processed according to the following S303. In the embodiment of the present application, the first network device receives at least one SR policy as an example. Among them, the destination network device of the SR policy received by the first network device can be a second network device or other network devices.

[0102] Still Figure 1 Taking the illustrated scenario as an example, the route reflector 12 or 13 can receive the SR policy sent by the controller 01. The SR policy can include the router ID of the destination network device to which the SR policy is sent. Assume that the router ID of client 21 is 1.1.1.1, the router ID of client 22 is 2.2.2.2, the router ID of client 23 is 3.3.3.3, and the router ID of client 24 is 4.4.4.4. If the SR policy includes a router ID of 1.1.1.1, then the SR policy is used to send to client 21; if the SR policy includes a router ID of 2.2.2.2, then the SR policy is used to send to client 22; if the SR policy includes a router ID of 3.3.3.3, then the SR policy is used to send to client 23; if the SR policy includes a router ID of 4.4.4.4, then the SR policy is used to send to client 24.

[0103] S303: The first network device sends one or more SR policies of the at least one SR policy to the second network device according to the filtering information.

[0104] Prior to S303, the first network device not only obtained the filtering information but also received at least one SR policy. Therefore, in S303, the first network device can filter the at least one SR policy based on the filtering information, thereby obtaining one or more SR policies from the at least one SR policy to be sent to the second network device. Alternatively, the filtering information may not obtain any SR policy to be sent to the second network device, meaning that none of the SR policies currently received by the first network device meet the requirements of the second network device.

[0105] In the first example, the filtering information includes the SR policy address family identifier and the device identifier of the second network device. The SR policy issued by the controller (or other network device with SR policy planning or generation capability) carries the type information of the SR policy (used to indicate the type of the SR policy, such as the type information includes the address family identifier of the SR policy), and the device identifier of the network device to which the SR policy is sent (for example, the device identifier can be carried in the extended group attribute in the SR policy). The first network device can obtain the SR policy for sending to the second network device by filtering the received SR policy. The type of the SR policy belongs to the type indicated by the SR policy address family identifier in the above-mentioned filtering information, such as the type of the SR policy and the type indicated by the SR policy address family identifier are both IPv6 SR policies. The device identifier of the destination network device to which the SR policy is sent carried by the SR policy is the same as the device identifier of the second network device.

[0106] When the first network device filters the received SR policy, for example, it can first detect whether the type of the SR policy belongs to the type indicated by the SR policy address family identifier carried in the previously received filtering information. When the type of the SR policy belongs to the type indicated by the SR policy address family identifier carried in the filtering information, the first network device can further detect whether the device identifier of the destination network device carried by the SR policy is the same as the device identifier of the second network device. When the device identifier of the network device to which the SR policy should be sent carried by the SR policy is the same as the device identifier of the second network device, the first network device determines that the SR policy is an SR policy sent to the second network device, and the type of the SR policy belongs to the type specified in the filtering information (that is, the type indicated by the SR policy address family identifier), such as the IPv6 SR policy. When the type of the SR policy does not belong to the type indicated by the SR policy address family identifier carried in the filtering information, or the device identifier of the destination network device carried by the SR policy is different from the device identifier of the second network device, the first network device can determine that the SR policy is not an SR policy that needs to be sent to the second network device.

[0107] As a possible example, assume that the first network device (such as Figure 1 The at least one SR policy received by the route reflector 12 in the second network device is shown in Table 1 and is consistent with the second network device (such as Figure 1In the filtering information corresponding to the client 21 in the table, the type of SR policy indicated by the SR policy address family identifier is an IPv6 SR policy, and the device identifier of the second network device is 1.1.1.1. After the first network device filters the received SR policies 1, 2, 3, and 4, it can be determined that the SR policy that needs to be sent to the second network device is SR policy 2 in Table 1. Table 1 is only a possible example. In actual applications, the number of SR policies actually received and maintained by the first network device can be any. It should be noted that, in addition to receiving SR policies, the first network device can also receive routes (including policies) that support other protocol types. When the first network device receives routes of other protocol types (such as IP routes), the first network device will not use filtering information to filter routes of non-SR policy types to ensure the normal operation of the network system.

[0108] Table 1

[0109] SR Strategy type Device identifier for the network device being sent to 1 IPv4 SR policy 1.1.1.1 2 IPv6 SR Policy 1.1.1.1 3 IPv6 SR policy 2.2.2.2 4 IPv6 SR policy 3.3.3.3

[0110] The SR policy address family identifier in the above-mentioned filtering information can be used to indicate one or more SR policy types. When the first network device detects whether the type of the received SR policy belongs to the type indicated by the SR policy address family identifier, it can detect whether the type of the received SR policy belongs to some or all of the types indicated by the SR policy address family identifier, that is, it allows the use of one or more address family identifiers in the filtering information to fully match or partially match the received SR policy. In the above embodiment, the first network device uses a full match method to detect the type of the received SR policy as an example. Optionally, when the address family identifier in the filtering information obtained by the first network device is multiple, such as including both IPv4 and IPv6 SR policy address families, the first network device can also be allowed to use the partial matching principle to filter out the SR policies to be sent to the second network device, for example, as long as it matches any address family type in IPv4 or IPv6. Alternatively, in other possible situations, it is also possible to allow the filtering information to include only one of the device identifier or the SR policy address family identifier, wherein, for example, when the filtering information only includes the device identifier of the second network device, the first network device can filter out SR policies of all address family types directed to the second network device, and when the filtering information, for example, only includes the IPv4 address family type, the first network device can filter out all IPv4 SR policies and send them to one or more related network devices according to the connection relationship. At this time, because the device identifier of the second network device is not included in the filtering information, the first network device will not send the SR policy only to the specific second network device, unless the second network device is the only network device determined by the first network device according to the connection relationship. The embodiment of the present application does not limit this to a unique method.

[0111] In the second example, the filtering information includes not only the SR policy address family identifier and the device identifier of the second network device, but also detailed filtering information. The SR policy sent by the controller can carry not only type information for indicating the type of SR policy, and the device identifier of the network device (such as the destination network device) to which the SR policy needs to be sent, but also relevant information that can be matched with the above-mentioned detailed filtering information. The so-called matching, for example, can be that the relevant information carried by the SR policy is exactly the same as the detailed filtering information, or that the relevant information carried by the SR policy can be matched with the detailed filtering information according to preset rules. At this time, the first network device can filter at least one received SR policy in S303 according to the SR policy address family identifier in the filtering information, the device identifier of the second network device and the detailed filtering information. For the SR policy filtered out by the first network device for sending to the second network device, the type of the SR policy belongs to the type indicated by the SR policy address family identifier in the above-mentioned filtering information, and the device identifier of the network device to which the SR policy needs to be sent carried by the SR policy is the same as the device identifier of the second network device, and the SR policy carries information that can match the detailed filtering information in the filtering information.

[0112] When the first network device filters the received SR policy, the first network device can first detect whether the type of the SR policy belongs to the type indicated by the SR policy address family identifier in the filtering information. When the type of the SR policy belongs to the type indicated by the SR policy address family identifier in the filtering information, the first network device can further detect whether the device identifier of the network device (such as the destination network device) to which the SR policy should be sent carried by the SR policy is the same as the device identifier of the second network device. When the device identifier of the network device to which the SR policy should be sent carried by the SR policy is the same as the device identifier of the second network device, the first network device can determine whether the SR policy carries information that can match the refined filtering information in the filtering information. When the relevant information carried by the SR policy matches the refined filtering information in the filtering information, the first network device can determine that the SR policy is an SR policy that needs to be sent to the second network device. When the type of the SR policy does not belong to the type indicated by the SR policy address family identifier in the filtering information, or the device identifier of the network device to which the SR policy is to be sent carried by the SR policy is different from the device identifier of the second network device, or the relevant information carried by the SR policy cannot match the refined filtering information in the filtering information, the first network device can determine that the SR policy is not the SR policy sent to the second network device.

[0113] As a possible example, assume that the first network device (such as Figure 1 The route reflector 12 in the example 1) receives at least one SR policy as shown in Table 2, and the second network device (such as Figure 1In the filtering information for client 21 in Table 2, the SR policy type indicated by the SR policy address family identifier is an IPv6 SR policy, the device identifier of the second network device is 1.1.1.1, and the refined filtering information is X3. After the first network device filters SR policies 1, 2, 3, 4, and 5, the SR policy for sending to the second network device is SR policy 5 in Table 2.

[0114] Table 2

[0115] SR Strategy type Device identifier for the network device being sent to Refine filtering information 1 IPv4 SR policy 1.1.1.1 X1 2 IPv6 SR Policy 1.1.1.1 X2 3 IPv6 SR policy 2.2.2.2 X3 4 IPv6 SR Policy 3.3.3.3 X4 5 IPv6 SR policy 1.1.1.1 X3

[0116] When the first network device filters the at least one received SR policy based on the filtering information, the first network device may filter out the SR policy destined for the second network device, or may not filter out the SR policy destined for the second network device.

[0117] When the first network device filters out one or more SR policies destined for the second network device from at least one received SR policy, the first network device can send the one or more SR policies to the second network device. If the at least one SR policy received by the first network device also includes other SR policies in addition to the one or more SR policies, the first network device will not send these SR policies to the second network device. In one possible scenario, the first network device can also discard these SR policies, thereby reducing the storage pressure on the first network device. In this way, routing policies that do not need to be sent to the second network device (which can be called useless routing policies) are avoided from being sent to the second network device, reducing the number of useless routing policies transmitted in the network transmission system, reducing the load on the network transmission system, and avoiding the second network device from being burdened by receiving too many useless routing policies.

[0118] When the first network device does not filter out an SR policy destined for the second network device from the at least one received SR policy, the first network device does not send the received SR policy to the second network device. In one possible scenario, the first network device may also discard these SR policies.

[0119] As a possible example, assume that the first network device (such as Figure 1 The at least one SR policy received by the route reflector 12 in Table 1 is shown in Table 1, and the SR policy selected by the first network device from the received SR policies 1, 2, 3, and 4 is SR policy 2. The first network device can send SR policy 2 to the second network device (such as Figure 1 The client 21 in the network), and the first network device may also discard the SR policies 1, 2 and 3, and the discarding operation may occur after exceeding a preset time, for example.

[0120] As a possible example, assume that the first network device (such as Figure 1 The at least one SR policy received by the route reflector 12 in Table 2 is shown in Table 2, and the SR policy selected by the first network device from the received SR policies 1, 2, 3, 4, and 5 is SR policy 5. The first network device can send SR policy 5 to the second network device (such as Figure 1 The client 21 in the network), and the first network device may also discard the SR policies 1, 2, 3 and 4, and the discarding operation may occur after exceeding a preset time, for example.

[0121] In addition, when the first network device sends the SR policy to the second network device, it can send the SR policy to the second network device according to the address of the second network device, and the address of the second network device corresponds to the device identifier of the second network device. The address of the second network device can be any address of the second network device, such as an Internet Protocol (IP) address or a Media Access Control (MAC) address. Before S303, the first network device needs to obtain the address of the second network device. For example, the second network device can send a message to the first network device alone to notify the address of the second network device, and the message includes the correspondence between the address of the second network device and the device identifier of the second network device, or the message includes at least some indication information that enables the first network device to establish a correspondence between the address of the second network device and the device identifier of the second network device. Alternatively, the address of the second network device can be configured on the first network device by manual configuration, and the first network device can establish a correspondence between the address of the second network device and the device identifier of the second network device. Alternatively, when the second network device sends filtering information to the first network device, the first network device can directly establish a correspondence between the address of the second network device and the device identifier of the second network device based on the source Internet Protocol (IP) address of the filtering information.

[0122] In S301, the second network device may send filtering information to the first network device in a variety of ways. This embodiment of the application provides at least the following three ways.

[0123] (1) In the first method in which the second network device sends filtering information to the first network device, the filtering information is carried in an outbound route filter (ORF) message. The second network device can achieve the purpose of sending the filtering information to the first network device by sending the ORF message to the first network device.

[0124] For example, the ORF message includes at least an Address Family Identifier field, a Subsequent Address Family Identifier field, and an ORF Entry field.

[0125] The SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field. For example, part of the information of the SR policy address family identifier is carried in the address family identifier field, and the other part of the information is carried in the subsequent address family identifier field. For example, when the SR policy type indicated by the SR policy address family identifier is an IPv4 SR policy, the part of the information may include IPv4, and the other part of the information may include the SR policy. When the SR policy type indicated by the SR policy address family identifier is an IPv6 SR policy, the part of the information may include IPv6, and the other part of the information may include the SR policy. The device identifier of the second network device is carried in the ORF entry field.

[0126] Optionally, the ORF message may further include an ORF Type field, the ORF Type field indicating that the ORF message carries the above-mentioned filtering information and is used for screening the SR policy. For example, the ORF Type field may indicate, by assigning a specific value, that the ORF message carries the above-mentioned filtering information and is used for screening the SR policy.

[0127] Figure 4 A schematic diagram of the structure of an ORF message provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, the ORF message may include not only the address family identifier field, the subsequent address family identifier field, the ORF entry field, and the ORF type field, but may also include the reserved field, the refresh time field, the ORF entry length field, etc. The address family identifier field, the reserved field, the subsequent address family identifier field, the refresh time field, the ORF type field, the ORF entry length field, and the ORF entry field may be arranged in sequence. Optionally, the address family identifier field includes 2 bytes, the subsequent address family identifier field includes 1 byte, the ORF type field includes 1 byte, the ORF entry field includes 4 bytes, the reserved field includes 1 byte, the refresh time field includes 1 byte, and the ORF entry length field includes 2 bytes.

[0128] The above-mentioned refined filtering information may be carried in at least one field in the ORF message except the address family identifier field, the subsequent address family identifier field, the ORF entry field, and the ORF type field.

[0129] After receiving the ORF message sent by the second network device, the first network device needs to parse the ORF message to obtain the filtering information carried by the ORF message. For example, the first network device can first detect whether the ORF type field in the ORF message is used to indicate that the ORF message is used for SR policy screening. When the ORF type field is used to indicate that the ORF message is used for SR policy screening, the first network device can further obtain the SR policy address family identifier from the address family identifier field and the subsequent address family identifier field of the ORF message, and obtain the device identifier of the second network device from the ORF entry field, and obtain refined filtering information from at least one field other than the address family identifier field, the subsequent address family identifier field, the ORF entry field, and the ORF type field.

[0130] (2) In the second method in which the second network device sends filtering information to the first network device, the filtering information is carried in a Covering Prefixes Outbound Route Filter (CP-ORF) message. The second network device can achieve the purpose of sending filtering information to the first network device by sending the CP-ORF message to the first network device.

[0131] For example, the CP-ORF message includes an Address Family Identifier field, a Subsequent Address Family Identifier field, and a Virtual Private Network Route Target (VPN Route Target) field. Similar to the aforementioned ORF message, the SR policy address family identifier can be carried in the Address Family Identifier field and the Subsequent Address Family Identifier field. The device identifier of the second network device is carried in the VPN Route Target field.

[0132] (3) In the third method in which the second network device sends filtering information to the first network device, the filtering information can be carried in a CP-ORF message, and the second network device can achieve the purpose of sending the filtering information to the first network device by sending the CP-ORF message to the first network device.

[0133] For example, the CP-ORF message includes: an address family identifier field, a subsequent address family identifier field, a virtual private network routing target field, a routing type field, and a host address field. Similar to the above-mentioned CP-ORF message, the SR policy address family identifier can be carried in the address family identifier field and the subsequent address family identifier field. The device identifier of the second network device is carried in the virtual private network routing target field. When the filtering information includes refined filtering information, the refined filtering information is carried in the host address field, and the routing type field is used to indicate the type included in the refined filtering information. For example, different values of the routing type field can correspond to different combinations of refined filtering information, and any one or combination of the identifier, policy color, and endpoint corresponds to different values of the routing type field.

[0134] Figure 5 A schematic diagram of the structure of a CP-ORF message provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the ORF message may include: an address family identifier field, a subsequent address family identifier field, a virtual private network route target field, a reserved field, a refresh time field, an ORF type field (used to indicate that the type of the CP-ORF message is the CP-ORF type), an ORF entry length field, a sequence field, a minimum length field, a maximum length field, an import route target field, a route type field, a host address field, etc. Among them, the address family identifier field, the reserved field, the subsequent address family identifier field, the refresh time field, the ORF type field, the ORF entry length field, the sequence field, the minimum length field, the maximum length field, the virtual private network route target field, the import route target field, the route type field, and the host address field may be arranged in sequence.

[0135] Optionally, the address family identifier field includes 2 bytes, the subsequent address family identifier field includes 1 byte, the ORF type field includes 1 byte, the reserved field includes 1 byte, the refresh time field includes 1 byte, the ORF entry length field includes 2 bytes, the sequence field includes 4 bytes, the minimum length field includes 1 byte, the maximum length field includes 1 byte, the virtual private network route target field includes 8 bytes, the inbound route target field includes 8 bytes, the route type field includes 1 byte, and when the SR policy address family identifier is used to indicate that the SR policy type is IPv4 SR policy, the host address field includes 13 bytes; when the SR policy address family identifier is used to indicate that the SR policy type is IPv6 SR policy, the host address field includes 25 bytes.

[0136] Optionally, please continue to refer to Figure 5 The host address field may include the Network Layer Reachability Information Length (NLRI Length), the distinguisher, the policy color, and the endpoint. The Network Layer Reachability Information Length includes 1 byte, the distinguisher includes 4 bytes, the policy color includes 4 bytes, and when the SR policy address family identifier is used to indicate that the SR policy type is an IPv4 SR policy, the endpoint includes 4 bytes. When the SR policy address family identifier is used to indicate that the SR policy type is an IPv6 SR policy, the endpoint includes 16 bytes.

[0137] The refined filtering information can be carried in at least one field of the CP-ORF message, excluding the address family identifier field, the subsequent address family identifier field, and the VPN route target field. For example, the CP-ORF message may further include: the refined filtering information can be carried in the host address field, and the route type field is used to indicate the type of refined filtering information. For example, different values of the route type field can correspond to different combinations of refined filtering information, such that any one or a combination of the identifier, policy color, and endpoint corresponds to different values of the route type field.

[0138] For example, the value of the route type field and the type of refined filtering information it indicates can be shown in Table 3. It can be seen that different values of the route type field indicate different types of refined filtering information. It should be noted that the values assigned to the route type field in Table 3 are only examples. In actual applications, other values can be assigned as needed.

[0139] Table 3

[0140] The value of the route type field Refine the types of filtering information included 0 Identifier 1 Strategy Color 2 endpoint 3 Identifier, policy color 4 Identifier, endpoint 5 Policy Color, Endpoint 6 Identifier, policy color, endpoint

[0141] After receiving a CP-ORF message from a second network device, the first network device needs to parse the CP-ORF message to obtain the filtering information carried in the CP-ORF message. For example, the first network device may first obtain the SR policy address family identifier from the address family identifier field and the subsequent address family identifier field of the CP-ORF message, obtain the device identifier of the second network device from the virtual private network route target field, determine the type of refined filtering information based on the value of the route type field, and obtain the refined filtering information from the host address field based on the type of the refined filtering information.

[0142] The above-mentioned ORF message and CP-ORF message can both be included in a BGP route refresh (Route-Refresh) message, or other messages (such as: BGP route update (BGP Update) message), which is not limited in the embodiment of the present application.

[0143] In the above embodiment, S301 takes the second network device sending filtering information to the first network device so that the first network device obtains the filtering information as an example. The first network device can also obtain the filtering information in other ways. For example, the first network device can obtain the filtering information from the controller. Optionally, the filtering information is carried in a BGP message. In this case, the controller can send the filtering information to the first network device by sending a BGP message to the first network device. For another example, the first network device may not obtain the filtering information based on the message sent by other devices (such as the above-mentioned second network device or controller), but obtain the filtering information through static configuration. In this case, it is necessary to manually configure the filtering information on the first network device so that the first network device obtains the filtering information.

[0144] In summary, in the segmented routing policy transmission method provided in the embodiment of the present application, the first network device can send one or more SR policies among the at least one received SR policy to the second network device according to the filtering information. The type of the one or more SR policies belongs to the type indicated by the SR policy address family identifier, and the one or more SR policies include the device identifier of the second network device. It can be seen that the SR policy sent by the first network device to the second network device is the SR policy for sending to the second network device, thereby avoiding the first network device sending an SR policy that is irrelevant to the second network device to the second network device, reducing the transmission of useless SR policies in the network transmission system, reducing the load of the network transmission system, and improving the overall efficiency of the network transmission system.

[0145] In the segmented routing policy transmission method provided in the embodiment of the present application, the SR policy for the second network device is screened at the first network device, thereby reducing the number of SR policies sent from the first network device to the second network device and alleviating the transmission pressure of the network transmission link; and, since useless SR policies are not screened out by the first network device, the second network device does not need to process a large number of useless SR policies, thereby reducing the load on the second network device.

[0146] In the segment routing policy transmission method provided in the embodiment of the present application, after obtaining the filtering information, the first network device can directly filter the received SR policy according to the filtering information. The entire SR policy screening is relatively simple and the efficiency of the SR policy screening is also high.

[0147] Combined with the above Figures 1 to 5 , describes in detail the transmission method of the segmented routing strategy provided by the present application. It can be understood that in order to implement the functions described in the above methods, the first network device and the second network device need to include hardware and / or software modules corresponding to the execution of each function. In combination with the execution process of each method described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to exceed the scope of this application.

[0148] This embodiment can divide the corresponding network device into functional modules based on the above-mentioned method embodiment. For example, each functional module can be divided according to its function, or two or more functions can be integrated into a single processing module. The above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that the module division in this embodiment is illustrative and is specifically used as a possible division method of logical functions. In actual implementation, other division methods may be used.

[0149] When the functional module division method is adopted, the following will be combined Figure 6 and Figure 7 The present invention describes a transmission device for a segment routing strategy provided by the present application.

[0150] Figure 6 This is a block diagram of a transmission device for a segment routing strategy provided in an embodiment of the present application. The transmission device for the segment routing strategy may be, for example, the first network device in each of the aforementioned embodiments. Figure 6 As shown, the transmission device of the segment routing strategy includes:

[0151] The receiving module 601 is configured to receive at least one SR policy. The operations performed by the receiving module 601 may refer to Figure 3 S302 in the embodiment shown.

[0152] The sending module 602 is configured to send one or more SR policies of at least one SR policy to the second network device according to the filtering information, wherein the filtering information includes the SR policy address family identifier and the device identifier of the second network device, and the type of the one or more SR policies belongs to the type indicated by the SR policy address family identifier, and the one or more SR policies include the device identifier of the second network device. The operation performed by the sending module 602 can be referred to Figure 3 S303 in the embodiment shown.

[0153] In summary, in the segment routing policy transmission device provided in the embodiments of the present application, the sending module can filter at least one received SR policy based on the filtering information to obtain an SR policy for transmission to the second network device. This prevents the first network device from sending an SR policy unrelated to the second network device to the second network device, reduces the transmission of useless SR policies in the network transmission system, and reduces the load on the network transmission system.

[0154] The present application performs SR policy screening at the first network device, and the first network device is able to send the SR policy to the second network device. In the transmission path formed by the first network device and the second network device (the transmission path can be partial relative to the complete transmission path), the first network device can be called the sending end, and the second network device can be called the receiving end. Therefore, the embodiment of the present application is equivalent to implementing SR policy screening at the sending end, thereby reducing the number of SR policies transmitted in the transmission path and alleviating the SR policy processing pressure on the receiving end.

[0155] Optionally, the transmission device of the segment routing strategy further includes: a first acquisition module ( Figure 6 (not shown), used to obtain the address of the second network device, the address of the second network device corresponds to the device identifier of the second network device; the above-mentioned sending module 602 is used to: send one or more SR policies to the second network device according to the address and filtering information of the second network device.

[0156] Optionally, the filtering information also includes: refined filtering information. For the SR policy filtered out by the first network device for sending to the second network device, the type of the SR policy belongs to the type indicated by the above-mentioned SR policy address family identifier, and the device identifier of the network device to which the SR policy is sent carried by the SR policy is the same as the device identifier of the second network device, and the refined filtering information carried by the SR policy matches the refined filtering information in the filtering information.

[0157] Optionally, the type of refined filtering information includes at least one of an identifier, a policy color, and an endpoint.

[0158] Optionally, in the first manner in which the second network device sends filtering information to the first network device, the filtering information is carried in an ORF message, and the second network device can achieve the purpose of sending filtering information to the first network device by sending the ORF message to the first network device. Accordingly, the transmission device of the segment routing strategy further includes: a second acquisition module ( Figure 6 (not shown) for obtaining the filtering information from the second network device. The filtering information is carried in an outbound route filtering ORF message. The ORF message includes: an address family identifier field, a subsequent address family identifier field, and an ORF entry field; the SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, and the device identifier of the second network device is carried in the ORF entry field.

[0159] Optionally, the ORF message may further include: an ORF type field, and the ORF type field indicates that the ORF message carries the above-mentioned filtering information and is used for screening of the SR policy.

[0160] Optionally, in the second method of sending filtering information from the second network device to the first network device, the filtering information is carried in the CP-ORF message, and the second network device can achieve the purpose of sending filtering information to the first network device by sending the CP-ORF message to the first network device. Accordingly, the transmission device of the segment routing strategy further includes: a third acquisition module ( Figure 6 (not shown) for obtaining the filtering information from the second network device. The filtering information is carried in an Overlay Prefix-Outbound Route Filter (CP-ORF) message. The CP-ORF message includes: an address family identifier field, a subsequent address family identifier field, and a virtual private network route target field. The SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, and the device identifier of the second network device is carried in the virtual private network route target field.

[0161] Optionally, in the second manner in which the second network device sends filtering information to the first network device, the filtering information is carried in a CP-ORF message, and the second network device can achieve the purpose of sending filtering information to the first network device by sending the CP-ORF message to the first network device. Accordingly, the transmission device of the segment routing strategy further includes: a fourth acquisition module ( Figure 6(not shown), is used to obtain the filtering information from the second network device, the filtering information is carried in the coverage prefix-outbound route filtering CP-ORF message, and the CP-ORF message includes: an address family identifier field, a subsequent address family identifier field, a virtual private network routing target field, a routing type field and a host address field. The SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, the device identifier of the second network device is carried in the virtual private network routing target field, the refined filtering information is carried in the host address field, and the routing type field is used to indicate the type included in the refined filtering information. For example, different routing type field values can correspond to different combinations of refined filtering information, and any one or combination of identifiers, policy colors, and endpoints corresponds to different routing type field values.

[0162] The above example uses the second network device sending filtering information to the first network device so that the first network device obtains the filtering information. The first network device can also obtain the filtering information through other means. For example, the transmission device of the segment routing policy further includes: a fifth acquisition module for obtaining the filtering information from the controller. Optionally, the filtering information is carried in a Border Gateway Protocol (BGP) message. In this case, the controller can send the filtering information to the first network device by sending a BGP message to the first network device.

[0163] Optionally, the transmission device of the SR policy is used for a route reflector. Of course, the transmission device of the SR policy can also be other network devices with similar application scenario requirements.

[0164] In the case of adopting an integrated unit, the transmission device of the segment routing policy for the first network device provided by the present application may include a processing module, a storage module and a communication module. Among them, the processing module can be used to control and manage the actions of the transmission device of the segment routing policy, for example, it can be used to support the transmission device of the segment routing policy to perform the actions performed by the first network device in S301, S302 and S303 above. The storage module can be used to support the transmission device of the segment routing policy to execute storage program code and data, etc. The communication module can be used to support the communication between the transmission device of the segment routing policy and other devices.

[0165] The processing module may be a processor or a controller. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and so on. The storage module may be a memory. The communication module may specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, or a Wi-Fi chip.

[0166] In one embodiment, when the processing module is a processor, the storage module is a memory, and the communication module is a communication interface, the transmission device of the segment routing strategy involved in this embodiment can be a transmission device having Figure 2 Network equipment with the structure shown.

[0167] Figure 7 This is a block diagram of another transmission device of a segment routing strategy provided in an embodiment of the present application. The transmission device of the segment routing strategy can be, for example, the second network device in the aforementioned embodiments. Figure 7 As shown, the transmission device of the segment routing strategy includes:

[0168] The sending module 701 is used to send filtering information to the first network device, and the filtering information includes: SR policy address family identifier and device identifier of the second network device. The operation performed by the sending module 701 can be referred to Figure 3 S301 in the illustrated embodiment will not be described in detail in the embodiment of the present application.

[0169] The receiving module 702 is configured to receive an SR policy sent by a first network device, wherein the type of the SR policy belongs to the type indicated by the SR policy address family identifier, and the SR policy includes the device identifier of the second network device. The operations performed by the receiving module 702 may refer to Figure 3 The operations related to the second network device in S303 in the illustrated embodiment are not described in detail in this embodiment of the present application.

[0170] In summary, in the segment routing policy transmission device provided in the embodiments of the present application, the sending module can send filtering information to the first network device, so that the first network device can obtain the filtering information and filter at least one received SR policy based on the filtering information. This prevents the first network device from sending an SR policy not intended for the second network device to the second network device, reduces the transmission of useless SR policies in the network transmission system, and reduces the load on the network transmission system.

[0171] For the SR policy filtered out by the first network device for sending to the second network device, the type of the SR policy belongs to the type indicated by the above-mentioned SR policy address family identifier, and the device identifier of the network device to which the SR policy needs to be sent carried by the SR policy is the same as the device identifier of the second network device.

[0172] Optionally, the filtering information also includes: refined filtering information. At this time, the SR policy sent by the first network device to the second network device is obtained by filtering at least one SR policy based on the SR policy address family identifier, the device identifier of the second network device and the refined filtering information. At this time, for the SR policy filtered out by the first network device for sending to the second network device, the type of the SR policy belongs to the type indicated by the above-mentioned SR policy address family identifier, and the device identifier of the network device to which the SR policy is to be sent carried by the SR policy is the same as the device identifier of the second network device, and the relevant information carried by the SR policy matches the refined filtering information in the filtering information.

[0173] Optionally, the type of refined filtering information includes at least one of an identifier, a policy color, and an endpoint.

[0174] Optionally, in the first method of sending filtering information from the second network device to the first network device, the filtering information is carried in an ORF message. The second network device can achieve the purpose of sending the filtering information to the first network device by sending the ORF message to the first network device. The filtering information is carried in an outbound routing filter ORF message. The ORF message includes: an address family identifier field, a subsequent address family identifier field, and an ORF entry field. The SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, and the device identifier of the second network device is carried in the ORF entry field.

[0175] Optionally, the ORF message may further include an ORF type field, which indicates that the ORF message carries indication information and is used for screening SR policies. Of course, the ORF type field may not be used to indicate that the ORF message carries indication information and is used for screening SR policies.

[0176] Optionally, in the second method of sending filtering information from the second network device to the first network device, the filtering information is carried in a CP-ORF message, and the second network device can achieve the purpose of sending the filtering information to the first network device by sending the CP-ORF message to the first network device. The filtering information is carried in an overlay prefix-outbound route filtering CP-ORF message, and the CP-ORF message includes: an address family identifier field, a subsequent address family identifier field, and a virtual private network route target field; wherein the SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, and the device identifier of the second network device is carried in the virtual private network route target field.

[0177] Optionally, in the third manner in which the second network device sends filtering information to the first network device, the filtering information is carried in a CP-ORF message. The CP-ORF message includes: an address family identifier field, a subsequent address family identifier field, a virtual private network route target field, a route type field, and a host address field; the SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, the device identifier of the second network device is carried in the virtual private network route target field, the refined filtering information is carried in the host address field, and the route type field is used to indicate the type included in the refined filtering information.

[0178] In the case of adopting an integrated unit, the transmission device of the segment routing policy for the second network device provided by the present application may include a processing module, a storage module and a communication module. Among them, the processing module can be used to control and manage the actions of the transmission device of the segment routing policy, for example, it can be used to support the transmission device of the segment routing policy to perform the actions performed by the second network device in S301 and S303 above. The storage module can be used to support the transmission device of the segment routing policy to execute storage program code and data, etc. The communication module can be used to support the communication between the transmission device of the segment routing policy and other devices.

[0179] The processing module, storage module and communication module can respectively refer to the processing module, storage module and communication module in the transmission device of the segment routing strategy for the first network device mentioned above, and the embodiments of the present application are not described here.

[0180] In one embodiment, when the processing module is a processor, the storage module is a memory, and the communication module is a communication interface, the transmission device of the segment routing strategy involved in this embodiment can be a transmission device having Figure 2 Network equipment with the structure shown.

[0181] The embodiment of the present application provides a network transmission system, such as Figure 8As shown, the network transmission system may include: a first network device 801 and a second network device 802. The functions of the first network device 801 and the second network device 802 in the system can refer to the functions implemented by the corresponding network devices described in the above embodiments, and will not be described in detail in this embodiment of the present application.

[0182] Optionally, the network transmission system may further include a controller. In a possible implementation, the controller is configured to send filtering information to the first network device, so that the first network device can obtain the filtering information from the first network device.

[0183] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program is used to execute the method used by the first network device to execute in any of the segment routing policy transmission methods provided in the embodiments of the present application.

[0184] An embodiment of the present application provides another computer-readable storage medium, which stores a computer program. The computer program is used to execute the method used by the second network device to execute in any of the segment routing policy transmission methods provided in the embodiments of the present application.

[0185] An embodiment of the present application provides a computer program product comprising instructions. When the computer program product is run on a network device, the network device executes a method for executing by a first network device in any of the segment routing policy transmission methods provided in the embodiments of the present application.

[0186] An embodiment of the present application provides a computer program product containing instructions. When the computer program product is run on a network device, the network device executes the method for the second network device to execute in any of the segment routing policy transmission methods provided in the embodiments of the present application.

[0187] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product, which includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium, or a semiconductor medium (e.g., a solid-state hard disk).

[0188] In this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. The term "at least one" refers to one or more, and "a plurality" refers to two or more, unless otherwise expressly defined.

[0189] The different types of embodiments, such as the method embodiments and device embodiments provided in the embodiments of this application, can refer to each other, and the embodiments of this application are not limited thereto. The order of the operations of the method embodiments provided in the embodiments of this application can be appropriately adjusted, and the operations can be increased or decreased accordingly according to the circumstances. Any person skilled in the art who can easily think of a method of variation within the technical scope disclosed in this application should be included in the scope of protection of this application, and therefore will not be described in detail.

[0190] In the corresponding embodiments provided in this application, it should be understood that the disclosed systems, devices, and apparatuses can be implemented through other structural methods. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0191] The units described as separate components may or may not be physically separate, and the components described as units may or may not be physical units, and may be located in one place or distributed across multiple network devices (e.g., terminal devices). Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0192] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A method for transmitting a segment routing strategy, characterized in that: Executed by a first network device, the method includes: receiving at least one segment routing (SR) policy; Filter the at least one received SR policy according to the filtering information, wherein the filtering information includes the SR policy address family identifier and the device identifier of the second network device; the device identifier of the second network device includes the router identifier of the second network device; The filtered SR policy is sent to the second network device, where the filtered SR policy meets the following conditions: the type of the SR policy belongs to the type indicated by the SR policy address family identifier, and the SR policy includes the device identifier of the second network device.

2. The method according to claim 1, characterized in that The filtering information also includes: refined filtering information.

3. The method according to claim 2, characterized in that The type of the refined filtering information includes at least one of an identifier, a policy color, and an endpoint.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: The first network device obtains the filtering information from the second network device.

5. The method according to claim 4, characterized in that The filtering information is carried in the outbound route filtering ORF message.

6. The method according to claim 5, characterized in that The ORF message includes: an address family identifier field, a subsequent address family identifier field and an ORF entry field; The SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, and the device identifier of the second network device is carried in the ORF entry field.

7. The method according to claim 4, characterized in that The filtering information is carried in a Coverage Prefix-Outbound Route Filter CP-ORF message.

8. The method according to claim 7, characterized in that The CP-ORF message includes: an address family identifier field, a subsequent address family identifier field and a virtual private network routing target field; The SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, and the device identifier of the second network device is carried in the virtual private network routing target field.

9. The method according to any one of claims 1 to 3, characterized in that The method further includes: the first network device obtaining the filtering information from a controller.

10. The method according to any one of claims 1 to 3, characterized in that The first network device is a route reflector RR.

11. The method according to any one of claims 1 to 3, characterized in that The second network device is a forwarding device or a route reflector.

12. A method for transmitting a segment routing strategy, characterized in that: The method comprises: Sending filtering information to the first network device, the filtering information including: a segment routing (SR) policy address family identifier and a device identifier of the second network device; the device identifier of the second network device including a router identifier (router ID) of the second network device; The filtering information instructs the first network device to filter the at least one received segment routing SR policy to obtain an SR policy that meets the conditions: the type of the SR policy belongs to the type indicated by the SR policy address family identifier, and the SR policy includes the device identifier of the second network device.

13. The method according to claim 12, characterized in that The method is performed by the second network device, and the method further includes: The second network device receives the SR policy that meets the conditions and is sent by the first network device.

14. The method according to claim 12, characterized in that The method is executed by a controller.

15. The method according to any one of claims 12 to 14, characterized in that The filtering information also includes: refined filtering information.

16. The method according to claim 15, characterized in that The type of the refined filtering information includes at least one of an identifier, a policy color, and an endpoint.

17. The method according to any one of claims 12 to 14, characterized in that The filtering information is carried in the outbound route filtering ORF message.

18. The method according to claim 17, characterized in that The ORF message includes: an address family identifier field, a subsequent address family identifier field and an ORF entry field; The SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, and the device identifier of the second network device is carried in the ORF entry field.

19. The method according to any one of claims 12 to 14, characterized in that The filtering information is carried in a Coverage Prefix-Outbound Route Filter CP-ORF message.

20. The method according to claim 19, characterized in that The CP-ORF message includes: an address family identifier field, a subsequent address family identifier field, and a virtual private network routing target field; The SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, and the device identifier of the second network device is carried in the virtual private network routing target field.

21. The method according to claim 15, wherein The filtering information is carried in a Coverage Prefix-Outbound Route Filter CP-ORF message, wherein the CP-ORF message includes: an address family identifier field, a subsequent address family identifier field, a virtual private network route target field, a route type field, and a host address field; The SR policy address family identifier is carried in the address family identifier field and the subsequent address family identifier field, the device identifier of the second network device is carried in the virtual private network routing target field, the refined filtering information is carried in the host address field, and the routing type field is used to indicate the type included in the refined filtering information.

22. A network device, characterized in that: The network device includes: a processor and a memory, wherein a program is stored in the memory, and the processor is configured to call the program stored in the memory so that the network device executes the method according to any one of claims 1 to 11.

23. A computer storage medium, characterized in that The storage medium stores a computer program, and when the computer program runs on a processor, the method according to any one of claims 1 to 21 is executed.

24. A computer program product, characterized in that The method comprises a computer program which, when run on a processor, performs the method according to any one of claims 1 to 21.

25. A network transmission system, characterized in that: include: A first network device and a second network device, wherein the first network device is configured to execute the method according to any one of claims 1 to 11.

26. The system according to claim 25, characterized in that The second network device is configured to execute the operations performed by the second network device in the method according to any one of claims 12, 13, and 15-21.

27. The system according to claim 25, wherein: It also includes a controller, characterized in that the controller is used to execute the operations performed by the controller in the method described in any one of claims 12 and 14-21.

Citation Information

Patent Citations

  • ORF processing method and device

    CN107547381A

  • Routing filtering method and device and electronic equipment

    CN110505152A