Source address verification list acquisition method and device, electronic equipment and storage medium
By obtaining the IP address prefix and access type of the external network to generate a source address verification list, the problem of misidentification of legitimate packets by edge network devices in the case of asymmetric routing is solved, and the accuracy and credibility of source address verification are achieved.
Patent Information
- Application Number
- CN202410065176.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-03-29
- Filing Date
- 2024-01-16
- Publication Date
- 2024-10-01
AI Technical Summary
In an autonomous system (AS), it is difficult for edge network devices to accurately identify legitimate packets when routing is asymmetric, resulting in legitimate packets being misidentified as illegal packets. A method is needed to generate a source address verification list for effective verification.
By obtaining the IP address prefix and access type of the external network connected to the autonomous domain, a source address verification list is generated, including a blacklist and a whitelist, to ensure the accuracy of source address verification of packets.
It realizes the source address verification of edge network devices, prevents illegal packets from entering the autonomous domain, improves the accuracy and credibility of verification, and reduces the complexity of operation and maintenance and the risk of false positives.
Smart Images

Figure CN118740410A_ABST
Abstract
Description
[0001] This application claims priority to Chinese patent application No. 202310375134.0 filed on March 29, 2023, with invention name “Source address verification list generation method, notification message sending method and device”, the entire contents of which are incorporated by reference in this application. Technical Field
[0002] The present application relates to the field of network technology, and in particular to a method, device, electronic device and storage medium for obtaining a source address verification list. Background Art
[0003] The autonomous system (AS) in the Internet is also called an autonomous domain. There are multiple network devices in the autonomous domain. The network devices in the AS that connect to the external network are called edge network devices. The interface in the edge network device that supports communication with the external network is called the external interface. The external interface can transmit messages between the AS and the external network. The edge network device verifies the source address of the message from the external network to filter out illegal messages with disguised source addresses. At present, the edge network device verifies the data message from the external network through the unicast reverse path forwarding (URPF) method. The process is as follows: the edge network device determines the source address of the data message and the external interface of the edge network device that receives the data message (that is, the input interface of the data message in the edge network), and searches the forwarding table to see if the interface corresponding to the source address is consistent with the input interface. If not, the data message is determined to be an illegal message. However, when there is routing asymmetry in the external network connected to the edge network device, the interface corresponding to the source address of the legitimate message of the external network in the forwarding table may be inconsistent with the input interface of the legitimate message, causing the legitimate message to be identified as an illegal message. Therefore, there is an urgent need for a method to generate a source address verification list for the external interface of the AS so that the message can be verified through this method. Summary of the invention
[0004] The embodiment of the present application provides a method, device, electronic device and storage medium for obtaining a source address verification list, which can generate a source address verification list for an external interface of an AS. The technical solution is as follows:
[0005] In a first aspect, a method for obtaining a source address verification list is provided. The method is executed by a first edge network device in an autonomous domain. Any network connected to the autonomous domain and located outside the autonomous domain is called a first network. The method includes: first obtaining a first IP address prefix owned by the first network, and then obtaining a source address verification list based on the first IP address prefix and the access type of the first network, wherein the source address verification list includes the first IP address prefix and an interface identifier of a first external interface, and the first external interface is determined based on the access type.
[0006] In this method, the IP address prefix owned by the external network (such as the first network) connected to the autonomous domain is obtained through the edge network device in the autonomous domain, and then the source address verification list can be obtained based on the obtained IP address prefix and the access type of the external network.
[0007] In one possible implementation, the process of obtaining the source address verification list based on the first IP address prefix and the access type of the second network includes: if the access type of the first network is a cross-domain multi-homing access type or an Internet access type, determining the external interface connected to the second network in the first edge network device as the first external interface; based on the first IP address prefix and the interface identifier of the first external interface, obtaining a blacklist in the source address verification list, the blacklist including the first IP address prefix.
[0008] Based on the above possible implementation methods, the IP address prefix owned by the cross-domain multi-homing access network or the Internet access network is added to the blacklist of the external interface that is not connected to the cross-domain multi-homing access network or the Internet access network, so that the blacklist can be used to subsequently verify the source address of the data packets received by the external interface, which can prevent the packets with the IP address prefix owned by the cross-domain multi-homing access network or the Internet access network as the source IP address prefix from entering the autonomous domain through the external interface.
[0009] In one possible implementation, the method also includes: determining a first source network and a second source network of the first IP address prefix; if the first source network is the same as the second source network, executing steps based on obtaining a blacklist in a source address verification list, wherein the first source network is a network that announces the first IP address prefix to the autonomous domain, and the second source network is a network to which the first IP address prefix belongs, which is determined based on routing information in the autonomous domain.
[0010] Based on the above possible implementation methods, conflict detection of the network source of the first IP address prefix is implemented to prevent the incorrectly notified address prefix from being added to the source address verification list, resulting in an inaccurate source address verification list.
[0011] In one possible implementation, the process of obtaining the source address verification list based on the first IP address prefix and the access type of the second network includes: if the access type of the first network is a single-homing access type or a complete multi-homing access type, determining the external interface connected to the first network in the first edge network device as the first external interface; based on the first IP address prefix and the interface identifier of the first external interface, obtaining a whitelist in the source address verification list, the whitelist including the first IP address prefix.
[0012] Based on the above possible implementation methods, the IP address prefix owned by the single-homed access network or the complete multi-homed access network is added to the whitelist of the external interface to which it is connected, so that the whitelist can be used to subsequently verify the source address of the data packets received by the external interface. This can prevent data packets with the IP address prefix owned by other networks as the source IP address prefix from entering the AS from the external interface.
[0013] In one possible implementation, the first network is connected to a first edge network device, based on which, the process of obtaining the first IP address prefix owned by the first network includes: obtaining the first IP address prefix based on routing information in the autonomous domain, and the routing information includes the IP address prefix owned by the first network.
[0014] Based on the above possible implementation method, a credible first IP address prefix can be obtained, and the source address verification list obtained based on the credible first IP address prefix can ensure that the obtained source address verification list is credible and accurate.
[0015] In a possible implementation, the process of obtaining the first IP address prefix owned by the first network includes: receiving a notification message, and obtaining the first IP address prefix from the notification message, wherein the notification message is used to announce the IP address prefix used for source address verification, and the notification message includes the first IP address prefix.
[0016] In a possible implementation manner, the first network is connected to the first edge network device, and the notification message is an out-of-domain notification message from the first network.
[0017] Based on the above possible implementation method, the first edge network device can obtain a trusted first IP address prefix, and the source address verification list obtained based on the trusted first IP address prefix can ensure that the obtained source address verification list is credible and accurate.
[0018] In a possible implementation manner, the access type of the first network is determined based on an interface identifier of an external interface in the first edge network device that is connected to the first network.
[0019] In a possible implementation manner, the notification message further includes a network identifier of the first network.
[0020] In a possible implementation manner, the notification message is an intra-domain notification message sent by an edge network device in an autonomous domain, and the notification message further includes a network identifier of the first network.
[0021] Based on the above possible implementation manner, the network to which the first IP address prefix belongs is indicated by the network identifier in the notification message, and there is no need to determine the network to which the first IP address prefix belongs by querying the interface configuration information.
[0022] Based on the above possible implementation methods, an edge network device that is not connected to the first network can also obtain the IP address prefix owned by the first network for source address verification, so as to add the IP address prefix of the first network to the local source address verification list.
[0023] In a possible implementation manner, the notification message further includes an access type identifier, and the access type of the first network is determined based on the access type identifier.
[0024] In a possible implementation, the intra-domain announcement message also includes at least one of a blacklist generation identifier, a prefix category identifier, and an extra-domain announcement identifier. The blacklist generation identifier is used to indicate whether the blacklist in the source address verification list is generated based on the first IP address prefix. The prefix category identifier is used to indicate whether the first IP address prefix is a first-class IP address prefix. The extra-domain announcement identifier is used to indicate whether the first IP address prefix is a second-class IP address prefix. The first-class IP address prefix refers to an IP address prefix obtained based on routing information within the autonomous domain, and the second-class IP address prefix refers to an IP address prefix obtained from an extra-domain announcement message.
[0025] Based on the above possible implementation methods, the first edge network device uses the prefix category identifier and the extraterritorial notification identifier to distinguish the category of the first IP address prefix, and uses the list generation identifier to add the first IP address prefix to the blacklist in the source address verification list.
[0026] In one possible implementation, the notification message also includes an anycast type identifier, which is used to indicate whether the first IP address prefix is an anycast address prefix. The access type of the second network connected to the first external interface is a non-Internet access type. Based on this, the method also includes: if the anycast type identifier indicates that the first IP address prefix is not an anycast address prefix, executing the step of obtaining a source address verification list, wherein the source address verification list includes the interface identifier of the first external interface and a blacklist, and the blacklist includes the first IP address prefix.
[0027] In one possible implementation, the notification message also includes an attribute identifier, which is used to indicate whether the message can enter the autonomous domain through the Internet interface. The access type of the second network connected to the first external interface is an Internet access type. Based on this, the method also includes: if the attribute identifier indicates that the message cannot enter the autonomous domain through the Internet interface, executing the step of obtaining a source address verification list, the source address verification list includes the interface identifier of the first external interface and a blacklist, and the blacklist includes the first IP address prefix.
[0028] In one possible implementation, the notification message also includes a whitelist generation identifier, which is used to indicate whether the whitelist in the source address verification list is generated based on the first IP address prefix. Based on this, the method also includes: if the whitelist generation identifier indicates that the whitelist in the source address verification list is generated based on the first IP address prefix, the step of obtaining the source address verification list is executed, and the source address verification list includes the interface identifier of the first external interface and the whitelist, and the whitelist includes the first IP address prefix; if the whitelist generation identifier indicates that the whitelist in the source address verification list cannot be generated based on the first IP address prefix, the step of obtaining the source address verification list is executed, and the source address verification list includes the interface identifier of the first external interface and the blacklist, and the blacklist includes the first IP address prefix.
[0029] Based on the above possible implementation methods, a notification message with a tag (such as an anycast type identifier, an attribute identifier, and a whitelist generation identifier) is used to announce the attributes of the first IP address prefix of the first network within the autonomous domain, thereby avoiding the edge network device from determining the attributes of the IP address prefix through complex methods such as query or verification, reducing the complexity of operation and maintenance, and reducing the risk of false positives in the source address source list.
[0030] In a possible implementation, the method further includes:
[0031] receiving a data message through the first external interface, the data message including a source address;
[0032] The source address of the data packet is verified based on the source address and the first IP address prefix in the source address verification list.
[0033] Based on the above possible implementation methods, source address verification is performed on the data message received by the first external interface through the source address verification list to prevent illegal messages from entering the autonomous domain from the first external interface.
[0034] In a second aspect, a method for sending a notification message is provided, which is executed by a first device in a first network, and the method includes: generating an extraterritorial notification message, and sending the extraterritorial notification message to an autonomous domain connected to the first network, wherein the extraterritorial notification message is used to announce an IP address prefix used for source address verification, and the extraterritorial notification message includes a first IP address prefix owned by the first network.
[0035] In this method, the device in the first network notifies the IP address prefix of the first network used for source address verification to the autonomous domain to which the first network is connected through an extra-domain notification message, thereby ensuring the credibility of the notified IP address prefix so that the edge network device in the autonomous domain can obtain an accurate and reliable source address verification list based on the trusted IP address prefix.
[0036] In one possible implementation, the extraterritorial notification message also includes at least one of an anycast type identifier, an attribute identifier, a whitelist generation identifier, and a network identifier of the first network. The anycast type identifier is used to indicate whether the first IP address prefix is an anycast address prefix. The attribute identifier is used to indicate whether the message can enter the autonomous domain through the Internet interface. The whitelist generation identifier is used to indicate whether a whitelist in the source address verification list is generated based on the first IP address prefix.
[0037] According to a third aspect, a method for sending a notification message is provided, which is executed by a first edge network device in an autonomous domain, and the method includes: first obtaining a first IP address prefix owned by the first network; then generating an intra-domain notification message based on the first IP address prefix and the network identifier of the first network; and then sending the intra-domain notification message to a second edge network device in the autonomous domain, wherein the first network is any network connected to the autonomous domain and located outside the autonomous domain, the intra-domain notification message is used to announce the IP address prefix used for source address verification, and the intra-domain notification message includes the first IP address prefix and the network identifier.
[0038] Based on the above possible implementation methods, the second edge network device in the autonomous domain can obtain the IP address prefix of the first network for source address verification, and add the IP address prefix to the source address verification list of the local interface.
[0039] In a possible implementation, the obtaining of the first IP address prefix owned by the first network includes: obtaining the first IP address prefix from an extraterritorial announcement message from the first network, wherein the extraterritorial announcement message includes the first IP address prefix.
[0040] In one possible implementation, the extraterritorial notification message also includes at least one of an anycast type identifier, an attribute identifier, a whitelist generation identifier, and a network identifier of the first network. The anycast type identifier is used to indicate whether the first IP address prefix is an anycast address prefix. The attribute identifier is used to indicate whether the message can enter the autonomous domain through the Internet interface. The whitelist generation identifier is used to indicate whether a whitelist in the source address verification list is generated based on the first IP address prefix.
[0041] In a possible implementation manner, the intra-domain notification message further includes at least one of an anycast type identifier, an attribute identifier, a whitelist generation identifier, and a network identifier of the first network.
[0042] In a possible implementation manner, the obtaining of the first IP address prefix owned by the first network includes: obtaining the first IP address prefix based on routing information in an autonomous domain, where the routing information includes the IP address prefix owned by the first network.
[0043] In a possible implementation, the intra-domain announcement message also includes at least one of an access type identifier, a blacklist generation identifier, a prefix category identifier, and an extra-domain announcement identifier, the access type identifier is used to indicate the access type of the first network, the blacklist generation identifier is used to indicate whether the blacklist in the source address verification list is generated based on the first IP address prefix, the prefix category identifier is used to indicate whether the first IP address prefix is a first-class IP address prefix, and the extra-domain announcement identifier is used to indicate whether the first IP address prefix is a second-class IP address prefix, the first-class IP address prefix refers to an IP address prefix obtained based on routing information within the autonomous domain, and the second-class IP address prefix refers to an IP address prefix obtained from an extra-domain announcement message.
[0044] In a fourth aspect, a device for obtaining a source address verification list is provided, the device comprising a functional module for executing the method for obtaining a source address verification list provided by the first aspect or any optional method of the first aspect.
[0045] In a fifth aspect, a notification message sending device is provided, which includes a functional module for executing the notification message sending method provided by the second aspect or any optional manner of the second aspect.
[0046] In a sixth aspect, a notification message sending device is provided, the device comprising a functional module for executing the notification message sending method provided by the second aspect or any optional manner of the second aspect.
[0047] In the seventh aspect, an electronic device is provided, which includes a processor, and the processor is used to execute program code so that a network device executes to implement a method provided in the first aspect or any optional manner of the first aspect, or a method provided in the second aspect or any optional manner of the second aspect, or a method provided in the third aspect or any optional manner of the third aspect.
[0048] In an eighth aspect, a computer-readable storage medium is provided, in which at least one program code is stored. The program code is read by a processor to enable an electronic device to execute the method provided in the first aspect or any optional manner of the first aspect, or the method provided in the second aspect or any optional manner of the second aspect, or the method provided in the second aspect or any optional manner of the second aspect.
[0049] In the ninth aspect, a computer program product or a computer program is provided, which includes a program code, and the program code is stored in a computer-readable storage medium. The processor of the network device reads the program code from the computer-readable storage medium, and the processor executes the program code so that the electronic device executes to implement the method provided in the first aspect or any optional manner of the first aspect, or the method provided in the second aspect or any optional manner of the second aspect, or the method provided in the second aspect or any optional manner of the second aspect.
[0050] Based on the implementations provided in the above aspects, the present application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 It is a schematic diagram of an implementation environment of a method for obtaining an application source address verification list provided in an embodiment of the present application;
[0052] Figure 2 This is a schematic diagram of the structure of an extraterritorial notification TLV provided in an embodiment of the present application;
[0053] Figure 3 This is a schematic diagram of the structure of an intra-domain notification TLV provided in an embodiment of the present application;
[0054] Figure 4 This is a flow chart of a method for obtaining a source address verification list provided in an embodiment of the present application;
[0055] Figure 5 It is a schematic diagram of an implementation environment of another method for obtaining an application source address verification list provided in an embodiment of the present application;
[0056] Figure 6 This is a flow chart of a method for sending a notification message provided in an embodiment of the present application;
[0057] Figure 7 It is a flow chart of another method for sending a notification message provided in an embodiment of the present application;
[0058] Figure 8 It is a flow chart of another method for sending a notification message provided in an embodiment of the present application;
[0059] Fig. 9 It is a flow chart of another method for sending a notification message provided in an embodiment of the present application;
[0060] Fig.10 This is a schematic diagram of the structure of another extraterritorial notification TLV provided in an embodiment of the present application;
[0061] Fig.11 This is a schematic diagram of the structure of another extraterritorial notification TLV provided in an embodiment of the present application;
[0062] Fig.12 It is a schematic diagram of an implementation environment of another method for obtaining an application source address verification list provided in an embodiment of the present application;
[0063] Fig.13 It is a structural diagram of a source address verification list acquisition device provided in an embodiment of the present application;
[0064] Fig.14 It is a structural diagram of a notification message sending device provided in an embodiment of the present application;
[0065] Fig.15 It is a structural diagram of another notification message sending device provided in an embodiment of the present application;
[0066] Fig.16 It is a structural diagram of a network device provided in an embodiment of the present application;
[0067] Fig.17 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0068] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0069] Figure 1 is a schematic diagram of an implementation environment of a method for obtaining an application source address verification list provided in an embodiment of the present application, such as Figure 1As shown, the implementation environment includes AS101, AS102, subnet 103, subnet 104, subnet 105 and Internet 106, wherein AS101 is connected to external networks such as subnet 103, subnet 104 and Internet 106, and is used to provide data message forwarding services for the connected external networks. AS102 is connected to external networks such as subnet 104, subnet 105 and Internet 106, and is used to provide data message forwarding services for the connected external networks. The subnet in the implementation environment is a user-side network, which is used to deploy the user's host. Internet 106 includes at least one AS, such as AS107 to AS109.
[0070] For the AS in the implementation environment, the network connected to the AS, such as a subnet or the Internet, belongs to the external network of the AS. The AS includes multiple network devices, and the multiple network devices included in the AS provide data message forwarding services for the external network. The multiple network devices in the AS include edge network devices and non-edge network devices. Non-edge network devices are network devices in the AS other than edge network devices. Figure 1 As shown, network devices R1 to R3 in AS101 are connected to subnet 103, subnet 104 and Internet 106 respectively. Network devices R1 to R3 are edge network devices of AS101. Network devices R4 to R6 in AS102 are connected to subnet 104, subnet 105 and Internet 106 respectively. Network devices R1 to R6 are edge network devices of AS102.
[0071] The interface in the edge network device used to connect to the external network is called the external interface, and an edge network device has at least one external interface. Any external network connects to the external interface in any AS through any access type of single-home access type, full multi-home access type, cross-domain multi-home access type or Internet access type to access the AS. The single-home access type means that the external network is only connected to one AS and is only connected to an external interface of an edge network device in the AS. For example, for AS101, subnet 103 is accessed with a single-home access type, that is, subnet 103 is a single-home access type network. The full multi-home access type means that the external network is only connected to one AS and the external network is connected to multiple external interfaces of the AS. The multiple external interfaces can be located on the same edge network device or on different edge network devices. For example, for subnet AS102, subnet 105 is accessed with a full multi-home type, that is, subnet 105 is a full multi-home access type network. The cross-domain multi-homing access type refers to the external network connecting multiple ASs. For example, for AS101 and AS102, subnet 104 is accessed with the cross-domain multi-homing access type, that is, subnet 104 is a cross-domain multi-homing access type network. The Internet access type refers to the Internet access service AS connected to another AS, wherein the Internet access service AS refers to the AS used to provide Internet access services. The Internet access service AS is used to provide Internet access services to the AS to which it is connected. The external interface in the AS used to connect to the Internet access service AS is called the Internet interface. For example, AS107, AS108, and AS109 are all Internet access service ASs. For subnet AS1, AS107 is accessed with the Internet access type, that is, AS107 is an Internet access type network, and R3 is connected to the external interface of AS107.
[0072] Figure 1 The example shown is that there are 2 ASs outside the Internet 106. In other embodiments, there may be 1 or more ASs outside the Internet 106. Here, the embodiment of the present application does not limit the number of ASs outside the Internet. Figure 1 The example in which the Internet 106 includes 3 ASs is used for explanation. In other embodiments, the Internet 106 may also include less than 3 or more than 3 ASs. Here, the embodiments of the present application do not limit the number of ASs in the Internet 106. Figure 1 The example in which AS101 and AS102 are connected to three external networks respectively is used for explanation. In other embodiments, AS can be connected to less than or more than three external networks. Here, the embodiments of the present application do not limit the number of external networks connected to AS and the way in which external networks access AS.
[0073] For any external interface of any edge network device in the AS, the external interface has a source address verification list, and the source address verification list is used to perform source address verification on the data message entering the AS from the external interface (i.e., the data message received by the external interface). The source address verification list includes the interface identifier of the external interface, and the source address verification list also includes at least one item in the blacklist and the whitelist, and the at least one item corresponds to the interface identifier, wherein the whitelist includes at least one Internet protocol (Internet protocol, IP) address prefix owned by the external network connected to the external interface, and for the external interface, a data message with any IP address prefix owned by the external network as the source IP address prefix is a legal message, and the whitelist is used to verify the legal message from the data message received from the external interface. The blacklist includes at least one IP address prefix not owned by the external network connected to the external interface, and for the external interface, a data message with any IP address prefix not owned by the external network as the source IP address prefix is an illegal message, and the blacklist is used to verify the illegal message from the data message received from the external interface.
[0074] The IP address prefixes in the source address verification list are the IP address prefixes used for source address verification. In the present application, there are two types of IP address prefixes used for source address verification, namely, first-class IP address prefixes and second-class IP address prefixes. The first-class IP address prefixes are the IP address prefixes owned by the external network determined by the edge network device in the AS based on the routing information in the AS, and the second-class IP address prefixes are the IP address prefixes owned by the external network announced by the device outside the AS to the edge network device in the AS.
[0075] The present application relates to a notification message, which is used to announce an IP address prefix used for source address verification. There are two types of notification messages, namely, an extra-domain notification message and an intra-domain notification message, wherein the extra-domain notification message is a notification message sent by an external device to an edge network device in an AS, and is used to announce the second-class address prefix owned by the external network where the external device is located, and the external device is any device in the external network. For example, the external device collects the IP address prefixes owned by the external network, and announces the collected IP address prefixes to the edge network device in the AS through an extra-domain notification message. Exemplarily, the extra-domain notification message includes at least one extra-domain notification type length value (TLV), and the extra-domain notification TLV is used to instruct the external network to notify the AS of an IP address prefix owned by the external network, that is, Figure 2 As shown in the figure, the extraterritorial notification TLV includes:
[0076] Type: TLV type field, used to store the type identifier of the extraterritorial notification TLV;
[0077] Length: Length field, used to store the length of the value field in the extraterritorial notification TLV;
[0078] Value: value field, used to store the value of the data announced by the extraterritorial announcement TLV.
[0079] The data announced by the extraterritorial notification TLV includes the IP prefix, and the value of the IP prefix is as follows:
[0080] IP Prefix: The advertised IP address prefix.
[0081] The intra-domain announcement message is a announcement message issued by the edge network device in the AS within the AS. After any edge network device in the AS receives the extra-domain announcement message, it announces the second-class IP address prefix announced by the extra-domain announcement message to other edge network devices in the AS through the intra-domain announcement message, so that other edge network devices can obtain the second-class IP address prefix. Therefore, the intra-domain announcement message is used to announce the second-class IP address prefix owned by the external network. For the edge network external device in the AS, the IP address prefix announced by the external device to the AS is also the IP address prefix announced by the external network to the AS. In another possible implementation, each edge network device in the AS collects the IP address prefixes (i.e., the first-class IP address prefixes) owned by the external networks to which they are connected based on the routing information in the AS, and announces the collected first-class IP address prefixes to other edge network devices in the AS through the intra-domain announcement message. Therefore, the intra-domain announcement message is also used to announce the first-class IP address prefix owned by the external network. Exemplarily, the intra-domain notification message includes at least one intra-domain notification TLV, which is used to notify the edge network device in the AS of an IP address prefix owned by the external network for source address verification, and the IP address prefix may be a first-class IP address prefix or a second-class IP address prefix, such as Figure 3 As shown in the figure, the domain notification TLV includes:
[0082] Type: TLV type field, used to store the type identifier of the TLV notified within the domain;
[0083] Length: Length field, used to store the length of the value field in the domain notification TLV.
[0084] value: value field, used to store the value of the data announced by the intra-domain announcement TLV.
[0085] The data announced by the intra-domain announcement TLV include the source router identifier (IP Prefix), IP prefix (IPPrefix), network tag (Tag), access type (Type), blacklist generation identifier (S) and prefix category identifier (D). The values of these data are as follows:
[0086] Origin router-id: the source router identifier, i.e., the device identifier (ID) of the network device that generates the intra-domain advertisement message in the AS;
[0087] IP Prefix: the advertised IP address prefix;
[0088] Tag: The network ID of the external network to which the advertised IP address prefix belongs;
[0089] Type: The access type identifier of the external network to which the advertised IP address prefix belongs, used to indicate the access type of the external network;
[0090] S: Blacklist generation flag, used to indicate whether to generate a blacklist based on the announced IP address prefix on the external interface connected to the non-origin external network, that is, to indicate to generate a blacklist in the source address verification list based on the announced IP address prefix, wherein the external network to which the IP address prefix belongs is called the origin network of the IP address prefix, and the external networks other than the origin network connected by the AS are the non-origin networks of the IP address prefix. The blacklist generation flag occupies 1 bit. For example, if the external network is a cross-domain multi-homing access network or an Internet access network, S=1, indicating that a blacklist is generated based on the announced IP address prefix. If the external network is a single-homing access network or a complete multi-homing access network, S=0, indicating that a blacklist cannot be generated based on the announced IP address prefix.
[0091] D: prefix class identifier of the advertised IP address prefix, used to indicate whether the IP address prefix is a first-class IP address prefix, occupies 1 bit. For example, D=1 indicates that the IP address prefix is a first-class IP address prefix, and D=0 indicates that the IP address prefix is not a first-class address prefix;
[0092] External: Extra-domain announcement flag, used to indicate whether the IP address prefix is a second-class IP address prefix, occupies 1 bit, for example, External = 1, indicating that the announced IP address prefix is a second-class IP address prefix, External = 0, indicating that the announced IP address prefix is not a second-class IP address prefix. External is another prefix category flag extended in the intra-domain announcement message, for example, D is the first prefix category flag, and External is the second prefix category flag. The intra-domain announcement message is extended through the extra-domain announcement flag, and there is no need to develop a new announcement message. The second-class IP address prefix can be announced through the intra-domain announcement message, reducing development costs.
[0093] Among them, S and D are valid for the first IP address prefix of the announcement, and are invalid for the second type of IP address prefix of the announcement. For example, when External=0, S and D are valid, and when External=1, S and D are invalid. S and D are optional in the intra-domain announcement TLV. In another possible implementation, the intra-domain announcement TLV does not include S and D, or the intra-domain announcement TLV includes D or External.
[0094] Next, based on the implementation environment and two types of IP address prefixes introduced above, combined with Figure 4 , the process of the method for obtaining the source address verification list provided by this application is introduced, and the method process includes the following steps.
[0095] 401. A first edge network device obtains a first IP address prefix owned by a first network.
[0096] The first edge network device is any edge network device in the AS, where the AS is an area where source address verification is deployed for the external network, such as Figure 5 The first network is any external network connected to the AS, the first IP address prefix is a first IP address prefix owned by the first network for source address verification, and there is at least one first IP address prefix.
[0097] In a possible implementation, the first IP address prefix is a first-class IP prefix owned by the first network for source address verification. Next, in combination with Figure 6 and Figure 7 In this implementation, the process of obtaining the first IP address prefix is introduced as follows: Figure 6 As shown, the acquisition process includes the following steps A11 to A14.
[0098] A11. The first edge network device obtains a first IP address prefix based on routing information in the AS, where the routing information includes an IP address prefix owned by the first network, and the first IP address prefix is the IP address prefix of the IP address.
[0099] Assuming that any external interface of the first edge network device is connected to the first network, if the first network is a single-home access network or a complete multi-home access network, the first edge network device obtains at least one routing information related to the external interface in the AS. The routing information related to the external interface is the routing information notified (or imported) by the first network to the first edge network device through the external interface, for example, the routing information of the first network sent to the external interface by the first network through a routing protocol, wherein the routing protocol is such as the routing information protocol (RIP), the open shortest path first protocol (OSPF), the intermediate system to intermediate system protocol (ISIS) or the border gateway protocol (BGP) or other routing protocols. Here, the embodiments of the present application do not limit the routing protocol and the method of obtaining routing information.
[0100] Alternatively, the routing information related to the external interface is the routing information of the first network obtained by the first edge network device in the AS and announced to the AS. For example, the network device responsible for announcing routing information publishes the routing information of the first network in the AS. After the first edge network device obtains the routing information in the AS, if the routing information meets the matching conditions in the routing policy, the routing information is stored locally, and the user configures the network ID and access type ID of the first network in the routing information. Alternatively, if the outgoing interface of the routing information originated from the first network after routing iteration is the external interface connected to the first network, the user configures the network ID and access type ID of the first network in the routing information, and then the first edge network device locally queries the routing information of the first network based on the network ID of the first network, and obtains the IP address prefix of the first network from the queried routing information.
[0101] Alternatively, the routing information related to the external interface is the routing information configured by the user for the first network on the first edge network device. Here, the embodiment of the present application does not limit the method for obtaining the routing information related to the external interface on the first edge network device.
[0102] Each piece of routing information related to the external interface includes at least one IP address prefix owned by the first network. After obtaining the routing information, the first edge network device obtains the IP address prefix in the routing information as the first IP address prefix.
[0103] The first IP address prefix obtained by the first edge network device according to step A1 is also the first class IP address prefix owned by the first network. In the case where the first IP address prefix is a first class IP address prefix, the first edge network device locally stores the first class notification information of the first IP address prefix. The first class notification information of any IP address prefix is used to indicate that the IP address prefix is a first class IP address prefix. The first class notification information includes the IP address prefix, the blacklist generation identifier S and prefix category identifier D of the IP address prefix, the network ID of the external network to which the IP address prefix belongs, the device ID of the edge network device connected to the external network, and the access type ID of the external network. Still with Figure 5 Taking the edge network device R1 as the first edge network device as an example, assuming that subnet 1 is the first network, the first-class IP address prefix of subnet 1 obtained by R1 is P1, and assuming that subnet 2 is the first network, the first-class IP address prefix of subnet 2 obtained by R1 is P2, the first-class notification information of P1 and P2 is shown in the following Table 1.
[0104] Table 1
[0105] Device ID Network ID Access Type ID IP address prefix S D R1 Subnet 1 Single-homing access type ID P1 S=0 D=1 R2 Subnet 2 Full multi-homing access type ID P2 S=0 D=1
[0106] Since the routing information in the AS is credible, a credible first IP address prefix can be obtained based on the routing information, and the source address verification list subsequently obtained based on the credible first IP address prefix can ensure that the obtained source address verification list is credible and accurate.
[0107] After obtaining the first IP address prefix, the first edge network device notifies the first IP address prefix to other edge network devices in the AS through an intra-domain notification message, such as the following steps A12 to A14.
[0108] A12. The first edge network device generates an intra-domain announcement message based on the first IP address prefix, where the intra-domain announcement message includes the first IP address prefix and a network identifier of the first network.
[0109] Among them, the intra-domain notification message also includes at least one of the access type ID of the first network, the first IP address prefix, the blacklist generation identifier, the prefix category identifier and the extra-domain notification identifier. When the access type of the first network is a single-homing access type or a complete multi-homing access type, the blacklist generation identifier is 0, used to indicate that the blacklist cannot be generated based on the first IP address prefix, the prefix category identifier is 1, used to indicate that the first IP address prefix is a first-class IP address prefix, and the extra-domain notification identifier is 0, used to indicate that the announced first IP address prefix is not a second-class IP address prefix.
[0110] The first edge network device generates the intra-domain notification message based on the first type of notification information of each first IP address prefix. Exemplarily, for each first IP address prefix in at least one first IP address prefix, the first device notifies the IP address prefix with the first IP address prefix, based on the first type of notification information of the first IP address prefix, according to Figure 3 The format of the intra-domain notification TLV shown generates an intra-domain notification TLV including the first IP address prefix, and the intra-domain notification TLV is used to notify the AS that the first IP address prefix is a first-class IP address prefix owned by the first network. At this time, the intra-domain notification TLV includes the first-class notification information of the first IP address prefix. In this way, the first edge network device can generate at least one intra-domain notification TLV, and based on the at least one extra-domain notification TLV, generate an intra-domain notification message, and the intra-domain notification message includes the at least one intra-domain notification TLV.
[0111] A13. The first edge network device sends an intra-domain notification message to the second edge network device in the AS.
[0112] The second edge network device is each edge network device in the AS except the first edge network device, and the Figure 5 Taking AS1 in FIG. 1 as an example, R1 is the first edge network device, and R2, R4, R5, R6 and R7 are all second edge network devices.
[0113] The first edge network device broadcasts the intra-domain announcement message in the AS to send the intra-domain announcement message to each second edge network device in the AS, or the first edge network device sends the intra-domain announcement message to each second edge network device in the AS respectively.
[0114] A14. The second edge network device receives the intra-domain notification message.
[0115] Each second edge network device in the AS will receive the intra-domain announcement message. Next, taking any second edge network device as an example, the processing process of the intra-domain announcement message in the second edge network device is introduced.
[0116] The second edge network device parses the content of at least one intra-domain announcement TLV from the intra-domain announcement message, and for any intra-domain announcement TLV, generates a first-class announcement information of a first IP address prefix based on the content of the intra-domain announcement TLV. Each time a first-class announcement information is generated, the first-class announcement information is stored for subsequent use.
[0117] In a similar manner, each second edge network in the AS generates the first-class announcement information of each first IP address prefix based on the announcement message received within the domain, and stores the first-class announcement information of each first IP address prefix locally. In this way, each edge network device in the AS stores the first-class announcement information of each first IP address prefix owned by the first network.
[0118] The above steps A11 to A14 are explained by taking the example of the first edge network device announcing the first class IP address prefix owned by the first network in the AS. For each external interface in the first edge network device, if the external network connected to any external interface is a single-home access network or a complete multi-home access network, the first edge network device announces the first class IP address prefix owned by the external network connected to the external interface in the AS in a similar manner. In this way, each edge network device in the AS stores the first class notification information of the first class IP address prefix.
[0119] The above steps A11 to A14 are described by taking the first edge network device connected to the first network as an example. In another possible implementation, the first edge network device is not connected to the first network. Figure 7 , the process of the first edge network device obtaining the first class IP address prefix owned by the first network is introduced as follows.
[0120] A21. The third edge network device obtains the first IP address prefix owned by the first network based on the routing information in the AS.
[0121] Among them, the third edge network device is any edge network device connected to the first network. After obtaining the first IP address prefix, it locally stores the first type of notification information of the first IP address prefix. This step A21 is the same as step A11, and here, this step A21 is not repeated.
[0122] A22. The third edge network device generates an intra-domain announcement message based on the first IP address prefix, where the intra-domain announcement message includes the first IP address prefix and a network identifier of the first network.
[0123] Among them, this step A22 is the same as step A12, and here, this step A22 is not repeated.
[0124] A23. The third edge network device sends the intra-domain notification message to each edge network device in the AS except the third edge network device.
[0125] Among them, this step A23 is the same as step A13, and here, this step A23 is not repeated.
[0126] A24. Each edge network device in the AS except the third edge network device receives the intra-domain announcement message.
[0127] In this step A24, similar to step A14, each edge network device stores the first type of notification information of the first IP address prefix locally based on the received notification message in the domain. Here, step A23 is not repeated. Figure 3 As shown, the first edge network device is an edge network device in the AS except the third edge network device. The first edge network device can obtain the first IP address prefix from the announcement message in the domain and locally store the first type of announcement information of the first IP address prefix.
[0128] In another possible implementation, the first IP address prefix is a second type IP prefix owned by the first network and used for source address verification. Next, in combination with Figure 8 and Fig. 9 In this implementation, the process of obtaining the first IP address prefix is introduced as follows: Figure 8 As shown, the acquisition process includes the following steps B11 to B16.
[0129] B11. The first device generates an extraterritorial notification message, where the extraterritorial notification message includes a first IP address prefix, where the first IP address prefix is a first type IP address prefix owned by the first network and used for source address verification.
[0130] The first device is any device in the first network, such as a network device in the first network or a non-network device in the first network (such as a computer device). Here, the application does not limit the type of the first device. For devices in the AS, the first device is an external network device. If the first network is a cross-domain multi-homing access network, the Internet without a subnet, or a subnet in the Internet, the first device notifies the AS to which it is connected of the first class IP address prefix owned by the first network for source address verification by executing steps B11 and B12, such as Figure 5 Subnet 3 in is the first network.
[0131] The IP address prefix owned by the first network refers to a legal IP address prefix owned by the first network, for example, a source IP address prefix used by a device in the first network to send a message, and the source IP address prefix is the address prefix in the source IP address of the message. The first network has at least one IP address prefix. The first IP address prefix announced by the extraterritorial announcement message is one or more IP address prefixes owned by the first network.
[0132] Before generating the extraterritorial notification message, the first device obtains the first IP address prefix from the first network. Exemplarily, the first device obtains the first IP address prefix by at least one of the following acquisition method 1 and acquisition method 2.
[0133] Acquisition method 1: The first device acquires the first IP address prefix based on the locally configured IP address associated with the first network.
[0134] The IP addresses associated with the first network include a gateway address, a virtual local area network interface (VlanIF) address, and an IP address in an IP address pool, wherein the gateway address is the IP address of the gateway connected to the first network, and the VlanIF address is the IP address of the three-layer logical interface used by the first network for VLAN communication. The IP address pool includes the IP addresses of various devices in the first network, such as the IP address pool of the dynamic host configuration protocol (DHCP) running in the first network or the IP address pool of the stateless address autoconfiguration configuration protocol (SLAACP) running in the first network.
[0135] The first device obtains the first gateway address, the first VlanIF address, and the IP addresses in the IP address pool from the locally configured IP addresses associated with the first network, and determines the IP address prefixes in each of the obtained IP addresses as the first IP address prefix. The first gateway address is the address of the gateway between the first network and the AS, and the first VlanIF address is the VlanIF address used when the first network performs VLAN communication with the AS.
[0136] Acquisition method 2: The first device acquires the IP address prefix owned by the first network based on the routing protocol supported by the first network.
[0137] The routing protocol includes at least one of RIP, ISIS, OSPF, BGP and other routing protocols. Here, the present application does not limit the type of routing protocol supported by the first network.
[0138] When the device in the first network communicates with the AS based on the routing protocol, it can send a message (called a routing message) supporting the routing protocol to the AS, and the source IP address in the routing message is the IP address owned by the first network. Based on this, the first device obtains the routing message sent by the device in the first network to the AS, and determines the IP address prefix in the source IP address of the routing message as the first IP address prefix.
[0139] The source IP address of the routing message is stored in the forwarding info base (FIB) of the network device in the first network. The FIB table includes multiple FIB entries. The FIB entry includes an IP address and an interface identifier. The interface identifier indicates an interface in the network device. The interface may be an external interface in the network device connected to a network outside the first network, or it may be an internal interface in the network device connected to a device in the first network. The FIB entry is used to indicate that the message with the IP address as the source IP address is sent through the interface. Based on this, in a possible implementation, the first device obtains the first IP address prefix based on the FIB table of each network device in the first network. For example, the interface identifier in each FIB entry of each FIB table is queried. If the interface indicated by the interface identifier in any FIB entry is an internal interface, the address prefix of the IP address in the FIB entry is determined as the first IP address prefix.
[0140] Through the above-mentioned acquisition method 1 and / or acquisition method 2, at least one first IP address prefix can be acquired. The first device uses the at least one IP address prefix as the IP address prefix for source address verification, and generates an extra-domain notification message based on the at least one first IP address prefix.
[0141] Exemplarily, for each first IP address prefix in at least one first IP address prefix, the IP address prefix announced by the first device using the first IP address prefix is Figure 2 The format of the extraterritorial notification TLV shown generates an extraterritorial notification TLV including the first IP address prefix, and the extraterritorial notification TLV is used to notify the AS that the first IP address prefix is a second-class IP address prefix owned by the first network for source address verification. In this way, the first device can generate at least one extraterritorial notification TLV, and based on the at least one extraterritorial notification TLV, generate an extraterritorial notification message, and the extraterritorial notification message includes the at least one extraterritorial notification TLV.
[0142] by Figure 5 Taking the implementation environment shown as an example, it is assumed that the first network is subnet 3, subnet 3 is connected to the edge network device R4 in AS1, the first device in subnet 3 is CE1, and the first IP address prefix obtained by CE1 from subnet 1 is P4 and P5, and an extraterritorial notification message including P4 and P5 is generated.
[0143] B12. The first device sends an extraterritorial notification message to the AS connected to the first network.
[0144] For example, the first device sends the out-of-domain notification message to any edge network device connected to the first network in the AS, still in Figure 5 For example, CE1 sends an extraterritorial notification message to R4. It should be understood that Figure 5 As shown, subnet 3 is also connected to AS2. If subnet 2 also has a source address verification function for the external network, CE1 can also send the extra-domain notification message to AS2.
[0145] B13. The first edge network device receives the extraterritorial notification message.
[0146] like Figure 8 As shown, at this time, it is assumed that the first edge network device is any edge network device connected to the first network in the AS, and the Figure 5 For example, the first edge network device is R4, and R4 receives the extraterritorial notification message from CE1. For the first edge network device, the first IP address prefix in the extraterritorial notification message is the second class IP address prefix owned by the first network notified by the external device to the AS.
[0147] The first edge network device obtains the first IP address prefix from the extra-domain announcement message. For example, the first edge network device generates at least one second-class announcement information of the first IP address prefix based on the extra-domain announcement message, wherein the second-class announcement information of any IP address prefix is used to indicate that the IP address prefix is a second-class IP address prefix owned by the external device to which the IP address prefix notified to the AS belongs. Exemplarily, the first edge network device parses the content of at least one extra-domain announcement TLV from the extra-domain announcement message, and for any extra-domain announcement TLV, the first edge network device generates a second-class announcement information of the first IP address prefix based on the content of the extra-domain announcement TLV, and the second-class announcement information includes the extra-domain announcement identifier External and the first IP address prefix in the extra-domain announcement TLV. Still with Figure 5 For example, assuming that the first IP address prefixes announced are P4 and P5, the second type of announcement information of P4 and P5 is shown in Table 2 below.
[0148] Table 2
[0149] Device ID IP address prefix Network ID Access Type ID External R4 P4 Subnet 3 Cross-domain multi-homing access type ID External=1 R4 P5 Subnet 3 Cross-domain multi-homing access type ID External=1
[0150] Optionally, as shown in Table 2, the second type of notification information of any first IP address prefix also includes the device ID of the edge network device receiving the out-of-domain notification message, the network ID of the first network, and the access type identifier of the first network, where the access type identifier is used to indicate the access type of the access AS of the first network. Based on this, the generation process of the second type of notification information includes the following steps 4011 and 4012.
[0151] Step 4011: The first edge network device obtains the network identifier of the first network and the access type identifier of the first network from the interface configuration information of the external interface based on the interface ID of the external interface that receives the extraterritorial notification message.
[0152] Among them, each edge network device in the AS is configured with global interface configuration information, which includes the interface configuration information of each external interface of each edge network device in the AS. The interface configuration information of any external interface includes the device ID of the edge network device where the external interface is located, the interface ID of the external interface, the network ID of the external network connected to the external interface, and the access type ID of the external network. Figure 5 Taking AS1 in the example, the global interface configuration information of AS1 is shown in the following Table 3.
[0153] Table 3
[0154] Device ID Interface ID Network ID Access Type ID R1 a Subnet 1 Single-homing access type ID R1 b Subnet 2 Full multi-homing access type ID R4 a Subnet 2 Full multi-homing access type ID R4 b Subnet 3 Cross-domain multi-homing access type ID R7 d Internet Internet access type ID
[0155] The first edge network device queries the interface configuration information of the external interface in the global interface configuration information based on the interface ID of the external interface that receives the extraterritorial notification message, and obtains the network ID and access type identifier of the first network from the interface configuration information of the external interface. The access type of the first network can be determined based on the access type identifier of the first network. At this time, the access type of the first network is determined based on the interface ID of the external interface. If the first IP address prefix is obtained based on routing information, the access type of the first network can also be determined based on the interface ID of the external interface.
[0156] Step 4012: For each extraterritorial notification TLV in the extraterritorial notification message, the first edge network device generates second-type notification information of the first IP address prefix based on the access type identifier of the first network, the network identifier of the first network, the device ID of the first edge network device, and the first IP address prefix in the extraterritorial notification TLV.
[0157] Wherein, each time the first edge network device generates second-type notification information of an IP address prefix, the second-type notification information of the IP address prefix is stored for subsequent use.
[0158] B14. The first edge network device generates an intra-domain notification message based on the extra-domain notification message, where the intra-domain notification message is used to notify the second-class IP address prefix owned by the first network.
[0159] Among them, the intra-domain announcement message includes each first IP address prefix announced by the extra-domain announcement message, and the first IP address prefix is the second-class IP address prefix owned by the first network. The intra-domain announcement message also includes the extra-domain announcement identifier, and the intra-domain announcement identifier is 1 at this time, indicating that the first IP address prefix is a second-class IP address prefix.
[0160] After generating the second type of notification information of at least one first IP address prefix based on the extraterritorial notification message, for each first IP address prefix in the at least one first IP address prefix, the first edge network device generates the second type of notification information of the first IP address prefix based on the second type of notification information of the first IP address prefix according to Figure 4 The format of the intra-domain announcement TLV shown generates an intra-domain announcement TLV including the first IP address prefix, and the extra-domain announcement TLV is used to announce that the first IP address prefix is the second-class IP address prefix owned by the first network announced by the first device to the AS, wherein the Origin router-id, Mask Len, IP Prefix, Type, and Tag in the intra-domain announcement TLV are respectively the device ID of the first edge network device, the mask length of the first IP address prefix, the first IP address prefix, the access type identifier of the first network, and the network ID. At this time, S and D in the intra-domain announcement TLV are random values.
[0161] In the case of at least one first IP address prefix, the first edge network device generates at least one intra-domain announcement TLV, and based on the at least one intra-domain announcement TLV, generates an intra-domain announcement message, the intra-domain announcement message includes the at least one intra-domain announcement TLV, and each intra-domain announcement TLV is used to announce a first IP address prefix.
[0162] The above-mentioned extraterritorial notification message enables the first edge network device to obtain a trusted first IP address prefix, and the source address verification list obtained based on the trusted first IP address prefix can ensure that the obtained source address verification list is credible and accurate.
[0163] B15. The first edge network device sends the intra-domain notification message to the second edge network device in the AS.
[0164] Among them, this step B15 is the same as step A13, and this step B15 will not be repeated here.
[0165] B16. The second edge network device receives the intra-domain notification message.
[0166] Each second edge network device in the AS will receive the intra-domain announcement message. Next, taking any second edge network device as an example, the processing process of the intra-domain announcement message in the second edge network device is introduced.
[0167] The second edge network device parses the content of at least one intra-domain announcement TLV from the intra-domain announcement message, and for any intra-domain announcement TLV, generates a second type of announcement information of the first IP address prefix based on the content of the intra-domain announcement TLV, and the second type of announcement information includes the first IP address prefix, device ID, network ID, access type identifier, and extra-domain announcement identifier in the intra-domain announcement TLV. Each time the second edge network device generates the second type of announcement information of an IP address prefix, it stores the second type of announcement information of the IP address prefix for subsequent use.
[0168] In a similar manner, each second edge network in the AS generates the second-class announcement information of each first IP address prefix based on the announcement message received within the domain, and stores the second-class announcement information of each first IP address prefix locally. In this way, each edge network device in the AS stores the second-class announcement information of each first IP address prefix owned by the first network.
[0169] The above steps B11 to B16 are described by taking the first edge network device connected to the first network as an example. In another possible implementation, the first edge network device is not connected to the first network. Fig. 9 , the process of the first edge network device obtaining the second-class IP address prefix owned by the first network is introduced as follows.
[0170] B21. The first device generates an extraterritorial announcement message, which includes the first IP address prefix.
[0171] Among them, this step B21 is the same as step B11, and this step B21 will not be described in detail here.
[0172] B22. The first device sends an extraterritorial notification message to the AS connected to the first network.
[0173] Among them, this step B22 is the same as step B12, and this step B22 will not be repeated here.
[0174] B23. The third edge network device receives the out-of-domain notification message.
[0175] like Fig. 9As shown, at this time, assuming that the third edge network device is any edge network device connected to the first network, this step B23 is the same as step B13. The third edge network device locally stores the second type of notification information of the first IP address prefix based on the extraterritorial notification message. This step B23 will not be repeated here.
[0176] B24. The third edge network device generates an intra-domain notification message based on the extra-domain notification message, where the intra-domain notification message is used to notify the second-class IP address prefix owned by the first network.
[0177] Among them, this step B24 is the same as step B14, and this step B23 will not be repeated here.
[0178] B25. The third edge network device sends the intra-domain notification message to each edge network device in the AS except the third edge network device.
[0179] Among them, this step B25 is the same as step B15, and this step B25 will not be repeated here.
[0180] B26. Each edge network device in the AS except the third edge network device receives the intra-domain announcement message.
[0181] In this step B26, similar to step B16, each edge network device stores the second type of notification information of the first IP address prefix locally based on the received notification message within the domain, and this step B26 will not be described in detail here. Fig. 9 As shown, at this time, the first edge network device is an edge network device other than the third edge network device in the AS, and the first edge network device can obtain the first IP address prefix from the intra-domain announcement message, and there is a second type of announcement information that locally stores the first IP address prefix. In this case, the first edge network device can determine the access type of the first network based on the access type identifier in the intra-domain announcement message, so as to subsequently obtain the source address verification list based on the first IP address prefix and the access type of the first network.
[0182] The above steps B11 to B16 and steps B21 to B26 are explained by taking an example that an extraterritorial notification message includes all first IP address prefixes obtained from the first network. In another possible implementation, if multiple first IP address prefixes are obtained, the first device generates multiple extraterritorial notification messages based on the multiple first IP address prefixes, each of which is used to announce at least one first IP address prefix, and the first device sends the multiple extraterritorial notification messages to any edge network device connected to the first network in the AS. Alternatively, the first device sends at least one extraterritorial notification message to each of the multiple edge network devices connected to the first network in the AS, and each edge network device that receives the extraterritorial notification message stores the second type of notification information of the first IP address prefix announced by the extraterritorial notification message locally based on the received extraterritorial notification message, and sends an intra-domain notification message to other edge network devices in the AS, so that other edge network devices store the second type of notification information of the first IP address prefix announced by the extraterritorial notification message locally based on the intra-domain notification message.
[0183] For each external network connected to the AS, if any external network is a single-home access network or a complete multi-home access network, the edge network device connected to the external network can obtain the first-class IP address prefix owned by the external network according to the process shown in the above steps A11 to A14 or the process shown in steps A21 to A24, and locally store the first-class external notification information of the first-class IP address prefix. If any external network is a cross-domain multi-home access network or an Internet access network, the edge network device connected to the external network can obtain the second-class IP address prefix owned by the external network according to the process shown in the above steps B13 to B16 or the process shown in steps B23 to B26, and locally store the second-class external notification information of the second-class IP address prefix. In this way, each edge network device can store the first-class notification information of the first-class IP address prefix owned by each external network and the second-class notification information of the second-class IP address prefix owned by each external network.
[0184] 402. The first edge network device obtains a source address verification list based on the first IP address prefix and the access type of the first network. The source address verification list includes the first IP address prefix and an interface identifier of a first external interface, and the first external interface is determined based on the access type.
[0185] Among them, the source address verification list is the source address verification list of the first external interface, and the source address verification list also includes at least one item in a blacklist and a whitelist. The first external interface is determined based on the access type of the first network. For example, if the access type of the first network is a single-home access type or a complete multi-home access type, the first external interface is an external interface connected to the first network. At this time, the first IP address prefix is added to the whitelist in the source address verification list. For another example, if the access type of the first network is a cross-domain multi-home access type or an Internet access type, the first external interface is an external interface connected to the second network. At this time, the first IP address prefix is added to the blacklist in the source address verification list. The second network is an external network other than the first network among the external networks connecting the AS.
[0186] Each edge network device in the AS has the first type of notification information and / or the second type of notification information of the first IP address prefix. Therefore, for the first IP address prefix, each edge network device can execute this step 402, wherein the process of each edge network device obtaining the blacklist in the source address verification list based on the first IP address prefix is similar. Next, taking the first edge network device as an example, the process of obtaining the blacklist in the source address verification list is introduced as follows through the following steps C11 to C12.
[0187] C11. If the access type of the first network is a cross-domain multi-homing access type or an Internet access type, the first edge network device determines an external interface in the first edge network device connected to the second network as the first external interface.
[0188] At this time, assuming that the first IP address prefix is a second-class IP address prefix, the first edge network device obtains the access type identifier of the first network from the second-class notification information of the first IP address prefix based on the identifier of the first network. If the access type identifier indicates a cross-domain multi-homing access type or an Internet access type, the interface identifier of the first external interface connected to the second network is obtained from the interface identifier of the external interface of the first edge network device. Exemplarily, for any first IP address prefix, the first edge network device obtains the device ID of the first edge network device and the network ID of the first network from the second-class notification information of the first IP address prefix, and based on the device ID and the network ID, queries the interface ID of the first external interface in the global interface configuration information. For example, if the device ID in any interface configuration information is the device ID of the first edge network device, and the network ID in the interface configuration information is not the ID of the first network, then the network ID in the interface configuration information is the network ID of the second network, and the interface ID in the interface configuration information is the interface ID of the first external interface.
[0189] C12. The first edge network device obtains a blacklist in the source address verification list based on the first IP address prefix and the interface identifier of the first external interface, where the blacklist includes the first IP address prefix.
[0190] Since the first IP address prefix is the IP address prefix owned by the first network announced by the external device, the first IP address prefix is considered to be credible, and the first network and the second network are different networks. Therefore, the first IP address prefix can be added to the blacklist. Based on this, in a possible implementation method, the first edge network device queries whether there is a blacklist in the source address verification list of the first external interface based on the interface identifier of the first external interface. If the blacklist exists, the first edge network device adds the first IP address prefix to the blacklist. If there is no blacklist in the source address verification list, the blacklist is added to the source address list, and the first IP address prefix is added to the blacklist. In a similar manner, the first edge network adds each first IP address prefix to the blacklist of each external interface connected to the second network.
[0191] Still Figure 5 For example, assuming that R4 is the first edge network device, the first IP address prefix is subnet X (not in Figure 5 As shown in the figure, P6 and P7 owned by R4, subnet 3 connected to external interface b of R4 is the second network, then external interface b is the first external interface, and the source address verification list of external interface b is shown in Table 4 below.
[0192] Table 4
[0193] Interface ID blacklist Whitelist b P6, P7 none
[0194] In another possible implementation, each edge network device connected to the first network in the AS obtains the first-class IP address prefix owned by the first network based on the routing information in the AS, and sends the first-class IP address prefix obtained by each edge network device in the AS through an intra-domain announcement message. Each edge network device locally stores the first-class announcement information of at least one first-class IP address prefix of the first network based on the received intra-domain announcement message. At this time, the at least one first-class IP address prefix may include the first IP address prefix or may not include the first IP address prefix. In the case of including the first IP address prefix, the first IP address prefix has two sources, one is the external network and the other is the routing information.
[0195] Due to reasons such as misconfiguration of the first network and malicious attacks, the first IP address prefix announced by the first device may not belong to the first network. Based on this, for any first IP address prefix, the first edge network device performs conflict detection on the source network of the first IP address prefix based on the second-class notification information of the first IP address prefix and the first-class notification information of the IP address prefix owned by the first network, and based on the detection result, performs the above-mentioned step of obtaining the blacklist in the source address verification list, wherein the detection result is used to indicate whether the first IP address prefix is the IP address prefix erroneously announced by the first device. Next, in combination with the following steps D1 and D2, this implementation method is introduced as follows.
[0196] D1. The first edge network device determines a first source network and a second source network for a first IP address prefix, where the first source network is a network that announces the first IP address prefix to the AS, and the second source network is a network to which the first IP address prefix belongs that is determined based on routing information in the AS.
[0197] The first edge network device queries the first IP address prefix in each second-class notification information stored locally, and if any second-class notification information includes the first IP address prefix, the network indicated by the network ID in the second-class notification information is determined as the first source network. By querying the second-class notification information, at least one first source network of the first IP address prefix can be determined.
[0198] The first edge network device queries the first IP address prefix in each first-class notification information stored locally, and if any second-class notification information includes the first IP address prefix, the network indicated by the network ID in the first-class notification information is determined as the second source network. By querying the first-class notification information, at least one second source network of the first IP address prefix can be determined.
[0199] D2. If the first source network is the same as the second source network, the first IP address prefix is not the IP address prefix erroneously announced by the first device, and the first edge network device executes the above-mentioned step of obtaining the blacklist in the source address verification list; if the first source network is not the same as the second source network, the first IP address prefix is the IP address prefix erroneously announced by the first device, and the first edge network device does not execute the above-mentioned step of obtaining the blacklist in the source address verification list, so as to avoid the incorrectly announced address prefix being added to the source address verification list, resulting in an inaccurate source address verification list.
[0200] If the first edge network device does not perform the above-mentioned step of obtaining the blacklist in the source address verification list, the first edge network device queries whether there is already a blacklist in the source address verification list. If there is already a blacklist, the first edge network device queries whether there is the first IP address prefix in the blacklist. If the first IP address prefix exists, the first IP address prefix in the blacklist is deleted.
[0201] The above is introduced by taking the example of the first edge network device obtaining the blacklist of the second network connected to the first edge network device based on the second type of notification information of a first IP address prefix. If the first edge network device is not connected to the second network, there is no need to perform the above steps of obtaining the blacklist in the source address verification list. In a similar manner, for each edge network device connected to the second network, the edge network device obtains the blacklist in the source address verification list of the local external interface connected to the second network based on the second type of notification information of each first IP address prefix. In another possible implementation, for each edge network device connected to the second network, if the second network is a single-home access network or a complete multi-home access network, the edge network device does not perform the above steps of obtaining the blacklist in the source address verification list for the external interface connected to the second network. For example, suppose Figure 5 Subnet 3 is the first network, subnet 2 is the second network, and edge network device R4 does not generate a blacklist in the source address verification list of the local external interface a.
[0202] The message sent by the cross-domain multi-homing network may enter the AS through the external interface connected to the cross-domain multi-homing network in the AS, or may enter the Internet first and then enter the AS through the interconnection interface of the Internet. Therefore, the cross-domain multi-homing network and the Internet may both be the legitimate network sources of the source IP address prefix of the message. The source IP address prefix of the message cannot be added to the blacklist of the Internet, so as to avoid that the subsequent message carrying the source IP address prefix cannot pass the source address verification for the external interface connected to the Internet interface in the AS. Based on this, in another possible implementation method, if the access type of the first network is a cross-domain multi-homing access network, for any first IP address prefix to be added to the blacklist, any edge network device in the AS queries the access type ID of the second network from the global interface configuration information, and determines the access type of the second network to the AS based on the interface type identifier of the second network. If the access type of the second network is not an Internet access type, the edge network device executes the step of obtaining the blacklist in the source address verification list. If the access type of the second network is an Internet access type, the edge network device does not execute the step of obtaining the blacklist in the source address verification list. Still Figure 5For example, assuming that the first network is subnet 3, the edge network device is R7, and the external interface a of R7 is connected to AS3 in the Internet, then R7 does not add P4 and P5 of subnet 3 to the blacklist of the external interface a.
[0203] Messages with anycast addresses (referred to as anycast messages) may be sent from multiple external networks connected to the AS to the AS. Therefore, these multiple external networks are all legitimate network sources of the source IP address prefix (i.e., the anycast address prefix) in the anycast message. The anycast address prefix cannot be added to the blacklist of these multiple external networks, so as to prevent subsequent anycast messages from failing to pass the source address verification at the external interfaces connected to these multiple external networks in the AS. Based on this, in another possible implementation, for any first IP address prefix to be added to the blacklist, any edge network device in the AS determines whether the first IP address prefix is an anycast address prefix. For example, if the first source network and the second source network of the first IP address prefix are the same, then the first IP address prefix is not an anycast address prefix. If the first source network and the second source network are different, then the first IP address prefix is an anycast address prefix. When the first IP address prefix is not an anycast address, the edge network device executes the step of obtaining the blacklist in the source address verification list. When the first IP address prefix is an anycast address, the edge network device does not execute the step of obtaining the blacklist in the source address verification list.
[0204] The above-mentioned process of notifying the edge network devices in the AS of the first-class IP address prefixes owned by the external network through the extra-domain announcement message can increase the credibility of the first-class IP address prefixes announced by the extra-domain announcement message. The announced first-class IP address prefixes are credible, and the edge network devices can obtain the source address verification list based on these credible first-class IP address prefixes, and can increase the accuracy of the obtained source address verification list.
[0205] The process of each edge network device obtaining the whitelist in the source address verification list based on the first IP address prefix is similar. Next, taking the first edge network device as an example, the process of obtaining the whitelist in the source address verification list is introduced as follows through the following steps C21 to C22.
[0206] C21. The access type of the first network is a single-homing access type or a complete multi-homing access type, and the first edge network device determines an external interface of the first edge network device connected to the first network as a first external interface.
[0207] At this time, assuming that the first IP address prefix is a first-class IP address prefix, the first edge network device obtains the access type identifier of the first network from the first-class notification information of the first IP address prefix based on the identifier of the first network, and if the access type identifier indicates a single-homing access type or a complete multi-homing access type, the interface identifier of the first external interface of the first network connection is obtained from the interface identifier of the external interface of the first edge network device. Exemplarily, for any first IP address prefix, the first edge network device obtains the device ID of the first edge network device and the network ID of the first network from the first-class notification information of the first IP address prefix, and based on the device ID and the network ID, queries the interface ID of the first external interface in the global interface configuration information. For example, if the device ID in any interface configuration information is the device ID of the first edge network device, and the network ID in the interface configuration information is the ID of the first network, then the interface ID in the interface configuration information is the interface ID of the first external interface.
[0208] C22. The first edge network device obtains a whitelist in the source address verification list based on the first IP address prefix and the interface identifier of the first external interface, where the whitelist includes the first IP address prefix.
[0209] The first edge network device queries whether there is a whitelist in the source address verification list of the first external interface based on the interface identifier of the first external interface. If there is a whitelist, the first edge network device adds the first IP address prefix to the whitelist. If there is no whitelist in the source address verification list, the whitelist is added to the source address list, and the first IP address prefix is added to the whitelist.
[0210] Still Figure 5 For example, assuming that R1 is the first edge network device, subnet 1 is the first network, P1 is the first IP address prefix, the first external interface is the external interface a in R1, and the source address verification list of the external interface a is shown in Table 5 below.
[0211] Table 5
[0212] Interface ID blacklist Whitelist b none P1
[0213] If the first edge network device is not connected to the first network, the first edge network device does not need to perform the above step C22. In the case where the first network is a complete multi-homing network, each edge network device connected to the first network in the AS has the first type of notification information of the first IP address prefix. In a similar manner, each edge network adds each first IP address prefix of the first network to the whitelist of the local external interface connected to the first network. Taking the first network as subnet 2 as an example, the first IP address prefix of subnet 2 includes P2 and P3. The edge network device R1 generates the source address verification list of the external interface b shown in Table 6, and the edge network device R4 generates the source address verification list of the external interface a shown in Table 7.
[0214] Table 6
[0215] Interface ID blacklist Whitelist b none P2, P3
[0216] Table 7
[0217] Interface ID blacklist Whitelist a none P2, P3
[0218] In another possible implementation, if the first network is a single-homing access network or a complete multi-homing access network, if the device in the first network notifies the AS of the second-class IP address prefix owned by the first network through an extra-domain notification message, then the edge network devices connected to the first network can also add the second-class IP address prefix to the whitelist in the source address verification list of the first external interface, so as to add the IP address prefix owned by the first network to the whitelist as quickly as possible.
[0219] Above Figure 5 The provided method obtains the IP address prefix owned by the external network connected to the AS through the edge network device in the AS, and then can obtain the source address verification list based on the obtained IP address prefix and the access type of the external network.
[0220] In another possible implementation, compared to Figure 2 The extraterritorial notification TLV shown and Figure 3 The intra-domain notification TLV shown is Fig.10 and Fig.11 As shown, the data announced by the extraterritorial announcement TLV and the data announced by the intraterritorial announcement TLV also include at least one of flag 1 (Flag1), flag 2 (Flag2) and flag 3 (Flag1), and the values of these data are shown below respectively.
[0221] Flag1: Anycast type flag, used to indicate whether the advertised IP address prefix is an anycast address prefix, occupies 1 bit. For example, Flag1=1 indicates that the IP address prefix is an anycast address prefix, and Flag1=0 indicates that the IP address prefix is not an anycast address prefix.
[0222] Flag2: Attribute identifier, used to indicate whether the message can enter the AS through the Internet interface, occupying 1 bit, for example, Flag2 = 1, indicating that the message can enter the AS through the Internet interface, Flag1 = 0, indicating that the message cannot enter the AS through the Internet interface. Among them, the message refers to the data message sent by the external network to which the extraterritorial announcement message where the extraterritorial announcement TLV is located belongs, and the data message uses the IP address prefix as the source IP address prefix. The edge network device that receives the extraterritorial announcement message in the AS can determine the external network to which the extraterritorial announcement message belongs based on the network tag (Tag) in the extraterritorial announcement TLV, or determine the external network to which the extraterritorial announcement message belongs based on the external interface that receives the extraterritorial announcement message.
[0223] Flag3: Whitelist generation flag, used to indicate whether to generate a whitelist in the source address verification list based on the IP address prefix, occupies 1 bit. For example, Flag3=1 indicates that the whitelist is generated based on the IP address prefix, and Flag3=0 indicates that the whitelist cannot be generated based on the IP address prefix.
[0224] In another possible implementation, compared to Figure 2 The extraterritorial notification TLV shown is Fig. 9 The data announced by the extraterritorial announcement TLV shown also includes a network tag, which is used to indicate the network ID of the external network to which the announced IP address prefix belongs.
[0225] based on Fig.10 Foreign notification TLV and Fig.11 The intra-domain announcement TLV shown, combined with the following steps 501 and 502, introduces the process of the method for obtaining the source address verification list provided by the present application.
[0226] 501. A first edge network device obtains a first IP address prefix owned by a first network.
[0227] Among them, this step 501 is the same as step 401, and the difference lies in the following four points.
[0228] The first difference:
[0229] In the case where the first class IP address prefix is the first class IP address prefix, in the embodiment of the present application, according to Fig.11The format of the intra-domain notification TLV shown generates an intra-domain notification message including the first IP address prefix, and Flag1 to Flag3 in the intra-domain notification message are invalid. When the first IP address prefix is a second-class prefix, the difference lies in the following second difference and the following third difference.
[0230] The second difference:
[0231] In the case that the acquired first IP address prefix is a second-class IP address prefix, before the first device generates an extra-domain notification message including the first IP address prefix, for any first IP address prefix, the first device determines the anycast type identifier corresponding to the first IP address prefix based on whether the first IP address prefix is an anycast address prefix. For example, if the first IP address prefix is an anycast address prefix, the anycast type identifier Flag1=1; otherwise, the anycast type identifier Flag1=0.
[0232] The first device determines the attribute identifier corresponding to the first IP address prefix based on whether the message sent by the first network can enter the AS connected to the first network through the Internet interface, wherein the message refers to a message with the first IP address prefix as the source IP address prefix. For example, if the message can enter the AS through the Internet interface, the attribute identifier Flag2=1, otherwise, the attribute identifier Flag2=0.
[0233] The first device determines whether the first IP address prefix obtained is all the IP address prefixes owned by the first network. For example, the first device counts the source IP address prefixes of multiple messages sent from the first network in the historical time period at the current time. If the counted source IP address prefix is the same as the first IP address prefix obtained, the first device determines that the first IP address prefix obtained is all the IP address prefixes owned by the first network. If the counted source IP address prefix is not the same as the first IP address prefix obtained, the first device determines that the first IP address prefix obtained is not all the IP address prefixes owned by the first network. In the case where the first IP address prefix obtained is all the IP address prefixes owned by the first network, it is determined that the whitelist generation flag Flag3 corresponding to the first IP address prefix is 1. In the case where the first IP address prefix obtained is not all the IP address prefixes owned by the first network, it is determined that the whitelist generation flag Flag3 corresponding to the first IP address prefix is 0, or the value of the whitelist generation flag is not determined temporarily, and a new IP address prefix continues to be obtained from the first network until the first IP address prefix obtained is all the IP address prefixes owned by the first network, and then the whitelist generation flag Flag3 corresponding to the first IP address prefix is determined to be 1. In another possible implementation, if the first IP address prefix is an anycast address prefix, the whitelist generation flag Flag3=0 to prevent the first IP address prefix from being added to the whitelist subsequently.
[0234] The first device generates a whitelist based on the network ID of the first network, the first IP address prefix, the anycast type identifier corresponding to the first IP address prefix, the attribute identifier, and the whitelist generation identifier. Fig.10 The structure of the extraterritorial notification TLV shown is used to generate the extraterritorial notification TLV.
[0235] The third difference:
[0236] When the edge network device connected to the first network in the AS generates an intra-domain notification message based on the extra-domain notification message, in the embodiment of the present application, Fig.11 The format of the intra-domain announcement TLV shown generates an intra-domain announcement message including the first IP address prefix. At this time, Flag1 to Flag3 in the intra-domain announcement message are valid, and the values of Flag1 to Flag3 are the same as the values of Flag1 to Flag3 in the intra-domain announcement message.
[0237] The fourth difference:
[0238] In an embodiment of the present application, at least one type of notification information among the first type of notification information and the second type of notification information of any IP address prefix also includes: Flag1 to Flag3 of the IP address prefix, and the values of Flag1 to Flag3 are the same as the values of Flag1 to Flag3 in the extra-domain notification message or the intra-domain notification message where the IP address prefix is located.
[0239] 502. Each edge network device in the AS obtains a source address verification list based on the first IP address prefix and the access type of the first network. The source address verification list includes the first external interface and the first IP address prefix.
[0240] Among them, this step 502 is similar to the above step 402, and the difference is that, in another possible implementation, when the first IP address prefix is a second-class IP address prefix, each edge network device obtains a source address verification list based on Flag1 to Flag3 in the first IP address prefix. Next, taking the first edge network device as an example, the process is described as follows:
[0241] The whitelist generation identifier of the first IP address prefix is queried from the second-class notification information of any first IP address prefix. If the whitelist generation identifier indicates that the whitelist in the source address verification list is generated based on the first IP address prefix, the first edge network device executes the above steps C21 and C22 to add the first IP address prefix to the whitelist in the source address verification list.
[0242] In the case of adding the first IP address prefix to the whitelist, in another possible implementation, the first network is also connected to multiple edge network devices in the AS, and the first device may also send different extra-domain notification messages to the multiple edge network devices, and / or the edge network devices in the AS may also determine the first-class IP address prefix owned by the first network based on the routing information in the AS. If the first edge network also queries the first-class IP address prefixes and the second-class IP address prefixes owned by the first network from the local first-class notification information and the second-class notification information, each first-class IP address prefix and each second-class IP address prefix owned by the first network are added to the whitelist in the source address verification list, so as to add as many IP address prefixes owned by the first network as possible to the whitelist. Fig.12 For example, assuming that subnet 1 is the first network, the source address list of subnet 1 obtained by edge network device R1 is shown in Table 8 below, and the source address list of subnet 1 obtained by edge network device R2 is shown in Table 9 below.
[0243] Table 8
[0244] Interface ID blacklist Whitelist a none P1, P2
[0245] Table 9
[0246] Interface ID blacklist Whitelist b none P1, P2
[0247] In another possible implementation, after the first network has a whitelist, if the first device detects that a first IP address prefix is not an IP address prefix owned by the first network, or the first IP address prefix owned by the first network is updated, the first device may also send a whitelist deletion request to each edge network device connected to the first network in the AS, and the list deletion request is used to indicate the deletion of the whitelist of the first network. For example, the whitelist deletion request includes the network ID of the first network, or the whitelist deletion request includes the network ID of the first network and a deletion flag, and the deletion flag is used to indicate the deletion of the whitelist of the first network. After any edge network device connected to the first network receives the list deletion request, it queries the external interface of the local connection to the first network based on the network ID in the list deletion request, and deletes the whitelist of the first network associated with the external interface, so as to avoid errors in the subsequent verification of the source address of the message from the first network based on the whitelist.
[0248] In another possible implementation, if there are multiple first IP address prefixes of the first network, and the whitelist generation mark in the second-class notification information of any first IP address prefix indicates that the whitelist cannot be generated based on the first IP address prefix, then the edge network device connected to the first network does not perform the step of obtaining the whitelist in the source address verification list based on the first IP address prefix and the interface identifier of the first external interface for each first IP address prefix, and performs the step of obtaining the blacklist in the source address verification list based on the first IP address prefix and the interface identifier of the first external interface (such as step C12).
[0249] If the whitelist generation mark of any first IP address prefix indicates that the whitelist in the source address verification list cannot be generated based on the IP address prefix, the first edge network device executes the above steps C11 and C12 to add the first IP address prefix to the blacklist in the source address verification list.
[0250] In the case where the first network is a cross-domain multi-homing access network or an interconnected access network, the edge network device in the AS is notified whether to generate a whitelist based on the first IP address prefix through the whitelist generation identifier in the extra-domain notification message and the intra-domain notification message. The edge network device does not need to determine whether to add the first IP address prefix to the whitelist or the blacklist by determining whether all the IP address prefixes of the first network are collected, nor does the edge network device need to determine whether to add the first IP address prefix to the whitelist or the blacklist by querying the access type of the first network, thereby reducing the workload of the edge network device.
[0251] Since there may be multiple legitimate network sources for messages with anycast addresses, messages sent from cross-domain multi-homing networks may also enter the AS through the Internet interface. Based on this, when the first network is a multi-homing access type, for any second network and any first IP address prefix, the first edge network device determines whether to execute the above step C12 based on the first IP address prefix and the interface identifier of the first external interface for the first IP address prefix based on parameters such as the access type identifier of the second network, the anycast type identifier corresponding to the first IP address prefix in the extra-domain notification message, and the attribute identifier, to obtain the blacklist in the source address verification list.
[0252] Exemplarily, the first edge network device obtains the anycast type identifier and attribute identifier corresponding to the first IP address prefix from the second type of notification information of the first IP address prefix, and obtains the access type identifier of the second network from the global interface configuration information table. If the access type identifier of the second network is not an identifier of the Internet access type (that is, the access type of the second network is a non-Internet access type, and the non-interconnected access type refers to an access type other than the interconnected access type, such as a single-home access type, a complete multi-home access type, or a cross-domain multi-home access type, etc.), the first edge network device determines whether to perform the above step C12 for the first IP address prefix based on the anycast type identifier corresponding to the first IP address prefix. For example, if the anycast type identifier indicates that the first IP address prefix is not an anycast address prefix, the first edge network device performs the above step C12 for the first IP address prefix. If the anycast type identifier indicates that the first IP address prefix is an anycast address prefix, given that the first IP address prefix may enter the AS from the first external interface connected to the second network, the first edge network device does not perform the above step C12 for the first IP address prefix.
[0253] If the access type identifier of the second network is an identifier of the Internet access type, the first edge network device determines whether to execute the above step C12 for the first IP address prefix based on the attribute identifier corresponding to the first IP address prefix. For example, if the attribute identifier indicates that the message cannot enter the AS through the Internet interface, the message will not enter the AS through the external interface network connected to the Internet (such as the second network), and the first edge network device executes the above step C12 for the first IP address prefix. If the attribute identifier indicates that the message can enter the AS through the Internet interface, the message may enter the AS through the Internet interface connected to the Internet (such as the second network), and the first edge network device does not execute the above step C12 for the first IP address prefix.
[0254] In another possible implementation, if the first edge network device executes the above step C12 for the first IP address prefix, before executing step C12, it is first determined whether the first source network and the second source network of the first IP address prefix are the same. If the first source network and the second source network are the same, then execute this step C12.
[0255] If the first edge network device does not execute step C12 for the first IP address prefix, the first edge network device may also query whether the first IP address prefix exists in the blacklist of the source address list. If the first IP address prefix does not exist in the blacklist, the first IP address prefix in the blacklist is deleted to prevent subsequent messages with the first IP address prefix as the source IP address prefix from failing the source address verification at the first external interface.
[0256] In a similar manner, each edge network device in each AS can also obtain the blacklist of the local external interface connected to the second network based on the second type of notification information of the first IP address prefix.
[0257] The above-mentioned identification based on the first network can accurately locate the external interface connected to the first network or the second network from the various external interfaces of the first edge network device, and then generate a source address verification list based on the interface identification of the accurately located external interface, so that the source address of the message received by the external interface can be accurately verified based on the source address verification list.
[0258] The above steps 501 and 502 obtain the IP address prefix owned by the external network connected to the AS through the edge network device in the AS, and then obtain the source address verification list based on the obtained IP address prefix and the access type of the external network.
[0259] For the above steps 401 and 402 and steps 501 and 502, in another possible implementation method, if the access type of the first network is a cross-domain multi-homing access type or an Internet access type, and the first IP address prefix is a first-class IP address prefix, the edge network device in the AS cannot add the first IP address prefix to the whitelist of the external interface connected to the first network, nor can it add the first IP address prefix to the blacklist of the interconnected interface. The first IP address prefix can be added to the blacklist of the external interface of a single-homing access network or a complete multi-homing access network connection.
[0260] For the above steps 401 and 402 and steps 501 and 502, by sending an intra-domain notification message in the AS, edge network devices that are not connected to the first network can also obtain the IP address prefix owned by the first network for source address verification, so as to add the IP address prefix of the first network to the local source address verification list.
[0261] Regarding the above steps 401 and 402 as well as steps 501 and 502, in another possible implementation method, for any edge network device in the AS, if an IP address prefix is added to the whitelist of any local external interface, the edge network device will no longer execute the step of obtaining the blacklist of the external interface, that is, the IP address prefix will not be added to the blacklist of the external interface subsequently, and the blacklist of the external interface is invalid by default.
[0262] For any edge network device in the AS and any external interface in the edge network (such as the first external interface), when the external interface has a source address verification list, the edge network device performs source address verification on each data message received from the external interface based on the source address verification list. Exemplarily, taking the source address verification list of the first external interface in the first edge network device as an example, in combination with the following steps 601 and 602, the process is described as follows:
[0263] 601. A first edge network device receives a data message through a first external interface, where the data message includes a source address.
[0264] The source address is the source IP address in the data message.
[0265] 602. The first edge network device performs source address verification on the data message based on the source address and the first IP address prefix in the source address verification list of the external interface.
[0266] The first edge network device obtains the IP address prefix of the source address. For example, according to the longest prefix matching principle, the IP address prefix is matched in the source IP address. The matched IP address prefix is the IP address prefix of the source address. For the convenience of description, the IP address prefix of the source address is called the second IP address prefix.
[0267] The first edge network device implements source address verification by comparing the second IP address prefix and the IP address prefix in the source address verification list. Exemplarily, when the source address verification list includes a blacklist, the IP address prefix of the source address (referred to as the second IP address prefix) is queried in the blacklist. If the second IP address prefix is found in the blacklist, for example, a first IP address prefix in the blacklist is the second IP address prefix, then the second IP address prefix does not belong to the external network connected to the first external interface, the data packet is an illegal packet, and the first edge network device fails to verify the data packet. If the second IP address prefix does not exist in the blacklist, then the second IP address prefix may belong to the external network connected to the first external interface, the data packet is a legal packet, and the first edge network device passes the verification of the data packet.
[0268] In the case that the source address verification list includes a white list, the second IP address prefix is queried in the white list. If the source IP address prefix does not exist in the white list, the source IP address prefix does not belong to the external network connected to the first external interface, the data packet is an illegal packet, and the first edge network device fails to verify the data packet. If the second IP address prefix exists in the white list, for example, a first IP address prefix in the white list is the second IP address prefix, the source IP address prefix belongs to the external network connected to the first external interface, the data packet is a legal packet, and the first edge network device passes the verification of the data packet.
[0269] The above steps 501 and 502 are explained by taking the first network as a cross-domain multi-homing network as an example, and use marked extra-domain notification messages and intra-domain notification messages to announce the attributes of the IP address prefix used by the first network in the AS, thereby avoiding the edge network device from determining the attributes of the IP address prefix through complex methods such as query or verification, reducing the complexity of operation and maintenance, and reducing the risk of false positives in the source address source list.
[0270] In the above embodiment, the IP address prefix owned by the single-homing access network or the complete multi-homing access network is added to the whitelist of the external interface to which it is connected, and the whitelist is used to perform source address verification on the data packets received by the external interface, so that the data packets with the IP address prefix owned by other networks as the source IP address prefix can enter the AS from the external interface, and the IP address prefix owned by the cross-domain multi-homing access network or the Internet access network is added to the blacklist of the external interface to which it is not connected, and the blacklist is used to perform source address verification on the data packets received by the external interface, so that the packets with the IP address prefix owned by the cross-domain multi-homing access network or the Internet access network as the source IP address prefix can enter the AS from the external interface.
[0271] The above-mentioned method embodiments are all described by taking the first device as a device in the first network as an example. In another possible implementation, the first device is not located in the first network and is not located in the AS. The first device has the authority to collect the IP address prefix owned by the first network and can obtain the first IP address prefix owned by the first network. Here, this application does not limit the deployment location of the first device.
[0272] The above describes the method of the embodiment of the present application, and the following describes the device of the embodiment of the present application. It should be understood that the device described below has any function of the network device in the above method. Figures 1 to 12 The source address verification list acquisition method and notification message sending method provided by the present application described in detail are based on the same inventive concept and will be combined with Figures 13 to 17A device based on the method is described. It should be understood that the technical features described in the method embodiment are also applicable to the following device embodiment.
[0273] Fig.13 is a schematic diagram of the structure of a source address verification list acquisition device provided in an embodiment of the present application, Fig.13 The device 1300 shown is applied to the first edge network device in the AS, which can be the first edge network device or a part of the first edge network device in the previous embodiments, and is used to execute the source address verification list acquisition method executed by the first edge network device, such as Fig.13 As shown, the apparatus 1300 includes:
[0274] A first acquisition module 1301 is used to acquire a first IP address prefix owned by a first network, where the first network is any network connected to the autonomous domain and located outside the autonomous domain;
[0275] The second acquisition module 1302 is used to acquire a source address verification list based on the first IP address prefix and the access type of the first network. The source address verification list includes the first IP address prefix and the interface identifier of the first external interface. The first external interface is determined based on the access type.
[0276] In a possible implementation, the second address acquisition module 1302 is used to:
[0277] If the access type of the first network is a cross-domain multi-homing access type or an Internet access type, determining an external interface in the first edge network device connected to the second network as the first external interface;
[0278] Based on the first IP address prefix and the interface identifier of the first external interface, a blacklist in the source address verification list is obtained, where the blacklist includes the first IP address prefix.
[0279] In a possible implementation, the apparatus 1300 further includes:
[0280] A determination module, configured to determine a first source network and a second source network of a first IP address prefix, wherein the first source network is a network that notifies the first IP address prefix to the autonomous domain, and the second source network is a network to which the first IP address prefix belongs that is determined based on routing information in the autonomous domain;
[0281] The second acquisition module 1302 is further configured to execute a step of obtaining a blacklist in the source address verification list if the first source network is the same as the second source network.
[0282] In a possible implementation, the second obtaining module 1302 is used to:
[0283] If the access type of the first network is a single-homing access type or a complete multi-homing access type, determining an external interface in the first edge network device connected to the first network as a first external interface;
[0284] Based on the first IP address prefix and the interface identifier of the first external interface, a white list in the source address verification list is obtained, where the white list includes the first IP address prefix.
[0285] In a possible implementation, the first acquisition module 1301 is used to:
[0286] Based on routing information in the autonomous domain, a first IP address prefix is obtained, where the routing information includes an IP address prefix owned by the first network.
[0287] In a possible implementation, the first acquisition module 1301 is used to:
[0288] receiving a notification message, the notification message being used to notify an IP address prefix for source address verification, the notification message including a first IP address prefix;
[0289] Obtain the first IP address prefix from the notification message.
[0290] In a possible implementation manner, the first network is connected to the first edge network device, and the notification message is an out-of-domain notification message from the first network.
[0291] In a possible implementation manner, the access type of the first network is determined based on an interface identifier of an external interface in the first edge network device that is connected to the first network.
[0292] In a possible implementation manner, the notification message further includes a network identifier of the first network.
[0293] In a possible implementation manner, the notification message is an intra-domain notification message sent by an edge network device in an autonomous domain, and the notification message further includes a network identifier of the first network.
[0294] In a possible implementation manner, the notification message further includes an access type identifier, and the access type of the first network is determined based on the access type identifier.
[0295] In a possible implementation, the intra-domain announcement message also includes at least one of a blacklist generation identifier, a prefix category identifier, and an extra-domain announcement identifier. The blacklist generation identifier is used to indicate whether the blacklist in the source address verification list is generated based on the first IP address prefix. The prefix category identifier is used to indicate whether the first IP address prefix is a first-class IP address prefix. The extra-domain announcement identifier is used to indicate whether the first IP address prefix is a second-class IP address prefix. The first-class IP address prefix refers to an IP address prefix obtained based on routing information within the autonomous domain, and the second-class IP address prefix refers to an IP address prefix obtained from an extra-domain announcement message.
[0296] In a possible implementation, the notification message further includes an anycast type identifier, where the anycast type identifier is used to indicate whether the first IP address prefix is an anycast address prefix, and an access type of the second network connected to the first external interface is a non-Internet access type;
[0297] The second acquisition module 1302 is also used to execute the step of acquiring a source address verification list if the anycast type identifier indicates that the first IP address prefix is not an anycast address prefix. The source address verification list includes the interface identifier of the first external interface and a blacklist, and the blacklist includes the first IP address prefix.
[0298] In a possible implementation, the notification message further includes an attribute identifier, the attribute identifier is used to indicate whether the message can enter the autonomous domain through the Internet interface, and the access type of the second network connected to the first external interface is an Internet access type;
[0299] The second acquisition module 1302 is also used to execute the step of obtaining a source address verification list if the attribute identifier indicates that the message cannot enter the autonomous domain through the Internet interface. The source address verification list includes the interface identifier of the first external interface and a blacklist, and the blacklist includes the first IP address prefix.
[0300] In a possible implementation, the notification message further includes a whitelist generation identifier, where the whitelist generation identifier is used to indicate whether to generate a whitelist in the source address verification list based on the first IP address prefix, and the second acquisition module 1302 is further used to:
[0301] If the whitelist generation identifier indicates that a whitelist in the source address verification list is generated based on the first IP address prefix, executing the step of obtaining the source address verification list, the source address verification list includes the interface identifier of the first external interface and the whitelist, and the whitelist includes the first IP address prefix;
[0302] If the whitelist generation identifier indicates that the whitelist in the source address verification list cannot be generated based on the first IP address prefix, execute the step of obtaining the source address verification list, the source address verification list includes the interface identifier of the first external interface and a blacklist, and the blacklist includes the first IP address prefix.
[0303] In a possible implementation, the apparatus 1300 further includes:
[0304] A receiving module, used for receiving a data message through the first external interface, wherein the data message includes a source address;
[0305] The verification module is used to verify the source address of the data message based on the source address and the first IP address prefix in the source address verification list.
[0306] The above-mentioned device 1300 corresponds to the first edge network device in the above-mentioned method embodiment respectively. The modules in the device 1300 and the above-mentioned other operations and / or functions are respectively for implementing various steps and methods of the source address implemented by the corresponding device in the method embodiment. The specific details can be found in the above-mentioned method embodiment. For the sake of brevity, they will not be repeated here.
[0307] When the above-mentioned device 1300 obtains the source address verification list, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device 1300 is divided into different functional modules to complete all or part of the functions described above. In addition, the device 1300 provided in the above-mentioned embodiment and the embodiment of the above-mentioned method for obtaining the source address verification list belong to the same concept. The specific implementation process is detailed in the above-mentioned method embodiment, which will not be repeated here.
[0308] Fig.14 is a structural diagram of a notification message sending device provided in an embodiment of the present application, Fig.14 The device 1400 shown is located in the first network and can be the first device or a part of the first device in the previous embodiments, and is used to execute the notification message sending method executed by the first device, such as Fig.14 As shown, the apparatus 1400 includes:
[0309] A generating module 1401 is used to generate an extraterritorial notification message, where the extraterritorial notification message is used to notify an IP address prefix used for source address verification, and the extraterritorial notification message includes a first IP address prefix owned by the first network;
[0310] The sending module 1402 is used to send an extra-domain notification message to the autonomous domain connected to the first network.
[0311] In one possible implementation, the extraterritorial notification message also includes at least one of an anycast type identifier, an attribute identifier, a whitelist generation identifier, and a network identifier of the first network. The anycast type identifier is used to indicate whether the first IP address prefix is an anycast address prefix. The attribute identifier is used to indicate whether the message can enter the autonomous domain through the Internet interface. The whitelist generation identifier is used to indicate whether a whitelist in the source address verification list is generated based on the first IP address prefix.
[0312] Fig.15 is a structural diagram of another notification message sending device provided in an embodiment of the present application, Fig.15 The device 1500 shown is applied to the first edge network device in the AS, which can be the first edge network device or a part of the first edge network device in the previous embodiments, and is used to execute the notification message sending acquisition method executed by the first edge network device, such as Fig.15 As shown, the apparatus 1500 comprises:
[0313] The acquisition module 1501 is used to acquire a first IP address prefix owned by a first network, where the first network is any network connected to the autonomous domain and located outside the autonomous domain;
[0314] A generating module 1502, configured to generate an intra-domain notification message based on the first IP address prefix and the network identifier of the first network, wherein the intra-domain notification message is used to notify the IP address prefix used for source address verification, and the intra-domain notification message includes the first IP address prefix and the network identifier;
[0315] The sending module 1503 is used to send an intra-domain notification message to the second edge network device in the autonomous domain.
[0316] In a possible implementation, the acquisition module 1501 is used to:
[0317] A first IP address prefix is obtained from an extraterritorial announcement message from a first network, wherein the extraterritorial announcement message includes the first IP address prefix.
[0318] In one possible implementation, the extraterritorial notification message also includes at least one of an anycast type identifier, an attribute identifier, a whitelist generation identifier, and a network identifier of the first network. The anycast type identifier is used to indicate whether the first IP address prefix is an anycast address prefix. The attribute identifier is used to indicate whether the message can enter the autonomous domain through the Internet interface. The whitelist generation identifier is used to indicate whether a whitelist in the source address verification list is generated based on the first IP address prefix.
[0319] In a possible implementation manner, the intra-domain notification message further includes at least one of an anycast type identifier, an attribute identifier, a whitelist generation identifier, and a network identifier of the first network.
[0320] In a possible implementation, the acquisition module 1501 is used to:
[0321] Based on routing information in the autonomous domain, a first IP address prefix is obtained, where the routing information includes an IP address prefix owned by the first network.
[0322] In a possible implementation, the intra-domain announcement message also includes at least one of an access type identifier, a blacklist generation identifier, a prefix category identifier, and an extra-domain announcement identifier, the access type identifier is used to indicate the access type of the first network, the blacklist generation identifier is used to indicate whether the blacklist in the source address verification list is generated based on the first IP address prefix, the prefix category identifier is used to indicate whether the first IP address prefix is a first-class IP address prefix, and the extra-domain announcement identifier is used to indicate whether the first IP address prefix is a second-class IP address prefix, the first-class IP address prefix refers to an IP address prefix obtained based on routing information within the autonomous domain, and the second-class IP address prefix refers to an IP address prefix obtained from an extra-domain announcement message.
[0323] The above-mentioned devices 1400 and 1500 correspond to the first device and the first edge network device in the above-mentioned method embodiment respectively. The modules in devices 1400 and 1500 and the above-mentioned other operations and / or functions are respectively for implementing the various steps in the notification message sending method implemented by the corresponding devices in the method embodiment. For specific details, please refer to the above-mentioned method embodiment. For the sake of brevity, they will not be repeated here.
[0324] When the above-mentioned device 1400 and device 1500 send notification messages, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device 1400 and device 1500 is divided into different functional modules to complete all or part of the functions described above. In addition, the device 1400 provided in the above embodiment and the notification message sending method embodiment executed by the above-mentioned first device belong to the same concept, and the notification message sending method embodiment executed by the device 1500 and the above-mentioned first edge network device belong to the same concept. The specific implementation process is detailed in the above-mentioned method embodiment, which will not be repeated here.
[0325] The first device and each edge network device in the AS are electronic devices. Next, Figure 16 to Figure 17 , respectively introduce the structures of the network device and the first device. Among them, Fig.16 is a schematic diagram of the structure of a network device provided in an embodiment of the present application, Fig.16 The network device 1600 shown may be the above Figure 1-6Any network device in the AS in the illustrated embodiment, such as a first edge network device or a second edge network device, etc. The network device 1600 may be a switch, a router or other network device that forwards data packets.
[0326] like Fig.16 As shown, the network device 1600 includes a main control board 1601 and an interface board 1602 .
[0327] The main control board 1601 is also called the main processing unit (MPU) or route processing card. The main control board 1601 controls and manages each component in the network device 1600, including routing calculation, device management, device maintenance, and protocol processing functions. Fig.16 As shown, the main control board 1601 includes a processor 1611 and a memory 1612. The processor 1611 is used to call the program code in the main control board memory to execute the source address verification list generation method and / or any notification message sending method provided in the embodiment of the method of the present application. For example, if the electronic device 1600 is an electronic device and is configured as an edge network device in an autonomous domain, the processor 1611 is used to call the program code in the memory 1622, and can execute the source address verification list acquisition method provided in the embodiment of the method of the present application and / or the notification message sending method executed by the first edge network device. If the electronic device 1600 is configured as a first device, the processor 1611 calls the program code in the memory 1612, and can execute the notification message sending method executed by the first device provided in the embodiment of the method of the present application.
[0328] The interface board 1602 is also called a line processing unit (LPU), a line card or a service board. The interface board 1602 is used to provide various service interfaces and implement data message forwarding. 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 Clients (FlexE Clients) service interface.
[0329] like Fig.16As shown, the interface board 1602 includes a processor 1621, a memory 1622 and an interface card 1623. The processor 1621 is used to control and manage the interface board 1602 and communicate with the processor 1611. Exemplarily, the processor 1621 is used to call the program code of the memory 1622 to perform the reception and transmission of data messages. The processor 1621 is used to call the program code in the memory of the main control board to execute the source address verification list generation method and / or any notification message sending method provided in the method embodiment of the present application. For example, if the electronic device 1600 is an electronic device and is configured as an edge network device in an autonomous domain, the processor 1621 is used to call the program code of the memory 1622, and can also execute the source address verification list acquisition method provided in the method embodiment of the present application and / or the notification message sending method executed by the first edge network device. If the electronic device 1600 is configured as a first device, the processor 1621 is used to call the program code of the memory 1622, and can also execute the notification message sending method executed by the first device provided in the method embodiment of the present application.
[0330] The interface card 1623 is used to implement the physical layer docking function. The original traffic enters the interface board 1602 from this, and the processed data message is sent from the interface card 1623. The interface card 1623 includes at least one physical interface, which is also called a physical port and can be used as an external interface or an internal interface in a network device. The interface card 1623 is also called a daughter card and can be installed on the interface board 1602.
[0331] The main control board 1601 is coupled to the interface board 1602. For example, the main control board 1601 and the interface board 1602 are connected to the system backplane via a system bus to achieve intercommunication. In a possible implementation, an inter-process communication (IPC) channel is established between the main control board 1601 and the interface board 1602, and the main control board 1601 and the interface board 1602 communicate through the IPC channel.
[0332] There may be one or more main control boards 1601, and when there are multiple boards, they may include a main main control board and a standby main control board. There may be one or more interface boards 1602. The stronger the data processing capability of the network device 1600, the more interface boards 1602 are provided. There may also be one or more interface cards 1623 on the interface board 1602. Under the distributed forwarding architecture, the network device 1600 may also have at least one switching network board, through which data exchange between multiple interface boards 1602 is realized, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of the network device with a distributed architecture are greater than those of the device with a centralized architecture. Optionally, the network device 1600 may also be in the form of only one board, that is, without a switching network board, and the functions of the interface board and the main control board are integrated on the board. At this time, the processor on the interface board and the processor on the main control board can be combined into a central processor on the board to perform the functions of the two superimposed. The data exchange and processing capabilities of this type of device are relatively low (for example, network devices such as low-end switches or routers). The specific architecture to be adopted depends on the specific networking deployment scenario and is not limited here.
[0333] Fig.17 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. In a possible implementation, Fig.17 The electronic device 1700 shown is configured as any edge network device in the above-mentioned AS, such as a first edge network device or a second edge network device, etc. At this time, the electronic device 1700 can be a switch, a router or other network device that forwards data packets. In a possible implementation, the electronic device 1700 is configured as a first device, and at this time, the electronic device 1700 can be a network device or a non-network device in the network connected to the AS.
[0334] like Fig.17 As shown, the electronic device 1700 includes a transceiver 1701, a processor 1702 and a memory 1703. The transceiver 1701 is used to send and receive data messages, data information or notification messages.
[0335] Processor 1702 is used to execute the relevant steps performed by the edge network device / first device in the above method embodiment. Processor 1702 may include one or more processing cores. Processor 1702 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). Processor 1702 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state.
[0336] The memory 1703 may include one or more computer-readable storage media, which may be non-transitory. The memory 1703 also includes a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1703 is used to store at least one program code, which is used to be executed by the processor 1702 to implement the source address verification list acquisition method provided in the method embodiment of the present application and / or any one of the notification message sending methods provided in the method embodiment of the present application.
[0337] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including a program code, and the program code can be executed by a processor in an electronic device to complete the source address verification list acquisition method in the above embodiment, the notification message sending method executed by the first edge network device, or the notification message sending method executed by the first device. For example, the computer-readable storage medium is a non-temporary computer-readable storage medium, such as a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device.
[0338] An embodiment of the present application also provides a computer program product or a computer program, which includes a program code. The computer instructions are stored in a computer-readable storage medium. The processor of the electronic device reads the program code from the computer-readable storage medium, and the processor executes the program code, so that the electronic device executes the above-mentioned source address verification list acquisition method or any of the above-mentioned notification message sending methods.
[0339] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer execution instructions, and when the device is running, the processor can execute the computer execution instructions stored in the memory to enable the chip to execute the source address verification list acquisition method in the above-mentioned method embodiments or any of the above-mentioned notification message sending methods.
[0340] Among them, the device, equipment, computer-readable storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0341] Through the description of the above implementation methods, those skilled in the art can understand that, for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the source address verification list generation method and / or notification message sending method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0342] In the description of this application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" means one or more, and "plurality" means two or more. The words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not limit them to be different.
[0343] In this application, the words "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the words "exemplary" or "for example" is intended to present the related concepts in a concrete way.
[0344] The information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the IP address prefixes involved in this application are all obtained with full authorization.
[0345] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.
[0346] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for obtaining a source address verification list, characterized in that: The method is performed by a first edge network device in an autonomous domain, and the method includes: Acquire a first IP address prefix owned by a first network, where the first network is any network connected to the autonomous domain and located outside the autonomous domain; Based on the first IP address prefix and the access type of the first network, a source address verification list is obtained, the source address verification list includes the first IP address prefix and an interface identifier of a first external interface, and the first external interface is determined based on the access type.
2. The method according to claim 1, characterized in that The acquiring of a source address verification list based on the first IP address prefix and the access type of the second network includes: If the access type of the first network is a cross-domain multi-homing access type or an Internet access type, determining an external interface in the first edge network device connected to the second network as the first external interface; Based on the first IP address prefix and the interface identifier of the first external interface, a blacklist in the source address verification list is obtained, where the blacklist includes the first IP address prefix.
3. The method according to claim 2, characterized in that The method further comprises: Determine a first source network and a second source network of the first IP address prefix, wherein the first source network is a network that announces the first IP address prefix to the autonomous domain, and the second source network is a network to which the first IP address prefix belongs that is determined based on routing information in the autonomous domain; If the first source network is the same as the second source network, the step of obtaining a blacklist in the source address verification list is performed.
4. The method according to claim 1, characterized in that: The acquiring of a source address verification list based on the first IP address prefix and the access type of the second network includes: If the access type of the first network is a single-homing access type or a complete multi-homing access type, determining an external interface in the first edge network device connected to the first network as the first external interface; Based on the first IP address prefix and the interface identifier of the first external interface, a whitelist in the source address verification list is obtained, where the whitelist includes the first IP address prefix.
5. The method according to any one of claims 1 to 4, characterized in that The first network is connected to the first edge network device, and obtaining the first IP address prefix owned by the first network includes: The first IP address prefix is acquired based on routing information in the autonomous domain, where the routing information includes the IP address prefix owned by the first network.
6. The method according to any one of claims 1 to 4, characterized in that The obtaining of the first IP address prefix owned by the first network includes: receiving a notification message, the notification message being used to notify an IP address prefix for source address verification, the notification message including a first IP address prefix; The first IP address prefix is obtained from the notification message.
7. The method according to claim 6, characterized in that The first network is connected to the first edge network device, and the notification message is an out-of-domain notification message from the first network.
8. The method according to claim 5 or 7, characterized in that: The access type of the first network is determined based on an interface identifier of an external interface in the first edge network device connected to the first network.
9. The method according to claim 7, characterized in that: The notification message also includes a network identifier of the first network.
10. The method according to claim 6, characterized in that The notification message is an intra-domain notification message sent by an edge network device in the autonomous domain, and the notification message also includes a network identifier of the first network.
11. The method according to claim 10, characterized in that The notification message also includes an access type identifier, and the access type of the first network is determined based on the access type identifier.
12. The method according to claim 10 or 11, characterized in that: The intra-domain announcement message also includes at least one of a blacklist generation identifier, a prefix category identifier and an extra-domain announcement identifier. The blacklist generation identifier is used to indicate whether a blacklist in a source address verification list is generated based on the first IP address prefix. The prefix category identifier is used to indicate whether the first IP address prefix is a first-class IP address prefix. The extra-domain announcement identifier is used to indicate whether the first IP address prefix is a second-class IP address prefix. The first-class IP address prefix refers to an IP address prefix obtained based on routing information within the autonomous domain, and the second-class IP address prefix refers to an IP address prefix obtained from an extra-domain announcement message.
13. The method according to any one of claims 6-7, 9-12, characterized in that: The notification message further includes an anycast type identifier, where the anycast type identifier is used to indicate whether the first IP address prefix is an anycast address prefix, and the access type of the second network connected to the first external interface is a non-Internet access type, and the method further includes: If the anycast type identifier indicates that the first IP address prefix is not an anycast address prefix, perform the step of obtaining a source address verification list, the source address verification list includes an interface identifier of the first external interface and a blacklist, and the blacklist includes the first IP address prefix.
14. The method according to any one of claims 6-7, 9-13, characterized in that: The notification message further includes an attribute identifier, where the attribute identifier is used to indicate whether the message can enter the autonomous domain through an Internet interface, the access type of the second network connected to the first external interface is an Internet access type, and the method further includes: If the attribute identifier indicates that the message cannot enter the autonomous domain through the Internet interface, execute the step of obtaining the source address verification list, the source address verification list includes the interface identifier of the first external interface and a blacklist, and the blacklist includes the first IP address prefix.
15. The method according to any one of claims 6-7, 9-14, characterized in that: The notification message further includes a whitelist generation identifier, where the whitelist generation identifier is used to indicate whether to generate a whitelist in the source address verification list based on the first IP address prefix, and the method further includes: If the whitelist generation identifier indicates that a whitelist in the source address verification list is generated based on the first IP address prefix, the step of obtaining the source address verification list is performed, the source address verification list includes the interface identifier of the first external interface and the whitelist, and the whitelist includes the first IP address prefix; If the whitelist generation identifier indicates that the whitelist in the source address verification list cannot be generated based on the first IP address prefix, execute the step of obtaining the source address verification list, the source address verification list includes the interface identifier of the first external interface and a blacklist, and the blacklist includes the first IP address prefix.
16. The method according to any one of claims 1 to 15, characterized in that The method further comprises: receiving a data message through the first external interface, wherein the data message includes a source address; The source address of the data message is verified based on the source address and the first IP address prefix in the source address verification list.
17. A device for obtaining a source address verification list, characterized in that: The device is used to execute the method according to any one of claims 1 to 16.
18. An electronic device, characterized in that: The electronic device comprises a processor, and the processor is used to execute program code so that the network device performs the method according to any one of claims 1 to 16.
19. A computer-readable storage medium, characterized in that: At least one program code is stored in the storage medium, and the at least one program code is read by the processor to enable the electronic device to execute the method according to any one of claims 1 to 16.
Citation Information
Cited By
Blacklist-based inter-domain source address verification method, device and system for autonomous system
CN120768641A
Source address verification list acquisition method and apparatus, electronic device, and storage medium
EP4686152A1
Source address verification list acquisition method and apparatus, electronic device, and storage medium
WO2024198812A1
