CN1964247B - A method and device to simulate network damage - Google Patents

A method and device to simulate network damage Download PDF

Info

Publication number
CN1964247B
CN1964247B CN 200610161079 CN200610161079A CN1964247B CN 1964247 B CN1964247 B CN 1964247B CN 200610161079 CN200610161079 CN 200610161079 CN 200610161079 A CN200610161079 A CN 200610161079A CN 1964247 B CN1964247 B CN 1964247B
Authority
CN
Grant status
Grant
Patent type
Prior art keywords
abnormal
simulation
package
information
network
Prior art date
Application number
CN 200610161079
Other languages
Chinese (zh)
Other versions
CN1964247A (en )
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
Grant date

Links

Abstract

To overcome defects in prior art, the provided simulation method for network damage comprises: generating configuration table contained abnormal simulation information; generating abnormal data package according to abnormal simulation information to calculate the sending time and thereby send abnormal data package. This invention is simple and convenient, reduces cost and testing period greatly, and can construct abnormal simulation with high precision for wide quantitative testing.

Description

对网络损伤进行模拟的方法和装置 Method and apparatus for simulating network impairments

技术领域 FIELD

[0001] 本发明涉及网络测试领域,特别涉及一种对网络损伤进行模拟的方法和装置。 [0001] The present invention relates to network testing, and in particular relates to a method and apparatus for simulating network impairments. 背景技术 Background technique

[0002] 到目前为止,以太网仍然是计算机互连领域内最活跃的技术,以包传输网络为基础的以太网技术,凭借价格优势、通用性等特性,快速地得到普及,并且还在逐渐扩展服务领域。 [0002] To date, Ethernet is still the most active in the field of computer interconnect technology to packet transmission network based on Ethernet technology, with the characteristics of the price advantage, versatility, etc., quickly gained popularity and is still gradually expand service areas. 随着互联网的不断发展,一些传统的网络设备(如路由器)之间的带宽已经不能满足要求,需要更高更有效率的互连技术来连接这些网络设备构成互联网的骨干,1000M以太网成了首选的技术。 With the continuous development of the Internet, bandwidth between some traditional network devices (such as routers) can not meet the requirements, needs higher and more efficient interconnect technology to connect network devices constitute the backbone of the Internet, 1000M Ethernet has become preferred technique. 用户通过以太网技术接入城域网,实现上网,文件下载,视频点播、专线、 专网等业务,已经变得越来越流行。 Users access via Ethernet metropolitan area network, Internet access, file downloads, video on demand, leased line, private network and other services, it has become more popular.

[0003] 最近出现的VoIP(Voice over Internet Protocol,基于网际协议的语音传ft)、 RTP (Real-timeTransport Protocol, ) > CESop (Circuit Emulation Services over Packet-switchednetwork, N^ W ΐχ^^Λ) >ToP (Timing over Packet-switched network,包交换网络传时钟)传输等技术,实现实时信号通过包交换网 [0003] VoIP recent (Voice over Internet Protocol, based on voice over Internet Protocol pass ft), RTP (Real-timeTransport Protocol,)> CESop (Circuit Emulation Services over Packet-switchednetwork, N ^ W ΐχ ^^ Λ)> ToP (Timing over packet-switched network, a packet switched network transmission clock) transmission technology, real-time signal through the packet switching network

络传输信息。 Network to transmit information.

[0004] 实时信号的传输成为基于PSN(Packet_Switched Network,包分组交换网络)网络的新业务,但是,数据包可能在网络中发生丢帧和延迟;而且由于所经过的路由不同,以及网络设备的固有延迟,可能会出现PDV(Packet Delay Variation,包延迟抖动)和乱序; 另外在中间站点故障时发生的路由倒换,也会出现一段时间的丢包或重复发送,以及目的站点可能收到各种错包。 [0004] The real-time signal transmission becomes PSN (Packet_Switched Network, a packet switched network packet) is a new service network, however, possible frame loss and packet delay based network; and due to the different routes through which, as well as network equipment inherent delays may occur PDV (packet delay Variation, packet delay jitter) and scrambled; additional routing occurs in the middle of the site and the failover, there will be a period of loss or repeated transmission, and the destination station may receive each the wrong kind of package. 正是因为这些网络异常,可能导致所需要传输的实时信号的质量严重劣化,甚至导致业务中断。 It is because of these network anomalies may lead to serious quality real-time signal required transmission degradation, and even lead to business interruption.

[0005] 参见图1,现有技术一是为了测试某个设备的性能,在实验室内利用现有的仪器模拟出小型组网环境进行测试。 [0005] Referring to Figure 1, one prior art device for the performance of a test, simulated small networking existing instruments in laboratory testing. 为了方便对发送信号和接收信号进行对比,得出延时、抖动、 误码等测试数据,设置信号发生源和接收源为同一仪器,即图中的信号发生测试仪器。 To facilitate the transmission and reception signals of contrast, obtained delay, jitter, bit error test data, etc., and the reception signal source provided the source of the same instrument, i.e., the signal generating test instruments in FIG. 由信号发生测试仪器产生数据包(如视频流)并发送给待测设备一,待测设备一收到后将其转换成以太网数据包,并通过多个集线器和路由器进行传输,最后到达待测设备二,待测设备二收到以太网数据包后,将其转换成原始格式的数据包(即视频流),然后返回给信号发生测试仪器,信号发生测试仪器收到待测设备二发来的数据包后,将其与原始信号即发送给待测设备一的数据包进行比较,从而测试待测设备一和待测设备二的信号质量,即检测待测设备一的发送功能和待测设备二的接收功能。 Generated by the packet (e.g., a video stream) and sends the signal generating device under test a test apparatus, after receiving a device under test which is converted into Ethernet packets and transmitted through a plurality of hubs and routers, and finally to be after two test devices, test equipment two received Ethernet packets, converts it into the original data packet format (i.e. the video stream), then returns to the test signal generating apparatus, received test signal generating apparatus made two test instrument after a data packet, i.e. to transmit the original signal to the device under a data packet are compared to the test signal quality of a device under test DUT and II, i.e., the detection of a device under test and a transmission function to be receiving function measuring apparatus II. 通过线路加扰制造错包,或利用网络设备固有的延迟,制造延迟和微弱的延迟抖动等测试环境。 Via line scrambling manufacturing error packet, or a network device using the inherent delay, and the delay producing weak delay jitter test environment.

[0006] 现有技术一的缺点如下: [0006] The disadvantages of a prior art as follows:

[0007] 由于缺少外部因素的干扰,测试结果不足以反应真实情况,如果采用线路加扰的方式生成错包,则具有随机性,不易控制。 [0007] Due to the lack of interference of external factors, the test result is not sufficient to reflect the actual situation, if the line scrambled error packet generated in a manner, then random, difficult to control. 由于设备的数量和连接信号线的长度的限制,测试效果非常有限,无法模拟较为复杂的真实网络环境,不能对错误种类和程度加以精确控制。 Due to the length limitations and the number of signal lines connected to the device, the test is very limited effect, unable to simulate more complex real network environment, can not be precisely controlled and the degree of the type of error. [0008] 参见图2,为现有技术二在实际网络中测试设备的信号质量。 [0008] Referring to Figure 2, the prior art is a second signal quality test equipment in real networks. 测试环境可以是实 It can be a real test environment

SDH (Ethernet over Synchronous Digital Hierarchy, SDH (Ethernet over Synchronous Digital Hierarchy,

基于同步数字体系的以太网)、或者混合网络等等。 Based on Synchronous Digital Hierarchy Ethernet), or hybrid network, and so on. 信号发生测试仪器一首先发送一个原始信号(如视频流数据包)给待测设备一,待测设备一收到后将其转换成以太网数据包,然后通过多种媒介转发出去,如通过无线信道、卫星信道、WAN(Wide area network,广域网)、 ATM(AsynchronousTransfer Mode,异步传输模式)或基于SDH的以太网等传输信号,最后到达待测设备二,待测设备二收到以太网数据包后将其转换成原始格式的数据包,并转发给信号发生测试仪器二;另外信号发生测试仪器一还会通过其他安全的方式将原始信号发送给信号发生测试仪器二,从而保证信号发生测试仪器二能够将原始信号与收到的信号进行比较,来验证待测设备一和待测设备二的实时信号质量和抗干扰情况,可以获得相当真实的实际测试数据。 A first test signal generating device transmits a raw signal (e.g., video stream packets) to a device under test, the device under test after converting it into a received Ethernet packets, and then forwards it through a variety of media, such as by radio channel, a satellite channel, WAN (Wide area network, wide area networks), ATM (AsynchronousTransfer mode, ATM) or Ethernet over SDH transmission signal, and finally to the two devices under test, the device under test two received Ethernet packets after converting the original format into packets, and forwarded to the two signal generating test instruments; test signal generating apparatus further also a signal to the original signal generating test instruments by two other secure manner, so as to ensure the test signal generating apparatus two raw signals can be compared with the received signal, to verify the quality of real-time signal and interference situation a device under test DUT and II, can be obtained quite true actual test data.

[0009] 现有技术二的缺点如下: [0009] The disadvantages of the prior art two is as follows:

[0010] 由于受包交换网络的路由功能所限,必须将发送端和接收端设定在不同的地点, 通过较长的路径,才能得到理想的测试环境,否则无法通过预定的骨干网络,测试结果无参考价值。 [0010] Since the packet-switched network routing limited by, the transmitter and receiver must be set to end at different locations, through a longer path, in order to obtain the desired test environment, or can not backbone network through a predetermined test results There was no reference value. 而异地或跨国测试往往费用昂贵,成本极高。 The off-site or multinational test is often expensive, very high cost. 测试环境的搭建也比较复杂,不同测试向量的更换常需要测试环境的重大变动,影响测试效率。 Set up a test environment is also more complex, switch to a different test vectors often require significant changes in the test environment, the impact test efficiency. 测试的周期比较长,而且由于网络异常的不可预计性,无法对真实网络的特性进行控制,只有通过长时间的连续测试,才能得到较完整的测试报告。 The test cycle is longer, and because of unpredictable network anomalies, unable to control the properties of a real network, only through continuous testing for a long time, to get a more complete test report. 另外当测试过程中出现不预期状况时,由于网络的复杂性,不仅很难追查,也极难重现。 In addition, when the situation is not expected to occur during the test, due to the complexity of the network, not only difficult to trace, but also extremely difficult to reproduce.

发明内容 SUMMARY

[0011] 为了解决现有技术中不能模拟较复杂的真实网络环境或测试费用高、周期长等问题,本发明提供了一种对网络损伤进行模拟的方法,具体包括以下步骤: [0011] In order to solve the prior art can not simulate more complex high real network environment or test cost and long period, the present invention provides a method of simulating damage network, includes the following steps:

[0012] 步骤A :生成对需模拟的异常信息进行记录的配置表; [0012] Step A: generating a configuration table for an analog of the abnormality information recording;

[0013] 步骤B:在接收到正常数据包时,根据所述需模拟的异常信息,生成异常数据包, 并计算出所述异常数据包的发送时间,将所述异常数据包存储到帧存储器中,并将所述异常数据包的起始地址和发送时间存储到地址和时间存储器中; [0013] Step B: Upon receiving the normal data packet, the abnormality information according to the required analog generate abnormal data packets, and calculating the transmission time of the data packet abnormality, the abnormal data packet stored in the frame memory , and stores the start address and the transmission time of the abnormal packet into a memory address and time;

[0014] 步骤C:循环检索所述地址和时间存储器,检索到发送时间符合标准时钟的当前时间的起始地址时,按照所述起始地址从所述帧存储器中读出异常数据包并发送。 [0014] Step C: retrieving the cycle time and the memory address, retrieving the start address of the transmission line with the standard clock period of the current time, according to the start address read out from the abnormality data packets and transmitting said frame memory .

[0015] 本发明还提供了一种对网络损伤进行模拟的装置,所述装置包括: [0015] The present invention also provides an apparatus for simulating network impairments, said apparatus comprising:

[0016] 配置模块,用于生成对需模拟的异常信息进行记录的配置表; [0016] The configuration module, for generating a configuration table for an analog of the abnormality information recording;

[0017] 异常加入模块,用于在接收到正常数据包时,根据所述需模拟的异常信息,生成异常数据包,并计算出所述异常数据包的发送时间;所述异常加入模块还包括帧存储器、地址和时间存储器;所述帧存储器用于存储所述异常数据包;所述地址和时间存储器用于存储所述异常数据包的起始地址和发送时间; [0017] Abnormal added module, when receiving normal data packet, the abnormality information according to the required analog generate abnormal data packet, and calculates the sending time of the abnormal data packet; said module further comprises abnormality was added a frame memory, a memory address and time; the frame memory for storing the abnormality data packet; said address memory and time for storing the start address of the abnormal data packet and a transmission time;

[0018] 发送模块,用于循环检索所述地址和时间存储器,检索到发送时间符合标准时钟的当前时间的起始地址时,按照所述起始地址从所述帧存储器中读出异常数据包并发送。 When the [0018] transmission means for retrieving said address and cycle time of the memory, retrieve the transmission time to meet the standard clock start address of the current time, according to the start address read out from said data packet abnormality frame memory and send it.

[0019] 本发明的有益效果主要表现在: [0019] Advantageous effects of the present invention are mainly:

[0020] 1、通过单台仪表即可完成真实组网环境的模拟,不仅在实验室就能方便地搭建可配置的各种网络环境,而且极大地降低了测试成本,明显地缩短了测试周期。 [0020] 1, is completed by a single instrument to simulate the real network environment, not only can easily build a variety of network environments may be arranged in the lab, but also greatly reduce the cost of test, significantly shorten the test period .

[0021] 2、通过简单变换配置表,能够构造出多种类型的异常,完成各种测试;由于配置表可随时更改,使测试完全可控制、可介入;而且便于分析定位,能实现简单问题的重现。 [0021] 2, by a simple configuration conversion table can be constructed of a variety of types of abnormality, various test completion; configuration table may be changed because the test can be fully controlled, may intervene; and ease of location, and the problem to achieve a simple to reproduce.

[0022] 3、通过更改配置表中的异常类型和延迟时间,可对网络异常进行任意放大,实现网络容限的测试。 [0022] 3, by changing the type of exception and a delay time in the configuration table, the network may be arbitrarily enlarged abnormality, network tolerance test. 例如,在真实网络中,最大的包延时会达到1秒,本发明可以使包延迟达到10秒或更高。 For example, in a real network, will reach the maximum packet delay of one second, the present invention enables packet delay of 10 sec or more.

[0023] 4、可精确构造异常,并进行微调,能得到精确的分析报告,可实现有针对性、有目的地对待测设备进行各种定性定量测试。 [0023] 4, abnormality can be accurately configured, and fine-tuning, an accurate analysis can be obtained, enabling targeted purposefully EUT various qualitative and quantitative tests.

[0024] 附图说明 [0024] BRIEF DESCRIPTION OF DRAWINGS

[0025] 图1是现有技术一模拟组网测试结构图; [0025] FIG. 1 is a prior art test structure of FIG analog network;

[0026] 图2是现有技术二实际网络测试结构图; [0026] FIG. 2 is a prior art two real network configuration diagram of the test;

[0027] 图3是本发明网络损伤模拟仪器的应用示意图; [0027] FIG. 3 is a schematic view of the application network impairments simulation apparatus of the invention;

[0028] 图4是本发明对网络损伤进行模拟的方法实施例流程图; [0028] FIG. 4 is a flowchart of a method embodiment of the present invention for simulating network impairments embodiment;

[0029] 图5是本发明帧存储器数据状态设置示意图; [0029] FIG 5 is a frame memory of the present invention is provided a schematic view of a data state;

[0030] 图6是本发明对网络损伤进行模拟的装置实施例结构图; [0030] FIG. 6 is a simulation device of the present invention a network configuration diagram of injuries in Example embodiment;

[0031] 图7是本发明对网络损伤进行模拟的装置工作原理示意图。 [0031] FIG. 7 is a schematic diagram of an analog device operating principles of the present invention for network impairments.

[0032] 具体实施方式 [0032] DETAILED DESCRIPTION

[0033] 下面结合附图和具体实施例对本发明作进一步说明,但不作为对本发明的限定。 [0033] The following examples of the present invention will be further described in conjunction with the accompanying drawings and the specific embodiments, but not limitative of the present invention.

[0034] 本发明基于逻辑电路,可以由可编程逻辑器件或微处理器实现,也可以批量制作为ASIC (Application Specific Integrated Circuit 特定用途集成电路)或商用芯片。 [0034] The present invention is based on the logic circuit, can be implemented by a microprocessor or a programmable logic device may be batch fabricated as ASIC (Application Specific Integrated Circuit Application Specific Integrated Circuit) chip or commercial. 应用本发明可以制成专用测试仪器,通过单台仪器实现多种测试,如图3所示。 Application of the present invention may be made of special test equipment, achieved by a variety of tests a single instrument, as shown in FIG.

[0035] 本发明将包交换网络的网络异常进行分离抽象,得到以下五种基本异常的类型: 丢包、延迟、错包、重发和乱序。 [0035] The present invention is packet-switched network to a network abstraction isolated abnormality, the following five basic types of anomalies: packet loss, delay, error packets, retransmission and scrambled. 实际网络中的各种异常都可以由这五种基本异常组合得出。 Various practical network anomalies can be derived from the combination of these five basic abnormalities. 通过简单变换配置表,能够构造出多种类型的异常,例如,丢包且延迟异常、错包且延迟异常、丢包且乱序、错包且乱序等等。 Conversion table by a simple configuration, can be constructed of a variety of types of abnormality, e.g., packet loss and delay abnormality and delay abnormality in error packets, packet loss and disorder, disorder and the like and the error packets.

[0036] 实施例一 [0036] Example a

[0037] 参见图4,本发明提供了一种对网络损伤进行模拟的方法,具体包括以下步骤: [0037] Referring to FIG 4, the present invention provides a method of simulating damage network, includes the following steps:

[0038] 步骤101 :首先生成用于记录异常模拟信息的配置表,并将其保存在配置表存储器中。 [0038] Step 101: generating a first configuration table for recording and the simulation information, and store it in a memory configuration table.

[0039] 用户可以通过软件生成配置表,也可以通过其他仪器的统计数据、或者数学公式(例如正态分布,背景噪音等)生成。 [0039] User configuration table may be generated by software, the statistics may be generated by other instruments, or the mathematical formula (e.g. a normal distribution, background noise, etc.). 配置表提供模拟包交换网络的配置数据,表中对每个正常数据包都有一个确定的配置项(即记录),这条配置项记录了异常模拟信息,它决定了对应的数据包的内容改变、延时变化、重发特性及丢弃状况等等,对每一数据包进行发送时间和发送内容的控制,从而实现网络损伤模拟的目的。 Analog configuration table configuration packet switched data network, in the table for each of the normal data packet has a certain configuration item (i.e. records), this configuration records abnormal analog information, it determines the content of the corresponding data packet change, delay variation, and discards the retransmission status characteristics, etc., of each data packet transmission time and transmit the content of control, in order to achieve the purpose of damage simulated network. 每个记录的长度为16bit(比特位), 内容包括要加入正常数据包中的异常类型和延迟时间,如表1所示。 The length of each record is 16bit (bits), including the type of exception is added to the delay time and the normal data packet, as shown in Table 1.

[0040]<table>table see original document page 5</column></row> <table> [0040] <table> table see original document page 5 </ column> </ row> <table>

[0041] 表1 [0041] TABLE 1

[0042] 本实施例中数据包的类型有以下8种:[0043] 0000 :正常包; [0042] In the present embodiment the packet type embodiment has the following eight species: [0043] 0000: Normal packets;

[0044] 0001 :丢包; [0044] 0001: packet loss;

[0045] 0010 :CRC 错包; [0045] 0010: CRC error packets;

[0046] 0011:目的地址错误; [0046] 0011: Destination address error;

[0047] 0100 :源地址错误; [0047] 0100: Source address error;

[0048] 0101 :净荷错误; [0048] 0101: Payload Error;

[0049] 1000 :重发; [0049] 1000: retransmission;

[0050] 1001 :超长时间重发。 [0050] 1001: ultra-long retransmission.

[0051] 对于目的地址错误、源地址错误或净荷错误类型,异常的处理是把正常数据包的内容改成错误的。 [0051] For the purposes of address error, an error or a source address error payload type, exception processing is the contents of the packet into the normal error.

[0052] 根据配置表中的值,可以将收到的原始正常数据包,处理为包含上述各种异常的数据包。 Original normal data packet [0052] The configuration table values ​​may be received, the data packet including the treatment of various abnormalities. 每条记录对于一个数据包,可以直接配置后12bit的延迟时间,生成延迟加入及延迟抖动。 For each record of a data packet, the delay time can be configured directly 12bit generates delay and delay jitter added. 配置表具体长度应匹配配置表存储器的深度或深度的整数倍。 Configuration table should match the specific length of an integral multiple of the depth or depth of the memory configuration table.

[0053] 为避免同时对电路中的存储器进行读写而产生冲突,也为了实现配置表的动态更换、和大量配置数据的连续配置,进一步地,可以采用2块存储器作为配置表存储器,一块为读状态,即正在被读取的存储器不能进行写操作;另一块为写状态,即只能用来写入数据。 [0053] In order to avoid simultaneous read and write memory circuit to generate a conflict, and to replace the dynamic configuration table, and a large number of configuration data continuously arranged, and further, the two may be employed as the memory configuration table memory, to a read status, i.e., the memory is not being read write; write state to the other one, which can only be used to write data. 当写操作完成后,状态切换,原只可读的存储器转换为只可写状态,原只可写的存储器转换为只可读状态。 When the write operation is completed, the switching state of the original is converted into read only memory, write-only state, the original write-only memory is converted to a readable state only. 两块存储器不能同时为读状态,或同时为写状态。 Two state memory can not be both read or write state simultaneously. 这种利用两块存储器进行读写切换的功能,还可以实现超大或无限大配置表进行连续配置。 This use of two read and write memory switching function, it may also be implemented large or infinite continuous configuration table configuration.

[0054] 步骤102 :在接收到正常的数据包时,按照配置表中该数据包对应的异常类型,在正常的数据包中加入异常,生成异常数据包;并将异常数据包存储到帧存储器中,异常数据包的写入操作按地址的顺序写入。 [0054] Step 102: upon receiving normal data packet according to the packet type of abnormality corresponding to the configuration table, the added abnormal normal data packet, the data packet generated an exception; abnormality data packets and stored in the frame memory write operation, the abnormal data packet sequentially written address. 如果该异常数据包为重发或超长重发的数据包,则将被重复写入。 If the abnormal data or retransmission packet is retransmitted data packet long, it will be repeatedly written.

[0055] 由于接收到的正常数据包可能为任意长度,所以生成的异常数据包的长度也各不相同。 [0055] Since the normal data packets received may be of any length, the length of the anomalous packets generated are also different. 为了识别出异常数据包是否结束,进一步地,可以在包尾添加标识。 In order to identify whether the abnormal end of packets, further, may be added at the end of packet identifier. 例如,一个数据包的宽度是8bit,则使用9bit宽的存储器,把最后lbit作为标识,当标识为1时,表明该数据包已经结束,当标识为0时,表明该数据包未结束。 For example, the width of a data packet is 8bit, 9bit using wide memory, identified as the last lbit, when the identification is 1, indicating that the data packet has ended, when the identification is 0, indicating that the packet is not completed.

[0056] 步骤103 :按照配置表中该正常数据包对应的延迟时间,计算出生成的异常数据包的发送时间;并将异常数据包的起始地址和发送时间存储到地址和时间存储器中。 [0056] Step 103: in accordance with the delay time corresponding to the normal data packet configuration table, calculates the transmission time of the abnormal data packet generated; and a start address and a transmission time is stored in the abnormality data packet memory address and time.

[0057] 为了提高数据的精确性,进一步地,可以对异常数据包的状态进行记录,在存储异常数据包情况下记录其为有效状态,在读出异常数据包并发送情况下记录其为无效状态, 即增加下面的步骤: [0057] In order to improve the accuracy of data, and further can be recorded in an abnormal state packet, recorded in the storage of the abnormality data packet which case, the read error packet to the active state where it transmits and records as invalid state, i.e., add the following steps:

[0058] 步骤104 :在帧存储器的两侧各连接一块单比特宽、与帧存储器同样深的存储器, 一块作为SIG_I (写入标识),另一块作为SIG_0 (读出标识),初始化时均设为0。 [0058] Step 104: on both sides of the respective frame memories connected to a single-bit width, and deep memory same frame memory, as a SIG_I (write identification), the other one as SIG_0 (identification read-out), are located upon initialization 0. 在向帧存储器写入异常数据包时,将SIG_I中对应的比特位取非,从帧存储器中读出异常数据包时, 将SIG_0中对应的比特位取非。 When abnormal data packet into the frame memory, the bit corresponding SIG_I negated, when the abnormal data packet read out from the frame memory, the bit corresponding to the SIG_0 negated. 在发送异常数据包时,先对两侧的标识进行异或取值,如果结果为1,则该异常数据包有效;如果结果为0,则该异常数据包无效。 When abnormal data packet transmission, the identification of both the first XORed value, if the result is 1, the abnormal data packet payload; If the result is 0, then the packet is invalid exception. 参见图5,灰色的记录为有效记录,即已写入且未被读出,白色的为无效记录,即未被写入或已被读出(由于同一个数据包不允许被重复发送,所以认为已发送的数据包为无效数据包)。 5. Referring to FIG gray record is valid record, and not already written is read out, a white record invalid, i.e. not written or has been read out (due to being repeatedly transmitted with a data packet is not allowed, so consider data packets sent invalid packets). [0059] 步骤105 :循环检索地址和时间存储器,当发送时间符合标准时钟的当前时间时, 取出起始地址。 [0059] Step 105: the memory cycle to retrieve the address and time, when the transmission time of the current time standard clock, the start address taken. 本实施例提供模拟网络的标准时钟,为了便于测试,参考数据包延迟的最大时间,一般将标准时钟值的宽度设为24bit或32bit或以上(大于16bit)。 This embodiment provides a standard clock analogue networks, in order to facilitate testing, with reference to the maximum packet delay time, generally the width of the reference clock is set to 24bit or 32bit value or more (greater than 16bit).

[0060] 由于检索地址和时间存储器的时间决定了计算得到的发送时间和实际发送异常数据包的时间的误差,为了提高精度,进一步地,可以对地址和时间存储器进行分成多个区域,进行并行检索,缩短查询的时间,提高时间精度。 [0060] Since the time to retrieve the memory address and time determines the time error calculated transmission time and the actual transmission of the abnormal data packet, to improve the accuracy, further, the time and the address can be divided into a plurality of memory regions, parallel retrieval, query shorten the time and improve the accuracy of time. 例如,如果地址和时间存储器是4k地址空间,检索一轮的时间为4kX时钟周期。 For example, if the memory address and time is 4k address space, the time to retrieve a 4kX clock cycle. 将4k地址空间划分成4块,每块为lk,对4块区域同时进行检索,则只需花费lkX时钟周期。 The 4k address space is divided into four blocks, each block LK, searching for the four areas simultaneously, only takes lkX clock cycle. 假设检索地址和时间存储器需要1ms的时间,则延迟发送和重发数据包的时间的误差在1ms之内为可以接收的范围。 Suppose the memory and time required to retrieve the address of 1ms, the range of the transmission delay and error retransmission data packet at a time within 1ms is acceptable.

[0061] 步骤106 :根据得到的起始地址从帧存储器中读出异常数据包,如果该异常数据包有效,则发送该异常数据包,并将SIG_0中对应的比特位取非,使该记录失效。 [0061] Step 106: get the start address read out from the frame memory exception packets according to, if the abnormal data packet is valid, transmits the abnormal data packet, and the corresponding bits SIG_0 negated, so that the record failure.

[0062] 实施例二 [0062] Second Embodiment

[0063] 参见图6和图7,本发明还提供了一种对网络损伤进行模拟的装置,包括: [0063] Referring to FIGS. 6 and 7, the present invention also provides a device for simulation of network impairments, comprising:

[0064] 1)配置模块,用于生成用来记录异常模拟信息的配置表; [0064] 1) a configuration module for generating a configuration table for recording information and the simulation;

[0065] 2)异常加入模块,用于在接收到正常数据包时,根据配置表中的异常模拟信息,生成异常数据包,并计算出异常数据包的发送时间; [0065] 2) added to the abnormal module, when receiving normal data packet, according to the configuration information table and the simulation generates abnormal data packet, and calculates the sending time of the abnormal data packet;

[0066] 3)发送模块,用于按照异常加入模块计算出的发送时间发送异常数据包。 [0066] 3) transmitting means for transmitting an abnormal time calculated in accordance with the abnormal transmission packet added module.

[0067] 配置表中对应每个正常数据包都有一条相关异常模拟信息的记录,异常模拟信息通常包括异常类型和延迟时间等;异常加入模块根据正常数据包对应的异常类型和延迟时间来生成异常数据包;生成的异常数据包的发送时间按标准时钟的当前时间加上延迟时间来计算。 [0067] The configuration table corresponding to each of the normal data packet has an associated exception analog recording information, and the simulation information typically includes the type of exception and a delay time; abnormal added module generates the normal data packet according to the type of abnormality corresponding to the delay time and abnormal data packet; abnormal packet transmission time generated by the clock's current time plus the standard delay time is calculated.

[0068] 上述配置模块还包括: [0068] The configuration module further comprises:

[0069] 配置表存储器,用于存储配置模块生成的配置表,配置表存储器包括两个存储器, 在任一时刻,其中一个为读状态,另一个为写状态;在向处于写状态的存储器写入配置表后,将该存储器的状态转为读状态,相应地,将另一个存储器的状态转为写状态。 [0069] The configuration table memory for storing configuration module configuration table generated configuration table memory comprises two memories, at any one time, one of the read state, the other is writing state; in the writing to the memory in a write state after the configuration table, into the state of the memory read state, accordingly, the state of the other memory into the write state.

[0070] 上述异常加入模块还包括: [0070] Add the abnormality module further comprises:

[0071] 帧存储器,用于存储异常加入模块生成的异常数据包; [0071] The frame memory for storing abnormality data packet generating module abnormality was added;

[0072] 地址和时间存储器,用于存储异常加入模块生成的异常数据包的起始地址和异常加入模块计算得到的发送时间。 Start address [0072] address and time memory for storing the added module generates abnormal abnormality and the abnormal packet transmission time added module calculates obtained.

[0073] 上述发送模块具体用于启动发送时间检索器对地址和时间存储器循环检索,当检索到符合标准时钟当前时间的发送时间时,读出对应的起始地址,然后按照起始地址从帧存储器中读出异常数据包并发送。 When [0073] The sending module is configured to start the transmission time of the crawler memory cycle to retrieve the address and time, when the standard clock to retrieve the current time in line with the transmission time, corresponding to the read start address, then in accordance with the start address from the frame memory read error packet and transmitted.

[0074] 上述模拟网络损伤的装置还包括: [0074] The network impairments simulation apparatus further comprises:

[0075] 状态记录模块,用于在异常加入模块生成异常数据包后,记录异常数据包的状态为有效状态;在发送模块发送异常数据包后,记录该异常数据包的状态为无效状态。 [0075] The status recording module for module generates, after addition of the abnormal abnormality data packet, data packet recorded in an abnormal state to the active state; abnormal data packets transmitted after the transmission module, the recording state of the data packet is abnormal inactive state.

[0076] 以上所述的实施例,只是本发明较优选的具体实施方式的几种,本领域的技术人员在本发明技术方案范围内进行的通常变化和替换都应包含在本发明的保护范围内。 [0076] The above-described embodiment, but several more preferred embodiment of the present invention, changes and substitutions typically skilled in the art will be within the technical scope of the present invention should be included in the scope of the present invention Inside.

Claims (9)

  1. 一种对网络损伤进行模拟的方法,其特征在于,所述方法包括:步骤A:生成对需模拟的异常信息进行记录的配置表;步骤B:在接收到正常数据包时,根据所述需模拟的异常信息,生成异常数据包,并计算出所述异常数据包的发送时间,将所述异常数据包存储到帧存储器中,并将所述异常数据包的起始地址和发送时间存储到地址和时间存储器中;步骤C:循环检索所述地址和时间存储器,检索到发送时间符合标准时钟的当前时间的起始地址时,按照所述起始地址从所述帧存储器中读出异常数据包并发送。 Kind of network impairments simulation method, wherein the method comprises: Step A: generating a simulation of the abnormality information required configuration table records; Step B: Upon receiving the normal data packet, according to the needs simulated abnormal information, generate an exception packet, and calculates the sending time of said data packet abnormality, the abnormal data packet stored in the frame memory and the start address and the transmission time stored in the abnormality data packet memory address and time; step C: retrieving said address and the cycle time of the memory, retrieve the transmission time line with the start address of the current time of the reference clock, the start address read out in accordance with the abnormality data from the frame memory, package and send.
  2. 2.根据权利要求1所述的对网络损伤进行模拟的方法,其特征在于,所述异常包括丢包、延迟、错包、重发和乱序中的一种或几种。 2. The method of simulating network impairments claim 1, wherein the abnormality comprises a packet loss, delay, error packets, and retransmission of one or more scrambled in accordance with claim.
  3. 3.根据权利要求1所述的对网络损伤进行模拟的方法,其特征在于,所述需模拟的异常信息包括异常类型和延迟时间。 The damage of the method for simulating a network according to claim 1, wherein the abnormality information of the abnormality for an analog type and comprises a time delay.
  4. 4.根据权利要求1所述的对网络损伤进行模拟的方法,其特征在于,所述步骤A还包括将所述配置表存储在配置表存储器中的步骤;所述配置表存储器包括两个存储器,在任一时刻,其中一个为读状态,另一个为写状态;在向处于写状态的存储器写入配置表后,将该存储器的状态转为读状态,相应地,将另一个存储器的状态转为写状态。 1 according to the damage on the network simulation method, wherein the step A further comprises the step of the configuration table stored in a memory configuration table of claim 1; the configuration table memory comprises two memory , at any one time, one of the read state, the other write status; configuration table after the writing to the memory in a write state, this state is read into the memory state, accordingly, the state of another memory turn write state.
  5. 5.根据权利要求1所述的对网络损伤进行模拟的方法,其特征在于,所述步骤B还包括在生成异常数据包后记录其为有效状态的步骤;所述步骤C还包括在发送所述异常数据包之后,记录其为无效状态的步骤。 The damage of the method for simulating a network according to claim 1, wherein said step B further including the step of recording an active state after generating exception data packet; said step further comprises transmitting the C after said abnormal data packet, which is a step of recording an inactive state.
  6. 6.根据权利要求1所述的对网络损伤进行模拟的方法,其特征在于,将所述地址和时间存储器划分成多块存储区,所述检索为对所有存储区同时进行检索。 The damage to the network simulating method of claim 1, wherein dividing the memory into a plurality of address and time block storage area, the search for the search of all memory areas simultaneously claims.
  7. 7.—种对网络损伤进行模拟的装置,其特征在于,所述装置包括:配置模块,用于生成对需模拟的异常信息进行记录的配置表;异常加入模块,用于在接收到正常数据包时,根据所述需模拟的异常信息,生成异常数据包,并计算出所述异常数据包的发送时间;所述异常加入模块还包括帧存储器、地址和时间存储器;所述帧存储器用于存储所述异常数据包;所述地址和时间存储器用于存储所述异常数据包的起始地址和发送时间;发送模块,用于循环检索所述地址和时间存储器,检索到发送时间符合标准时钟的当前时间的起始地址时,按照所述起始地址从所述帧存储器中读出异常数据包并发送。 7.- kinds of network impairments simulation device, characterized in that said apparatus comprising: a configuration module, for generating a configuration table for an analog of the abnormality information to be recorded; abnormal added module for receiving data in the normal when the package, according to the abnormality information required simulation, generate an exception packet, and calculates the sending time of the abnormal data packet; the abnormality was added further includes a frame memory module, the memory address and time; the frame memory for storing the abnormality data packet; said address and the memory start address and a transmission time period for storing the abnormality data packet; transmitting means for retrieving said address and cycle time of the memory, retrieve the transmission time standard clock the current address of the start time, the start address read out in accordance with the abnormality data packets from the frame memory and transmitted.
  8. 8.根据权利要求7所述的对网络损伤进行模拟的装置,其特征在于,所述配置模块还包括:配置表存储器,用于存储所述配置表,所述配置表存储器包括两个存储器,在任一时亥IJ,其中一个为读状态,另一个为写状态;在向处于写状态的存储器写入配置表后,将该存储器的状态转为读状态,相应地,将另一个存储器的状态转为写状态。 8. The simulation for the network impairment device according to claim 7, wherein the configuration module further comprises: a configuration table memory for storing the configuration table, the memory comprises two memory configuration table, in any moment Hai IJ, which is a read state, the other write status; configuration table after the writing to the memory in a write state, this state is read into the memory state, accordingly, will be transferred to another state memory write state.
  9. 9.根据权利要求7所述的模拟网络损伤的装置,其特征在于,所述装置还包括:状态记录模块,用于在所述异常加入模块生成异常数据包后,记录所述异常数据包的状态为有效状态;在所述发送模块发送所述异常数据包后,记录该异常数据包的状态为无效状态。 9. The apparatus of claim injury analog network according to claim 7, wherein said apparatus further comprises: a state after recording module for the added module generates abnormal abnormality data packet, recording said data packet abnormality state to the active state; after sending said data packet abnormality in the transmission module, the abnormal state of the packet is recorded to the inactive state.
CN 200610161079 2006-12-04 2006-12-04 A method and device to simulate network damage CN1964247B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200610161079 CN1964247B (en) 2006-12-04 2006-12-04 A method and device to simulate network damage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200610161079 CN1964247B (en) 2006-12-04 2006-12-04 A method and device to simulate network damage

Publications (2)

Publication Number Publication Date
CN1964247A true CN1964247A (en) 2007-05-16
CN1964247B true CN1964247B (en) 2010-08-25

Family

ID=38083161

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200610161079 CN1964247B (en) 2006-12-04 2006-12-04 A method and device to simulate network damage

Country Status (1)

Country Link
CN (1) CN1964247B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102769513B (en) * 2012-07-20 2015-12-16 中国电子科技集团公司第四十一研究所 Ethernet frame delay implementation injury
CN104767655A (en) * 2015-03-17 2015-07-08 微梦创科网络科技(中国)有限公司 Analog result detection method and device
CN104918042B (en) * 2015-06-09 2017-09-29 国网四川省电力公司电力科学研究院 A video signal network impairments simulation apparatus, systems and methods
CN105119740A (en) * 2015-07-16 2015-12-02 中国电子科技集团公司第四十一研究所 IP network damage simulation method and IP network damage simulation instrument

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1381970A (en) 2001-04-17 2002-11-27 Tv网网络股份有限公司 Method and system for allocating medium data at different network
CN1509016A (en) 2002-12-19 2004-06-30 株式会社Ntt都科摩 Agreement test system and method thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1381970A (en) 2001-04-17 2002-11-27 Tv网网络股份有限公司 Method and system for allocating medium data at different network
CN1509016A (en) 2002-12-19 2004-06-30 株式会社Ntt都科摩 Agreement test system and method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JP特开2006-50319A 2006.02.16

Also Published As

Publication number Publication date Type
CN1964247A (en) 2007-05-16 application

Similar Documents

Publication Publication Date Title
US7539489B1 (en) Location-based testing for wireless data communication networks
US20030100299A1 (en) Network testing systems
US20030214982A1 (en) Method and circuit for insertion of time stamp into real time data
US6978223B2 (en) Systems and methods for network performance measurement using packet signature collection
US20030145081A1 (en) Service performance correlation and analysis
US7953014B2 (en) FPGA-based network device testing equipment for high load testing
US20070058670A1 (en) UDP to TCP bridge
US7123616B2 (en) Determining round-trip time delay
Dyer et al. Deployment support network
US20110182191A1 (en) Testing Network Equipment
US20040034492A1 (en) Passive system and method for measuring and monitoring the quality of service in a communications network
US20110001833A1 (en) Computerized device and method for analyzing signals in a multimedia over coax alliance (moca) network and similar tdm / encrypted networks
US20020059545A1 (en) Apparatus for testing functions of communication apparatus
US7206288B2 (en) Methods and apparatus for characterizing a route in fibre channel fabric
US20020034194A1 (en) Voice-over IP communication without echo cancellation
Carneiro et al. FlowMonitor: a network monitoring framework for the network simulator 3 (NS-3)
US20110261698A1 (en) Traffic Generator with Priority Flow Control
US20040208129A1 (en) Testing network communications
CN1777126A (en) System and method for conducting comprehensive measurement and association analysis to time delay and drop
US6871312B2 (en) Method and apparatus for time stamping data
US8208389B2 (en) Methods and apparatus for improved determination of network metrics
US7561559B2 (en) Hardware time stamping and processor synchronization
US20040039806A1 (en) Methods and systems for the synchronized recording and reading of data coming from a plurality of terminal devices
US20120051229A1 (en) Virtualization and replay-based system for network debugging
CN1881908A (en) Method for measuring MPLS network performance parameter

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
C14 Grant of patent or utility model
EXPY Termination of patent right or utility model