WO2013182137A1 - 一种吞吐量测试的方法及装置 - Google Patents

一种吞吐量测试的方法及装置 Download PDF

Info

Publication number
WO2013182137A1
WO2013182137A1 PCT/CN2013/079445 CN2013079445W WO2013182137A1 WO 2013182137 A1 WO2013182137 A1 WO 2013182137A1 CN 2013079445 W CN2013079445 W CN 2013079445W WO 2013182137 A1 WO2013182137 A1 WO 2013182137A1
Authority
WO
WIPO (PCT)
Prior art keywords
network device
value
throughput
data processor
message
Prior art date
Application number
PCT/CN2013/079445
Other languages
English (en)
French (fr)
Inventor
王煜
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Priority to EP13801114.3A priority Critical patent/EP2903213B1/en
Priority to US14/441,868 priority patent/US9838293B2/en
Publication of WO2013182137A1 publication Critical patent/WO2013182137A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/24Testing correct operation
    • H04L1/242Testing correct operation by comparing a transmitted test signal with a locally generated replica
    • H04L1/243Testing correct operation by comparing a transmitted test signal with a locally generated replica at the transmitter, using a loop-back
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0888Throughput
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/22Traffic shaping

Definitions

  • the present invention relates to the field of data transmission, and in particular, to a method and apparatus for throughput testing.
  • Throughput refers to the maximum transmission rate of the transmitted and received frames of the network device without losing any frame. It is one of the most important indicators that reflect the performance of network devices. The value of the throughput of a network device varies under different working modes or in different environments. Generally, during the test, we will perform bidirectional throughput tests on 64, 128, 256, 512, 1024, 1280, and 1518 byte data frames respectively, and obtain the maximum transmission rate without frame loss. Throughput is generally represented in two ways, that is, one is expressed as percentage (TP % ), and the other is used in frames/second.
  • B on the left side of the equation is the theoretical bandwidth of the network device (in bits per second); TP % is the percentage value of throughput; and B bps TPo /o represents the total number of bits that the network device can transmit in 1 second;
  • the TP pps on the right side of the equation is the frame/second value of the throughput;
  • L f is the length (unit bits) of the Ethernet data frame used in the current test;
  • L c is a constant 160 (unit bits) because each Ethernet frame
  • the front has a 160-bit overhead, that is, an 8-byte preamble plus a 12-byte frame gap; and (L f + L C ) indicates the number of bits actually to be transmitted by the Ethernet data frame.
  • the network device throughput to be tested by the two-point approximation method includes the following steps.
  • Step (1) The Smartbits device creates an Ethernet data frame stream F.
  • the length of the data frame is set to 64 bytes, and the size of the stream F is initialized to a theoretical throughput value of the network device, TP pps , that is, TPo/ corresponding to the TP pps . Equal to 100%.
  • Step (2) the Smartbits device starts to send the Ethernet data frame stream F from the sending port A to the receiving port B of the network device.
  • Step (3) After receiving the flow F from the receiving port B, the network device processes the stream F and sends it from the sending port C to the receiving port D of the Smartbits device.
  • Step (4) the Smartbits device receives the Ethernet data frame stream F from the receiving port D.
  • Step (5) after the elapse of time T s (for example, 1 minute), the Smartbits device stops the transmission of the Ethernet data frame stream F and analyzes the statistics of the received and sent frames.
  • T s for example, 1 minute
  • the embodiment of the invention provides a throughput testing method, which solves the technical problem that the throughput test cannot be performed when the test instrument is not working or the test instrument cannot work, thereby realizing the technology for automatically testing the throughput by using the network device. effect.
  • the embodiment of the invention provides a method for throughput testing, including:
  • the first network device generates a periodic detection message by using a data processor
  • the first network device Sending, by the first network device, the detection packet to the second network device to be tested, where The first throughput value of the first network device is greater than or equal to a second throughput value of the second network device;
  • the first network device Receiving, by the first network device, a loopback detection message that is looped back by the second network device; the first network device obtaining a first quantity value of the detection packet, and the loopback detection packet Second quantity value;
  • the first network device obtains, by the data processor, the second throughput value characterizing the throughput of the second network device based on the first quantity value and the second quantity value.
  • the first network protocol supported by the first network device and the second network protocol supported by the second network device are the same network protocol.
  • the method before the step of the first network device generating a periodic detection message by using the data processor, the method further includes:
  • the step of initializing the system resources of the first network device includes:
  • R is set to 0, wherein R is a number characterizing the second value detected loopback packet;
  • C the C to the LP, where the value of C based on the formula B bps X TPo / o / ( L f + L c ) x T s obtained, B bps characterizes the theoretical broadband of the second network device, TP % characterizes the percentage value of the second network device throughput, L F + L E characterizes the actual transmission value of the data frame, CLP is characterized The third quantity value of the detection message that needs to be sent remaining in the test process;
  • the timer T CPU is set to T s seconds, wherein the timer T CPU is configured to control the data processor to generate a periodic detection message.
  • the step of the step of the first network device generating a periodic detection packet by the data processor and sending the detection packet to the second network device to be tested includes:
  • the data processor Generating, by the data processor, the periodic detection message according to the template message; Performing traffic shaping on the detection packet by the data processor, so that the first network device can send the detection packet at a constant rate when the network is congested;
  • the traffic shaping packet is sent to the second network device to be tested.
  • the step of sending the traffic shaping packet to the second network device to be tested includes:
  • the step of generating, by the data processor, the periodic detection packet by using the template message includes:
  • the interrupt rate value of the interrupt event is greater than or equal to the second throughput value that characterizes the throughput of the second network device.
  • the loopback detection is:
  • the second network device After receiving the detection packet, and processing the detection packet, the second network device sends the packet to the first network device via the sending/receiving port of the second network device.
  • the method further includes:
  • the second quantity R that characterizes the loopback detection message is incremented by one.
  • the first network device obtains, by using the data processor, the second throughput value that represents a throughput of the second network device, based on the first quantity value and the second quantity value.
  • the steps include:
  • a test throughput value obtained when the first quantity value is equal to the second quantity value is the second throughput a value, where the second throughput value is a true throughput value of the second network device.
  • the embodiment of the present invention further provides a network device, including: a sending/receiving port, a template message creating module, and a data processor connected to the sending/receiving port, where
  • the template message creation module is configured to: create a template message
  • the data processor is configured to: generate a periodic detection packet based on the template message; and send the detection packet to the second network device to be tested through the sending/receiving port, where the network The first throughput value of the device is greater than or equal to the second throughput value of the second network device; receiving, by the sending/receiving port, a loopback detection message looped back by the second network device, and obtaining the Detecting a first quantity value of the message, and a second quantity value of the loopback detection message; and obtaining, by the data processor, the characterizing the number based on the first quantity value and the second quantity value The second throughput value of the throughput of the second network device.
  • the first network protocol supported by the network device and the second network protocol supported by the second network device are the same network protocol.
  • the network device further includes:
  • An initialization setting unit is configured to: initialize a system resource of the network device.
  • the initial setting unit includes:
  • a first setting unit configured to: set S to 0, where S is a first quantity value that represents the detection message;
  • a second setting unit configured to: set R to 0, where R is a second quantity value that represents the loopback detection message;
  • a third setting unit configured to: set C LP to C, wherein a value of C is obtained based on a formula B bps X TPo /o I (L f + L c ) x T s , and C is an integer greater than or equal to 1 , B characterizes the second network The theoretical broadband of the network equipment, ? % represents the percentage value of the throughput of the second network device, L F + L C represents the actual transmission value of the data frame, and the CLP is a third quantity value indicating the remaining detection packets to be sent in the current test process;
  • a fourth setting unit configured to: set the timer T CPU to T S seconds, wherein the timer T CPU is configured to control the data processor to generate a periodic detection message.
  • the data processor includes:
  • a detection message generating unit configured to: generate, according to the template message, the periodic detection message by using the data processor;
  • an shaping unit configured to: perform traffic shaping on the detection packet by using the data processor.
  • the detecting >3 ⁇ 4 text generating unit includes:
  • An interrupt detecting unit configured to: detect whether an interrupt event occurs
  • a generating unit configured to: generate, according to the template message, the periodic detection message by using the data processor when an interrupt event occurs;
  • the interrupt rate value of the interrupt event is greater than or equal to the second throughput value that characterizes the throughput of the second network device.
  • the data processor further includes:
  • a comparison unit configured to: when the timing of the timer in the network device is greater than or equal to a preset time, compare the first quantity value with the second quantity value to obtain a comparison result;
  • a determining unit configured to: determine, when the comparison result indicates that the first quantity value is equal to the second quantity value, a test throughput value obtained when the first quantity value is equal to the second quantity value And the second throughput value, where the second throughput value is a true throughput value of the second network device.
  • FIG. 1 is a block diagram of a first network device according to an embodiment of the present invention.
  • FIG. 2 is a flowchart of a throughput testing method according to an embodiment of the present invention.
  • FIG. 3 is a flow chart showing initial setting of system resources of a first network device in an embodiment of the present invention.
  • FIG. 4 is a flowchart of a first network device generating a periodic detection packet according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of a first network device sending a detection packet to a second network device to be tested according to an embodiment of the present invention.
  • the embodiment of the invention provides a method for testing the throughput, and solves the technical problem that the throughput test cannot be performed when the test instrument is not working or the test instrument cannot work, thereby realizing the technology for automatically testing the throughput by using the network device. effect.
  • the process of implementing the throughput test by using the first network device with the data processor in the communication network includes:
  • the first network device generates a periodic detection message by using the data processor
  • the first network device sends the detection packet to the second network device to be tested, where the first throughput value of the first network device is greater than or equal to the second throughput value of the second network device.
  • the first network device obtains, by the data processor, the second throughput value characterizing the throughput of the second network device based on the first quantity value and the second quantity value.
  • the throughput testing method in the embodiment of the present invention is applied to the first network device in the communication network, and the throughput of the second network device to be tested in the communication network can be tested by the first network device.
  • the first network device may be a network device, such as a switch.
  • the applicant does not limit the type of the first network device, but the first network device needs to have a data processing function, and The same network protocol can be supported with the second network device.
  • FIG. 1 is a block diagram of a first network device according to an embodiment of the present invention.
  • the first network device 10 to which the throughput testing method in the embodiment of the present invention is applied includes:
  • the template message creation module 102 is configured to: create a template message
  • the data processor 103 is configured to generate a periodic detection message based on the template message, and send the detection message to the second network device 30 to be tested through the sending/receiving port 101, where The first throughput value of the first network device 10 is greater than or equal to the second throughput value of the second network device 30; and the ring that is looped back through the second network device 30 is received by the sending/receiving port 101 Recovering the message, and obtaining a first quantity value of the detection message, and a second quantity value of the loopback detection message; and, based on the first quantity value and the second quantity value, The data processor 103 obtains the second throughput characterizing the throughput of the second network device 30 Measured value.
  • FIG. 2 is a flowchart of a throughput testing method according to an embodiment of the present invention. As shown in FIG. 2, the following steps are included.
  • Step 201 Initialize settings of system resources of the first network device 10.
  • step 201 is as shown in FIG. 3, and includes the following steps.
  • Step 2011 Set S to 0, where S is a first quantity value that represents the detection message.
  • Step 2012 Set R to 0, where R is a second quantity value that represents the loopback detection message.
  • step 2014 the timer T C pu is set to T s seconds, and T s is a preset time value, wherein the timer T CPU is configured to control the data processor to generate a periodic detection message.
  • step 201 After the initialization of the system resources of the first network device 10 is completed in step 201, the method in the embodiment of the present invention proceeds to step 202.
  • Step 202 Generate a periodic detection message by using the data processor 103.
  • step 202 includes:
  • Creating a template message generating, by the data processor 103, a periodic detection message based on the template message.
  • the step of creating a template message may be implemented by software programming, where the programming language may be JAVA or C++; of course, those skilled in the art may also create the method in hardware. Template message.
  • the step of generating a periodic detection of the >3 ⁇ 4 text by the data processor 103 includes: Check if an interrupt event occurs;
  • an interrupt rate value may be preset, and the interrupt rate value is greater than or equal to the throughput value of the second network device 30 to be tested.
  • step 202 In order to make the implementation of step 202 more clear to those skilled in the art, the implementation flow of step 202 will be described in detail below with reference to FIG. As shown in Figure 4, the following steps are included.
  • Step 2021 Set an interrupt rate.
  • Step 2022 Create a template message.
  • Step 2023 Detect whether an interrupt event occurs.
  • Step 2024 When an interrupt event occurs, a detection message is generated for each interrupt event based on the template message.
  • the detection can be based on OAM (Operation Administration and
  • the LBM (Loopback Message) message of the LBM packet is the LBR (Loop Back Reply) message.
  • the detection packet may also be a packet supported by the other network protocols supported by the first network device 10 and the second network device 30 to be tested, and the type of the packet is not limited, as long as it is the first
  • the network protocol supported by the network device 10 and the second network device 30 has a packet type within the scope of the detection message according to the present invention.
  • step 202 the method in the embodiment of the present invention proceeds to step 203.
  • Step 203 Send the detection packet to the second network device 30 to be tested, where the first throughput value of the first network device 10 is greater than or equal to the second throughput value of the second network device 30.
  • step 203 includes:
  • the traffic shaping packet is sent to the second network device 30 to be tested.
  • the traffic shaping needs to be performed here to ensure that when the network is congested, the first network device 10 can send the detection message at a constant rate.
  • the burst traffic is prevented from affecting the final test result, and the traffic shaping may be implemented in the first network device.
  • a maximum transmission rate r m is set on the transmitting/receiving port 101 of 10, and when the traffic of the transmitting/receiving port 101 of the first network device 10 is greater than r m , the traffic that cannot be immediately transmitted on the transmitting/receiving port 101 is first Temporarily buffering, and then continuing to send the traffic at the rate r m , so that the bursty large traffic does not occur on the transmitting/receiving port 101 of the first network device 10, and the second network device 30 can effectively ensure that the network does not appear. congestion.
  • the shaping function can be a traffic shaping function configured on a dedicated loopback interface of a network processor or a switch chip having data processing functions.
  • the first network device 10 when performing step 203, sends C detection messages to the second network device 30 to be tested, and the value of C is determined at the time of initial setting, by formula B.
  • Bps TP % / (L f + L c ) T s is obtained, TP % is the throughput value of the second network device 30 to be tested preset for this test;
  • C is a positive integer greater than or equal to 1.
  • the S value of the number of detection packets used for statistical transmission is incremented by one, and the detection for remaining statistics to be sent is used.
  • the C L p value of the number of packets is decremented by 1.
  • step 203 the implementation process of step 203 is as shown in FIG. 5, and includes the following steps.
  • the first network device 10 sends the shaped detection packet to the second network device 30 to be tested.
  • step 204 After transmitting the detection message to the second network device 30 to be tested in step 203, the method in the embodiment of the present invention proceeds to step 204.
  • Step 204 Receive a loopback detection message that is looped back through the second network device 30.
  • the loopback detection packet may be: after the second network device 30 receives the detection packet, and processes the detection packet, the second network device 30 The message sent by the sending/receiving port to the first network device 10.
  • step 204 includes:
  • the used network protocol is a network protocol corresponding to the loopback detection message.
  • the implementation process of the step 204 includes: receiving, by the first network device 10, a loopback detection packet; sending the loopback detection packet to the first network protocol for processing, to check whether the loopback detection packet is a valid packet; When the loopback detection message is a valid message, R is incremented by 1.
  • the loopback detection packet is obtained by the second network device 30 by the following steps: The second network device 30 receives the detection packet sent by the first network device 10;
  • the second network device 30 sends the detection packet to the second network protocol for processing, and generates a loopback detection packet.
  • step 204 After receiving the loopback detection message in step 204, the method in the embodiment of the present invention proceeds to step 205.
  • Step 205 Obtain a first quantity value of the detection packet, and a second quantity value of the loopback detection message.
  • the obtained first quantity value and the second quantity value are initialized by the setting unit
  • the first setting unit 1041 and the second setting unit 1042 of 104 are directly displayed.
  • the first quantity value S of the detection message is obtained in step 205, and
  • the counting process is not after step 201, step 202, step 203 and step 204, but the counting has started in the testing process, that is, the first network device 10
  • S is incremented by one, and the first network device 10 increments R by 1 each time it receives a loopback detection message looped back through the second network device 30 to be tested.
  • step 205 the embodiment of the present invention proceeds to step 206.
  • Step 206 Obtain, by the data processor 103, the second throughput value that represents the throughput of the second network device 30 based on the first quantity value and the second quantity value.
  • the step 206 includes: when the timing of the timer T C pu in the first network device 10 is greater than or equal to a preset time T s , the test ends, and the first quantity value and the The second quantity value gives a comparison result.
  • a test throughput value obtained when the first quantity value is equal to the second quantity value is the second throughput a value, where the second throughput value is a true throughput value of the second network device 30.
  • the implementation process of step 206 includes: when the timer T CPU in the first network device 10 exceeds the preset! At the time, the test process ends; the data processor 103 of the first network device 10 compares the values of S and R, and uses the binary approximation method to determine the throughput value of the second network device 30 to be tested.
  • the analysis process of the first network device 10 determining the throughput value of the second network device 30 to be tested is described as follows:
  • the network device throughput can be completed by simulating a network device with a data processing function into a professional tester without using a professional tester, and then cooperating with a network protocol. test.
  • the embodiment of the invention further provides a network device with data processing function as the first network device 10.
  • the first network device 10 includes:
  • the sending/receiving port 101 is configured to: send a detection packet generated by the first network device 10 and receive a loopback detection message looped back by the second network device 30 to be tested;
  • a template message creation module 102 configured to: create a template message
  • a data processor 103 is coupled to the transmit/receive port 101.
  • the data processor 103 is configured to: generate a periodic detection message based on the template message; send the detection message to the second network device 30 to be tested through the sending/receiving port 101; The receiving/receiving port 101 receives the loopback detection message that is looped back through the second network device 30, and obtains a first quantity value of the detection message and a second quantity value of the loopback detection message. And obtaining, by the data processor 103, the second throughput value characterizing the throughput of the second network device 30 based on the first quantity value and the second quantity value.
  • the template message creation module 102 can be implemented by software, for example, using JAVA or C++ language to write a template message program; or by hardware, for example, a template message unit is built in.
  • the data processor 103 may be a network processor or a switch chip, and the applicant does not limit the type of the data processor, as long as the data processor having the data processing function should include the data of the present invention. Within the processor range.
  • the data processor 103 includes:
  • the detection packet generating unit 1031 is configured to generate a periodic detection message by using the data processor 103 of the first network device 10 based on the template message;
  • the shaping unit 1032 is configured to: shape the detection message by the data processor 103.
  • the shaping unit 1032 may be a traffic shaping unit configured on a dedicated loopback interface of the data processor 103 of the first network device 10.
  • the detection message generating unit 1031 includes: The interrupt detecting unit 10311 is configured to: detect whether an interrupt event occurs; the generating unit 10312 is configured to: generate a periodic detection by the data processor 103 based on the template message when an interrupt event occurs a packet; wherein, the interrupt event occurs with an interrupt rate value greater than or equal to the second throughput value of the second network device 30.
  • the data processor 103 further includes:
  • the comparing unit 1033 is configured to: when the timing of the timer in the first network device 10 is greater than or equal to a preset time, compare the first quantity value and the second quantity value to obtain a Comparing results;
  • a determining unit 1034 configured to: determine, when the comparison result indicates that the first quantity value is equal to the second quantity value, test throughput obtained when the first quantity value is equal to the second quantity value The value is the second throughput value, where the second throughput value is a true throughput value of the second network device.
  • the first network device 10 further includes:
  • the initialization setting unit 104 is configured to: initialize the system resources of the first network device 10.
  • the initialization setting unit 104 includes:
  • the first setting unit 1041 is configured to: set S to 0, where S is a first quantity value that represents the detection message;
  • the second setting unit 1042 is configured to: set R to 0, where R is a second quantity value that represents the loopback detection message;
  • the third setting unit 1043 is configured to: set C LP to C, wherein the value of C is obtained based on the formula B bps X TPo /o / (L f + L c ) ⁇ T s , and C is greater than or equal to 1 Integer, B bps characterizes the theoretical broadband of the second network device 30, TP % characterizes the percentage value of the second network device throughput, L F + L E represents the actual transmission value of the data frame, and CLP is used to characterize the test process a third quantity value of the remaining detection packets that need to be sent;
  • the fourth setting unit 1044 is configured to: set the timer T C pu to T s seconds, wherein the timer T C pu is set to control the data processor 103 to generate a periodic detection message.
  • the technical means for simulating the professional tester by using the network device since the technical means for simulating the professional tester by using the network device is used, the technical problem that the throughput test cannot be performed when the test instrument or the test instrument cannot work is solved, and the network device is utilized.

Landscapes

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

Abstract

一种吞吐量测试的方法及装置。所述方法包括:第一网络设备通过所述数据处理器生成周期性的检测报文;所述第一网络设备将所述检测报文发送给待测试的第二网络设备,其中,所述第一网络设备的第一吞吐量值大于等于所述第二网络设备的第二吞吐量值;所述第一网络设备接收经由所述第二网络设备环回的环回检测报文;所述第一网络设备获得所述检测报文的第一数量值,以及所述环回检测报文的第二数量值;以及所述第一网络设备基于所述第一数量值和所述第二数量值,通过所述数据处理器获得表征所述第二网络设备的吞吐量的所述第二吞吐量值。通过本发明实施例的方法及装置,实现了网络设备自动进行吞吐量测试,且降低了吞吐量测试的成本。

Description

一种吞吐量测试的方法及装置
技术领域
本发明涉及数据传输领域, 尤其涉及到一种吞吐量测试的方法及装置。
背景技术
吞吐量, 是指在不丟失任何一个帧的情况下, 网络设备的发送和接收帧 的最大传输速率。 它是反映网络设备性能的最重要的指标之一。 网络设备在 不同的工作模式下或不同的环境下, 其吞吐量的值也会不同。 一般我们在测 试过程中会分别对 64、 128、 256、 512、 1024、 1280和 1518字节大小的数据 帧进行双向的吞吐量测试, 得到在不丟帧情况下的最大传输速率。 吞吐量一 般釆取两种方式表示, 即一种是釆用百分比 (TP% )表示, 另一种釆用帧 /秒
( TPpps )表示, 而这两种吞吐量的表示方式可以通过以下公式相互转换:
Bbps x TPo/o = TPpps x (Lf + Lc)
其中, 等式左边的 B 是网络设备的理论带宽(单位比特 /秒); TP%是吞 吐量的百分比值; 而 Bbps TPo/o就表示 1秒钟内网络设备能传输的总比特数; 等式右边的 TPpps是吞吐量的帧 /秒值; Lf是当前测试中使用的以太网数据帧的 长度(单位比特); Lc是常数 160 (单位比特), 因为每个以太网帧的前面都 有 160比特的额外开销, 即, 8字节的前导符加上 12字节的帧间隙; 而 (Lf + LC) 就表示该以太网数据帧实际要传输的比特数。
相关技术中是借助专业的测试仪来完成对待测试的网络设备吞吐量的测 试, 比如, 借助测试仪 Smartbits, 釆用二分逼近的方法测试待测试的网络设 备吞吐量包括如下步骤。
步骤(1 )、 Smartbits设备创建以太网数据帧流 F, 数据帧的长度定为 64 字节, 流 F的大小初始化为网络设备的理论吞吐量值 TPpps, 即, TPpps对应的 TPo/。等于 100%。
步骤( 2 )、 Smartbits设备开始从发送端口 A向网络设备的接收端口 B发 送以太网数据帧流 F。 步骤( 3 )、 网络设备从接收端口 B收到流 F后 , 经过对流 F进行处理 , 再从发送端口 C发给 Smartbits设备的接收端口 D。
步骤(4 )、 Smartbits设备从接收端口 D接收以太网数据帧流 F。
步骤( 5 )、 经过时间 Ts (比如 1分钟 )后, Smartbits设备停止以太网数 据帧流 F的发送并分析收发帧统计, 具体分析说明如下:
( a )如果 TP%=100%的时候没有发生帧丟失, 则吞吐量测试完成, 网络 设备的吞吐量就是 100%;
( b )如果 TP%=100%的时候有发生帧丟失, 则将流量 ΤΡ。/(^ 100%调低 为 50%, 然后转到步骤(2 )重新测试。
( c )如果 ΤΡ%=50%的时候没有发生帧丟失, 则将流量 ΤΡ。/(^ 50%调高 为 75%, 然后转到步骤(2 )重新测试;
( d )如果 TP%=50%的时候仍然发生帧丟失, 则将流量 ΤΡ。/(^ 50%调低 为 25%, 然后转到步骤(2 )重新测试。
( 6 )重复测试多次后, 最终可以得到准确的吞吐量值。
发明内容
但本申请发明人研究发现上述技术至少存在如下技术问题:
由于网络设备不能进行吞吐量的自动测试,而只能使用专业的测试仪器, 因此, 存在吞吐量测试在没有测试仪器或测试仪器不能工作时, 不能进行的 技术问题;
另外, 测试仪器需要额外增加, 所以, 也增加了吞吐量测试的成本。 本发明实施例提供一种吞吐量测试的方法, 解决了相关技术中吞吐量测 试在没有测试仪器或测试仪器不能工作时, 不能进行的技术问题, 从而实现 了利用网络设备自动测试吞吐量的技术效果。
本发明实施例提供了一种吞吐量测试的方法, 包括:
第一网络设备通过数据处理器生成周期性的检测报文;
所述第一网络设备将所述检测报文发送给待测试的第二网络设备,其中, 所述第一网络设备的第一吞吐量值大于等于所述第二网络设备的第二吞吐量 值;
所述第一网络设备接收经由所述第二网络设备环回的环回检测报文; 所述第一网络设备获得所述检测报文的第一数量值 , 以及所述环回检测 报文的第二数量值; 以及
所述第一网络设备基于所述第一数量值和所述第二数量值, 通过所述数 据处理器获得表征所述第二网络设备的吞吐量的所述第二吞吐量值。
可选地, 所述第一网络设备支持的第一网络协议与所述第二网络设备支 持的第二网络协议为相同的网络协议。
可选地, 在所述第一网络设备通过所述数据处理器生成周期性的检测报 文的步骤之前, 所述方法还包括:
对所述第一网络设备的系统资源进行初始化设置。
可选地, 所述对所述第一网络设备的系统资源进行初始化设置的步骤包 括:
将 S设置为 0, 其中, S为表征所述检测报文的第一数量值;
将 R设置为 0, 其中, R为表征所述环回检测报文的第二数量值; 将 CLP设置为 C, 其中, C的值基于公式 Bbps X TPo/o / (Lf + Lc) x Ts获得, Bbps表征所述第二网络设备的理论宽带, TP%表征所述第二网络设备吞吐量的 百分比值, LF + LE表征数据帧实际传输值, CLP为表征本次测试过程剩余需要 发送的所述检测报文的第三数量值; 以及
将定时器 TCPU设置为 Ts秒, 其中, 所述定时器 TCPU设置成控制所述数 据处理器生成周期性的检测报文。
可选地, 所述第一网络设备通过所述数据处理器生成周期性的检测报文 并将所述检测报文发送给待测试的第二网络设备的步骤的步骤包括:
通过所述数据处理器获得通过所述第一网络设备中的模版报文创建模块 创建的模版报文;
基于所述模版报文, 通过所述数据处理器生成所述周期性的检测报文; 通过所述数据处理器对所述检测报文进行流量整形, 以在网络拥塞时, 使所述第一网络设备能以一个恒定的速率发送所述检测报文; 以及;
将经过流量整形后的所述检测报文发送给所述待测试的第二网络设备。 可选地, 所述将经过流量整形后的所述检测报文发送给所述待测试的第 二网络设备的步骤包括:
所述第一网络设备向所述第二网络设备发送 C个所述检测报文, 其中, C为大于或等于 1的整数, CLP=C; 当 S=C时, 停止发送所述检测报文。
可选地, 所述基于所述模版报文, 通过所述数据处理器生成所述周期性 的检测报文的步骤包括:
通过所述数据处理器检测是否有中断事件发生;
在有中断事件发生时, 基于所述模版报文, 通过所述数据处理器生成所 述周期性的检测报文;
其中, 所述中断事件发生的中断速率值大于或等于所述表征所述第二网 络设备的吞吐量的所述第二吞吐量值。
可选地, 所述环回检测 ^艮文为:
所述第二网络设备在收到所述检测报文,并对所述检测报文进行处理后, 经由所述第二网络设备的发送 /接收端口发送给所述第一网络设备的报文。
可选地, 在所述第一网络设备接收经由所述第二网络设备环回的环回检 测报文的步骤之后, 所述方法还包括:
对所述环回检测报文进行处理; 以判断所述环回检测报文的有效性; 以 及
当所述环回检测报文为有效时, 将所述表征所述环回检测报文的第二数 量值 R加 1。
可选地, 所述第一网络设备基于所述第一数量值和所述第二数量值, 通 过所述数据处理器获得表征所述第二网络设备的吞吐量的所述第二吞吐量值 的步骤包括:
当所述第一网络设备中定时器的计时时间大于等于一预设时间时, 比较 所述的第一数量值和所述的第二数量值, 得到一个比较结果;
当所述比较结果显示所述第一数量值等于所述第二数量值时, 确定在所 述第一数量值等于所述第二数量值时获得的测试吞吐量值为所述第二吞吐量 值, 其中, 所述第二吞吐量值为所述第二网络设备真实的吞吐量值。
本发明实施例还提供了一种网络设备, 包括: 发送 /接收端口、 模版报文 创建模块和与所述发送 /接收端口连接的数据处理器, 其中,
所述模版报文创建模块设置成: 创建一模版报文;
所述数据处理器设置成: 基于所述模版报文生成周期性的检测报文; 将 所述检测报文通过所述发送 /接收端口发送给待测试的第二网络设备, 其中, 所述网络设备的第一吞吐量值大于等于所述第二网络设备的第二吞吐量值; 通过所述发送 /接收端口接收经由所述第二网络设备环回的环回检测报文, 并 获得所述检测报文的第一数量值, 以及所述环回检测报文的第二数量值; 以 及基于所述第一数量值和所述第二数量值, 通过所述数据处理器获得表征所 述第二网络设备的吞吐量的所述第二吞吐量值。
可选地, 所述网络设备支持的第一网络协议与所述第二网络设备支持的 第二网络协议为相同的网络协议。
可选地, 所述网络设备还包括:
初始化设置单元, 其设置成: 对所述网络设备的系统资源进行初始化设 置。
可选地, 所述初始化设置单元包括:
第一设置单元, 其设置成: 将 S设置为 0, 其中, S为表征所述检测报文 的第一数量值;
第二设置单元, 其设置成: 将 R设置为 0, 其中, R为表征所述环回检 测报文的第二数量值;
第三设置单元, 其设置成: 将 CLP设置为 C, 其中, C的值基于公式 Bbps X TPo/o I (Lf + Lc) x Ts获得, C为大于或等于 1的整数, B 表征所述第二网 络设备的理论宽带, 了?%表征所述第二网络设备吞吐量的百分比值, LF + LC 表征数据帧实际传输值, CLP为表征本次测试过程剩余需要发送的所述检测报 文的第三数量值; 以及
第四设置单元, 其设置成: 将定时器 TCPU设置为 TS秒, 其中, 所述定时 器 TCPU设置成控制所述数据处理器生成周期性的检测报文。
可选地, 所述数据处理器包括:
检测报文生成单元, 其设置成: 基于所述模版报文, 通过所述数据处理 器生成所述周期性的检测报文;
整形单元, 其设置成: 通过所述数据处理器对所述检测报文进行流量整 形。
可选地, 所述检测>¾文生成单元包括:
中断检测单元, 其设置成: 检测是否有中断事件发生;
生成单元, 其设置成: 在有中断事件发生时, 基于所述模版报文, 通过 所述数据处理器生成所述周期性的检测报文;
其中, 所述中断事件发生的中断速率值大于或等于所述表征所述第二网 络设备的吞吐量的所述第二吞吐量值。
可选地, 所述数据处理器还包括:
比较单元, 其设置成: 当所述网络设备中定时器的计时时间大于等于一 预设时间时, 比较所述的第一数量值和所述的第二数量值, 得到一个比较结 果;
确定单元, 其设置成: 当所述比较结果显示所述第一数量值等于所述第 二数量值时, 确定在所述第一数量值等于所述第二数量值时获得的测试吞吐 量值为所述第二吞吐量值, 其中, 所述第二吞吐量值为所述第二网络设备真 实的吞吐量值。
本发明实施例中提供的一个或多个技术方案, 至少具有如下技术效果或 优点:
( 1 )由于釆用了用网络设备模拟专业测试仪的技术手段, 所以解决了吞 吐量测试在没有测试仪器或测试仪器不能工作时, 不能进行的技术问题, 进 而具有了利用网络设备自动测试吞吐量的技术效果。
( 2 )同时, 解决了需要额外增加专业测试仪器的问题, 进而具有降低吞 吐量测试成本的技术效果。
附图概述
图 1为本发明实施例的第一网络设备的模块结构图。
图 2为本发明实施例中吞吐量测试方法的流程图。
图 3是本发明实施例中对第一网络设备的系统资源进行初始化设置的流 程图。
图 4是本发明实施例中第一网络设备生成周期性检测报文的流程图。 图 5是本发明实施例中第一网络设备将检测报文发送给待测试的第二网 络设备的流程图。 本发明的较佳实施方式
下文中将结合附图对本发明的实施例进行详细说明。 需要说明的是, 在 不冲突的情况下, 本申请中的实施例及实施例中的特征可以相互任意组合。
本发明实施例提供一种吐量测试的方法, 解决了相关技术中吞吐量测试 在没有测试仪器或测试仪器不能工作时, 不能进行的技术问题, 从而实现了 利用网络设备自动测试吞吐量的技术效果。
本发明实施例中, 利用通信网络中具有数据处理器的第一网络设备来实 现吞吐量测试的过程包括:
第一网络设备通过所述数据处理器生成周期性的检测报文;
所述第一网络设备将所述检测报文发送给待测试的第二网络设备,其中, 所述第一网络设备的第一吞吐量值大于等于所述第二网络设备的第二吞吐量 值;
所述第一网络设备接收经由所述第二网络设备环回的环回检测报文; 所述第一网络设备获得所述检测报文的第一数量值, 以及所述环回检测 报文的第二数量值; 以及
所述第一网络设备基于所述第一数量值和所述第二数量值, 通过所述数 据处理器获得表征所述第二网络设备的吞吐量的所述第二吞吐量值。
可见, 基于本发明实施例的方案, 就能有效解决相关技术中吞吐量测试 在没有测试仪器或测试仪器不能工作时, 不能进行的技术问题, 从而实现了 利用网络设备自动测试吞吐量的技术效果。
下面将结合说明书附图以及具体的实施方式对上述技术方案进行详细的 说明。
本发明实施例中的吞吐量测试方法, 应用于通信网络中的第一网络设备 中, 通过第一网络设备可以对通信网络中的待测试的第二网络设备的吞吐量 进行测试。
第一网络设备可以是通信网络中的各种网络设备, 如, 交换机, 在本发 明实施例中, 申请人将不限制第一网络设备的类型, 但第一网络设备需具有 数据处理功能, 且与第二网络设备能支持相同的网络协议。
图 1 为本发明实施例的第一网络设备的模块结构图。 参考图 1 , 本发明 实施例中的吞吐量测试方法所应用的第一网络设备 10包括:
发送 /接收端口 101、
模版报文创建模块 102、
与所述发送 /接收端口 101连接的数据处理器 103 , 其中,
所述模版报文创建模块 102设置成: 创建一模版报文;
所述数据处理器 103设置成:基于所述模版报文生成周期性的检测报文; 将所述检测报文通过所述发送 /接收端口 101 发送给待测试的第二网络设备 30, 其中, 所述第一网络设备 10的第一吞吐量值大于等于所述第二网络设备 30的第二吞吐量值;通过所述发送 /接收端口 101接收经由所述第二网络设备 30环回的环回检测报文, 并获得所述检测报文的第一数量值, 以及所述环回 检测报文的第二数量值; 以及基于所述第一数量值和所述第二数量值, 通过 所述数据处理器 103获得表征所述第二网络设备 30的吞吐量的所述第二吞吐 量值。
下面, 将结合图 1及图 2, 对本发明实施例中的吞吐量测试的方法进行 详细描述。 图 2为本发明实施例中吞吐量测试方法的流程图, 如图 2所示, 包括以下步骤。
步骤 201、 对所述第一网络设备 10的系统资源进行初始化设置。
可选地, 步骤 201的实现过程如图 3所示, 包括以下步骤。
步骤 2011、 将 S设置为 0, 其中, S为表征所述检测报文的第一数量值。 步骤 2012、 将 R设置为 0, 其中, R为表征所述环回检测报文的第二数 量值。
步骤 2013、 将 CLp设置为 C, C的值基于公式 Bbps TPo/o I (Lf + Lc) Ts 获得, 这里需要先假定一个 TP。/ 值, 这个值即为本次测试的第二网络设备 的吞吐量值, 其中, B 表征所述第二网络设备的理论宽带, TP%表征所述第 二网络设备吞吐量的百分比值, Lf + Le表征数据帧实际传输值, 为表征本 次测试过程剩余需要发送的所述检测报文的第三数量值。
步骤 2014、 将定时器 TCpu设置为 Ts秒, Ts为一预设的时间值, 其中, 所述定时器 TCPU设置成控制所述数据处理器生成周期性的检测报文。
在通过步骤 201 , 完成对所述第一网络设备 10的系统资源进行初始化之 后, 本发明实施例中的方法进入步骤 202。
步骤 202、 通过所述数据处理器 103生成周期性的检测报文。
在实施过程中, 步骤 202包括:
创建一模版报文; 基于所述模版报文, 通过所述数据处理器 103生成周 期性的检测报文。
在实施过程中, 创建一模版报文的步骤, 可以是通过软件编程来实现, 其中的程序语言可以为 JAVA, 也可以为 C++; 当然, 本领域普通技术人员 也可以硬件的方式来创建所述模版报文。
在实施过程中, 基于所述模版报文, 通过所述数据处理器 103生成周期 性的检测>¾文的的步骤包括: 检测是否有中断事件发生;
在有中断事件发生时, 基于所述模版报文, 通过所述数据处理器 103生 成周期性的检测报文; 其中, 所述中断事件发生的中断速率值大于或等于所 述表征所述第二网络设备 30的吞吐量的所述第二吞吐量值。
在实施过程中, 在检测是否有中断事件发生前, 可以预先设置一中断速 率值, 所述中断速率值大于或等于所述待测试的第二网络设备 30 的吞吐量 值。
为了本领域技术人员能更清楚步骤 202的实现过程, 下面将结合图 4, 详细描述步骤 202的实现流程。 如图 4所示, 包括如下步骤。
步骤 2021、 设置中断速率。
步骤 2022、 创建一模版报文。
步骤 2023、 检测是否有中断事件发生。
步骤 2024、 当有中断事件发生时, 基于模版报文, 针对每个中断事件生 成一个检测 4艮文。
所述检测 4艮文可以是基于 OAM ( Operation Administration and
Maintenance, 操作维护管理 )协议的 LBM ( LoopBack Message ) 4艮文, 此时, LBM报文所对应的环回检测报文为 LBR ( LoopBack Reply )报文。
所述检测报文还可以是基于所述第一网络设备 10 和待测试的第二网络 设备 30所支持的其他网络协议所支持的报文, 这里并不限制报文的类型, 只 要是第一网络设备 10和第二网络设备 30共同支持的网络协议所具有的报文 类型都在本发明所述检测报文的范围内。
在执行步骤 202之后, 本发明实施例中的方法进入步骤 203。
步骤 203、 将所述检测报文发送给待测试的第二网络设备 30, 其中, 所 述第一网络设备 10的第一吞吐量值大于等于所述第二网络设备 30的第二吞 吐量值。
在实施过程中, 步骤 203包括:
通过所述数据处理器 103对所述检测报文进行流量整形; 将经过流量整形后的所述检测报文发送给待测试的第二网络设备 30。 这里之所以需要进行流量整形, 是为了保证当网络拥塞时, 第一网络设 备 10能以一个恒定的速率发送检测报文。
在实施过程中, 为保证第一设备 10发送给待测试的第二网络设备 30的 流量是均勾的, 避免突发流量影响最终的测试结果, 流量整形的实现方式可 以是在第一网络设备 10的发送 /接收端口 101上设定一最大传输速率 rm, 当 第一网络设备 10的发送 /接收端口 101的流量大于 rm时,在发送 /接收端口 101 上将无法即时发送的流量先临时緩存, 然后以速率 rm继续将流量发送出去, 这样第一网络设备 10的发送 /接收端口 101上就不会出现突发的大流量, 可 以有效的保证第二网络设备 30不会出现网络拥塞。
整形功能可以是在具有数据处理功能的网络处理器或交换芯片的专用环 回接口上配置的流量整形功能。
在本发明实施例中, 在执行步骤 203时, 第一网络设备 10会向待测试的 第二网络设备 30发送 C个所述检测报文, C的值在初始化设置时已经确定, 由公式 Bbps TP%/ (Lf + Lc) Ts获得, TP%为本次测试预先设定的待测试的第 二网络设备 30的吞吐量值; C为大于或者等于 1的正整数。
在第一网络设备 10每次发送检测报文给待测试的第二网络设备 30后, 将用于统计发送的检测报文个数的 S值加 1 , 而将用于统计剩余要发送的检 测报文个数的 CLp值减 1 , 当 CLp=S时, 第一网络设备 10停止发送检测报文 给第二网络设备 30。
在实施过程中, 步骤 203的实现流程如图 5所示, 包括以下步骤。
2031、 设置整形功能。
2032、将第一网络设备 10发送的检测报文发送给整形功能模块进行流量 整形。
2033、第一网络设备 10将经过整形后的检测报文发送给待测试的第二网 络设备 30。
2034、 表征发送的检测报文的第一数量值 S加 1 , CLp减 1。
2035、 当 CLP=S时, 第一网络设备 10停止发送检测报文给待测试的第二 网络设备 30。
在通过步骤 203将检测报文发送至待测试的第二网络设备 30之后,本发 明实施例中的方法便进入步骤 204。
步骤 204、 接收经由所述第二网络设备 30环回的环回检测报文。
在实施过程中, 所述环回检测报文可以为: 所述第二网络设备 30在收到 所述检测报文, 并对所述检测报文进行处理后, 经由所述第二网络设备 30的 发送 /接收端口发送给所述第一网络设备 10的报文。
在实施过程中, 步骤 204包括:
对接收到的所述环回检测报文进行处理, 检查所述环回检测报文是否为 有效报文; 若所述环回检测报文为有效报文, 则将所述表征所述环回检测报 文的第二数量值 R加 1。 在实施过程中, 在处理所述环回检测 文时, 釆用的网络协议为与所述 环回检测报文对应的网络协议。
步骤 204的实现流程包括: 第一网络设备 10接收环回检测报文; 将该环 回检测报文上送给第一网络协议处理, 以检查环回检测报文是否为有效的报 文; 当所述环回检测报文为有效报文时, 则将 R加 1。
所述环回检测报文, 是第二网络设备 30通过如下步骤获得的: 第二网络设备 30接收第一网络设备 10发送的检测报文;
第二网络设备 30将所述检测报文上送给第二网络协议处理,生成环回检 测报文。
在通过步骤 204 , 接收到环回检测报文之后, 本发明实施例中的方法进 入步骤 205。
步骤 205、 获得所述检测报文的第一数量值, 以及所述环回检测报文的 第二数量值。
在实施过程中, 获得的第一数量值和第二数量值是通过初始化设置单元
104中的第一设置单元 1041和第二设置单元 1042直接显示出来的。
在实施过程中, 步骤 205 中在获得所述检测报文的第一数量值 S, 以及 所述环回检测报文的第二数量值 R时, 计数过程并不在步骤 201、 步骤 202、 步骤 203和步骤 204之后, 而是在测试过程中就已经开始计数, 即, 第一网 络设备 10每次发送检测报文时, 将 S加 1 , 第一网络设备 10每次接收经由 待测试的第二网络设备 30环回的环回检测报文时, 将 R加 1。
在步骤 205之后, 本发明实施例进入步骤 206。
步骤 206、 基于所述第一数量值和所述第二数量值, 通过所述数据处理 器 103获得表征所述第二网络设备 30的吞吐量的所述第二吞吐量值。
所述步骤 206包括: 当所述第一网络设备 10中定时器 TCpu的计时时间 大于等于一预设时间 Ts时, 本次测试结束, 比较所述的第一数量值和所述的 第二数量值, 得到一个比较结果。
当所述比较结果显示所述第一数量值等于所述第二数量值时, 确定在所 述第一数量值等于所述第二数量值时获得的测试吞吐量值为所述第二吞吐量 值, 其中, 所述第二吞吐量值为所述第二网络设备 30真实的吞吐量值。
在实施过程中, 步骤 206的实现流程包括: 当第一网络设备 10中的定时 器 TCPU超过预设的! 时间时, 测试过程结束; 由第一网络设备 10的数据处 理器 103对 S与 R的值进行比较, 釆用二分逼近的方法, 确定待测试的第二 网络设备 30的吞吐量值。
在实施过程中, 第一网络设备 10确定待测试的第二网络设备 30吞吐量 值的分析过程描述如下:
( a )如果 S>R, 则说明本次测试过程中有帧丟失, 需要将本次测试的吞 吐量值 TP% 二分逼近方法调低, 再从步骤 201开始下一次测试;
( b )如果 S=R, 则说明本次测试过程中没有帧丟失, 如果本次测试的吞 吐量值 1?%是100%, 则停止测试, 若 TP%不是 100%, 则将 ΤΡ%按二分逼近 法调高, 再从步骤 201开始下一次测试; 如此反复测试即可得到足够精确的 逼近待测试的第二网络设备 30的实际吞吐量值。
通过本发明实施例中的的方法, 可以在不借助专业测试仪的情况下, 通 过将内置有数据处理功能的网络设备模拟成专业的测试仪, 然后配合网络协 议, 来完成网络设备吞吐量的测试。 本发明实施例还提供一种具有数据处理功能的网络设备, 其作为第一网 络设备 10。
如图 1所示, 在本发明实施例中, 第一网络设备 10包括:
发送 /接收端口 101 , 其设置成: 发送第一网络设备 10生成的检测报文并 接收待测试的第二网络设备 30环回的环回检测报文;
模版报文创建模块 102, 其设置成: 创建一模版报文; 以及
数据处理器 103 , 其与所述发送 /接收端口 101连接。
所述数据处理器 103设置成:基于所述模版报文生成周期性的检测报文; 将所述检测报文通过所述发送 /接收端口 101 发送给待测试的第二网络设备 30; 通过所述发送 /接收端口 101接收经由所述第二网络设备 30环回的环回 检测报文, 并获得所述检测报文的第一数量值, 以及所述环回检测报文的第 二数量值; 以及基于所述第一数量值和所述第二数量值, 通过所述数据处理 器 103获得表征所述第二网络设备 30的吞吐量的所述第二吞吐量值。
在实施过程中, 所述模版报文创建模块 102既可以通过软件方式实现, 如,利用 JAVA、 C++语言编写模版报文程序; 也可以通过硬件方式实现,如, 内置一模版报文单元。
在实施过程中, 所述数据处理器 103可以是网络处理器, 也可以是交换 芯片, 申请人不限制数据处理器的类型, 只要具有数据处理功能的数据处理 器都应包含在本发明的数据处理器范围内。
在实施过程中, 所述数据处理器 103包括:
检测报文生成单元 1031 , 其设置成: 基于所述模版报文, 通过所述第一 网络设备 10的所述数据处理器 103生成周期性的检测报文;
整形单元 1032, 其设置成: 通过所述数据处理器 103对所述检测报文进 行整形。
在实施过程中, 所述整形单元 1032可以是在第一网络设备 10的数据处 理器 103的专用环回接口上配置的流量整形单元。
在实施过程中, 所述检测报文生成单元 1031包括: 中断检测单元 10311 , 其设置成: 检测是否有中断事件发生; 生成单元 10312, 其设置成: 在有中断事件发生时, 基于所述模版报文, 通过所述数据处理器 103生成周期性的检测报文; 其中, 所述中断事件发生 的中断速率值大于或等于所述第二网络设备 30的所述第二吞吐量值。
在实施过程中, 所述数据处理器 103还包括:
比较单元 1033 , 其设置成: 当所述第一网络设备 10 中定时器的计时时 间大于等于一预设时间使时, 比较所述的第一数量值和所述的第二数量值, 得到一个比较结果;
确定单元 1034, 其设置成: 当所述比较结果显示所述第一数量值等于所 述第二数量值时, 确定在所述第一数量值等于所述第二数量值时获得的测试 吞吐量值为所述第二吞吐量值, 其中, 所述第二吞吐量值为所述第二网络设 备真实的吞吐量值。
在实施过程中, 所述第一网络设备 10还包括:
初始化设置单元 104, 其设置成: 对所述第一网络设备 10的系统资源进 行初始化设置。
所述初始化设置单元 104包括:
第一设置单元 1041 , 其设置成: 将 S设置为 0, 其中, S为表征所述检 测报文的第一数量值;
第二设置单元 1042, 其设置成: 将 R设置为 0, 其中, R为表征所述环 回检测报文的第二数量值;
第三设置单元 1043 , 其设置成: 将 CLP设置为 C, 其中, C的值基于公 式 Bbps X TPo/o/ (Lf + Lc) χ Ts获得, C为大于或等于 1的整数, Bbps表征所述第 二网络设备 30的理论宽带, TP%表征所述第二网络设备吞吐量的百分比值, LF + LE表征数据帧实际传输值, CLP为表征本次测试过程剩余需要发送的所述 检测报文的第三数量值; 以及
第四设置单元 1044, 其设置成: 将定时器 TCpu设置为 Ts秒, 其中, 所 述定时器 TCpu设置成控制所述数据处理器 103生成周期性的检测报文。
通过本发明实施例中的一个或多个技术方案, 至少可以实现如下技术效 果:
( 1 )由于釆用了用网络设备模拟专业测试仪的技术手段, 所以解决了吞 吐量测试在没有测试仪器或测试仪器不能工作时, 不能进行的技术问题, 进 而具有了利用网络设备自动测试吞吐量的技术效果。
( 2 )同时, 解决了需要额外增加专业测试仪器的问题, 进而具有降低吞 吐量测试成本的技术效果。
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序 来指令相关硬件完成, 所述程序可以存储于计算机可读存储介质中, 如只读 存储器、 磁盘或光盘等。 可选地, 上述实施例的全部或部分步骤也可以使用 一个或多个集成电路来实现。 相应地, 上述实施例中的各模块 /单元可以釆用 硬件的形式实现, 也可以釆用软件功能模块的形式实现。 本发明实施例不限 制于任何特定形式的硬件和软件的结合。
离本发明的精神和范围。 这样, 倘若对本发明实施例的这些修改和变型属于 本发明权利要求及其等同技术的范围之内, 则本发明也意图包含这些改动和 变型在内。
工业实用性
本发明实施例中, 由于釆用了用网络设备模拟专业测试仪的技术手段, 所以解决了吞吐量测试在没有测试仪器或测试仪器不能工作时, 不能进行的 技术问题, 进而具有了利用网络设备自动测试吞吐量的技术效果; 且解决了 需要额外增加专业测试仪器的问题, 进而具有降低吞吐量测试成本的技术效 果。

Claims

权 利 要 求 书
1、 一种吞吐量测试的方法, 包括:
第一网络设备通过数据处理器生成周期性的检测报文;
所述第一网络设备将所述检测报文发送给待测试的第二网络设备,其中, 所述第一网络设备的第一吞吐量值大于等于所述第二网络设备的第二吞吐量 值;
所述第一网络设备接收经由所述第二网络设备环回的环回检测报文; 所述第一网络设备获得所述检测报文的第一数量值 , 以及所述环回检测 报文的第二数量值; 以及
所述第一网络设备基于所述第一数量值和所述第二数量值, 通过所述数 据处理器获得表征所述第二网络设备的吞吐量的所述第二吞吐量值。
2、 如权利要求 1所述的方法, 其中, 所述第一网络设备支持的第一网络 协议与所述第二网络设备支持的第二网络协议为相同的网络协议。
3、 如权利要求 1所述的方法, 其中, 在所述第一网络设备通过所述数据 处理器生成周期性的检测报文的步骤之前, 所述方法还包括:
对所述第一网络设备的系统资源进行初始化设置。
4、 如权利要求 3所述的方法, 其中, 所述对所述第一网络设备的系统资 源进行初始化设置的步骤包括:
将 S设置为 0, 其中, S为表征所述检测报文的第一数量值;
将 R设置为 0, 其中, R为表征所述环回检测报文的第二数量值; 将 CLP设置为 C, 其中, C的值基于公式 Bbps X TPo/o I (Lf + Lc) x Ts获得, Bbps表征所述第二网络设备的理论宽带, TP%表征所述第二网络设备吞吐量的 百分比值, LF + LE表征数据帧实际传输值, CLP为表征本次测试过程剩余需要 发送的所述检测报文的第三数量值; 以及
将定时器 TCPU设置为 Ts秒, 其中, 所述定时器 TCPU设置成控制所述数 据处理器生成周期性的检测报文。
5、 如权利要求 1所述的方法, 其中, 所述第一网络设备通过所述数据处 的步骤包括:
通过所述数据处理器获得通过所述第一网络设备中的模版报文创建模块 创建的模版报文;
基于所述模版报文, 通过所述数据处理器生成所述周期性的检测报文; 通过所述数据处理器对所述检测报文进行流量整形, 以在网络拥塞时, 使所述第一网络设备能以一个恒定的速率发送所述检测报文; 以及
将经过流量整形后的所述检测报文发送给所述待测试的第二网络设备。
6、 如权利要求 4或 5所述的方法, 其中, 所述将经过流量整形后的所述 检测报文发送给所述待测试的第二网络设备的步骤包括:
所述第一网络设备向所述第二网络设备发送 C个所述检测报文, 其中,
C为大于或等于 1的整数, CLP=C;
当 S=C时, 停止发送所述检测报文。
7、 如权利要求 5所述的方法, 其中, 所述基于所述模版报文, 通过所述 数据处理器生成所述周期性的检测报文的步骤包括:
通过所述数据处理器检测是否有中断事件发生;
在有中断事件发生时, 基于所述模版报文, 通过所述数据处理器生成所 述周期性的检测报文;
其中, 所述中断事件发生的中断速率值大于或等于所述表征所述第二网 络设备的吞吐量的所述第二吞吐量值。
8、 如权利要求 1所述的方法, 其中, 所述环回检测报文为:
所述第二网络设备在收到所述检测报文,并对所述检测报文进行处理后, 经由所述第二网络设备的发送 /接收端口发送给所述第一网络设备的报文。
9、 如权利要求 1或 4所述的方法, 其中, 在所述第一网络设备接收经由 所述第二网络设备环回的环回检测报文的步骤之后, 所述方法还包括:
对所述环回检测报文进行处理, 以判断所述环回检测报文的有效性; 以 及 当所述环回检测报文为有效时, 将所述表征所述环回检测报文的第二数 量值 R加 1。
10、 如权利要求 1所述的方法, 其中, 所述第一网络设备基于所述第一 数量值和所述第二数量值, 通过所述数据处理器获得表征所述第二网络设备 的吞吐量的所述第二吞吐量值的步骤包括:
当所述第一网络设备中定时器的计时时间大于等于一预设时间时, 比较 所述的第一数量值和所述的第二数量值, 得到一个比较结果;
当所述比较结果显示所述第一数量值等于所述第二数量值时, 确定在所 述第一数量值等于所述第二数量值时获得的测试吞吐量值为所述第二吞吐量 值, 其中, 所述第二吞吐量值为所述第二网络设备真实的吞吐量值。
11、 一种网络设备, 包括: 发送 /接收端口、 模版报文创建模块和与所述 发送 /接收端口连接的数据处理器, 其中,
所述模版报文创建模块设置成: 创建一模版报文;
所述数据处理器设置成: 基于所述模版报文生成周期性的检测报文; 将 所述检测报文通过所述发送 /接收端口发送给待测试的第二网络设备, 其中, 所述网络设备的第一吞吐量值大于等于所述第二网络设备的第二吞吐量值; 通过所述发送 /接收端口接收经由所述第二网络设备环回的环回检测报文, 并 获得所述检测报文的第一数量值, 以及所述环回检测报文的第二数量值; 以 及基于所述第一数量值和所述第二数量值, 通过所述数据处理器获得表征所 述第二网络设备的吞吐量的所述第二吞吐量值。
12、 如权利要求 11所述的网络设备, 其中, 所述网络设备支持的第一网 络协议与所述第二网络设备支持的第二网络协议为相同的网络协议。
13、 如权利要求 11所述的网络设备, 还包括:
初始化设置单元, 其设置成: 对所述网络设备的系统资源进行初始化设 置。
14、 如权利要求 13所述网络设备, 其中, 所述初始化设置单元包括: 第一设置单元, 其设置成: 将 S设置为 0, 其中, S为表征所述检测报文 的第一数量值; 第二设置单元, 其设置成: 将 R设置为 0, 其中, R为表征所述环回检 测报文的第二数量值;
第三设置单元, 其设置成: 将 CLP设置为 C, 其中, C的值基于公式 Bbps X TPo/o I (Lf + Lc) x Ts获得, C为大于或等于 1的整数, B 表征所述第二网 络设备的理论宽带, 了?%表征所述第二网络设备吞吐量的百分比值, Lf + Lc 表征数据帧实际传输值, CLP为表征本次测试过程剩余需要发送的所述检测报 文的第三数量值; 以及
第四设置单元, 其设置成: 将定时器 TCPU设置为 Ts秒, 其中, 所述定时 器 TCPU设置成控制所述数据处理器生成周期性的检测报文。
15、 如权利要求 11所述的网络设备, 其中, 所述数据处理器包括: 检测报文生成单元, 其设置成: 基于所述模版报文, 通过所述数据处理 器生成所述周期性的检测报文;
整形单元, 其设置成: 通过所述数据处理器对所述检测报文进行流量整 形。
16、如权利要求 15所述的网络设备,其中,所述检测报文生成单元包括: 中断检测单元, 其设置成: 检测是否有中断事件发生;
生成单元, 其设置成: 在有中断事件发生时, 基于所述模版报文, 通过 所述数据处理器生成所述周期性的检测报文;
其中, 所述中断事件发生的中断速率值大于或等于所述表征所述第二网 络设备的吞吐量的所述第二吞吐量值。
17、 如权利要求 11所述的网络设备, 其中, 所述数据处理器还包括: 比较单元, 其设置成: 当所述网络设备中定时器的计时时间大于等于一 预设时间时, 比较所述的第一数量值和所述的第二数量值, 得到一个比较结 果;
确定单元, 其设置成: 当所述比较结果显示所述第一数量值等于所述第 二数量值时, 确定在所述第一数量值等于所述第二数量值时获得的测试吞吐 量值为所述第二吞吐量值, 其中, 所述第二吞吐量值为所述第二网络设备真 实的吞吐量值。
PCT/CN2013/079445 2012-09-26 2013-07-16 一种吞吐量测试的方法及装置 WO2013182137A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP13801114.3A EP2903213B1 (en) 2012-09-26 2013-07-16 Throughput test method and apparatus
US14/441,868 US9838293B2 (en) 2012-09-26 2013-07-16 Throughput test method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2012103637402A CN102904772A (zh) 2012-09-26 2012-09-26 一种网络设备实现吞吐量测试的方法及装置
CN201210363740.2 2012-09-26

Publications (1)

Publication Number Publication Date
WO2013182137A1 true WO2013182137A1 (zh) 2013-12-12

Family

ID=47576820

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/079445 WO2013182137A1 (zh) 2012-09-26 2013-07-16 一种吞吐量测试的方法及装置

Country Status (4)

Country Link
US (1) US9838293B2 (zh)
EP (1) EP2903213B1 (zh)
CN (1) CN102904772A (zh)
WO (1) WO2013182137A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107426042A (zh) * 2016-05-23 2017-12-01 中兴通讯股份有限公司 一种报文传输方法和发送设备

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102904772A (zh) 2012-09-26 2013-01-30 中兴通讯股份有限公司 一种网络设备实现吞吐量测试的方法及装置
ES2670037T3 (es) * 2013-05-09 2018-05-29 Intel IP Corporation Caracterización del caudal
CN103716248B (zh) * 2013-06-07 2017-03-01 潘晶 一种基于以太网交换芯片的以太网流量生成和分析的方法
CN104468251B (zh) * 2013-09-18 2018-11-13 深圳市共进电子股份有限公司 用于自动进行网络设备高低温和长时间循环测试的系统及方法
US9660896B2 (en) * 2014-09-04 2017-05-23 Accedian Networks Inc. System and method for loopback and network loop detection and analysis
CN105207954B (zh) * 2015-08-25 2018-03-20 东软集团股份有限公司 发送数据包和吞吐量测试方法及装置
EP3371997B1 (en) * 2015-11-05 2023-11-08 Nokia Technologies Oy Special test functions for application specific data transmission
CN107342947B (zh) * 2016-04-28 2020-06-26 华为技术有限公司 流量整形方法、控制器、网络设备和流量整形系统
CA3073683C (en) * 2017-08-24 2023-03-07 Siemens Industry, Inc. System and method for qualitative analysis of baseband building automation networks
CN109188969A (zh) * 2018-09-04 2019-01-11 北京华环电子股份有限公司 一种基于fpga的高精度发包引擎的发包方法
CN114390574B (zh) * 2022-01-19 2023-12-19 Tcl通讯科技(成都)有限公司 无线网络吞吐量测试方法、装置和计算机可读存储介质
CN114844806B (zh) * 2022-04-15 2023-08-25 中国信息通信研究院 网络设备的吞吐量测量方法及装置、测试系统及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201001129Y (zh) * 2007-01-04 2008-01-02 中兴通讯股份有限公司 用于eos设备的测试装置
CN101656635A (zh) * 2008-08-20 2010-02-24 鸿富锦精密工业(深圳)有限公司 网络计算装置及方法
CN102104502A (zh) * 2009-12-18 2011-06-22 研祥智能科技股份有限公司 一种基于Linux系统的以太网网络设备性能测试平台
CN102904772A (zh) * 2012-09-26 2013-01-30 中兴通讯股份有限公司 一种网络设备实现吞吐量测试的方法及装置

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6067297A (en) * 1996-06-28 2000-05-23 Symbol Technologies, Inc. Embedded access point supporting communication with mobile unit operating in power-saving mode
US7058723B2 (en) * 2000-03-14 2006-06-06 Adaptec, Inc. Congestion control for internet protocol storage
US6990616B1 (en) * 2000-04-24 2006-01-24 Attune Networks Ltd. Analysis of network performance
US7009957B2 (en) * 2002-02-28 2006-03-07 Airmagnet, Inc. Measuring the throughput of transmissions over wireless local area networks
US7305464B2 (en) * 2002-09-03 2007-12-04 End Ii End Communications, Inc. Systems and methods for broadband network optimization
US20060068839A1 (en) * 2004-08-18 2006-03-30 Henry Kim Using browser-controlled diagnostic channel to manage wireless data terminal devices
JP4728189B2 (ja) * 2006-07-31 2011-07-20 富士通株式会社 ネットワーク中継装置の試験方法及びネットワーク中継装置
US7616568B2 (en) * 2006-11-06 2009-11-10 Ixia Generic packet generation
US7970394B2 (en) * 2006-12-13 2011-06-28 Tropos Networks, Inc. Determining coverage of a wireless network
CN101247276B (zh) * 2007-02-12 2012-05-23 中兴通讯股份有限公司 用于WiMAX系统的大话务模拟测试工具及测试方法
US8248948B2 (en) * 2007-04-03 2012-08-21 Tropos Networks, Inc. Monitoring network conditions of a wireless network
US7945888B2 (en) * 2008-02-28 2011-05-17 International Business Machines Corporation Model-based hardware exerciser, device, system and method thereof
CN101399715B (zh) * 2008-10-15 2011-01-26 北京航空航天大学 一种光纤通道网络测试平台和测试方法
US8792382B2 (en) * 2008-12-17 2014-07-29 Centurylink Intellectual Property Llc System and method for tracking a line rate utilization
US8311776B2 (en) * 2009-12-01 2012-11-13 Verizon Patent And Licensing Inc. Methods, systems and computer program products for throughput-testing of electronic data systems
CN101848223B (zh) * 2010-05-25 2014-08-13 中兴通讯股份有限公司 基于网络处理器实现快速报文双向转发检测的方法和装置
US8582458B2 (en) * 2010-09-29 2013-11-12 At&T Intellectual Property I, L.P. Femtocell automatic speed test
WO2013140264A2 (en) * 2012-03-19 2013-09-26 Telefonaktiebolaget L M Ericsson (Publ) Null-data packet throughput system and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201001129Y (zh) * 2007-01-04 2008-01-02 中兴通讯股份有限公司 用于eos设备的测试装置
CN101656635A (zh) * 2008-08-20 2010-02-24 鸿富锦精密工业(深圳)有限公司 网络计算装置及方法
CN102104502A (zh) * 2009-12-18 2011-06-22 研祥智能科技股份有限公司 一种基于Linux系统的以太网网络设备性能测试平台
CN102904772A (zh) * 2012-09-26 2013-01-30 中兴通讯股份有限公司 一种网络设备实现吞吐量测试的方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107426042A (zh) * 2016-05-23 2017-12-01 中兴通讯股份有限公司 一种报文传输方法和发送设备

Also Published As

Publication number Publication date
US9838293B2 (en) 2017-12-05
CN102904772A (zh) 2013-01-30
EP2903213B1 (en) 2019-04-10
US20150295810A1 (en) 2015-10-15
EP2903213A4 (en) 2016-01-20
EP2903213A1 (en) 2015-08-05

Similar Documents

Publication Publication Date Title
WO2013182137A1 (zh) 一种吞吐量测试的方法及装置
KR101784405B1 (ko) 다수의 네트워크 주소들을 사용하여 시험 대상 장치와 시험을 제어하는 시험 장비의 동기화를 확립하는 시스템 및 방법
EP3739814A1 (en) Indirect testing using impairment rules
EP2876831B1 (en) Parameter Adjustment Method and Apparatus
US9338035B2 (en) Microcontroller with can bus module and auto speed detect
WO2018090644A1 (zh) 一种自适应网速匹配方法的方法和装置、存储介质
CN108683558B (zh) 铁路安全通信协议一致性测试方法
JP6204587B2 (ja) Canバス接続ユニットの内部遅延時間を定めるための装置、および測定方法
WO2017202166A1 (zh) 一种报文传输方法和发送设备、存储介质
US7774669B2 (en) Complex pattern generator for analysis of high speed serial streams
JP2007523508A (ja) ネットワークスループット測定のための方法及び装置
CN115208808B (zh) 服务质量测试方法、装置以及芯片设备、存储介质
CN109120479B (zh) 一种基于网络报文格式的网络吞吐量测试方法
CN102185732B (zh) 测试通信设备主动队列管理参数的方法和系统
CN112714466B (zh) 服务质量测量方法、装置及用户平面功能
WO2014134958A1 (zh) 一种流量监管的方法及装置
EP3264682A1 (en) Debugging failure of a service validation test
Vlachou et al. Simulator and experimental framework for the MAC of power-line communications
JP3694864B2 (ja) イーサネット(登録商標)伝送装置及びその回線品質監視機能の試験方法
WO2012119416A1 (zh) 一种电子设备检测的方法和电子设备
JP2011160374A (ja) 伝送装置及びネットワークの診断方法
CN110474819B (zh) 基于包计数的fc-eth协议转换芯片验证装置及方法
CN109218043B (zh) 业务质量检测装置、系统和方法
JP2009010583A (ja) パケット通信品質計測装置及び方法
KR101466035B1 (ko) 이종 프로토콜 간의 데이터 전송 성능을 측정하기 위한 시스템 및 그 방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13801114

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2013801114

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 14441868

Country of ref document: US