CN106161067B - A test method and system for network management node statistics - Google Patents
A test method and system for network management node statistics Download PDFInfo
- Publication number
- CN106161067B CN106161067B CN201510178186.4A CN201510178186A CN106161067B CN 106161067 B CN106161067 B CN 106161067B CN 201510178186 A CN201510178186 A CN 201510178186A CN 106161067 B CN106161067 B CN 106161067B
- Authority
- CN
- China
- Prior art keywords
- network management
- time
- moment
- management node
- statistical value
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
技术领域technical field
本发明涉及网管测试技术领域,尤其涉及一种网管节点统计的测试方法和系统。The invention relates to the technical field of network management testing, in particular to a method and system for testing network management node statistics.
背景技术Background technique
现有技术中,网络管理员通过网管系统实现对网络设备的监控,被监控设备定时上报自身或网络的状态数据给网管系统,网管系统通过采集上报的状态数据实现对设备和网络的监测。这些状态数据由反应设备或网络运行状况的各种参数组成,这里每一个参数称之为网管节点。In the prior art, the network administrator monitors the network equipment through the network management system, the monitored equipment regularly reports the status data of itself or the network to the network management system, and the network management system monitors the equipment and the network by collecting the reported status data. These status data are composed of various parameters that reflect the operating status of the device or network, and each parameter here is called a network management node.
设备的网管节点记录的参数是否与实际相符,需要通过测试的方法来检验。一部分统计数据流量的网管节点,如:设备端口接收的字节数,使用传统的方法无法精确测准,这是因为:Whether the parameters recorded by the network management node of the device are consistent with the actual situation needs to be checked by testing. Some network management nodes that count data traffic, such as the number of bytes received by device ports, cannot be accurately measured using traditional methods, because:
1)网络中除了有被测设备数据报文之外,还有管理控制协议报文,所述被测设备数据报文的发送时间和数量可控,而所述管理控制协议报文的发送时间和数量不可控,但是目前实际测试时并没有将被测设备收到的全部管理控制协议报文统计在内,测试误差较大;1) In addition to the data packets of the device under test, there are also management control protocol packets in the network. The sending time and quantity of the data packets of the device under test are controllable, and the sending time of the management control protocol packets is controllable. However, the actual test does not count all the management and control protocol packets received by the device under test, and the test error is relatively large;
2)网管节点对网络和设备参数的统计不是实时的,而是按照设定周期间隔进行统计、并上报被测试的参数,且网管节点数据更新与统计测试操作不同步,导致测试误差较大。2) The statistics of network and device parameters by the network management node are not real-time, but are counted according to the set periodic interval and reported the parameters to be tested, and the data update of the network management node is not synchronized with the statistical test operation, resulting in a large test error.
发明内容SUMMARY OF THE INVENTION
为解决现有存在的技术问题,本发明实施例提供了一种网管节点统计的测试方法和系统。In order to solve the existing technical problems, the embodiments of the present invention provide a method and system for testing network management node statistics.
本发明实施例提供了一种网管节点统计的测试方法,该方法包括:An embodiment of the present invention provides a method for testing network management node statistics, the method comprising:
在第一时刻读取所述网管节点的第一统计值,在第二时刻读取所述网管节点的第二统计值,所述第一、二时刻为打流速率恒定的两个时刻,所述第二时刻与所述第一时刻的时间差为所述网管节点数据更新周期的整数倍,所述第一统计值和所述第二统计值为网管统计的数值;The first statistical value of the network management node is read at the first moment, and the second statistical value of the network management node is read at the second moment. The first and second moments are two moments when the flow rate is constant, so The time difference between the second moment and the first moment is an integer multiple of the data update period of the network management node, and the first statistical value and the second statistical value are the values of the network management statistics;
利用抓包工具统计第三时刻到第四时刻时间段内所述网管节点对应的实际值,所述第三、四时刻为打流速率恒定的两个时刻,所述第四时刻与第三时刻的时间差与所述第二时刻与第一时刻的时间差相等;Use the packet capture tool to count the actual values corresponding to the network management nodes in the time period from the third time to the fourth time. The time difference is equal to the time difference between the second moment and the first moment;
将所述网管节点对应的实际值与所述网管统计的所述第一统计值和所述第二统计值之间的差值进行比较。The actual value corresponding to the network management node is compared with the difference between the first statistical value and the second statistical value counted by the network management.
一个实施例中,所述第一时刻与所述第三时刻为不同时刻,所述第二时刻与所述第四时刻为不同时刻。In one embodiment, the first moment and the third moment are different moments, and the second moment and the fourth moment are different moments.
一个实施例中,所述第一时刻与所述第三时刻为同一时刻,所述第二时刻与所述第四时刻为同一时刻。In one embodiment, the first time and the third time are the same time, and the second time and the fourth time are the same time.
一个实施例中,该方法还包括:In one embodiment, the method further includes:
在开始读取网管节点的统计值和开始抓包之前,开始执行打流操作,在结束读取网管节点的统计值或结束抓包之后,结束所述打流操作;Before starting to read the statistical value of the network management node and start capturing packets, start to perform the streaming operation, and after finishing reading the statistical value of the network management node or ending capturing packets, end the streaming operation;
所述打流操作,用于建立所述网管节点对应的被测网络设备经由交换机到其它网络设备之间数据流。The streaming operation is used to establish a data stream between the network device under test corresponding to the network management node and other network devices via the switch.
其中,利用抓包工具统计第三时刻到第四时刻时间段内所述网管节点对应的实际值,包括:Wherein, the actual value corresponding to the network management node in the time period from the third moment to the fourth moment is counted by using the packet capture tool, including:
抓取第三时刻到第四时刻时间段内的所有数据报文,并依据预设标识从抓取的所有数据报文中筛选出待统计的所述网管节点的数据报文,所述预设标识用于将所述待统计的网管节点的数据报文与其它数据报文进行区分;根据已筛选出的数据报文计算出与所述网管节点统计值对应的实际值。Grab all data packets in the time period from the third moment to the fourth moment, and filter out the data packets of the network management node to be counted from all the captured data packets according to the preset identifier. The identifier is used to distinguish the data packets of the network management node to be counted from other data packets; and an actual value corresponding to the statistical value of the network management node is calculated according to the filtered data packets.
其中,待统计的网管节点的数据报文中包括:打流的数据报文和管理控制协议报文。Wherein, the data packets of the network management node to be counted include: data packets of traffic flow and management control protocol packets.
本发明实施例还提供了一种网管节点统计的测试系统,该系统包括:读取单元、抓取统计单元和比较单元;其中,The embodiment of the present invention also provides a test system for network management node statistics, the system includes: a reading unit, a grabbing statistics unit, and a comparison unit; wherein,
所述读取单元,用于在第一时刻读取所述网管节点的第一统计值,在第二时刻读取所述网管节点的第二统计值,所述第一、二时刻为打流速率恒定的两个时刻,所述第二时刻与所述第一时刻的时间差为所述网管节点数据更新周期的整数倍,所述第一统计值和所述第二统计值为网管统计的数值;The reading unit is configured to read the first statistical value of the network management node at the first moment, and read the second statistical value of the network management node at the second moment, and the first and second moments are streaming Two moments when the rate is constant, the time difference between the second moment and the first moment is an integer multiple of the data update period of the network management node, and the first statistical value and the second statistical value are the values of the network management statistics ;
所述抓取统计单元,用于利用抓包工具统计第三时刻到第四时刻时间段内所述网管节点对应的实际值,所述第三、四时刻为打流速率恒定的两个时刻,所述第四时刻与第三时刻的时间差与所述第二时刻与第一时刻的时间差相等;The capture statistics unit is configured to use the packet capture tool to count the actual values corresponding to the network management nodes in the time period from the third moment to the fourth moment, where the third and fourth moments are two moments when the streaming rate is constant, The time difference between the fourth moment and the third moment is equal to the time difference between the second moment and the first moment;
所述比较单元,用于将所述网管节点对应的实际值与所述网管统计的所述第一统计值和所述第二统计值之间的差值进行比较。The comparing unit is configured to compare the actual value corresponding to the network management node with the difference between the first statistical value and the second statistical value counted by the network management.
一个实施例中,所述第一时刻与所述第三时刻为不同时刻,所述第二时刻与所述第四时刻为不同时刻。In one embodiment, the first moment and the third moment are different moments, and the second moment and the fourth moment are different moments.
一个实施例中,所述第一时刻与所述第三时刻为同一时刻,所述第二时刻与所述第四时刻为同一时刻。In one embodiment, the first time and the third time are the same time, and the second time and the fourth time are the same time.
一个实施例中,该系统还包括:打流单元,用于在开始读取网管节点的统计值和开始抓包之前,开始执行打流操作,在结束读取网管节点的统计值或结束抓包之后,结束所述打流操作;In one embodiment, the system further includes: a streaming unit, configured to start to perform a streaming operation before starting to read the statistical value of the network management node and start capturing packets, and then finish reading the statistical value of the network management node or end capturing packets. After that, end the streaming operation;
所述打流操作,用于建立所述网管节点对应的被测网络设备经由交换机到其它网络设备之间数据流。The streaming operation is used to establish a data stream between the network device under test corresponding to the network management node and other network devices via the switch.
本发明实施例提供的网管节点统计的测试方法和系统,在第一时刻读取所述网管节点的第一统计值,在第二时刻读取所述网管节点的第二统计值,所述第一、二时刻为打流速率恒定的两个时刻,所述第二时刻与所述第一时刻的时间差为所述网管节点数据更新周期的整数倍,所述第一统计值和所述第二统计值为网管统计的数值;利用抓包工具统计第三时刻到第四时刻时间段内所述网管节点对应的实际值,所述第三、四时刻为打流速率恒定的两个时刻,所述第四时刻与第三时刻的时间差与所述第二时刻与第一时刻的时间差相等;将所述网管节点对应的实际值与所述网管统计的所述第一统计值和所述第二统计值之间的差值进行比较。本发明实施例克服了传统测试方法中测试操作与网管节点数据更新不同步导致的管理控制报文漏统计的问题,测试准确度大幅提升,误差趋近于零;同时,网管节点数据读取和抓包可分开执行独立操作,测试流程相对简单,便于做到精确控制,容易执行;另外,本发明实施例测量误差与测试的具体操作无关,每次测试基本相同,误差恒定,便于误差的统计和估算。In the method and system for testing network management node statistics provided by the embodiments of the present invention, the first statistical value of the network management node is read at the first moment, the second statistical value of the network management node is read at the second moment, and the first statistical value of the network management node is read at the second moment. Moments 1 and 2 are two times when the flow rate is constant. The time difference between the second time and the first time is an integer multiple of the data update period of the network management node. The first statistical value and the second time The statistical value is the value of the network management statistics; the actual value corresponding to the network management node in the time period from the third time to the fourth time is calculated by using the packet capture tool. The third and fourth time are two times when the flow rate is constant, so The time difference between the fourth moment and the third moment is equal to the time difference between the second moment and the first moment; the actual value corresponding to the network management node and the first statistical value and the second statistical value calculated by the network management Differences between statistical values are compared. The embodiment of the present invention overcomes the problem of missing statistics of management control messages caused by the asynchronous test operation and network management node data update in the traditional test method, the test accuracy is greatly improved, and the error approaches zero; at the same time, the network management node data read and Packet capture can be performed separately and independently, and the test process is relatively simple, which is convenient for precise control and easy execution; in addition, the measurement error in the embodiment of the present invention has nothing to do with the specific operation of the test, each test is basically the same, and the error is constant, which is convenient for error statistics. and estimates.
附图说明Description of drawings
在附图(其不一定是按比例绘制的)中,相似的附图标记可在不同的视图中描述相似的部件。具有不同字母后缀的相似附图标记可表示相似部件的不同示例。附图以示例而非限制的方式大体示出了本文中所讨论的各个实施例。In the drawings, which are not necessarily to scale, like reference numerals may describe like parts in the different views. Similar reference numbers with different letter suffixes may denote different instances of similar components. The accompanying drawings generally illustrate, by way of example and not limitation, the various embodiments discussed herein.
图1为本发明实施例所述统计测试网管节点的方法实现流程图;FIG. 1 is a flow chart for implementing a method for counting and testing network management nodes according to an embodiment of the present invention;
图2为本发明实施例所述统计测试网管节点的系统结构示意图;2 is a schematic diagram of a system structure of a statistical testing network management node according to an embodiment of the present invention;
图3为本发明另一实施例所述统计测试网管节点的系统结构示意图;3 is a schematic diagram of a system structure of a statistical testing network management node according to another embodiment of the present invention;
图4为传统测试方法的网络拓扑图;Fig. 4 is the network topology diagram of traditional test method;
图5为传统测试方法的演示图;Figure 5 is a demonstration diagram of the traditional test method;
图6为传统测试方法测试不准确问题分析演示图;Figure 6 is a demonstration diagram of the inaccurate problem analysis of the traditional test method;
图7为本发明具体应用场景所述测试方法的演示图。FIG. 7 is a demonstration diagram of the testing method described in the specific application scenario of the present invention.
具体实施方式Detailed ways
本发明的实施例中,在第一时刻读取所述网管节点的第一统计值,在第二时刻读取所述网管节点的第二统计值,所述第一、二时刻为打流速率恒定的两个时刻,所述第二时刻与所述第一时刻的时间差为所述网管节点数据更新周期的整数倍,所述第一统计值和所述第二统计值为网管统计的数值;利用抓包工具统计第三时刻到第四时刻时间段内所述网管节点对应的实际值,所述第三、四时刻为打流速率恒定的两个时刻,所述第四时刻与第三时刻的时间差与所述第二时刻与第一时刻的时间差相等;将抓包统计值与所述网管统计的所述第一统计值和所述第二统计值之间的差值进行比较。In the embodiment of the present invention, the first statistical value of the network management node is read at the first moment, and the second statistical value of the network management node is read at the second moment, and the first and second moments are the streaming rate Two constant moments, the time difference between the second moment and the first moment is an integer multiple of the data update period of the network management node, and the first statistical value and the second statistical value are the values of the network management statistics; Use the packet capture tool to count the actual values corresponding to the network management nodes in the time period from the third time to the fourth time. The time difference is equal to the time difference between the second moment and the first moment; compare the packet capture statistic value with the difference between the first statistic value and the second statistic value counted by the network management.
下面结合附图及具体实施例对本发明作进一步详细说明。The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
图1为本发明实施例所述统计测试网管节点的方法实现流程图,如图1所示,该方法包括:FIG. 1 is a flow chart for implementing a method for counting and testing network management nodes according to an embodiment of the present invention. As shown in FIG. 1 , the method includes:
步骤101:在第一时刻读取所述网管节点的第一统计值,在第二时刻读取所述网管节点的第二统计值,所述第一、二时刻为打流速率恒定的两个时刻,所述第二时刻与所述第一时刻的时间差为所述网管节点数据更新周期的整数倍,所述第一统计值和所述第二统计值为网管统计的数值;Step 101: Read the first statistical value of the network management node at the first moment, and read the second statistical value of the network management node at the second moment. The first and second moments are two with a constant flow rate. time, the time difference between the second time and the first time is an integer multiple of the data update period of the network management node, and the first statistical value and the second statistical value are the values of the network management statistics;
步骤102:利用抓包工具统计第三时刻到第四时刻时间段内所述网管节点对应的实际值,所述第三、四时刻为打流速率恒定的两个时刻,所述第四时刻与第三时刻的时间差与所述第二时刻与第一时刻的时间差相等;Step 102: Use the packet capture tool to count the actual values corresponding to the network management nodes in the time period from the third time to the fourth time. The third and fourth time are two times when the flow rate is constant. The time difference at the third moment is equal to the time difference between the second moment and the first moment;
步骤103:将所述网管节点对应的实际值与所述网管统计的所述第一统计值和所述第二统计值之间的差值进行比较。Step 103: Compare the actual value corresponding to the network management node with the difference between the first statistical value and the second statistical value counted by the network management.
本发明实施例克服了传统测试方法中测试操作与网管节点数据更新不同步导致的管理控制报文漏统计的问题,测试准确度大幅提升,误差趋近于零。另外,本发明实施例测量误差与测试的具体操作无关,每次测试基本相同,误差恒定,便于误差的统计和估算。The embodiment of the present invention overcomes the problem of missing statistics of management control messages caused by asynchronous test operation and network management node data update in the traditional test method, the test accuracy is greatly improved, and the error approaches zero. In addition, the measurement error in the embodiment of the present invention has nothing to do with the specific operation of the test. Each test is basically the same, and the error is constant, which is convenient for error statistics and estimation.
一个实施例中,所述第一时刻与所述第三时刻为不同时刻,所述第二时刻与所述第四时刻为不同时刻。In one embodiment, the first moment and the third moment are different moments, and the second moment and the fourth moment are different moments.
可见,本发明实施例网管节点数据读取和抓包可分开执行独立操作,测试流程相对简单,便于做到精确控制,容易执行。It can be seen that, in the embodiment of the present invention, the data reading and packet capturing of the network management node can be performed separately and independently, and the test process is relatively simple, which is convenient for precise control and easy execution.
一个实施例中,所述第一时刻与所述第三时刻为同一时刻,所述第二时刻与所述第四时刻为同一时刻。In one embodiment, the first time and the third time are the same time, and the second time and the fourth time are the same time.
本发明实施例中,该方法还包括:In the embodiment of the present invention, the method further includes:
在开始读取网管节点的统计值和开始抓包之前,开始执行打流操作,在结束读取网管节点的统计值或结束抓包之后,结束所述打流操作;Before starting to read the statistical value of the network management node and start capturing packets, start to perform the streaming operation, and after finishing reading the statistical value of the network management node or ending capturing packets, end the streaming operation;
所述打流操作,用于建立所述网管节点对应的被测网络设备经由交换机到其它网络设备之间数据流。The streaming operation is used to establish a data stream between the network device under test corresponding to the network management node and other network devices via the switch.
本发明实施例中,所述利用抓包工具统计第三时刻到第四时刻时间段内所述网管节点对应的实际值,包括:In the embodiment of the present invention, the statistics of the actual values corresponding to the network management nodes in the time period from the third time to the fourth time by using a packet capture tool include:
抓取第三时刻到第四时刻时间段内的所有数据报文,并依据预设标识从抓取的所有数据报文中筛选出待统计的所述网管节点的数据报文,所述预设标识用于将所述待统计的网管节点的数据报文与其它数据报文进行区分;根据已筛选出的数据报文计算出与所述网管节点统计值对应的实际值Grab all data packets in the time period from the third moment to the fourth moment, and filter out the data packets of the network management node to be counted from all the captured data packets according to the preset identifier. The identifier is used to distinguish the data packets of the network management node to be counted from other data packets; according to the filtered data packets, the actual value corresponding to the statistical value of the network management node is calculated
例如:设待测试的所述网管节点为“被测设备端口1收到的字节数”,而抓取的所有数据报文中除了包括被测设备端口1收到数据报文之外,还包括被测设备端口1发出数据报文等其它数据报文。For example: the network management node to be tested is set as "number of bytes received by port 1 of the device under test", and all data packets captured include the data packets received by port 1 of the device under test, and also Including other data packets such as data packets sent by port 1 of the device under test.
本发明实施例中,所述待统计的网管节点的数据报文中包括:打流的数据报文和管理控制协议报文。In the embodiment of the present invention, the data packets of the network management nodes to be counted include: data packets of traffic flow and management control protocol packets.
本发明实施例还提供了一种网管节点统计的测试系统,如图2所示,该系统包括:读取单元201、抓取统计单元202和比较单元203;其中,The embodiment of the present invention also provides a test system for network management node statistics. As shown in FIG. 2, the system includes: a reading unit 201, a grabbing statistics unit 202, and a comparison unit 203; wherein,
所述读取单元201,用于在第一时刻读取所述网管节点的第一统计值,在第二时刻读取所述网管节点的第二统计值,所述第一、二时刻为打流速率恒定的两个时刻,所述第二时刻与所述第一时刻的时间差为所述网管节点数据更新周期的整数倍,所述第一统计值和所述第二统计值为网管统计的数值;The reading unit 201 is configured to read the first statistical value of the network management node at the first moment, and read the second statistical value of the network management node at the second moment. Two moments when the flow rate is constant, the time difference between the second moment and the first moment is an integer multiple of the data update period of the network management node, and the first statistical value and the second statistical value are calculated by the network management value;
所述抓取统计单元202,用于利用抓包工具统计第三时刻到第四时刻时间段内所述网管节点对应的实际值,所述第三、四时刻为打流速率恒定的两个时刻,所述第四时刻与第三时刻的时间差与所述第二时刻与第一时刻的时间差相等;The capture statistics unit 202 is configured to use the packet capture tool to count the actual values corresponding to the network management nodes in the time period from the third time to the fourth time, where the third and fourth time are two times when the flow rate is constant , the time difference between the fourth moment and the third moment is equal to the time difference between the second moment and the first moment;
所述比较单元203,用于将所述网管节点对应的实际值与所述网管统计的所述第一统计值和所述第二统计值之间的差值进行比较。The comparing unit 203 is configured to compare the actual value corresponding to the network management node with the difference between the first statistical value and the second statistical value counted by the network management.
本发明实施例克服了传统测试方法中测试操作与网管节点数据更新不同步导致的管理控制报文漏统计的问题,测试准确度大幅提升,误差趋近于零。另外,本发明实施例测量误差与测试的具体操作无关,每次测试基本相同,误差恒定,便于误差的统计和估算。The embodiment of the present invention overcomes the problem of missing statistics of management control messages caused by asynchronous test operation and network management node data update in the traditional test method, the test accuracy is greatly improved, and the error approaches zero. In addition, the measurement error in the embodiment of the present invention has nothing to do with the specific operation of the test. Each test is basically the same, and the error is constant, which is convenient for error statistics and estimation.
一个实施例中,所述第一时刻与所述第三时刻为不同时刻,所述第二时刻与所述第四时刻为不同时刻。In one embodiment, the first moment and the third moment are different moments, and the second moment and the fourth moment are different moments.
可见,本发明实施例网管节点数据读取和抓包可分开执行独立操作,测试流程相对简单,便于做到精确控制,容易执行。It can be seen that, in the embodiment of the present invention, the data reading and packet capturing of the network management node can be performed separately and independently, and the test process is relatively simple, which is convenient for precise control and easy execution.
一个实施例中,所述第一时刻与所述第三时刻为同一时刻,所述第二时刻与所述第四时刻为同一时刻。In one embodiment, the first time and the third time are the same time, and the second time and the fourth time are the same time.
一个实施例中,如图3所示,该系统还包括:打流单元204,用于在开始读取网管节点的统计值和开始抓包之前,开始执行打流操作,在结束读取网管节点的统计值或结束抓包之后,结束所述打流操作;In one embodiment, as shown in FIG. 3 , the system further includes: a streaming unit 204 for starting to perform streaming operations before starting to read the statistical value of the network management node and starting to capture packets, and after finishing reading the network management node. After the statistical value of , or the end of capturing packets, end the streaming operation;
所述打流操作,用于建立所述网管节点对应的被测网络设备经由交换机到其它网络设备之间数据流。The streaming operation is used to establish a data stream between the network device under test corresponding to the network management node and other network devices via the switch.
本发明实施例中,所述抓取统计单元202利用抓包工具统计第三时刻到第四时刻时间段内所述网管节点对应的实际值,包括:In the embodiment of the present invention, the capture statistics unit 202 uses a packet capture tool to count the actual values corresponding to the network management nodes in the time period from the third time to the fourth time, including:
抓取第三时刻到第四时刻时间段内的所有数据报文,并依据预设标识从抓取的所有数据报文中筛选出待统计的所述网管节点的数据报文,所述预设标识用于将所述待统计的网管节点的数据报文与其它数据报文进行区分;根据已筛选出的数据报文计算出与所述网管节点统计值对应的实际值。Grab all data packets in the time period from the third moment to the fourth moment, and filter out the data packets of the network management node to be counted from all the captured data packets according to the preset identifier. The identifier is used to distinguish the data packets of the network management node to be counted from other data packets; and an actual value corresponding to the statistical value of the network management node is calculated according to the filtered data packets.
其中,所述待统计的网管节点的数据报文中包括:打流的数据报文和管理控制协议报文。Wherein, the data packets of the network management nodes to be counted include: streaming data packets and management control protocol packets.
为了更清楚的对本发明实施例进行描述,下面首先对传统的网管节点的测试方法进行描述,传统测试方法的网络拓扑图如图4所示,结合图5,并以网管节点为“被测设备端口1收到的字节数”为例进行说明,测试流程如下:In order to describe the embodiments of the present invention more clearly, the following first describes the testing method of the traditional network management node. The network topology diagram of the traditional testing method is shown in Fig. 4. In combination with Fig. 5, the network management node is used as the "tested device". The number of bytes received by port 1" is taken as an example to illustrate the test process as follows:
步骤一:通过网管系统模拟器401读取网管节点“被测设备端口1收到的字节数”的值,记为A,启动抓包工具402抓取所述被测设备403的端口1接收的数据包,同时利用打流工具404建立从其它网络设备405到被测设备403的数据流;Step 1: Read the value of "Number of bytes received by port 1 of the device under test" of the network management node through the network management system simulator 401, denoted as A, and start the packet capture tool 402 to capture the port 1 of the device under test 403 to receive data packets, and at the same time use the streaming tool 404 to establish a data flow from other network devices 405 to the device under test 403;
步骤二:打流一段时间后操作打流工具404停止打流,同时操作抓包工具402停止抓包,从抓取的全部数据包中筛选统计出被测设备403收到的数据字节数,记为B,将B当作被测设备端口1实际收到的字节数;Step 2: After streaming for a period of time, operate the streaming tool 404 to stop streaming, and operate the packet capture tool 402 to stop capturing packets, and screen and count the number of data bytes received by the device under test 403 from all the captured data packets. Denote B as the number of bytes actually received by port 1 of the device under test;
步骤三:从抓包停止时刻后延一个网管节点数据更新周期(为了将打流的数据报文统计在内),通过网管系统模拟器401读取网管节点“被测设备端口1收到的字节数”的值为,记为C;Step 3: Delay the data update cycle of the network management node from the time when the packet capture is stopped (in order to count the data packets that flow), and read the word received by the network management node "Port 1 of the device under test" through the network management system simulator 401. The value of "number of sections" is denoted as C;
步骤四:打流期间网管节点“被测设备端口1收到的字节数”为D=C-A,D值为网管系统统计的被测设备端口1收到的字节数;Step 4: “Number of bytes received by port 1 of the device under test” of the network management node during streaming is D=C-A, and D is the number of bytes received by port 1 of the device under test according to the statistics of the network management system;
步骤五:比较B是否等于D。Step 5: Compare whether B is equal to D.
如图6所示,被测设备端口1收到的数据报文包括:打流数据报文和管理控制协议报文,图6中黑色区域为端口1接收的打流数据报文,灰色区域为端口1接收的管理控制协议报文。打流数据流可由由打流工具控制产生和终止,打流终止后,被测设备端口1不再收到打流数据报文。管理控制协议报文是保障网络正常运行的网络管理和控制协议交互的报文,在网络中一直存在,不受测试人员的控制。网管节点的统计值是以周期T为间隔更新的:在更新点上,网管节点根据该时间点之前收到的激励执行统计和计算得到该节点的赋值;但是两次更新之间任一时刻从网管读取的“被测设备端口1接收的数据字节数”都是前一次更新的值。As shown in Figure 6, the data packets received by port 1 of the device under test include: streaming data packets and management control protocol packets. In Figure 6, the black area is the streaming data packet received by port 1, and the gray area is Management control protocol packets received by port 1. The streaming data stream can be generated and terminated under the control of the streaming tool. After the streaming is terminated, the port 1 of the device under test will no longer receive the streaming data packets. The management control protocol packet is a packet of network management and control protocol interaction to ensure the normal operation of the network. It exists in the network all the time and is not under the control of the tester. The statistical value of the network management node is updated at intervals of period T: at the update point, the network management node performs statistics and calculations according to the incentives received before the time point to obtain the node's assignment; The "number of bytes of data received by port 1 of the device under test" read by the network management is the value of the previous update.
网管节点读数D是对三个T时间段内被测设备收到的字节数的统计,因此为了测试网管节点D是否统计正确,应该将D与E相比较,而不是将D与抓包抓取的字节数B相比较,B将一部分管理控制协议报文漏掉了,因此传统的测试方案存在测试误差。The network management node reading D is the statistics of the number of bytes received by the device under test in the three T time periods. Therefore, in order to test whether the statistics of the network management node D are correct, D should be compared with E instead of D and packet capture. Compared with the number of bytes B taken, B misses a part of the management and control protocol packets, so there is a test error in the traditional test scheme.
可以推断,如果第一次读取网管节点数据、开始打流抓包和网管节点数据更新三者发生在同一时刻且打流抓包停止、第二次读取网管节点数据和网管节点数据更新三者放生在同一时刻,测试误差为零。但是这种同步的情形在实际的测试操作中是无法实现的,因此测试操作与网管节点数据更新在时间上的不同步导致了测试误差的存在。It can be inferred that if the first reading of the network management node data, the start of packet capture and the update of the network management node data occur at the same time, and the packet capture stops, the second reading of the network management node data and the update of the network management node data occur at the same time. were released at the same time, and the test error was zero. However, this kind of synchronization cannot be realized in the actual test operation, so the time out of synchronization between the test operation and the data update of the network management node leads to the existence of test errors.
在实际测试中,第一次读取网管节点数据、开始打流抓包和网管节点数据与网管节点数据更新在时间上的相对位置无法控制,打流抓包停止、第二次读取网管节点数据和网管节点数据更新在时间上的相对位置无法控制。因此测试误差每次测试都有所不同,测试误差不恒定,具体取决于抓包开始与抓包结束的时机,测试误差波动很大,为被测设备的评估带来困难。In the actual test, the data of the network management node is read for the first time, the packet capture is started, and the relative position of the network management node data and the data update of the network management node in time cannot be controlled. The relative position of data and network management node data update in time cannot be controlled. Therefore, the test error is different for each test, and the test error is not constant, depending on the timing of the start and end of packet capture, and the test error fluctuates greatly, which brings difficulties to the evaluation of the device under test.
另外,传统的测试方法要求“读取网管节点数据”后立即“开始打流抓包”,两个动作之间的时间差越小越好,测试操作起来不好控制,操作流程相对复杂。可见,在传统测试方法中,因为测试操作(开始打流抓包、打流抓包停止、读取网管节点数据)与网管节点数据更新无法同步,导致管理控制报文漏统计从而形成测量误差。In addition, the traditional test method requires "reading the network management node data" and "starting streaming and capturing packets" immediately. The smaller the time difference between the two actions, the better. The test operation is not easy to control, and the operation process is relatively complicated. It can be seen that in the traditional test method, because the test operations (starting to capture packets, stop capturing packets, and reading network management node data) cannot be synchronized with the data update of the network management node, the management and control packets are not counted, resulting in measurement errors.
考虑到打流数据报文和管理控制报文速率是基本恒定的,因此在持续打流的前提下,在任意与网管节点数据更新周期T相等的时间段内抓取的数据包的数目或字节数都相等。因此,采用抓取任意T时间段内(或T的整数倍时间段内)被测设备端口1接收到的字节数与网管节点“被测试设备端口1接收的字节数”的统计值进行比对,能够实现对该网管节点的精确测试。Considering that the rate of streaming data packets and management and control packets is basically constant, under the premise of continuous streaming, the number or words of data packets captured in any time period equal to the data update period T of the network management node. Sections are equal. Therefore, the statistical value of the number of bytes received by port 1 of the device under test and the “number of bytes received by port 1 of the device under test” of the network management node within any time period of T (or within a time period of an integer multiple of T) is used to carry out By comparison, accurate testing of the network management node can be achieved.
下面结合具体应用场景对本发明进行详细描述。The present invention will be described in detail below with reference to specific application scenarios.
本发明场景的方法不需要测试操作(抓包开始、抓包结束)与网管节点数据更新时间同步,测试流程如下(以网管节点“被测设备端口1收到的字节数”为例):The method of the scene of the present invention does not require the test operation (the start of packet capture, the end of the packet capture) to be synchronized with the data update time of the network management node.
步骤一:采用打流工具建立其它网络设备经由交换机到被测设备之间的数据流;Step 1: Use the streaming tool to establish a data flow between other network devices via the switch and the device under test;
步骤二:待打流速率恒定后,随机读取网管节点“被测设备端口1收到的字节数”统计的值为A,等待一段T1时间(T1为T的整数倍)读取另一个值,记为A1,计算E=A1-A;E为网管系统统计的被测设备端口1收到的字节数;Step 2: After the streaming rate is constant, randomly read the "Number of bytes received by port 1 of the tested device" from the network management node and the statistical value is A, and wait for a period of T1 (T1 is an integer multiple of T) to read another value, denoted as A1, calculate E=A1-A; E is the number of bytes received by port 1 of the device under test according to the statistics of the network management system;
步骤三:采用抓包工具抓取任意一T1时间段内的数据包(包括打流的数据报文和管理控制协议报文),并统计被测端口1收到的全部字节数为B,并将B当作被测设备端口1实际收到的字节数;Step 3: Use a packet capture tool to capture data packets (including streaming data packets and management control protocol packets) in any T1 time period, and count the total number of bytes received by port 1 under test as B, And take B as the number of bytes actually received by port 1 of the device under test;
步骤四:将E与B相比较。Step 4: Compare E with B.
本发明实施例的测试方法中,由于打流数据报文的速率和管理控制协议报文的速率基本恒定,网管节点“被测设备端口收到的字节数”在T时间内应该统计的字节数E与抓包工具在T时间内抓取的字节数B几乎相等,如图7所示,图7中黑色区域为端口1接收的打流数据报文,灰色区域为端口1接收的管理控制协议报文,测试抓包时长以为一个网管数据更新周期T为例,因此测试误差接近为零,相比传统测试方法测试误差大大降低。In the test method of the embodiment of the present invention, since the rate of the streaming data message and the rate of the management control protocol message are basically constant, the number of bytes received by the network management node "the number of bytes received by the port of the device under test" should be counted within T time. The number of bytes E is almost equal to the number of bytes B captured by the packet capture tool within T time. As shown in Figure 7, the black area in Figure 7 is the streaming data packet received by port 1, and the gray area is the data packet received by port 1. For management control protocol packets, the packet capture duration is taken as an example of a network management data update period T, so the test error is close to zero, which is greatly reduced compared to the traditional test method.
本发明实施例的测试误差只和打流数据报文的速率和管理控制报文速率的轻微波动有关,与测试操作(读取网管节点数据、开始抓包、停止抓包)与网管节点数据更新时刻的相对时间无关。因此,每次的测试误差基本恒定。The test error in the embodiment of the present invention is only related to the slight fluctuation of the rate of the streaming data packet and the rate of the management control packet, and is related to the test operation (reading the data of the network management node, starting to capture packets, stopping the packet capture) and the update of the data of the network management node. The relative time of moments is irrelevant. Therefore, each test error is basically constant.
另外,网管节点数据的读取与抓包分开独立操作,在时间上不要求同步,测试流程相对简单,便于做到精确控制,容易执行。In addition, the network management node data reading and packet capture are operated independently, and synchronization is not required in time. The test process is relatively simple, which is convenient for precise control and easy execution.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied therein, including but not limited to disk storage, optical storage, and the like.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions The apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in the flow or blocks of the flowcharts and/or the block or blocks of the block diagrams.
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510178186.4A CN106161067B (en) | 2015-04-15 | 2015-04-15 | A test method and system for network management node statistics |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510178186.4A CN106161067B (en) | 2015-04-15 | 2015-04-15 | A test method and system for network management node statistics |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106161067A CN106161067A (en) | 2016-11-23 |
CN106161067B true CN106161067B (en) | 2019-06-21 |
Family
ID=58057510
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510178186.4A Active CN106161067B (en) | 2015-04-15 | 2015-04-15 | A test method and system for network management node statistics |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106161067B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2005109754A1 (en) * | 2004-04-30 | 2005-11-17 | Synematics, Inc. | System and method for real-time monitoring and analysis for network traffic and content |
CN101883001A (en) * | 2009-05-08 | 2010-11-10 | 北京启明星辰信息技术股份有限公司 | Method and system for traffic identification and management of P2P application in small network |
CN101888318A (en) * | 2010-06-30 | 2010-11-17 | 中兴通讯股份有限公司 | A system and method for testing communication system performance indicators |
CN103281212A (en) * | 2013-06-21 | 2013-09-04 | 武汉烽火网络有限责任公司 | Method for monitoring performance of metro Ethernet |
CN103647680A (en) * | 2013-11-26 | 2014-03-19 | 上海斐讯数据通信技术有限公司 | Method for testing size of MAC address table of switch product |
CN103974312A (en) * | 2013-02-05 | 2014-08-06 | 中国移动通信集团公司 | WLAN (wireless local area network) equipment testing method, device and system |
-
2015
- 2015-04-15 CN CN201510178186.4A patent/CN106161067B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2005109754A1 (en) * | 2004-04-30 | 2005-11-17 | Synematics, Inc. | System and method for real-time monitoring and analysis for network traffic and content |
CN101883001A (en) * | 2009-05-08 | 2010-11-10 | 北京启明星辰信息技术股份有限公司 | Method and system for traffic identification and management of P2P application in small network |
CN101888318A (en) * | 2010-06-30 | 2010-11-17 | 中兴通讯股份有限公司 | A system and method for testing communication system performance indicators |
CN103974312A (en) * | 2013-02-05 | 2014-08-06 | 中国移动通信集团公司 | WLAN (wireless local area network) equipment testing method, device and system |
CN103281212A (en) * | 2013-06-21 | 2013-09-04 | 武汉烽火网络有限责任公司 | Method for monitoring performance of metro Ethernet |
CN103647680A (en) * | 2013-11-26 | 2014-03-19 | 上海斐讯数据通信技术有限公司 | Method for testing size of MAC address table of switch product |
Also Published As
Publication number | Publication date |
---|---|
CN106161067A (en) | 2016-11-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103532774B (en) | A kind of Intelligent speed-measuring client and Intelligent speed-measuring method thereof | |
CN109714221B (en) | Method, device and system for determining network data packet | |
CN105281969B (en) | A kind of statistical information acquisition methods and device | |
CN105682121A (en) | Data acquisition method for sensor network, gateway and data acquisition system | |
CN110019386B (en) | Stream data processing method and device | |
CN101136781B (en) | Performance data acquisition occasion control method and device in network management system | |
US20160308745A1 (en) | Presenting application performance monitoring data in distributed computer systems | |
CN103997432A (en) | Measuring system and method for supporting analysis of OpenFlow application performance | |
JP2015509316A (en) | Network debugging | |
WO2023123956A1 (en) | Io full-lifecycle latency monitoring method and related apparatus | |
CN111385163A (en) | Flow analysis and detection method and device | |
KR101968575B1 (en) | Method for automatic real-time analysis for bottleneck and apparatus for using the same | |
US11088960B2 (en) | Information processing apparatus and verification system | |
CN110324203B (en) | Multichannel high accuracy network flow generates device | |
CN106855795A (en) | A kind of Proxy program operated between App and server software | |
CN106161067B (en) | A test method and system for network management node statistics | |
US20230300050A1 (en) | Method, device and computer-readable medium for measuring traffic hit time during path switch | |
CN109462617A (en) | Device talk behavioral value method and device in a kind of local area network | |
TWI644228B (en) | Server and monitoring method thereof | |
JP2020035297A (en) | Apparatus state monitor and program | |
Künzel et al. | A tool for response time and schedulability analysis in modbus serial communications | |
CN105721236B (en) | A kind of method and device thereof of Ethernet mistake packet test | |
CN110825643A (en) | Method for monitoring execution condition of test task | |
EP3249551B1 (en) | A control system for controlling the operation of a data processing unit | |
US12113886B2 (en) | Methods, systems and computer readable media for generating dynamic time error |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |