[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

WO2024164678A1 - Source address validation method, and communication apparatus and system - Google Patents

Source address validation method, and communication apparatus and system Download PDF

Info

Publication number
WO2024164678A1
WO2024164678A1 PCT/CN2023/136556 CN2023136556W WO2024164678A1 WO 2024164678 A1 WO2024164678 A1 WO 2024164678A1 CN 2023136556 W CN2023136556 W CN 2023136556W WO 2024164678 A1 WO2024164678 A1 WO 2024164678A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
verification
source address
node
forwarding
Prior art date
Application number
PCT/CN2023/136556
Other languages
French (fr)
Chinese (zh)
Inventor
耿男
谭镇
黄明庆
刘立全
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024164678A1 publication Critical patent/WO2024164678A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/0227Filtering policies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • H04L63/101Access control lists [ACL]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • the present application relates to the field of communication technology, and in particular to a source address verification method, a communication device and a system.
  • Source address validation is an important means to eliminate source address forgery attacks. Many existing network defense solutions are based on source address validation. The basic principle of SAV technology is to establish a mapping relationship between the source address of the message and the message input interface, and then verify whether the input interface corresponding to the source address of the message is correct according to the mapping relationship during the subsequent message forwarding process.
  • the source address verification table used by SAV technology requires a lot of table space on the data plane. If the source address verification table and the forwarding table are stored on the same forwarding chip, the source address verification table will occupy the table space of the forwarding table. If the source address verification table is used on an independent forwarding chip, the cost of the device will be higher. In short, configuring a source address verification table on a device will have a significant impact on the device's capabilities and costs.
  • the present application provides a source address verification method, a communication device and a system, which are used to solve the problem that the source address verification table has a large demand for table space on the data plane, which affects the capacity and cost of the device.
  • a source address verification method which can be executed by a first node, or by a component of the first node, such as a processor, chip, or chip system of the first node, or by a logic module or software that can realize all or part of the functions of the first node.
  • the method may include: the first node obtains a source address verification table and a forwarding table, the source address verification table includes a mapping relationship between a source address of at least one message and a message input interface, and the forwarding table includes a mapping relationship between a destination address of at least one message and a message forwarding interface.
  • the first node generates an independent verification table according to the source address verification table and the forwarding table, and the independent verification table includes other mapping relationships in the source address verification table except for the first type of mapping relationship, wherein the first type of mapping relationship includes the same mapping relationship in the forwarding table and the source address verification table.
  • the first node determines that the first message is a legitimate message when the received first message passes the verification of the independent verification table and/or the verification of the forwarding table.
  • the first node can reuse the forwarding table to perform source address verification, so that the first-class mapping relationships that are the same in the source address verification table and the forwarding table do not need to be stored separately.
  • the first node can also use an independent verification table to verify the source address, and the rules in the independent verification table can serve as a supplement to the rules of the forwarding table.
  • this method set can achieve the same or similar verification effect as using the source address verification table for source address verification, and can reduce the number of rules that need to be stored separately for source address verification.
  • the number of first-class mapping relationships in the source address verification table accounts for the majority, and other mapping relationships in the source address verification table except the first-class mapping relationships only account for a minority.
  • the independent verification table has a smaller demand for table space on the data plane, and will not have much impact on the capabilities and costs of the device.
  • the first node determines that the first message is a legal message when the received first message passes the verification of the independent verification table and/or the verification of the forwarding table, including: the first node verifies the first message according to the independent verification table. The first node determines that the first message is a legal message when the first message passes the verification of the independent verification table. Alternatively, the first node verifies the first message according to the forwarding table when the source address of the first message does not exist in the address of the independent verification table. And, the first node determines that the first message is a legal message when the first message passes the verification of the forwarding table.
  • the first node determines that the first message is a legal message when the received first message passes the verification of the independent verification table and/or the verification of the forwarding table. Specifically, it may include: the first node verifies the first message according to the forwarding table. The first node determines that the first message is a legal message when the first message passes the verification of the forwarding table. Alternatively, the first node verifies the first message according to the independent verification table when the first message fails to pass the verification of the forwarding table. And, the first node determines that the first message is a legal message when the first message passes the verification of the independent verification table.
  • the source address of the first message is the first address
  • the input interface of the first message is the first interface.
  • the method may also include: when the first address does not exist in the addresses of the independent verification table or the independent verification table has a mapping relationship between the first address and the first interface, the first node determines that the first message has passed the verification of the independent verification table. When the first node has the first address in the addresses of the independent verification table, but the interface mapped to the first address is not the first interface, the first node determines that the first message has not passed the independent verification table. Verification of the established verification table.
  • the source address of the first message is the first address
  • the input interface of the first message is the first interface.
  • the method may also include: the first node determines that the first message passes the verification of the forwarding table when the first address does not exist in the address of the forwarding table or the forwarding table has a mapping relationship between the first address and the first interface. The first node determines that the first message fails to pass the verification of the forwarding table when the first address exists in the address of the forwarding table but the interface mapped to the first address is not the first interface.
  • a communication device which has the function of implementing the method described in the first aspect.
  • the function can be implemented by hardware, or by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • a communication device comprising: a processor and a memory; the memory is used to store computer execution instructions, and when the communication device is running, the processor executes the computer execution instructions stored in the memory to enable the communication device to perform a source address verification method as described in any one of the above-mentioned first aspects.
  • a communication device comprising: a processor; the processor is used to couple with a memory, and after reading instructions in the memory, execute a source address verification method as described in any one of the first aspects above according to the instructions.
  • a computer-readable storage medium wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer can execute the source address verification method described in any one of the first aspects above.
  • a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the source address verification method described in any one of the first aspects.
  • the technical effects brought about by any design method in the second to sixth aspects can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here.
  • FIG1 is a schematic diagram of the structure of a communication network provided in an embodiment of the present application.
  • FIG2 is a schematic diagram of a process of performing source address verification and message forwarding based on a forwarding table provided in an embodiment of the present application
  • FIG3 is a schematic diagram of the structure of another communication network provided in an embodiment of the present application.
  • FIG4 is a schematic diagram of a message processing flow provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of a table space of a data plane provided in an embodiment of the present application.
  • FIG6 is a schematic diagram of a flow chart of a source address verification method provided in an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a set relationship between a source address verification table and a forwarding table provided in an embodiment of the present application
  • FIG8 is a schematic diagram of a flow chart of a source address verification method provided in an embodiment of the present application.
  • FIG9 is a schematic diagram of a flow chart of a source address verification method provided in an embodiment of the present application.
  • FIG10 is a schematic diagram of comparing a data plane table space storage source address verification table and an independent verification table provided in an embodiment of the present application;
  • FIG11 is a schematic diagram of the structure of a communication device provided in an embodiment of the present application.
  • FIG12 is a schematic diagram of the structure of another communication device provided in an embodiment of the present application.
  • FIG13 is a schematic diagram of the structure of another communication device provided in an embodiment of the present application.
  • the routing table is also called the routing information base (RIB), and the forwarding table is also called the forwarding information base (FIB).
  • the routing table can be constructed by the node based on the information obtained from various routing processes.
  • the forwarding table can include the best route in the routing table.
  • the routing table is located at the control layer, and the forwarding table is located at the data layer.
  • the message forwarding node actually queries the forwarding table to forward the message.
  • the forwarding table can include the destination address, the forwarding interface information corresponding to the destination address, and the next hop information.
  • Unicast reverse path forwarding technology mainly filters messages by checking the legitimacy of the source address of the message (also called data packet). uRPF can check the legitimacy of the source address of the message by querying the forwarding table.
  • uRPF modes can include strict and loose, which are introduced below.
  • Strict uRPF Not only does it require that there is a route to the source address of the message in the forwarding table, but it also requires that the incoming interface of the message is consistent with the outgoing interface of the route to the source address in the forwarding table. Only messages that meet both of the above conditions are considered legal messages.
  • Loose uRPF It only requires that there is a route to the source address of the message in the forwarding table. It does not check the incoming interface of the message and the outgoing interface in the forwarding table. Check whether the outbound interfaces of the routes to the source address of the packets are consistent.
  • Figure 1 shows a schematic diagram of the structure of a communication network.
  • host H1 can be connected to host H3 through node R1 and node R2, and host H2 can be connected to host H3 through node R3 and node R2.
  • the interface connecting node R2 to node R1 is a
  • the interface connecting node R2 to node R3 is b.
  • the forwarding table of node R2 may be as shown in Table 1.
  • node R2 can receive message x from interface a. If node R2 implements strict uRPF, then after receiving message x, node R2 can first query whether there is a route to the source address P1 of message x in the forwarding table. In the forwarding table shown in Table 1, node R2 can query the route to P1. Further, node R2 can query the route outbound interface to P1. As shown in the forwarding table in Table 1, the forwarding outbound interface corresponding to the route to P1 is a, and the incoming interface of message x is also a.
  • node R2 can determine that message x is a legitimate message and has passed the uRPF filter. If node R2 executes loose uRPF, then after node R2 finds the route to P1 in the forwarding table, it can determine that message x is legal and has passed the uRPF filter.
  • node R2 can receive the message y from interface b. If node R2 implements strict uRPF, then after receiving message y, node R2 can first query whether there is a route to the source address P1 of message y in the forwarding table. In the forwarding table shown in Table 1, node R2 can query the route to P1. Further, node R2 can query the route outbound interface to P1. As shown in the forwarding table in Table 1, the forwarding outbound interface corresponding to the route to P1 is a, and the incoming interface of message y is b.
  • node R2 can determine that message y is not a legitimate message and message y cannot pass the uRPF filter. If node R2 implements loose uRPF, then after node R2 finds the route to P1 in the forwarding table, it can determine that message y is legal, and message y will pass the uRPF filter.
  • the above uRPF technology can be used to check the legitimacy of the source address of the message to achieve message filtering.
  • both the filtering and forwarding of the message can be implemented based on the forwarding table.
  • the process of the node performing source address verification and message forwarding based on the forwarding table can be shown in Figure 2.
  • the node After receiving the message, the node can first enter the source address verification process, and the means for performing source address verification can be the above uRPF technology.
  • the node can match based on the forwarding table to determine whether the message is legal/verified. If the source address verification of the message fails, the node can discard the message. If the source address verification of the message passes, the message forwarding process can be entered. In the message forwarding process, the node can further match based on the forwarding table to query the forwarding interface and next hop of the message. Then, the message is forwarded.
  • Fig. 3 shows a schematic diagram of another communication network, which may include a host H4, a host H5, a node A, a node B, a node C, and a node D.
  • node A is connected to node B through interface a1, connected to node D through interface a2, and connected to host H4 through interface a3;
  • node B is connected to node A through interface b2, and connected to node C through interface b1;
  • node C is connected to node B through interface c1, connected to node D through interface c2, and connected to host H5 through interface c3;
  • node D is connected to node C through interface d1, and connected to node A through interface d2.
  • the forwarding path of the message sent from host H4 to host H5 can be: host H4 ⁇ node A ⁇ node B ⁇ node C ⁇ host H5
  • the forwarding path of the message sent by host H5 to host H4 can be: host H5 ⁇ node C ⁇ node D ⁇ node A ⁇ host H4
  • the route from host H4 to host H5 and the route from host H5 to host H4 can be asymmetric.
  • node A can receive the message from host H4 from interface a3 and forward it from interface a1.
  • Node C can receive the message from host H4 from interface c1 and forward it from interface c3.
  • Node C can receive the message from host H5 from interface c3 and forward it from interface c2.
  • Node A can receive the message from host H5 from interface a2 and forward it from interface a3.
  • the forwarding table of node A may be as shown in Table 2
  • the forwarding table of node C may be as shown in Table 3.
  • node D can also be connected to host H6 through interface d3. Assume that host H6 sends message n with a forged source address P4 to host H5, and message n can be forwarded to node C through node D. Then, node C will receive message n from interface c2. If node C implements strict uRPF, then after receiving message n, node C will query the routing outbound interface to the source address of message n (i.e. P4). The routing outbound interface to the source address of message n queried by node C is c2, which is consistent with the inbound interface c2 of receiving message n. Node C will consider the message n to be legal, thereby allowing the message n to pass verification. But in fact, the message n is an illegal message. In this case, a false negative problem arises.
  • the node can obtain the source address verification table with the help of routing information and other information, and then verify the source address of the message based on the source address verification table.
  • the source address verification table includes the mapping relationship between the source address of the message and the legal input interface, and the mapping relationship between the source address and the legal input interface is generated based on the actual forwarding path information of the message. The result of the source address verification of the message based on the source address verification table is completely correct.
  • node R2 can establish a mapping relationship between source address P1 and legal input interface a. Since the message sent by host H2 to host H3 will enter node R2 through interface b, node R2 can establish a mapping relationship between source address P2 and legal input interface a. Since the message sent by host H3 to host H1 or host H2 will enter node R2 through interface c, node R2 can establish a mapping relationship between source address P3 and legal input interface c.
  • the source address verification table on node R2 can be as shown in Table 4, which can include a mapping relationship between source address P1 and legal input interface a, a mapping relationship between source address P2 and legal input interface b, and a mapping relationship between source address P3 and legal input interface c.
  • the address of host H4 is P4 and the address of host H5 is P5. Since node A can receive a message from host H4 from interface a3 and a message from host H5 from interface a2, the source address verification table of node A can be shown in Table 5. Node C can receive a message from host H4 from interface c1 and a message from host H5 from interface c3, so the source address verification table of node C can be shown in Table 6.
  • source address verification based on the source address verification table will not have false positive and false negative problems, because the source address verification table stores the mapping relationship between the source address and the legal input interface, and the mapping relationship is generated based on the actual message reception situation. For example, if node C performs source address verification on the received message according to the source address verification table shown in Table 6, the message with source address P4 received by node C from interface c1 can pass the source address verification, and there will be no false positive problem; the message with source address P4 received by node C from interface c2 cannot pass the source address verification, and there will be no false negative problem.
  • the processing flow of the message entering the node can be shown in Figure 4.
  • the node can first enter the source address verification process, and the means of performing source address verification can be the above-mentioned SAV technology.
  • the node can match based on the source address verification table to determine whether the message is legal/verified. If the message fails the source address verification, the node can discard the message. If the message passes the source address verification, it can enter the message forwarding process. In the message forwarding process, the node can further match based on the forwarding table to query the forwarding interface and next hop of the message. Then, the message is forwarded.
  • a node when a node performs source address verification according to a source address verification table, if the source address of the message to be verified is not in the source address verification table, the node may consider the message to be unknown. For messages whose source address verification result is unknown, the node may forward the message by default. From another perspective, if the source address of the message to be verified is not in the source address verification table, the node may assume that it has passed the source address verification and then forward it.
  • the node when a node uses a source address verification table to verify the source address of a message, the node needs to configure a source address verification table and a forwarding table at the same time, which are used for source address verification and message forwarding, respectively.
  • the source address verification table and the forwarding table share the table space of the data plane.
  • the table space of the data plane can be used to store the source address verification table and the forwarding table. It should be understood that the table space of the data plane is very precious and limited. If the source address verification table occupies a larger space, the space left for the forwarding table is smaller. Therefore, the method of using the source address verification table to verify the legitimacy of the source address of the message will have a great impact on the forwarding function of the node.
  • the source address verification table entries can be configured in the access control list (ACL). By reusing the ACL, the address space occupied by the source address verification table can be saved.
  • ACL access control list
  • the interface-based ACL can be used to filter packets according to the inbound interface of the packets. Therefore, the source address verification table items can be configured in the interface-based ACL.
  • the interface-based ACL table items can only be configured with a maximum of 1000 (numbered 1000 to 1999), while the number of source address verification table items is usually tens of thousands, hundreds of thousands, or millions. This implementation method is only suitable for special scenarios with few source address verification table items.
  • an independent chip may be used to store the source address verification table, but this requires that the table space of the independent chip be large enough, which makes the cost of the chip higher.
  • At least one of the following or its similar expressions refers to any combination of these items, including any combination of single items or plural items.
  • at least one of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple.
  • the words "first”, “second” and the like are used to distinguish the same items or similar items with substantially the same functions and effects.
  • the node in the embodiment of the present application may refer to a network device with a message forwarding function, which is uniformly described here and will not be repeated below.
  • the present application provides a source address verification method, which may include the following steps:
  • Step 601 The first node obtains a source address verification table and a forwarding table, wherein the source address verification table includes a mapping relationship between a source address of at least one message and a message input interface, and the forwarding table includes a mapping relationship between a destination address of at least one message and a message forwarding output interface.
  • the source address verification table includes a mapping relationship between a source address of at least one message and a message input interface
  • the forwarding table includes a mapping relationship between a destination address of at least one message and a message forwarding output interface.
  • the source address verification table includes a mapping relationship between the source address of the message and its correct input interface (also called a legal input interface), and the source address verification table can indicate the correct input interface of the first node to receive the message.
  • the first node may be node R2
  • the source address verification table of the first node may be as shown in Table 4 above.
  • the first node may be node A
  • the source address verification table of the first node may be as shown in Table 5 above; or, the first node may be node C, and the source address verification table of the first node may be as shown in Table 6 above.
  • the source address verification table may be locally or remotely configured in the first node, or may be automatically generated by the first node according to a protocol, or may be obtained by the first node through other means, which is not limited in this application.
  • the forwarding table may include a mapping relationship between the destination address of at least one message and the forwarding outbound interface of the message, and the forwarding table can indicate the correct outbound interface of the first node to forward the message.
  • the first node may be node R2
  • the forwarding table of the first node may be as shown in Table 1 above.
  • the first node may be node A, and the forwarding table of the first node may be as shown in Table 2 above; or, the first node may be node C, and the forwarding table of the first node may be as shown in Table 3 above.
  • the first node may obtain routing information according to a routing protocol or static configuration, and then generate a forwarding table according to the routing information.
  • the first node may determine the best routing information among all routing information as an entry in the forwarding table.
  • the present application provides a source address verification table and a forwarding table in a source address verification method. You may also refer to the previous description of the source address verification table and the forwarding table, which are described uniformly here.
  • Step 602 The first node generates an independent verification table based on the source address verification table and the forwarding table.
  • the independent verification table includes other mapping relationships in the source address verification table except the first type of mapping relationship.
  • the first type of mapping relationship includes the same mapping relationship in the forwarding table and the source address verification table. relation.
  • the mapping relationship corresponding to the first address in the source address verification table and the forwarding table obtained by the first node may be the same. Otherwise, they may be different.
  • the first node may be node R2, and the first address may be address P1 of host H1.
  • the transmission path of the message sent by node R2 to host H1 and the transmission path of the message received by node R2 from host H1 are symmetrical, and the interface mapped to address P1 in the forwarding table of node R2 shown in Table 1 and the source address verification table of node R2 shown in Table 4 are both interface a, that is, the mapping relationship corresponding to address P1 is the same.
  • the first node may be node R2, and the first address may be address P2 of host H2.
  • the transmission path of the message sent by node R2 to host H2 and the transmission path of the message received by node R2 from host H2 are also symmetrical, and the interface mapped to address P2 in the forwarding table of node R2 shown in Table 1 and the source address verification table of node R2 shown in Table 4 are both interface b, that is, the mapping relationship corresponding to address P2 is the same.
  • the first node may be node R2, and the first address may be address P3 of host H3.
  • the transmission path of the message sent by node R2 to the host H3 and the transmission path of the message received by node R2 from the host H3 are symmetrical.
  • the interface mapped to address P3 in the forwarding table of node R2 shown in Table 1 and the source address verification table of node R2 shown in Table 4 are both interface c, that is, the mapping relationship corresponding to address P3 is the same.
  • the transmission path of the message received by node A from host H4 and the transmission path of the message sent by node A to host H4 are symmetrical, and the interface mapped to address P4 in the forwarding table of node A shown in Table 2 and the source address verification table of node A shown in Table 5 are both interface a3, that is, the mapping relationship corresponding to address P4 is the same.
  • the transmission path of the message received by node C from host H5 and the transmission path of the message sent by node C to host H5 are symmetrical, and the interface mapped to address P5 in the forwarding table of node C shown in Table 3 and the source address verification table of node C shown in Table 6 are both interface c3, that is, the mapping relationship corresponding to address P5 is the same.
  • the transmission path of the message received by node A from host H5 and the transmission path of the message sent by node A to host H5 are asymmetric, and the interface corresponding to address P5 in the forwarding table of node A shown in Table 2 and the source address verification table of node A shown in Table 5 is different, that is, the mapping relationship corresponding to address P5 is different.
  • the transmission path for node C to receive messages from host H4 and the transmission path for node C to send messages to host H4 are asymmetric.
  • the interfaces corresponding to address P4 in the forwarding table of node C shown in Table 3 and the source address verification table of node C shown in Table 5 are different, that is, the mapping relationship corresponding to address P4 is different.
  • At least part of the message forwarding paths in the network may be symmetric, so that at least part of the mapping relationships in the forwarding table and the source address verification table acquired by the first node may be the same.
  • the first type of mapping relationship in the forwarding table and the source address verification table is the same, the first type of mapping relationship in the forwarding table can be reused in the embodiment of the present application to verify the source address of the message, and a correct verification result can be obtained. Since the first node can reuse the first type of mapping relationship in the forwarding table, the first node does not need to separately store the first type of mapping relationship for source address verification, thereby saving table space on the data plane.
  • mapping relationships except the first type of mapping relationships in the source address verification table are second type of mapping relationships
  • other mapping relationships except the first type of mapping relationships in the forwarding table are third type of mapping relationships.
  • both the source address verification table and the forwarding table can be regarded as sets, and FIG7 shows a schematic diagram of a set relationship between a source address verification table and a forwarding table.
  • the source address verification table and the forwarding table intersect, and three types of mapping relationships are divided. Among them, the intersection of the source address verification table and the forwarding table is a first type of mapping relationship, the difference between the source address verification table and the forwarding table is a second type of mapping relationship, and the difference between the forwarding table and the source address verification table is a third type of mapping relationship.
  • mapping relationship between address P4 and interface a3 in Table 2 and Table 5 belongs to the first type of mapping relationship
  • the mapping relationship between address P5 and interface a2 in Table 5 belongs to the second type of mapping relationship
  • the mapping relationship between address P5 and interface a1 in Table 2 belongs to the third type of mapping relationship
  • the mapping relationship between address P5 and interface c3 in Table 3 and Table 6 belongs to the first type of mapping relationship
  • the mapping relationship between address P4 and interface c1 in Table 6 belongs to the second type of mapping relationship
  • mapping relationship between address P4 and interface c2 in Table 3 belongs to the third type of mapping relationship.
  • mapping relationships included in the source address verification table and the forwarding table are first-class mapping relationships, and a few are second-class mapping relationships and/or third-class mapping relationships. Therefore, the table space occupied by the first-class mapping relationship is much larger than the table space occupied by the second-class mapping relationship or the third-class mapping relationship. Therefore, the size of the independent verification table including the second-class mapping relationship is much smaller than that of the source address verification table including the first-class mapping relationship and the second-class mapping relationship.
  • mapping relationship since the third type of mapping relationship does not belong to the source address verification table, the third type of mapping relationship is redundant and invalid for source address verification.
  • the addresses in the second type of mapping relationship all exist in the addresses in the third type of mapping relationship.
  • the addresses in the third type of mapping relationship include the addresses in the second type of mapping relationship.
  • Step 603 When the received first message passes the verification of the independent verification table and/or the verification of the forwarding table, the first node determines that the first message is a legal message.
  • step 603 may specifically include the following steps:
  • Step 6031a The first node verifies the first message according to the independent verification table.
  • Step 6032a When the first message passes the verification of the independent verification table, the first node determines that the first message is a legal message.
  • the first node may determine that the first message is an illegal message if the first message fails to pass the verification of the independent verification table.
  • the source address of the first message is the first address and the input interface of the first message is the first interface.
  • the first node may determine that the first message passes the verification of the independent verification table when the first address does not exist in the address of the independent verification table or the independent verification table has a mapping relationship between the first address and the first interface. Also, the first node may determine that the first message does not pass the verification of the independent verification table when the first address exists in the address of the independent verification table but the interface mapped to the first address is not the first interface.
  • Step 6033a When the source address of the first message does not exist in the addresses in the independent verification table, the first node verifies the first message according to the forwarding table.
  • Step 6034a When the first message passes the verification of the forwarding table, the first node determines that the first message is a legal message.
  • step 6033a is a prerequisite for executing step 6034a. Therefore, the essence of step 6034a is: the first node can determine that the first message is a legitimate message when the source address of the first message does not exist in the address of the independent verification table, but the first message passes the verification of the forwarding table.
  • the first node may determine that the first message is an illegal message when the source address of the first message does not exist in the addresses in the independent verification table and the first message does not pass the verification of the forwarding table.
  • the source address of the first message is the first address and the input interface of the first message is the first interface.
  • the first node may determine that the first message passes the verification of the forwarding table when the first address does not exist in the address of the forwarding table or the forwarding table has a mapping relationship between the first address and the first interface. Also, the first node may determine that the first message fails to pass the verification of the forwarding table when the first address exists in the address of the forwarding table but the interface mapped to the first address is not the first interface.
  • the first node when the first message is determined to be a legitimate message, the first node may further forward the first message according to the forwarding table.
  • the first node may discard the first message and no longer forward it.
  • step 603 may specifically include the following steps:
  • Step 6031b The first node verifies the first message according to the forwarding table.
  • Step 6032b When the first message passes the verification of the forwarding table, the first node determines that the first message is a legal message.
  • condition for the first message to pass the verification of the forwarding table can refer to the description in step 6034a, which will not be repeated here.
  • Step 6033b When the first message fails to pass the verification of the forwarding table, the first node verifies the first message according to the independent verification table.
  • Step 6034b When the first message passes the verification of the independent verification table, the first node determines that the first message is a legal message.
  • step 6033b is a prerequisite for executing step 6034b. Therefore, the essence of step 6034b is: the first node can determine that the first message is a legitimate message when the first message fails to pass the verification of the forwarding table but passes the verification of the independent verification table.
  • the first node may determine that the first message is an illegal message when the first message fails to pass the verification of the forwarding table and the first message also fails to pass the verification of the independent verification table.
  • the conditions for the first message to pass the verification of the independent verification table can refer to the description in step 6032a, which will not be repeated here.
  • the first node may first verify the first message according to the independent verification table. If the source address of the first message is not included in the address of the independent verification table, the first node may perform a second verification according to the forwarding table. Based on the scheme of steps 6031b to 6034b above, the first node may first verify the first message according to the forwarding table. If the first message fails the verification of the forwarding table, the first node may perform a second verification according to the independent verification table. It can be seen that the rules of the independent verification table and the forwarding table can complement each other and jointly realize the verification of the source address of the first message.
  • the set of mapping relationships included in the independent verification table and the mapping relationships included in the forwarding table includes all mapping relationships in the source address verification table.
  • the above-mentioned scheme of steps 6031a to 6034a or the scheme of steps 6031b to 6034b can be equivalent to using the source address verification table to verify the message, thereby achieving the same or similar effect of using the source address verification table to perform source address verification. This method can eliminate the false positive problem caused by uRPF technology.
  • the address prefixes in the third type of mapping relationship may all be included in the second type of mapping relationship, and the above steps 6031a to step 6031b may be repeated.
  • the 6034a scheme can also reduce or even avoid the problem of false negatives.
  • the table space of the data plane of the first node stores the independent verification table and the forwarding table.
  • the independent verification table includes other mapping relationships in the source address verification table except the first type of mapping relationship, and the other mapping relationships in the source address verification table except the first type of mapping relationship account for a very small number, so the table space required for the independent verification table is very small.
  • Figure 10 shows a comparison diagram of a data plane table space storing a source address verification table and an independent verification table.
  • the table space occupied by the independent verification table is much smaller than the table space occupied by the source address verification table, so the forwarding table that can be stored in the data plane table space is larger.
  • the source address verification method provided in the embodiment of the present application can achieve the same or similar effect as using a source address verification table to perform source address verification, and can also greatly reduce the table space required for the rules/table items used for source address verification, thereby improving the performance of the node and reducing the cost of the node.
  • the first node reuses the forwarding table for source address verification, when the routing information is updated and the forwarding table is updated, it means that the first type of mapping relationship used for source address verification is also updated synchronously, and the node information update rate is also increased, thereby improving the convergence performance.
  • the technology used by the first node may be uRPF technology, which is uniformly described here.
  • the independent verification table can be configured in the ACL. It should be understood that since there are fewer rules in the independent verification table, the space of the ACL is sufficient. Reusing the ACL space can save the table space of the data plane of the first node.
  • the independent verification table can also be configured in the same table space as the forwarding table, for example, configured in the forwarding chip. Since the table space required by the independent verification table in the embodiment of the present application is extremely small, it will not have much impact on the forwarding table.
  • the independent verification table can also be configured in a separate table space, such as in an independent chip of the first node. Since the table space required for the independent verification table in the embodiment of the present application is extremely small, the cost of adding an independent chip in the first node is not high.
  • the ratio of the first type of mapping relationship, the second type of mapping relationship, and the third type of mapping relationship is 8:1:1. Then, when the first node adopts the source address verification method provided by the present application, the overhead of the table space of the data plane of the first node will be reduced by 88.9%.
  • the first node adopts the solution of steps 6031a to 6034a above, 90% of the traffic will be verified twice. Assume that the forwarding performance of a single traffic will be reduced by 6% when it is verified twice compared to one time. Then, the overall forwarding performance of the solution will be reduced by 5.4%. However, the 88.9% table space overhead in exchange for the 5.4% performance loss of the first node is beneficial. In addition, the solution can also eliminate false positives and false negatives.
  • the first node adopts the solution of steps 6031b to 6034b above, 11.1% of the traffic will be verified twice. Assume that the forwarding performance of a single traffic will be reduced by 6% when it is verified twice compared to one verification. Then, the overall forwarding performance of the solution will be reduced by 0.6%. It is very beneficial for the first node to use 0.6% performance loss in exchange for 88.9% table space overhead. This solution will eliminate the false positive problem, but there will be false negative problems (accounting for 10% of the total traffic). This solution is suitable for scenarios where false positive problems are the focus.
  • the solution of the present application can exchange a small amount of performance loss for a larger table space overhead, which can effectively reduce the table space occupied by the data plane by source address verification.
  • the first node processing behavior is implemented on the control plane, and the independent verification table and forwarding table obtained by the first node are configured in the table space of the data plane.
  • the first node performs source address verification and forwarding after receiving the message, which is also performed on the data plane.
  • the above-mentioned source address verification method in the embodiment of the present application can be performed by a communication device, which can be the first node in the above-mentioned method embodiment, or a device including the above-mentioned first node, or a component that can be used for the first node.
  • the communication device includes a hardware structure and/or software module corresponding to each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software.
  • the embodiment of the present application may divide the functional modules of the communication device according to the above method embodiment.
  • each functional module may be divided according to each function, or two or more functions may be integrated into one processing module.
  • the above integrated modules may be implemented in the form of hardware or software functional modules. It should be noted that the modules in the embodiment of the present application are not necessarily divided into functional modules. The division is schematic and is only a logical function division. There may be other division methods in actual implementation.
  • the communication device 110 includes a source address verification table acquisition module 1101 , a forwarding table acquisition module 1102 , an independent verification table generation module 1103 and a message verification module 1104 .
  • the source address verification table acquisition module 1101 can be used to obtain the source address verification table, the source address verification table includes the mapping relationship between the source address of at least one message and the message input interface.
  • the forwarding table acquisition module 1102 can be used to obtain the forwarding table, the forwarding table includes the mapping relationship between the destination address of at least one message and the message forwarding interface.
  • the independent verification table generation module 1103 can be used to generate an independent verification table based on the source address verification table and the forwarding table, the independent verification table includes other mapping relationships in the source address verification table except the first type of mapping relationship, wherein the first type of mapping relationship includes the same mapping relationship in the forwarding table and the source address verification table.
  • the message verification module 1104 can be used to determine that the first message is a legal message when the received first message passes the verification of the independent verification table and/or the verification of the forwarding table.
  • the forwarding table acquisition module 1102 may be configured to obtain routing information according to a routing protocol or static configuration, and then generate a forwarding table according to the routing information.
  • the message verification module 1104 can be specifically used to: verify the first message according to the independent verification table. If the first message passes the verification of the independent verification table, the first message is determined to be a legal message. Alternatively, if the source address of the first message does not exist in the address of the independent verification table, the first message is verified according to the forwarding table. And, if the first message passes the verification of the forwarding table, the first message is determined to be a legal message.
  • the message verification module 1104 can be specifically used to: verify the first message according to the forwarding table. If the first message passes the verification of the forwarding table, determine that the first message is a legal message. Alternatively, if the first message fails to pass the verification of the forwarding table, verify the first message according to the independent verification table. And, if the first message passes the verification of the independent verification table, determine that the first message is a legal message.
  • the source address of the first message is the first address
  • the input interface of the first message is the first interface.
  • the message verification module 1104 can also be used to: determine that the first message passes the verification of the independent verification table when the first address does not exist in the address of the independent verification table or the independent verification table has a mapping relationship between the first address and the first interface. When the first address exists in the address of the independent verification table, but the interface mapped to the first address is not the first interface, determine that the first message does not pass the verification of the independent verification table.
  • the source address of the first message is the first address
  • the input interface of the first message is the first interface.
  • the message verification module 1104 can also be used to: determine that the first message passes the verification of the forwarding table when the first address does not exist in the address of the forwarding table or the forwarding table has a mapping relationship between the first address and the first interface. Determine that the first message does not pass the verification of the forwarding table when the first address exists in the address of the forwarding table, but the interface mapped to the first address is not the first interface.
  • the functional modules of the communication device can be divided according to actual conditions.
  • the functions of the source address verification table acquisition module 1101 and the forwarding table acquisition module 1102 can be implemented by a transceiver module, and the functions of the independent verification table generation module 1103 and the message verification module 1104 can be implemented by a processing module. Therefore, the structure of the communication device can be shown in Figure 12, and the communication device 120 can include a transceiver module 1201 and a processing module 1202.
  • the communication device 110 or the communication device 120 is presented in the form of dividing each functional module in an integrated manner.
  • the "module” here may refer to a specific ASIC, a circuit, a processor and a memory that executes one or more software or firmware programs, an integrated logic circuit, and/or other devices that can provide the above functions.
  • the communication device 110 or the communication device 120 can take the form of the communication device 130 shown in Figure 13.
  • FIG13 is a schematic diagram of the structure of a communication device provided in an embodiment of the present application.
  • the communication device 130 includes one or more processors 1301, a communication line 1302, and at least one communication interface (FIG13 is only exemplary and takes a communication interface 1303 and a processor 1301 as an example for explanation).
  • a memory 1304 may also be included.
  • Processor 1301 can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.
  • CPU central processing unit
  • ASIC application-specific integrated circuit
  • the communication line 1302 may include a pathway for communication between different components.
  • the communication interface 1303 may be a transceiver module for communicating with other devices or communication networks, such as Ethernet, RAN, wireless local area networks (WLAN), etc.
  • the transceiver module may be a device such as a transceiver or a transceiver.
  • the communication interface 1303 may also be a transceiver circuit located in the processor 1301 to implement signal input and signal output of the processor.
  • the memory 1304 may be a device with a storage function. For example, it may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
  • the memory may exist independently and be connected to the processor through the communication line 1302. The memory may also be integrated with the processor.
  • the memory 1304 is used to store computer-executable instructions for executing the solution of the present application, and the execution is controlled by the processor 1301.
  • the processor 1301 is used to execute the computer-executable instructions stored in the memory 1304, thereby implementing the air interface concurrency method provided in the embodiment of the present application.
  • the processor 1301 may also perform processing-related functions in the air interface concurrency method provided in the following embodiments of the present application, and the communication interface 1303 is responsible for communicating with other devices or communication networks, which is not specifically limited in the embodiments of the present application.
  • the computer-executable instructions in the embodiments of the present application may also be referred to as application code, which is not specifically limited in the embodiments of the present application.
  • the processor 1301 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 13 .
  • the communication device 130 may include multiple processors, such as the processor 1301 and the processor 1307 in FIG. 13 .
  • processors may be a single-core processor or a multi-core processor.
  • the processors here may include but are not limited to at least one of the following: a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a microcontroller (MCU), or an artificial intelligence processor and other types of computing devices running software, each of which may include one or more cores for executing software instructions to perform calculations or processing.
  • the communication device 130 may also include an output device 1305 and an input device 1306.
  • the output device 1305 communicates with the processor 1301 and may display information in a variety of ways.
  • the output device 1305 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector.
  • the input device 1306 communicates with the processor 1301 and may receive user input in a variety of ways.
  • the input device 1306 may be a mouse, a keyboard, a touch screen device, or a sensor device.
  • the above-mentioned communication device 130 may sometimes also be referred to as a communication device, which may be a general device or a dedicated device.
  • the communication device 130 may be a network device such as a router, a switch, a gateway, or a terminal device, or a controller in a network, or a device having a similar structure as shown in FIG. 13.
  • the embodiment of the present application does not limit the type of the communication device 130.
  • the processor 1301 in the communication device 130 shown in FIG. 13 can call the computer-executable instructions stored in the memory 1304 to enable the communication device 130 to execute the source address verification method in the above method embodiment.
  • the communication device 130 provided in this embodiment can execute the above-mentioned source address verification method, the technical effects that can be obtained can refer to the above-mentioned method embodiment and will not be repeated here.
  • the size of the serial numbers of the above-mentioned processes does not mean the order of execution.
  • the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
  • Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physically separate.
  • the unit may not be a physical unit, that is, it may be located in one place, or it may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center.
  • wired e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)
  • wireless e.g., infrared, wireless, microwave, etc.
  • the computer-readable storage medium may be any available medium that a computer can access or may contain one or more servers, data centers and other data storage devices that can be integrated with the medium.
  • the available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.
  • a magnetic medium e.g., a floppy disk, a hard disk, a magnetic tape
  • an optical medium e.g., a digital versatile disc (DVD)
  • DVD digital versatile disc
  • SSD solid state disk
  • a component can be, but is not limited to: a process running on a processor, a processor, an object, an executable file, a thread in execution, a program, and/or a computer.
  • an application running on a computing device and the computing device can both be components.
  • One or more components can exist in a process and/or thread in execution, and a component can be located in a computer and/or distributed between two or more computers. In addition, these components can be executed from various computer-readable media with various data structures thereon.
  • These components can communicate in a local and/or remote process manner, such as according to a signal with one or more data packets (for example, data from a component, which interacts with another component in a local system, a distributed system, and/or interacts with other systems in a signal manner through a network such as the Internet).
  • data packets for example, data from a component, which interacts with another component in a local system, a distributed system, and/or interacts with other systems in a signal manner through a network such as the Internet.
  • the present application presents various aspects, embodiments, or features around a system that may include multiple devices, components, modules, etc. It should be understood and appreciated that each system may include additional devices, components, modules, etc., and/or may not include all of the devices, components, modules, etc. discussed in conjunction with the figures. In addition, combinations of these schemes may also be used.
  • the word “exemplary” is used to indicate an example, illustration or description. Any embodiment or design described as “exemplary” in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the word “exemplary” is used to present concepts in a concrete way.
  • information, signal, message, and channel can sometimes be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings they intend to express are consistent. “Of,” “corresponding,” and “corresponding” can sometimes be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings they intend to express are consistent. “System” and “network” can sometimes be used interchangeably. When the distinction between them is not emphasized, the meanings they intend to express are consistent. For example, "communication network” also refers to "communication system.”
  • the network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application.
  • a person of ordinary skill in the art can appreciate that with the evolution of the network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present application provides a source address validation method, and a communication apparatus and system, applied to the technical field of communications. The method comprises: a first node acquires a source address validation table and a forwarding table; the first node generates an independent validation table according to the source address validation table and the forwarding table, wherein the independent validation table comprises the mapping relationships in the source address validation table other than a first-type mapping relationship, and the first-type mapping relationship indicates the same mapping relationship in the forwarding table and the source address validation table; and when a received first packet passes the validation of the independent validation table and/or the validation of the forwarding table, the first node determines that the first packet is a legitimate packet. On the basis of the solution, the first node can reuse the forwarding table for source address validation, thereby saving table space occupied by entries for source address validation. Additionally, the rules in the independent validation table and the forwarding table are complementary to each other, thus achieving a similar effect as using the source address validation table for validation.

Description

源地址验证方法、通信装置及系统Source address verification method, communication device and system
本申请要求于2023年02月10日提交国家知识产权局、申请号为202310152020.X、申请名称为“源地址验证方法、通信装置及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed with the State Intellectual Property Office on February 10, 2023, with application number 202310152020.X and application name “Source Address Verification Method, Communication Device and System”, all contents of which are incorporated by reference in this application.
技术领域Technical Field
本申请涉及通信技术领域,尤其涉及一种源地址验证方法、通信装置及系统。The present application relates to the field of communication technology, and in particular to a source address verification method, a communication device and a system.
背景技术Background Art
源地址验证(source address validation,SAV)是消除源地址伪造攻击的重要手段,很多现有的网络防御方案都是基于源地址验证实现的。SAV技术的基本原理是建立报文的源地址与报文入接口的映射关系,进而在后续报文转发过程中根据映射关系验证报文的源地址对应的入接口是否正确。Source address validation (SAV) is an important means to eliminate source address forgery attacks. Many existing network defense solutions are based on source address validation. The basic principle of SAV technology is to establish a mapping relationship between the source address of the message and the message input interface, and then verify whether the input interface corresponding to the source address of the message is correct according to the mapping relationship during the subsequent message forwarding process.
但是,SAV技术使用的源地址验证表对于数据面的表空间的需求很大。如果源地址验证表和转发表存储在同一个转发芯片上,则源地址验证表会挤占转发表的表空间。而如果源地址验证表使用独立的转发芯片上,则设备的成本会较高。总之,设备配置源地址验证表会对设备的能力和成本造成较大的影响。However, the source address verification table used by SAV technology requires a lot of table space on the data plane. If the source address verification table and the forwarding table are stored on the same forwarding chip, the source address verification table will occupy the table space of the forwarding table. If the source address verification table is used on an independent forwarding chip, the cost of the device will be higher. In short, configuring a source address verification table on a device will have a significant impact on the device's capabilities and costs.
发明内容Summary of the invention
本申请提供了一种源地址验证方法、通信装置及系统,用于解决源地址验证表对数据面的表空间的需求很大,影响设备的能力和成本的问题。The present application provides a source address verification method, a communication device and a system, which are used to solve the problem that the source address verification table has a large demand for table space on the data plane, which affects the capacity and cost of the device.
为达到上述目的,本申请采用如下技术方案:In order to achieve the above purpose, this application adopts the following technical solutions:
第一方面,提供了一种源地址验证方法,该方法可以由第一节点执行,也可以由第一节点的部件,例如第一节点的处理器、芯片、或芯片系统等执行,还可以由能实现全部或部分第一节点功能的逻辑模块或软件实现。该方法可以包括:第一节点获取源地址验证表和转发表,源地址验证表包括至少一个报文的源地址和报文入接口的映射关系,转发表包括至少一个报文的目的地址和报文的转发出接口的映射关系。第一节点根据源地址验证表和转发表生成独立验证表,独立验证表包括源地址验证表中除第一类映射关系之外的其他映射关系,其中,第一类映射关系包括转发表与源地址验证表中相同的映射关系。第一节点在接收到的第一报文通过独立验证表的验证和/或转发表的验证的情况下,确定第一报文为合法报文。In a first aspect, a source address verification method is provided, which can be executed by a first node, or by a component of the first node, such as a processor, chip, or chip system of the first node, or by a logic module or software that can realize all or part of the functions of the first node. The method may include: the first node obtains a source address verification table and a forwarding table, the source address verification table includes a mapping relationship between a source address of at least one message and a message input interface, and the forwarding table includes a mapping relationship between a destination address of at least one message and a message forwarding interface. The first node generates an independent verification table according to the source address verification table and the forwarding table, and the independent verification table includes other mapping relationships in the source address verification table except for the first type of mapping relationship, wherein the first type of mapping relationship includes the same mapping relationship in the forwarding table and the source address verification table. The first node determines that the first message is a legitimate message when the received first message passes the verification of the independent verification table and/or the verification of the forwarding table.
基于该方案,第一节点可以复用转发表进行源地址验证,从而源地址验证表与转发表中相同的第一类映射关系无需单独存储。并且,第一节点还可以使用独立验证表进行源地址验证,独立验证表中的规则可以作为转发表的规则补充。从而,该方法集可以达到使用源地址验证表进行源地址验证相同或相近的验证效果,又可以降低需要单独存储的用于源地址验证的规则的数量。通常情况下,源地址验证表中第一类映射关系的数量是占大多数的,源地址验证表中除第一类映射关系之外的其他映射关系仅占少数。那么,独立验证表对数据面的表空间的需求较小,对设备的能力和成本不会产生太大影响。Based on this solution, the first node can reuse the forwarding table to perform source address verification, so that the first-class mapping relationships that are the same in the source address verification table and the forwarding table do not need to be stored separately. In addition, the first node can also use an independent verification table to verify the source address, and the rules in the independent verification table can serve as a supplement to the rules of the forwarding table. Thus, this method set can achieve the same or similar verification effect as using the source address verification table for source address verification, and can reduce the number of rules that need to be stored separately for source address verification. Normally, the number of first-class mapping relationships in the source address verification table accounts for the majority, and other mapping relationships in the source address verification table except the first-class mapping relationships only account for a minority. Then, the independent verification table has a smaller demand for table space on the data plane, and will not have much impact on the capabilities and costs of the device.
结合上述第一方面,在一种可能的实现方式中,第一节点在接收到的第一报文通过独立验证表的验证和/或转发表的验证的情况下,确定第一报文为合法报文,包括:第一节点根据独立验证表对第一报文进行验证。第一节点在第一报文通过独立验证表的验证的情况下,确定第一报文为合法报文。或者,第一节点在独立验证表的地址中不存在第一报文的源地址的情况下,根据转发表对第一报文进行验证。并且,第一节点在第一报文通过转发表的验证的情况下,确定第一报文为合法报文。In combination with the first aspect above, in a possible implementation, the first node determines that the first message is a legal message when the received first message passes the verification of the independent verification table and/or the verification of the forwarding table, including: the first node verifies the first message according to the independent verification table. The first node determines that the first message is a legal message when the first message passes the verification of the independent verification table. Alternatively, the first node verifies the first message according to the forwarding table when the source address of the first message does not exist in the address of the independent verification table. And, the first node determines that the first message is a legal message when the first message passes the verification of the forwarding table.
结合上述第一方面,在一种可能的实现方式中,第一节点在接收到的第一报文通过独立验证表的验证和/或转发表的验证的情况下,确定第一报文为合法报文,具体可以包括:第一节点根据转发表对第一报文进行验证。第一节点在第一报文通过转发表的验证的情况下,确定第一报文为合法报文。或者,第一节点在第一报文未通过转发表的验证的情况下,根据独立验证表对第一报文进行验证。并且,第一节点在第一报文通过独立验证表的验证的情况下,确定第一报文为合法报文。In combination with the above-mentioned first aspect, in a possible implementation method, the first node determines that the first message is a legal message when the received first message passes the verification of the independent verification table and/or the verification of the forwarding table. Specifically, it may include: the first node verifies the first message according to the forwarding table. The first node determines that the first message is a legal message when the first message passes the verification of the forwarding table. Alternatively, the first node verifies the first message according to the independent verification table when the first message fails to pass the verification of the forwarding table. And, the first node determines that the first message is a legal message when the first message passes the verification of the independent verification table.
结合上述第一方面,在一种可能的实现方式中,第一报文的源地址为第一地址,第一报文的入接口为第一接口。该方法还可以包括:第一节点在独立验证表的地址中不存在第一地址或者独立验证表存在第一地址和第一接口的映射关系的情况下,确定第一报文通过独立验证表的验证。第一节点在独立验证表的地址中存在所述第一地址,但第一地址映射的接口不是第一接口的情况下,确定第一报文未通过独 立验证表的验证。In combination with the first aspect above, in a possible implementation, the source address of the first message is the first address, and the input interface of the first message is the first interface. The method may also include: when the first address does not exist in the addresses of the independent verification table or the independent verification table has a mapping relationship between the first address and the first interface, the first node determines that the first message has passed the verification of the independent verification table. When the first node has the first address in the addresses of the independent verification table, but the interface mapped to the first address is not the first interface, the first node determines that the first message has not passed the independent verification table. Verification of the established verification table.
结合上述第一方面,在一种可能的实现方式中,第一报文的源地址为第一地址,第一报文的入接口为第一接口。该方法还可以包括:第一节点在转发表的地址中不存在第一地址或者转发表存在第一地址和第一接口的映射关系的情况下,确定第一报文通过转发表的验证。第一节点在转发表的地址中存在所述第一地址,但第一地址映射的接口不是第一接口的情况下,确定第一报文未通过转发表的验证。In combination with the first aspect above, in a possible implementation, the source address of the first message is the first address, and the input interface of the first message is the first interface. The method may also include: the first node determines that the first message passes the verification of the forwarding table when the first address does not exist in the address of the forwarding table or the forwarding table has a mapping relationship between the first address and the first interface. The first node determines that the first message fails to pass the verification of the forwarding table when the first address exists in the address of the forwarding table but the interface mapped to the first address is not the first interface.
第二方面,提供了一种通信装置,该通信装置具有实现上述第一方面所述的方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。In a second aspect, a communication device is provided, which has the function of implementing the method described in the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
第三方面,提供了一种通信装置,包括:处理器和存储器;该存储器用于存储计算机执行指令,当该通信装置运行时,该处理器执行该存储器存储的该计算机执行指令,以使该通信装置执行如上述第一方面中任一项所述的源地址验证方法。In a third aspect, a communication device is provided, comprising: a processor and a memory; the memory is used to store computer execution instructions, and when the communication device is running, the processor executes the computer execution instructions stored in the memory to enable the communication device to perform a source address verification method as described in any one of the above-mentioned first aspects.
第四方面,提供了一种通信装置,包括:处理器;所述处理器用于与存储器耦合,并读取存储器中的指令之后,根据所述指令执行如上述第一方面中任一项所述的源地址验证方法。In a fourth aspect, a communication device is provided, comprising: a processor; the processor is used to couple with a memory, and after reading instructions in the memory, execute a source address verification method as described in any one of the first aspects above according to the instructions.
第五方面,提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机可以执行上述第一方面中任一项所述的源地址验证方法。In a fifth aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer can execute the source address verification method described in any one of the first aspects above.
第六方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机可以执行上述第一方面中任一项所述的源地址验证方法。In a sixth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the source address verification method described in any one of the first aspects.
其中,第二方面至第六方面中任一种设计方式所带来的技术效果可参见第一方面中不同设计方式所带来的技术效果,此处不再赘述。Among them, the technical effects brought about by any design method in the second to sixth aspects can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本申请实施例提供的一种通信网络的结构示意图;FIG1 is a schematic diagram of the structure of a communication network provided in an embodiment of the present application;
图2为本申请实施例提供的一种基于转发表进行源地址验证和报文转发的流程示意图;FIG2 is a schematic diagram of a process of performing source address verification and message forwarding based on a forwarding table provided in an embodiment of the present application;
图3为本申请实施例提供的另一种通信网络的结构示意图;FIG3 is a schematic diagram of the structure of another communication network provided in an embodiment of the present application;
图4为本申请实施例提供的一种报文处理流程的示意图;FIG4 is a schematic diagram of a message processing flow provided in an embodiment of the present application;
图5为本申请实施例提供的一种数据面的表空间的示意图;FIG5 is a schematic diagram of a table space of a data plane provided in an embodiment of the present application;
图6为本申请实施例提供的一种源地址验证方法的流程示意图;FIG6 is a schematic diagram of a flow chart of a source address verification method provided in an embodiment of the present application;
图7为本申请实施例提供的一种源地址验证表和转发表的集合关系的示意图;7 is a schematic diagram of a set relationship between a source address verification table and a forwarding table provided in an embodiment of the present application;
图8为本申请实施例提供的一种源地址验证方法的流程示意图;FIG8 is a schematic diagram of a flow chart of a source address verification method provided in an embodiment of the present application;
图9为本申请实施例提供的一种源地址验证方法的流程示意图;FIG9 is a schematic diagram of a flow chart of a source address verification method provided in an embodiment of the present application;
图10为本申请实施例提供的一种数据面表空间存储源地址验证表和独立验证表的比对示意图;FIG10 is a schematic diagram of comparing a data plane table space storage source address verification table and an independent verification table provided in an embodiment of the present application;
图11为本申请实施例提供的一种通信装置的结构示意图;FIG11 is a schematic diagram of the structure of a communication device provided in an embodiment of the present application;
图12为本申请实施例提供的另一种通信装置的结构示意图;FIG12 is a schematic diagram of the structure of another communication device provided in an embodiment of the present application;
图13为本申请实施例提供的又一种通信装置的结构示意图。FIG13 is a schematic diagram of the structure of another communication device provided in an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
为方便理解,首先,对本申请涉及的技术术语以及相关技术做简单介绍。To facilitate understanding, first, a brief introduction is given to the technical terms and related technologies involved in this application.
路由表也被称为路由信息库(routing information base,RIB),转发表也叫报文转发信息库(forwarding information base,FIB)。路由表可以是节点根据各种路由过程获得的信息构建的,转发表中可以包括路由表中的最佳路由。路由表位于控制层面,转发表位于数据层面。报文转发节点实际上是查询转发表来进行报文转发的。转发表中可以包括目的地址、以及目的地址对应的转发出接口信息和下一跳信息。The routing table is also called the routing information base (RIB), and the forwarding table is also called the forwarding information base (FIB). The routing table can be constructed by the node based on the information obtained from various routing processes. The forwarding table can include the best route in the routing table. The routing table is located at the control layer, and the forwarding table is located at the data layer. The message forwarding node actually queries the forwarding table to forward the message. The forwarding table can include the destination address, the forwarding interface information corresponding to the destination address, and the next hop information.
单播逆向路径转发(unicast reverse path forwarding,uRPF)技术主要通过对报文(也可以称为数据包)的源地址进行合法性检查,实现对报文的过滤。uRPF可以是通过查询转发表对报文的源地址进行合法性检查的。Unicast reverse path forwarding (uRPF) technology mainly filters messages by checking the legitimacy of the source address of the message (also called data packet). uRPF can check the legitimacy of the source address of the message by querying the forwarding table.
uRPF模式可以包括严格(strict)型和松散(loose)型两种,下面分别进行介绍。uRPF modes can include strict and loose, which are introduced below.
严格型uRPF:不但要求转发表中存在去往报文源地址的路由,而且还要求报文的入接口与转发表中去往源地址的路由的出接口一致。只有同时满足上述两个条件的报文,才被认为是合法报文。Strict uRPF: Not only does it require that there is a route to the source address of the message in the forwarding table, but it also requires that the incoming interface of the message is consistent with the outgoing interface of the route to the source address in the forwarding table. Only messages that meet both of the above conditions are considered legal messages.
松散型uRPF:仅要求转发表中存在去往报文源地址的路由即可,不检查报文的入接口与转发表中去 往报文源地址的路由的出接口是否一致。Loose uRPF: It only requires that there is a route to the source address of the message in the forwarding table. It does not check the incoming interface of the message and the outgoing interface in the forwarding table. Check whether the outbound interfaces of the routes to the source address of the packets are consistent.
图1示出了一种通信网络的结构示意图,如图1所示,主机H1可以通过节点R1和节点R2与主机H3连接,主机H2可以通过节点R3和节点R2与主机H3连接,节点R2与节点R1连接的接口为a,节点R2与节点R3连接的接口为b。Figure 1 shows a schematic diagram of the structure of a communication network. As shown in Figure 1, host H1 can be connected to host H3 through node R1 and node R2, and host H2 can be connected to host H3 through node R3 and node R2. The interface connecting node R2 to node R1 is a, and the interface connecting node R2 to node R3 is b.
以图1所示的通信网络为例,假设主机H1的地址为P1、主机H2的地址为P2、以及主机H3的地址为P3,节点R2的转发表中可以如表1所示。Taking the communication network shown in FIG. 1 as an example, assuming that the address of host H1 is P1, the address of host H2 is P2, and the address of host H3 is P3, the forwarding table of node R2 may be as shown in Table 1.
表1
Table 1
下面以表1所示的转发表为例,对节点R2执行uRPF过滤的过程进行介绍:The following uses the forwarding table shown in Table 1 as an example to describe the process of performing uRPF filtering on node R2:
示例地,假设主机H1向主机H3发送报文x,则该报文x的源地址为P1,节点R2可以从接口a接收到报文x。如果节点R2执行严格型uRPF,那么节点R2在接收到报文x后,首先可以查询转发表中是否存在去往报文x的源地址P1的路由。如表1所示的转发表,节点R2可以在其中查询到去往P1的路由。进一步地,节点R2可以查询往P1的路由出接口。如表1的转发表所示,去往P1的路由对应的转发出接口为a,而报文x的入接口也为a。也就是说,节点R2接收报文x的入接口与节点R2的转发表中去往报文x源地址的路由出接口一致。因此,节点R2可以确定报文x是合法报文,通过了uRPF过滤。如果节点R2执行松散型uRPF,那么节点R2在转发表中查询到去往P1的路由后,即可确定报文x是合法的,通过了uRPF过滤。For example, assuming that host H1 sends message x to host H3, the source address of message x is P1, and node R2 can receive message x from interface a. If node R2 implements strict uRPF, then after receiving message x, node R2 can first query whether there is a route to the source address P1 of message x in the forwarding table. In the forwarding table shown in Table 1, node R2 can query the route to P1. Further, node R2 can query the route outbound interface to P1. As shown in the forwarding table in Table 1, the forwarding outbound interface corresponding to the route to P1 is a, and the incoming interface of message x is also a. In other words, the incoming interface of node R2 receiving message x is consistent with the route outbound interface to the source address of message x in the forwarding table of node R2. Therefore, node R2 can determine that message x is a legitimate message and has passed the uRPF filter. If node R2 executes loose uRPF, then after node R2 finds the route to P1 in the forwarding table, it can determine that message x is legal and has passed the uRPF filter.
又示例地,假设主机H2向主机H3发送伪造源地址P1的报文y,节点R2可以从接口b接收到该报文y。如果节点R2执行严格型uRPF,那么节点R2在接收到报文y后,首先可以查询转发表中是否存在去往报文y的源地址P1的路由。如表1所示的转发表,节点R2可以在其中查询到去往P1的路由。进一步地,节点R2可以查询往P1的路由出接口。如表1的转发表所示,去往P1的路由对应的转发出接口为a,而报文y的入接口为b。也就是说,节点R2接收报文y的入接口与节点R2的转发表中去往报文y源地址的路由出接口不一致。因此,节点R2可以确定报文y不是合法报文,报文y不能通过uRPF过滤。如果节点R2执行松散型uRPF,那么节点R2在转发表中查询到去往P1的路由后,即可确定报文y是合法的,报文y会通过uRPF过滤。As another example, suppose that host H2 sends a message y with a forged source address P1 to host H3, and node R2 can receive the message y from interface b. If node R2 implements strict uRPF, then after receiving message y, node R2 can first query whether there is a route to the source address P1 of message y in the forwarding table. In the forwarding table shown in Table 1, node R2 can query the route to P1. Further, node R2 can query the route outbound interface to P1. As shown in the forwarding table in Table 1, the forwarding outbound interface corresponding to the route to P1 is a, and the incoming interface of message y is b. In other words, the incoming interface of node R2 receiving message y is inconsistent with the route outbound interface to the source address of message y in the forwarding table of node R2. Therefore, node R2 can determine that message y is not a legitimate message and message y cannot pass the uRPF filter. If node R2 implements loose uRPF, then after node R2 finds the route to P1 in the forwarding table, it can determine that message y is legal, and message y will pass the uRPF filter.
现有技术中可以通过上述uRPF技术来对报文源地址进行合法性检查,实现报文的过滤。在使用uRPF技术进行报文过滤的情况下,报文的过滤和转发都可以基于转发表实现。示例地,节点基于转发表进行源地址验证和报文转发的流程可以如图2所示。节点在接收报文之后,首先可以进入源地址验证流程,进行源地址验证的手段可以是上述uRPF技术。在源地址验证流程中,节点可以基于转发表做匹配,判断报文是否合法/验证通过。如果报文的源地址验证不通过,节点可以丢弃该报文。如果报文的源地址验证通过,则可以进入报文转发流程。在报文转发流程中,节点可以进一步基于转发表做匹配,查询报文的转发出接口和下一跳。进而,对报文进行转发。In the prior art, the above uRPF technology can be used to check the legitimacy of the source address of the message to achieve message filtering. When the uRPF technology is used to filter the message, both the filtering and forwarding of the message can be implemented based on the forwarding table. For example, the process of the node performing source address verification and message forwarding based on the forwarding table can be shown in Figure 2. After receiving the message, the node can first enter the source address verification process, and the means for performing source address verification can be the above uRPF technology. In the source address verification process, the node can match based on the forwarding table to determine whether the message is legal/verified. If the source address verification of the message fails, the node can discard the message. If the source address verification of the message passes, the message forwarding process can be entered. In the message forwarding process, the node can further match based on the forwarding table to query the forwarding interface and next hop of the message. Then, the message is forwarded.
不过,使用uRPF技术对报文进行源地址的合法性验证的方法仍然存在一些问题,例如,在路由不对称场景下会面临下面两种问题:However, there are still some problems with the method of using uRPF technology to verify the legitimacy of the source address of the message. For example, in the scenario of asymmetric routing, the following two problems may occur:
1)假阳性问题:路由不对称场景下,合法报文的源地址的路由出接口和节点接收该合法报文的入接口不一致,导致合法报文被丢弃。1) False positive problem: In asymmetric routing scenarios, the routing outbound interface of the source address of a legitimate message is inconsistent with the inbound interface of the node receiving the legitimate message, resulting in the legitimate message being discarded.
2)假阴性问题:路由不对称场景下,非法报文的源地址的路由出接口和节点接收该非法报文的入接口一致,导致非法报文被放过。2) False negative problem: In asymmetric routing scenarios, the routing outbound interface of the source address of the illegal message is consistent with the inbound interface of the node receiving the illegal message, resulting in the illegal message being passed.
图3示出了另一种通信网络的示意图,该通信网络可以包括主机H4、主机H5、节点A、节点B、节点C和节点D。其中,节点A通过接口a1与节点B连接,通过接口a2与节点D连接,以及通过接口a3与主机H4连接;节点B通过接口b2与节点A连接,以及通过接口b1与节点C连接;节点C通过接口c1与节点B连接,通过接口c2与节点D连接,以及通过接口c3与主机H5连接;节点D通过接口d1与节点C连接,以及通过接口d2与节点A连接。Fig. 3 shows a schematic diagram of another communication network, which may include a host H4, a host H5, a node A, a node B, a node C, and a node D. Among them, node A is connected to node B through interface a1, connected to node D through interface a2, and connected to host H4 through interface a3; node B is connected to node A through interface b2, and connected to node C through interface b1; node C is connected to node B through interface c1, connected to node D through interface c2, and connected to host H5 through interface c3; node D is connected to node C through interface d1, and connected to node A through interface d2.
在图3所示的网络中,主机H4向主机H5发送的报文的转发路径可以为:主机H4→节点A→节点B →节点C→主机H5,主机H5向主机H4发送的报文的转发路径可以为:主机H5→节点C→节点D→节点A→主机H4,主机H4至主机H5的路由和主机H5至主机H4的路由可以是不对称的。其中,节点A可以从接口a3接收到来自主机H4的报文,并可以从接口a1进行转发。节点C可以从接口c1接收到来自主机H4的报文,并可以从接口c3进行转发。节点C可以从接口c3接收到来自主机H5的报文,并可以从接口c2进行转发。节点A可以从接口a2接收到来自主机H5的报文,并可以从接口a3进行转发。In the network shown in FIG3 , the forwarding path of the message sent from host H4 to host H5 can be: host H4 → node A → node B →node C→host H5, the forwarding path of the message sent by host H5 to host H4 can be: host H5→node C→node D→node A→host H4, and the route from host H4 to host H5 and the route from host H5 to host H4 can be asymmetric. Among them, node A can receive the message from host H4 from interface a3 and forward it from interface a1. Node C can receive the message from host H4 from interface c1 and forward it from interface c3. Node C can receive the message from host H5 from interface c3 and forward it from interface c2. Node A can receive the message from host H5 from interface a2 and forward it from interface a3.
假设主机H4的地址为P4、主机H5的地址为P5,那么节点A的转发表可以如表2所示,节点C的转发表可以如表3所示。Assuming that the address of host H4 is P4 and the address of host H5 is P5, the forwarding table of node A may be as shown in Table 2, and the forwarding table of node C may be as shown in Table 3.
表2
Table 2
表3
Table 3
以图3所示的通信网络为例,假设主机H4发送了去往主机H5的报文m,报文m经过节点A和节点B转发至节点C,节点C从接口c1接收到报文m。此种情况下,如果节点C执行严格型uRPF,那么节点C在接收到报文m后会查询去往报文m的源地址(即主机H4的地址:P4)的路由出接口。节点C查询到的去往报文m的源地址的路由出接口为c2,与接收报文m的入接口c1不同。节点C会认为该报文m为非法的,从而丢弃报文m。此种情况下,就产生了假阳性问题。Taking the communication network shown in Figure 3 as an example, suppose that host H4 sends a message m to host H5, and message m is forwarded to node C through node A and node B, and node C receives message m from interface c1. In this case, if node C implements strict uRPF, then after receiving message m, node C will query the route outbound interface to the source address of message m (that is, the address of host H4: P4). The route outbound interface to the source address of message m queried by node C is c2, which is different from the inbound interface c1 of receiving message m. Node C will consider message m to be illegal and discard message m. In this case, a false positive problem occurs.
继续以图3所示的通信网络为例,节点D还可以通过接口d3与主机H6连接。假设主机H6向主机H5发送伪造源地址P4的报文n,且报文n可以通过节点D转发至节点C。那么,节点C将会从接口c2接收到报文n。如果节点C执行严格型uRPF,那么节点C在接收到报文n后会查询去往报文n的源地址(即P4)的路由出接口。节点C查询到的去往报文n的源地址的路由出接口为c2,与接收报文n的入接口c2一致。节点C会认为该报文n为合法的,从而让该报文n通过验证。但实际上,该报文n为非法报文。此种情况下,就产生了假阴性问题。Continuing with the communication network shown in Figure 3 as an example, node D can also be connected to host H6 through interface d3. Assume that host H6 sends message n with a forged source address P4 to host H5, and message n can be forwarded to node C through node D. Then, node C will receive message n from interface c2. If node C implements strict uRPF, then after receiving message n, node C will query the routing outbound interface to the source address of message n (i.e. P4). The routing outbound interface to the source address of message n queried by node C is c2, which is consistent with the inbound interface c2 of receiving message n. Node C will consider the message n to be legal, thereby allowing the message n to pass verification. But in fact, the message n is an illegal message. In this case, a false negative problem arises.
为了避免假阳性问题和假阴性问题,现有技术中,节点可以借助路由信息以及其他信息获得源地址验证表,进而基于源地址验证表对报文进行源地址验证。源地址验证表中包括报文的源地址和合法入接口的映射关系,源地址与合法入接口的映射关系是根据报文的实际转发路径信息生成的。基于源地址验证表对报文进行源地址验证的结果是完全正确的。In order to avoid the false positive and false negative problems, in the prior art, the node can obtain the source address verification table with the help of routing information and other information, and then verify the source address of the message based on the source address verification table. The source address verification table includes the mapping relationship between the source address of the message and the legal input interface, and the mapping relationship between the source address and the legal input interface is generated based on the actual forwarding path information of the message. The result of the source address verification of the message based on the source address verification table is completely correct.
示例地,以图1所示的通信网络为例,假设主机H1的地址为P1、主机H2的地址为P2、以及主机H3的地址为P3。由于主机H1向主机H3发送的报文会通过接口a进入节点R2,因此节点R2可以建立源地址P1与合法入接口a的映射关系。由于主机H2向主机H3发送的报文会通过接口b进入节点R2,因此节点R2可以建立源地址P2与合法入接口a的映射关系。由于主机H3向主机H1或主机H2发送的报文会通过接口c进入节点R2,因此节点R2可以建立源地址P3与合法入接口c的映射关系。从而,节点R2上的源地址验证表可以如表4所示,该源地址验证表可以包括源地址P1与合法入接口a的映射关系、源地址P2与合法入接口b的映射关系、以及源地址P3与合法入接口c的映射关系。For example, taking the communication network shown in Figure 1 as an example, it is assumed that the address of host H1 is P1, the address of host H2 is P2, and the address of host H3 is P3. Since the message sent by host H1 to host H3 will enter node R2 through interface a, node R2 can establish a mapping relationship between source address P1 and legal input interface a. Since the message sent by host H2 to host H3 will enter node R2 through interface b, node R2 can establish a mapping relationship between source address P2 and legal input interface a. Since the message sent by host H3 to host H1 or host H2 will enter node R2 through interface c, node R2 can establish a mapping relationship between source address P3 and legal input interface c. Thus, the source address verification table on node R2 can be as shown in Table 4, which can include a mapping relationship between source address P1 and legal input interface a, a mapping relationship between source address P2 and legal input interface b, and a mapping relationship between source address P3 and legal input interface c.
表4
Table 4
又示例地,以图3所示的通信网络为例,假设主机H4的地址为P4、主机H5的地址为P5。由于节点A可以从接口a3接收到来自主机H4的报文,以及可以从接口a2接收到来自主机H5的报文,因此节点A的源地址验证表可以如表5所示。节点C可以从接口c1接收到来自主机H4的报文,以及可以从接口c3接收到来自主机H5的报文,因此节点C的源地址验证表可以如表6所示。 As another example, taking the communication network shown in FIG3 as an example, it is assumed that the address of host H4 is P4 and the address of host H5 is P5. Since node A can receive a message from host H4 from interface a3 and a message from host H5 from interface a2, the source address verification table of node A can be shown in Table 5. Node C can receive a message from host H4 from interface c1 and a message from host H5 from interface c3, so the source address verification table of node C can be shown in Table 6.
表5
Table 5
表6
Table 6
可以理解的是,基于源地址验证表进行源地址验证不会出现假阳性问题和假阴性问题,因为源地址验证表存储的是源地址和合法入接口的映射关系,该映射关系是基于实际报文接收情况生成的。示例地,如果节点C根据表6所示的源地址验证表对接收到的报文进行源地址验证,节点C从接口c1接收到的源地址为P4的报文可以通过源地址验证,不会出现假阳性问题;节点C从接口c2接收到的源地址为P4的报文无法通过源地址验证,不会出现假阴性问题。It is understandable that source address verification based on the source address verification table will not have false positive and false negative problems, because the source address verification table stores the mapping relationship between the source address and the legal input interface, and the mapping relationship is generated based on the actual message reception situation. For example, if node C performs source address verification on the received message according to the source address verification table shown in Table 6, the message with source address P4 received by node C from interface c1 can pass the source address verification, and there will be no false positive problem; the message with source address P4 received by node C from interface c2 cannot pass the source address verification, and there will be no false negative problem.
在节点使用源地址验证表进行源地址验证的情况下,报文进入节点中的处理流程可以如图4所示。节点在接收报文之后,首先可以进入源地址验证流程,进行源地址验证的手段可以是上述SAV技术。节点可以基于源地址验证表做匹配,判断报文是否合法/验证通过。若报文未通过源地址验证,则节点可以丢弃该报文。若报文通过源地址验证,则可以进入报文转发流程。在报文转发流程中,节点可以进一步基于转发表做匹配,查询报文的转发出接口和下一跳。进而,对报文进行转发。In the case where the node uses the source address verification table to perform source address verification, the processing flow of the message entering the node can be shown in Figure 4. After receiving the message, the node can first enter the source address verification process, and the means of performing source address verification can be the above-mentioned SAV technology. The node can match based on the source address verification table to determine whether the message is legal/verified. If the message fails the source address verification, the node can discard the message. If the message passes the source address verification, it can enter the message forwarding process. In the message forwarding process, the node can further match based on the forwarding table to query the forwarding interface and next hop of the message. Then, the message is forwarded.
可选地,节点在根据源地址验证表进行源地址验证时,如果源地址验证表中没有待验证的报文的源地址,节点可以认为该报文是未知的。对于源地址验证结果是未知的报文,节点可以默认进行转发。换个角度而言,如果待验证的报文的源地址不在源地址验证表中,节点可以默认其通过源地址验证,进而进行转发。Optionally, when a node performs source address verification according to a source address verification table, if the source address of the message to be verified is not in the source address verification table, the node may consider the message to be unknown. For messages whose source address verification result is unknown, the node may forward the message by default. From another perspective, if the source address of the message to be verified is not in the source address verification table, the node may assume that it has passed the source address verification and then forward it.
需要说明的是,在节点使用源地址验证表对报文进行源地址验证的情况下,节点中需要同时配置源地址验证表和转发表,分别用于源地址验证和报文转发。现有技术中,源地址验证表和转发表共用数据面的表空间,示例地,如图5所示,数据面的表空间可以用于存储源地址验证表和转发表。应理解,数据面的表空间是十分珍贵和有限的,如果源地址验证表占用的空间越大,那留给转发表的空间就越小。因此,使用源地址验证表对报文源地址进行合法性验证的方法,会对节点的转发功能造成很大影响。It should be noted that, when a node uses a source address verification table to verify the source address of a message, the node needs to configure a source address verification table and a forwarding table at the same time, which are used for source address verification and message forwarding, respectively. In the prior art, the source address verification table and the forwarding table share the table space of the data plane. For example, as shown in FIG5 , the table space of the data plane can be used to store the source address verification table and the forwarding table. It should be understood that the table space of the data plane is very precious and limited. If the source address verification table occupies a larger space, the space left for the forwarding table is smaller. Therefore, the method of using the source address verification table to verify the legitimacy of the source address of the message will have a great impact on the forwarding function of the node.
为了避免源地址验证表占用转发表的地址空间,在一种实现方式中,可以将源地址验证表的表项配置在访问控制列表(access control list,ACL)中。通过对ACL的复用,以节省源地址验证表占用的地址空间。不过,由于ACL的数目是有限的,且不能全部用于过滤功能(进行源地址验证可以认为是一种过滤),因此此种实现方式只能配置极少量的源地址验证表项。In order to prevent the source address verification table from occupying the address space of the forwarding table, in one implementation, the source address verification table entries can be configured in the access control list (ACL). By reusing the ACL, the address space occupied by the source address verification table can be saved. However, since the number of ACLs is limited and cannot be used for filtering (source address verification can be considered as a kind of filtering), this implementation can only configure a very small number of source address verification table entries.
示例地,现有技术中定义的部分类型的ACL的介绍可以如表7所示。For example, the introduction of some types of ACLs defined in the prior art may be shown in Table 7.
表7

Table 7

从表7中可以看出,基于接口的ACL能够用于根据报文的入接口对报文进行过滤,因此,源地址验证表项可以配置在基于接口的ACL中。不过,基于接口的ACL的表项最多只能配置1000条(编号1000~1999),而源地址验证表项的数量通常都是数万、数十万、数百万级的,此种实现方式仅适用于源地址验证表项很少的特殊场景。As can be seen from Table 7, the interface-based ACL can be used to filter packets according to the inbound interface of the packets. Therefore, the source address verification table items can be configured in the interface-based ACL. However, the interface-based ACL table items can only be configured with a maximum of 1000 (numbered 1000 to 1999), while the number of source address verification table items is usually tens of thousands, hundreds of thousands, or millions. This implementation method is only suitable for special scenarios with few source address verification table items.
还有一种可能的实现方式中,可以采用独立芯片存储源地址验证表,但是这要求独立芯片的表空间要足够大,使得芯片的成本较高。In another possible implementation, an independent chip may be used to store the source address verification table, but this requires that the table space of the independent chip be large enough, which makes the cost of the chip higher.
根据上文描述可以看出,使用uRPF技术进行源地址验证会出现假阳性或假阴性问题,源地址验证的准确性较差。而使用源地址验证表进行源地址验证,验证结果是完全准确的。但是,源地址验证表需要占用设备较多的数据面的表空间,无论采取哪种方式存储源地址验证表,都会影响设备的能力和成本。According to the above description, using uRPF technology for source address verification may result in false positive or false negative problems, and the accuracy of source address verification is poor. However, using the source address verification table for source address verification, the verification result is completely accurate. However, the source address verification table requires more table space on the data plane of the device. No matter which method is used to store the source address verification table, it will affect the capacity and cost of the device.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请的描述中,除非另有说明,“/”表示前后关联的对象是一种“或”的关系,例如,A/B可以表示A或B;本申请中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,其中A,B可以是单数或者复数。并且,在本申请的描述中,除非另有说明,“多个”是指两个或多于两个。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。另外,为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。同时,在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念,便于理解。The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. Among them, in the description of the present application, unless otherwise specified, "/" indicates that the objects associated before and after are in an "or" relationship, for example, A/B can represent A or B; "and/or" in the present application is only a kind of association relationship describing the associated objects, indicating that there can be three relationships, for example, A and/or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. And, in the description of the present application, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or its similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art will understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not necessarily limit the differences. At the same time, in the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or design. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.
本申请实施例中的节点可以是指具有报文转发功能的网络设备,在此统一说明,以下不再赘述。The node in the embodiment of the present application may refer to a network device with a message forwarding function, which is uniformly described here and will not be repeated below.
本申请实施例提供了一种源地址验证方法的流程示意图可以如图6所示,该方法可以包括如下步骤:The present application provides a source address verification method, which may include the following steps:
步骤601、第一节点获取源地址验证表和转发表,源地址验证表包括至少一个报文的源地址和报文入接口的映射关系,转发表包括至少一个报文的目的地址和报文的转发出接口的映射关系。Step 601: The first node obtains a source address verification table and a forwarding table, wherein the source address verification table includes a mapping relationship between a source address of at least one message and a message input interface, and the forwarding table includes a mapping relationship between a destination address of at least one message and a message forwarding output interface.
本申请实施例中,源地址验证表包括报文的源地址和其正确的入接口(也称为合法入接口)的映射关系,源地址验证表能够指示第一节点接收报文的正确入接口。示例地,以图1所示的通信网络为例,第一节点可以为节点R2,第一节点的源地址验证表可以如上文表4所示。又示例地,以图3所示的通信网络为例,第一节点可以为节点A,第一节点的源地址验证表可以如上文表5所示;或者,第一节点可以为节点C,第一节点的源地址验证表可以如上文表6所示。In an embodiment of the present application, the source address verification table includes a mapping relationship between the source address of the message and its correct input interface (also called a legal input interface), and the source address verification table can indicate the correct input interface of the first node to receive the message. By way of example, taking the communication network shown in FIG. 1 as an example, the first node may be node R2, and the source address verification table of the first node may be as shown in Table 4 above. By way of another example, taking the communication network shown in FIG. 3 as an example, the first node may be node A, and the source address verification table of the first node may be as shown in Table 5 above; or, the first node may be node C, and the source address verification table of the first node may be as shown in Table 6 above.
可选地,源地址验证表可以是本地或远程配置到第一节点中的,或者可以是第一节点根据协议自动生成的,或者还可以是第一节点通过其他方式获取到的,本申请不作限定。Optionally, the source address verification table may be locally or remotely configured in the first node, or may be automatically generated by the first node according to a protocol, or may be obtained by the first node through other means, which is not limited in this application.
本申请实施例中,转发表可以包括至少一个报文的目的地址和报文的转发出接口的映射关系,转发表能够指示第一节点转发报文的正确出接口。示例地,以图1所示的通信网络为例,第一节点可以为节点R2,第一节点的转发表可以如上文表1所示。又示例地,以图3所示的通信网络为例,第一节点可以为节点A,第一节点的转发表可以如上文表2所示;或者,第一节点可以为节点C,第一节点的转发表可以如上文表3所示。In an embodiment of the present application, the forwarding table may include a mapping relationship between the destination address of at least one message and the forwarding outbound interface of the message, and the forwarding table can indicate the correct outbound interface of the first node to forward the message. By way of example, taking the communication network shown in FIG. 1 as an example, the first node may be node R2, and the forwarding table of the first node may be as shown in Table 1 above. By way of example, taking the communication network shown in FIG. 3 as an example, the first node may be node A, and the forwarding table of the first node may be as shown in Table 2 above; or, the first node may be node C, and the forwarding table of the first node may be as shown in Table 3 above.
可选地,第一节点可以根据路由协议或静态配置获得路由信息,进而再根据路由信息生成转发表。作为一种可能的实现方式,第一节点可以将所有路由信息中最优的路由信息确定为转发表的表项。Optionally, the first node may obtain routing information according to a routing protocol or static configuration, and then generate a forwarding table according to the routing information. As a possible implementation, the first node may determine the best routing information among all routing information as an entry in the forwarding table.
可选地,本申请提供了源地址验证方法中的源地址验证表和转发表,还可以参考前文对源地址验证表和转发表的相关介绍,在此统一说明。Optionally, the present application provides a source address verification table and a forwarding table in a source address verification method. You may also refer to the previous description of the source address verification table and the forwarding table, which are described uniformly here.
步骤602、第一节点根据源地址验证表和转发表生成独立验证表,独立验证表包括源地址验证表中除第一类映射关系之外的其他映射关系。其中,第一类映射关系包括转发表与源地址验证表中相同的映射 关系。Step 602: The first node generates an independent verification table based on the source address verification table and the forwarding table. The independent verification table includes other mapping relationships in the source address verification table except the first type of mapping relationship. The first type of mapping relationship includes the same mapping relationship in the forwarding table and the source address verification table. relation.
可选地,如果第一节点发送的目的地址为第一地址的报文的传输路径和第一节点接收到的源地址为第一地址的报文的传输路径是对称的,那么第一节点获取到的源地址验证表和转发表中第一地址对应的映射关系可以是相同的。反之,则可以不同。Optionally, if the transmission path of the message with the destination address being the first address sent by the first node and the transmission path of the message with the source address being the first address received by the first node are symmetrical, then the mapping relationship corresponding to the first address in the source address verification table and the forwarding table obtained by the first node may be the same. Otherwise, they may be different.
示例地,以图1所示的通信网络为例,第一节点可以为节点R2,第一地址可以为主机H1的地址P1。节点R2发送去往主机H1的报文的传输路径和节点R2接收到来自主机H1的报文的传输路径是对称的,表1所示的节点R2的转发表和表4所示的节点R2的源地址验证表中的地址P1映射的接口均为接口a,也即地址P1对应的映射关系是相同的。或者,第一节点可以为节点R2,第一地址可以为主机H2的地址P2。节点R2发送去往主机H2的报文的传输路径和节点R2接收到来自主机H2的报文的传输路径也是对称的,表1所示的节点R2的转发表和表4所示的节点R2的源地址验证表中的地址P2映射的接口均为接口b,也即地址P2对应的映射关系是相同的。或者,第一节点可以为节点R2,第一地址可以为主机H3的地址P3。节点R2发送去往主机H3的报文的传输路径和节点R2接收到来自主机H3的报文的传输路径是对称的,表1所示的节点R2的转发表和表4所示的节点R2的源地址验证表中的地址P3映射的接口均为接口c,也即地址P3对应的映射关系是相同的。For example, taking the communication network shown in FIG1 as an example, the first node may be node R2, and the first address may be address P1 of host H1. The transmission path of the message sent by node R2 to host H1 and the transmission path of the message received by node R2 from host H1 are symmetrical, and the interface mapped to address P1 in the forwarding table of node R2 shown in Table 1 and the source address verification table of node R2 shown in Table 4 are both interface a, that is, the mapping relationship corresponding to address P1 is the same. Alternatively, the first node may be node R2, and the first address may be address P2 of host H2. The transmission path of the message sent by node R2 to host H2 and the transmission path of the message received by node R2 from host H2 are also symmetrical, and the interface mapped to address P2 in the forwarding table of node R2 shown in Table 1 and the source address verification table of node R2 shown in Table 4 are both interface b, that is, the mapping relationship corresponding to address P2 is the same. Alternatively, the first node may be node R2, and the first address may be address P3 of host H3. The transmission path of the message sent by node R2 to the host H3 and the transmission path of the message received by node R2 from the host H3 are symmetrical. The interface mapped to address P3 in the forwarding table of node R2 shown in Table 1 and the source address verification table of node R2 shown in Table 4 are both interface c, that is, the mapping relationship corresponding to address P3 is the same.
又示例地,以图3所示的通信网络为例,节点A接收来自主机H4的报文的传输路径和节点A向主机H4发送报文的传输路径是对称的,表2所示的节点A的转发表和表5所示的节点A的源地址验证表中的地址P4映射的接口均为接口a3,也即地址P4对应的映射关系是相同的。节点C接收来自主机H5的报文的传输路径和节点C向主机H5发送报文的传输路径是对称的,表3所示的节点C的转发表和表6所示的节点C的源地址验证表中的地址P5映射的接口均为接口c3,也即地址P5对应的映射关系是相同的。节点A接收来自主机H5的报文的传输路径和节点A向主机H5发送报文的传输路径是不对称的,表2所示的节点A的转发表和表5所示的节点A的源地址验证表中的地址P5对应的接口是不同的,也即地址P5对应的映射关系不同。节点C接收来自主机H4的报文的传输路径和节点C向主机H4发送报文的传输路径是不对称的,表3所示的节点C的转发表和表5所示的节点C的源地址验证表中的地址P4对应的接口是不同的,也即地址P4对应的映射关系不同。As another example, taking the communication network shown in FIG3 as an example, the transmission path of the message received by node A from host H4 and the transmission path of the message sent by node A to host H4 are symmetrical, and the interface mapped to address P4 in the forwarding table of node A shown in Table 2 and the source address verification table of node A shown in Table 5 are both interface a3, that is, the mapping relationship corresponding to address P4 is the same. The transmission path of the message received by node C from host H5 and the transmission path of the message sent by node C to host H5 are symmetrical, and the interface mapped to address P5 in the forwarding table of node C shown in Table 3 and the source address verification table of node C shown in Table 6 are both interface c3, that is, the mapping relationship corresponding to address P5 is the same. The transmission path of the message received by node A from host H5 and the transmission path of the message sent by node A to host H5 are asymmetric, and the interface corresponding to address P5 in the forwarding table of node A shown in Table 2 and the source address verification table of node A shown in Table 5 is different, that is, the mapping relationship corresponding to address P5 is different. The transmission path for node C to receive messages from host H4 and the transmission path for node C to send messages to host H4 are asymmetric. The interfaces corresponding to address P4 in the forwarding table of node C shown in Table 3 and the source address verification table of node C shown in Table 5 are different, that is, the mapping relationship corresponding to address P4 is different.
可选地,网络中的至少部分报文转发路径可以是对称的,从而第一节点获取到的转发表和源地址验证表中的至少部分映射关系可以是相同的。Optionally, at least part of the message forwarding paths in the network may be symmetric, so that at least part of the mapping relationships in the forwarding table and the source address verification table acquired by the first node may be the same.
应理解的是,由于转发表和源地址验证表中的第一类映射关系是相同的,因此本申请实施例中可以复用转发表中的第一类映射关系来进行报文的源地址验证,也能够得到正确的验证结果。由于第一节点可以复用转发表中的第一类映射关系,因此第一节点就无需再单独存储用于源地址验证的第一类映射关系,从而可以节约数据面的表空间。It should be understood that, since the first type of mapping relationship in the forwarding table and the source address verification table is the same, the first type of mapping relationship in the forwarding table can be reused in the embodiment of the present application to verify the source address of the message, and a correct verification result can be obtained. Since the first node can reuse the first type of mapping relationship in the forwarding table, the first node does not need to separately store the first type of mapping relationship for source address verification, thereby saving table space on the data plane.
可选地,源地址验证表中除第一类映射关系之外的其他映射关系为第二类映射关系,转发表中除第一类映射关系之外的其他映射关系为第三类映射关系。Optionally, other mapping relationships except the first type of mapping relationships in the source address verification table are second type of mapping relationships, and other mapping relationships except the first type of mapping relationships in the forwarding table are third type of mapping relationships.
可选地,源地址验证表和转发表均可以视为集合,图7示出了一种源地址验证表和转发表的集合关系的示意图。如图7所示,源地址验证表和转发表相交,划分出三类映射关系。其中,源地址验证表和转发表的交集为第一类映射关系,源地址验证表与转发表的差集为第二类映射关系,转发表与源地址验证表的差集为第三类映射关系。Optionally, both the source address verification table and the forwarding table can be regarded as sets, and FIG7 shows a schematic diagram of a set relationship between a source address verification table and a forwarding table. As shown in FIG7 , the source address verification table and the forwarding table intersect, and three types of mapping relationships are divided. Among them, the intersection of the source address verification table and the forwarding table is a first type of mapping relationship, the difference between the source address verification table and the forwarding table is a second type of mapping relationship, and the difference between the forwarding table and the source address verification table is a third type of mapping relationship.
示例地,以图3所示的通信网络中的节点A为例,表2和表5中地址P4与接口a3的映射关系属于第一类映射关系,表5中地址P5和接口a2的映射关系属于第二类映射关系,表2中的地址P5和接口a1的映射关系属于第三类映射关系。表3和表6中地址P5和接口c3的映射关系属于第一类映射关系,表6中地址P4和接口c1的映射关系属于第二类映射关系,表3中地址P4和接口c2的映射关系属于第三类映射关系。For example, taking node A in the communication network shown in FIG3 as an example, the mapping relationship between address P4 and interface a3 in Table 2 and Table 5 belongs to the first type of mapping relationship, the mapping relationship between address P5 and interface a2 in Table 5 belongs to the second type of mapping relationship, and the mapping relationship between address P5 and interface a1 in Table 2 belongs to the third type of mapping relationship. The mapping relationship between address P5 and interface c3 in Table 3 and Table 6 belongs to the first type of mapping relationship, the mapping relationship between address P4 and interface c1 in Table 6 belongs to the second type of mapping relationship, and the mapping relationship between address P4 and interface c2 in Table 3 belongs to the third type of mapping relationship.
通常情况下,源地址验证表和转发表包括的映射关系中的绝大多数为第一类映射关系,少数为第二类映射关系和/或第三类映射关系。因此,第一类映射关系占用的表空间远大于第二类映射关系或第三类映射关系占用的表空间。从而,包括第二类映射关系的独立验证表相较于包括第一类映射关系和第二类映射关系的源地址验证表的大小是小很多的。Generally, the vast majority of the mapping relationships included in the source address verification table and the forwarding table are first-class mapping relationships, and a few are second-class mapping relationships and/or third-class mapping relationships. Therefore, the table space occupied by the first-class mapping relationship is much larger than the table space occupied by the second-class mapping relationship or the third-class mapping relationship. Therefore, the size of the independent verification table including the second-class mapping relationship is much smaller than that of the source address verification table including the first-class mapping relationship and the second-class mapping relationship.
应理解的是,由于第三类映射关系不属于源地址验证表,因此第三类映射关系对于源地址验证是冗余的、无效的。It should be understood that, since the third type of mapping relationship does not belong to the source address verification table, the third type of mapping relationship is redundant and invalid for source address verification.
可选地,本申请实施例中,第二类映射关系中的地址均存在于第三类映射关系的地址中,换言之, 第三类映射关系中的地址中包括第二类映射关系中的地址。Optionally, in the embodiment of the present application, the addresses in the second type of mapping relationship all exist in the addresses in the third type of mapping relationship. In other words, The addresses in the third type of mapping relationship include the addresses in the second type of mapping relationship.
步骤603、第一节点在接收到的第一报文通过独立验证表的验证和/或转发表的验证的情况下,确定第一报文为合法报文。Step 603: When the received first message passes the verification of the independent verification table and/or the verification of the forwarding table, the first node determines that the first message is a legal message.
作为一种可能的实现方式,如图8所示,步骤603具体可以包括如下步骤:As a possible implementation, as shown in FIG8 , step 603 may specifically include the following steps:
步骤6031a、第一节点根据独立验证表对第一报文进行验证。Step 6031a: The first node verifies the first message according to the independent verification table.
步骤6032a、第一节点在第一报文通过独立验证表的验证的情况下,确定第一报文为合法报文。Step 6032a: When the first message passes the verification of the independent verification table, the first node determines that the first message is a legal message.
可选地,第一节点可以在第一报文未通过独立验证表的验证的情况下,确定第一报文为非法报文。Optionally, the first node may determine that the first message is an illegal message if the first message fails to pass the verification of the independent verification table.
可选地,假设第一报文的源地址为第一地址,第一报文的入接口为第一接口。第一节点可以在独立验证表的地址中不存在第一地址或者独立验证表存在第一地址和第一接口的映射关系的情况下,确定第一报文通过独立验证表的验证。以及,第一节点可以在独立验证表的地址中存在所述第一地址,但第一地址映射的接口不是第一接口的情况下,确定第一报文未通过独立验证表的验证。Optionally, assuming that the source address of the first message is the first address and the input interface of the first message is the first interface. The first node may determine that the first message passes the verification of the independent verification table when the first address does not exist in the address of the independent verification table or the independent verification table has a mapping relationship between the first address and the first interface. Also, the first node may determine that the first message does not pass the verification of the independent verification table when the first address exists in the address of the independent verification table but the interface mapped to the first address is not the first interface.
步骤6033a、第一节点在独立验证表的地址中不存在第一报文的源地址的情况下,根据转发表对第一报文进行验证。Step 6033a: When the source address of the first message does not exist in the addresses in the independent verification table, the first node verifies the first message according to the forwarding table.
步骤6034a、第一节点在第一报文通过转发表的验证的情况下,确定第一报文为合法报文。Step 6034a: When the first message passes the verification of the forwarding table, the first node determines that the first message is a legal message.
应理解,步骤6033a是执行步骤6034a的前提。因此,步骤6034a的实质为:第一节点可以在独立验证表的地址中不存在第一报文的源地址,但第一报文通过转发表的验证的情况下,确定第一报文为合法报文。It should be understood that step 6033a is a prerequisite for executing step 6034a. Therefore, the essence of step 6034a is: the first node can determine that the first message is a legitimate message when the source address of the first message does not exist in the address of the independent verification table, but the first message passes the verification of the forwarding table.
可选地,第一节点可以在独立验证表的地址中不存在第一报文的源地址,且第一报文也未通过转发表的验证的情况下,确定第一报文为非法报文。Optionally, the first node may determine that the first message is an illegal message when the source address of the first message does not exist in the addresses in the independent verification table and the first message does not pass the verification of the forwarding table.
可选地,假设第一报文的源地址为第一地址,第一报文的入接口为第一接口。第一节点可以在转发表的地址中不存在第一地址或者转发表存在第一地址和第一接口的映射关系的情况下,确定第一报文通过转发表的验证。以及,第一节点可以在转发表的地址中存在所述第一地址,但第一地址映射的接口不是第一接口的情况下,确定第一报文未通过转发表的验证。Optionally, assuming that the source address of the first message is the first address and the input interface of the first message is the first interface. The first node may determine that the first message passes the verification of the forwarding table when the first address does not exist in the address of the forwarding table or the forwarding table has a mapping relationship between the first address and the first interface. Also, the first node may determine that the first message fails to pass the verification of the forwarding table when the first address exists in the address of the forwarding table but the interface mapped to the first address is not the first interface.
可选地,本申请实施例中,在确定出第一报文为合法报文的情况下,第一节点可以进一步根据转发表转发该第一报文。在确定出第一报文为非法报文的情况下,第一节点可以丢弃该第一报文,不再进行转发。Optionally, in the embodiment of the present application, when the first message is determined to be a legitimate message, the first node may further forward the first message according to the forwarding table. When the first message is determined to be an illegal message, the first node may discard the first message and no longer forward it.
作为另一种可能的实现方式,如图9所示,步骤603具体可以包括如下步骤:As another possible implementation, as shown in FIG. 9 , step 603 may specifically include the following steps:
步骤6031b、第一节点根据转发表对第一报文进行验证。Step 6031b: The first node verifies the first message according to the forwarding table.
步骤6032b、第一节点在第一报文通过转发表的验证的情况下,确定第一报文为合法报文。Step 6032b: When the first message passes the verification of the forwarding table, the first node determines that the first message is a legal message.
可选地,第一报文通过转发表的验证的条件可以参考步骤6034a中的描述,此处不再赘述。Optionally, the condition for the first message to pass the verification of the forwarding table can refer to the description in step 6034a, which will not be repeated here.
步骤6033b、第一节点在第一报文未通过转发表的验证的情况下,根据独立验证表对第一报文进行验证。Step 6033b: When the first message fails to pass the verification of the forwarding table, the first node verifies the first message according to the independent verification table.
步骤6034b、第一节点在第一报文通过独立验证表的验证的情况下,确定第一报文为合法报文。Step 6034b: When the first message passes the verification of the independent verification table, the first node determines that the first message is a legal message.
应理解,步骤6033b是执行步骤6034b的前提。因此,步骤6034b的实质为:第一节点可以在第一报文未通过转发表的验证,但第一报文通过独立验证表的验证的情况下,确定第一报文为合法报文。It should be understood that step 6033b is a prerequisite for executing step 6034b. Therefore, the essence of step 6034b is: the first node can determine that the first message is a legitimate message when the first message fails to pass the verification of the forwarding table but passes the verification of the independent verification table.
可选地,第一节点可以在第一报文未通过转发表的验证,且第一报文也未通过独立验证表的验证的情况下,确定第一报文为非法报文。Optionally, the first node may determine that the first message is an illegal message when the first message fails to pass the verification of the forwarding table and the first message also fails to pass the verification of the independent verification table.
可选地,第一报文通过独立验证表的验证的条件可以参考步骤6032a中的描述,此处不再赘述。Optionally, the conditions for the first message to pass the verification of the independent verification table can refer to the description in step 6032a, which will not be repeated here.
基于上述步骤6031a至步骤6034a的方案,第一节点可以先根据独立验证表对第一报文进行验证,在独立验证表的地址中不包括第一报文的源地址的情况下,第一节点可以再根据转发表进行二次验证。基于上述步骤6031b至步骤6034b的方案,第一节点可以先根据转发表对第一报文进行验证,在第一报文未通过转发表的验证的情况下,那么第一节点再根据独立验证表进行二次验证。可以看出,独立验证表和转发表的规则可以互相补充,共同实现对第一报文的源地址验证。Based on the scheme of steps 6031a to 6034a above, the first node may first verify the first message according to the independent verification table. If the source address of the first message is not included in the address of the independent verification table, the first node may perform a second verification according to the forwarding table. Based on the scheme of steps 6031b to 6034b above, the first node may first verify the first message according to the forwarding table. If the first message fails the verification of the forwarding table, the first node may perform a second verification according to the independent verification table. It can be seen that the rules of the independent verification table and the forwarding table can complement each other and jointly realize the verification of the source address of the first message.
应理解的是,独立验证表中包括的映射关系和转发表中包括的映射关系组成的集合,包括了源地址验证表的全部映射关系。上述步骤6031a至步骤6034a的方案或步骤6031b至步骤6034b的方案,可以等价于使用了源地址验证表对报文进行验证,从而能够达到使用源地址验证表进行源地址验证相同或相近的效果。该方法可以消除uRPF技术产生的假阳性的问题。It should be understood that the set of mapping relationships included in the independent verification table and the mapping relationships included in the forwarding table includes all mapping relationships in the source address verification table. The above-mentioned scheme of steps 6031a to 6034a or the scheme of steps 6031b to 6034b can be equivalent to using the source address verification table to verify the message, thereby achieving the same or similar effect of using the source address verification table to perform source address verification. This method can eliminate the false positive problem caused by uRPF technology.
可选地,第三类映射关系中的地址前缀可以均包括在第二类映射关系中,上述步骤6031a至步骤 6034a的方案,还可以减少甚至避免假阴性的问题。Optionally, the address prefixes in the third type of mapping relationship may all be included in the second type of mapping relationship, and the above steps 6031a to step 6031b may be repeated. The 6034a scheme can also reduce or even avoid the problem of false negatives.
此外,由于第一节点根据独立验证表和转发表进行源地址验证,因此第一节点的数据面的表空间存储的是独立验证表和转发表。独立验证表包括的是源地址验证表中除第一类映射关系之外的其他映射关系,而源地址验证表中除第一类映射关系之外的其他映射关系是占极少数的,因此独立验证表所需的表空间是极小的。In addition, since the first node performs source address verification based on the independent verification table and the forwarding table, the table space of the data plane of the first node stores the independent verification table and the forwarding table. The independent verification table includes other mapping relationships in the source address verification table except the first type of mapping relationship, and the other mapping relationships in the source address verification table except the first type of mapping relationship account for a very small number, so the table space required for the independent verification table is very small.
示例地,图10示出了一种数据面表空间存储源地址验证表和独立验证表的比对示意图。如图10所示,独立验证表占用的表空间远小于源地址验证表占用的表空间,从而数据面的表空间可以存储的转发表就更大了。For example, Figure 10 shows a comparison diagram of a data plane table space storing a source address verification table and an independent verification table. As shown in Figure 10, the table space occupied by the independent verification table is much smaller than the table space occupied by the source address verification table, so the forwarding table that can be stored in the data plane table space is larger.
综上,本申请实施例提供的源地址验证方法既可以达到采用源地址验证表进行源地址验证相同或相近的效果,又可以极大地减少用于源地址验证的规则/表项所需要占用的表空间。从而可以提高节点的性能,降低节点的成本。In summary, the source address verification method provided in the embodiment of the present application can achieve the same or similar effect as using a source address verification table to perform source address verification, and can also greatly reduce the table space required for the rules/table items used for source address verification, thereby improving the performance of the node and reducing the cost of the node.
另外,由于第一节点进行源地址验证复用的是转发表,那么在路由信息更新导致转发表更新时,意味着用于进行源地址验证的第一类映射关系也同步进行了更新,节点的信息更新速率也提高了,提升了收敛性能。In addition, since the first node reuses the forwarding table for source address verification, when the routing information is updated and the forwarding table is updated, it means that the first type of mapping relationship used for source address verification is also updated synchronously, and the node information update rate is also increased, thereby improving the convergence performance.
可选地,在第一节点基于转发表进行源地址验证的情况下,第一节点使用的技术可以为uRPF技术,在此统一说明。Optionally, when the first node performs source address verification based on the forwarding table, the technology used by the first node may be uRPF technology, which is uniformly described here.
作为一种可能的实现方式,独立验证表可以配置在ACL中。应理解,由于独立验证表中的规则较少,因此ACL的空间是够用的。复用ACL空间可以节约第一节点的数据面的表空间。As a possible implementation, the independent verification table can be configured in the ACL. It should be understood that since there are fewer rules in the independent verification table, the space of the ACL is sufficient. Reusing the ACL space can save the table space of the data plane of the first node.
作为另一种可能的实现方式,独立验证表也可以与转发表配置在相同的表空间中,例如配置在转发芯片中。由于本申请实施例中的独立验证表所需的表空间极小,因此不会对转发表造成太大的影响。As another possible implementation, the independent verification table can also be configured in the same table space as the forwarding table, for example, configured in the forwarding chip. Since the table space required by the independent verification table in the embodiment of the present application is extremely small, it will not have much impact on the forwarding table.
作为又一种可能的实现方式,独立验证表也可以配置在单独的表空间中,例如配置在第一节点的独立芯片中。由于本申请实施例中的独立验证表所需的表空间极小,因此在第一节点中增加独立芯片的成本也不高。As another possible implementation, the independent verification table can also be configured in a separate table space, such as in an independent chip of the first node. Since the table space required for the independent verification table in the embodiment of the present application is extremely small, the cost of adding an independent chip in the first node is not high.
作为一种可能的示例,假设在第一节点的源地址验证表和转发表中,第一类映射关系、第二类映射关系和第三类映射关系的比例为8:1:1。那么,在第一节点采用本申请提供的源地址验证方法的情况下,第一节点的数据面的表空间的开销将降低88.9%。As a possible example, assuming that in the source address verification table and forwarding table of the first node, the ratio of the first type of mapping relationship, the second type of mapping relationship, and the third type of mapping relationship is 8:1:1. Then, when the first node adopts the source address verification method provided by the present application, the overhead of the table space of the data plane of the first node will be reduced by 88.9%.
如果第一节点采用上述步骤6031a至步骤6034a的方案,将会有90%的流量进行两次验证。假设相比进行一次验证,进行两次验证时单条流量会降低6%的转发性能。那么,方案整体会降低5.4%的转发性能。不过,第一节点用5.4%的性能损失换的88.9%表空间开销是有利的。并且,该方案还可以消除假阳性和假阴性情况。If the first node adopts the solution of steps 6031a to 6034a above, 90% of the traffic will be verified twice. Assume that the forwarding performance of a single traffic will be reduced by 6% when it is verified twice compared to one time. Then, the overall forwarding performance of the solution will be reduced by 5.4%. However, the 88.9% table space overhead in exchange for the 5.4% performance loss of the first node is beneficial. In addition, the solution can also eliminate false positives and false negatives.
如果第一节点采用上述步骤6031b至步骤6034b的方案,将会有11.1%的流量进行两次验证。假设相比进行一次验证,进行两次验证时单条流量会降低6%的转发性能。那么,方案整体会降低0.6%的转发性能。第一节点使用0.6%的性能损失换的88.9%表空间开销是十分有利的。该方案会消除假阳性问题,但会存在假阴性问题(占流量总数的10%)。该方案适用于重点关注假阳性问题的场景。If the first node adopts the solution of steps 6031b to 6034b above, 11.1% of the traffic will be verified twice. Assume that the forwarding performance of a single traffic will be reduced by 6% when it is verified twice compared to one verification. Then, the overall forwarding performance of the solution will be reduced by 0.6%. It is very beneficial for the first node to use 0.6% performance loss in exchange for 88.9% table space overhead. This solution will eliminate the false positive problem, but there will be false negative problems (accounting for 10% of the total traffic). This solution is suitable for scenarios where false positive problems are the focus.
基于上述示例可知,本申请的方案可以用少量的性能损耗来换取较大的表空间开销,可以有效降低源地址验证对数据面的表空间的占用。Based on the above examples, it can be seen that the solution of the present application can exchange a small amount of performance loss for a larger table space overhead, which can effectively reduce the table space occupied by the data plane by source address verification.
可选地,在本申请实施例中,第一节点处理行为均在控制面实现,第一节点得到的独立验证表和转发表会配置到数据面的表空间中。第一节点在接收报文后进行源地址验证和转发,也是在数据面进行的。Optionally, in the embodiment of the present application, the first node processing behavior is implemented on the control plane, and the independent verification table and forwarding table obtained by the first node are configured in the table space of the data plane. The first node performs source address verification and forwarding after receiving the message, which is also performed on the data plane.
可选地,本申请实施例中的上述源地址验证方法可以由通信装置执行,该通信装置可以为上述方法实施例中的第一节点,或者包含上述第一节点的装置,或者为可用于第一节点的部件。可以理解的是,该通信装置为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Optionally, the above-mentioned source address verification method in the embodiment of the present application can be performed by a communication device, which can be the first node in the above-mentioned method embodiment, or a device including the above-mentioned first node, or a component that can be used for the first node. It is understandable that, in order to realize the above-mentioned functions, the communication device includes a hardware structure and/or software module corresponding to each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
本申请实施例可以根据上述方法实施例中对通信装置进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的 划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application may divide the functional modules of the communication device according to the above method embodiment. For example, each functional module may be divided according to each function, or two or more functions may be integrated into one processing module. The above integrated modules may be implemented in the form of hardware or software functional modules. It should be noted that the modules in the embodiment of the present application are not necessarily divided into functional modules. The division is schematic and is only a logical function division. There may be other division methods in actual implementation.
图11示出了一种通信装置110的结构示意图,该通信装置110可以为上述方法实施例中的第一节点。该通信装置110包括源地址验证表获取模块1101、转发表获取模块1102、独立验证表生成模块1103和报文验证模块1104。11 shows a schematic diagram of the structure of a communication device 110 , which may be the first node in the above method embodiment. The communication device 110 includes a source address verification table acquisition module 1101 , a forwarding table acquisition module 1102 , an independent verification table generation module 1103 and a message verification module 1104 .
其中,源地址验证表获取模块1101,可以用于获取源地址验证表,源地址验证表包括至少一个报文的源地址和报文入接口的映射关系。转发表获取模块1102,可以用于获取转发表,转发表包括至少一个报文的目的地址和报文的转发出接口的映射关系。独立验证表生成模块1103,可以用于根据源地址验证表和转发表生成独立验证表,独立验证表包括源地址验证表中除第一类映射关系之外的其他映射关系,其中,第一类映射关系包括转发表与源地址验证表中相同的映射关系。报文验证模块1104,可以用于在接收到的第一报文通过独立验证表的验证和/或转发表的验证的情况下,确定第一报文为合法报文。Among them, the source address verification table acquisition module 1101 can be used to obtain the source address verification table, the source address verification table includes the mapping relationship between the source address of at least one message and the message input interface. The forwarding table acquisition module 1102 can be used to obtain the forwarding table, the forwarding table includes the mapping relationship between the destination address of at least one message and the message forwarding interface. The independent verification table generation module 1103 can be used to generate an independent verification table based on the source address verification table and the forwarding table, the independent verification table includes other mapping relationships in the source address verification table except the first type of mapping relationship, wherein the first type of mapping relationship includes the same mapping relationship in the forwarding table and the source address verification table. The message verification module 1104 can be used to determine that the first message is a legal message when the received first message passes the verification of the independent verification table and/or the verification of the forwarding table.
可选地,转发表获取模块1102,可以用于根据路由协议或静态配置获得路由信息,进而再根据路由信息生成转发表。Optionally, the forwarding table acquisition module 1102 may be configured to obtain routing information according to a routing protocol or static configuration, and then generate a forwarding table according to the routing information.
可选地,报文验证模块1104,具体可以用于:根据独立验证表对第一报文进行验证。在第一报文通过独立验证表的验证的情况下,确定第一报文为合法报文。或者,在独立验证表的地址中不存在第一报文的源地址的情况下,根据转发表对第一报文进行验证。并且,在第一报文通过转发表的验证的情况下,确定第一报文为合法报文。Optionally, the message verification module 1104 can be specifically used to: verify the first message according to the independent verification table. If the first message passes the verification of the independent verification table, the first message is determined to be a legal message. Alternatively, if the source address of the first message does not exist in the address of the independent verification table, the first message is verified according to the forwarding table. And, if the first message passes the verification of the forwarding table, the first message is determined to be a legal message.
可选地,报文验证模块1104,具体可以用于:根据转发表对第一报文进行验证。在第一报文通过转发表的验证的情况下,确定第一报文为合法报文。或者,在第一报文未通过转发表的验证的情况下,根据独立验证表对第一报文进行验证。并且,在第一报文通过独立验证表的验证的情况下,确定第一报文为合法报文。Optionally, the message verification module 1104 can be specifically used to: verify the first message according to the forwarding table. If the first message passes the verification of the forwarding table, determine that the first message is a legal message. Alternatively, if the first message fails to pass the verification of the forwarding table, verify the first message according to the independent verification table. And, if the first message passes the verification of the independent verification table, determine that the first message is a legal message.
可选地,第一报文的源地址为第一地址,第一报文的入接口为第一接口。报文验证模块1104,还可以用于:在独立验证表的地址中不存在第一地址或者独立验证表存在第一地址和第一接口的映射关系的情况下,确定第一报文通过独立验证表的验证。在独立验证表的地址中存在第一地址,但第一地址映射的接口不是第一接口的情况下,确定第一报文未通过独立验证表的验证。Optionally, the source address of the first message is the first address, and the input interface of the first message is the first interface. The message verification module 1104 can also be used to: determine that the first message passes the verification of the independent verification table when the first address does not exist in the address of the independent verification table or the independent verification table has a mapping relationship between the first address and the first interface. When the first address exists in the address of the independent verification table, but the interface mapped to the first address is not the first interface, determine that the first message does not pass the verification of the independent verification table.
可选地,第一报文的源地址为第一地址,第一报文的入接口为第一接口。报文验证模块1104,还可以用于:在转发表的地址中不存在第一地址或者转发表存在第一地址和第一接口的映射关系的情况下,确定第一报文通过转发表的验证。在转发表的地址中存在第一地址,但第一地址映射的接口不是第一接口的情况下,确定第一报文未通过转发表的验证。Optionally, the source address of the first message is the first address, and the input interface of the first message is the first interface. The message verification module 1104 can also be used to: determine that the first message passes the verification of the forwarding table when the first address does not exist in the address of the forwarding table or the forwarding table has a mapping relationship between the first address and the first interface. Determine that the first message does not pass the verification of the forwarding table when the first address exists in the address of the forwarding table, but the interface mapped to the first address is not the first interface.
可以理解的是,通信装置的功能模块是可以根据实际情况划分的,上述源地址验证表获取模块1101和转发表获取模块1102的功能可以由一个收发模块实现,独立验证表生成模块1103和报文验证模块1104的功能可以由一个处理模块实现。从而,通信装置的结构可以如图12所示,该通信装置120可以包括收发模块1201和处理模块1202。It can be understood that the functional modules of the communication device can be divided according to actual conditions. The functions of the source address verification table acquisition module 1101 and the forwarding table acquisition module 1102 can be implemented by a transceiver module, and the functions of the independent verification table generation module 1103 and the message verification module 1104 can be implemented by a processing module. Therefore, the structure of the communication device can be shown in Figure 12, and the communication device 120 can include a transceiver module 1201 and a processing module 1202.
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。由于本实施例提供的通信装置110或通信装置120可执行上述源地址验证方法,因此其所能获得的技术效果可参考上述方法实施例,在此不再赘述。It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here. Since the communication device 110 or the communication device 120 provided in this embodiment can execute the above source address verification method, the technical effects that can be obtained can refer to the above method embodiment, which will not be repeated here.
在本实施例中,通信装置110或通信装置120以采用集成的方式划分各个功能模块的形式来呈现。这里的“模块”可以指特定ASIC,电路,执行一个或多个软件或固件程序的处理器和存储器,集成逻辑电路,和/或其他可以提供上述功能的器件。在一个简单的实施例中,本领域的技术人员可以想到该通信装置110或通信装置120可以采用图13所示的通信装置130的形式。In this embodiment, the communication device 110 or the communication device 120 is presented in the form of dividing each functional module in an integrated manner. The "module" here may refer to a specific ASIC, a circuit, a processor and a memory that executes one or more software or firmware programs, an integrated logic circuit, and/or other devices that can provide the above functions. In a simple embodiment, those skilled in the art can imagine that the communication device 110 or the communication device 120 can take the form of the communication device 130 shown in Figure 13.
图13为本申请实施例提供的一种通信装置的结构示意图,如图13所示,该通信装置130包括一个或多个处理器1301,通信线路1302,以及至少一个通信接口(图13中仅是示例性的以包括通信接口1303,以及一个处理器1301为例进行说明)。可选地,还可以包括存储器1304。FIG13 is a schematic diagram of the structure of a communication device provided in an embodiment of the present application. As shown in FIG13 , the communication device 130 includes one or more processors 1301, a communication line 1302, and at least one communication interface (FIG13 is only exemplary and takes a communication interface 1303 and a processor 1301 as an example for explanation). Optionally, a memory 1304 may also be included.
处理器1301可以是一个通用中央处理器(central processing unit,CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。Processor 1301 can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.
通信线路1302可包括一通路,用于不同组件之间的通信。The communication line 1302 may include a pathway for communication between different components.
通信接口1303,可以是收发模块用于与其他设备或通信网络通信,如以太网,RAN,无线局域网(wireless local area networks,WLAN)等。例如,所述收发模块可以是收发器、收发机一类的装置。可选的,所述通信接口1303也可以是位于处理器1301内的收发电路,用以实现处理器的信号输入和信号输出。 The communication interface 1303 may be a transceiver module for communicating with other devices or communication networks, such as Ethernet, RAN, wireless local area networks (WLAN), etc. For example, the transceiver module may be a device such as a transceiver or a transceiver. Optionally, the communication interface 1303 may also be a transceiver circuit located in the processor 1301 to implement signal input and signal output of the processor.
存储器1304可以是具有存储功能的装置。例如可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过通信线路1302与处理器相连接。存储器也可以和处理器集成在一起。The memory 1304 may be a device with a storage function. For example, it may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor through the communication line 1302. The memory may also be integrated with the processor.
其中,存储器1304用于存储执行本申请方案的计算机执行指令,并由处理器1301来控制执行。处理器1301用于执行存储器1304中存储的计算机执行指令,从而实现本申请实施例中提供的空口并发方法。The memory 1304 is used to store computer-executable instructions for executing the solution of the present application, and the execution is controlled by the processor 1301. The processor 1301 is used to execute the computer-executable instructions stored in the memory 1304, thereby implementing the air interface concurrency method provided in the embodiment of the present application.
或者,可选的,本申请实施例中,也可以是处理器1301执行本申请下述实施例提供的空口并发方法中的处理相关的功能,通信接口1303负责与其他设备或通信网络通信,本申请实施例对此不作具体限定。Alternatively, optionally, in an embodiment of the present application, the processor 1301 may also perform processing-related functions in the air interface concurrency method provided in the following embodiments of the present application, and the communication interface 1303 is responsible for communicating with other devices or communication networks, which is not specifically limited in the embodiments of the present application.
可选的,本申请实施例中的计算机执行指令也可以称之为应用程序代码,本申请实施例对此不作具体限定。Optionally, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, which is not specifically limited in the embodiments of the present application.
在具体实现中,作为一种实施例,处理器1301可以包括一个或多个CPU,例如图13中的CPU0和CPU1。In a specific implementation, as an embodiment, the processor 1301 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 13 .
在具体实现中,作为一种实施例,通信装置130可以包括多个处理器,例如图13中的处理器1301和处理器1307。这些处理器中的每一个可以是一个单核(single-core)处理器,也可以是一个多核(multi-core)处理器。这里的处理器可以包括但不限于以下至少一种:中央处理单元(central processing unit,CPU)、微处理器、数字信号处理器(digital signal processor,DSP)、微控制器(microcontroller unit,MCU)、或人工智能处理器等各类运行软件的计算设备,每种计算设备可包括一个或多个用于执行软件指令以进行运算或处理的核。In a specific implementation, as an embodiment, the communication device 130 may include multiple processors, such as the processor 1301 and the processor 1307 in FIG. 13 . Each of these processors may be a single-core processor or a multi-core processor. The processors here may include but are not limited to at least one of the following: a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a microcontroller (MCU), or an artificial intelligence processor and other types of computing devices running software, each of which may include one or more cores for executing software instructions to perform calculations or processing.
在具体实现中,作为一种实施例,通信装置130还可以包括输出设备1305和输入设备1306。输出设备1305和处理器1301通信,可以以多种方式来显示信息。例如,输出设备1305可以是液晶显示器(liquid crystal display,LCD),发光二极管(light emitting diode,LED)显示设备,阴极射线管(cathode ray tube,CRT)显示设备,或投影仪(projector)等。输入设备1306和处理器1301通信,可以以多种方式接收用户的输入。例如,输入设备1306可以是鼠标、键盘、触摸屏设备或传感设备等。In a specific implementation, as an embodiment, the communication device 130 may also include an output device 1305 and an input device 1306. The output device 1305 communicates with the processor 1301 and may display information in a variety of ways. For example, the output device 1305 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device 1306 communicates with the processor 1301 and may receive user input in a variety of ways. For example, the input device 1306 may be a mouse, a keyboard, a touch screen device, or a sensor device.
上述的通信装置130有时也可以称为通信设备,其可以是一个通用设备或者是一个专用设备。例如通信装置130可以是路由器、交换机、网关等网络设备、或者终端设备、或者网络中的控制器、或具有图13中类似结构的设备。本申请实施例不限定通信装置130的类型。The above-mentioned communication device 130 may sometimes also be referred to as a communication device, which may be a general device or a dedicated device. For example, the communication device 130 may be a network device such as a router, a switch, a gateway, or a terminal device, or a controller in a network, or a device having a similar structure as shown in FIG. 13. The embodiment of the present application does not limit the type of the communication device 130.
图13所示的通信装置130中的处理器1301可以通过调用存储器1304中存储的计算机执行指令,使得通信装置130执行上述方法实施例中的源地址验证方法。The processor 1301 in the communication device 130 shown in FIG. 13 can call the computer-executable instructions stored in the memory 1304 to enable the communication device 130 to execute the source address verification method in the above method embodiment.
由于本实施例提供的通信装置130可执行上述源地址验证方法,因此其所能获得的技术效果可参考上述方法实施例,在此不再赘述。Since the communication device 130 provided in this embodiment can execute the above-mentioned source address verification method, the technical effects that can be obtained can refer to the above-mentioned method embodiment and will not be repeated here.
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、设备和方法,可以通过其它的方式实现。例如,以上所描述的设备实施例仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或 者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physically separate. The unit may not be a physical unit, that is, it may be located in one place, or it may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式来实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或者数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可以用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带),光介质(例如数码影碟(digital versatile disc,DVD))、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or may contain one or more servers, data centers and other data storage devices that can be integrated with the medium. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.
如本申请所使用的,术语“组件”、“模块”、“系统”等等旨在指代计算机相关实体,该计算机相关实体可以是硬件、固件、硬件和软件的结合、软件或者运行中的软件。例如,组件可以是,但不限于是:在处理器上运行的处理、处理器、对象、可执行文件、执行中的线程、程序和/或计算机。作为示例,在计算设备上运行的应用和该计算设备都可以是组件。一个或多个组件可以存在于执行中的过程和/或线程中,并且组件可以位于一个计算机中以及/或者分布在两个或更多个计算机之间。此外,这些组件能够从在其上具有各种数据结构的各种计算机可读介质中执行。这些组件可以通过诸如根据具有一个或多个数据分组(例如,来自一个组件的数据,该组件与本地系统、分布式系统中的另一个组件进行交互和/或以信号的方式通过诸如互联网之类的网络与其它系统进行交互)的信号,以本地和/或远程过程的方式进行通信。As used in this application, the terms "component", "module", "system", etc. are intended to refer to a computer-related entity, which can be hardware, firmware, a combination of hardware and software, software, or software in operation. For example, a component can be, but is not limited to: a process running on a processor, a processor, an object, an executable file, a thread in execution, a program, and/or a computer. As an example, an application running on a computing device and the computing device can both be components. One or more components can exist in a process and/or thread in execution, and a component can be located in a computer and/or distributed between two or more computers. In addition, these components can be executed from various computer-readable media with various data structures thereon. These components can communicate in a local and/or remote process manner, such as according to a signal with one or more data packets (for example, data from a component, which interacts with another component in a local system, a distributed system, and/or interacts with other systems in a signal manner through a network such as the Internet).
本申请围绕可包括多个设备、组件、模块等的系统来呈现各个方面、实施例或特征。应当理解和明白的是,各个系统可以包括另外的设备、组件、模块等,并且/或者可以并不包括结合附图讨论的所有设备、组件、模块等。此外,还可以使用这些方案的组合。The present application presents various aspects, embodiments, or features around a system that may include multiple devices, components, modules, etc. It should be understood and appreciated that each system may include additional devices, components, modules, etc., and/or may not include all of the devices, components, modules, etc. discussed in conjunction with the figures. In addition, combinations of these schemes may also be used.
另外,在本申请实施例中,“示例的”一词用于表示作例子、例证或说明。本申请中被描述为“示例”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用示例的一词旨在以具体方式呈现概念。In addition, in the embodiments of the present application, the word "exemplary" is used to indicate an example, illustration or description. Any embodiment or design described as "exemplary" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the word "exemplary" is used to present concepts in a concrete way.
本申请实施例中,信息(information),信号(signal),消息(message),信道(channel)有时可以混用,应当指出的是,在不强调其区别时,其所要表达的含义是一致的。“的(of)”,“相应的(corresponding,relevant)”和“对应的(corresponding)”有时可以混用,应当指出的是,在不强调其区别时,其所要表达的含义是一致的。“系统”和“网络”有时可以混用,在不强调其区别时,其所要表达的含义是一致的,比如,“通信网络”也即是指“通信系统”。In the embodiments of the present application, information, signal, message, and channel can sometimes be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings they intend to express are consistent. "Of," "corresponding," and "corresponding" can sometimes be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings they intend to express are consistent. "System" and "network" can sometimes be used interchangeably. When the distinction between them is not emphasized, the meanings they intend to express are consistent. For example, "communication network" also refers to "communication system."
本申请实施例描述的网络架构以及业务场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着网络架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。The network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. A person of ordinary skill in the art can appreciate that with the evolution of the network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。 The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims (8)

  1. 一种源地址验证方法,其特征在于,所述方法包括:A source address verification method, characterized in that the method comprises:
    获取源地址验证表和转发表,所述源地址验证表包括至少一个报文的源地址和报文入接口的映射关系,所述转发表包括至少一个报文的目的地址和报文的转发出接口的映射关系;Obtain a source address verification table and a forwarding table, wherein the source address verification table includes a mapping relationship between a source address of at least one message and a message input interface, and the forwarding table includes a mapping relationship between a destination address of at least one message and a message forwarding interface;
    根据所述源地址验证表和所述转发表生成独立验证表,所述独立验证表包括所述源地址验证表中除第一类映射关系之外的其他映射关系,其中,所述第一类映射关系包括所述转发表与所述源地址验证表中相同的映射关系;Generate an independent verification table according to the source address verification table and the forwarding table, wherein the independent verification table includes other mapping relationships in the source address verification table except the first type of mapping relationship, wherein the first type of mapping relationship includes the same mapping relationship in the forwarding table as in the source address verification table;
    在接收到的第一报文通过所述独立验证表的验证和/或所述转发表的验证的情况下,确定所述第一报文为合法报文。When the received first message passes the verification of the independent verification table and/or the verification of the forwarding table, it is determined that the first message is a legal message.
  2. 根据权利要求1所述的方法,其特征在于,所述在接收到的第一报文通过所述独立验证表的验证和/或所述转发表的验证的情况下,确定所述第一报文为合法报文,包括:The method according to claim 1 is characterized in that, when the received first message passes the verification of the independent verification table and/or the verification of the forwarding table, determining that the first message is a legitimate message comprises:
    根据所述独立验证表对所述第一报文进行验证;Verifying the first message according to the independent verification table;
    在所述第一报文通过所述独立验证表的验证的情况下,确定所述第一报文为合法报文;If the first message passes the verification of the independent verification table, determining that the first message is a legitimate message;
    或者,在所述独立验证表的地址中不存在所述第一报文的源地址的情况下,根据所述转发表对所述第一报文进行验证;or, in the case where the source address of the first message does not exist in the addresses of the independent verification table, verifying the first message according to the forwarding table;
    在所述第一报文通过所述转发表的验证的情况下,确定所述第一报文为合法报文。When the first message passes the verification of the forwarding table, it is determined that the first message is a legal message.
  3. 根据权利要求1或2所述的方法,其特征在于,所述在接收到的第一报文通过所述独立验证表的验证和/或所述转发表的验证的情况下,确定所述第一报文为合法报文,包括:The method according to claim 1 or 2, characterized in that, when the received first message passes the verification of the independent verification table and/or the verification of the forwarding table, determining that the first message is a legitimate message comprises:
    根据所述转发表对所述第一报文进行验证;Verifying the first message according to the forwarding table;
    在所述第一报文通过所述转发表的验证的情况下,确定所述第一报文为合法报文;When the first message passes the verification of the forwarding table, determining that the first message is a legitimate message;
    或者,在所述第一报文未通过所述转发表的验证的情况下,根据所述独立验证表对所述第一报文进行验证;or, in the case where the first message fails to pass the verification of the forwarding table, verifying the first message according to the independent verification table;
    在所述第一报文通过所述独立验证表的验证的情况下,确定所述第一报文为合法报文。When the first message passes the verification of the independent verification table, it is determined that the first message is a legal message.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述第一报文的源地址为第一地址,所述第一报文的入接口为第一接口;所述方法还包括:The method according to any one of claims 1 to 3, characterized in that the source address of the first message is a first address, and the input interface of the first message is a first interface; the method further comprises:
    在所述独立验证表的地址中不存在所述第一地址或者所述独立验证表存在所述第一地址和所述第一接口的映射关系的情况下,确定所述第一报文通过所述独立验证表的验证;When the first address does not exist in the addresses of the independent verification table or the independent verification table contains a mapping relationship between the first address and the first interface, determining that the first message passes the verification of the independent verification table;
    在所述独立验证表的地址中存在所述第一地址,但所述第一地址映射的接口不是所述第一接口的情况下,确定所述第一报文未通过所述独立验证表的验证。When the first address exists in the addresses of the independent verification table but the interface mapped to the first address is not the first interface, it is determined that the first message fails to pass the verification of the independent verification table.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述第一报文的源地址为第一地址,所述第一报文的入接口为第一接口;所述方法还包括:The method according to any one of claims 1 to 4, characterized in that the source address of the first message is a first address, and the input interface of the first message is a first interface; the method further comprises:
    在所述转发表的地址中不存在所述第一地址或者所述转发表存在所述第一地址和所述第一接口的映射关系的情况下,确定所述第一报文通过所述转发表的验证;When the first address does not exist in the addresses of the forwarding table or a mapping relationship between the first address and the first interface exists in the forwarding table, determining that the first message passes the verification of the forwarding table;
    在所述转发表的地址中存在所述第一地址,但所述第一地址映射的接口不是所述第一接口的情况下,确定所述第一报文未通过所述转发表的验证。When the first address exists in the addresses of the forwarding table but the interface mapped to the first address is not the first interface, it is determined that the first message fails to pass the verification of the forwarding table.
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述独立验证表配置在访问控制列表ACL中,或者所述独立验证表与所述转发表配置在相同的表空间中,或者所述独立验证表配置在单独的表空间中。The method according to any one of claims 1-5 is characterized in that the independent verification table is configured in an access control list ACL, or the independent verification table and the forwarding table are configured in the same table space, or the independent verification table is configured in a separate table space.
  7. 一种通信装置,其特征在于,所述通信装置包括:处理器和存储器;A communication device, characterized in that the communication device comprises: a processor and a memory;
    所述存储器用于存储计算机执行指令,当所述处理器执行所述计算机执行指令时,以使所述通信装置执行如权利要求1-6任一项所述的方法。The memory is used to store computer-executable instructions. When the processor executes the computer-executable instructions, the communication device executes the method according to any one of claims 1 to 6.
  8. 一种计算机可读存储介质,其特征在于,其上存储有计算机程序,当所述计算机程序被计算机执行时使得所述计算机执行如权利要求1-6中任一项所述的方法。 A computer-readable storage medium, characterized in that a computer program is stored thereon, and when the computer program is executed by a computer, the computer is caused to execute the method according to any one of claims 1 to 6.
PCT/CN2023/136556 2023-02-10 2023-12-05 Source address validation method, and communication apparatus and system WO2024164678A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202310152020.X 2023-02-10
CN202310152020.XA CN118487785A (en) 2023-02-10 2023-02-10 Source address verification method, communication device and system

Publications (1)

Publication Number Publication Date
WO2024164678A1 true WO2024164678A1 (en) 2024-08-15

Family

ID=92192613

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/136556 WO2024164678A1 (en) 2023-02-10 2023-12-05 Source address validation method, and communication apparatus and system

Country Status (2)

Country Link
CN (1) CN118487785A (en)
WO (1) WO2024164678A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101917434A (en) * 2010-08-18 2010-12-15 清华大学 Method for verifying intra-domain Internet protocol (IP) source address
CN101945117A (en) * 2010-09-28 2011-01-12 杭州华三通信技术有限公司 Method and equipment for preventing source address spoofing attack
CN111200611A (en) * 2020-01-06 2020-05-26 清华大学 Method and device for verifying intra-domain source address based on boundary interface equivalence class
WO2021043181A1 (en) * 2019-09-02 2021-03-11 华为技术有限公司 Data transmission method and device
CN112929269A (en) * 2021-03-09 2021-06-08 清华大学 Distributed generation method and device for source address verification table between internet domains
WO2021238746A1 (en) * 2020-05-25 2021-12-02 华为技术有限公司 Network system and packet transmission method therein, and related apparatus

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101917434A (en) * 2010-08-18 2010-12-15 清华大学 Method for verifying intra-domain Internet protocol (IP) source address
CN101945117A (en) * 2010-09-28 2011-01-12 杭州华三通信技术有限公司 Method and equipment for preventing source address spoofing attack
WO2021043181A1 (en) * 2019-09-02 2021-03-11 华为技术有限公司 Data transmission method and device
CN111200611A (en) * 2020-01-06 2020-05-26 清华大学 Method and device for verifying intra-domain source address based on boundary interface equivalence class
WO2021238746A1 (en) * 2020-05-25 2021-12-02 华为技术有限公司 Network system and packet transmission method therein, and related apparatus
CN112929269A (en) * 2021-03-09 2021-06-08 清华大学 Distributed generation method and device for source address verification table between internet domains

Also Published As

Publication number Publication date
CN118487785A (en) 2024-08-13

Similar Documents

Publication Publication Date Title
KR102318338B1 (en) System and method for providing an integrated firewall for secure network communication in a multi-tenant environment
US8913613B2 (en) Method and system for classification and management of inter-blade network traffic in a blade server
US7558266B2 (en) System and method for restricting network access using forwarding databases
US9025495B1 (en) Flexible routing engine for a PCI express switch and method of use
US8625448B2 (en) Method and system for validating network traffic classification in a blade server
US9602428B2 (en) Method and apparatus for locality sensitive hash-based load balancing
CN102263774B (en) Method and device for processing source role information
US8615015B1 (en) Apparatus, systems and methods for aggregate routes within a communications network
US20150030030A1 (en) Network Adapter Based Zoning Enforcement
WO2021017578A1 (en) Packet sending method, device, and storage medium
US20240259344A1 (en) Node Isolation Method, Switching Device, and Ethernet Storage System
CN108768667B (en) Method for inter-chip network communication of multi-core processor
US7733857B2 (en) Apparatus and method for sharing variables and resources in a multiprocessor routing node
WO2020020249A1 (en) Network management method and apparatus
WO2023040453A1 (en) Transaction information processing method and apparatus
WO2024164678A1 (en) Source address validation method, and communication apparatus and system
WO2018161632A1 (en) Capacity updating method and apparatus for distributed device
WO2022152231A1 (en) Network configuration rule processing method and related device
US10817177B1 (en) Multi-stage counters
WO2020119317A1 (en) Message forwarding method and apparatus, storage medium, and electronic apparatus
WO2022252634A1 (en) Data flow transmission method and apparatus, computer device, and storage medium
US11736400B2 (en) Network traffic engineering with multi-virtual routing and forwarding lookup
WO2022017267A1 (en) Routing management method, apparatus and system
US20220294764A1 (en) Systems and methods for operating a networking device
WO2024174588A1 (en) Forward path determination method and apparatus, electronic device and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23920867

Country of ref document: EP

Kind code of ref document: A1