The present invention relates to a sorting apparatus, a sorting method, and a sorting program.
Conventionally, there is a router function (IPFIX 1E315, sFlow Header Sampling, etc.) that samples the first byte of a packet and sends it as xFlow. When this function is applied to a router in a network through which a tunneling packet flows, the Outer part and Inner part of the tunneling packet are sampled at the same time. For this reason, the router can perform communication flow analysis of an Inner packet included in a tunnel passing through a certain router by counting pairs of an Outer part and an Inner part of a sample for each exporter.
In this router function, processing threads are parallelized to distribute the load in order to improve communication flow analysis.
Here, in the analysis of the tunneled flow, the header sampling xFlow is sorted in the same processing thread for each tunnel of the transmission source collector in order to analyze the communication flow in the tunnel, and signal flow analysis is completed.
However, in the case of a tunneled flow, header sampling flow packets sent from the same exporter to a certain collector all have the same header value (see (1) in
The present invention has been made in view of the above, and an object of the present invention is to provide a sorting apparatus, a sorting method, and a sorting program capable of appropriately executing load distribution of processing threads that perform communication flow analysis.
In order to solve the above-described problem and achieve the object, the sorting apparatus according to the present invention includes a sorting function unit configured to acquire a frame and a sorting key, embed the sorting key in a header of the frame, and sort the frame into a processing thread based on a value of the sorting key in the header.
Also, a sorting method according to the present invention is a sorting method to be executed by a sorting apparatus, including a step of acquiring a frame and a sorting key, embedding the sorting key in a header of the frame, and sorting the frame into a processing thread based on a value of the sorting key in the header.
Also, the sorting program according to the present invention cause a computer to execute a step of acquiring a frame and a sorting key, embedding the sorting key in a header of the frame, and sorting the frame into a processing thread based on a value of the sorting key in the header.
According to the present invention, it is possible to perform communication flow analysis while distributing the load of processing threads with respect to a tunneled flow.
Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings. Note that the present invention is not limited to this embodiment. Also, in the description of the drawings, identical parts are denoted by identical reference numerals.
Sorting Mechanism of the Present Embodiment
Specifically, the sorting function unit 13 embeds, for example, a sorting key “A” in an Ether header of an Ether frame based on the frame and the sorting key (see (1) in
In the case of the example of
As described above, in the embodiment, the frame and the sorting key are acquired, the sorting key is embedded in the Ether header of the frame, and the frame is sorted into a processing thread based on the value of the sorting key in the Ether header. For this reason, according to the present embodiment, it is possible to analyze the communication flow while performing load distribution of the processing thread even for a tunneled flow.
Overview of Processing Apparatus
First, a configuration of a processing apparatus according to the embodiment will be described with reference to
The processing apparatus 100 is realized by, for example, loading a predetermined program in a computer or the like including a ROM (Read Only Memory), a RAM (Random Access Memory), a CPU (Central Processing Unit), and the like, and executing the predetermined program with the CPU. Also, the processing apparatus 100 has a communication interface for transmitting and receiving various types of information to and from another apparatus connected via a network or the like. The processing apparatus 100 has an NIC (Network Interface Card) and the like, and performs communication with another apparatus via a telecommunication line such as a LAN (Local Area Network) or the Internet.
As shown in
Configuration of Sorting Unit
Next, the configuration of the sorting unit 10 will be described. The sorting unit 10 sorts a flow packet whose input has been received into a processing thread using the function of the above-described sorting function unit 13.
The sorting unit 10 is arranged at the entrance of the reception housing of the header sampling xFlow packet, performs sorting of the flow packets into a plurality of flow packet processing threads based on the xFlow header information and the information of the Outer header in the samples, thereby enabling load distribution of the processing threads. Note that the flow packet input to the sorting unit 10 is a packet in which any protocol header added to the Ether header for tunneling is stacked. Also, packets for a certain collector from the same exporter all have the same header value. The sorting unit 10 has a header determination unit 11 (determination unit), a hash computation unit 12 (calculation unit), and a sorting function unit 13.
The header determination unit 11 analyzes the flow packet and determines the xFlow header information and the Outer header position in the sample. The header determination unit 11 performs protocol stack analysis of the flow packet and specifies the xFlow header information and the Outer header position in the sample.
For example, the header determination unit 11 may also determine the type of header, the Outer header in the sample, and the like using the method described in Japanese Patent Application Laid-Open No. 2019-097069. The header determination unit 11 determines the protocol stack pattern indicating the type and arrangement of each protocol header of the input flow packet according to a determination rule. The protocol stack pattern is information indicating the type and arrangement of each protocol header.
Specifically, the header determination unit 11 determines the protocol stack pattern of the input packet using a determination tree for determining a protocol stack pattern created by sequentially searching for a packet with a known protocol stack pattern starting from a lower-level header, a determination logical expression for determining a protocol stack pattern created based on a specific bit string in a packet with a known protocol stack pattern, or a protocol config file showing the header information of each standardized protocol. The determination rule may be generated in advance by another apparatus, or may be generated by learning the input packet using the protocol config file. Note that the header determination unit 11 may also determine the header using another method.
The hash computation unit 12 performs hash computation using the xFlow header information and the Outer header position in the sample as inputs, and outputs the hash value. The hash computation unit 12 outputs the same hash value for flows having the same exporter and the same Outer header. This hash value functions as a sorting key.
The sorting function unit 13 writes the hash value output from the hash computation unit 12 as a sorting key in the Ether header of the flow packet, and sorts the flow packet into a processing thread based on the Ether header. Since the same hash value is embedded as a sorting key for flows having the same exporter and the same Outer header, the sorting function unit 13 can sort each flow packet into the corresponding processing thread.
Flow of Sorting Processing
Next, a flow of sorting processing performed by the sorting unit 10 shown in
As shown in
First, the header determination unit 11 performs protocol stack analysis of the flow packet and specifies the xFlow header information and the Outer header position in the sample (see (1) in
The hash computation unit 12 performs hash calculation in which the xFlow header information and the Outer header information in the sample are used as inputs and the processing thread number is output, such that flows with the same exporter and the same Outer are processed by the same processing thread (see (2) in
The sorting function unit 13 embeds the hash value output from the hash computation unit 12 in the Ether header of the header sampling packet, and performs sorting into a processing thread based on the Ether header (see (3) in
As a result, as shown in
Processing Procedure for Sorting Processing
Next, a processing procedure for sorting processing performed by the sorting unit 10 will be described.
As shown in
Next, the hash computation unit 12 performs hash computation processing for performing hash calculation using the xFlow header information and the Outer header position in the sample as inputs, and outputting the hash value (step S3).
Then, the sorting function unit 13 writes the hash value output from the hash computation unit 12 as a sorting key in the Ether header of the flow packet, and performs sorting processing for sorting the flow packet into a processing thread based on the Ether header (step S4).
In this manner, in the embodiment, the frame and the sorting key are acquired, the sorting key is embedded in the header of the frame, and the frame is sorted into a processing thread based on the value of the sorting key in the header. According to the present embodiment, load distribution of the processing threads can be appropriately executed by sorting the frame into the processing thread using the value of the sorting key in the header.
Also, the sorting unit 10 according to the embodiment analyzes a packet to which any protocol header has been added after the Ether header for tunneling, and determines the xFlow header information and the Outer header position in the sample. Then, the sorting unit 10 performs hash calculation using the xFlow header information and the Outer header position in the sample as inputs, and outputs the hash value. The sorting unit 10 writes the hash value as a sorting key in the Ether header of the packet, and sorts the packet into a processing thread based on the Ether header.
In this manner, in the present embodiment, the hash value to be used as the sorting key is calculated using the xFlow header information and the Outer header position in the sample as inputs. For this reason, in the present embodiment, packets having the same xFlow header information and Outer header position in the sample are sorted into the same processing thread because the same hash value is used as the sorting key.
Accordingly, in the present embodiment, through tunneling, even if the packets all have the same header value, signal flow analysis of Inner packets from the same exporter and to which the same Outer is attached can be completed by the same processing thread. For this reason, according to the present embodiment, signal flow analysis can be executed with high accuracy. Then, according to the present embodiment, sorting to a processing thread can be appropriately executed even for a tunneled flow, and therefore load distribution can be suitably executed.
System Configuration, Etc.
The constituent elements of each illustrated apparatus are functional concepts and do not necessarily need to be physically constituted as shown in the drawings. That is, the specific mode of distribution/integration of each apparatus is not limited to that shown in the drawings, and all or part of the apparatus can be formed functionally or physically distributed or integrated in any unit according to various types of loads, usage conditions, and the like. Furthermore, all or a portion of the processing functions performed by each apparatus may be realized by a CPU and a program analyzed and executed by the CPU, or may be realized as hardware according to wired logic.
Also, among the processes described in the present embodiment, all or some of the processing described as being automatically performed can also be manually performed, or all or some of the processing described as being manually performed can also be automatically performed using a known method. In addition, the processing procedure, control procedure, specific names, and information including various types of data and parameters shown in the above-described document and drawings can be changed as appropriate unless otherwise specified.
Program
The memory 1010 includes a ROM 1011 and a RAM 1012. The ROM 1011 stores, for example, a boot program such as a BIOS (Basic Input Output System). The hard disk drive interface 1030 is connected to the hard disk drive 1090. The disk drive interface 1040 is connected to the disk drive 1100. For example, a removable storage medium such as a magnetic disk or an optical disk is inserted into the disk drive 1100. The serial port interface 1050 is connected to, for example, a mouse 1110 and a keyboard 1120. The video adapter 1060 is connected to, for example, the display 1130.
The hard disk drive 1090 stores, for example, an OS (Operating System) 1091, an application program 1092, a program module 1093, and program data 1094. That is, the program that defines each process of the processing apparatus 100 is implemented as a program module 1093 in which a code that can be executed by a computer is described. The program module 1093 is stored in, for example, the hard disk drive 1090. For example, a program module 1093 for executing processing similar to that of the functional configuration of the processing apparatus 100 is stored in the hard disk drive 1090. Note that the hard disk drive 1090 may also be replaced by an SSD (Solid State Drive).
Also, the setting data to be used in the processing of the above-described embodiment is stored as the program data 1094 in, for example, the memory 1010 or the hard disk drive 1090. Then, the CPU 1020 reads out the program module 1093 and the program data 1094 stored in the memory 1010 and the hard disk drive 1090 to the RAM 1012 and executes them as needed.
Note that the program module 1093 and the program data 1094 are not limited to a case of being stored in the hard disk drive 1090, and may also be stored in, for example, a removable storage medium and read out by the CPU 1020 via the disk drive 1100 or the like. Alternatively, the program module 1093 and the program data 1094 may also be stored in another computer connected via a network (a LAN, a WAN (Wide Area Network), etc.). Then, the program module 1093 and the program data 1094 may be read out by the CPU 1020 from the other computer via the network interface 1070.
Although an embodiment to which the invention made by the present inventor is applied has been described above, the present invention is not limited by the description and the drawings, which form part of the disclosure of the present invention according to the present embodiment. That is, other embodiments, examples, operational techniques, and the like made by those skilled in the art based on the present embodiment are all encompassed in the scope of the present invention.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2019/044603 | 11/13/2019 | WO |