Network data platform based on X86 board and data collection, filtering and analysis method

By integrating the DPDK and Hyperscan frameworks on the Handling flexibility and the ability to dig deep.

CN111190662BActive Publication Date: 2024-09-17TOEC TECHNOLOGLY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010184531.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-17
Publication Date
2024-09-17
Estimated Expiration
2040-03-17

AI Technical Summary

Technical Problem

The existing network data processing platform lacks post-collection string or regular expression filtering and matching functions, especially does not support data analysis of non-ordinary Ethernet structures with MPLS labels, and users have requirements for collection, filtering and analysis of PTN signals and 60G signal processing capabilities. Not satisfied.

Method used

The DPDK and Hyperscan development frameworks are integrated on the X86 board computing blade to implement data collection, filtering and analysis methods. Combined with nDPI deep packet inspection, it provides data collection, rule hit processing and data analysis functions, and supports regular expression filtering and MPLS label data analysis.

Benefits of technology

It implements the collection, filtering and analysis functions of PTN signals to meet users' flexible processing needs for MPLS tagged data, provides filtering result sets and analysis statistical result sets, and improves the flexibility of data processing and in-depth mining capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111190662B
    Figure CN111190662B
Patent Text Reader

Abstract

The invention relates to a network data platform based on an X86 board and a data acquisition, filtering and analysis method. The invention is a network data platform based on an X86 board. The computing blade of the X86 board performs high-speed acquisition of network data packets, performs rule filtering of character strings or regular expressions of the acquired data packets, and performs packet structure analysis and processing on hit or acquired data. The platform realizes multiple functions of access acquisition / rule hit / analysis and processing of network data packets, can process 10G Ethernet signals accessed by optical fibers or 40G Ethernet signals accessed from a chassis backplane, accesses PTN network signals as a special analysis and processing platform in actual production applications, processes and outputs hit data sets and analysis and processing result sets, and the processing platform is deployed on an x86 computing blade and can be used as a processing unit of an ATCA chassis, and forms a complete set of access filtering, analysis and processing equipment for optical fiber PTN Ethernet signals with other access processing boards, which has strong flexibility and meets user needs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a network data collection, filtering and analysis processing platform, and in particular to a network data platform based on an X86 board and a data collection, filtering and analysis method. Background Art

[0002] The current network data processing platform is mostly for collection and analysis or independent collection functions, and rarely includes the function of directly filtering and matching strings or regular expressions after collection. In addition, the current data processing equipment does not support data analysis of PTN signals with MPLS labels, which are not ordinary Ethernet structures, and has no filtering function. However, users have higher and higher requirements for the collection, filtering and analysis of PTN signals with Ethernet-like structures, as well as users' requirements for 60G signal processing capabilities. In terms of design and implementation solutions, users have more and more needs for in-depth analysis of data. Currently, most people use DPDK for data routing and forwarding and simple data layer analysis. There are still few cases of using DPDK and Hyperscan to connect the processing flow and realize secondary development. In addition, most of the current data processing equipment is for the analysis and processing of standard Ethernet, and nDPI deep packet inspection is also only for standard Ethernet analysis. Summary of the invention

[0003] In view of the integrated and comprehensive requirements for the collection, filtering and analysis functions in network data processing, the present invention provides a network data platform based on an X86 board and a data collection, filtering and analysis method. The DPDK and Hyperscan development frameworks are redeveloped and integrated at the code level on the x86 board computing blade, so that the access data can be uniformly collected and filtered, and the data structure analysis and ndpi packet service identification and statistics are performed at the same time. The specific technical solution is a network data platform based on an X86 board. The external interface of the board includes four 10GE optical ports, two RG45 network ports, a console debugging interface, an HDMI access interface, two USB ports, a backplane with a 40G network port, and a gigabit network port. The X86 board system can access the display when it is started. and mouse and keyboard to check the system startup status, which is characterized by: the backplane 40GE of the x86 board is connected to the backplane 40GE of the switch board to provide a data traffic path, the 10GE optical port on the front panel of the x86 board is interconnected with the 10GE optical port on the rear panel of the line card, which is used for the base polling collection function, and the control interface of the equipment is to realize the interconnection between the backplane and Ethernet, and to interconnect the backplane gigabit network ports of all boards to realize the interaction of control instructions; divided by functional modules, it is divided into data acquisition module, rule processing module, and data analysis module, and the connection is a one-way connection between the data acquisition module and the data analysis module, the data acquisition module, the rule hit processing module, and the data analysis module are connected in sequence, among which the user data rule configuration and screening unit, the rule management unit, and the rule filtering hit unit in the rule processing module are connected in sequence.

[0004] The data acquisition, filtering and analysis method adopts the Linux platform of centos7.4, whose operating system is an x86 board. The method is characterized by: utilizing the multi-core, large-memory and high-frequency processing performance of the X86 computing blade, based on the DPDK high-speed acquisition Hyperscan high-performance filtering engine and nDPI deep packet inspection and analysis, including data acquisition, rule hit processing and data analysis. First, data acquisition, 1. Initialize the DPDK framework, take the core id and network card port number to be used as input startup parameters, and configure which core is used to enqueue the data received by a network card port, which core is used to dequeue the data for branch judgment processing, configure the analysis and processing core id, and configure the network card port 1. Enable the bottom polling enable bit and configure the promiscuous mode packet reception. 2. Core parameter analysis: The application initializes the DPDK framework and analyzes the core id allocation. Each core thread is started separately, and the rx queue and lock-free ring space are allocated to each core thread. Sufficient large pages are applied for caching. 3. Five data receiving core threads are started, and data from the backplane 40GE and the front panel 10GE are received respectively, and the enqueue operation is performed. 4. Five data processing core threads are started and data dequeue operation is prepared. When the dequeue reads the data to be processed, different processing processes will be followed according to the role of the core thread. If it is a collection core thread, it will enter the data disk collection module for processing. If not, it will enter the rule hit processing module for processing.2. Rule hit processing, which consists of creating new rules, deleting rules, and rule filtering hits. 1. Creating new rules: 1. Creating and issuing new rules from the master control. 2. Users issue new rules. Users control the network management to issue corresponding keywords or regular expression rules through the BS. We define this rule as an L4 rule based on the OSI 7-layer protocol stack, and users can also set L2 rules for the target data to be filtered. Layer and L3 layer rules, that is, L2 layer is link layer rules, L3 layer is IP layer rules. Users set rules according to application scenarios and send them to the main control. The main control sends them to each board according to the rule level. 3. Rule parsing. According to the hit principle, a complete rule is divided into three parts and configured into the hyperscan rule database. 4. The first part combines the L2 and L3 layer rule IDs into a fixed position string rule and writes it into the hyperscan rule database to obtain a rule id number. 5. The second part writes the specific L4 layer keyword or regular expression rule into the hyperscan rule database and obtains the second rule id. 6. The third part needs to perform an "and" operation on the rule ids of the first two rules, and set the hit return. The new rule is completed. 2. Delete the rule. 1. The user performs the corresponding operation in the BS network management control interface of the device. The rule operation should be deleted. 2. After the control instruction is sent to the main control, the main control sends it to the x86 board. The x86 board application parses the deletion rule content and compares it with the rule list in the local memory. 3. Scan the rule ID to be deleted and delete the corresponding rule. 4. At the same time, recompile the deleted rule library into the hyperscan rule database to achieve the effect of deleting the rule. 3. Rule filtering hit. 1. The data stream is sent to the hyperscan matching search interface hs_scan for rule filtering hit matching. If the data packet meets the rules in the rule database, it will hit the callback function and return the hit packet content. 2. Hit rule id. According to the hit rule id and the L2L3 layer rule ID carried in the data packet, query the disk processing mode of the packet. 3. Store the data dump in the specified file directory and file.3. Data analysis, 1. Relying on the core thread mechanism under the DPDK framework, specify the analysis core thread id, 2. Enable the analysis thread to scan the analysis and processing data directory. The directory scan supports multi-level nested directory scanning. Scan the directory to obtain the currently unanalyzed pcap package file, and call the packet reading interface to read the content of each Ethernet packet. 3. Enter the callback function of packet processing. First, analyze the packet structure. According to the structural characteristics of the ptn signal, analyze the outer mac header and type type. According to the type type, identify whether the next layer contains the Vlan structure. If it does, parse the 4 bytes of Vlan and obtain the outer VlanID. If not, it is directly an mpls label structure. The mpls label structure has 4 bytes as a unit and may have multiple layers of 4-byte structures. Therefore, the top and bottom bits of the mpls label are used to identify the last mpls label structure. The corresponding label value is parsed in each mpls label. If the label value carried by the last mpls label structure is 14, it is an OAM control frame. The corresponding field values ​​of lsrid and lspid are parsed according to the OAM control frame structure. If it is not an OAM control frame, the mpls label carries The inner mac header is parsed. After parsing the srcMac source mac and dstMac destination Mac, the type value is still used to determine whether there is a Vlan layer. If so, the inner VlanID is parsed. According to the type value, it is determined whether the Ethernet data carried is an ARP packet, a CDP packet, or an IP packet. After distinguishing the specific packet type, the ARP packet will parse the sender and receiver's IP and Mac carried inside it according to the ARP-related protocol standards. The CDP packet will parse the TLV variable-length format according to the CDP-related protocol standards to obtain the value of each type, such as device ID, Address, port ID, platform and other information, while the IP packet will carry IP five-tuple information, namely source IP, destination IP, source port, destination port, and parse this information according to the structural characteristics of the IP packet. 4. If the Ethernet data packet is one of the OAM, CDP, ARP, and IP packets, perform the corresponding parsing operation, and store the parsed content in the relational database for storage and convenient query and display. 5. Use nDPI deep packet inspection to identify and count the business protocols in the data, obtain application layer protocol information and key load information to obtain user behavior, and insert the analysis results into the database for storage. ;

[0005] The technical effect of the present invention is that the platform has a control interface for the processing unit, which can be quickly integrated into the whole device as a product to realize the control function. The DPDK data development kit library Hyperscan regular matching engine library nDPI deep packet inspection library is flexibly used, and the API interface provided by it is secondary developed and linked to realize seamless connection from collection to filtering. This processing platform has the triple functions of collection, filtering and analysis, which can be used at the same time or as one of the functions alone, and has strong flexibility. This processing platform realizes the collection, filtering and analysis functions of PTN signals, meets the user's flexible processing of data with MPLS labels, outputs filtering result sets and analysis and statistical result sets for users, and meets the user's filtering, collection, control and deep mining needs of data. BRIEF DESCRIPTION OF THE DRAWINGS

[0006] Figure 1 It is a hardware structure block diagram of the present invention;

[0007] Figure 2 It is a functional module block diagram of the present invention;

[0008] Figure 3 It is a data acquisition function flow chart of the present invention;

[0009] Figure 4 is a new rule flow chart of the present invention;

[0010] Figure 5 It is a flow chart of deletion rules of the present invention;

[0011] Figure 6 It is a rule filtering hit flow chart of the present invention;

[0012] Figure 7 It is a data analysis flow chart of the present invention. DETAILED DESCRIPTION

[0013] The present invention will be further described below in conjunction with the accompanying drawings.

[0014] like Figure 1 , Figure 2As shown, a network data platform based on an X86 board card, the external interface of the board card includes four 10GE optical ports, two RG45 network ports, a console debugging interface, an HDMI access interface, two USB ports, a backplane with a 40G network port and a gigabit network port. When the X86 board card system is started, a display, a mouse and a keyboard can be connected to view the system startup status. The backplane 40GE of the x86 board card is connected to the backplane 40GE of the switch board to provide a data traffic path. The 10GE optical port on the front panel of the x86 board card is interconnected with the 10GE optical port on the rear panel of the line card for the base polling collection function. The control interface of the device is realized by backplane Ethernet interconnection, and the backplane gigabit network ports of all boards are interconnected to realize control command interaction; divided by functional modules, it is divided into a data acquisition module, a rule processing module, and a data analysis module, and the connection is a one-way connection between the data acquisition module and the data analysis module. The data acquisition module, the rule hit processing module, and the data analysis module are connected in sequence, wherein the user data rule configuration and screening unit, the rule management unit, and the rule filtering hit unit in the rule processing module are connected in sequence.

[0015] like Figure 3 to Figure 7 As shown in the figure, the data collection, filtering and analysis method adopts the Linux platform of centos7.4, the multi-core, large-memory and high-frequency processing performance of the X86 computing blade, and the data collection, filtering and analysis method based on the DPDK high-speed collection Hyperscan high-performance filtering engine and nDPI deep packet inspection analysis, including data collection, rule hit processing, data analysis,

[0016] 1. Data collection,1. Initialize the DPDK framework, take the core ID and network card port number to be used as the input startup parameters, and configure which core will enqueue the data received by a network card port, which core will dequeue the data for branch judgment, configure the analysis and processing core ID, configure the bottom polling enable bit of the network card port, and configure the promiscuous mode packet reception.

[0017] 2. Core parameter parsing: The application initializes the DPDK framework and parses the core ID allocation, starts each core thread separately, allocates rx queues and lock-free ring space for each core thread, and applies for enough large pages for caching.

[0018] 3. Five data receiving core threads are started, and they receive data from the backplane 40GE and the front panel 10GE respectively, and perform queue operations.

[0019] 4. Five data processing core threads are started and ready for data dequeue operations. When the dequeue reads the data to be processed, different processing procedures will be followed according to the role of the core thread. If it is a collection core thread, it will enter the data disk collection module for processing. If not, it will enter the rule hit processing module for processing;

[0020] 2. Rule hit processing, which consists of creating new rules, deleting rules, and rule filtering hits.

[0021] 1. Create new rules.

[0022] 1. Create and issue new rules from the master control.

[0023] 2. Users issue new rules. Users control the network management through BS to issue corresponding keywords or regular expression rules. We define this rule as L4 layer rule according to the 7-layer protocol stack of OSI. Users can also set L2 layer and L3 layer rules for the target data to be filtered. That is, L2 layer is link layer rule, and L3 layer is IP layer rule. Users set rules according to application scenarios and issue them to the master control. The master control issues them to each board according to the rule level.

[0024] 3. Rule parsing: According to the hit principle, a complete rule is divided into three parts and configured into the hyperscan rule database.

[0025] 4. The first part combines the L2 and L3 rule IDs into a fixed position string rule and writes it into the hyperscan rule database to obtain a rule ID number.

[0026] 5. The second part writes the specific L4 layer keyword or regular expression rule into the hyperscan rule database and obtains the second rule id. 6. The third part needs to perform an "and" operation on the rule ids of the first two rules and set the hit return. The new rule is completed.

[0027] 2. Delete rules.

[0028] 1. The user performs the corresponding deletion rule operation in the BS network management control interface of the device.

[0029] 2. After the control instruction is sent to the main control, the main control sends it to the x86 board. The x86 board application parses the deletion rule content and compares it with the rule list in the local memory.

[0030] 3. Scan the rule ID that needs to be deleted and delete the corresponding rule.

[0031] 4. At the same time, recompile the deleted rule base into the hyperscan rule database to achieve the effect of deleting the rules;

[0032] ㈢Rule filtering hits,

[0033] 1. The data stream is sent to the match search interface hs_scan of hyperscan for rule filtering and hit matching. If the data packet meets the rules in the rule database, the callback function will be called and the hit packet content will be returned.

[0034] 2. Hit rule ID: query the disk processing mode of the packet based on the hit rule ID and the L2 and L3 rule IDs carried in the data packet.

[0035] 3. Store the data dump in the specified file directory and file;

[0036] 3. Data Analysis

[0037] 1. Relying on the core thread mechanism under the DPDK framework, specify the analysis core thread id,

[0038] 2. Enable the analysis thread to scan the analysis and processing data directory. The directory scan supports multi-level nested directory scanning. Scan the directory to obtain the pcap package files that are not currently analyzed, and call the packet reading interface to read the content of each Ethernet packet.

[0039] 3. Enter the callback function of packet processing, first analyze the packet structure, analyze the outer mac header and type type according to the structural characteristics of the ptn signal, and identify whether the next layer contains the Vlan structure according to the type type. If it does, parse the 4 bytes of Vlan and obtain the outer VlanID. If not, it is directly an mpls label structure. The mpls label structure has 4 bytes as a unit and may have multiple layers of 4-byte structures. Therefore, the last mpls label structure is identified by the top and bottom bits of the mpls label stack. The corresponding label value is parsed in each mpls label. If the label value carried by the last mpls label structure is 14, it is an OAM control frame, and the corresponding field values ​​of lsrid and lspid are parsed according to the OAM control frame structure. If it is not an OAM control frame, m The pls tag carries the inner mac header. After parsing the srcMac source mac and dstMac destination Mac, the type value is still used to determine whether there is a Vlan layer. If so, the inner VlanID is parsed. According to the type value, it is determined whether the Ethernet data carried is an ARP packet, a CDP packet, or an IP packet. After distinguishing the specific packet type, the ARP packet will parse the sender and receiver's IP and Mac carried inside it according to the ARP-related protocol standards. The CDP packet will parse the TLV variable-length format according to the CDP-related protocol standards to obtain the value of each type, such as device ID, address, port ID, platform and other information, and the IP packet will carry IP five-tuple information, namely source IP, destination IP, source port, and destination port. This information is parsed according to the structural characteristics of the IP packet.

[0040] 4. If the Ethernet data packet is one of the OAM, CDP, ARP, and IP packets, the corresponding parsing operation is performed, and the parsed content is stored in the relational database for easy query and display.

[0041] 5. Use nDPI deep packet inspection to identify and count business protocols in the data, obtain application layer protocol information and key load information to obtain user behavior, and insert the analysis results into the database for storage.

Claims

1. A data collection, filtering and analysis method for a network data platform based on an X86 board, using a Linux platform with a centos7.4 operating system as the X86 board, characterized in that: Utilizing the multi-core, large memory, and high-frequency processing performance of the X86 computing blade, the Hyperscan high-performance filtering engine based on DPDK high-speed collection, and the nDPI deep packet inspection and analysis functions, the data collection, filtering, and analysis method includes:

1. Data collection, 2. Rule hit processing, and 3. Data analysis; 1. Data Collection 1. Initialize the DPDK framework, take the core ID and network card port number to be used as input startup parameters, and configure a network card port for branch judgment processing: which core is used to enqueue data reception, which core is used to dequeue data processing, configure the analysis and processing core ID, configure the bottom polling enable bit of the network card port, and configure the promiscuous mode packet reception; 2. Core parameter parsing: The application initializes the DPDK framework and parses the core ID allocation, starts each core thread separately, allocates rx queues and lock-free ring space for each core thread, and applies for enough large pages for caching; 3. Five data receiving core threads are started, and they receive data from the backplane 40GE and the front panel 10GE respectively, and perform queue operations; 4. Five data processing core threads are started and ready for data dequeue operations. When the dequeue reads the data to be processed, different processing procedures will be followed according to the role of the core thread. If it is a collection core thread, it will enter the data collection module for processing. If not, it will enter the rule hit processing module for processing; 2. Rule hit processing, which consists of creating new rules, deleting rules, and rule filtering hits.

1. Create new rules.

1. Create and issue new rules from the master control; 2. The user issues new rules. The user controls the network management to issue corresponding keywords or regular expression rules through the BS. The rule is defined as the L4 layer rule according to the 7-layer protocol stack of OSI. The user can also set the L2 layer and L3 layer rules for the target data to be filtered. That is, the L2 layer is the link layer rule, and the L3 layer is the IP layer rule. The user sets the rules according to the application scenario and issues them to the master control. The master control issues them to each board according to the rule level.

3. Rule parsing: According to the hit principle, a complete rule is divided into three parts and configured into the hyperscan rule database; 4. The first part combines the L2 and L3 rule IDs into a fixed position string rule and writes it into the hyperscan rule database to obtain a rule ID number; 5. The second part writes the specific L4 layer keyword or regular expression rule into the hyperscan rule database and obtains the second rule id; 6. In the third part, you need to perform an "AND" operation on the rule IDs of the first two rules and set the hit return to complete the new rule creation; 2. Delete rules.

1. The user performs the corresponding deletion rule operation in the BS network management control interface of the device; 2. After the control instruction is sent to the main control, the main control sends it to the X86 board. The X86 board application parses the deletion rule content and compares it with the rule list in the local memory; 3. Scan the rule ID that needs to be deleted and delete the corresponding rule; 4. At the same time, recompile the deleted rule base into the hyperscan rule database to achieve the effect of deleting the rules; 3. Rule filtering hits, 1. The data stream is sent to the match search interface hs_scan of hyperscan for rule filtering and hit matching. If the data stream meets the rules in the rule database, the callback function will be called and the hit packet content will be returned; 2. Hit rule ID: query the disk processing mode of the data flow based on the hit rule ID and the L2 and L3 rule IDs carried in the data flow.

3. Store the data dump in the specified file directory and file; 3. Data Analysis 1. Relying on the core thread mechanism under the DPDK framework, specify the analysis core thread id; 2. Enable the analysis thread to scan the analysis and processing data directory. The directory scan supports multi-level nested directory scanning. Scan the directory to obtain the pcap package files that are not currently analyzed, and call the packet reading interface to read the content of each Ethernet packet.

3. Enter the callback function of packet processing, first analyze the packet structure, analyze the outer mac header and type type according to the structural characteristics of the ptn signal, and identify whether the next layer contains the Vlan structure according to the type type. If it does, parse the 4 bytes of Vlan and obtain the outer VlanID. If not, it is directly an mpls label structure. The mpls label structure uses 4 bytes as a unit and may have multiple layers of 4-byte structures. Therefore, the last mpls label structure is identified by the top and bottom bits of the mpls label stack. The corresponding label value is parsed in each mpls label. If the label value carried by the last mpls label structure is 14, it is an OAM control frame, and the corresponding field values ​​of lsrid and lspid are parsed according to the OAM control frame structure. If it is not an OAM control frame, m The inner mac header is carried after the pls tag. After parsing the srcMac source mac and dstMac destination mac, the type value is still used to determine whether there is a Vlan layer. If so, the inner VlanID is parsed. According to the type value, it is determined whether the Ethernet data carried is an ARP packet, a CDP packet, or an IP packet. After distinguishing the specific packet type, the ARP packet will parse the sender and receiver's IP and Mac carried inside it according to the ARP-related protocol standards. The CDP packet will parse the TLV variable-length format according to the CDP-related protocol standards to obtain the value of each type, including device ID, address, port ID, and platform information. The IP packet will carry IP five-tuple information, namely source IP, destination IP, source port, and destination port. This information is parsed according to the structural characteristics of the IP packet.

4. If the Ethernet data packet is one of the OAM, CDP, ARP, and IP packets, the corresponding parsing operation is performed, and the parsed content is stored in the relational database for easy query and display; 5. Use nDPI deep packet inspection to identify and count business protocols in the data, obtain application layer protocol information and key load information to obtain user behavior, and insert the analysis results into the database for storage.