The content of the invention
It is an object of the invention to design a kind of system and method for the meshed network detection analysis based on multithreading, solve
Above mentioned problem.
To achieve these goals, the technical solution adopted by the present invention is as follows:
A kind of system of the meshed network detection analysis based on multithreading, including:
Unionreadbat service ends, central server and management client;The Unionreadbat service ends and institute
State central server network connection;The central server passes through network connection with management client;
The Unionreadbat service ends are mainly used in that the node in meshed network is detected and analyzed, and are formed and visited
Survey result;Detection includes the transmission time of the node with analysis and packet loss is analyzed;
The central server is mainly used in interacting the result of detection with the Unionreadbat service ends;
The management client is mainly used in the management of the central server;The management includes setting the node of detection
Title, detection cycle and the node protocol of detection type.
The system of meshed network detection analysis according to claim 1 based on multithreading, it is characterised in that:It is described
Unionreadbat service ends are connected by SNMP/I CMP with the central server.
Preferably, the Unionreadbat service ends include:
Snmp protocol handles thread;It is mainly used in the agency of snmp protocol;
Packet capture thread;It is mainly used in the capture of the packet to node described in network, described in capturing
Packet is put into data packet buffer;
Processing data packets thread;It is mainly used in being analyzed the packet in data packet buffer, forms analysis
As a result A;And according to analysis result A, counted, form analysis result;
MIB storehouses;It is mainly used in depositing the analysis result;
Event alarm thread;It is mainly used according to the default cycle, inquires about default sensitive amount, form warning watch;Also use
Warning information is issued in the analysis result in the MIB storehouses and the threshold values information in the warning watch.
Preferably, the MIB storehouses include such as lower component:
History group:Periodic samples statistics is carried out to the packet;
Statistics group:The packet detected is subjected to statistic of classification;
System group:System information is provided for MIB storehouses;The system information includes zone name, the fortune that the node is located at
Seek business's title, Hostname, the type of the packet, the type protocol of the packet, packet drop and warning information;
Interface group:It is connected for the Unionreadbat service ends with the meshed network and interface is provided;
Alarm group:The threshold values of network performance is defined, and is alerted according to the threshold values;The network performance includes network
The time delay of bandwidth availability ratio, the packet loss of the packet and the packet;
Capture group:The packet is detected and cached;
Protocol directory:Put the snmp protocol catalogue of agency;
Protocol issuance:Counted for flow caused by the detection node;
Address of cache:For the node network address to the MAC Address of the node matching;For the node
Network address to the port of the node matching;Physical address for the node is to the address of the meshed network
Match somebody with somebody;
Network layer host:For the traffic statistics between the network layer address main frame pair in the meshed network;
Network layer matrix;For the traffic statistics between the main frame pair of the network layer address in the meshed network;
Application layer host:Main frame for the application layer address in the meshed network enters the statistics of outflow;
Using layer matrix:Statistics for flow between the main frame pair of the application layer address in the meshed network;
User's history set:Data record for user's operation;
Proxy configurations:Thread, which is handled, for snmp protocol acts on behalf of the configuration parameter that offer standard defines;
Event group:When record predefines condition, caused event;The record includes recording time, the institute of the event
State the title, IP address and event type of node.
A kind of method of the meshed network detection analysis based on multithreading, comprises the following steps:
Transmission administration order of the management client to the central server;The administration order includes probe node
System information;
The central server sends probe command according to the administration order to the Unionreadbat service ends;Institute
Stating probe command includes nodename, detection cycle and the detection protocol type of detection;
The Unionreadbat service ends are detected and right according to the probe command to the packet of meshed network
The packet is analyzed, and forms result of detection.
Preferably, the Unionreadbat service ends are visited according to the probe command to the packet of meshed network
Survey and the packet is analyzed, the specific method for forming result of detection is:
The packet capture thread of the Unionreadbat service ends is according to the probe command in the meshed network
On capture packet, and the packet of capture is put into data packet buffer;
The processing data packets thread of the Unionreadbat service ends obtains the number by the data packet buffer
Counted according to bag, and to the information of the packet, form analysis result;The information of the packet includes the class of packet
Type, size, protocol type, source address and destination address;
The Unionreadbat service ends MIB storehouses obtain the analysis result;
The Unionreadbat service ends event alarm thread inquires about default sensitive amount, shape according to the default cycle
Into warning watch;And the analysis result in the MIB storehouses and the threshold values information in the warning watch alert to issue
Information.
CDN full name is Content Delivery Network, i.e. content distributing network.
SNMP:Snmp protocol is SNMP, and SNMP is the network management standard based on TCP/IP protocol suite, and its predecessor is letter
Single gateway monitoring protocol (SGMP), for being managed to communication line.
ICMP is (Internet Control Message Protocol) Internet Control Message Protocol.It is
One sub-protocol of TCP/IP protocol suite, for transmitting control message between IP main frames, router.
MIB (management information bank):Refer to the set of the managed object in the webmaster framework of internet, managed object must maintain
It is available for some controls and status information that management program is read and write.These managed objects constitute a virtual information-storing device,
Referred to as management information bank MIB.
Beneficial effects of the present invention can be summarized as follows:
By the invention provides the interface between each network, realizing the data flow to a network segment or even whole network
The detecting function of amount.It can be realized by the present invention and safety precaution management is carried out to network, it allows central server more to have
Effect, more positive ground detection network, central server keeper can quickly tracking network, the network segment or equipment appearance event
Barrier, then using the precautionary measures, it is ensured that network can continue, provide service document;Provide the statistical number of a network
According to and result of calculation.
Embodiment
In order that technical problem solved by the invention, technical scheme and beneficial effect are more clearly understood, below in conjunction with
Drawings and Examples, the present invention will be described in further detail.It should be appreciated that specific embodiment described herein is only used
To explain the present invention, it is not intended to limit the present invention.
It is to make in view of the shortcomings of the prior art and the characteristics of CDN node network system architecture in the present embodiment
, each functional module of CDN node network system is relatively complete, and each intermodule relation is relatively clear, therefore we have invented one kind
The system and method for meshed network detection analysis based on multithreading, a kind of Unionreadbat skills are invented in our invention
Art, technological incorporation snmp protocol processing thread, packet capture thread, processing data packets thread, event alarm thread etc. 4
Thread, and MIB storehouses are combined, the common detection for completing CDN node overall network resource and analysis work.The network signal of the present invention
As shown in figure 1, Unionreadbat service ends handle thread, packet capture thread, processing data packets line by snmp protocol
The detection and analysis to meshed network are realized in 4 threads such as journey, event alarm thread and MIB storehouses;Central server passes through
SNMP/I CMP (Internet Control Message Protocol, i.e. Internet Control Message Protocol), realize to section
The configuration of spot net detection rule;
Central server by SNMP/I CMP (realize and interacted with detection information between Unionreadbat service ends,
And warning information is submitted into central server;
Management client is managed by web modes (http protocol).
The thread introduction being related in the present invention:
1) snmp protocol processing thread:This thread mainly completes the function of SNMP agent, central server and each node
Between information exchange mainly realized in this thread.Snmp protocol processing thread provides Unionreadbat service ends and the external world
Interactive interface, snmp protocol processing function is completed, realize SNMP access interfaces, received SNMP requests, it is carried out at analysis
Reason, and as requested, Unionreadba MIB storehouses are accessed, the mib object value therefrom needed simultaneously returns to requestor.
2) packet capture thread:It is responsible for providing the Unionreadbat sources of service client information, completes to institute on network
There is the capture of packet, the packet captured is put into packet buffering pond.This thread accurately completes network packet
Capturing function is the basis of other thread Correct Analysis.
For the bag in Ethernet, obtain corresponding relation angle from sender and recipient and consider, can summarize and be divided into three kinds:
Unicast packet, multicast packets and broadcast packet.Unicast packet refers to the sender of bag and recipient is man-to-man relation, and recipient is its physics
Unique main frame in the network of address mark;The recipient of multicast packets is all members in the same multicast masses with sender;
The recipient of broadcast packet is then the total All hosts of network.According to the classification for the bag that can be received, the mode of operation of network interface card is divided into 4
Kind:Broadcast, multicast, directly and mix.The network interface card of work in a broadcast mode can receive all broadcast packets to be circulated in network;
It is multicast pattern by Network card setup, it can receive all multicast packets, no matter it is group member;It is operated in Direct Model
Under network interface card can only receive the bag that destination address is the address of oneself;The network interface card being operated under promiscuous mode receives and flows through network interface card
Bag.The default operating mode of network interface card includes broadcast mode and Direct Model, i.e., it only receives the broadcast packet in network and is sent to
The bag of oneself.In the present invention, we make connecing in broadcast type network by the way that the mode of operation of network interface card is arranged into promiscuous mode
Mouth can receive all packets flowed through on network.
3) processing data packets thread:It is responsible for analyzing the data taken out in data packet buffer, and according to bag
The analysis result of the information such as type, size, protocol type, source/destination address, analytic statistics is carried out, in time update MIB storehouses
Corresponding information, realize the renewal of Unionreadbat service client informations, safeguard.Realized because this thread is layered, add new association
View type analysis is easier to complete, and the flexibility of system is bigger.
The thread gradually takes out packet from Data buffer and analyzed, and is changed accordingly according to analysis result
Information in MIB storehouses.The realization in MIB storehouses is mainly completed in this thread, mainly include statstics groups, history groups,
Protocal Dir groups, protocal Dist groups etc..Layering feature and all multi-protocols of the processing data packets thread according to network bag
Between correlation, gradually hierarchical design complete.The structure wrapped for each packet captured, foundation, from outer layer successively
Layer analysis inwards;The package informatin obtained for each layer, according to its pass with the respective sets in Unionreadbat service ends MIB
System, realizes the modification and maintenance for these group informations.
4) event alarm thread:Event alarm thread was responsible for according to the default cycle, inquired about default sensitive amount, according to
Corresponding threshold values information, decides whether to send a warning message to central server in statistical information and warning watch in MIB storehouses.
When some customizing messages are above or below specified threshold, for analyzing obtained special event, the thread will be according to default
Strategy, send warning information to central server in time.
Producing alarming mechanism has two states:The upper limit alerts and lower limit alarm.During the upper limit alerts, this mechanism is being observed
The value of variable can produce the upper limit alarm when exceeding upper limit threshold values, in this state, the mechanism for producing lower limit alarm is closed.
Once upper limit alarm produces, mechanism be put into offline alarm status and be always maintained at the state until the variable being observed reaches or
Drop to below lower limit threshold values.Equally, during lower limit alarm status, when the value for being observed variable reaches or less than lower limit valve
During value, mechanism can produce lower limit alarm, and in this condition, the mechanism for producing upper limit alarm is closed.
Alarm groups, event group functions in MIB storehouses (its information will be introduced later with maintenance process) exist
Realized in this thread.Alarm groups are closely related with event groups, and their logical Trap targets groups are together, common to complete
The Trap alarms of Unionreadbat service ends.First, keeper determines some events that will trigger alarm, by these events
Gradually it is written in event Table marks, for each alarm event, state-event is recorded respectively in event Table tables
Description, event type, the management station's common body for receiving alarm event, event caused by this class alarm event the last time etc.;So
Determined that the bound threshold values of the alarm, alarm sampling interval, sampled value and threshold values will be triggered according to specific alarm feature afterwards
The information such as the method being compared, it is respectively written into corresponding alarmTable.Because Unionreadbat service ends MIB is base
In the assurance of Global Information, the integral status of network has been reacted in the selection of its alarm threshold value information well.
Introduce in the MIB storehouses being related in the present invention
MIB storehouses can be that remote probe define a series of function, it can group well using meshed network as detection unit
Knit and record the network performance and fault history of institute's probe node, effectively record some network events, event can also be provided
And alarm function.
Unionreadbat service ends MIB provides the statistics and result of calculation of a meshed network.Therefore, in
Central server can be obtained to network by the value of the customizing messages to Unionreadbat service end MIB specific groups, analysis
The overall assurance of respective performances.
Unionreadbat service ends MIB is realization and safeguards the core of the system, and forming all threads of system is all
Realized around the access of Unionreadbat service end mib informations, renewal, maintenance, analytic function.Snmp protocol handles thread
The interface that Unionreadbat service ends MIB interacts with the external world is provided;Packet capture thread is responsible for providing Unionreadbat
The source of service end mib information;Processing data packets thread is realized the renewal of Unionreadbat service end mib informations, safeguarded;Thing
Part alerts thread according to the setting of warning information in Unionreadbat service ends MIB, completes the judgement to network failure.
Unionreadbat service ends, which sample, count, analyze obtained all-network information is all stored in
In Unionreadbat service ends MIB, the group information in Unionreadbat service ends MIB includes:
History (history group):Periodic sampling statistics are carried out to network;
Statistics (statistics group):Statistic of classification (including the difference of packet is preserved for the node of each detection
The classification of size, erroneous packets etc.);
System (system group):Offer system Global Information;
Interface (interface group):Each information from system to subnet interface is provided;
Alarm (alarm group):A series of threshold values of network performance are defined, if threshold values crosses the border, can be alerted;
Event (event group):Record all events as caused by Unionreadbat service ends;
Capture (capture group):Packet is cached;
Protocol Dir (protocol directory, Protocol directory):The catalogue of all construable agreements of agency
Record;
Protocol Dist (protocol distribution, protocol issuance):On each agreement production of each node
The statistical information of raw flow;
AddressMap (address map, address of cache):Network address is to MAC Address and port and physical address
Matched to the address of the meshed network;
Nl Host (network-layer matrix, network layer host):Flowed between main frame pair based on network layer address
The statistical information of amount;
Nl Maxtrix (network-layer matrix, network layer matrix);Based on network into address main frame to it
Between strength statistical information;
Al host (application-layer host, application layer host):Main frame disengaging stream based on application layer address
The statistical information of amount;
Al Matrix (application-layer matrix, using layer matrix):Main frame pair based on application layer address
Between flow statistical information;
UsrHistory (user history collection, user's history set):Periodically to user's setting
Variable samples and is based on the user-defined reference record data);
Probeconfig (probe configuration, proxy configurations):For Unionreadbat service ends, agency is fixed
The configuration parameter of adopted standard.
A kind of system of involved meshed network detection analysis based on multithreading, is specifically included in the present invention:
Unionreadbat service ends, central server and management client;Unionreadbat service ends are genuinely convinced with
Business device network connection;Central server passes through network connection with management client;
Unionreadbat service ends are mainly used in that the node in meshed network is detected and analyzed, and form detection knot
Fruit;Detection includes the transmission time of node with analysis and packet loss is analyzed;
Central server is mainly used in interacting result of detection with Unionreadbat service ends;
Management client is mainly used in the management of central server;Management includes setting the nodename of detection, detection week
Phase and the node protocol type of detection.Unionreadbat service ends are connected by SNMP/ICMP with central server.
Unionreadbat service ends include:
Snmp protocol handles thread;It is mainly used in the agency of snmp protocol;
Packet capture thread;It is mainly used in the capture to the packet of nodes, the packet captured is put
Enter data packet buffer;
Processing data packets thread;It is mainly used in being analyzed the packet in data packet buffer, forms analysis result
A;And according to analysis result A, counted, form analysis result;
MIB storehouses;It is mainly used in depositing analysis result;
Event alarm thread;It is mainly used according to the default cycle, inquires about default sensitive amount, form warning watch;Also use
Warning information is issued in the analysis result in MIB storehouses and the threshold values information in warning watch.
MIB storehouses include such as lower component:
History group:Periodic samples statistics is carried out to packet;
Statistics group:The packet detected is subjected to statistic of classification;
System group:System information is provided for MIB storehouses;System information include node be located at zone name, operator name,
Hostname, the type of packet, the type protocol of packet, packet drop and warning information;
Interface group:It is connected for Unionreadbat service ends with meshed network and interface is provided;
Alarm group:The threshold values of network performance is defined, and is alerted according to threshold values;Network performance utilizes including network bandwidth
The time delay of rate, the packet loss of packet and packet;
Capture group:Packet is detected and cached;
Protocol directory:Put the snmp protocol catalogue of agency;
Protocol issuance:Counted for flow caused by probe node;
Address of cache:For node network address to the MAC Address of node matching;Network address for node arrives
The matching of the port of node;Physical address for node matches to the address of meshed network;
Network layer host:For the traffic statistics between the network layer address main frame pair in meshed network;
Network layer matrix;For the traffic statistics between the main frame pair of the network layer address in meshed network;
Application layer host:Main frame for the application layer address in meshed network enters the statistics of outflow;
Using layer matrix:Statistics for flow between the main frame pair of the application layer address in meshed network;
User's history set:Data record for user's operation;
Proxy configurations:Thread, which is handled, for snmp protocol acts on behalf of the configuration parameter that offer standard defines;
Event group:When record predefines condition, caused event;Record include time of record event, node title,
IP address and event type.
Unionreadbat service ends MIB provides the ability being monitored based on MAC layer to network traffics, provides simultaneously
To the monitoring capacity of Internet:
1) statistics, history, alarm and the realization of time group function can be based on MAC layer to network continuous real-time monitoring, system
Meter historical traffic, make timely alarm.
2) Protocol directory group, agreement distribution group, network layer host group, Internet matrix group, the reality of proxy configurations group function
It is existing, it is possible to based on Internet to being measured in network between network packet point agreement statistics, each network host flow and main frame pair
Carry out comprehensive statistics.
3) system combine interface components you can well imagine for the Global Information on system and on each from system to
The information of subnet interface.
The information in MIB storehouses and maintenance process are as shown in Figure 2
1) due to the relevant information of history group control table setting periodic samples, such as sampling type, sampling period, for side
Just loop control.Controlling of sampling chained list, each chained list are generated by control information set in advance in history group control table first
Node represents a kind of history group sample types, and such as section periodic sampling, long period sample.
2) after the generation of controlling of sampling chained list, correspond to each sampling node and corresponding sample clock generator is respectively started, remember
Between recording at the beginning of all kinds sampling.
3) for the packet taken out from packet buffering pond, according to the structure of packet, gradually analyzed, then
According to the result of analysis, the group information in Unionreadbat service ends is carried out to safeguard and change accordingly:
● judgement of the maintenance of history group information based on the sampling period, sample clock generator information sampled to all kinds;
● the type (such as broadcast packet, multicast packets, unicast packet, erroneous packets) of bag, the type protocol of bag (such as IP, ARP,
RARP etc.) directly it can analyze to obtain by pack arrangement, group information is distributed to statistics group, Protocol directory group, agreement so as to realize
Modification and maintenance;
● network host combinational network matrix group be on the basis of analyzing packet address, further combined with other conditions,
The relation between each table in consideration group between group, comprehensive analysis are completed;
● maintenance, the modification of alarm group and event group formation, and the generation of alarm event, are divided to packet
On the basis of analysis, some specific network events are analyzed, judge to obtain;
● realization, renewal and the maintenance of information mainly handle thread in network packet in the invention network detection information bank
Completed with event alarm thread, wherein event alarm processing thread is responsible for completing information gathering and the dimension of alarm group and event group
Shield.
4) analysis of data above bag is completed and group information is changed after completing, and extracts next packet successively,
Repeat above-mentioned data packet analysis work.
As shown in figure 3, a kind of method of the meshed network detection analysis based on multithreading, comprises the following steps:
Transmission administration order of the management client to central server;Administration order includes the system information of probe node;
Central server sends probe command according to administration order to Unionreadbat service ends;Probe command includes visiting
Nodename, detection cycle and the detection protocol type of survey;
Unionreadbat service ends are detected to the packet of meshed network according to probe command and packet are entered
Row analysis, forms result of detection.
Unionreadbat service ends are detected to the packet of meshed network according to probe command and packet are entered
Row analysis, the specific method for forming result of detection are:
Capture data of the packet capture thread of Unionreadbat service ends according to probe command on meshed network
Bag, and the packet of capture is put into data packet buffer;
The processing data packets thread of Unionreadbat service ends obtains packet by data packet buffer, and to data
The information of bag is counted, and forms analysis result;The type of the information of packet including packet, size, protocol type, source
Location and destination address;
Unionreadbat service end MIB storehouses obtain analysis result;
Unionreadbat service end event alarm threads inquire about default sensitive amount, are formed and accused according to the default cycle
Alert table;And the analysis result in MIB storehouses and the threshold values information in warning watch issue warning information.
1) central server keeper signs in system interface by web modes, carries out system setting, including set detection
Nodename, detection cycle, protocol type etc., and detecting function is come into force.
2) all packets flowed through on network packet trapping module load capture CDN node network, and will capture
Packet be put into and set in data packet buffer.This is the processing basis of other modules.
3) network data packet handing module is responsible for analyzing the packet taken out in data packet buffer, and according to right
The analysis result of the information such as the type (such as unicast packet, broadcast packet) of bag, size, protocol type, source/destination address, is divided
Class counts, the corresponding information in time update Unionreadbat service ends MIB.
4) snmp protocol processing module, which loads, realizes SNMP access interfaces, reception SNMP requests (including Get, Get
Request, Set etc. are operated), it is analyzed and processed, and as requested, MIB storehouses are accessed, therefrom obtain MIB pairs of needs
As being worth and returning to requestor (for Get, Get Request), or relevant mib object value is set (to Set operations
Speech).
5) event alarm module is responsible for when particular network event occurs, and actively sends a warning message to genuinely convinced in predetermined
Business device.
6) according to the setting of threshold values information in Unionreadbat service end MIB warning watchs, when some customizing messages exceed
Or during less than formulating threshold values, for analyzing obtained special event, this module will be according to default strategy, in time to center service
Device sends a warning message.
7) two data storage areas have been used in system:Network packet buffering area and Unionreadbat service ends MIB.
8) network packet buffering area is used for the temporary packet captured.In the larger meshed network of network traffics,
The speed moment of capture packet is likely larger than the speed of processing data packets, it is therefore desirable to such a buffering area.Network data
The packet captured is sequentially placed into this buffering area by Packet capturing module, and processing data packets module then gradually takes from buffering area
Packet is obtained to be analyzed and processed.Bag buffering area is logically designed as the queue of a first in first out.
9) MIB storehouses are used for preserving various Unionreadbat service ends mib objects, and these objects are according to Unionreadbat
Service end MIB rules carry out tissue.
Interface between CDN central server and each meshed network is provided by patent of the present invention, realized to one
The detecting function of the data traffic of the individual network segment or even whole network.Unionreadbat service ends can be realized real to meshed network
Row safety precaution management, it allows, and central server is more effective, more positive ground probe node network, central server pipe
Reason person can failure that quickly tracking network, the network segment or equipment occur, then using the precautionary measures, it is ensured that meshed network can
Continue, provide service document.
Unionreadbat service ends MIB provides the statistics and result of calculation of a meshed network.Therefore, in
Central server can by the value of the customizing messages of specific group in Unionreadbat service end MIB meshed networks, analysis,
So as to which the entirety obtained to network respective performances is held.
The present invention is described in detail above by specific and preferred embodiment, but those skilled in the art should be bright
In vain, the invention is not limited in embodiment described above, within the spirit and principles of the invention, any modification for being made,
Equivalent substitution etc., should be included in the scope of the protection.