Packet processing method and apparatus, and related device
By generating flow filtering rules based on autonomous domain identifiers, the method addresses the resource consumption issue of distributing numerous rules across network devices, achieving efficient packet processing and reducing congestion.
Patent Information
- Application Number
- JP2022196008
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2018-08-30
- Filing Date
- 2022-12-08
- Publication Date
- 2024-08-13
- Estimated Expiration
- 2039-08-27
AI Technical Summary
The distribution of a large number of flow filtering rules for network devices consumes significant network and storage resources, particularly in scenarios with numerous network devices, leading to network congestion and inefficiencies.
Generate flow filtering rules based on autonomous domain identifiers, aggregating IP addresses within an autonomous domain, reducing the need for multiple rules by using a single rule for all devices within that domain, and implementing packet processing modes such as discarding, redirecting, or marking packets.
This approach significantly reduces the number of flow filtering rules required, conserving network resources and storage by minimizing the distribution of rules, thereby enhancing network efficiency and reducing congestion.
Smart Images

Figure 0007532484000001 
Figure 0007532484000002 
Figure 0007532484000003
Abstract
Description
[Technical field]
[0001] [CROSS-REFERENCE TO RELATED APPLICATIONS] This application is a continuation of Chinese patent application no. 2018-08-30, filed with the State Intellectual Property Administration of the People's Republic of China (SIA) on August 30, 2018, entitled "Packet processing method and apparatus, and related device." 201811004608.6 No. 6,313,625, filed on Dec. 13, 2003, the contents of which are incorporated herein by reference in their entirety.
[0002] [Technical field] This application relates to the field of network communications, and in particular to a packet processing method and apparatus, and related devices. [Background technology]
[0003] In a network communication process, a packet may be forwarded by a forwarding device such as a router or a switch. For example, after a router receives a packet, the router may search a forwarding information base (FIB) based on information about the packet, such as a source Internet Protocol (IP) address and a destination IP address, to determine next hop information corresponding to the packet, and then forward the packet to a corresponding network device, such as another router, a terminal, or a server. Meanwhile, the forwarding device performs packet forwarding depending on network resources. The network resources include, for example, the bandwidth, buffer space, and processing capacity of the forwarding device. Network congestion may occur when the required network resources exceed the currently available network resources. Therefore, the flow of the forwarding device may be controlled to avoid network congestion.
[0004] To implement flow control, the control device may analyze the flow of the forwarding device to obtain flow filtering rules, and then distribute the flow filtering rules to the forwarding device. The forwarding device processes packets according to the flow filtering rules, for example, redirecting packets or dropping packets to implement flow control. In the conventional manner, the control device configures one flow filtering rule for each pair of network devices that use the forwarding device for communication. When there are a large number of network devices, a large number of flow filtering rules are configured, thereby needing to occupy more network resources for distributing flow filtering rules from the control device to the forwarding devices, and the forwarding devices also occupy a large number of storage resources. Summary of the Invention
[0005] SUMMARY OF THE PRESENT APPLICATIONS Embodiments of the present application provide a packet processing method and apparatus, and related devices, to solve the problem of occupying a large amount of network resources for the distribution of a large number of flow filtering rules.
[0006] One embodiment of this application provides a packet processing method, which is applied to a first device and specifically includes the following steps: the first device first generates a flow filtering rule, and then transmits the flow filtering rule to a second device, the flow filtering rule including a match item and an action item, the match item including an Internet Protocol IP address and an autonomous domain identifier, and the action item is used to instruct the second device to process packets that match the match item based on a packet processing mode indicated by the action item. The first device may be a control device for generating and distributing flow filtering rules, and may be a server, a terminal, or a router, etc. Specifically, a Border Gateway Protocol flow specification server may be set as the first device. The second device may be a forwarding device such as a router, a switch, a bridge, or a gateway.
[0007] That is, in this embodiment of the application, the IP addresses of the network devices in the autonomous domain corresponding to the autonomous domain identifier are aggregated, and a flow filtering rule is generated based on the autonomous domain identifier. For example, when the IP address in the match item is the source IP address of the received packet, the autonomous domain is the autonomous domain to which the device corresponding to the destination address of the received packet belongs, so that only one filtering rule needs to be generated for all of the multiple network devices in the autonomous domain. It is no longer necessary to generate individual filtering rules for each device in the autonomous domain, thereby reducing the number of flow filtering rules generated and reducing the network resources required to distribute the flow filtering rules to the second device.
[0008] Alternatively, the IP address may be a source IP address of the packet. Correspondingly, the autonomous domain identifier is an identifier of an autonomous domain to which a device corresponding to the destination IP address of the packet belongs. Alternatively, the IP address may be a destination IP address of the packet. Correspondingly, the autonomous domain identifier is an identifier of an autonomous domain to which a device corresponding to the source IP address of the packet belongs. The autonomous domain identifier is used to distinguish between different autonomous domains. For example, the autonomous domain identifier of China Telecom may be AS1000, and the autonomous domain identifier of China Mobile may be AS2000.
[0009] Optionally, the autonomous domain identifier is an identifier of an autonomous domain to which the second device belongs. When the second device and the network device corresponding to the source IP address belong to the same autonomous domain, when the flow filtering rule is generated, the autonomous domain identifier of the autonomous domain to which the device corresponding to the source IP address belongs can be obtained by obtaining the autonomous domain identifier of the autonomous domain to which the second device belongs. When the second device and the network device corresponding to the destination IP address belong to the same autonomous domain, the autonomous domain identifier of the autonomous domain to which the second device belongs can also be obtained by obtaining the autonomous domain identifier of the autonomous domain to which the destination IP address belongs.
[0010] An embodiment of this application further provides a packet processing method, which is applied to a second device, and specifically includes the following steps: the second device receives a flow filtering rule sent by a first device, the flow filtering rule includes a match item and an action item, the match item includes an Internet Protocol IP address and an autonomous domain identifier, the second device receives a packet, and determines a routing and forwarding entry based on a first address in the packet, the routing and forwarding entry includes an autonomous domain identifier, and when determining that a second address of the packet matches the IP address in the flow filtering rule and the autonomous domain identifier in the routing and forwarding entry is the same as the autonomous domain identifier in the flow filtering rule, the second device processes the packet based on a packet processing mode indicated by the action item.
[0011] In an embodiment of this application, the IP addresses of the network devices in the autonomous domain corresponding to the autonomous domain identifier are aggregated, and a flow filtering rule is generated based on the autonomous domain identifier. For example, when the IP address in the matched item is the destination IP address of the received packet, the autonomous domain is the autonomous domain to which the device corresponding to the source IP address of the packet belongs, so that only one filtering rule needs to be generated for all of the multiple network devices in the autonomous domain. It is no longer necessary to generate individual filtering rules for each device in the autonomous domain, thereby reducing the number of generated flow filtering rules and greatly reducing the number of filtering rules stored in the second device, thereby saving the storage resources of the second device.
[0012] Alternatively, the first address may be a destination IP address of the packet and the second address may be a source IP address of the packet, or alternatively, the first address may be a source IP address of the packet and the second address may be a destination IP address of the packet.
[0013] Optionally, the packet processing mode indicated by the operation item is: Dropping the packet, redirecting the packet, and marking the packet; Includes one or more of the following:
[0014] Dropping a packet means that the packet is not forwarded and is deleted. Redirecting a packet means changing the next hop information corresponding to the packet to change the packet's forwarding path and control flow in the network. Marking a packet means marking a packet for further processing, such as collecting flow statistics.
[0015] Optionally, the method further comprises: The method further includes generating an access control list according to the flow filtering rule, the access control list storing the IP address, the autonomous domain index, and the action item, the autonomous domain index corresponding to the autonomous domain identifier. Since the access control list can generally store a small number of characters, the autonomous domain index having a small number of characters is stored in the access control list instead of the autonomous domain identifier, and a mapping relationship between the autonomous domain index and the autonomous domain identifier can be established, so that the autonomous domain index can be found later based on the autonomous domain identifier.
[0016] Then, when determining that a second address of the packet matches the IP address in the flow filtering rule and the autonomous domain identifier in the routing and forwarding entry is the same as the autonomous domain identifier in the flow filtering rule, the step of the second device processing the packet based on a packet processing mode indicated by the action item includes:
[0017] The second device includes a step of processing the packet based on the packet processing mode indicated by the action item stored in the access control list when determining that the second address of the packet is the same as the IP address in the access control list and the autonomous domain identifier in the routing and forwarding entry matches the autonomous domain index in the access control list.
[0018] An embodiment of the present application further provides a packet processing apparatus, the apparatus being used in a first device, the apparatus comprising: a rule generation unit configured to generate a flow filtering rule, the flow filtering rule including a match item and an action item, the match item including an Internet Protocol (IP) address and an autonomous domain identifier; and a rule sending unit configured to send the flow filtering rule to a second device, wherein the action item is used to instruct the second device to process packets matching the match item based on a packet processing mode indicated by the action item.
[0019] Optionally, the IP address is a source IP address of the packet, and the autonomous domain identifier is an identifier of an autonomous domain to which a device corresponding to a destination IP address of the packet belongs.
[0020] Optionally, the IP address is a destination IP address of the packet, and the autonomous domain identifier is an identifier of an autonomous domain to which a device corresponding to a source IP address of the packet belongs.
[0021] Optionally, the autonomous domain identifier is an identifier of an autonomous domain to which the second device belongs.
[0022] An embodiment of the present application further provides a packet processing apparatus, the apparatus being used in a second device, A rule receiving unit configured to receive a flow filtering rule sent by a first device, the flow filtering rule including a match item and an action item, the match item including an Internet Protocol (IP) address and an autonomous domain identifier; a packet receiving unit configured to receive a packet and determine a routing and forwarding entry based on a first address in the packet, the routing and forwarding entry including an autonomous domain identifier; a packet processing unit configured to process the packet based on a packet processing mode indicated by the action item when determining that a second address of the packet matches the IP address in the flow filtering rule and the autonomous domain identifier in the routing and forwarding entry is the same as the autonomous domain identifier in the flow filtering rule.
[0023] Optionally, the first address is a destination IP address of the packet and the second address is a source IP address of the packet.
[0024] Optionally, the first address is a source IP address of the packet and the second address is a destination IP address of the packet.
[0025] Optionally, the packet processing mode indicated by the operation item is: Dropping the packet, redirecting the packet, and marking the packet; Includes one or more of the following:
[0026] Optionally, the apparatus comprises: The method further includes: generating an access control list according to the flow filtering rule, the access control list storing the IP address, an autonomous domain index, and the action item, the autonomous domain index corresponding to the autonomous domain identifier; The packet processing unit is configured to process the packet based on the packet processing mode indicated by the action item stored in the access control list, particularly when it determines that the second address of the packet is the same as the IP address in the access control list and the autonomous domain identifier in the routing and forwarding entry matches the autonomous domain index in the access control list.
[0027] An embodiment of the present application further provides a packet processing device, the device being a first device, the first device including a storage unit, a processing unit, and a communication unit; The storage unit is configured to store instructions; the processing unit is configured to execute the instructions in the storage unit to perform the packet processing method as applied to the first device; The communication unit is configured to communicate with a second device.
[0028] An embodiment of the present application further provides a packet processing device, the device being a second device, the second device including a storage unit, a processing unit, and a communication unit; The storage unit is configured to store instructions; the processing unit is configured to execute the instructions in the storage unit to perform the packet processing method as applied to the second device; The communication unit is configured to communicate with a first device.
[0029] One embodiment of the present application further provides a computer-readable storage medium storing instructions that, when executed by a computer, enable the computer to perform the above packet processing method applied to a first device and / or the above packet processing method applied to a second device.
[0030] One embodiment of the present application further provides a computer program product including instructions, which, when executed by a computer, enables the computer to execute the above packet processing method applied to a first device and / or the above packet processing method applied to a second device.
[0031] An embodiment of the present application further provides a packet processing system, which includes the above first device and second device. [Brief description of the drawings]
[0032] [Figure 1] 1 is a schematic diagram of a forwarding device according to an embodiment of the present application; [Diagram 2] 1 is a schematic diagram of a flow control system according to an embodiment of the present application. [Diagram 3] 1 is a structural block diagram of a packet processing system according to one embodiment of the present application. [Figure 4] 2 is a flowchart of a packet processing method according to an embodiment of the present application. [Diagram 5]11 is a flowchart of another packet processing method according to an embodiment of the present application. [Figure 6] 2 is a schematic diagram of a packet according to one embodiment of the present application; [Figure 7] FIG. 1 is a schematic diagram of a routing and forwarding entry in the prior art; [Figure 8] FIG. 2 is a schematic diagram of a routing and forwarding entry according to an embodiment of the present application; [Figure 9] FIG. 2 is a schematic diagram of an access control entry according to an embodiment of the present application; [Figure 10] 1 is a structural block diagram of a packet processing device according to an embodiment of the present application. [Figure 11] FIG. 2 is a structural block diagram of another packet processing apparatus according to an embodiment of the present application. [Figure 12] FIG. 2 is a diagram of a hardware architecture of a packet processing device according to one embodiment of the present application. [Figure 13] FIG. 2 is a diagram of a hardware architecture of another packet processing device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0033] Embodiments of the present application provide a packet processing method and apparatus, and related devices, to solve the problem of each forwarding device distributing a large number of flow filtering rules, and reduce the waste of network resources.
[0034] In the specification, claims, and accompanying drawings of this application, the terms "first," "second," "third," and "fourth," etc. (when present) are intended to distinguish between multiple similar objects, but do not necessarily denote any particular order or sequence. Data expressed in such a manner is intended to be interchangeable, where appropriate, such that it should be understood that the embodiments of the invention described herein may be implemented in an order other than that shown or described herein. In addition, the terms "comprise" and "comprises," and any other derivatives, are intended to cover a non-exclusive inclusion, such that, for example, a process, method, system, product, or device that includes a list of steps or units is not necessarily limited to the steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to the process, method, system, product, or device.
[0035] In the prior art, a packet may be forwarded by a forwarding device. After receiving a packet, the forwarding device may determine the next hop information corresponding to the packet based on a routing and forwarding table, and then forward the packet to other corresponding network devices. For example, referring to FIG. 1, a first user 101 and a second user 102 may send a packet to a forwarding device 103, and the forwarding device 103 forwards the received packet to a first device 104, a second device 105, a third device 106, and a fourth device 107. The address of the first device 104 is a first address, the address of the second device 105 is a second address, the address of the third device 106 is a third address, and the address of the fourth device 107 is a fourth address.
[0036] However, forwarding devices depend on network resources for packet forwarding, such as the bandwidth, buffer space, and processing power of the forwarding devices. When the required network resources exceed the currently available network resources, network congestion may occur. For example, a malicious user can use a client or server to launch a distributed denial of service (DDOS) attack, i.e., combine multiple computers as an attack platform to launch a DDOS attack against one or more targets, thereby congesting the network and affecting the normal service operation of the target device, thereby achieving the attack purpose.
[0037] In order to effectively prevent the network from being congested, a flow control may be performed on the forwarding device. Specifically, the flow of the forwarding device may be analyzed to obtain a flow filtering rule, which is issued to the forwarding device. The forwarding device processes packets according to the flow filtering rule, for example, redirecting or dropping packets to implement the flow control.
[0038] For example, Figure 2 is a schematic diagram of a flow control system according to one embodiment of this application. The flow of the forwarding device 103 may be analyzed by the control device 108 to obtain a flow filtering rule, and the flow filtering rule is issued to the forwarding device 103. The forwarding device 103 may process the received packet according to the flow filtering rule.
[0039] However, in general, there are a large number of network devices in a network. Therefore, it is necessary to configure one flow filtering rule for each pair of network devices that communicates through a forwarding device. When there are a large number of network devices, a large number of flow filtering rules are configured, and the generated large number of flow filtering rules are distributed to each forwarding device so that flow control can be implemented for each forwarding device. As a result, a large number of network resources are occupied.
[0040] For example, referring to FIG. 2, the first user 101 may send a packet to the first device 104 through the forwarding device 103, and one flow filtering rule may be configured for it, for example, the matching items in the filtering rule include the IP address of the first user and the first IP address. The second user 102 may send a packet to the first device 104 through the forwarding device 103, and one flow filtering rule may be configured for it, for example, the matching items in the filtering rule include the IP address of the second user and the first IP address. Therefore, for the two users and four IP addresses shown in FIG. 2, eight flow filtering rules need to be configured. Similarly, when m users have source IP addresses and access n IP addresses, and the network has destination IP addresses, m×n flow filtering rules need to be generated based on m source IP addresses and n destination IP addresses to control the flow of the m users who access the n IP addresses. These m×n flow filtering rules are distributed to each forwarding device, so that the forwarding device can perform corresponding processing on the received packets. The filtering rule distribution process occupies a large number of network resources, and a large number of memory resources are occupied by the forwarding device to store these filtering rules.
[0041] The embodiments of this application provide a packet processing method and apparatus and related devices to solve the technical problem of wasting network resources due to the generation and distribution of a large number of flow filtering rules. Specifically, a first device generates a flow filtering rule and sends the flow filtering rule to a second device. The flow filtering rule includes a match item and an action item, where the match item includes an IP address and an autonomous system (AS) identifier (ID), and the action item is used to instruct the second device to process packets that match the match item based on a packet processing mode indicated by the action item. That is, in this embodiment of this application, the IP addresses of network devices in an autonomous domain corresponding to the autonomous domain identifier are aggregated, and a flow filtering rule is generated based on the autonomous domain identifier. In this manner, only one flow filtering rule needs to be generated for all of the network devices in the autonomous domain that communicate with the network device corresponding to the IP address in the match item, and no longer one flow filtering rule needs to be generated for each network device in the autonomous domain as in the prior art, thereby reducing the number of flow filtering rules generated and also reducing the number of network resources required to distribute the flow filtering rules to the second device.
[0042] 3 is a schematic diagram of a system framework according to an embodiment of this application. The system includes a first device 100, a second device 200, a transmitting device 300, and a receiving device 400. The first device 100 is connected to the second device 200, and both the transmitting device 300 and the receiving device 400 are connected to the second device 200.
[0043] The first device 100 may be a controller in a software defined network (SDN), or may be other devices such as a network management device, a server, a terminal, or a router, where the server is, for example, a border gateway protocol (BGP) flow specification server. The first device 100 is configured to generate a flow filtering rule, where the flow filtering rule includes a match item and an action item, where the match item includes an IP address and an autonomous domain identifier, and the action item in the flow filtering rule may be used to instruct the second device to process a packet corresponding to the match item according to a packet processing mode indicated by the action item.
[0044] The second device 200 may be a forwarding device, such as a router or a switch, and is configured to transmit received packets from the transmitting device 300 to the receiving device 400. Each of the transmitting device 300 and the receiving device 400 may be a device connected to a terminal, a server, or a user.
[0045] The second device 200 receives the flow filtering rule sent by the first device 100. After receiving the packet sent by the sending device 300, the second device 200 may determine a routing and forwarding entry based on a first address in the packet, and the routing and forwarding entry includes an autonomous domain identifier. When determining that the first address of the packet matches the IP address in the flow filtering rule and the autonomous domain identifier in the routing and forwarding entry is the same as the autonomous domain identifier in the flow filtering rule, the second device 200 processes the packet based on a packet processing mode indicated by the action item.
[0046] The first address may be a destination IP address of the packet and the second address may be a source IP address of the packet. Alternatively, the first address is a source IP address of the packet and the second address is a destination IP address of the packet.
[0047] For example, the matching item in the flow filtering rule includes a source IP address IP-1 and an autonomous domain identifier AS1000 of the autonomous domain to which the device corresponding to the destination IP address belongs, and the action item corresponding to the matching item is to discard. When the second device 200 receives a packet M1 whose source IP address is IP-1 and destination IP address is IP-2, the second device 200 may search the routing and forwarding table based on the destination IP address to obtain a routing and forwarding entry corresponding to the destination IP address, and the routing and forwarding entry includes the destination IP address IP-2 and the autonomous domain identifier of the autonomous domain to which the destination IP address belongs. Since the autonomous domain identifier corresponding to the destination IP address IP-2 is AS1000, and the source IP address of the packet M1 is the same as the IP address in the flow filtering rule, and both are IP-1, the packet is considered to match the matching item in the flow filtering rule, and the second device 200 may discard the packet M1 based on the packet processing mode indicated by the corresponding action item.
[0048] For ease of understanding, the following provides detailed descriptions of several of these embodiments of this application.
[0049] 4 is a flowchart of a packet processing method according to an embodiment of this application. The method may be applied to a first device and includes the following steps:
[0050] S101. Create a flow filtering rule.
[0051] The first device may be a control device for generating and distributing flow filtering rules, and may be a server, a terminal, a router, etc. Specifically, a Border Gateway Protocol flow specification server may be set as the first device.
[0052] A flow filtering rule is a rule used to match and instruct a second device to process a packet, and may include a match item and an action item. The match item may include an IP address and an autonomous domain identifier. Specifically, if the IP address is the source IP address of the packet, the autonomous domain identifier is the autonomous domain identifier of the autonomous domain to which the device corresponding to the destination IP address of the packet belongs, or if the IP address is the destination IP address of the packet, the autonomous domain identifier is the autonomous domain identifier of the autonomous domain to which the device corresponding to the source IP address of the packet belongs. The autonomous domain identifier is used to distinguish between different autonomous domains. For example, the autonomous domain identifier of China Telecom may be AS1000, and the autonomous domain identifier of China Mobile may be AS2000.
[0053] In order to enable the first device to generate a flow filtering rule, the first device may obtain information about a packet received by the second device, where the packet information includes a source IP address and a destination IP address of the packet. In addition, the first device needs to obtain an autonomous domain identifier corresponding to the source IP address or the destination IP address. When the second device and the network device corresponding to the source IP address belong to the same autonomous domain, the autonomous domain identifier of the autonomous domain to which the second device belongs can be obtained by obtaining the autonomous domain identifier of the autonomous domain to which the second device belongs. When the second device and the network device corresponding to the destination IP address belong to the same autonomous domain, the autonomous domain identifier of the autonomous domain to which the second device belongs can also be obtained by obtaining the autonomous domain identifier of the autonomous domain to which the second device belongs. That is, in this case, the autonomous domain identifier in the matching item is the autonomous domain identifier of the autonomous domain to which the second device belongs. On the other hand, if the second device is not related to the autonomous domain to which the device corresponding to the source IP address belongs or the autonomous domain to which the device corresponding to the destination IP address belongs, then other methods need to be used to obtain the autonomous domain identifier, e.g., the corresponding autonomous domain identifier needs to be directly configured in the first device based on the source IP address or the destination IP address.
[0054] In this embodiment of the application, the objective of reducing the number of generated flow filtering rules is achieved by clustering source or destination IP addresses based on autonomous domain identifiers.
[0055] For example, when m users access n IP addresses, the prior art needs to generate m×n flow filtering rules to implement flow control, whereas when the n IP addresses belong to the same autonomous domain and the autonomous domain identifiers of the n IP addresses are A, it needs to generate m×1 flow filtering rules, and the matching items in each flow filtering rule include the autonomous domain identifier A and the IP address of one of the m users, thereby effectively reducing the number of flow filtering rules.
[0056] 2, when the first IP address 104 and the second IP address 105 belong to a first autonomous domain, the match item may include the IP address of the first user 101 and an identifier of the first autonomous domain, and the match item may be used to match packets generated by the first user 101 by accessing the first IP address 104 and / or the second IP address 105 via the forwarding device 103. When the third IP address 106 and the fourth IP address 107 belong to a second autonomous domain, the match item may include the IP address of the first user 101 and an identifier of the second autonomous domain, and the match item is used to match packets generated by the first user 101 by accessing the third IP address 106 and / or the fourth IP address 107 via the forwarding device 103. Thus, two flow filtering rules may be generated for two users accessing a first autonomous domain, and two flow filtering rules may be generated for two users accessing a second autonomous domain.
[0057] Similarly, if m users belong to the same autonomous domain and their autonomous domain identifiers are B, 1×n flow filtering rules may be generated, and the matching items in each flow filtering rule include the autonomous domain identifier B and one of the n IP addresses. Also, compared with the prior art, the number of flow filtering rules can be effectively reduced.
[0058] Additionally, in addition to the IP address and autonomous domain identifier, the match entry may also include other information about the packet, such as one or more of the IP protocol, source port, destination port, internet control message protocol (ICMP) type, ICMP code, transmission control protocol (TCP) flags, packet length, and differentiated services code point (DSCP).
[0059] An action item in a flow filtering rule corresponds to a match item and processes packets that match the match item according to the packet processing mode indicated by the action item. On a second device It is used to indicate the action to be taken when a packet is to be forwarded. The action items may include dropping a packet, redirecting a packet, and marking a packet. Dropping a packet means that the packet is not forwarded and is deleted. Redirecting a packet means changing the next hop information corresponding to the packet to change the forwarding path of the packet and control the flow in the network. Marking a packet means marking a packet for further processing, such as collecting flow statistics.
[0060] S102. Send the flow filtering rule to the second device.
[0061] The second device may be a forwarding device, such as a router, a switch, a bridge, or a gateway. The first device may send a flow filtering rule having a match item and an action item to the second device, so that the second device performs matching on the packet. When the packet matches the match item, the second device processes the packet based on a packet processing mode indicated by the action item corresponding to the match item.
[0062] Because the number of generated flow filtering rules is relatively small, the first device sends a small number of flow filtering rules to the second device, thereby saving network resources as well as saving storage resources of the second device.
[0063] In the packet processing method provided by this embodiment of the application, the first device first generates a flow filtering rule, and then transmits the flow filtering rule to the second device, the flow filtering rule includes a match item and an action item, the match item includes an IP address and an autonomous domain identifier, and the action item is used to instruct the second device to process packets that match the match item according to the packet processing mode indicated by the action item. That is, in this embodiment of the application, the IP address of the network device in the autonomous domain corresponding to the autonomous domain identifier is aggregated, and the flow filtering rule is generated based on the autonomous domain identifier. In this way, it is only necessary to generate one flow filtering rule for all of the multiple network devices in the autonomous domain that communicate with the network device corresponding to the IP address in the match item, and no longer to generate one flow filtering rule for each of the multiple network devices in the autonomous domain as in the prior art, thereby reducing the number of flow filtering rules generated and also reducing the number of network resources required to distribute the flow filtering rules to the second device.
[0064] 5 is a flowchart of another packet processing method according to an embodiment of this application. The method may be applied to a second device, and includes the following steps:
[0065] S201. Receive a flow filtering rule sent by a first device.
[0066] As described above, the second device may be a forwarding device such as a router, a switch, a bridge, or a gateway, and the second device may receive the flow filtering rule sent by the first device. The first device may be a control device for generating and distributing the flow filtering rule, and may be a server, a terminal, a router, etc. Specifically, a Border Gateway Protocol flow specification server may be used as the first device.
[0067] The flow filtering rule received by the second device may include a match item and an action item, and the match item may include an IP address and an autonomous domain identifier. Specifically, the IP address may be a source IP address of the packet, and the autonomous domain identifier is an identifier of an autonomous domain to which a device corresponding to a destination IP address of the packet belongs. Alternatively, the IP address may be a destination IP address of the packet, and the autonomous domain identifier may be an identifier of an autonomous domain to which a device corresponding to a source IP address of the packet belongs.
[0068] Since the first device generates a relatively small number of flow filtering rules, the second device receives a relatively small number of flow filtering rules, for example, flow control is performed when m users access n IP addresses, and if the m users belong to the same autonomous domain, the second device receives 1×n flow filtering rules, and if the n IP addresses belong to the same autonomous domain, the second device receives m×1 flow filtering rules.
[0069] Of course, the match item may also include other information about the packet, such as one or more of IP protocol, source port, destination port, ICMP type, ICMP code, TCP flags, packet length, and DSCP. An action item in a flow filtering rule corresponds to the match item and is used to indicate how to process the packet that matches the match item based on the packet processing mode indicated by the action item. The action item may include dropping the packet, redirecting the packet, and marking the packet.
[0070] S202. Receive a packet, and determine a routing and forwarding entry based on a first address in the packet.
[0071] 6, a packet received by the second device includes a source IP address 201, a destination IP address 202, and data 203. The source IP address 201 is the address of the network device that generates the packet, and the destination IP address 202 is the address of the network device that is expected to receive the packet. Typically, the second device needs to forward the packet, but when performing flow control on the packet, it needs to perform other processing on the packet.
[0072] A routing and forwarding table may be stored in the second device, and the routing and forwarding table includes a plurality of routing and forwarding entries. Each routing and forwarding entry stores forwarding information of a packet correspondingly. Figure 7 is a schematic diagram of a routing and forwarding entry in the prior art, including a source IP address 301 of a packet, a destination IP address 302 of the packet, and next hop information 303. Thus, the second device may look up the routing and forwarding table based on information about the packet, such as the source IP address and the destination IP address, to determine the next hop information corresponding to the packet, and then forward the packet based on the next hop information.
[0073] In this embodiment of the application, an autonomous domain identifier may be added to the routing and forwarding table. Specifically, an identifier of the autonomous domain to which the source IP address belongs may be added, or an identifier of the autonomous domain to which the device corresponding to the destination IP address belongs may be added, or both an identifier of the autonomous domain to which the device corresponding to the source IP address belongs and an identifier of the autonomous domain to which the device corresponding to the destination IP address belongs may be added. Figure 8 is a schematic diagram of a routing and forwarding entry according to an embodiment of the application, and Figure 8 includes a source IP address 301, a source AS-ID 304, a destination IP address 302, a destination AS-ID 305, and a packet's next hop information 303, where the source AS-ID 304 is an identifier of the autonomous domain to which the source IP address 301 belongs, and the destination AS-ID 305 is an identifier of the autonomous domain to which the destination IP address 302 belongs.
[0074] In the routing and forwarding entry, an identifier of the autonomous domain to which the device corresponding to the source IP address belongs and / or an identifier of the autonomous domain to which the device corresponding to the destination IP address belongs may be configured.
[0075] If the second device is an interior gateway protocol device or a border gateway protocol device, generally, the second device stores one or more autonomous domain identifiers. Specifically, if the second device is an interior gateway protocol device and belongs to the same autonomous domain as the network device corresponding to the source IP address, the autonomous domain identifier stored in the second device is the identifier of the autonomous domain to which the device corresponding to the source IP address belongs, or if the second device is an interior gateway protocol device and belongs to the same autonomous domain as the network device corresponding to the destination IP address, the autonomous domain identifier stored in the second device is the identifier of the autonomous domain to which the device corresponding to the destination IP address belongs. If the second device is a border gateway protocol device, that is, if the second device belongs to the same autonomous domain as the network device corresponding to the source IP address and belongs to the same autonomous domain as the network device corresponding to the destination IP address, the second device stores at least two autonomous domain identifiers. Therefore, it is necessary to obtain the autonomous domain identifier to be added to the routing and forwarding table according to the source IP address and the destination IP address.
[0076] After receiving the packet, the second device may determine a routing and forwarding entry based on the first address of the packet, the entry including at least the first address and an identifier of an autonomous domain to which the first address belongs. The first address may be a source IP address of the packet, and the second address may be a destination IP address of the packet. Correspondingly, the first address may be a destination IP address of the packet, and the second address may be a source IP address of the packet.
[0077] S203. When determining that the second address of the packet is the same as the IP address in the flow filtering rule and the autonomous domain identifier in the routing and forwarding entry is the same as the autonomous domain identifier in the flow filtering rule, process the packet based on a packet processing mode indicated by the action item.
[0078] From the above description, it can be seen that the second device can determine a routing and forwarding entry based on the first address of the packet, and the entry includes the first address and an identifier of the autonomous domain to which the first address belongs, i.e., the first AS-ID. Then, the second device may perform matching between the second address of the packet, the first AS-ID, and the matching item in the flow filtering rule. Specifically, the second device may determine whether the second address of the packet is the same as the IP address in the flow filtering rule, and whether the first AS-ID is the same as the autonomous domain identifier in the flow filtering rule. If the second address of the packet is the same as the IP address in the flow filtering rule and the first AS-ID is the same as the autonomous domain identifier in the flow filtering rule, the packet is considered to match the matching item in the flow filtering rule. In this case, the packet may be processed based on a packet processing mode indicated by an action item. The action item may include: discarding the packet, redirecting the packet, and marking the packet.
[0079] For example, the matching item in the flow filtering rule may include a source IP address IP-1 and an autonomous domain identifier AS1000 to which a device corresponding to the destination IP address belongs, and the action item corresponding to the matching item may be discarded. If the source IP address and destination IP address of the packet received by the second device are IP-1 and IP-2, respectively, the routing and forwarding entry corresponding to the destination IP address can be obtained by searching the routing and forwarding table based on the destination IP address, and the routing and forwarding entry includes the destination IP address IP-2 and an identifier of the autonomous domain to which a device corresponding to the destination IP address belongs, i.e., the first AS-ID is AS1000. Therefore, it can be determined that the source IP address of the packet is the same as the IP address in the flow filtering rule. In addition, if the first AS-ID obtained based on the routing and forwarding entry is the same as the autonomous domain identifier in the flow filtering rule, it can be considered that the packet matches the matching item in the flow filtering rule, and the packet is processed based on the packet processing mode indicated by the corresponding action item. Specifically, the packet may be discarded.
[0080] Similarly, the matching item in the flow filtering rule may include a destination IP address IP-2 and an autonomous domain identifier AS2000 to which the device corresponding to the source IP address belongs, and the action item corresponding to the matching item may be redirection of the packet. When the source IP address and the destination IP address of the packet received by the second device are IP-1 and IP-2, respectively, it can be determined that the source IP address is the first address and the destination IP address is the second address according to the matching principle of the flow filtering rule. By searching the routing and forwarding table based on the source IP address, it is possible to obtain a routing and forwarding entry corresponding to the source IP address. The routing and forwarding entry includes a source IP address IP-1 and an identifier of the autonomous domain to which the device corresponding to the source IP address belongs, i.e., the first AS-ID is AS2000. Therefore, it can be determined that the destination IP address of the packet is the same as the IP address of the flow filtering rule. In addition, if the first AS-ID obtained based on the routing and forwarding entry is the same as the autonomous domain identifier in the flow filtering rule, it can be considered that the packet matches the matching item in the flow filtering rule, and the packet is processed based on the packet processing mode indicated by the corresponding action item. Specifically, the packet may be redirected.
[0081] In order to facilitate flow control based on the flow filtering rule, in this embodiment of the application, an access control list (ACL) can be generated according to the flow filtering rule, and the access control list may include a match item and an action item. Figure 9 is a schematic diagram of an access control entry according to an embodiment of the application. The match item may include an IP address 401 and an autonomous domain index 402, which respectively correspond to the IP address and the autonomous domain identifier in the flow filtering rule. The autonomous domain index corresponds to the autonomous domain identifier in the flow filtering rule. In practical application, a mapping relationship between the autonomous domain identifier in the flow filtering rule and the autonomous domain index may be established, and when the mapping relationship is satisfied, the two are considered to be consistent. The autonomous domain identifier and the autonomous domain index may be the same or different.
[0082] Thus, the second device may determine a routing and forwarding entry based on the first address of the packet, the entry including the first address and an identifier of the autonomous domain to which the first address belongs, i.e., the first AS-ID. Then, the second device may perform a match between the second address of the packet and an IP address in the access control list, and perform a match between the first AS-ID and the autonomous domain index in the access control list. Specifically, the second device may determine whether the second address of the packet is the same as the IP address in the access control list, and whether the first AS-ID matches the autonomous domain index in the access control list. If the second address of the packet is the same as the IP address in the access control list and the first AS-ID matches the autonomous domain index in the access control list, the packet is considered to match the matching item in the access control list. In this case, the packet may be processed based on the packet processing mode indicated by the action item.
[0083] In another packet processing method provided by this embodiment of the present application, the second device receives a flow filtering rule sent by the first device, and the matching item includes an IP address and an autonomous domain identifier. The autonomous domain identifier may be used to distinguish between different autonomous domains, and one autonomous domain may include multiple network devices corresponding to information about the multiple network devices. The second device receives a packet, and determines a routing and forwarding entry based on a first address in the packet, and the routing and forwarding entry includes an autonomous domain identifier, and when the second device determines that the second address of the packet is the same as the IP address in the flow filtering rule, and the autonomous domain identifier in the routing and forwarding entry is the same as the autonomous domain identifier in the flow filtering rule, the second device processes the packet based on a packet processing mode indicated by the action item. That is, in this embodiment of the present application, the IP addresses of the network devices in the autonomous domain corresponding to the autonomous domain identifier are aggregated, and a flow filtering rule is generated based on the autonomous domain identifier. In this way, only one flow filtering rule needs to be generated for all of the multiple network devices in the autonomous domain that communicate with the network device corresponding to the IP address in the match item, and it is no longer necessary to generate one flow filtering rule for each of the multiple network devices in the autonomous domain as in the prior art, thereby reducing the number of flow filtering rules generated, and the first device can perform matching on received packets based on a relatively small number of flow filtering rules and process the matched packets, thereby saving network resources.
[0084] Referring to Fig. 10, an embodiment of the present application further provides a packet processing device, which is used in a first device. The first device may implement the functions of the first device in the embodiment shown in Fig. 4 or Fig. 5. The first device includes a rule generating unit 101 and a rule sending unit 102. The rule generating unit 101 is configured to perform step S101 in the embodiment shown in Fig. 4, and the rule sending unit 102 is configured to perform step S102 in the embodiment shown in Fig. 4. Specifically, The rule generation unit 101 is configured to generate a flow filtering rule, the flow filtering rule including a match item and an action item, the match item including an Internet Protocol (IP) address and an autonomous domain identifier; The rule sending unit 102 is configured to send the flow filtering rule to a second device, and the action item is used to instruct the second device to process packets matching the match item based on a packet processing mode indicated by the action item.
[0085] Optionally, the IP address is a source IP address of the packet, and the autonomous domain identifier is an identifier of an autonomous domain to which a device corresponding to a destination IP address of the packet belongs.
[0086] Optionally, the IP address is a destination IP address of the packet, and the autonomous domain identifier is an identifier of an autonomous domain to which a device corresponding to a source IP address of the packet belongs.
[0087] Optionally, the autonomous domain identifier is an identifier of an autonomous domain to which the second device belongs.
[0088] Referring to FIG. 11, an embodiment of the present application further provides a packet processing device, which is used in a second device. The second device may implement the functions of the second device in the embodiment shown in FIG. 4 or FIG. 5. The second device includes a rule receiving unit 201, a packet receiving unit 202, and a packet processing unit 203. The rule receiving unit 201 is configured to perform step S201 in the embodiment shown in FIG. 5, the packet receiving unit 202 is configured to perform step S202 in the embodiment shown in FIG. 5, and the packet processing unit 203 is configured to perform step S203 in the embodiment shown in FIG. 5. Specifically, The rule receiving unit 201 is configured to receive a flow filtering rule sent by a first device, the flow filtering rule including a matching item and an action item, the matching item including an Internet Protocol (IP) address and an autonomous domain identifier; The packet receiving unit 202 is configured to receive a packet and determine a routing and forwarding entry based on a first address in the packet, the routing and forwarding entry including an autonomous domain identifier; The packet processing unit 203 is configured to process the packet based on a packet processing mode indicated by the action item when it determines that the second address of the packet matches the IP address in the flow filtering rule and the autonomous domain identifier in the routing and forwarding entry is the same as the autonomous domain identifier in the flow filtering rule.
[0089] Optionally, the first address is a destination IP address of the packet and the second address is a source IP address of the packet.
[0090] Optionally, the first address is a source IP address of the packet and the second address is a destination IP address of the packet.
[0091] Optionally, the packet processing mode indicated by the operation item is: Dropping the packet, redirecting the packet, and marking the packet; Includes one or more of the following:
[0092] Optionally, the apparatus comprises: The system further includes a list generating unit configured to generate an access control list according to the flow filtering rule, the access control list storing the IP address, an autonomous domain index, and the action item, the autonomous domain index corresponding to the autonomous domain identifier.
[0093] The packet processing unit is configured, in particular, to process the packet based on the packet processing mode indicated by the action item stored in the access control list when the second device determines that the second address of the packet is the same as the IP address in the access control list and the autonomous domain identifier in the routing and forwarding entry matches the autonomous domain index in the access control list.
[0094] 12, an embodiment of the present application further provides a first packet processing device 300, which is a first device. The device 300 may implement the function of the first device in the embodiment shown in FIG. 4 or FIG. 5. The device includes a storage unit 301, a processing unit 302, and a communication unit 303.
[0095] The storage unit 301 is configured to store instructions.
[0096] The processing unit 302 is configured to execute the instructions in the storage unit 301 to perform the above packet processing method applied to the first device in the embodiment shown in FIG. 4 or FIG.
[0097] The communication unit 303 is configured to communicate with a second device.
[0098] The storage unit 301, the processing unit 302, and the communication unit 303 are interconnected by using a bus 304. The bus 304 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be classified into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used to represent the bus in FIG. 12, but this does not mean that only one bus or only one type of bus exists.
[0099] 13, an embodiment of the present application further provides a second packet processing device 400. The device 400 may implement the functions of the second device in the embodiment shown in FIG. 4 or FIG. 5, and the device is the second device. The second device includes a storage unit 401, a processing unit 402, and a communication unit 403.
[0100] The storage unit 401 is configured to store instructions.
[0101] The processing unit 402 is configured to execute the instructions in the storage unit 401 to perform the above packet processing method applied to the second device in the embodiment shown in FIG. 4 or FIG.
[0102] The communication unit 403 is configured to communicate with a first device.
[0103] The storage unit 401, the processing unit 402, and the communication unit 403 are interconnected by using a bus 404. The bus 404 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be classified into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used to represent the bus in FIG. 13, but this does not mean that only one bus or only one type of bus exists.
[0104] Each of storage unit 301 and storage unit 401 may be a random-access memory (RAM), a flash memory, a read only memory (ROM), an erasable programmable read only memory (EPROM), an electrically erasable programmable read only memory (EEPROM), a register, a hard disk, a removable hard disk, a CD-ROM, or any other form of storage medium known to those skilled in the art.
[0105] Each of the processing units 302 and 402 may be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic device, transistor logic device, hardware component, or any combination thereof. The processing units may implement or execute various exemplary logic blocks, modules, and circuits described with reference to the disclosure herein. Alternatively, the processor may be a combination of processors that implement computational functions, such as, for example, a combination of one or more microprocessors or a combination of a DSP and a microprocessor.
[0106] Each of the communication units 303 and 403 may be, for example, an interface card, or an ethernet interface or an asynchronous transfer mode (ATM) interface.
[0107] An embodiment of the present invention provides a packet processing system, configured to implement the packet processing method of the above method embodiment, the system including a first device in the embodiment shown in Figure 10 and a second device in the embodiment shown in Figure 11, or the system including a first device in the embodiment shown in Figure 12 and a second device in the embodiment shown in Figure 13.
[0108] One embodiment of the present application further provides a computer-readable storage medium, which includes instructions that, when executed by a computer, enable the computer to perform the above packet processing method applied to a first device and / or the above packet processing method applied to a second device.
[0109] One embodiment of the present application further provides a computer program product including instructions, which, when executed by a computer, enables the computer to execute the above packet processing method applied to a first device and / or the above packet processing method applied to a second device.
[0110] For the purpose of convenience and ease of description, those skilled in the art can clearly understand that the detailed operation processes of the above systems, devices and units should be referred to the corresponding processes in the above method embodiments, and the details will not be described repeatedly in this specification.
[0111] It should be understood that in some of the embodiments provided by this application, the disclosed system, device, and method can be implemented in other ways. For example, the embodiment of the device described is only one example. For example, the division of units is only a logical division of functions, and other division ways may exist in actual implementation. For example, multiple units or multiple components may be combined or integrated into another system, or some of the multiple features may be ignored or not implemented. In addition, some interfaces may implement the mutual coupling, direct coupling, or communication connection shown or described. Indirect coupling or communication connection between multiple devices or multiple units may be implemented by electrical, mechanical, or other forms.
[0112] The units described as separate parts may or may not be physically separated, and the parts shown as multiple units may or may not be multiple physical units, i.e., located in one place or distributed in multiple network units. Based on actual requirements, some or all of the units may be selected to achieve the objectives of the solutions of the multiple embodiments.
[0113] In addition, the functional units in the embodiments of this application may be integrated into one processing unit, or each of the units may exist physically alone, or two or more units may be integrated into one unit. The integrated units may be implemented in the form of hardware or software functional units.
[0114] When an integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, the integrated unit may be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of this application may be essentially or in part contributed to the prior art, or all or part of the technical solutions may be implemented in the form of a software product. The computer software product is stored in a storage medium and includes instructions, which instruct a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of this application. The above storage medium includes any medium capable of storing program code, such as a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0115] Those skilled in the art should recognize that in one or more of the above examples, the functions described by the present invention may be implemented by hardware, software, firmware, or any combination thereof. When the present invention is implemented by software, the functions described above may be stored in a computer-readable medium or transmitted as one or more instructions or codes in a computer-readable medium. Computer-readable media include computer storage media and communication media, where communication media includes any medium that allows a computer program to be transmitted from one place to another, and storage media may be any available medium accessible to a general-purpose computer or a special-purpose computer.
[0116] In the above several specific implementations, the objectives, technical solutions and beneficial effects of the present invention are further described in detail. It should be understood that the above descriptions are only specific implementations of the present invention.
[0117] In conclusion, the above embodiments are only intended to describe the technical solutions of this application, and are not intended to limit this application. Although this application has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can be further modified, or some of the technical features of the above embodiments can be replaced with equivalents. Meanwhile, these modifications or replacements do not cause the essence of the corresponding technical solutions to depart from the scope of the technical solutions in the embodiments of this application.
Claims
1. 1. A packet processing method, comprising: generating, by a first device, a flow filtering rule, the flow filtering rule including a match item and an action item, the match item including an Internet Protocol address (IP address) and an autonomous domain identifier; sending the flow filtering rule by the first device to a second device, the action item being used to instruct the second device to process packets matching the match item based on a packet processing mode indicated by the action item; the first device is a Border Gateway Protocol flow specification server and the second device is a Border Gateway Protocol device; The IP address includes a source IP address of the packet, and the autonomous domain identifier includes an identifier of an autonomous domain to which a device corresponding to a destination IP address of the packet belongs. method.
2. A packet processing method, comprising: generating, by a first device, a flow filtering rule, the flow filtering rule including a match item and an action item, the match item including an Internet Protocol address (IP address) and an autonomous domain identifier; sending the flow filtering rule by the first device to a second device, the action item being used to instruct the second device to process packets matching the match item based on a packet processing mode indicated by the action item; the first device is a Border Gateway Protocol flow specification server and the second device is a Border Gateway Protocol device; the autonomous domain identifier comprises an identifier of an autonomous domain to which the second device belongs; method.
3. The method of claim 1 or 2, wherein the IP address comprises a destination IP address of the packet, and the autonomous domain identifier comprises an identifier of an autonomous domain to which a device corresponding to a source IP address of the packet belongs.
4. 1. A packet processing method, comprising: receiving, by a second device, a flow filtering rule sent by a first device, the flow filtering rule including a match item and an action item, the match item including an Internet Protocol address (IP address) and an autonomous domain identifier, the first device being a Border Gateway Protocol flow specification server and the second device being a Border Gateway Protocol device; receiving, by the second device, a packet and determining a routing and forwarding entry based on a first address in the packet, the routing and forwarding entry including an autonomous domain identifier; and when determining that a second address of the packet matches the IP address in the flow filtering rule and the autonomous domain identifier in the routing and forwarding entry is the same as the autonomous domain identifier in the flow filtering rule, processing the packet by the second device based on a packet processing mode indicated by the action item; the first address is a destination IP address of the packet and the second address comprises a source IP address of the packet; method.
5. 5. The method of claim 4, wherein the first address comprises a source IP address of the packet and the second address comprises a destination IP address of the packet.
6. The packet processing mode indicated by the operation item is Dropping the packet, redirecting the packet, and marking the packet; The method of claim 4 or 5, comprising one or more of:
7. The method comprises: generating an access control list according to the flow filtering rule, the access control list storing the IP address, an autonomous domain index, and the action item, the autonomous domain index corresponding to the autonomous domain identifier; When determining that a second address of the packet matches the IP address in the flow filtering rule and the autonomous domain identifier in the routing and forwarding entry is the same as the autonomous domain identifier in the flow filtering rule, the step of processing the packet by the second device based on a packet processing mode indicated by the action item includes:
5. The method of claim 4, further comprising: when determining that the second address of the packet is the same as the IP address in the access control list and the autonomous domain identifier in the routing and forwarding entry matches the autonomous domain index in the access control list, processing the packet by the second device based on the packet processing mode indicated by the action item stored in the access control list.
8. A packet processing apparatus, the packet processing apparatus being used in a first device; a rule generation unit configured to generate a flow filtering rule, the flow filtering rule including a match item and an action item, the match item including an Internet Protocol address (IP address) and an autonomous domain identifier; a rule sending unit configured to send the flow filtering rule to a second device, wherein the action item is used to instruct the second device to process packets matching the match item based on a packet processing mode indicated by the action item; the first device is a Border Gateway Protocol flow specification server and the second device is a Border Gateway Protocol device; The IP address includes a source IP address of the packet, and the autonomous domain identifier includes an identifier of an autonomous domain to which a device corresponding to a destination IP address of the packet belongs. Device.
9. A packet processing device, the packet processing device being used in a first device, a rule generation unit configured to generate a flow filtering rule, the flow filtering rule including a match item and an action item, the match item including an Internet Protocol address (IP address) and an autonomous domain identifier; a rule sending unit configured to send the flow filtering rule to a second device, wherein the action item is used to instruct the second device to process packets matching the match item based on a packet processing mode indicated by the action item; the first device is a Border Gateway Protocol flow specification server and the second device is a Border Gateway Protocol device; the autonomous domain identifier comprises an identifier of an autonomous domain to which the second device belongs; Device.
10. 10. The apparatus of claim 8 or 9, wherein the IP address comprises a destination IP address of the packet, and the autonomous domain identifier comprises an identifier of an autonomous domain to which a device corresponding to a source IP address of the packet belongs.
11. A packet processing apparatus, the packet processing apparatus being used in a second device; A rule receiving unit configured to receive a flow filtering rule sent by a first device, the flow filtering rule including a match item and an action item, the match item including an Internet Protocol address (IP address) and an autonomous domain identifier; a packet receiving unit configured to receive a packet and determine a routing and forwarding entry based on a first address in the packet, the routing and forwarding entry including an autonomous domain identifier; a packet processing unit configured to process the packet based on a packet processing mode indicated by the action item when determining that the second address of the packet matches the IP address in the flow filtering rule and the autonomous domain identifier in the routing and forwarding entry is the same as the autonomous domain identifier in the flow filtering rule; the first device is a Border Gateway Protocol flow specification server and the second device is a Border Gateway Protocol device; the first address is a destination IP address of the packet and the second address comprises a source IP address of the packet; Device.
12. 12. The apparatus of claim 11, wherein the first address comprises a source IP address of the packet and the second address comprises a destination IP address of the packet.
13. The packet processing mode indicated by the operation item is Dropping the packet, redirecting the packet, and marking the packet; 13. Apparatus according to claim 11 or 12, comprising one or more of:
14. The device comprises: The method further includes: generating an access control list according to the flow filtering rule, the access control list storing the IP address, an autonomous domain index, and the action item, the autonomous domain index corresponding to the autonomous domain identifier; 12. The apparatus of claim 11, wherein the packet processing unit is configured to process the packet based on the packet processing mode indicated by the action item stored in the access control list when the second device determines that the second address of the packet is the same as the IP address in the access control list and the autonomous domain identifier in the routing and forwarding entry matches the autonomous domain index in the access control list.
15. A packet processing system including a first device and a second device, the first device is a Border Gateway Protocol flow specification server and the second device is a Border Gateway Protocol device; The first device is configured to generate a flow filtering rule and transmit the flow filtering rule to the second device, the flow filtering rule including a match item and an action item, the match item including an Internet Protocol address (IP address) and an autonomous domain identifier; The second device is configured to receive the flow filtering rule sent by the first device, receive a packet, determine a routing and forwarding entry including an autonomous domain identifier based on a first address in the packet, and process the packet based on a packet processing mode indicated by the action item when determining that a second address of the packet matches the IP address in the flow filtering rule and the autonomous domain identifier in the routing and forwarding entry is the same as the autonomous domain identifier in the flow filtering rule. the first address comprises a destination IP address of the packet, and the second address comprises a source IP address of the packet; Packet processing system.
16. A computer readable storage medium containing instructions which, when executed by a computer, enable the computer to carry out the method of any one of claims 1 to 3.
17. A computer readable storage medium containing instructions which, when executed by a computer, enable the computer to carry out the method of any one of claims 4 to 7.
Citation Information
Patent Citations
Control method of storage network system, and storage network system
JP2005252450A
Communication control device and relay device
JP2009284456A
Method and apparatus for detecting spoofed network information
JP2011234331A
Method, apparatus and program for detecting spoofed network traffic
JP2013106354A
