Path legality verification method and redirection path acquisition method and device
Through the path legality verification method and the redirection path acquisition method, the abnormal traffic problem caused by inter-domain traffic redirection in the BGP protocol is solved and the normal transmission of traffic is ensured.
Patent Information
- Application Number
- CN202310365652.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2024-10-01
AI Technical Summary
In the BGP protocol, inter-domain traffic redirection may cause traffic to be forwarded along unknown AS paths, causing problems such as inter-domain traffic black holes, traffic bypasses, and traffic loops.
Provides a path legality verification method and a redirection path acquisition method. By obtaining the redirected AS path and verifying its legality according to the verification policy, it ensures that the redirected AS path is a legal path and prevents abnormal traffic forwarding.
It effectively avoids abnormal forwarding of inter-domain traffic, ensures normal transmission of traffic, and prevents problems such as traffic black holes, traffic bypasses, and traffic loops.
Smart Images

Figure CN118740707A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a path legitimacy verification method, a redirection path acquisition method and a device. Background Art
[0002] The Border Gateway Protocol (BGP) is a decentralized routing protocol in the Internet. The peer relationship established between two or more peer entities in the same autonomous system (AS) is called (internal / interior BGP, iBGP) neighbor, and the peer relationship established between peer entities belonging to different ASs is called (external / exterior BGP, eBGP) neighbor.
[0003] In the BGP protocol, an AS informs other ASs of the next hop to the destination IP prefix in the BGP route by sending BGP routes. Every time a BGP route passes through an AS, the AS on the path will add its own autonomous system number (ASN) to the AS_path attribute. Routers in other ASs store the received BGP routes in the routing information base (RIB) table.
[0004] Network devices forward received packets according to the forwarding information base (FIB) derived from the RIB table. Usually, for certain management purposes, such as quality of service (QoS) requirements and prevention of traffic attacks, traffic redirection is configured so that traffic is forwarded according to custom rules rather than RIB tables or FIB tables. Traffic redirection technology is a technology that directly matches packets and forwards them according to custom rules on the data plane. Inter-domain traffic redirection is a technology that redirects traffic sent to other autonomous domains, and is usually configured on autonomous system border routers (ASBRs). However, the transparent nature of inter-domain traffic redirection to routing protocols may cause traffic to be forwarded along unknown AS paths, resulting in problems such as inter-domain traffic black holes, traffic detours, and traffic loops. Summary of the invention
[0005] The present application provides a path legitimacy verification method, a redirection path acquisition method and a device to verify the legitimacy of the inter-domain redirection path and ensure normal transmission of traffic.
[0006] In the first aspect of the present application, a path legitimacy verification method is provided, in which a first network device obtains a redirected first AS path, and verifies the legitimacy of the first AS path according to a verification strategy. The verification strategy is used to verify the legitimacy of the AS sequence included in the first AS path. For example, verify whether the AS that performs the redirection operation and the next hop AS corresponding to the AS that performs the redirection operation in the first AS path satisfy a preset sequence relationship, etc. That is, for the AS path after the redirection of the inter-domain traffic, the first network device can verify the legitimacy of the AS sequence included in the AS path to ensure that the redirected AS path is a legal path and ensure the normal transmission of the inter-domain traffic.
[0007] The first network device may obtain the redirected first AS path in the following manner:
[0008] In the first method, a first network device receives a notification message sent by a second network device on a first AS path. The notification message includes the first AS path. In this embodiment, the second network device with a redirection function can perform a redirection operation to obtain the redirected first AS path, and notify other network devices of the redirected first AS path by sending a notification message. The first network device obtains the first AS path based on the notification message.
[0009] The second type is that the first network device obtains the first AS path according to the routing table item and the redirection policy. The redirection policy includes a parameter set, and the routing table item includes the first AS path and the parameter set. In this embodiment, the first network device itself has a redirection function, and it can obtain the first AS path according to its own routing table item and the configured redirection policy. Specifically, it is determined whether the parameter set in the redirection policy matches the parameter set in the routing table item. If the two match, the AS path corresponding to the parameter set in the routing table item is determined as the first AS path.
[0010] Among them, the parameter set may include at least one of the destination prefix or the next hop information. That is, the first network device determines whether the destination prefix in the redirection policy matches the destination prefix in the routing table item, and / or determines whether the next hop information in the redirection policy matches the next hop information in the routing table item. In addition, in some scenarios, the redirection policy can redirect inter-domain traffic from certain source prefixes. Based on this, the parameter set can also include a source prefix, so that when the source prefix in the redirection policy matches the source prefix of the routing table item, the first network device performs a redirection operation.
[0011] After the first network device obtains the first AS path based on the routing table entry and the redirection policy, it can send a notification message to the source AS so that the source AS perceives the redirected first AS path. The notification message includes the first AS path.
[0012] In order to enable the source AS to obtain more relevant information about the redirection, the notification message may also include the identifier of the AS that performs the redirection operation and the redirection strategy used. In order to ensure the correct transmission of the notification message, the AS path through which the notification message is transmitted may also be included, and the AS path includes the identifiers of each AS passed through.
[0013] The first network device verifies the legitimacy of the first AS path according to the verification policy, including the following methods:
[0014] The first is that if the next-hop AS corresponding to the first network device in the first AS path is a customer AS of the AS to which the first network device belongs and the destination prefix matched for redirection is not the prefix announced by the peer AS or operator AS corresponding to the AS to which the first network device belongs, the first network device determines that the first AS path is a legal path.
[0015] If the next hop AS corresponding to the first network device in the first AS path is a peer AS of the AS to which the first network device belongs and the destination prefix matched for redirection is not the prefix announced by the peer AS or operator AS corresponding to the AS to which the first network device belongs, the first network device determines that the first AS path is a legal path.
[0016] The second is that if the next hop AS corresponding to the first network device in the first AS path is a neighbor AS corresponding to the AS to which the first network device belongs, the first network device determines that the first AS path is a legal path. The neighbor AS refers to the next hop of the AS to which the first network device belongs in the direction from the source AS to the AS to which the first network device belongs.
[0017] The third is that if the next hop AS corresponding to the first network device in the first AS path is a preset AS, the first network device determines that the first AS path is a legal path.
[0018] In a second aspect of the present application, a method for obtaining a redirection path is provided, the method comprising: a first network device obtains a routing table entry and a redirection strategy; the first network device obtains a redirected first AS path according to the routing table entry and the redirection strategy. The redirection strategy includes a parameter set, and the routing table entry includes a parameter set and a first AS path.
[0019] For the specific implementation of the first network device acquiring the redirected first AS path according to the routing table entry and the redirection policy, reference may be made to the relevant description in the above-mentioned first aspect.
[0020] In a possible implementation manner, the parameter set includes at least one of a destination prefix or next hop information.
[0021] In a possible implementation manner, the method further includes: the first network device sending a notification message to a source AS, where the notification message includes the first AS path.
[0022] In a third aspect of the present application, a method for obtaining a redirection path is provided, the method comprising: a first network device receives a notification message sent by a second network device, the notification message comprising a redirected first AS path; the first network device obtains the first AS path based on the notification message.
[0023] In a possible implementation, the notification message further includes an identifier of the AS that performs the redirection operation, an AS path through which the notification message is transmitted, and a redirection strategy used for the redirection.
[0024] In the fourth aspect of the present application, a path legitimacy verification device is provided, which is applied to a first network device, and the device includes: an acquisition unit, used to obtain a redirected first autonomous domain AS path; a processing unit, used to verify the legitimacy of the first AS path according to a verification strategy, and the verification strategy is used to verify the legitimacy of the AS sequence included in the first AS path.
[0025] In a possible implementation manner, the obtaining unit is specifically configured to receive a notification message sent by a second network device on the first AS path, where the notification message includes the first AS path.
[0026] In a possible implementation, the acquisition unit is specifically configured to acquire the first AS path according to a routing table entry and a redirection policy, the redirection policy includes a parameter set, and the routing table entry includes the first AS path and the parameter set.
[0027] In a possible implementation manner, the parameter set includes at least one of a destination prefix or next hop information.
[0028] In a possible implementation manner, the parameter set further includes a source prefix.
[0029] In a possible implementation manner, the apparatus further includes: a sending unit, configured for the first network device to send a notification message to a source AS, wherein the notification message includes the first AS path.
[0030] In a possible implementation manner, the notification message further includes an identifier of the AS that performs the redirection operation, an AS path through which the notification message is transmitted, and the redirection policy.
[0031] In a possible implementation, the processing unit is specifically used to determine that the first AS path is a legal path if the next-hop AS corresponding to the first network device in the first AS path is a customer AS of the AS to which the first network device belongs and the destination prefix matched for redirection is not the prefix announced by the peer AS or operator AS corresponding to the AS to which the first network device belongs; and determine that the first AS path is a legal path if the next-hop AS corresponding to the first network device in the first AS path is a peer AS of the AS to which the first network device belongs and the destination prefix matched for redirection is not the prefix announced by the peer AS or operator AS corresponding to the AS to which the first network device belongs.
[0032] In a possible implementation, the processing unit is specifically used to determine that the first AS path is a legal path if the next hop AS corresponding to the first network device in the first AS path is a neighbor AS corresponding to the AS to which the first network device belongs, and the neighbor AS refers to the next hop of the AS to which the first network device belongs in the direction from the source AS to the AS to which the first network device belongs.
[0033] In a possible implementation manner, the processing unit is specifically configured to determine that the first AS path is a legal path if a next hop AS corresponding to the first network device in the first AS path is a preset AS.
[0034] In a fifth aspect of the present application, a redirection path acquisition device is provided, which is applied to a first network device, and the device includes: an acquisition unit, used to acquire routing table items and redirection policies; a processing unit, used to acquire a redirected first AS path according to the routing table items and the redirection policy, the redirection policy includes a parameter set, and the routing table items include a parameter set and the first AS path.
[0035] In a possible implementation manner, the parameter set includes at least one of a destination prefix or next hop information.
[0036] In a possible implementation manner, the device further includes: a sending unit, configured to send a notification message to a source AS, wherein the notification message includes the first AS path.
[0037] In the sixth aspect of the present application, a redirection path acquisition device is provided, which is applied to a first network device, and the device includes: a receiving unit, used to receive a notification message sent by a second network device, the notification message including a redirected first AS path; a processing unit, used to obtain the first AS path based on the notification message.
[0038] In a possible implementation manner, the notification message further includes an identifier of the AS that performs the redirection operation, an AS path through which the notification message is transmitted, and a redirection strategy used for the redirection.
[0039] In a seventh aspect of the present application, a network device is provided, the network device comprising: a processor and a memory;
[0040] The memory is used to store instructions or computer programs;
[0041] The processor is used to execute the instructions or computer program in the memory so that the network device executes the method in the first aspect or any possible design of the first aspect, or executes the method in the second aspect or any possible design of the second aspect, or executes the third aspect or any possible design of the third aspect.
[0042] In an eighth aspect of the present application, a network system is provided, the system comprising: a first network device and a second network device; the first network device is used to execute the method in the first aspect or any possible design of the first aspect, or to execute the method in the second aspect or any possible design of the second aspect, or to execute the method in the third aspect or any possible design of the third aspect; the second network device is used to send a notification message to the first network device.
[0043] In the ninth aspect of the present application, a computer-readable storage medium is provided, comprising instructions, which, when executed on a computer, causes the computer to execute the method in the first aspect or any possible design of the first aspect, or execute the method in the second aspect or any possible design of the second aspect, or execute the method in the third aspect or any possible design of the third aspect.
[0044] In the tenth aspect of the present application, a computer program product is provided, which includes a program. When the program runs on a processor, it enables a computer or a network device to execute the method in the first aspect or any possible design of the first aspect, or execute the method in the second aspect or any possible design of the second aspect, or execute the method in the third aspect or any possible design of the third aspect.
[0045] Through the technical solution provided by the present application, the first network device obtains the first AS path obtained after redirecting the inter-domain traffic, and verifies the legitimacy of the first AS path according to the verification strategy to obtain a verification result. The verification strategy is used to verify the legitimacy of the AS sequence included in the first AS path. That is, for the AS path after redirecting the inter-domain traffic, the first network device can verify the legitimacy of the AS sequence included in the AS path to ensure that the redirected AS path is a legal path and ensure the normal transmission of the inter-domain traffic. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1a A schematic diagram of a redirection application scenario provided in an embodiment of the present application;
[0048] Figure 1b A schematic diagram of another redirection application scenario provided in an embodiment of the present application;
[0049] Figure 2 A flow chart of a path legitimacy verification method provided in an embodiment of the present application;
[0050] Figure 3 A flow chart of a redirection path acquisition method provided in an embodiment of the present application;
[0051] Figure 4 A schematic diagram of a notification message format provided in an embodiment of the present application;
[0052] Figure 5 A flowchart of another redirection path acquisition method provided in an embodiment of the present application;
[0053] Figure 6a A schematic diagram of sending a notification message provided in an embodiment of the present application;
[0054] Figure 6b Another schematic diagram of sending a notification message provided in an embodiment of the present application;
[0055] Figure 7 A schematic diagram of the structure of a path legitimacy verification device provided in an embodiment of the present application;
[0056] Figure 8 A schematic diagram of the structure of a redirection path acquisition device provided in an embodiment of the present application;
[0057] Fig. 9 A schematic diagram of the structure of another redirection path acquisition device provided in an embodiment of the present application;
[0058] Fig.10 A schematic diagram of a network device structure provided in an embodiment of the present application;
[0059] Fig.11 A schematic diagram of another network device structure provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] In order to enable those skilled in the art to better understand the solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments.
[0061] Inter-domain traffic redirection refers to redirecting traffic sent to other ASes to a new next-hop AS, which will result in a new AS forwarding path. Usually, the new AS forwarding path is transparent to the BGP protocol, and other ASes cannot perceive the new AS forwarding path on the control plane. In this way, inter-domain traffic may be forwarded along an illegal AS path, causing problems such as inter-domain traffic black holes, traffic detours, and traffic loops.
[0062] Based on this, the present application provides a path verification method. After obtaining the first AS path for redirecting inter-domain traffic, the legitimacy of the AS sequence included in the AS path is verified using a verification strategy, so that when the redirected AS path is a legal path, the inter-domain traffic is forwarded using the AS path, thereby ensuring the normal transmission of the traffic.
[0063] The following is an example of the system architecture of the embodiment of the present application.
[0064] See also Figure 1a , which is a network system architecture diagram provided by this application, Figure 1a The network system shown includes AS1 to AS5 and other ASs. Among them, AS1 is the source AS corresponding to the inter-domain traffic, which is forwarded from AS1 to other ASs. The normal AS path corresponding to the inter-domain traffic is AS1->AS2->AS3->AS5->other ASs. In this application scenario, a redirection policy is configured on the egress border network device R1 of AS2, and the next hop of the traffic is changed from AS3 to AS4, generating a new AS path AS1->AS2->AS4->AS5->other ASs.
[0065] See also Figure 1b , which is another network system architecture diagram provided by this application, Figure 1b The network system shown includes AS1 to AS5 and other ASs. Among them, AS1 is the source AS corresponding to the inter-domain traffic, which is forwarded from AS1 to other ASs. The normal AS path corresponding to the inter-domain traffic is AS1->AS2->AS3->AS5->other ASs. In this application scenario, a redirection policy is configured on the inlet border network device R2 of AS2, and the traffic reaches the new next-hop AS through different exit border network devices (from the original exit border network device R3 to the exit border network device R4), generating a new AS path AS1->AS2->AS4->AS5->other ASs.
[0066] exist Figure 1a and Figure 1b In the application scenario shown, when there is a route reflector (RR) for route priority, the ingress border network device R2 cannot learn the next hop AS after redirection. In this case, the route reflector enables the ingress border network device R2 to obtain all BGP routes by enabling the add-path feature. The add-path feature is used to announce multiple paths for the same source prefix. Normally, when a network device announces a BGP route, it announces the optimal path. By enabling the add-path feature, the network device will announce the optimal path and the suboptimal path when announcing the BGP route.
[0067] To facilitate understanding of the technical solution provided in the embodiments of the present application, Figure 1a or Figure 1b See the application scenario shown in the figure. Figure 2 , which is a flow chart of a path legitimacy verification method provided by an embodiment of the present application, such as Figure 2 As shown, the method includes:
[0068] S201: A first network device obtains a redirected first AS path.
[0069] In this embodiment, the first network device may be a network device in the source AS. For example, the first network device may be Figure 1a or Figure 1b The first network device may also be a network device in the AS that performs the redirection operation. For example, the first network device may be Figure 1a R1 or Figure 1b Specifically, the first network device may be a controller, a route reflector, a server or a border network device. The border network device may be a border router ASBR.
[0070] The first network device may obtain the first AS path in the following manner: One, the first network device receives a notification message sent by a second network device on the first AS path. The notification message includes the first AS path. That is, the first network device may obtain the first AS path by receiving a notification message sent by a second network device that performs a redirection operation. For example, the first network device is Figure 1a The first network device is a network device in AS1, and the second network device is R1 in AS2. After R1 obtains the redirected AS path according to the redirection policy, it can generate a notification message and send the notification message to the first network device. Another method is that the first network device obtains the first AS path according to the routing table item and the redirection policy. The redirection policy includes a parameter set, and the routing table item includes the first AS path and the parameter set. The parameter set includes at least one of the destination prefix or the next hop information. That is, when the first network device is configured with a redirection policy, the first network device can obtain the first AS path according to its own routing table item and the redirection policy. For example, the first network device is Figure 1a R1 in the example is pre-configured with a redirection policy, which obtains the redirected AS path according to the routing table entry and the redirection policy.
[0071] S202: The first network device verifies the validity of the first AS path according to the verification policy.
[0072] In this embodiment, after the first network device obtains the redirected first AS path, the verification strategy is used to verify the legitimacy of the first AS path. The verification strategy is used to verify the legitimacy of the AS sequence included in the first AS path. That is, the first network device verifies whether the AS sequence included in the first AS path meets the preset conditions according to the verification strategy. If it does, it indicates that the included AS sequence is legal, and then the first AS path is a legal path; otherwise, the first AS path is an illegal path and cannot be used to transmit inter-domain traffic.
[0073] Among them, the first network device can collect conditions for verifying the legitimacy of the AS sequence and generate a verification strategy; or receive a verification strategy issued by a controller or other device. Among them, the verification strategy can verify the legitimacy of the AS sequence included in the first AS path from multiple aspects. For example, whether the AS sequence included in the first AS path satisfies the rules indicated by the first database, whether the AS sequence included in the first AS path satisfies the rules indicated by the second database, and whether the AS sequence included in the first AS path includes a preset AS, etc. Among them, the first database and the second database are different databases. For example, the first database indicates the valley free principle between ASs, and the second database indicates the topological relationship between ASs.
[0074] The no-valley principle defines three AS roles, namely, operator AS, customer AS, and peer AS. Among them, the operator AS provides Internet traversal services for the customer AS, that is, it allows customers to reach other networks through the operator AS. The peer AS and the peer AS autonomous domains and their customers are reachable to each other, and the traffic generated between the peer ASs is shared by the two ASs. The two peer ASs can be two operator ASs or two customer ASs. When selecting routes, the following rules are usually followed: routes announced from customer ASs are allowed to be passed to customer ASs, peer ASs, and operator ASs; routes announced from peer ASs are allowed to be passed to customer ASs, but not allowed to be announced to other peer ASs and operator ASs; routes announced from operator ASs are allowed to be passed to customer ASs, but not allowed to be announced to other peer ASs and operator ASs.
[0075] Based on this, the first network device verifies the legitimacy of the AS sequence included in the first AS path according to the verification policy, including the following situations:
[0076] The first one is that if the next-hop AS corresponding to the first network device in the first AS path is a customer AS of the AS to which the first network device belongs and the destination prefix matched by the redirection is not the prefix announced by the peer AS or operator AS corresponding to the AS to which the first network device belongs, the first network device determines that the first AS path is a legal path. The first network device is a network device that performs the redirection operation, and the AS to which the first network device belongs is the AS that performs the redirection. That is, when the next-hop AS corresponding to the AS to which the first network device belongs in the AS sequence included in the first AS path is a customer AS of the AS to which the first network device belongs, and the destination prefix matched by the first network device when performing redirection according to the redirection policy is not the prefix announced by the peer AS or operator AS corresponding to the AS to which the first network device belongs, then it is determined that the AS sequence included in the first AS path is legal, and the first AS path is a legal path. For example, in Figure 1a In the application scenario shown, the first network device is R1, the AS it belongs to is AS2, and the destination prefix is the prefix P5 corresponding to AS5, then the first AS path is AS2->AS4->AS5. Then the next-hop AS corresponding to the first network device is AS4, then if AS4 is a customer AS of AS2 and the destination prefix P5 matched by the redirection is not the prefix announced by the peer AS or operator AS corresponding to AS2 (that is, AS5 is not the peer AS or operator AS corresponding to AS2), then the first network device determines that the first AS path is a legal path.
[0077] The second type, if the next-hop AS corresponding to the first network device in the first AS path is a peer AS of the AS to which the first network device belongs and the destination prefix matched by the redirection is not the prefix announced by the peer AS or operator AS corresponding to the AS to which the first network device belongs, the first network device determines that the first AS path is a legal path. The first network device is a network device that performs a redirection operation, and the AS to which the first network device belongs is the AS that performs the redirection. That is, when the next-hop AS corresponding to the AS to which the first network device belongs in the AS sequence included in the first AS path is a peer AS of the AS to which the first network device belongs, and the destination prefix matched by the first network device when performing redirection according to the redirection policy is not the prefix announced by the peer AS or operator AS corresponding to the AS to which the first network device belongs, then it is determined that the AS sequence included in the first AS path is legal, and the first AS path is a legal path. For example, in Figure 1a In the application scenario shown, the first network device is R1, the AS to which it belongs is AS2, and the destination prefix is the prefix P5 corresponding to AS5, then the first AS path is AS4->AS5. Then the next-hop AS corresponding to the first network device is AS4. If AS4 is the peer AS of AS2 and the destination prefix P5 matched by the redirection is not the prefix announced by the peer AS or operator AS corresponding to AS2 (that is, AS5 is not the peer AS or operator AS corresponding to AS2), then the first network device determines that the first AS path is a legal path. The destination prefix matched by the redirection must be included in the route announced by the next-hop AS. In addition, in some application scenarios, the peer AS and operator AS corresponding to the AS to which the first network device belongs may announce the same route. Then the first AS path obtained by redirecting the AS to which the first network device belongs between the two is a legal path, but this operation violates the AS's principle of maximizing benefits. Therefore, when redirecting, forward the traffic to the peer AS or customer AS as much as possible.
[0078] The third type, if the next hop AS corresponding to the first network device in the first AS path is the neighbor AS corresponding to the AS to which the first network device belongs, the first network device determines that the first AS path is a legal path. Among them, the neighbor AS refers to the next hop of the AS to which the first network device belongs in the direction from the source AS to the AS to which the first network device belongs. In this embodiment, the AS to which the first network device belongs can be any AS in the AS sequence included in the first AS path, and the first network device is a network device included in any AS. That is, the legitimacy of any AS included in the first AS path is verified. If the next hop AS corresponding to the first network device in any AS in the AS sequence is the neighbor AS corresponding to the AS to which the first network device belongs, then the first AS path is determined to be a legal path.
[0079] Fourthly, if the next hop AS corresponding to the first network device in the first AS path is a preset AS, the first network device determines that the first AS path is a legal path. In this embodiment, the AS to which the first network device belongs can be any AS in the AS sequence included in the first AS path, and the first network device is a network device included in any AS. In specific implementation, a specified AS can be pre-configured on the first network device, and if the first AS path includes the pre-specified AS, the first AS path is determined to be a legal path.
[0080] In addition, to avoid traffic loops, the first AS path should comply with the anti-loop mechanism, that is, the first AS path cannot pass through the redirecting AS or upstream AS. The upstream AS refers to the AS passed in the direction from the source AS to the redirecting AS. The first network device can verify the legitimacy of the first AS path using all of the above methods, or verify the legitimacy of the first AS path based on any combination of methods, which is no longer determined in this embodiment.
[0081] It can be seen that the first network device obtains the first AS path obtained after redirecting the inter-domain traffic, and verifies the legitimacy of the first AS path according to the verification strategy to obtain a verification result. Among them, the verification strategy is used to verify the legitimacy of the AS sequence included in the first AS path. That is, for the AS path after redirecting the inter-domain traffic, the first network device can verify the legitimacy of the AS sequence included in the AS path to ensure that the redirected AS path is a legal path and ensure the normal transmission of the inter-domain traffic.
[0082] The above embodiment mentions two methods for the first network device to obtain the first AS path, which will be described in detail below with reference to the accompanying drawings.
[0083] The first way to obtain it can refer to Figure 3 The corresponding embodiment provides a method for obtaining the redirection path. Figure 3 , which is a flow chart of a redirection path acquisition method provided by an embodiment of the present application, such as Figure 3 As shown, the method includes:
[0084] S301: A first network device receives a notification message sent by a second network device on a first AS path, where the notification message includes the first AS path.
[0085] S302: The first network device obtains a first AS path based on the notification message.
[0086] In this embodiment, if the redirection policy is not configured on the first network device, it can obtain the redirected first AS path by receiving a notification message sent by a second network device with a redirection function. Specifically, after receiving the notification message, the first network device parses the notification message to obtain the first AS path. Among them, the notification message can be a BGP message, a BGP monitoring protocol (BGP monitoring protocol, BMP) message, an intermediate system to intermediate system (Intermediate system to intermediate system, IS-IS) message, and the notification message can use a type length value (type length value, TLV) to carry the first AS path. Among them, the specific form of the notification message can be selected according to the actual application situation, and this embodiment does not limit it here.
[0087] In order to enable the first network device to obtain more information about the first AS path, the notification message may carry not only the first AS path, but also the identifier of the AS that performs the redirection operation, the AS path through which the notification message is transmitted, and the redirection policy and other information. The identifier of the AS that performs the redirection operation refers to the identifier of the AS to which the second network device that performs the redirection operation belongs, for example, Figure 1a The one who performs the redirection operation is R1, and R1 belongs to AS2, so the notification message carries AS2. The AS path through which the notification message is transmitted refers to the AS sequence from the AS that performs the redirection operation to the source AS. For example, Figure 1a If the redirection operation is performed by AS2 and the source AS is AS1, the AS path can include [AS1].
[0088] The format of the notification message is as follows: Figure 4 As shown, it includes a message type (Type) field, a length (Length) field, a redirection AS identifier (Redirection ASN) field, a redirection rules (Redirection rules) field, a redirection AS path (Redireciton_AS_path) field, and a transport AS path (Transport_AS_path) field. Among them, the message type (Type) field is used to indicate the type of the message. For example, the message type field indicates that the message is a message for announcing a redirection AS path. The redirection AS identifier field includes the identifier of the AS that performs the redirection operation, for example, including Figure 1a The redirection rule field includes the redirection strategy used to perform the redirection operation, and the redirection AS path field includes the AS path after redirection. For example, Figure 1aIn the example, the field includes [AS2->AS4->AS5->other AS]. After the redirected AS path is determined, the redirected AS path will be announced to other AS domains. The transmission AS path field includes the AS sequence from the AS performing the redirection operation to the source AS.
[0089] The second way to obtain it can refer to Figure 5 The corresponding embodiment provides a method for obtaining the redirection path. Figure 5 , which is a flow chart of another redirection path acquisition method provided by an embodiment of the present application, such as Figure 5 As shown, the method includes:
[0090] S501: The first network device obtains a routing table entry and a redirection policy.
[0091] S502: The first network device obtains a first AS path according to the routing table entry and the redirection policy.
[0092] In this embodiment, when the first network device is configured with a redirection policy, the first network device can determine the first AS path according to the routing table item and the redirection policy, wherein the redirection policy includes a parameter set, and the routing table item includes the first AS path and the parameter set.
[0093] The routing table entry may be generated by the first network device after receiving the BGP route sent by other ASs. The routing table entry may include three parts, namely, an input routing table, such as Adj-RIBs-In, a local routing table, such as Loc-RIB, and an output routing table, such as Adj-RIBs-Out. Adj-RIBs-In is used to store the routing information learned by the first network device from the BGP neighbor, that is, the initial route. Loc-RIB is used to store the route selected from Adj-RIBs-In after the routing decision, that is, the optimal route. Adj-RIBs-Out is used to store the routing information that the first network device needs to send to the neighbor, that is, the route to be published. The redirection policy may be manually configured on the first network device or obtained from the controller side. Specifically, the first network device may send a request message to the controller to obtain the redirection policy through the request message, or the controller may actively send the redirection policy to the first network device. The parameter set may include information such as the destination prefix, the next hop information, and the source prefix. The next hop information may be an outbound interface identifier to the next hop network device or an IP address of the next hop network device.
[0094] In this embodiment, when the first network device obtains the first AS path according to the routing table entry and the redirection policy, it compares whether the parameter set included in the routing table entry matches the parameter set included in the redirection policy. If they match, the first AS path in the routing table entry is used as the redirected AS path.
[0095] In a possible implementation, the parameter set includes a destination prefix, and if the destination prefix in the routing table item matches the destination prefix in the redirection policy, the first network device uses the first AS path corresponding to the destination prefix in the routing table item as the AS path after redirection. In a possible implementation, the parameter set includes next hop information, and if the next hop information in the routing table item matches the next hop information in the redirection policy, the first network device uses the first AS path corresponding to the next hop information in the routing table item as the AS path after redirection.
[0096] Specifically, in addition to the parameter set, the redirection policy may also include a next hop AS corresponding to the parameter set. When the first network device determines that the parameter set included in the routing table entry matches the parameter set included in the redirection policy, the first network device obtains the next hop AS corresponding to the parameter set in the redirection policy, and obtains the first AS path according to the next hop AS and the AS path included in the routing table entry. Figure 1a In the application scenario shown in the following table, the redirection policy shown in the following table is configured on R1, where SrcIP indicates the source prefix, DstIP indicates the destination prefix, and Port indicates the outbound interface identifier. The prefixes corresponding to AS1 to AS5 are P1-P5 respectively.
[0097] Table 1 Redirection strategy
[0098] Serial number Match Fields Next hop AS 1 SrcIP=P1&DstIP=P5 AS4 2 DstIP=P4 AS4 3 Port = 80 AS4
[0099] For redirection policy 1: it includes both the source prefix and the destination prefix. In this case, if the source prefix of a route in the routing table is P1 and the destination prefix is P5, it indicates that the redirection policy has an impact on the traffic from AS1, and the traffic is redirected to the new next-hop AS, namely AS4. R1 determines that the redirected AS path corresponding to the inter-domain traffic from AS1 is AS2->AS4->AS5 through the Adj-RIBs-in table in the routing table, the destination prefix P5, and the next-hop AS4.
[0100] For redirection policy 2: only the destination prefix is included, and the matching source prefix is not specified. In this case, it indicates that the redirection policy matches all source prefixes, that is, it affects the traffic from each AS. If the destination prefix of a route in the routing table is P4, the traffic is redirected to the new next-hop AS, that is, AS4. R1 determines that the redirected AS path is AS2->AS4 through the Adj-RIBs-in table in the routing table, the destination prefix P4, and the next-hop AS4.
[0101] For redirection policy 3: only the outbound interface identifier is included, and the matching source prefix and destination prefix are not specified. In this case, it indicates that the redirection policy matches all source prefixes and destination prefixes. If the outbound interface identifier of a route in the routing table is 80, the traffic is redirected to the new next-hop AS, namely AS4. R1 determines that the redirected AS path can include AS2->AS4, AS2->AS4->AS5, AS2->AS4->AS5->other AS through the Adj-RIBs-in table in the routing table, the outbound interface identifier 80, and the next-hop AS4.
[0102] If the AS that performs the redirection operation is not connected to the next-hop AS after redirection through the BGP protocol, the next-hop AS cannot be directly obtained based on the redirection policy and BGP neighbor relationship. Additional configuration information needs to be added to the outbound interface to indicate the next-hop AS directly connected to the outbound interface. In addition, when the full routing table is missing in the routing table entry, such as Adj-RIBs-in, the AS path after redirection only contains the next-hop AS.
[0103] In some application scenarios, multiple redirect operations may occur. For example, Figure 1a In the scenario shown, a redirection superposition scenario occurs: the traffic from AS1 is redirected to the new next-hop AS, namely AS4, on AS2. A redirection policy may also be configured on AS4 to redirect to other ASs. Then the forwarding AS path corresponding to the traffic from AS1 is the path after the two redirections are superimposed. That is, from the source AS to the AS of the first redirection, from the AS of the first redirection to the AS of the second redirection, and from the AS of the second redirection to the destination AS. In this scenario, the process of executing the redirection operation each time is similar, and the complete forwarding path includes the path from the source AS to the AS of the first redirection, from the AS of the n-1th redirection to the AS of the nth redirection, and to the destination AS. In this case, the redirecting AS needs to notify the upstream AS of the redirected AS path to determine the legitimacy of the complete AS forwarding path.
[0104] In a possible implementation, after obtaining the first AS path according to the routing table entry and the redirection policy, the first network device may send a notification message to the source AS, where the notification message includes the first AS path, so that the source AS can perceive the redirected AS path. Figure 4 As shown, this embodiment will not be described in detail here.
[0105] Specifically, when the first network device sends the notification message to the source AS, it may perform the notification in a hop-by-hop manner or directly according to the actual application scenario. For ease of understanding, the following will be described in conjunction with the application scenario shown in the accompanying drawings.
[0106] (I) Hop-by-hop announcement of redirected AS paths
[0107] See also Figure 6a As shown, AS1, AS2 and AS3 are included, where AS3 is the AS that performs the redirection operation and AS1 is the source AS. The notification message is forwarded in reverse along the BGP routing propagation path to the source AS, i.e., AS1. The specific implementation steps include:
[0108] (1) The network device that performs the redirection operation in AS3, such as ASBR1, can construct a notification message;
[0109] (2) If ASBR1 has a direct BGP neighbor relationship with the source AS, it directly sends the notification message to the source AS.
[0110] (3) If ASBR1 does not have a direct BGP neighbor relationship with the source AS, ASBR1 obtains the AS_path in the route to the source AS and then fills it in the Transport_AS_path field;
[0111] (4) If ASBR1 knows that it has established a neighbor relationship with a network device in an AS on the Transport_AS_path, such as ASBR2 in AS2, it sends the notification message to ASBR2. Otherwise, it diffuses the notification message to all other ASBRs in the domain.
[0112] (5) If the other ASBR has a BGP neighbor relationship with the AS on the Transport_AS_path, it sends the notification message to the neighboring AS; if not, it discards the notification message;
[0113] (6) For the AS that receives the notification message, if the Transport_AS_path does not contain the AS number of this AS, the notification message is discarded;
[0114] (7) For the AS that receives the notification message, if this AS is the last AS in the Transport_AS_path, that is, the source AS, then it spreads the message to all ASBRs in the source AS domain and stops forwarding the notification message.
[0115] In this embodiment, all ASs on the Transport_AS_path deploy the BGP protocol and support forwarding and redirecting AS path advertisement messages. In addition, since the ASBR needs to check the interface connected to the AS on the Transport_AS_path, additional computing overhead will be incurred.
[0116] (II) Directly announce the redirection AS path
[0117] See also Figure 6a As shown, AS1, AS2 and AS3 are included, where AS3 is the AS that performs the redirection operation and AS1 is the source AS. The address of the network device in the source AS, for example, Server 1, is directly configured on the network device of AS3, for example, Server 2. Server 2 directly sends the notification message to Server 1 of the source AS. The specific implementation steps include:
[0118] (1) The IP address of server 2 of this AS is preconfigured on ASBR2 that performs the redirection operation in AS3.
[0119] (2) ASBR2 constructs a redirected AS path advertisement message and sends it to server 2 in the same AS.
[0120] (3) Server 2 collects the redirection policy and the legal redirection AS path generated by it from the ASBR through protocols such as BGP or BMP;
[0121] (4) Configure the source AS information on Server 2 of AS3, namely, the IP address of Server 1 of AS1 and the source IP range;
[0122] (5) Server 2 constructs a redirection AS path advertisement message of its own AS and sends the generated valid redirection AS path to Server 1 of AS 1.
[0123] (6) Server 1 sends the redirected AS path to other ASBRs in the domain, such as ASBR1, or other servers, to meet the needs of network optimization or security protection projects.
[0124] In this embodiment, the Transport_AS_path field in the notification message is an optional field.
[0125] Based on the above method embodiment, the embodiment of the present application provides a path legitimacy verification device and a redirection path acquisition device, which will be described below in conjunction with the accompanying drawings.
[0126] See also Figure 7 , which is a structural diagram of a path legitimacy verification device provided in an embodiment of the present application, the device is applied to a first network device, or the device can be implemented Figure 1a The function of R1 in the embodiment shown, or the device can realize Figure 1b The function of R2 in the embodiment shown, or the device can realize Figure 6a The function of ASBR1 in the Figure 6b The device 700 may include: an acquisition unit 701 and a processing unit 702. The acquisition unit 701 may execute S201 in the above method embodiment, and the processing unit 702 may execute S202 in the above method embodiment.
[0127] Specifically, the acquisition unit 701 is used to acquire the redirected first autonomous domain AS path; the processing unit 702 is used to verify the legitimacy of the first AS path according to the verification strategy, and the verification strategy is used to verify the legitimacy of the AS sequence included in the first AS path.
[0128] In a possible implementation manner, the obtaining unit 701 is specifically configured to receive a notification message sent by a second network device on the first AS path, where the notification message includes the first AS path.
[0129] In a possible implementation manner, the acquisition unit 701 is specifically configured to acquire the first AS path according to a routing table entry and a redirection policy, the redirection policy includes a parameter set, and the routing table entry includes the first AS path and the parameter set.
[0130] In a possible implementation, the parameter set includes at least one of a destination prefix or next hop information. The parameter set also includes a source prefix.
[0131] In a possible implementation, the device further includes: a sending unit (not shown in Figure 7 As shown in the figure), the sending unit is used for the first network device to send a notification message to the source AS, and the notification message includes the first AS path.
[0132] In a possible implementation manner, the notification message further includes an identifier of the AS that performs the redirection operation, an AS path through which the notification message is transmitted, and the redirection policy.
[0133] In a possible implementation, the processing unit 702 is specifically used to determine that the first AS path is a legal path if the next-hop AS corresponding to the first network device in the first AS path is a customer AS of the AS to which the first network device belongs and the destination prefix matched for redirection is not the prefix announced by the peer AS or operator AS corresponding to the AS to which the first network device belongs; and to determine that the first AS path is a legal path if the next-hop AS corresponding to the first network device in the first AS path is a peer AS of the AS to which the first network device belongs and the destination prefix matched for redirection is not the prefix announced by the peer AS or operator AS corresponding to the AS to which the first network device belongs.
[0134] In a possible implementation, the processing unit 702 is specifically used to determine that the first AS path is a legal path if the next hop AS corresponding to the first network device in the first AS path is a neighbor AS corresponding to the AS to which the first network device belongs, and the neighbor AS refers to the next hop of the AS to which the first network device belongs in the direction from the source AS to the AS to which the first network device belongs.
[0135] In a possible implementation manner, the processing unit 702 is specifically configured to determine that the first AS path is a legal path if the next hop AS corresponding to the first network device in the first AS path is a preset AS.
[0136] In this embodiment, the implementation of each unit can refer to the above Figure 2 The specific implementation process of the first network device in the illustrated method embodiment will not be repeated here.
[0137] See also Figure 8 , which is a redirection path acquisition device provided in an embodiment of the present application, the device is applied to a first network device, or the device can be implemented Figure 1a The function of R1 in the embodiment shown, or the device can realize Figure 1b The function of R2 in the embodiment shown, or the device can realize Figure 6a The function of ASBR1 in the Figure 6b The device 800 may include: an acquisition unit 801 and a processing unit 802. The acquisition unit 801 may execute S501 in the above method embodiment, and the processing unit 802 may execute S502 in the above method embodiment.
[0138] Specifically, the acquisition unit 801 is used to obtain routing table entries and redirection policies; the processing unit 802 is used to obtain the redirected first AS path according to the routing table entries and the redirection policy, the redirection policy includes a parameter set, and the routing table entries include a parameter set and the first AS path.
[0139] In a possible implementation manner, the parameter set includes at least one of a destination prefix or next hop information.
[0140] In a possible implementation manner, the device further includes: a sending unit, configured to send a notification message to a source AS, wherein the notification message includes the first AS path.
[0141] In this embodiment, the implementation of each unit can refer to the above Figure 5 The specific implementation process of the first network device in the illustrated method embodiment will not be repeated here.
[0142] See also Fig. 9 , which is a redirection path acquisition device provided in an embodiment of the present application, the device is applied to a first network device, or the device can be implemented Figure 6a The function of ASBR2 in the Figure 6b The device 900 may include: a receiving unit 901 and a processing unit 902. The receiving unit 901 may execute S301 in the above method embodiment, and the processing unit 902 may execute S302 in the above method embodiment.
[0143] Specifically, the receiving unit 901 is used to receive a notification message sent by the second network device, where the notification message includes a redirected first AS path; and the processing unit 902 is used to obtain the first AS path based on the notification message.
[0144] In a possible implementation manner, the notification message further includes an identifier of the AS that performs the redirection operation, an AS path through which the notification message is transmitted, and a redirection strategy used for the redirection.
[0145] In this embodiment, the implementation of each unit can refer to the above Figure 3 The specific implementation process of the first network device in the illustrated method embodiment will not be repeated here.
[0146] The division of units in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. The functional units in the embodiments of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. For example, in the above embodiments, the processing unit and the sending unit may be the same unit or different units. The above integrated units may be implemented in the form of hardware or in the form of software functional units.
[0147] The hardware structure of the aforementioned apparatus 700, apparatus 800 and apparatus 900 may be as follows: Fig.10 The structure shown, Fig.10 A schematic diagram of the structure of a network device provided in an embodiment of the present application, the network device may be, for example, the first network device or the second network device in the above method embodiment.
[0148] The network device 1000 includes: a processor 1010, a communication interface 1020 and a memory 1030. The number of the processor 1010 in the communication device 1000 can be one or more. Fig.10 In the embodiment of the present application, the processor 1010, the communication interface 1020 and the memory 1030 may be connected via a bus system or other means, wherein: Fig.10In the example, the connection through the bus system 1040 is taken as an example. The processor 1010 can be a CPU, an NP, or a combination of a CPU and an NP. The processor 1010 can further include a hardware chip. The above-mentioned hardware chip can be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. The memory 1030 can include a volatile memory (volatile memory), such as a random-access memory (RAM); the memory 1030 can also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a hard disk drive (HDD) or a solid-state drive (SSD); the memory 1030 can also include a combination of the above-mentioned types of memory. The memory 1030 can, for example, store the segmented routing SR strategy mentioned above. Optionally, the memory 1030 stores an operating system and programs, executable modules or data structures, or a subset thereof, or an extended set thereof, wherein the program may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic services and processing hardware-based tasks. The processor 1010 can read the program in the memory 1030 to implement the method provided in the embodiment of the present application. Among them, the memory 1030 can be a storage device in the communication device 1000, or it can be a storage device independent of the communication device 1000. The bus system 1040 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus system 1040 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0149] The hardware structure of the aforementioned apparatus 700, apparatus 800 and apparatus 900 may be as follows: Fig.11 The structure shown, Fig.11A schematic diagram of the structure of a network device provided in an embodiment of the present application, the network device may be, for example, the first network device and the second network device in the above method embodiment. The network device 1100 includes: a main control board 1110 and an interface board 1130. The main control board 1110 is also called a main processing unit (MPU) or a route processing card (routeprocessor card). The main control board 1110 controls and manages each component in the network device 1100, including routing calculation, device management, device maintenance, and protocol processing functions. The main control board 1110 includes: a central processing unit 1111 and a memory 1112. The interface board 1130 is also called a line interface unit card (line processing unit, LPU), a line card (line card) or a service board. The interface board 1130 is used to provide various service interfaces and realize the forwarding of data packets. The service interface includes but is not limited to an Ethernet interface, a POS (Packet over SONET / SDH) interface, etc., and the Ethernet interface is, for example, a flexible Ethernet service interface (Flexible Ethernet Clients, FlexE Clients). The interface board 1130 includes: a central processor 1131, a network processor 1132, a forwarding table entry memory 1134 and a physical interface card (PIC) 1133. The central processor 1131 on the interface board 1130 is used to control and manage the interface board 1130 and communicate with the central processor 1111 on the main control board 1110. The network processor 1132 is used to implement message forwarding processing. The network processor 1132 can be in the form of a forwarding chip. Specifically, the processing of uplink messages includes: message inbound interface processing, forwarding table search; the processing of downlink messages includes forwarding table search, etc. The physical interface card 1133 is used to implement the docking function of the physical layer, the original traffic enters the interface board 1130, and the processed message is sent from the physical interface card 1133. The physical interface card 1133 includes at least one physical interface, which is also called a physical port. The physical interface card 1133, also called a daughter card, can be installed on the interface board 1130, and is responsible for converting the optical signal into a message and forwarding the message to the network processor 1132 for processing after checking the legitimacy of the message. In some embodiments, the central processor 1131 of the interface board 1103 can also perform the functions of the network processor 1132, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 1132 is not required in the physical interface card 1133. Optionally, the network device 1100 includes multiple interface boards, for example, the network device 1100 also includes an interface board 1140, and the interface board 1140 includes: a central processor 1141, a network processor 1142, a forwarding table entry memory 1144 and a physical interface card 1143.Optionally, the network device 1100 further includes a switching fabric board 1120. The switching fabric board 1120 may also be referred to as a switch fabric unit (SFU). When the network device has multiple interface boards 1130, the switching fabric board 1120 is used to complete data exchange between the interface boards. For example, the interface board 1130 and the interface board 1140 may communicate through the switching fabric board 1120. The main control board 1110 and the interface board 1130 are coupled. For example. The main control board 1110, the interface board 1130 and the interface board 1140, and the switching fabric board 1120 are connected to the system backplane through a system bus to achieve intercommunication. In a possible implementation, an inter-process communication protocol (IPC) channel is established between the main control board 1110 and the interface board 1130, and the main control board 1110 and the interface board 1130 communicate through the IPC channel. Logically, the network device 1100 includes a control plane and a forwarding plane. The control plane includes a main control board 1110 and a central processing unit 1131. The forwarding plane includes various components for performing forwarding, such as a forwarding table entry memory 1134, a physical interface card 1133, and a network processor 1132. The control plane executes functions such as a router, generates a forwarding table, processes signaling and protocol messages, and configures and maintains the status of the device. The control plane sends the generated forwarding table to the forwarding plane. On the forwarding plane, the network processor 1132 forwards the message received by the physical interface card 1133 based on the forwarding table sent by the control plane. The forwarding table sent by the control plane can be stored in the forwarding table entry memory 1134. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device. It should be understood that the operation on the interface board 1140 in the embodiment of the present application is consistent with the operation of the interface board 1130, and for the sake of brevity, it will not be repeated. It should be understood that the network device 1100 of this embodiment may correspond to the first network device in the above-mentioned method embodiments. The main control board 1110, interface board 1130 and / or interface board 1140 in the network device 1100 can implement various steps in the above-mentioned method embodiments. For the sake of brevity, they will not be repeated here.
[0150] It should be understood that there may be one or more main control boards, and when there are multiple boards, they may include a primary main control board and a backup main control board. There may be one or more interface boards. The stronger the data processing capability of the network device, the more interface boards are provided. There may also be one or more physical interface cards on the interface board. There may be no switching network board, or there may be one or more switching network boards. When there are multiple switching network boards, they can jointly realize load sharing and redundant backup. Under a centralized forwarding architecture, the network device may not need a switching network board, and the interface board is responsible for the processing function of the business data of the entire system. Under a distributed forwarding architecture, the network device may have at least one switching network board, and the switching network board is used to realize data exchange between multiple interface boards, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network devices with a distributed architecture are greater than those of devices with a centralized architecture. Optionally, the network device may have only one board, that is, no switching board, and the functions of the interface board and the main control board are integrated on the board. In this case, the central processor on the interface board and the central processor on the main control board can be combined into one central processor on the board to perform the functions of the two. This type of device has low data exchange and processing capabilities (for example, low-end switches or routers and other network devices). The specific architecture to be adopted depends on the specific networking deployment scenario.
[0151] In some possible embodiments, the above-mentioned network device can be implemented as a virtualized device. For example, the virtualized device can be a virtual machine (VM) running a program for sending message functions, and the virtual machine is deployed on a hardware device (for example, a physical server). A virtual machine refers to a complete computer system with complete hardware system functions and running in a completely isolated environment simulated by software. A virtual machine can be configured as a network device. For example, a network device can be implemented based on a general physical server in combination with network function virtualization (NFV) technology. The network device is a virtual host, a virtual router or a virtual switch. Those skilled in the art can virtualize a network device with the above-mentioned functions on a general physical server in combination with NFV technology by reading this application, which will not be repeated here.
[0152] It should be understood that the network devices in the above-mentioned various product forms have any functions of the first network device or the second network device in the above-mentioned method embodiment, which will not be repeated here.
[0153] The present application also provides a chip including a processor and an interface circuit, wherein the interface circuit is used to receive instructions and transmit them to the processor; the processor may be, for example, Figure 7A specific implementation form of the device 700 shown can be used to perform the above method. The processor is coupled to a memory, and the memory is used to store programs or instructions. When the program or instruction is executed by the processor, the chip system implements the method in any of the above method embodiments.
[0154] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
[0155] Optionally, the memory in the chip system may be one or more. The memory may be integrated with the processor or may be separately provided with the processor, which is not limited in the present application. Exemplarily, the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be provided on different chips. The present application does not specifically limit the type of memory and the arrangement of the memory and the processor.
[0156] Exemplarily, the chip system can be a field programmable gate array (FPGA), an application-specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.
[0157] An embodiment of the present application also provides a network device system, including a first network device and a second network device, wherein the first network device executes the corresponding method of the above embodiment; the second network device executes the corresponding method of the above embodiment.
[0158] An embodiment of the present application also provides a computer-readable storage medium, including instructions or computer programs, which, when executed on a computer, enable the computer to execute the path legitimacy verification method or redirection path acquisition method provided in the above embodiments.
[0159] The embodiments of the present application also provide a computer program product including instructions or computer programs, which, when executed on a computer, enables the computer to execute the path legitimacy verification method or redirection path acquisition method provided in the above embodiments.
[0160] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0161] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0162] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical business division. There may be other division methods in actual implementation. For example, 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 an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0163] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0164] In addition, each business unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software business units.
[0165] If the integrated unit is implemented in the form of a software business unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0166] Those skilled in the art should be aware that in one or more of the above examples, the services described in this application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these services can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any media that facilitates the transmission of computer programs from one place to another. Storage media can be any available media that a general or special-purpose computer can access.
[0167] The above specific implementation methods further describe in detail the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above are only specific implementation methods of the present application.
[0168] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A path legitimacy verification method, characterized in that: The method comprises: The first network device obtains a redirected first autonomous domain AS path; The first network device verifies the legitimacy of the first AS path according to a verification policy, where the verification policy is used to verify the legitimacy of the AS sequence included in the first AS path.
2. The method according to claim 1, characterized in that: The first network device obtaining the redirected first autonomous domain AS path includes: The first network device receives a notification message sent by a second network device on the first AS path, where the notification message includes the first AS path.
3. The method according to claim 1, characterized in that The first network device obtaining the redirected first autonomous domain AS path includes: The first network device obtains the first AS path according to a routing table entry and a redirection policy, the redirection policy includes a parameter set, and the routing table entry includes the first AS path and the parameter set.
4. The method according to claim 3, characterized in that The parameter set includes at least one of a destination prefix or next hop information.
5. The method according to claim 4, characterized in that The parameter set also includes a source prefix.
6. The method according to any one of claims 3 to 5, characterized in that: The method further comprises: The first network device sends a notification message to a source AS, where the notification message includes the first AS path.
7. The method according to claim 6, characterized in that The notification message also includes the identifier of the AS that performs the redirection operation, the AS path through which the notification message is transmitted, and the redirection strategy.
8. The method according to any one of claims 1 to 7, characterized in that: The first network device verifies the legitimacy of the first AS path according to the verification policy, including: If the next hop AS corresponding to the first network device in the first AS path is a customer AS of the AS to which the first network device belongs and the destination prefix matched for redirection is not a prefix announced by the peer AS or operator AS corresponding to the AS to which the first network device belongs, the first network device determines that the first AS path is a legal path; If the next-hop AS corresponding to the first network device in the first AS path is a peer AS of the AS to which the first network device belongs and the destination prefix matched for redirection is not the prefix announced by the peer AS or operator AS corresponding to the AS to which the first network device belongs, the first network device determines that the first AS path is a legal path.
9. The method according to any one of claims 1 to 7, characterized in that: The first network device verifies the legitimacy of the first AS path according to the verification policy, including: If the next hop AS corresponding to the first network device in the first AS path is the neighbor AS corresponding to the AS to which the first network device belongs, the first network device determines that the first AS path is a legal path, and the neighbor AS refers to the next hop of the AS to which the first network device belongs in the direction from the source AS to the AS to which the first network device belongs.
10. The method according to any one of claims 1 to 7, characterized in that: The first network device verifies the legitimacy of the first AS path according to the verification policy, including: If the next hop AS corresponding to the first network device in the first AS path is a preset AS, the first network device determines that the first AS path is a legal path.
11. A method for obtaining a redirection path, characterized in that: The method comprises: The first network device obtains a routing table entry and a redirection strategy; The first network device obtains a redirected first AS path according to the routing table entry and the redirection policy, the redirection policy includes a parameter set, and the routing table entry includes a parameter set and the first AS path.
12. The method according to claim 11, characterized in that The parameter set includes at least one of a destination prefix or next hop information.
13. The method according to claim 11 or 12, characterized in that: The method further comprises: The first network device sends a notification message to a source AS, where the notification message includes the first AS path.
14. A method for obtaining a redirection path, characterized in that: The method comprises: The first network device receives a notification message sent by the second network device, where the notification message includes a redirected first AS path; The first network device obtains the first AS path based on the notification message.
15. The method according to claim 14, characterized in that The notification message also includes the identifier of the AS that performs the redirection operation, the AS path through which the notification message is transmitted, and the redirection strategy used for the redirection.
16. A path legitimacy verification device, characterized in that: The device is applied to a first network device, and the device includes: An acquiring unit, configured to acquire a redirected first autonomous domain AS path; A processing unit is used to verify the legitimacy of the first AS path according to a verification strategy, wherein the verification strategy is used to verify the legitimacy of the AS sequence included in the first AS path.
17. The device according to claim 16, characterized in that The acquisition unit is specifically configured to receive a notification message sent by a second network device on the first AS path, wherein the notification message includes the first AS path.
18. The device according to claim 16, characterized in that The acquisition unit is specifically configured to acquire the first AS path according to a routing table entry and a redirection policy, wherein the redirection policy includes a parameter set, and the routing table entry includes the first AS path and the parameter set.
19. The device according to claim 18, characterized in that The parameter set includes at least one of a destination prefix or next hop information.
20. The device according to claim 19, characterized in that The parameter set also includes a source prefix.
21. The device according to any one of claims 18 to 20, characterized in that The device also includes: A sending unit is used for the first network device to send a notification message to a source AS, where the notification message includes the first AS path.
22. The device according to claim 21, characterized in that The notification message also includes the identifier of the AS that performs the redirection operation, the AS path through which the notification message is transmitted, and the redirection strategy.
23. The device according to any one of claims 16 to 22, characterized in that: The processing unit is specifically used to determine that the first AS path is a legal path if the next-hop AS corresponding to the first network device in the first AS path is a customer AS of the AS to which the first network device belongs and the destination prefix matched for redirection is not the prefix announced by the peer AS or operator AS corresponding to the AS to which the first network device belongs; and to determine that the first AS path is a legal path if the next-hop AS corresponding to the first network device in the first AS path is a peer AS of the AS to which the first network device belongs and the destination prefix matched for redirection is not the prefix announced by the peer AS or operator AS corresponding to the AS to which the first network device belongs.
24. The device according to any one of claims 16 to 22, characterized in that The processing unit is specifically used to determine that the first AS path is a legal path if the next hop AS corresponding to the first network device in the first AS path is a neighbor AS corresponding to the AS to which the first network device belongs, and the neighbor AS refers to the next hop of the AS to which the first network device belongs in the direction from the source AS to the AS to which the first network device belongs.
25. The device according to any one of claims 16 to 22, characterized in that The processing unit is specifically configured to determine that the first AS path is a legal path if the next hop AS corresponding to the first network device in the first AS path is a preset AS.
26. A redirection path acquisition device, characterized in that: The device is applied to a first network device, and the device includes: An acquisition unit, used to acquire routing table entries and redirection strategies; A processing unit is used to obtain a redirected first AS path according to the routing table entry and the redirection policy, the redirection policy includes a parameter set, and the routing table entry includes a parameter set and the first AS path.
27. The device according to claim 26, characterized in that The parameter set includes at least one of a destination prefix or next hop information.
28. The device according to claim 26 or 27, characterized in that The device also includes: A sending unit is used to send a notification message to a source AS, where the notification message includes the first AS path.
29. A redirection path acquisition device, characterized in that: The device is applied to a first network device, and the device includes: A receiving unit, configured to receive a notification message sent by the second network device, wherein the notification message includes a redirected first AS path; A processing unit, configured to obtain the first AS path based on the notification message.
30. The device according to claim 29, characterized in that The notification message also includes the identifier of the AS that performs the redirection operation, the AS path through which the notification message is transmitted, and the redirection strategy used for the redirection.
31. A network device, characterized in that: The routing device includes: a processor, the processor is coupled to a memory, the memory stores at least one computer program instruction, and the at least one computer program instruction is loaded and executed by the processor to enable the network device to implement the method described in any one of claims 1 to 10, or the method described in any one of claims 11 to 13, or the method described in claim 14 or 15.
32. A computer-readable storage medium, characterized in that: The method comprises instructions which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 10, or the method according to any one of claims 11 to 13, or the method according to claim 14 or 15.
Citation Information
Cited By
Path legitimacy verification method and apparatus, and redirected path acquisition method and apparatus
EP4694071A1
Path legitimacy verification method and apparatus, and redirected path acquisition method and apparatus
WO2024198959A1
