WO2022049751A1 - コネクション数計測装置、方法、およびプログラム - Google Patents

コネクション数計測装置、方法、およびプログラム Download PDF

Info

Publication number
WO2022049751A1
WO2022049751A1 PCT/JP2020/033721 JP2020033721W WO2022049751A1 WO 2022049751 A1 WO2022049751 A1 WO 2022049751A1 JP 2020033721 W JP2020033721 W JP 2020033721W WO 2022049751 A1 WO2022049751 A1 WO 2022049751A1
Authority
WO
WIPO (PCT)
Prior art keywords
state
connection
memory
state information
value
Prior art date
Application number
PCT/JP2020/033721
Other languages
English (en)
French (fr)
Inventor
祐太 右近
悠介 関原
晶子 大輝
奈美子 池田
周平 吉田
寛之 鵜澤
高庸 新田
Original Assignee
日本電信電話株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日本電信電話株式会社 filed Critical 日本電信電話株式会社
Priority to PCT/JP2020/033721 priority Critical patent/WO2022049751A1/ja
Priority to JP2022546840A priority patent/JP7414149B2/ja
Publication of WO2022049751A1 publication Critical patent/WO2022049751A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/02Capturing of monitoring data
    • H04L43/028Capturing of monitoring data by filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level

Definitions

  • the present invention relates to a connection number measuring technique for measuring the number of connections based on a received packet.
  • the number of connections can be measured in the server by using, for example, the technique described in Non-Patent Document 1, and an accurate number can be obtained.
  • the processing performance of the server may be deteriorated.
  • Non-Patent Document 2 if the connection on the communication network is monitored by using the technique described in Non-Patent Document 2 by a network device such as a network switch, a router, and a network monitoring device, which is separate from the server, the server is not overloaded. It can count the number of connections, but it requires high-performance hardware to analyze a lot of traffic in real time.
  • the present invention is for solving such a problem, and an object of the present invention is to provide a connection number measurement technique capable of measuring the number of connections with a small amount of memory resources.
  • the connection number measuring device receives from a network I / F for transmitting and receiving packets to and from a communication network and from the communication network via the network I / F.
  • a preset field value and state control information for controlling the state of the connection are acquired from the header of the received packet, and an object indicating the connection of the received packet based on the field value and the state control information.
  • the control device includes a state memory for holding information, and the control device has a search key generation unit that generates a search key and a comparison value by dividing a hash value related to a field value of the received packet, and the state memory.
  • the state information having a reference value that matches the comparison value of the received packet from the memory selection unit that selects and acquires a plurality of state information corresponding to the search key and the state information acquired from the state memory is described above. Obtained: a state information selection unit selected as state information related to the target connection, and a state determination unit that determines the next state related to the target connection based on the state control information of the received packet and the selected state information. Based on the determination result, the memory update unit for updating the state information regarding the target connection held in the state memory is provided.
  • connection number measuring method is set in advance from a network I / F for transmitting and receiving packets to and from a communication network and a header of a received packet received from the communication network via the network I / F.
  • the field value and the state control information for controlling the state of the connection are acquired, and the next state regarding the target connection indicating the connection of the received packet is determined based on the field value and the state control information.
  • a control device that measures the number of connections for each connection based on the obtained determination result, and a state memory that holds state information including a state value indicating the state of the connection and a reference value for identifying the connection.
  • a search key generation step in which the control device generates a search key and a comparison value by dividing a hash value related to a field value of the received packet, which is a method for measuring the number of connections used in the connection number measuring device provided.
  • the reception of the memory selection step in which the control device selects and acquires a plurality of state information corresponding to the search key from the state memory, and the state information acquired by the control device from the state memory.
  • a state information selection step that selects state information having a reference value that matches the comparison value of the packet as state information related to the target connection, and the state information selected by the control device as the state control information of the received packet.
  • a state determination step for determining the next state regarding the target connection based on the above, and a memory update for updating the state information regarding the target connection held in the state memory by the control device based on the obtained determination result. It has steps.
  • the program according to the present invention is a program for making a computer function as each part constituting the above-mentioned connection number measuring device.
  • the number of connections can be measured with a small amount of memory resources.
  • FIG. 1 is a block diagram showing a configuration of a connection number measuring device according to the first embodiment.
  • FIG. 2 is a block diagram showing a configuration of a connection number counting unit according to the first embodiment.
  • FIG. 3 is an explanatory diagram showing a specific configuration example of the state memory and the memory block.
  • FIG. 4 is a block diagram showing a detailed configuration of the state memory and the state information selection unit.
  • FIG. 5 is a state transition diagram of the TCP connection.
  • FIG. 6 is a flowchart of a method for measuring the number of connections.
  • FIG. 7 is a flowchart of the connection state detection method.
  • FIG. 8 is an explanatory diagram showing a connection management operation.
  • FIG. 9 is an explanatory diagram showing a configuration example of the connection number measurement result.
  • FIG. 10 is a block diagram showing a configuration of the connection number measuring device according to the second embodiment.
  • FIG. 1 is a block diagram showing a configuration of a connection number measuring device according to the first embodiment.
  • the connection number measuring device 10 is a device that receives a packet to be monitored from a communication network NW such as the Internet or LAN, and measures a detected connection based on the obtained received packet.
  • NW such as the Internet or LAN
  • the measured number of connections is used, for example, to grasp the load status of a server used in a network service such as a carrier network or a data center.
  • the number of connections measuring device 10 may be configured as a single unit, and may be mounted on a network monitoring device or a network monitoring system that monitors the communication status of the network by measuring the number of flows and the number of connections based on packets. You may.
  • the apparatus of the present invention can also be realized by a computer and a program, and the program can be recorded on a recording medium or provided through a network.
  • connection number measuring device 10 includes a network I / F 11, an operation input device 12, a screen display device 13, a storage device 14, a control device 15, and a state memory 16 as main configurations. ..
  • the network I / F11 is configured to perform data communication by transmitting and receiving packets to and from the communication network NW.
  • the operation input device 12 includes an operation input device such as a keyboard, a mouse, and a touch panel, and is configured to detect an operator's operation and output it to the control device 15.
  • the screen display device 13 is composed of a screen display device such as an LCD, and is configured to display various screens such as a menu screen, a setting screen, and a monitoring result screen output from the control device 15.
  • the storage device 14 is composed of a storage device such as a hard disk or a semiconductor memory, and is configured to store the processing data and the program 14P used for the connection number measurement process executed by the control device 15.
  • the program 14P is a program for realizing various processing units that execute connection number measurement processing by cooperating with the CPU of the control device 15.
  • the program 14P is read in advance from a connected external device or recording medium and stored in the storage device 14.
  • the control device 15 is composed of a combination of a general server device and an FPGA (Field-Programable Gate Array) accelerator. Since high-speed packet processing can be performed by using the FPGA accelerator, it can also be applied to traffic monitoring in high-speed networks such as 40 Gbps (Gigabits per second) and 100 Gbps. On the other hand, since high-speed packet processing is not required in a low-speed network, it is possible to configure all processing with a single server equipped with software.
  • FPGA Field-Programable Gate Array
  • control device 15 has a CPU and its peripheral circuits (including an FPGA accelerator), and various processing units that execute the connection number measurement process by reading the program 14P of the storage device 14 and cooperating with the CPU. Will be described as an example when it is configured to realize.
  • the main processing units realized by the control device 15 include a packet reception unit 15A, a header analysis unit 15B, a connection number counting unit 15C, and a connection number counting unit 15C.
  • the packet receiving unit 15A is configured to receive a packet to be monitored from the communication network NW via the network I / F11.
  • the packet received by the packet receiving unit 15A may be a packet transmitted to the connection number measuring device 10, or may be a packet copied (captured) by a network device such as a switch, a router, or a network tap.
  • the header analysis unit 15B is configured to extract one or a plurality of predetermined field values from the header of the received packet received by the packet reception unit 15A.
  • a connection is a virtual communication path set between processes in order to accurately transfer packets used for data transfer.
  • a field value such as a MAC address, a protocol, an IP address, or a port number is used.
  • a combination of source IP address, destination IP address, source port number, destination port number, and protocol (5-tuple) is often used for connection identification.
  • field values such as VLAN ID and VXLAN ID may be used.
  • the header analysis unit 15B acquires the state control information used for controlling the connection from the header or payload of the packet.
  • the control flag which is the state control information used in TCP (Transmission Control Protocol) communication, includes a URG (Urgent) flag, an ACK (Acknowledgement) flag, and a PSH (Push) flag, each of which consists of 1-bit width information.
  • URG User Agent
  • ACK Acknowledgement
  • PSH Push flag
  • connection number counting unit 15C increases or decreases the number of corresponding connection counts based on the next state of the connection detected from the field value obtained by the header analysis unit 15B, and the obtained counting result is monitored by the network to be monitored.
  • the number of connections is configured to be output to a higher-level device (not shown) connected via the screen display device 13 or the network I / F 11. Further, the obtained counting result may be used for monitoring or traffic control processing separately executed by the control device 15.
  • the state memory 16 is composed of a semiconductor memory as a whole, and is composed of a plurality of memory blocks BLK having the same address (address space).
  • FIG. 1 shows an example in which N (N is an integer of 1 or more) state memories # 1, ..., # N are provided. Further, a case where each state memory 16 is composed of M (M is an integer of 1 or more) memory blocks BLK will be described as an example. At least one of N and M is 2 or more.
  • the state memory 16 has a state value indicating the state of the connection as the state information SD related to the connection for each connection to be measured by these memory blocks BLK (for example, in the case of TCP connection, SYN state, ACK state, FIN / RST). State) Holds State and comparison value Comp.
  • the comparison value Comp is a reference value Ref for identifying the corresponding connection. Details of the state memory 16 will be described later.
  • connection number counting unit 15C mainly includes a hash value calculation unit 21, a search key generation unit 22, a memory selection unit 23, a state information selection unit 24, a state determination unit 25, and a counter 26. And a memory update unit 27 is provided.
  • the hash value calculation unit 21 is configured to calculate the hash value Hash from the field value Field acquired by the header analysis unit 15B based on a preset hash function.
  • the hash value Hash needs to have a length that can uniquely identify the connection to be measured, and for example, 32 bits to 64 bits is a realistic length.
  • a known algorithm such as MurmurHash3 may be used as the hash function used for calculating the hash value Hash.
  • the search key generation unit 22 is configured to cut out a part of the hash value Hash obtained by the hash value calculation unit 21 to generate a search key Key and a comparison value Comp.
  • a method of cutting out the hash value Hash for example, there is a method of dividing into a high-order bit and a low-order bit, one of which is used as the search key Key and the other of which is used as the comparison value Comp.
  • the search key Key and the comparison value Comp can be generated by using different bit strings among the bit strings constituting the hash value Hash.
  • This division method is suitable for hardware and can be realized with an extremely simple circuit configuration.
  • the memory selection unit 23 selects the target state memory 16 from the N state memories 16 based on the search key Key generated by the search key generation unit 22, and sets the address information Addr consisting of the search key Key. Based on this, it is configured to instruct to output the state information SD related to the connection in parallel from all the memory blocks BLK inside the selected state memory 16. Since the search key Key is shorter than the original hash value Hash, the same search key Key may be generated for different connections. Therefore, in the present embodiment, the state memory 16 is provided with a plurality of memory blocks BLK so that the connections can be managed individually.
  • FIG. 3 is an explanatory diagram showing a specific configuration example of the state memory and the memory block.
  • FIG. 3 shows a state memory 16 using two memory blocks BLK # 1 and # 2, and four storages of address information Addr “1” to “4” in each memory block BLK # 1 and # 2.
  • An example is shown in which the area is provided.
  • FPGA has a plurality of small memories inside, and is suitable for such a configuration.
  • the number of state memories 16 (number of storage areas) and the number of memory block BLKs are not limited to the example of FIG. 3, and the number of connections such as the number of connections to be monitored and the types of connections are measured. It may be changed as appropriate according to the application using the device 10.
  • the search key Key output from the memory selection unit 23 is used as the address information Addr to be input to the state memory 16.
  • the state memory 16 reads the state information SD held in the storage area corresponding to the address information Addr from all the memory blocks BLK # 1 and # 2, and each of them is in parallel. Output to the status information selection unit 24.
  • the state information selection unit 24 in the subsequent stage has the state information SD corresponding to the connection of the received packet. Is configured to select.
  • the state information selection unit 24 acquires the state information SD of each memory block BLK output from the state memory 16 selected by the memory selection unit 23, and generates a search key for the reference value Ref included in these state information SDs. Compared with the comparison value Comp related to the received packet output from unit 22, the reference value Ref that matches the comparison value Comp and one state value State included in the corresponding state information SD are selected and output to the state determination unit 25. It is configured to do. Further, if the reference value Ref does not match the comparison value Comp, the state information selection unit 24 determines that the connection of the received packet is new and the state value State held in each memory block BLK. It is configured to output to the memory update unit 27.
  • FIG. 4 is a block diagram showing a detailed configuration of the state memory and the state information selection unit.
  • the state information selection unit 24 includes M comparators CMPs corresponding to the memory block BLK.
  • the state information selection unit 24 compares the reference value Ref of the state information SD received from the memory block BLK and the comparison value Comp of the received packet with the comparator CMP corresponding to each memory block BLK, and the comparison obtained. Notify the selector SEL of the result. Since this processing can be performed in parallel, it is suitable for hardware that can perform parallel processing.
  • connection can be uniquely specified at this point, and the selector SEL can output a state matching the input connection. On the other hand, it is possible that they do not match any of the candidates. In that case, if there is a free memory block BLK that does not manage the connection, the state determination unit 25 in the subsequent stage is notified that the input packet belongs to the new connection, and it cannot be managed without the free memory block BLK. , Ignore input packets. Therefore, in this configuration, connections can be managed within a range that does not exceed the number of memory blocks BLK.
  • the number of memory block BLKs required for the number of connections that are expected to be managed at the same time can be easily estimated by simulating a hash function and evaluating the maximum number of search keys.
  • the state determination unit 25 determines the next state of the connection by referring to the state transition diagram based on the state value State of the connection output from the state information selection unit 24 and the control flag included in the received packet. It is configured in.
  • FIG. 5 is a state transition diagram of the TCP connection, and by using this state transition diagram, the next state of the TCP connection is determined based on the current state value State and the newly notified state control information Flag. can do.
  • the main states of the TCP connection are the SYN state 30, the ACK state 31, and the FIN / RST state 32.
  • the SYN state 30 indicates a state in which one process notifies the other of a connection establishment request (SYN flag).
  • the ACK state 31 indicates a state in which an establishment response (ACK flag) is notified from the other to one when the establishment request is permitted.
  • the FIN / RST state 32 indicates a state in which one or the other notifies the other party of a connection disconnection request (FIN flag) or interruption (RST flag).
  • the counter 26 is configured to update the count value when the state determination unit 25 detects the establishment or disconnection of the connection as the next state.
  • the memory update unit 27 outputs status information from the status information selection unit 24 when a change in the connection status is detected in the status determination unit 25 or when a new connection is detected in the status information selection unit 24. Based on the SD, the state value State and the reference value Ref of the corresponding memory block BLK are updated, and for a new connection, the empty memory block BLK of the selected state memory 16 that is not used for connection management. It is configured to newly store (update) the state information SD.
  • connection number measuring device 10 Next, the operation of the connection number measuring device 10 according to the present embodiment will be described. Here, the connection number measurement operation, the state detection operation, and the connection management operation in the state memory 16 in the control device 15 will be described individually.
  • FIG. 6 is a flowchart of a method for measuring the number of connections.
  • the control device 15 confirms whether a packet has been received from the communication network NW via the network I / F11 by the packet receiving unit 15A (step S100), and waits until a new packet is received (step S100: NO).
  • step S100 When a new packet is received (step S100: YES), the control device 15 extracts the preset field value Field from the header of the received received packet by the header analysis unit 15B (step S101). , The state control information (control flag) Flag for controlling the state of the connection is extracted (step S102). Next, the control device 15 confirms the next state regarding the connection of the received packet by the connection number counting unit 15C based on the state information SD of the holding connection (step S103).
  • step S103 when the next state indicates the start of the connection (step S103: start), the count value indicating the number of connections is incremented (+1) by the connection number counting unit 15C (step S104), and held by the connection number counting unit 15C.
  • the state value State of the connected connection is updated (step S106), and the process proceeds to step S107 described later.
  • step S103: end When the next state indicates the end (disconnection) of the connection (step S103: end), the connection number counting unit 15C decrements (-1) the count value indicating the number of connections (step S105), and proceeds to step S106. do.
  • step S107 the control device 15 confirms whether or not it is the counting operation end timing based on the operator operation detected by the operation input device 12, the preset counting operation end time, and the like (step S107), and the counting operation. (Step S107: NO), the process returns to step S100 described above. Further, when the counting operation end timing is reached (step S107: YES), a series of connection number measurement processing is terminated.
  • FIG. 7 is a flowchart of the connection state detection method.
  • the connection number counting unit 15C calculates the hash value Hash from the field value Field obtained by the header analysis unit 15B by the hash value calculation unit 21 (step S110), and the hash value Hash obtained by the search key generation unit 22. Is divided to generate a search key Key related to the connection of the received packet and a comparison value Comp (step S111). Next, the connection number counting unit 15C selects the state memory 16 corresponding to the connection based on the search key Key by the memory selection unit 23 (step S112), and is held in the storage area of the address corresponding to the search key Key.
  • the state information SD is acquired from all the memory blocks BLK of the state memory 16 (step S113).
  • connection number counting unit 15C compares the reference value Ref of each acquired state information SD with the comparison value Comp by the state information selection unit 24 (step S114).
  • the connection number counting unit 15C has the state value State of the state information SD acquired from the corresponding memory block BLK by the state determination unit 25.
  • the next state of the connection is determined based on (current state) and the state control information Flag extracted by the header analysis unit 15B (step S116), and the connection of the memory block BLK is determined based on the obtained next state. Updates the state information SD related to (step S117), and ends a series of state detection processes.
  • step S115 when there is no reference value Ref that matches the comparison value Comp (step S115: NO), the connection number counting unit 15C is in the storage area of the address in the memory block BLK of the corresponding state memory 16. Check if there is a free memory block BLK that does not store the status information SD and is not used for connection management (step S118).
  • step S118: NO the connection number counting unit 15C does not determine the next state or update the memory block, discards the received packet, and performs a series of state detection processes. To finish.
  • step S118 when there is a free memory block BLK in step S118 (step S118: YES), the connection number counting unit 15C is the connection based on the state control information Flag extracted by the header analysis unit 15B by the state determination unit 25.
  • the next state of the above is determined (step S119), and based on the obtained next state, the state information SD related to the connection of the free memory block BLK is held (updated) (step S120), and a series of state detection processes is terminated. ..
  • FIG. 8 is an explanatory diagram showing a connection management operation.
  • the state memory 16 is one
  • the memory blocks BLK are two (BLK # 1 and # 2), and the storage area (address) is one will be described as an example. do. Therefore, the search key Key of each connection is always duplicated.
  • Time T0 is the initial state, and each memory block BLK is empty.
  • the control flag "SYN" and the comparison value Comp "RefA” included in the received packet are set to the state value State and reference value of the state information SD related to the connection A. It is held in the memory block BLK # 1 as Ref. From this point onward, the reference value "RefA" is used for comparison with the comparison value Comp of the new received packet.
  • connection B is received at time T3
  • the comparison value Comp "RefB” does not match the reference value Ref of any state information SD held in each memory block BLK, so that connection B Is determined to be a new connection.
  • the control flag included in the received packet is "SYN”, it is expected that the connection B will be established in the future. Therefore, the free memory block BLK # 2 is used as the state information SD related to the connection B.
  • the state value "SYN" and the reference value "RefB" are held.
  • the configuration of one state memory 16 and a plurality of memory blocks BLK is the most efficient.
  • the word length may not be freely set, and the memory utilization efficiency may decrease by consuming a word length longer than necessary.
  • FIG. 9 is an explanatory diagram showing a configuration example of the connection number measurement result.
  • the number of connections obtained by measurement is output in association with a rule for identifying the connection.
  • Each rule is information for identifying a connection to be monitored, and is preset by an operator using, for example, an operation input device 12 and a screen display device 13.
  • a rule specific setting values regarding the field value Field composed of the source IP address, the destination IP address, and the protocol type are set.
  • the number of connections associated with that rule is incremented (+1) or decremented (-1).
  • the operator can monitor the number of the connections only by setting the field value Field related to the connection to be monitored as the setting value of the rule.
  • the state memory 16 holds the state information SD including the state value State indicating the state of the connection and the reference value Ref for identifying the connection, and the control device 15 receives the state information SD.
  • the search key Key and the comparison value Comp are generated, and a plurality of state information SDs corresponding to the search key Key are selected and acquired from the state memory 16.
  • the state information SD having a reference value Ref that matches the comparison value Comp of the received packet is selected as the state information SD related to the target connection, and the state control information Flag of the received packet and the selected state information SD are selected.
  • the next state regarding the target connection is determined, and the state information SD regarding the target connection held in the state memory 16 is updated based on the obtained determination result.
  • the size of the connection table is increased by using the hash value corresponding to the field information included in the header of the input packet for the search key of the connection table. Regardless of this, it is possible to search in a constant time. Therefore, it is useful for searching a large connection table that manages a large number of connections.
  • the search key Key used when acquiring the state information SD corresponding to the target connection of the received packet from the state memory 16 is shorter than the original hash value Hash. This can significantly reduce the size of the connection table, but may generate the same search key Key for different connections. Therefore, with only the search key Key, a so-called collision occurs in which the state information SDs of different connections are held in the same storage area of the state memory 16.
  • connection status information SD the reference value Ref for identifying the connection is held in addition to the connection status value State, and corresponds to the search key Key of the received packet.
  • the state information SD that matches the comparison value Comp of the received packet is selected as the state information SD of the target connection from the state information SDs to be performed. Therefore, the size of the connection table can be significantly reduced, and the state information SD related to the target connection of the received packet can be appropriately acquired. As a result, it is possible to measure the number of connections with a small amount of memory resources.
  • the state memory 16 is composed of a plurality of memory blocks BLKs having the same address, and the memory selection unit 23 uses the plurality of memory blocks BLKs of the state memory 16 to address the corresponding search key Key.
  • a plurality of state information SDs held in parallel are selected and acquired in parallel, and the state information selection unit 24 selects and acquires a plurality of state information SDs in parallel from the state information SDs acquired in parallel from a plurality of memory blocks BLK.
  • the state information SD having the reference value Ref that matches with may be selected as the state information SD related to the target connection.
  • Another possible configuration is to acquire a plurality of state information SDs corresponding to the search key Key (address) from the state memory 16.
  • the time required to acquire the status information SD regarding the target connection of the received packet can be kept constant regardless of the number of connections to be managed, and the increase in the number of connections can be flexibly dealt with. can do.
  • a plurality of state memories 16 are provided, and the memory selection unit 23 selects the state memory 16 corresponding to the search key Key from the state memories 16, and obtains the state information SD from the state memory 16. You may select and acquire more than one. As a result, it is possible to cope with an increase in the number of connections extremely easily by simply adding the state memory 16.
  • the state information selection unit 24 is provided with a comparator CMP corresponding to each of the plurality of memory block BLKs of the state memory 16, and each of these comparator CMPs obtains from the corresponding memory block BLK.
  • the reference value Ref of the received state information SD may be compared in parallel with the comparison value Comp of the received packet.
  • FIG. 10 is a block diagram showing a configuration of the connection number measuring device according to the second embodiment.
  • the target connection of the received packet is identified in detail based on the field value of the received packet and the number of target connections is measured in detail based on the obtained identification result will be described.
  • the connection number counting unit 15C of the control device 15 includes a rule matching unit 28.
  • the rule matching unit 28 is configured to generate an identification value ID indicating a rule that matches the target connection of the received packet from the preset connection identification rules based on the field value of the received packet. ing.
  • the rules are set in advance in the rule table according to the application of the connection number measuring device 10.
  • An identifier group for designating a server or a virtual machine (VM) for specifying a connection is registered in the rule.
  • VM virtual machine
  • search method of the rule table a general exact match search or partial match search may be used. These searches can be realized by using trees, hash tables, TCAM (Ternary Content Addressable Memory), and the like.
  • the TCAM is capable of a 1-bit unit partial match search and is used when a high-speed and flexible search is required.
  • the counter 26 may count the number of connections based on the identification value ID output from the rule matching unit 28, for example, in units of a server or a virtual machine. As a result, the number of connections can be counted in more detail, so that the number of connections can be monitored in more detail. Further, when the identification value ID output from the rule matching unit 28 does not match any of the rules, the memory update unit 27 saves the state information SD of the connection to the state memory 16. Instead, you may skip it. As a result, it is possible to avoid saving the state information SD of the non-target connection with respect to the state memory 16, and it is possible to reduce the required memory resource.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

状態メモリ(16)で、コネクションの状態を示す状態値(State)と当該コネクションを識別するための参照値(Ref)とを含む状態情報(SD)を保持し、制御装置(15)が、受信パケットのフィールド値(Field)に関するハッシュ値(Hash)を分割することにより、検索キー(Key)と比較値(Comp)とを生成し、状態メモリから検索と対応する状態情報(SD)を選択して取得し、取得した状態情報(SD)のうちから、受信パケットの比較値と一致する参照値を有する状態情報を、対象コネクションに関する状態情報として選択し、受信パケットの状態制御情報(Flag)と選択された状態情報とに基づいて、対象コネクションに関する次状態を判別し、得られた判別結果に基づいて、状態メモリで保持する対象コネクションに関する状態情報を更新する。これにより、少ないメモリリソースでコネクション数を計測することができる。

Description

コネクション数計測装置、方法、およびプログラム
 本発明は、受信したパケットに基づいてコネクション数を計測するコネクション数計測技術に関する。
 一般に、キャリアネットワークやデータセンタ等のネットワークサービスにおけるサービス運用管理では、サーバの負荷状況を把握するため、サーバのコネクション数をリアルタイムに監視する必要がある。コネクション数は、例えば、非特許文献1に記載の技術を用いることにより、サーバ内で計測することができ、正確な数を得ることができる。しかし、コネクションの監視を行うためにサーバの計算リソースの一部を占有するため、サーバの処理性能を低下させる可能性がある。
 一方、サーバとは別個の、ネットワークスイッチ、ルータ、ネットワーク監視装置などのネットワーク機器により、非特許文献2に記載の技術を用いて通信ネットワーク上のコネクションを監視すれば、サーバに負荷を与えることなくコネクションの数を計測することができるが、多くのトラフィックをリアルタイムに解析するための高性能なハードウェアが必要になる。
特開平10-260921号公報
Michael Kerrisk、「Linux System Administrator’s Manual NETSTAT(8)」、The Linux Programming Interface、[online]、2020-04-30、[2020/05/07検索]、インターネット、<URL:http://man7.org/linux/man-pages/man8/netstat.8.html>
 通信ネットワーク上でコネクション数を計測する場合、多数のコネクションを保持(管理)する必要がある。従来から、ハッシュ探索によってコネクションの状態を保持するためのコネクションテーブルを探索する方法が提案されており、コネクションテーブルの検索キーに入力パケットのヘッダに含まれるフィールド情報に対応したハッシュ値を用いることで、コネクションテーブルの大きさに依らず定数時間での検索を可能にしている。したがって、多数のコネクションを管理する大きなコネクションテーブルを検索するのに有用である。しかし、検索が失敗することを避けるため、長いハッシュ値を検索キーに用いる必要があり、管理するコネクションの数よりも大きなメモリを必要とする。さらに、コネクションは限られた時間しかアクティブにならないため、同時に利用される格納先は少なく、メモリの利用効率が低いという問題がある。
 本発明はこのような課題を解決するためのものであり、少ないメモリリソースでコネクション数を計測できるコネクション数計測技術を提供することを目的としている。
 このような目的を達成するために、本発明にかかるコネクション数計測装置は、通信網との間でパケットを送受信する網I/Fと、前記網I/Fを介して前記通信網から受信した受信パケットのヘッダから、予め設定されたフィールド値とコネクションの状態を制御するための状態制御情報とを取得し、前記フィールド値と前記状態制御情報とに基づいて、前記受信パケットのコネクションを示す対象コネクションに関する次状態を判別し、得られた判別結果に基づいて各コネクションに関するコネクション数を計測する制御装置と、前記コネクションの状態を示す状態値と当該コネクションを識別するための参照値とを含む状態情報を保持する状態メモリとを備え、前記制御装置は、前記受信パケットのフィールド値に関するハッシュ値を分割することにより、検索キーと比較値とを生成する検索キー生成部と、前記状態メモリから前記検索キーと対応する状態情報を複数選択して取得するメモリ選択部と、前記状態メモリから取得した前記状態情報のうちから、前記受信パケットの比較値と一致する参照値を有する状態情報を、前記対象コネクションに関する状態情報として選択する状態情報選択部と、前記受信パケットの状態制御情報と選択された前記状態情報とに基づいて、前記対象コネクションに関する次状態を判別する状態判別部と、得られた前記判別結果に基づいて、前記状態メモリで保持する前記対象コネクションに関する状態情報を更新するメモリ更新部とを備えている。
 また、本発明にかかるコネクション数計測方法は、通信網との間でパケットを送受信する網I/Fと、前記網I/Fを介して前記通信網から受信した受信パケットのヘッダから、予め設定されたフィールド値とコネクションの状態を制御するための状態制御情報とを取得し、前記フィールド値と前記状態制御情報とに基づいて、前記受信パケットのコネクションを示す対象コネクションに関する次状態を判別し、得られた判別結果に基づいて各コネクションに関するコネクション数を計測する制御装置と、前記コネクションの状態を示す状態値と当該コネクションを識別するための参照値とを含む状態情報を保持する状態メモリとを備えるコネクション数計測装置で用いられるコネクション数計測方法であって、前記制御装置が、前記受信パケットのフィールド値に関するハッシュ値を分割することにより、検索キーと比較値とを生成する検索キー生成ステップと、前記制御装置が、前記状態メモリから前記検索キーと対応する状態情報を複数選択して取得するメモリ選択ステップと、前記制御装置が、前記状態メモリから取得した前記状態情報のうちから、前記受信パケットの比較値と一致する参照値を有する状態情報を、前記対象コネクションに関する状態情報として選択する状態情報選択ステップと、前記制御装置が、前記受信パケットの状態制御情報と選択された前記状態情報とに基づいて、前記対象コネクションに関する次状態を判別する状態判別ステップと、前記制御装置が、得られた前記判別結果に基づいて、前記状態メモリで保持する前記対象コネクションに関する状態情報を更新するメモリ更新ステップとを備えている。
 また、本発明にかかるプログラムは、コンピュータを、前述のコネクション数計測装置を構成する各部として機能させるためのプログラムである。
 本発明によれば、少ないメモリリソースでコネクション数を計測することができる。
図1は、第1の実施の形態にかかるコネクション数計測装置の構成を示すブロック図である。 図2は、第1の実施の形態にかかるコネクション数計数部の構成を示すブロック図である。 図3は、状態メモリおよびメモリブロックの具体的な構成例を示す説明図である。 図4は、状態メモリと状態情報選択部の詳細構成を示すブロック図である。 図5は、TCPコネクションの状態遷移図である。 図6は、コネクション数計測方法のフローチャートである。 図7は、コネクション状態検出方法のフローチャートである。 図8は、コネクション管理動作を示す説明図である。 図9は、コネクション数計測結果の構成例を示す説明図である。 図10は、第2の実施の形態にかかるコネクション数計測装置の構成を示すブロック図である。
 次に、本発明の実施の形態について図面を参照して説明する。
[第1の実施の形態]
 まず、図1を参照して、本発明の第1の形態にかかるコネクション数計測装置10について説明する。図1は、第1の実施の形態にかかるコネクション数計測装置の構成を示すブロック図である。
 このコネクション数計測装置10は、監視対象となるパケットを、インターネットやLANなどの通信網NWから受信し、得られた受信パケットに基づき検出したコネクションを計測する装置である。計測されたコネクション数は、例えばキャリアネットワークやデータセンタ等のネットワークサービスで用いられているサーバの負荷状況を把握するために用いられる。
 なお、コネクション数計測装置10については、単体で構成してもよく、パケットに基づいてフロー数やコネクション数を計測することにより、ネットワークの通信状況を監視するネットワーク監視装置やネットワーク監視システムに実装してもよい。また、本発明の装置はコンピュータとプログラムによっても実現でき、プログラムを記録媒体に記録することも、ネットワークを通して提供することも可能である。
 図1に示すように、コネクション数計測装置10は、主な構成として、網I/F11、操作入力装置12、画面表示装置13、記憶装置14、制御装置15、および状態メモリ16を備えている。
[網I/F11]
 網I/F11は、通信網NWとの間でパケットを送受信することにより、データ通信を行うように構成されている。
[操作入力装置]
 操作入力装置12は、キーボード、マウス、タッチパネルなどの操作入力装置からなり、オペレータの操作を検出して制御装置15へ出力するように構成されている。
[画面表示装置]
 画面表示装置13は、LCDなどの画面表示装置からなり、制御装置15から出力されたメニュー画面、設定画面、監視結果画面などの各種画面を表示するように構成されている。
[記憶装置]
 記憶装置14は、ハードディスクや半導体メモリなどの記憶装置からなり、制御装置15で実行する、コネクション数計測処理に用いる処理データやプログラム14Pを記憶するように構成されている。
 プログラム14Pは、制御装置15のCPUと協働することにより、コネクション数計測処理を実行する各種処理部を実現するためのプログラムである。プログラム14Pは、接続された外部装置や記録媒体から、予め読み出されて記憶装置14に格納される。
[制御装置]
 制御装置15は、一般的なサーバ装置とFPGA(Field-Programable Gate Array)アクセラレータとの組み合わせから構成されている。FPGAアクセラレータを用いることで高速パケット処理を行えるため、40Gbps(Gigabits per second)や100Gbpsといった高速ネットワークにおけるトラフィック監視にも適用できる。一方、低速ネットワークにおいては高速パケット処理を必要としないため、すべての処理をソフトウェア実装したサーバ単体で構成することもできる。
 以下では、制御装置15が、CPUとその周辺回路(FPGAアクセラレータを含む)を有し、記憶装置14のプログラム14Pを読み込んでCPUと協働させることにより、コネクション数計測処理を実行する各種処理部を実現するように構成されている場合を例として説明する。
 制御装置15で実現される主な処理部として、パケット受信部15A、ヘッダ解析部15B、コネクション数計数部15C、およびコネクション数計数部15Cがある。
[パケット受信部]
 パケット受信部15Aは、網I/F11を介して通信網NWから、監視対象となるパケットを受信するように構成されている。パケット受信部15Aで受信するパケットは、コネクション数計測装置10に向けて送信されたパケットでもよいが、スイッチ、ルータ、ネットワークタップなどのネットワーク機器でコピー(キャプチャ)されたパケットであってもよい。
[ヘッダ解析部]
 ヘッダ解析部15Bは、パケット受信部15Aで受信した受信パケットのヘッダから、予め指定されている1つまたは複数のフィールド値を抽出するように構成されている。
 コネクションとは、データ転送に用いるパケットを正確に受け渡しするため、プロセス間で設定する仮想的な通信路である。一般的には、コネクションを識別する際、MACアドレス、プロトコル、IPアドレス、ポート番号などのフィールド値(識別子)が用いられる。特に、送信元IPアドレス、宛先IPアドレス、送信元ポート番号、宛先ポート番号、プロトコルの組み合わせ(5-tuple)が、コネクション識別によく利用される。また、仮想化ネットワークではVLAN IDやVXLAN IDなどのフィールド値を用いることもある。
 また、ヘッダ解析部15Bは、パケットのヘッダもしくはペイロードから、コネクションの制御に用いる状態制御情報を取得する。例えば、TCP(Transmission Control Protocol)通信で利用される状態制御情報であるコントロールフラグには、それぞれ1ビット幅の情報からなる、URG(Urgent)フラグ、ACK(Acknowledgement)フラグ、PSH(Push)フラグ、RST(Reset)フラグ、SYN(Synchronize)フラグ、およびFIN(Finish)フラグの6種類がある。
[コネクション数計数部]
 コネクション数計数部15Cは、ヘッダ解析部15Bで得られたフィールド値から検出したコネクションの次状態に基づいて、対応するコネクションのカウント数を増減し、得られた計数結果を、監視対象となるネットワークのコネクション数として、画面表示装置13あるいは網I/F11を介して接続された上位装置(図示せず)へ出力するように構成されている。また、得られた計数結果については、制御装置15で別途実行するモニタリングやトラフィック制御の処理に用いてもよい。
[状態メモリ]
 状態メモリ16は、全体として半導体メモリからなり、互いに同一アドレス(アドレス空間)を有する複数のメモリブロックBLKから構成されている。図1では、N(Nは1以上の整数)の状態メモリ#1,…,#Nを備える場合を例が示されている。また、各状態メモリ16は、M(Mは1以上の整数)個のメモリブロックBLKから構成されている場合を例として説明する。なお、N,Mのうち少なくともいずれか一方が、2以上となる。
 状態メモリ16は、これらメモリブロックBLKにより、計測対象となるコネクションごとに、当該コネクションに関する状態情報SDとして、コネクションの状態を示す状態値(例えば、TCPコネクションでは、SYN状態、ACK状態、FIN/RST状態)Stateと比較値Compとを保持する。比較値Compは、対応するコネクションを識別するための参照値Refである。状態メモリ16に関する詳細については後述する。
[コネクション数計数部の詳細]
 次に、図2を参照して、コネクション数計数部15Cの詳細について説明する。図2は、第1の実施の形態にかかるコネクション数計数部の構成を示すブロック図である。
 図2に示すように、コネクション数計数部15Cは、主な構成として、ハッシュ値計算部21、検索キー生成部22、メモリ選択部23、状態情報選択部24、状態判別部25、カウンタ26、およびメモリ更新部27を備えている。
[ハッシュ値計算部]
 ハッシュ値計算部21は、予め設定されているハッシュ関数に基づいて、ヘッダ解析部15Bで取得したフィールド値Fieldからハッシュ値Hashを計算するように構成されている。ハッシュ値Hashは、計測対象となるコネクションを一意に識別できる長さが必要であり、例えば、32ビットから64ビットが現実的な長さである。また、ハッシュ値Hashの計算に用いるハッシュ関数には、例えば、MurmurHash3など、公知のアルゴリズムを用いればよい。
[検索キー生成部]
 検索キー生成部22は、ハッシュ値計算部21で得られたハッシュ値Hashの一部を切り出して、検索キーKeyと比較値Compとを生成するように構成されている。ハッシュ値Hashの切り出し方法としては、例えば、上位ビットと下位ビットに分割して、一方を検索キーKeyとし、他方を比較値Compとする方法がある。これにより、ハッシュ値Hashを構成するビット列のうち、異なるビット列を用いて、検索キーKeyと比較値Compとを生成できる。この分割方法は、ハードウェアに適した方法であり、極めて簡素な回路構成で実現できる。
[メモリ選択部]
 メモリ選択部23は、検索キー生成部22で生成された検索キーKeyに基づいて、N個の状態メモリ16のうちから対象となる状態メモリ16を選択し、検索キーKeyからなるアドレス情報Addrに基づいて、選択した状態メモリ16の内部にある全てのメモリブロックBLKから、コネクションに関する状態情報SDを並列出力することを命令するように構成されている。検索キーKeyは元のハッシュ値Hashよりも短いため、異なるコネクションについて同一の検索キーKeyが生成されることがある。このため、本実施の形態では、状態メモリ16に複数のメモリブロックBLKを備えることで、コネクションを個別に管理可能としている。
[状態メモリの詳細]
 ここで、図3を参照して、状態メモリ16の詳細について説明する。図3は、状態メモリおよびメモリブロックの具体的な構成例を示す説明図である。
 図3には、2つのメモリブロックBLK#1,#2を用いた状態メモリ16であって、各メモリブロックBLK#1,#2にアドレス情報Addrが「1」~「4」の4つの格納領域が設けられている例が示されている。本実施の形態において、アドレスの数(=4)は状態メモリ16の数Nに対応している。例えば、FPGAは内部に小さなメモリを複数有しているため、このような構成に適している。なお、状態メモリ16の数(格納領域の数)やメモリブロックBLKの数については、図3の例に限定されるものではなく、監視対象となるコネクションの数やコネクションの種類など、コネクション数計測装置10を用いるアプリケーションに応じて、適宜変更すればよい。
 状態メモリ16に入力するアドレス情報Addrは、メモリ選択部23から出力された検索キーKeyが用いられる。状態メモリ16は、アドレス情報Addrが入力されると、すべてのメモリブロックBLK#1,#2から、アドレス情報Addrに対応する格納領域で保持している状態情報SDを読み出して、それぞれ並列的に状態情報選択部24へ出力する。このように、状態メモリ16からは複数の状態情報SDが並列的に候補として出力されるため、本実施の形態では、後段の状態情報選択部24において、受信パケットのコネクションと対応する状態情報SDを選択するように構成されている。
[状態情報選択部]
 状態情報選択部24は、メモリ選択部23により選択された状態メモリ16から出力された、各メモリブロックBLKの状態情報SDを取得し、これら状態情報SDに含まれる参照値Refを、検索キー生成部22から出力された受信パケットに関する比較値Compと比較し、比較値Compと一致する参照値Refと対応する状態情報SDに含まれる状態値Stateを1つ選択して、状態判別部25へ出力するように構成されている。また、状態情報選択部24は、いずれの参照値Refも比較値Compと一致しなければ、受信パケットのコネクションが新規であること、および、各メモリブロックBLKに保持されている状態値Stateを、メモリ更新部27に出力するように構成されている。
 図4は、状態メモリと状態情報選択部の詳細構成を示すブロック図である。図4に示すように、メモリ選択部23によっていずれか1つの状態メモリ16が選択されると、その内部にあるM個全てのメモリブロックBLKから、アドレス情報Addrと対応する格納領域で保持されている状態情報SDが、状態情報選択部24に出力される。状態情報選択部24は、メモリブロックBLKと対応してM個の比較器CMPを備えている。状態情報選択部24は、メモリブロックBLKから受け取った状態情報SDの参照値Refと、受信パケットの比較値Compとを、それぞれのメモリブロックBLKに対応する比較器CMPで比較し、得られた比較結果をセレクタSELに通知する。この処理は並列に行うことができるため、並列処理が行えるハードウェアに適している。
 元のハッシュ値Hashは十分な長さであることから、この時点でコネクションを一意に特定することができ、セレクタSELは入力されたコネクションに合った状態を出力することができる。一方、いずれの候補とも一致しないことも考えられる。その場合、コネクションを管理していない空きのメモリブロックBLKがあれば、入力パケットが新規のコネクションに属していることを後段の状態判別部25に通知し、空きメモリブロックBLKがなければ管理できないため、入力パケットを無視する。
 よって、本構成ではメモリブロックBLKの数を超えない範囲でコネクションを管理することができる。同時に管理することが想定されるコネクション数に対して必要なメモリブロックBLKの数は、ハッシュ関数のシミュレーションを行い、検索キーの最大重複数を評価することで簡単に見積もることができる。
[状態判別部]
 状態判別部25は、状態情報選択部24から出力されたコネクションの状態値Stateと受信パケットに含まれるコントロールフラグとに基づいて、状態遷移図を参照することにより、コネクションの次状態を判別するように構成されている。図5は、TCPコネクションの状態遷移図であり、この状態遷移図を用いることで、現在の状態値Stateと、新たに通知された状態制御情報Flagとに基づいて、TCPコネクションの次状態を判別することができる。
 図5に示すように、TCPコネクションの主な状態として、SYN状態30、ACK状態31、およびFIN/RST状態32がある。SYN状態30は、一方のプロセスから他方に対してコネクションの確立要求(SYNフラグ)を通知した状態を示している。ACK状態31は、確立要求を許可する際、他方から一方に対して確立応答(ACKフラグ)を通知した状態を示している。FIN/RST状態32は、一方または他方から相手に対して、コネクションの切断要求(FINフラグ)または中断(RSTフラグ)を通知した状態を示している。
[カウンタ]
 カウンタ26は、状態判別部25において、次状態としてコネクションの確立もしくは切断が検出された場合にカウント値を更新するように構成されている。
[メモリ更新部]
 メモリ更新部27は、状態判別部25において、コネクション状態の変化が検出された場合、もしくは状態情報選択部24において新規のコネクションが検出された場合に、状態情報選択部24から出力された状態情報SDに基づいて、対応するメモリブロックBLKの状態値Stateと参照値Refとを更新し、新規のコネクションについては、選択された状態メモリ16のうち、コネクション管理に使用していない空きのメモリブロックBLKに、新規に状態情報SDを格納(更新)するように構成されている。
[第1の実施の形態の動作]
 次に、本実施の形態にかかるコネクション数計測装置10の動作について説明する。ここでは、制御装置15におけるコネクション数計測動作、状態検出動作、および状態メモリ16におけるコネクション管理動作について、それぞれ個別に説明する。
 [コネクション数計測動作]
 次に、図6を参照して、制御装置15におけるコネクション数計測動作について説明する。図6は、コネクション数計測方法のフローチャートである。
 制御装置15は、まず、パケット受信部15Aにより、網I/F11を介して通信網NWからパケットが受信されたか確認し(ステップS100)、新たなパケットが受信されるまで待機する(ステップS100:NO)。
 新たなパケットが受信された場合(ステップS100:YES)、制御装置15は、ヘッダ解析部15Bにより、受信した受信パケットのヘッダから、予め設定されているフィールド値Fieldを抽出するとともに(ステップS101)、コネクションの状態を制御するための状態制御情報(コントロールフラグ)Flagを抽出する(ステップS102)。
 次に、制御装置15は、コネクション数計数部15Cにより、保持中のコネクションの状態情報SDに基づいて、受信パケットのコネクションに関する次状態を確認する(ステップS103)。
 ここで、次状態がコネクションの開始を示す場合(ステップS103:開始)、コネクション数計数部15Cにより、コネクション数を示すカウント値をインクリメント(+1)し(ステップS104)、コネクション数計数部15Cで保持しているコネクションの状態値Stateを更新し(ステップS106)、後述するステップS107へ移行する。
 また、次状態がコネクションの終了(切断)を示す場合(ステップS103:終了)、コネクション数計数部15Cにより、コネクション数を示すカウント値をデクリメント(-1)し(ステップS105)、ステップS106へ移行する。
 また、次状態が開始または終了以外である場合(ステップS103:ELSE)、後述するステップS107へ移行する。
 この後、制御装置15は、操作入力装置12で検出されたオペレータ操作や、予め設定されている計数動作終了時刻などに基づいて、計数動作終了タイミングか否か確認し(ステップS107)、計数動作を継続する場合(ステップS107:NO)、前述したステップS100に戻る。また、計数動作終了タイミングである場合(ステップS107:YES)、一連のコネクション数計測処理を終了する。
[状態検出動作]
 次に、図7を参照して、コネクション数計数部15Cにおける状態検出動作について説明する。図7は、コネクション状態検出方法のフローチャートである。
 コネクション数計数部15Cは、ハッシュ値計算部21により、ヘッダ解析部15Bで得られたフィールド値Fieldからハッシュ値Hashを計算し(ステップS110)、検索キー生成部22により、得られたハッシュ値Hashを分割して、受信パケットのコネクションに関する検索キーKeyと比較値Compとを生成する(ステップS111)。
 次に、コネクション数計数部15Cは、メモリ選択部23により、検索キーKeyに基づいてコネクションと対応する状態メモリ16を選択し(ステップS112)、検索キーKeyと対応するアドレスの格納領域に保持されている、状態情報SDを、当該状態メモリ16の全てのメモリブロックBLKから取得する(ステップS113)。
 続いて、コネクション数計数部15Cは、状態情報選択部24により、取得した各状態情報SDの参照値Refを比較値Compと比較する(ステップS114)。
 ここで、比較値Compと一致する参照値Refがある場合(ステップS115:YES)、コネクション数計数部15Cは、状態判別部25により、対応するメモリブロックBLKから取得した状態情報SDの状態値State(現状態)と、ヘッダ解析部15Bにおいて抽出した状態制御情報Flagとに基づいて、当該コネクションの次状態を判別し(ステップS116)、得られた次状態に基づいて、メモリブロックBLKの当該コネクションに関する状態情報SDを更新し(ステップS117)、一連の状態検出処理を終了する。
 一方、ステップS115において、比較値Compと一致する参照値Refがない場合(ステップS115:NO)、コネクション数計数部15Cは、対応する状態メモリ16のメモリブロックBLKのうち、当該アドレスの格納領域に状態情報SDが格納されておらず、コネクション管理に使用していない空きのメモリブロックBLKがあるか確認する(ステップS118)。ここで、空きメモリブロックBLKがない場合(ステップS118:NO)、コネクション数計数部15Cは、次状態の判別やメモリブロックの更新は行わず、当該受信パケットを破棄して、一連の状態検出処理を終了する。
 一方、ステップS118において、空きメモリブロックBLKがある場合(ステップS118:YES)、コネクション数計数部15Cは、状態判別部25により、ヘッダ解析部15Bにおいて抽出した状態制御情報Flagに基づいて、当該コネクションの次状態を判別し(ステップS119)、得られた次状態に基づいて、空きメモリブロックBLKの当該コネクションに関する状態情報SDを保持(更新)し(ステップS120)、一連の状態検出処理を終了する。
[コネクション管理動作]
 次に、図8を参照して、状態メモリ16におけるコネクション管理動作について説明する。図8は、コネクション管理動作を示す説明図である。
 ここでは、理解を容易とするため、状態メモリ16が1つであり、メモリブロックBLKが2つ(BLK#1,#2)で、格納領域(アドレス)が1つである場合を例として説明する。このため、各コネクションの検索キーKeyは常に重複することになる。
 時刻T0は、初期状態であり、各メモリブロックBLKは空である。続く時刻T1において、新たなコネクションAに属するパケットを受信した場合、その受信パケットに含まれるコントロールフラグ「SYN」と比較値Comp「RefA」が、コネクションAに関する状態情報SDの状態値Stateおよび参照値Refとして、メモリブロックBLK#1に保持される。これ以降、参照値「RefA」は新たな受信パケットの比較値Compとの比較に使用される。
 次に、時刻T2において、さらにコネクションAに属するパケットを受信し、そのコントロールフラグが「ACK」だった場合、メモリブロックBLK#1が選択されて、コネクションの「確立」と判別される。これにより、メモリブロックBLK#1に保持されている、コネクションAに関する状態情報SDの状態値Stateが、「SYN」から「ACK」に更新される。
 この後、時刻T3において、コネクションBに属するパケットを受信した場合、その比較値Comp「RefB」は、各メモリブロックBLKに保持されたいずれの状態情報SDの参照値Refとも一致しないため、コネクションBが新規のコネクションと判定される。さらに、その受信パケットに含まれるコントロールフラグが「SYN」であることから、今後コネクションBは確立されると予想されるため、空いているメモリブロックBLK#2に、コネクションBに関する状態情報SDとして、状態値「SYN」と参照値「RefB」が保持される。
 次に、時刻T4において、コネクションAに属するパケットを受信し、コントロールフラグが「FIN」でありコネクションAの切断が確認された場合、メモリブロックBLK#1で保持している、コネクションAに関する状態情報SDの状態値Stateが「FIN」に更新される。
 この後、時刻T5において、新たなコネクションCに属するパケットを受信した場合、その比較値「RefC」は、メモリブロックBLK#1,#2に保持された状態情報SDの、いずれの参照値Refとも一致しない。しかし、メモリブロックBLKに保持された状態情報SDの状態値Stateが「FIN」であり、このメモリブロックBLKはコネクション管理に使用していない空きのメモリブロックBLKであるため、このメモリブロックBLKで、状態値「SYN」と参照値「RefC」を、コネクションCの状態情報SDとして保持する。
 以上で説明したコネクション管理は、理論的には1つの状態メモリ16と複数のメモリブロックBLKの構成が最も効率的である。しかし、FPGAなどのハードウェアではワード長を自由に設定できないことがあり、必要以上のワード長を消費することでメモリの利用効率が低下する可能性がある。また、メモリブロックBLKの数に応じて比較器CMPを設ける必要があり、リソースを消費する。よって、実装するデバイスの特徴に応じてパラメータを決めるべきであり、実施例における構成は、制約に合わせて設計が可能である。
 図9は、コネクション数計測結果の構成例を示す説明図である。図9には、計測して得られたコネクション数が、当該コネクションを識別するためのルールと関連付けられて、出力されている。
 各ルールは、監視対象となるコネクションを識別するための情報であり、例えば操作入力装置12および画面表示装置13を用いて、オペレータにより予め設定される。ここでは、ルールとして、送信元IPアドレス、宛先IPアドレス、およびプロトコル種別からなるフィールド値Fieldに関する具体的な設定値が設定されている。
 例えば、受信パケットのヘッダから抽出したフィールド値Fieldが、いずれかのルールの設定値と一致した場合、そのルールに関連付けられているコネクション数が、インクリメント(+1)あるいはデクリメント(-1)される。
 これにより、オペレータが、監視対象としたいコネクションに関するフィールド値Fieldを、ルールの設定値として設定するだけで、当該コネクションの数を監視することができる。
[第1の実施の形態の効果]
 このように、本実施の形態は、状態メモリ16で、コネクションの状態を示す状態値Stateと当該コネクションを識別するための参照値Refとを含む状態情報SDを保持し、制御装置15が、受信パケットのフィールド値Fieldに関するハッシュ値Hashを分割することにより、検索キーKeyと比較値Compとを生成し、状態メモリ16から検索キーKeyと対応する状態情報SDを複数選択して取得し、取得した状態情報SDのうちから、受信パケットの比較値Compと一致する参照値Refを有する状態情報SDを、対象コネクションに関する状態情報SDとして選択し、受信パケットの状態制御情報Flagと選択された状態情報SDとに基づいて、対象コネクションに関する次状態を判別し、得られた判別結果に基づいて、状態メモリ16で保持する対象コネクションに関する状態情報SDを更新するようにしたものである。
 一般に、ハッシュ探索によってコネクションの状態値を保持するためのコネクションテーブルを探索する場合、コネクションテーブルの検索キーに入力パケットのヘッダに含まれるフィールド情報に対応したハッシュ値を用いることで、コネクションテーブルの大きさに依らず定数時間での検索を可能にしている。したがって、多数のコネクションを管理する大きなコネクションテーブルを検索するのに有用である。しかし、検索が失敗することを避けるため、長いハッシュ値を検索キーに用いる必要があり、管理するコネクションの数よりも大きなメモリを必要とする。さらに、コネクションは限られた時間しかアクティブにならないため、同時に利用される格納先は少なく、メモリの利用効率が低いという問題がある。
 本実施の形態は、状態メモリ16から、受信パケットの対象コネクションに対応する状態情報SDを取得する際に用いる検索キーKeyは、元のハッシュ値Hashよりも短い。これにより、コネクションテーブルのサイズを大幅に削減できるものの、異なるコネクションについて同一の検索キーKeyが生成されることがある。このため、検索キーKeyだけでは、異なるコネクションの状態情報SDが、状態メモリ16の同じ格納領域で保持される、いわゆる衝突が発生する。
 これに対して、本実施の形態は、コネクションの状態情報SDとして、コネクションの状態値Stateに加えて、コネクションを識別するための参照値Refを保持しておき、受信パケットの検索キーKeyと対応する状態情報SDのうちから、受信パケットの比較値Compと一致する状態情報SDを、対象コネクションの状態情報SDとして選択するようにしたものである。
 したがって、コネクションテーブルのサイズを大幅に削減できるとともに、受信パケットの対象コネクションに関する状態情報SDを、適切に取得することが可能となる。これにより、結果として、少ないメモリリソースでコネクション数を計測することが可能となる。
 また、本実施の形態において、状態メモリ16を、同一アドレスを有する複数のメモリブロックBLKで構成し、メモリ選択部23が、状態メモリ16の複数のメモリブロックBLKから、検索キーKeyと対応するアドレスで保持している状態情報SDを複数並列的に選択して取得し、状態情報選択部24が、複数のメモリブロックBLKから並列的に取得した状態情報SDのうちから、受信パケットの比較値Compと一致する参照値Refを有する状態情報SDを、対象コネクションに関する状態情報SDとして選択するようにしてもよい。
 状態メモリ16から検索キーKey(アドレス)と対応する複数の状態情報SDを取得する構成は、他にも考えられる。しかし、上記構成を採用することにより、管理するコネクション数によらず、受信パケットの対象コネクションに関する状態情報SDの取得に要する時間を一定に保つことができ、コネクション数の増大に対して柔軟に対応することができる。
 また、本実施の形態において、状態メモリ16を複数備え、メモリ選択部23が、状態メモリ16のうちから、検索キーKeyと対応する状態メモリ16を選択し、当該状態メモリ16から状態情報SDを複数選択して取得するようにしてもよい。
 これにより、状態メモリ16を追加するだけで、コネクション数の増大に対して極めて容易に対応することができる。
 また、本実施の形態において、状態情報選択部24に、状態メモリ16の複数のメモリブロックBLKのそれぞれと対応する比較器CMPを設け、これら比較器CMPのそれぞれで、対応するメモリブロックBLKから取得した状態情報SDの参照値Refを、受信パケットの比較値Compと並列的に比較するようにしてもよい。
 これにより、極めて簡素な回路構成で、複数の状態情報SDのうちから、受信パケットの対象コネクションに関する状態情報SDを取得することができる。
[第2の実施の形態]
 次に、図10を参照して、本発明の第2の実施の形態にかかるコネクション数計測装置10について説明する。図10は、第2の実施の形態にかかるコネクション数計測装置の構成を示すブロック図である。
 本実施の形態では、受信パケットのフィールド値に基づいて、受信パケットの対象コネクションを詳細に識別し、得られた識別結果に基づき対象コネクションの数を詳細に計測する場合について説明する。
 図10に示すように、本実施の形態において、制御装置15のコネクション数計数部15Cは、ルールマッチング部28を備えている。
 ルールマッチング部28は、受信パケットのフィールド値に基づいて、予め設定されているコネクション識別用のルールのうちから、受信パケットの対象コネクションとマッチングするルールを示す識別値IDを生成するように構成されている。
 ルールは、コネクション数計測装置10のアプリケーションに応じて、予めルールテーブルに設定される。ルールには、コネクションを特定するためのサーバや仮想マシン(VM)を指定するための識別子グループが登録される。また、ルールテーブルの検索方法については、一般的な完全一致検索や部分一致検索を用いればよい。これらの検索は、木やハッシュテーブル、TCAM(Ternary Content Addressable Memory)などを用いることで実現できる。特に、TCAMは1ビット単位の部分一致検索が可能であり、高速かつ柔軟な検索が必要な場合に利用される。
 カウンタ26は、ルールマッチング部28から出力された識別値IDに基づいて、例えばサーバや仮想マシンを単位として、コネクション数をカウントするようにしてもよい。これにより、より詳細にコネクション数をカウントできるようになるため、より詳細なコネクション数監視が可能になる。
 また、メモリ更新部27は、ルールマッチング部28から出力された識別値IDが、いずれのめルールにもマッチングしなかったことを示す場合、状態メモリ16に対する当該コネクションの状態情報SDの保存を行わず、スキップするようにしてもよい。これにより、状態メモリ16に対する、非対象コネクションの状態情報SDの保存を回避でき、必要となるメモリリソースを削減できる。
[実施の形態の拡張]
 以上、実施形態を参照して本発明を説明したが、本発明は上記実施形態に限定されるものではない。本発明の構成や詳細には、本発明のスコープ内で当業者が理解しうる様々な変更をすることができる。また、各実施形態については、矛盾しない範囲で任意に組み合わせて実施することができる。
 10…コネクション数計測装置、11…網I/F、12…操作入力装置、13…画面表示装置、14…記憶装置、14P…プログラム、15…制御装置、15A…パケット受信部、15B…ヘッダ解析部、15C…コネクション数計数部、15C…コネクション数計数部、16…状態メモリ、BLK…メモリブロック、21…ハッシュ値計算部、22…検索キー生成部、23…メモリ選択部、24…状態情報選択部、CMP…比較器、SEL…セレクタ、25…状態判別部、26…カウンタ、27…メモリ更新部、NW…通信網、Field…フィールド値、Flag…状態制御情報、Hash…ハッシュ値、Key…検索キー、Addr…アドレス値、SD…状態情報、State…状態値、Ref…参照値、Comp…比較値、ID…識別値。

Claims (7)

  1.  通信網との間でパケットを送受信する網I/Fと、
     前記網I/Fを介して前記通信網から受信した受信パケットのヘッダから、予め設定されたフィールド値とコネクションの状態を制御するための状態制御情報とを取得し、前記フィールド値と前記状態制御情報とに基づいて、前記受信パケットのコネクションを示す対象コネクションに関する次状態を判別し、得られた判別結果に基づいて各コネクションに関するコネクション数を計測する制御装置と、
     前記コネクションの状態を示す状態値と当該コネクションを識別するための参照値とを含む状態情報を保持する状態メモリとを備え、
     前記制御装置は、
     前記受信パケットのフィールド値に関するハッシュ値を分割することにより、検索キーと比較値とを生成する検索キー生成部と、
     前記状態メモリから前記検索キーと対応する状態情報を複数選択して取得するメモリ選択部と、
     前記状態メモリから取得した前記状態情報のうちから、前記受信パケットの比較値と一致する参照値を有する状態情報を、前記対象コネクションに関する状態情報として選択する状態情報選択部と、
     前記受信パケットの状態制御情報と選択された前記状態情報とに基づいて、前記対象コネクションに関する次状態を判別する状態判別部と、
     得られた前記判別結果に基づいて、前記状態メモリで保持する前記対象コネクションに関する状態情報を更新するメモリ更新部とを備える
     ことを特徴とするコネクション数計測装置。
  2.  請求項1に記載のコネクション数計測装置において、
     前記状態メモリを複数備え、
     前記メモリ選択部は、前記状態メモリのうちから、前記検索キーと対応する状態メモリを選択し、当該状態メモリから前記状態情報を複数選択して取得する
     ことを特徴とするコネクション数計測装置。
  3.  請求項1または2に記載のコネクション数計測装置において、
     前記状態メモリは、同一アドレスを有する複数のメモリブロックからなり、
     前記メモリ選択部は、前記状態メモリの前記複数のメモリブロックから、前記検索キーと対応するアドレスで保持している状態情報を複数並列的に選択して取得する
     ことを特徴とするコネクション数計測装置。
  4.  請求項3に記載のコネクション数計測装置において、
     前記状態情報選択部は、前記複数のメモリブロックから並列的に取得した前記状態情報のうちから、前記受信パケットの比較値と一致する参照値を有する状態情報を、前記対象コネクションに関する状態情報として選択する
     ことを特徴とするコネクション数計測装置。
  5.  請求項3または4に記載のコネクション数計測装置において、
     前記状態情報選択部は、前記状態メモリの前記複数のメモリブロックのそれぞれと対応する比較器を有し、これら比較器のそれぞれで、対応するメモリブロックから取得した状態情報の参照値を、前記受信パケットの比較値と並列的に比較する
     ことを特徴とするコネクション数計測装置。
  6.  通信網との間でパケットを送受信する網I/Fと、
     前記網I/Fを介して前記通信網から受信した受信パケットのヘッダから、予め設定されたフィールド値とコネクションの状態を制御するための状態制御情報とを取得し、前記フィールド値と前記状態制御情報とに基づいて、前記受信パケットのコネクションを示す対象コネクションに関する次状態を判別し、得られた判別結果に基づいて各コネクションに関するコネクション数を計測する制御装置と、
     前記コネクションの状態を示す状態値と当該コネクションを識別するための参照値とを含む状態情報を保持する状態メモリと
     を備えるコネクション数計測装置で用いられるコネクション数計測方法であって、
     前記制御装置が、前記受信パケットのフィールド値に関するハッシュ値を分割することにより、検索キーと比較値とを生成する検索キー生成ステップと、
     前記制御装置が、前記状態メモリから前記検索キーと対応する状態情報を複数選択して取得するメモリ選択ステップと、
     前記制御装置が、前記状態メモリから取得した前記状態情報のうちから、前記受信パケットの比較値と一致する参照値を有する状態情報を、前記対象コネクションに関する状態情報として選択する状態情報選択ステップと、
     前記制御装置が、前記受信パケットの状態制御情報と選択された前記状態情報とに基づいて、前記対象コネクションに関する次状態を判別する状態判別ステップと、
     前記制御装置が、得られた前記判別結果に基づいて、前記状態メモリで保持する前記対象コネクションに関する状態情報を更新するメモリ更新ステップと
     を備えることを特徴とするコネクション数計測方法。
  7.  コンピュータを、請求項1~請求項5のいずれかに記載のコネクション数計測装置を構成する各部として機能させるためのプログラム。
PCT/JP2020/033721 2020-09-07 2020-09-07 コネクション数計測装置、方法、およびプログラム WO2022049751A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/JP2020/033721 WO2022049751A1 (ja) 2020-09-07 2020-09-07 コネクション数計測装置、方法、およびプログラム
JP2022546840A JP7414149B2 (ja) 2020-09-07 2020-09-07 コネクション数計測装置、方法、およびプログラム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2020/033721 WO2022049751A1 (ja) 2020-09-07 2020-09-07 コネクション数計測装置、方法、およびプログラム

Publications (1)

Publication Number Publication Date
WO2022049751A1 true WO2022049751A1 (ja) 2022-03-10

Family

ID=80490817

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/033721 WO2022049751A1 (ja) 2020-09-07 2020-09-07 コネクション数計測装置、方法、およびプログラム

Country Status (2)

Country Link
JP (1) JP7414149B2 (ja)
WO (1) WO2022049751A1 (ja)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10260921A (ja) * 1997-03-17 1998-09-29 Fujitsu Ltd コンピュータ通信における通信コネクション識別方法
JP2001333093A (ja) * 2000-05-22 2001-11-30 Fujitsu Ltd ネットワークコネクションフィルタシステム
US6928054B1 (en) * 2000-09-20 2005-08-09 Nortel Networks Limited Apparatus, method, media and signals for connection-class parameter control of packet flow
JP2011229093A (ja) * 2010-04-23 2011-11-10 Hitachi Ltd ネットワーク装置

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016006942A (ja) 2014-06-20 2016-01-14 富士通株式会社 テーブル管理装置,及びテーブル管理方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10260921A (ja) * 1997-03-17 1998-09-29 Fujitsu Ltd コンピュータ通信における通信コネクション識別方法
JP2001333093A (ja) * 2000-05-22 2001-11-30 Fujitsu Ltd ネットワークコネクションフィルタシステム
US6928054B1 (en) * 2000-09-20 2005-08-09 Nortel Networks Limited Apparatus, method, media and signals for connection-class parameter control of packet flow
JP2011229093A (ja) * 2010-04-23 2011-11-10 Hitachi Ltd ネットワーク装置

Also Published As

Publication number Publication date
JPWO2022049751A1 (ja) 2022-03-10
JP7414149B2 (ja) 2024-01-16

Similar Documents

Publication Publication Date Title
US11171969B2 (en) Systems and methods for real-time configurable load determination
US9736115B2 (en) Firewall packet filtering
US9503382B2 (en) Scalable flow and cogestion control with openflow
US6820121B1 (en) Methods systems and computer program products for processing an event based on policy rules using hashing
US20160164741A1 (en) System and method of discovering paths in a network
US10277481B2 (en) Stateless forwarding in information centric networks with bloom filters
US20120207158A1 (en) Method and system for classification and management of inter-blade network traffic in a blade server
US20110206049A1 (en) Targeted flow sampling
US10498634B2 (en) Packet processing method and system, and device
US9787585B2 (en) Distributed storage system, control apparatus, client terminal, load balancing method and program
CN112311674B (zh) 报文发送方法、装置及存储介质
US20180167337A1 (en) Application of network flow rule action based on packet counter
CN111801911A (zh) 业务功能链拥塞跟踪
US11632288B2 (en) Determining the impact of network events on network applications
JPWO2012081721A1 (ja) 通信システム、ノード、パケット転送方法およびプログラム
WO2014206208A1 (zh) 数据查询方法、设备和系统
WO2022049751A1 (ja) コネクション数計測装置、方法、およびプログラム
CN110912797B (zh) 一种广播报文的转发方法及装置
WO2021240586A1 (ja) コネクション数計測装置、コネクション状態検出装置、コネクション状態検出方法、およびコネクション数計測プログラム
JP7359299B2 (ja) パケット識別装置、パケット識別方法およびパケット識別プログラム
US11831524B2 (en) Network monitoring device and connection counting method
KR20190059004A (ko) 소프트웨어 정의 네트워킹 제어 방법 및 이를 수행하는 컴퓨팅 장치
JP2017183959A (ja) 通信システム、コントローラ、方法およびプログラム

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2022546840

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20952485

Country of ref document: EP

Kind code of ref document: A1