Path legitimacy verification method and apparatus, and redirected path acquisition method and apparatus
By verifying the legitimacy of the AS path after inter-domain traffic redirection in the network device, the problem of abnormal traffic forwarding caused by inter-domain traffic redirection in the BGP protocol is solved and the normal transmission of traffic is ensured.
Patent Information
- Application Number
- PCT/CN2024/081694
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-30
- Filing Date
- 2024-03-14
- Publication Date
- 2024-10-03
AI Technical Summary
Inter-domain traffic redirection in the BGP protocol may cause traffic to be forwarded along unknown AS paths, causing problems such as inter-domain traffic black holes, traffic bypasses, and traffic loops.
By implementing the path legality verification method in the network device, the redirected AS path is obtained and its legality is verified according to the verification policy to ensure that the redirected AS path is a legal path and prevent abnormal traffic forwarding.
It effectively avoids abnormal forwarding of inter-domain traffic, ensures normal traffic transmission, and prevents problems such as traffic black holes, traffic bypasses, and traffic loops.
Smart Images

Figure CN2024081694_03102024_PF_FP_ABST
Abstract
Description
A path legitimacy verification method, redirection path acquisition method and device
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 30, 2023, with application number CN202310365652.4 and invention name “A method for verifying the legitimacy of a path, a method and device for obtaining a redirected path”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] 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
[0003] The Border Gateway Protocol (BGP) is a decentralized routing protocol on the Internet. The peer relationship established between two or more peer entities in the same autonomous system (AS) is called an internal / interior BGP, iBGP neighbor. The peer relationship established between peer entities belonging to different ASs is called an external / exterior BGP, eBGP neighbor.
[0004] In the BGP protocol, an AS sends a BGP route to inform other ASs of the next hop to the destination IP prefix in the BGP route. Each time a BGP route passes through an AS, the AS along the path adds its autonomous system number (ASN) to the AS path attribute. Routers in other ASs store the received BGP routes in their routing information base (RIB).
[0005] Network devices forward received packets based on the forwarding information base (FIB) derived from the RIB table. Typically, for certain management purposes, such as quality of service (QoS) requirements and preventing 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 based on 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 fact that inter-domain traffic redirection is transparent 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.
[0006] Summary of the Invention
[0007] The present application provides a path legitimacy verification method, a redirection path acquisition method and an apparatus to verify the legitimacy of the inter-domain redirection path and ensure normal traffic transmission.
[0008] 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 policy. The verification policy is used to verify the legitimacy of the AS sequence included in the first AS path. For example, it verifies 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. That is, for the AS path after the redirection of 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 legitimate path and to ensure the normal transmission of inter-domain traffic.
[0009] The first network device may obtain the redirected first AS path in the following manner:
[0010] In the first method, a first network device receives a notification message from 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 redirection functionality 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.
[0011] Second, the first network device obtains the first AS path based on 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. In this embodiment, the first network device itself has a redirection function and can obtain the first AS path based on its own routing table entry and the configured redirection policy. Specifically, it determines whether the parameter set in the redirection policy matches the parameter set in the routing table entry. If so, the AS path corresponding to the parameter set in the routing table entry is determined as the first AS path.
[0012] 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 entry, and / or determines whether the next hop information in the redirection policy matches the next hop information in the routing table entry. In addition, in some scenarios, the redirection policy may redirect inter-domain traffic from certain source prefixes. Based on this, the parameter set may also include a source prefix, so that when the source prefix in the redirection policy matches the source prefix in the routing table entry, the first network device performs the redirection operation.
[0013] 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 is aware of the redirected first AS path.
[0014] To allow the source AS to obtain more relevant information about the redirection, the notification message can also include the identifier of the AS performing the redirection operation and the redirection policy used. To ensure the correct transmission of the notification message, the AS path along which the notification message is transmitted can also be included, which includes the identifiers of each AS it passes through.
[0015] The first network device verifies the validity of the first AS path according to the verification policy, including the following methods:
[0016] 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 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.
[0017] 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.
[0018] The second type is that if the next-hop AS corresponding to the first network device in the first AS path is a neighboring AS corresponding to the AS to which the first network device belongs, the first network device determines that the first AS path is a valid path. The neighboring AS is the next-hop AS of the first network device's AS in the direction from the source AS to the first network device's AS.
[0019] The third type 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.
[0020] In a second aspect of the present application, a redirection path acquisition method is provided, the method comprising: a first network device acquiring a routing table entry and a redirection policy; and the first network device acquiring a first AS path for redirection based on the routing table entry and the redirection policy. The redirection policy includes a parameter set, and the routing table entry includes the parameter set and the first AS path.
[0021] Regarding the specific implementation of the first network device obtaining 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.
[0022] In a possible implementation, the parameter set includes at least one of a destination prefix or next hop information.
[0023] 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.
[0024] In a third aspect of the present application, a redirection path acquisition method is provided, the method comprising: a first network device receives a notification message sent by a second network device, the notification message including a redirected first AS path; the first network device acquires the first AS path based on the notification message.
[0025] 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 policy used for the redirection.
[0026] 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 for obtaining a redirected first autonomous domain AS path; a processing unit for verifying the legitimacy of the first AS path according to a verification policy, and the verification policy is used to verify the legitimacy of the AS sequence included in the first AS path.
[0027] In a possible implementation manner, the acquiring 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.
[0028] In a possible implementation, the acquiring 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.
[0029] In a possible implementation manner, the parameter set includes at least one of a destination prefix or next hop information.
[0030] In a possible implementation manner, the parameter set further includes a source prefix.
[0031] In a possible implementation manner, the apparatus further includes: a sending unit, configured to send, by the first network device, a notification message to a source AS, where the notification message includes the first AS path.
[0032] 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 the redirection policy.
[0033] In one 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 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.
[0034] In one 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.
[0035] In a possible implementation, 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.
[0036] In the 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 obtain a routing table entry and a redirection policy; a processing unit, 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.
[0037] In a possible implementation manner, the parameter set includes at least one of a destination prefix or next hop information.
[0038] In a possible implementation manner, the apparatus further includes: a sending unit, configured to send a notification message to a source AS, where the notification message includes the first AS path.
[0039] 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 for receiving a notification message sent by a second network device, wherein the notification message includes a redirected first AS path; and a processing unit for obtaining the first AS path based on the notification message.
[0040] 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 policy used for the redirection.
[0041] In a seventh aspect of the present application, a network device is provided, comprising: a processor and a memory;
[0042] The memory is used to store instructions or computer programs;
[0043] 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.
[0044] In an eighth aspect of the present application, a network system is provided, comprising: a first network device and a second network device; the first network device is configured to execute the method of the first aspect or any possible design of the first aspect, or execute the method of the second aspect or any possible design of the second aspect, or execute the method of the third aspect or any possible design of the third aspect; the second network device is configured to send a notification message to the first network device.
[0045] In the ninth aspect of the present application, a computer-readable storage medium is provided, comprising instructions which, when executed on a computer, cause the computer to execute the method of the first aspect or any possible design of the first aspect, or execute the method of the second aspect or any possible design of the second aspect, or execute the method of the third aspect or any possible design of the third aspect.
[0046] 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.
[0047] Through the technical solution provided by this application, a first network device obtains a first AS path obtained after redirecting inter-domain traffic, and verifies the legitimacy of the first AS path according to a verification policy to obtain a verification result. The verification policy is used to verify the legitimacy of the AS sequence included in the first AS path. That is, for the AS path after redirecting 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 legitimate path, thereby ensuring the normal transmission of inter-domain traffic. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0049] FIG1a is a schematic diagram of a redirection application scenario provided by an embodiment of the present application;
[0050] FIG1b is a schematic diagram of another redirection application scenario provided by an embodiment of the present application;
[0051] FIG2 is a flow chart of a path legitimacy verification method provided in an embodiment of the present application;
[0052] FIG3 is a flow chart of a method for obtaining a redirection path provided in an embodiment of the present application;
[0053] FIG4 is a schematic diagram of a notification message format provided in an embodiment of the present application;
[0054] FIG5 is a flow chart of another redirection path acquisition method provided in an embodiment of the present application;
[0055] FIG6a is a schematic diagram of sending a notification message according to an embodiment of the present application;
[0056] FIG6b is another schematic diagram of sending a notification message provided in an embodiment of the present application;
[0057] FIG7 is a schematic diagram of the structure of a path legitimacy verification device provided in an embodiment of the present application;
[0058] FIG8 is a schematic structural diagram of a redirection path acquisition device provided in an embodiment of the present application;
[0059] FIG9 is a schematic structural diagram of another redirection path acquisition device provided in an embodiment of the present application;
[0060] FIG10 is a schematic diagram of a network device structure provided in an embodiment of the present application;
[0061] FIG11 is a schematic diagram of another network device structure provided in an embodiment of the present application. DETAILED DESCRIPTION
[0062] In order to enable people in this technical field to better understand the solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in combination with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.
[0063] Inter-domain traffic redirection redirects traffic destined for other ASes to a new next-hop AS, creating a new AS forwarding path. Typically, this new AS forwarding path is transparent to BGP, and other ASes are unaware of it on the control plane. Consequently, inter-domain traffic may be forwarded along illegal AS paths, causing inter-domain traffic black holes, traffic detours, and traffic loops.
[0064] Based on this, the present application provides a path verification method. After obtaining the first AS path for redirecting inter-domain traffic, the verification strategy is used to verify the legitimacy of the AS sequence included in the AS path, 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.
[0065] The following is an example of the system architecture of the embodiment of the present application.
[0066] Refer to Figure 1a, which is a diagram of a network system architecture provided by this application. The network system shown in Figure 1a includes AS1 through AS5, as well as other ASs. AS1 is the source AS for inter-domain traffic, which is forwarded from AS1 to other ASs. The normal AS path for this inter-domain traffic is AS1->AS2->AS3->AS5->other ASs. In this application scenario, a redirection policy is configured on AS2's egress edge network device R1, changing the next hop of the traffic from AS3 to AS4, creating a new AS path of AS1->AS2->AS4->AS5->other ASs.
[0067] Refer to Figure 1b, which is another network system architecture diagram provided by the present application. The network system shown in Figure 1b includes AS1 to AS5 and other ASs. Among them, AS1 is the source AS corresponding to the inter-domain traffic, and forwarding is carried out 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 ingress boundary network device R2 of AS2, and the traffic reaches the new next-hop AS through different egress boundary network devices (from the original egress boundary network device R3 to the egress boundary network device R4), generating a new AS path AS1->AS2->AS4->AS5->other ASs.
[0068] In the application scenarios shown in Figures 1a and 1b, when a route reflector (RR) is used for route prioritization, the ingress edge network device R2 cannot determine the next-hop AS after redirection. In this case, the RR enables the add-path feature, allowing the ingress edge network device R2 to obtain all BGP routes. The add-path feature advertises multiple paths for the same source prefix. Typically, when a network device advertises a BGP route, it advertises the optimal path. By enabling the add-path feature, the network device advertises both the optimal and suboptimal paths.
[0069] To facilitate understanding of the technical solution provided by the embodiment of the present application, the following will be described in conjunction with the application scenario shown in Figure 1a or Figure 1b. Referring to Figure 2, which is a flow chart of a path legitimacy verification method provided by the embodiment of the present application, as shown in Figure 2, the method includes:
[0070] S201: A first network device obtains a redirected first AS path.
[0071] In this embodiment, the first network device may be a network device in the source AS, for example, the first network device may be a network device in AS1 shown in 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 R1 in Figure 1a or R2 in 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 an ASBR.
[0072] The first network device can obtain the first AS path in the following ways: In one method, 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. Specifically, the first network device can obtain the first AS path by receiving a notification message sent by the second network device performing a redirection operation. For example, the first network device is a network device in AS1 in Figure 1a, and the second network device is R1 in AS2. After obtaining the redirected AS path based on the redirection policy, R1 can generate a notification message and send it to the first network device. Alternatively, the first network device can obtain the first AS path based on 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. The parameter set includes at least one of a destination prefix or next hop information. Specifically, when the first network device is configured with a redirection policy, the first network device can obtain the first AS path based on its own routing table entry and the redirection policy. For example, the first network device is R1 in Figure 1a, which is pre-configured with a redirection policy and obtains the redirected AS path based on the routing table entry and the redirection policy.
[0073] S202: The first network device verifies the validity of the first AS path according to the verification policy.
[0074] In this embodiment, after the first network device obtains the redirected first AS path, it uses a verification policy to verify the legitimacy of the first AS path. The verification policy is used to verify the legitimacy of the AS sequence included in the first AS path. Specifically, the first network device verifies whether the AS sequence included in the first AS path meets preset conditions based on the verification policy. If so, the included AS sequence is legal, and the first AS path is therefore legal. Otherwise, the first AS path is illegal and cannot be used to transmit inter-domain traffic.
[0075] 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 device such as a controller. 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 meets the rules indicated by the first database, whether the AS sequence included in the first AS path meets 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.
[0076] The no-valley principle defines three AS roles: operator AS, customer AS, and peer AS. The operator AS provides Internet traversal services for the customer AS, allowing customers to reach other networks through the operator AS. The peer AS and the peer AS autonomous domains and their customers are mutually reachable, 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 generally followed: routes announced from the customer AS are allowed to be passed to the customer AS, peer AS, and operator AS; routes announced from the peer AS are allowed to be passed to the customer AS, but not to other peer ASs and operator ASs; routes announced from the operator AS are allowed to be passed to the customer AS, but not to other peer ASs and operator ASs.
[0077] 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:
[0078] The first type 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 advertised 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 the 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 advertised by the peer AS or operator AS corresponding to the AS to which the first network device belongs, the AS sequence included in the first AS path is determined to be legal, and the first AS path is a legal path. For example, in the application scenario shown in Figure 1a, 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 AS2->AS4->AS5. The next-hop AS corresponding to the first network device is AS4. 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), the first network device determines that the first AS path is a legal path.
[0079] The second type is that 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 the 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 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 the application scenario shown in Figure 1a, 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. In this case, 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 principle of maximizing the interests of the AS. Therefore, when redirecting, traffic should be forwarded to the peer AS or customer AS as much as possible.
[0080] The third type is that if the next-hop AS corresponding to the first network device in the first AS path is a neighboring 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 neighboring 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 a neighboring AS corresponding to the AS to which the first network device belongs, then the first AS path is determined to be a legal path.
[0081] Fourthly, if the next-hop AS corresponding to the first network device in the first AS path is a pre-defined AS, the first network device determines that the first AS path is a valid path. In this embodiment, the AS to which the first network device belongs can be any AS in the sequence of ASs included in the first AS path, and the first network device is a network device included in any AS. In a specific implementation, a specified AS can be pre-configured on the first network device. If the first AS path includes the pre-defined AS, the first AS path is determined to be a valid path.
[0082] Furthermore, to avoid traffic loops, the first AS path must comply with anti-loop mechanisms. Specifically, the first AS path cannot pass through a redirecting AS or an upstream AS. An upstream AS refers to an AS traversed 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 aforementioned methods, or based on any combination of these methods. This embodiment does not specify these methods.
[0083] As can be seen, 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 policy to obtain a verification result. The verification policy is used to verify the legitimacy of the AS sequence included in the first AS path. That is, the first network device can verify the legitimacy of the AS sequence included in the AS path after redirecting the inter-domain traffic to ensure that the redirected AS path is a legitimate path, thereby ensuring the normal transmission of the inter-domain traffic.
[0084] 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.
[0085] The first acquisition method can refer to the redirection path acquisition method provided in the embodiment corresponding to Figure 3. Referring to Figure 3, this figure is a flow chart of a redirection path acquisition method provided in an embodiment of the present application. As shown in Figure 3, the method includes:
[0086] 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.
[0087] S302: The first network device obtains a first AS path based on the notification message.
[0088] 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. The notification message can be a BGP message, a BGP monitoring protocol (BGP monitoring protocol, BMP) message, or an intermediate system to intermediate system (IS-IS) message, and the notification message can use a type length value (TLV) to carry the first AS path. The specific form of the notification message can be selected according to the actual application situation, and this embodiment does not limit it here.
[0089] In order to enable the first network device to obtain more information about the first AS path, the notification message can carry not only the first AS path, but also information such as the identifier of the AS that performs the redirection operation, the AS path through which the notification message is transmitted, and the redirection policy. 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, in Figure 1a, the one that 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 sequence of ASs passed from the AS that performs the redirection operation to the source AS. For example, in Figure 1a, the one that performs the redirection operation is AS2, and the source AS is AS1, so the AS path can include [AS1].
[0090] The format of the notification message is shown in Figure 4, including the message type (Type) field, length (Length) field, redirection AS identifier (Redirection ASN) field, redirection rules (Redirection rules) field, redirection AS path (
[0091] 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 the redirection AS path. The redirection AS identification field includes the identification of the AS that performs the redirection operation, for example, including AS2 in Figure 1a. The redirection rule field includes the redirection policy used to perform the redirection operation. The redirection AS path field includes the AS path after redirection. For example, in Figure 1a, 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 transport AS path field includes the AS sequence passed from the AS that performs the redirection operation to the source AS.
[0092] The second acquisition method can refer to the redirection path acquisition method provided in the embodiment corresponding to Figure 5. Referring to Figure 5, this figure is a flow chart of another redirection path acquisition method provided in an embodiment of the present application. As shown in Figure 5, the method includes:
[0093] S501: The first network device obtains a routing table entry and a redirection policy.
[0094] S502: The first network device obtains a first AS path according to the routing table entry and the redirection policy.
[0095] In this embodiment, when the first network device is configured with a redirection policy, the first network device can determine the first AS path based on the routing table entry and the redirection policy, wherein the redirection policy includes a parameter set, and the routing table entry includes the first AS path and the parameter set.
[0096] The routing table entry can be generated by the first network device after receiving BGP routes sent by other ASes. The routing table entry can include three parts: 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 routing information learned by the first network device from BGP neighbors, namely, initial routes. Loc-RIB is used to store routes selected from Adj-RIBs-In through routing decisions, namely, optimal routes. Adj-RIBs-Out is used to store routing information that the first network device needs to send to neighbors, namely, routes to be advertised. The redirection policy can be manually configured on the first network device or obtained from a controller. Specifically, the first network device can send a request message to the controller to obtain the redirection policy, or the controller can proactively issue the redirection policy to the first network device. The parameter set can include information such as the destination prefix, next hop information, and source prefix. The next hop information can be the outgoing interface identifier to the next-hop network device or the IP address of the next-hop network device.
[0097] In this embodiment, when the first network device obtains the first AS path based on 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.
[0098] In one possible implementation, the parameter set includes a destination prefix. If the destination prefix in the routing table entry 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 entry as the AS path after redirection. In another possible implementation, the parameter set includes next hop information. If the next hop information in the routing table entry 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 entry as the AS path after redirection.
[0099] Specifically, in addition to the parameter set, the redirection policy may also include the 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 based on the next-hop AS and the AS path included in the routing table entry. For example, in the application scenario shown in Figure 1a, R1 is configured with the redirection policy shown in the following table, 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.
[0100] Table 1 Redirection strategy
[0101] For redirection policy 1, both the source prefix and the destination prefix are included. In this case, if a route in the routing table has a source prefix of P1 and a destination prefix of P5, this policy affects traffic from AS1 and redirects the traffic to the new next-hop AS, AS4. Based on the Adj-RIBs-in table in the routing table, the destination prefix P5, and the next-hop AS4, R1 determines that the redirected AS path for the inter-domain traffic from AS1 is AS2->AS4->AS5.
[0102] Redirection policy 2 includes only the destination prefix and does not specify a matching source prefix. In this case, the redirection policy matches all source prefixes, affecting traffic from all ASes. If the destination prefix of a route in the routing table entry is P4, the traffic is redirected to the new next-hop AS, AS4. R1 uses the Adj-RIBs-in table in the routing table entry, the destination prefix P4, and the next-hop AS4 to determine that the redirected AS path is AS2 -> AS4.
[0103] Redirection policy 3 includes only the outgoing interface identifier, without specifying matching source and destination prefixes. In this case, the redirection policy matches all source and destination prefixes. If the outgoing interface identifier for a route in the routing table is 80, traffic is redirected to the new next-hop AS, AS4. Based on the Adj-RIBs-in table in the routing table, the outgoing interface identifier 80, and the next-hop AS4, R1 determines that the redirected AS path can include AS2->AS4, AS2->AS4->AS5, and AS2->AS4->AS5->other ASs.
[0104] If the AS performing the redirection operation and the next-hop AS after the redirection are not connected by the BGP protocol, the next-hop AS cannot be directly determined based on the redirection policy and BGP neighbor relationship alone. Additional configuration information must be added to the outbound interface to indicate the next-hop AS to which the outbound interface directly connects. Furthermore, if the full routing table is missing in the routing table entry, such as in Adj-RIBs-in, the redirected AS path only includes the next-hop AS.
[0105] In some application scenarios, multiple redirection operations may occur. For example, in the scenario shown in Figure 1a, a redirection superposition scenario occurs: the traffic from AS1 is redirected to a 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 finally 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.
[0106] In one possible implementation, after obtaining the first AS path based on the routing table entry and the redirection policy, the first network device can send a notification message to the source AS. The notification message includes the first AS path, so that the source AS can perceive the redirected AS path. The format of the notification message is shown in Figure 4 and is not further described in this embodiment.
[0107] Specifically, when the first network device sends the notification message to the source AS, it can perform the notification in a hop-by-hop manner or directly according to the actual application scenario. For ease of understanding, the following description will be made in conjunction with the application scenario shown in the accompanying drawings.
[0108] (1) Hop-by-hop announcement of redirected AS paths
[0109] As shown in Figure 6a, AS1, AS2, and AS3 are included. AS3 is the AS that performs the redirection operation, and AS1 is the source AS. The notification message is forwarded back to the source AS, AS1, along the BGP routing path. The specific implementation steps include:
[0110] (1) The network device that performs the redirection operation in AS3, such as ASBR1, can construct a notification message;
[0111] (2) If ASBR1 has a direct BGP neighbor relationship with the source AS, it sends the notification message directly to the source AS.
[0112] (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;
[0113] (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 spreads the notification message to all other ASBRs in the domain.
[0114] (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.
[0115] (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.
[0116] (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 will spread the notification message to all ASBRs in the source AS domain and stop forwarding the notification message.
[0117] In this embodiment, all ASs on the Transport_AS_path have deployed BGP 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.
[0118] (2) Directly announce the redirection AS path
[0119] As shown in Figure 6a, AS1, AS2, and AS3 are included. AS3 is the AS performing the redirection operation, and AS1 is the source AS. The address of the network device in the source AS, for example, Server 1, is configured directly on the network device in AS3, for example, Server 2. Server 2 then sends the notification message directly to Server 1 in the source AS. The specific implementation steps include:
[0120] (1) The IP address of Server 2 in this AS is preconfigured on ASBR2, which performs the redirection operation in AS3.
[0121] (2) ASBR2 constructs a redirected AS path advertisement message and sends it to Server 2 in this AS.
[0122] (3) Server 2 collects the redirection policy and the resulting legal redirection AS path from the ASBR through protocols such as BGP or BMP;
[0123] (4) Configure the source AS information on AS3's server 2, namely, AS1's server 1 IP address and source IP range;
[0124] (5) Server 2 constructs a redirect AS path advertisement message for its own AS and sends the generated valid redirect AS path to Server 1 of AS 1.
[0125] (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.
[0126] In this embodiment, the Transport_AS_path field in the notification message is an optional field.
[0127] 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 with reference to the accompanying drawings.
[0128] Referring to Figure 7, this figure is a structural diagram of a path legitimacy verification device provided in an embodiment of the present application. This device is applied to a first network device, or can implement the functions of R1 in the embodiment shown in Figure 1a, or can implement the functions of R2 in the embodiment shown in Figure 1b, or can implement the functions of ASBR1 in Figure 6a, or can implement the functions of ASBR2 in Figure 6b. Device 700 may include: an acquisition unit 701 and a processing unit 702. Acquisition unit 701 may execute S201 in the above-described method embodiment, and processing unit 702 may execute S202 in the above-described method embodiment.
[0129] Specifically, the acquisition unit 701 is used to obtain 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 policy, and the verification policy is used to verify the legitimacy of the AS sequence included in the first AS path.
[0130] In a possible implementation, the acquiring 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.
[0131] In a possible implementation, the acquiring unit 701 is specifically configured to acquire the first AS path according to a routing table entry and a redirection policy, where the redirection policy includes a parameter set, and the routing table entry includes the first AS path and the parameter set.
[0132] In a possible implementation, the parameter set includes at least one of a destination prefix and next hop information, and further includes a source prefix.
[0133] In a possible implementation, the apparatus further includes: a sending unit (not shown in FIG. 7 ), configured for the first network device to send a notification message to a source AS, where the notification message includes the first AS path.
[0134] 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 the redirection policy.
[0135] In one 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.
[0136] In one 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.
[0137] In a possible implementation, 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.
[0138] In this embodiment, the implementation of each unit can refer to the specific implementation process of the first network device in the method embodiment shown in Figure 2 above, and will not be repeated here.
[0139] Referring to Figure 8 , an apparatus for obtaining a redirection path provided in an embodiment of the present application is shown. This apparatus is applied to a first network device, and can implement the functions of R1 in the embodiment shown in Figure 1a , R2 in the embodiment shown in Figure 1b , ASBR1 in Figure 6a , or ASBR2 in Figure 6b . Apparatus 800 may include an obtaining unit 801 and a processing unit 802. The obtaining unit 801 may execute S501 in the above-described method embodiment, and the processing unit 802 may execute S502 in the above-described method embodiment.
[0140] Specifically, the acquisition unit 801 is used to obtain a routing table entry and a redirection policy; the processing unit 802 is used to obtain the 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.
[0141] In a possible implementation manner, the parameter set includes at least one of a destination prefix or next hop information.
[0142] In a possible implementation manner, the apparatus further includes: a sending unit, configured to send a notification message to a source AS, where the notification message includes the first AS path.
[0143] In this embodiment, the implementation of each unit can refer to the specific implementation process of the first network device in the method embodiment shown in Figure 5 above, and will not be repeated here.
[0144] Referring to Figure 9 , a redirection path acquisition apparatus provided in an embodiment of the present application is shown. This apparatus is applied to a first network device, and can implement the functions of ASBR2 in Figure 6a , or the functions of ASBR1 in Figure 6b . Apparatus 900 may include a receiving unit 901 and a processing unit 902 . Receiving unit 901 may execute S301 in the aforementioned method embodiment, and processing unit 902 may execute S302 in the aforementioned method embodiment.
[0145] Specifically, the receiving unit 901 is configured 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 configured to obtain the first AS path based on the notification message.
[0146] 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 policy used for the redirection.
[0147] In this embodiment, the implementation of each unit can refer to the specific implementation process of the first network device in the method embodiment shown in Figure 3 above, and will not be repeated here.
[0148] The division of units in the embodiments of the present application is schematic and is only a logical functional division. In actual implementation, there may be other division methods. The functional units in the embodiments 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. For example, in the above embodiment, the processing unit and the sending unit can be the same unit or different units. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0149] The hardware structure of the aforementioned devices 700, 800, and 900 may be as shown in FIG10 . FIG10 is 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-mentioned method embodiment.
[0150] The network device 1000 includes: a processor 1010, a communication interface 1020, and a memory 1030. The number of processors 1010 in the communication device 1000 can be one or more, and Figure 10 uses one processor as an example. In the embodiment of the present application, the processor 1010, the communication interface 1020, and the memory 1030 can be connected via a bus system or other means, and Figure 10 uses the bus system 1040 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 hardware chip can be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. Memory 1030 may include volatile memory, such as random-access memory (RAM); memory 1030 may also include non-volatile memory, such as flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); memory 1030 may also include a combination of the aforementioned types of memory. Memory 1030 may, for example, store the segment routing (SR) policy mentioned above. Optionally, memory 1030 stores an operating system and programs, executable modules, or data structures, or subsets or extensions thereof, wherein the programs 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. Processor 1010 may read the programs in memory 1030 to implement the methods provided in the embodiments of the present application. Memory 1030 may be a storage device in communication device 1000 or a storage device independent of communication device 1000.Bus system 1040 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. Bus system 1040 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, FIG10 shows only one thick line, but this does not mean that there is only one bus or only one type of bus.
[0151] The hardware structure of the aforementioned devices 700, 800, and 900 may be as shown in FIG11. FIG11 is 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-mentioned 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. The main control board 1110 controls and manages the various components 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 processing unit (LPU), a line card, or a service board. The interface board 1130 is used to provide various service interfaces and implement data packet forwarding. Service interfaces include, but are not limited to, Ethernet interfaces and POS (Packet over SONET / SDH) interfaces. Ethernet interfaces, for example, are Flexible Ethernet Clients (FlexE Clients) interfaces. The interface board 1130 includes a central processing unit (CPU) 1131, a network processor (NPU) 1132, a forwarding table entry memory 1134, and a physical interface card (PIC) 1133. The CPU 1131 on the interface board 1130 controls and manages the interface board 1130 and communicates with the CPU 1111 on the main control board 1110. The NPU 1132 performs packet forwarding. The NPU 1132 can be a forwarding chip. Specifically, uplink packet processing includes processing the incoming packet and forwarding table lookups; downlink packet processing includes forwarding table lookups, etc. The physical interface card 1133 implements the physical layer interconnection function. Raw traffic enters the interface board 1130 through this interface, and processed packets are sent from the physical interface card 1133. Physical interface card 1133 includes at least one physical interface, also known as a physical port. Physical interface card 1133, also known as a daughter card, can be installed on interface board 1130. It is responsible for converting optical and electrical signals into messages, performing a validity check on the messages, and forwarding them to network processor 1132 for processing. In some embodiments, the central processing unit 1131 of interface board 1103 can also perform the functions of network processor 1132, such as implementing software forwarding based on a general-purpose CPU, thus eliminating the need for network processor 1132 in physical interface card 1133.Optionally, the network device 1100 includes multiple interface boards. For example, the network device 1100 further includes an interface board 1140, which includes a central processing unit 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 includes multiple interface boards 1130, the switching fabric board 1120 is used to facilitate data exchange between the interface boards. For example, the interface board 1130 and the interface board 1140 can communicate via 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, the interface board 1140, and the switching fabric board 1120 are connected to the system backplane via a system bus for intercommunication. In one possible implementation, an inter-process communication (IPC) channel is established between the main control board 1110 and the interface board 1130, and communication is performed between the main control board 1110 and the interface board 1130 via the IPC channel. Logically, the network device 1100 includes a control plane and a forwarding plane. The control plane includes the main control board 1110 and the central processing unit 1131, and the forwarding plane includes various components that perform forwarding, such as a forwarding table memory 1134, a physical interface card 1133, and a network processor 1132. The control plane performs functions such as routing, generating forwarding tables, processing signaling and protocol messages, and configuring and maintaining device status. The control plane sends the generated forwarding table to the forwarding plane. On the forwarding plane, the network processor 1132 forwards messages 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 memory 1134. In some embodiments, the control plane and the forwarding plane can be completely separate and not located on the same device. It should be understood that the operations on interface board 1140 in the embodiment of the present application are consistent with those on interface board 1130, and for the sake of brevity, detailed description thereof will be omitted. It should be understood that network device 1100 in this embodiment may correspond to the first network device in each of the above-mentioned method embodiments, and that the main control board 1110, interface board 1130, and / or interface board 1140 in network device 1100 may implement the various steps in each of the above-mentioned method embodiments, and for the sake of brevity, detailed description thereof will be omitted.
[0152] 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 achieve load sharing and redundant backup. In a centralized forwarding architecture, the network device may not need a switching network board, and the interface board is responsible for processing the business data of the entire system. In a distributed forwarding architecture, the network device can have at least one switching network board, which realizes data exchange between multiple interface boards through the switching network board, 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. Alternatively, a network device can consist of a single card, without a switching fabric board (SFB), integrating the functions of the interface board and the main control board. In this case, the CPUs on the interface board and the main control board can be combined into a single CPU, performing the combined functions of the two. This type of device has lower data exchange and processing capabilities (for example, low-end network devices such as switches or routers). The specific architecture used depends on the specific network deployment scenario.
[0153] 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 simulated by software and running in a completely isolated environment. The 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, and will not be repeated here.
[0154] It should be understood that the network devices in the various product forms described above have any functions of the first network device or the second network device in the above method embodiments, which will not be described in detail here.
[0155] The present application also provides a chip including a processor and an interface circuit, the interface circuit being configured to receive instructions and transmit them to the processor; the processor, which may be, for example, a specific implementation of the apparatus 700 shown in FIG7 , being configured to execute the above-described method. The processor is coupled to a memory configured to store programs or instructions. When the programs or instructions are executed by the processor, the chip system implements the method of any of the above-described method embodiments.
[0156] Optionally, there may be one or more processors in the chip system. The processor may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
[0157] Optionally, the memory in the chip system may be one or more memories. The memory may be integrated with the processor or may be provided separately from the processor, which is not limited in this application. For example, 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 provided on different chips. This application does not specifically limit the type of memory or the configuration of the memory and the processor.
[0158] 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.
[0159] An embodiment of the present application further provides a network device system, including a first network device and a second network device, wherein the first network device executes the corresponding method according to the above embodiment; the second network device executes the corresponding method according to the above embodiment.
[0160] An embodiment of the present application also provides a computer-readable storage medium, including instructions or a computer program, 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.
[0161] An embodiment of the present application also provides a computer program product comprising instructions or a computer program, 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.
[0162] The terms "first," "second," "third," "fourth," and the like (if any) in the specification and claims of this application and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or sequential sequence. It should be understood that the terms used in this manner are 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, e.g., a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0163] Those skilled in the art will 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.
[0164] In the several embodiments provided in this 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 merely illustrative. For example, the division of units is only a logical business 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 an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0165] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0166] In addition, each business unit in each embodiment of the present application can be integrated into a processing unit, each unit can exist physically separately, or two or more units can be integrated into a single unit. The above-mentioned integrated units can be implemented in the form of hardware or software business units.
[0167] 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, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0168] Those skilled in the art will appreciate that, in one or more of the examples above, the services described herein may be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these services may be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transmission of computer programs from one location to another. Storage media may be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0169] The above specific implementation methods further describe in detail the purpose, technical solutions and beneficial effects of this application. It should be understood that the above are only specific implementation methods of this application.
[0170] 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, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate 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
Patent Citations
Path legality verification method and redirection path acquisition method and device
CN118740707A
Routing processing method and network equipment
CN114389993A
Suspicious autonomous system path detection
US20100263041A1
Route monitoring system for a communication network
US20160182561A1
Dynamic packet routing
US20170012876A1
