[go: up one dir, main page]

CN100461717C - A kind of communication equipment and testing method thereof - Google Patents

A kind of communication equipment and testing method thereof Download PDF

Info

Publication number
CN100461717C
CN100461717C CNB2006100331438A CN200610033143A CN100461717C CN 100461717 C CN100461717 C CN 100461717C CN B2006100331438 A CNB2006100331438 A CN B2006100331438A CN 200610033143 A CN200610033143 A CN 200610033143A CN 100461717 C CN100461717 C CN 100461717C
Authority
CN
China
Prior art keywords
software
loopback
data
module
hardware
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB2006100331438A
Other languages
Chinese (zh)
Other versions
CN1859235A (en
Inventor
宋铜铃
杨敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB2006100331438A priority Critical patent/CN100461717C/en
Publication of CN1859235A publication Critical patent/CN1859235A/en
Application granted granted Critical
Publication of CN100461717C publication Critical patent/CN100461717C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Maintenance And Management Of Digital Transmission (AREA)

Abstract

一种通信设备及其测试方法,由环回处理模块对设备通信数据或业务数据进行软件环回处理;所述环回处理为向上环回或向下环回,所述向上环回是所述环回处理模块把上层软件模块要向下层软件模块或硬件发送的数据回送给上层软件模块;所述向下环回是所述环回处理模块把硬件或下层软件模块送给上层软件模块的数据中途拦截,并送回给下层软件模块或硬件。本发明克服了现有的通信设备进行测试时,测试数据流量有限,环回后转发受影响、对硬件环境依赖高且测试代码编写工作量大等缺点,能进行有效测试,并使环回后对转发不产生影响,减少了对硬件环境的依赖,并减少了编写测试代码的工作量。

Figure 200610033143

A communication device and a testing method thereof, wherein a loopback processing module performs software loopback processing on device communication data or business data; the loopback processing is an upward loopback or a downward loopback, and the upward loopback is the The loopback processing module returns the data that the upper layer software module will send to the lower layer software module or hardware to the upper layer software module; the loopback is the data that the loopback processing module sends the hardware or the lower layer software module to the upper layer software module Intercept midway and send back to the lower layer software module or hardware. The present invention overcomes the shortcomings of the existing communication equipment, such as limited test data flow, affected forwarding after loopback, high dependence on the hardware environment, and heavy test code writing workload, etc. It has no impact on forwarding, reduces the dependence on the hardware environment, and reduces the workload of writing test codes.

Figure 200610033143

Description

一种通信设备及其测试方法 A kind of communication equipment and testing method thereof

技术领域 technical field

本发明涉及通信技术领域,尤其涉及一种通信设备及其测试方法。The invention relates to the technical field of communication, in particular to a communication device and a testing method thereof.

背景技术 Background technique

目前通信网络上大量的设备在运行,运营商需要通过统一的网管软件来远程管理所有设备,这需要通信设备支持稳定的网管通信功能。除此之外,有很大一部分的通信设备,采用主控单板和业务单板的分工模式,主控单板要承担对所有业务单板的配置管理功能,所以设备内部单板之间通信的稳定性也很重要。At present, a large number of devices are running on the communication network. Operators need to remotely manage all devices through unified network management software, which requires communication devices to support stable network management communication functions. In addition, a large part of communication equipment adopts the division of labor between the main control board and the service board. The main control board is responsible for the configuration and management of all business boards. Stability is also important.

但是,由于通信设备在使用中,首先对用户表现出来的是其业务能力,所以各种测试,包括设备生产商自己的测试组织,都把很大的力量投入在对业务的功能和性能的测试中,对设备管理的通信功能测试手段薄弱。往往经过测试的设备在网上应用的时间较长后,就会暴露出设备通信管理方面的问题,如因设备通信不稳定造成的网管断掉等问题。However, since communication equipment is in use, the first thing it shows to users is its service capability, so various tests, including the equipment manufacturer's own test organization, put a lot of effort into the test of business functions and performance Among them, the means of testing the communication function of device management is weak. Often after the tested equipment is used on the Internet for a long time, problems in equipment communication management will be exposed, such as network management disconnection caused by unstable equipment communication.

所以当前增加对设备通信功能的测试手段、提高测试力度成为一个重要的问题。现有技术对通信设备通信功能的测试,限于对设备相关功能进行配置和维护等操作,对网管是通过操作网管软件执行设备维护操作,对设备单板间通信是下发对非主控单板的配置维护命令。希望测试通信功能的稳定性时,唯一的办法就是长时间测试,而测试的操作手段仍不外乎执行所有配置维护的命令。Therefore, it has become an important issue to increase the testing methods for the communication function of the equipment and improve the testing intensity. In the prior art, the test of the communication function of the communication equipment is limited to the configuration and maintenance of the related functions of the equipment. For the network management, the equipment maintenance operation is performed by operating the network management software. configuration maintenance commands. When you want to test the stability of the communication function, the only way is to test for a long time, and the operation method of the test is still nothing more than executing all configuration maintenance commands.

现有的对通信设备通信功能的测试存在以下缺点:The existing tests on the communication function of communication equipment have the following disadvantages:

1、执行的命令有限,涉及的数据特征无法达到通信处理功能所支持处理范围的全部,更不用说超过正常范围的测试,如包长极限测试。1. The commands executed are limited, and the data characteristics involved cannot reach all the processing range supported by the communication processing function, let alone tests beyond the normal range, such as the packet length limit test.

超过正常范围的测试如异常测试、容错测试等,主要是考虑当接口反复收到一些各异的数据,如数据包长按照特定规律变化,数据字段值反复变化等。Tests that exceed the normal range, such as anomaly tests and fault-tolerance tests, are mainly considered when the interface repeatedly receives some different data, such as the length of the data packet changes according to a specific rule, and the value of the data field changes repeatedly.

2、通过正常的外部使用接口——图形或命令行界面操作,命令下发频度有限,造成测试数据流量较小,无法测试通信的性能。2. Through the normal external use interface - graphical or command line interface operation, the frequency of command issuance is limited, resulting in a small test data flow and unable to test the performance of communication.

作为一个对外接口,系统命令接口本可以承担更大的流量,所以对这个接口的性能测试只通过简单的命令操作无法实现。As an external interface, the system command interface can bear greater traffic, so the performance test of this interface cannot be realized only through simple command operations.

3、在测试数据流量有限的条件下,测试长时间稳定性的意义也大大降低。3. Under the condition of limited test data flow, the significance of testing long-term stability is also greatly reduced.

现有技术在数据转发类功能的验证和测试中,硬件环回是一个很有效的方法。在数据转发通路的节点处进行各种类型的环回操作,可以用一个数据源验证两个方向的数据流。例如通路上存在瓶颈时,在适当的地方环回,可以测到瓶颈之前的通路转发性能;在测试仪器不完备的时候,以及测试结果验证和测试问题定位中,环回也都可以起到重要的作用,现在所有的业务芯片基本上都支持硬件环回。In the prior art, hardware loopback is a very effective method in the verification and testing of data forwarding functions. Various types of loopback operations are performed at the nodes of the data forwarding path, and one data source can be used to verify the data flow in both directions. For example, when there is a bottleneck on the path, loopback at an appropriate place can measure the forwarding performance of the path before the bottleneck; loopback can also play an important role when the test equipment is not complete, and in the verification of test results and the positioning of test problems. Now all business chips basically support hardware loopback.

硬件的环回功能只是物理层的数据流向变化,因此环回后,数据流的内容是原封不动的。在窄带业务时,由于数据流都是在一个固定的物理通路上运转,所以环回可以在同一条路上直接返回,或者灵活一些,调换到其它通路上发送回去,数据流仍可以正常抵达目的地。The loopback function of the hardware only changes the data flow direction of the physical layer, so after the loopback, the content of the data flow remains intact. In the case of narrowband services, since the data flow runs on a fixed physical path, the loopback can return directly on the same path, or be more flexible, switch to another path and send it back, and the data flow can still reach the destination normally. .

但硬件环回存在以下问题:But the hardware loopback has the following problems:

在目前应用广泛的IP网络的宽带业务中,所有数据转发都是基于报文中的目的MAC地址信息来确定目的地。转发过程主要分成两步,每个报文进入一个转发芯片时,对表示报文来源的源MAC地址信息和报文进入的端口号作为一个对应信息,记录到地址表中;当进入了芯片的报文要寻找出端口时,拿报文中表示目的地的目的MAC地址去查询已有的地址记录,找到和报文目的MAC对应的端口号,即为该目的所在的物理方位,此报文就从该端口发出。这时,所有数据流的物理介质是完全共享的,当数据流不变、仅调转了方向后,报文转发再经过同一个转发芯片时,报文的源MAC地址就多了一个对应的入端口,导致源地址在两个端口上反复学习,反复刷新地址表;如果报文目的地址已在地址表中,则环回后的报文查找目的地址发现和入端口相同,这是种错误的情况,报文应该被丢弃,无法回到报文开始的入端口。如果芯片硬件实现上存在问题,可能还会引起更严重的错误。In the broadband service of the widely used IP network at present, all data forwarding is based on the destination MAC address information in the message to determine the destination. The forwarding process is mainly divided into two steps. When each message enters a forwarding chip, the source MAC address information indicating the source of the message and the port number that the message enters are used as a corresponding information and recorded in the address table; When a message needs to find an outgoing port, use the destination MAC address in the message to query the existing address records, and find the port number corresponding to the destination MAC address of the message, which is the physical location of the destination. is sent from this port. At this time, the physical medium of all data streams is completely shared. When the data stream remains unchanged and only the direction is reversed, when the message is forwarded through the same forwarding chip, the source MAC address of the message will have a corresponding input port, causing the source address to learn repeatedly on the two ports and refresh the address table repeatedly; if the destination address of the message is already in the address table, the destination address of the message after the loopback is found to be the same as the inbound port, which is an error In this case, the packet should be discarded and cannot be returned to the ingress port where the packet started. If there is a problem in the implementation of the chip hardware, it may also cause more serious errors.

另外,在设备早期调试,或者测试和使用中,对业务功能的调试和定位,经常依赖于硬件环境和硬件支持的调试功能,而这些方面的不完善使得调试定位变得困难重重。如何减少业务测试对硬件环境的依赖也成为软件可测性实现的一个课题。In addition, in the early debugging of equipment, or during testing and use, the debugging and positioning of business functions often depend on the hardware environment and the debugging functions supported by the hardware, and the imperfections in these aspects make debugging and positioning difficult. How to reduce the dependence of business testing on the hardware environment has also become a subject of software testability realization.

现有技术在软件实现的数据处理功能的测试和调试中,通常的数据流是在一个设备单元和另一个设备单元之间进行交互的,设备单元可以是同一设备上的不同单板或者两个不同的设备。在一端产生数据流时,可以在另一端对该数据的处理流程进行白盒的跟踪或黑盒测试。但这种测试存在以下缺点:In the prior art, in the testing and debugging of data processing functions implemented by software, the usual data flow is to interact between one equipment unit and another equipment unit, and the equipment unit can be different single boards or two different devices. When a data stream is generated at one end, white-box tracking or black-box testing can be performed on the data processing flow at the other end. However, this test has the following disadvantages:

1、这种测试的前提一定要同时拥有所需的多个设备单元。当环境不具备时,测试人员就无法进行测试了。1. The premise of this test must be to have multiple required equipment units at the same time. When the environment is not available, testers cannot test.

2、如果是开发人员自己进行测试时,一般会编写一个临时使用的数据驱动模块(在交给专职测试人员的代码中该模块被删去),产生所需的各种数据流,需要的代码量和工作量较大。2. If the developer conducts the test by himself, he will generally write a data-driven module for temporary use (the module is deleted in the code handed over to the full-time tester) to generate the various data streams required, and the required code Larger volume and workload.

发明内容 Contents of the invention

本发明所要解决的技术问题是:克服现有的通信设备进行测试时,测试数据流量有限,环回后转发受影响、对硬件环境依赖高且测试代码编写工作量大等缺点,提供一种通信设备及其测试方法,能进行有效测试,并使环回后对转发不产生影响,减少对硬件环境的依赖,并减少编写测试代码的工作量。The technical problem to be solved by the present invention is: to overcome the shortcomings of the existing communication equipment, such as limited test data flow, affected forwarding after loopback, high dependence on the hardware environment, and heavy test code writing workload, etc., to provide a communication The device and its testing method can carry out effective testing, and make the forwarding unaffected after the loopback, reduce the dependence on the hardware environment, and reduce the workload of writing test codes.

本发明为解决上述技术问题所采用的技术方案为:The technical scheme that the present invention adopts for solving the problems of the technologies described above is:

这种通信设备的测试方法,包括以下步骤:The testing method of this communication equipment comprises the following steps:

由所述通信设备中的环回处理模块对设备通信数据或业务数据进行软件环回处理;performing software loopback processing on device communication data or service data by the loopback processing module in the communication device;

所述环回处理为向上环回或向下环回,其中,所述向上环回是从上层到下层的软件环回时,所述环回处理模块把上层的软件要向下层的软件发送的数据回送给上层的软件;或者,从上层的软件到硬件环回时,所述环回处理模块把上层的软件要向所述硬件发送的数据回送给上层的软件;The loopback processing is an upward loopback or a downward loopback, wherein, when the upward loopback is a software loopback from the upper layer to the lower layer, the loopback processing module sends the upper layer software to the lower layer software The data is sent back to the upper-layer software; or, when looping back from the upper-layer software to the hardware, the loopback processing module sends the data sent to the hardware by the upper-layer software to the upper-layer software;

所述向下环回是从硬件到上层的软件环回时,所述环回处理模块拦截从硬件送给所述上层的软件的数据,并将所述被拦截的数据送回给所述硬件,或者,所述环回处理模块拦截从所述下层的软件送给上层的软件的数据,并将所述被拦截的数据送回给下层的软件。When the downward loopback is the software loopback from the hardware to the upper layer, the loopback processing module intercepts the data sent from the hardware to the upper layer software, and sends the intercepted data back to the hardware , or, the loopback processing module intercepts the data sent from the lower layer software to the upper layer software, and sends the intercepted data back to the lower layer software.

其中,根据软件处理的协议层次的划分不同,所述环回处理模块在不同的软件层次上实现,或根据测试需要,进一步在环回时对数据特征进行变化处理。Wherein, according to different divisions of software processing protocol layers, the loopback processing module is implemented on different software layers, or according to test requirements, further changes processing of data characteristics during loopback.

其中,所述向上环回时,将设备上层软件模块发出的数据,在所述环回处理模块中根据数据特征进行识别,然后环回回去,所述上层软件模块重新接收到数据后,进行测试。Wherein, during the upward loopback, the data sent by the upper layer software module of the device is identified in the loopback processing module according to the data characteristics, and then looped back, after the upper layer software module receives the data again, it is tested .

其中,所述向上环回时,通过加大上层数据发送的流量,由所述环回处理模块进行软件环回,测试相关软件层之间的数据处理性能。Wherein, during the upward loopback, the loopback processing module performs software loopback by increasing the flow of data sent by the upper layer to test the data processing performance between relevant software layers.

其中,所述向下环回时,包括以下步骤:Wherein, when the looping down, the following steps are included:

T1、所述环回处理模块接收报文,所述报文来自测试仪器、测试软件或者对端设备;T1. The loopback processing module receives a message, and the message comes from a test instrument, test software or a peer device;

T2、所述环回处理模块根据需要对所述报文中的转发寻址相关信息项进行转换处理;T2. The loopback processing module performs conversion processing on the information items related to forwarding addressing in the message according to the needs;

T3、所述环回处理模块将经过T2步骤处理后的所述报文送回给硬件,硬件进行转发。T3. The loopback processing module returns the message processed in step T2 to the hardware, and the hardware forwards it.

其中,所述环回处理模块接收的报文由测试仪器或测试软件构造并发出;并在测试仪器或测试软件上对接收到的环回后报文进行分析测试。Wherein, the message received by the loopback processing module is constructed and sent by the test instrument or test software; and the received loopback message is analyzed and tested on the test instrument or test software.

其中,通过增大报文流量,测得通信处理的性能极限;通过变化报文的长度,测得通信处理的报文长度的指标;通过不断变化报文数据特征,进行稳定性测试。Among them, by increasing the message flow, the performance limit of communication processing is measured; by changing the length of the message, the index of the message length of communication processing is measured; by continuously changing the characteristics of the message data, the stability test is carried out.

其中,所述环回的发包源是做环回的软件上层或下层模块,或是测试仪器、对端设备。Wherein, the sending source of the loopback is the upper or lower layer module of the software performing the loopback, or a test instrument or a peer device.

其中,通过设置软件环回的测试操作接口,对软件环回进行配置。Wherein, the software loopback is configured by setting the test operation interface of the software loopback.

相应的一种通信设备,在通信设备中设置环回处理模块,所述环回处理模块对设备通信数据或业务数据进行环回处理,将上层的软件要向下层的软件发送的数据回送给上层的软件;或者,将上层的软件要向硬件发送的数据回送给上层的软件;或者所述环回处理模块拦截从硬件送给上层的软件的数据,并将所述被拦截的数据送回给所述硬件;或者所述环回处理模块拦截从所述下层的软件送给所述上层的软件的数据,并将所述被拦截的数据送回给所述下层的软件。Corresponding to a communication device, a loopback processing module is set in the communication device, and the loopback processing module performs loopback processing on the communication data or business data of the device, and returns the data that the upper layer software will send to the lower layer software to the upper layer or the data sent by the upper-layer software to the hardware is sent back to the upper-layer software; or the loopback processing module intercepts the data sent from the hardware to the upper-layer software, and sends the intercepted data back to the The hardware; or the loopback processing module intercepts the data sent from the lower layer software to the upper layer software, and returns the intercepted data to the lower layer software.

本发明的有益效果为:本发明提供了设备通信功能的灵活测试手段,可以测试性能、稳定性及其它复杂项目;提供一种通信设备及其测试方法,采用软件环回方法,使环回后转发不受影响;软件实现的数据处理功能测试和调试时,不依赖硬件环境,并减少编写测试代码的工作量。具体如下:The beneficial effects of the present invention are as follows: the present invention provides a flexible test method for the communication function of the device, which can test performance, stability and other complex items; provides a communication device and its test method, adopts the software loopback method, and makes the loopback The forwarding is not affected; when testing and debugging the data processing function implemented by the software, it does not depend on the hardware environment, and reduces the workload of writing test codes. details as follows:

1、通过测试仪器/软件收发包、设备软件在不同软件层次都可自环,提供了设备通信等软件数据处理类功能测试的灵活有效的方法,可以测到软件处理性能,并使长时间、稳定性测试更有深度。1. Through the test instrument/software sending and receiving package, the equipment software can be self-looped at different software levels, providing a flexible and effective method for testing software data processing functions such as equipment communication, which can measure the software processing performance and enable long-term, Stability testing is more in-depth.

2、软件的自环因为可以对数据进行修改变化,所以不存在硬件自环时数据转发的问题,增加了一种有效的环回手段,弥补硬件环回的不足。2. Since the software self-loop can modify the data, there is no problem of data forwarding during the hardware self-loop, and an effective loopback method is added to make up for the lack of hardware loopback.

3、针对软件实现的数据处理功能进行本地环回,在测试和调试时,可以不依赖硬件环境;只要在需要环回的适当环节上进行数据识别和环回处理,或根据需要增加一些数据处理,不必编写完整的发送各种报文的驱动模块,减少了很多编写测试代码的工作量。3. Local loopback is performed for the data processing function implemented by the software. When testing and debugging, it does not need to rely on the hardware environment; as long as data identification and loopback processing are performed on the appropriate link that needs loopback, or some data processing is added as needed , it is not necessary to write a complete driver module for sending various messages, which reduces the workload of writing test codes.

附图说明 Description of drawings

图1为本发明通信设备测试原理示意图。Fig. 1 is a schematic diagram of the testing principle of the communication equipment of the present invention.

具体实施方式 Detailed ways

下面根据附图和实施例对本发明作进一步详细说明:Below according to accompanying drawing and embodiment the present invention will be described in further detail:

本发明的核心是实现软件环回,用软件实现的环回可按照环回方向分成两种:向上环回、向下环回。向上环回是把软件要向下层或硬件发送的数据回送给上层软件;向下环回是把硬件或下层软件送给上层软件的数据中途拦截,并送回给下层软件或硬件。The core of the present invention is to realize software loopback, and the loopback implemented by software can be divided into two types according to the loopback direction: upward loopback and downward loopback. Upward loopback is to return the data that the software wants to send to the lower layer or hardware to the upper layer software; Downward loopback is to intercept the data sent by the hardware or lower layer software to the upper layer software, and send it back to the lower layer software or hardware.

1、软件向上环回1. Software loopback

在很多软件实现的数据处理功能中,需要交互的两端在对数据进行处理的地位上是对等的。这时,可以将设备自身发出的数据,在软件下层模块中按照具体情况下的数据特征进行识别,然后环回回去。In many data processing functions implemented by software, the two ends that need to interact are equal in the status of data processing. At this time, the data sent by the device itself can be identified in the lower layer module of the software according to the data characteristics of the specific situation, and then looped back.

如图1所示,在通讯设备中设置环回处理模块S,环回处理模块S对设备通信数据或业务数据进行环回处理,如图1中数据流向A所示,在环回时,可能也有些表示设备位置等数据收发两端信息的字段必须要修改成正确的取值,而大部分的数据内容可无需改变。当上层软件模块重新接收到数据后,它认为就是外部设备发来的数据,测试人员可进行单步跟踪或者黑盒的功能测试。而对数据的触发,根据具体数据的不同,可以是通过外部接口产生(如有命令接口的可以用命令产生),或者是软件自动触发的消息等。As shown in Figure 1, a loopback processing module S is set in the communication device, and the loopback processing module S performs loopback processing on the device communication data or business data, as shown in the data flow direction A in Figure 1, during the loopback, it may There are also some fields indicating the device location and other information on the sending and receiving ends of the data that must be modified to correct values, while most of the data content does not need to be changed. When the upper-layer software module receives the data again, it thinks it is the data sent by the external device, and the tester can perform single-step tracking or black-box functional testing. The triggering of data, according to the difference of specific data, can be generated through an external interface (if there is a command interface, it can be generated by command), or a message automatically triggered by software, etc.

如果在环回处,对数据的内容进行各种改变,如修改字段值为边界值或错误的值,可以进行普通数据难以做到的遍历测试、容错测试等更复杂的测试。如果上层数据发送的流量足够大,在下层进行软件环回,可以测试到相关软件层之间的数据处理性能。If various changes are made to the content of the data at the loopback point, such as modifying the field value to a boundary value or a wrong value, more complex tests such as traversal tests and fault tolerance tests that are difficult to do with ordinary data can be performed. If the flow of data sent by the upper layer is large enough, the software loopback is performed on the lower layer to test the data processing performance between the relevant software layers.

向上环回能在无硬件条件下,测到数据处理的正常功能、错误处理等。这种测试方法对软件处理的业务功能和设备通信功能测试都适用。Loopback can test the normal function of data processing, error handling, etc. without hardware. This test method is applicable to both the business function of software processing and the test of equipment communication function.

单步跟踪或者黑盒测试的选择看具体测试对象的测试需要和是否实施的情况,和普通的单步跟踪或者黑盒测试没有区别。可以用调试版本或者调试工具进行单步跟踪,如果数据的处理有一些统计或查询接口或者在特定数据下要看系统整体表现,就可以在软件运行中进行黑盒的测试。The choice of single-step tracking or black-box testing depends on the test needs of the specific test object and whether it is implemented, which is no different from ordinary single-step tracking or black-box testing. You can use the debugging version or debugging tools to perform single-step tracking. If there are some statistics or query interfaces for data processing, or if you want to see the overall performance of the system under specific data, you can perform black-box testing during software operation.

2、软件向下环回2. Software loopback

如图1中数据流向B所示,本实施例整个方案包括以下步骤:As shown in the data flow direction B in Figure 1, the entire solution of this embodiment includes the following steps:

1)首先把测试用数据发送到环回处理模块S;可以使用捕获的方法,在芯片上实现对特定报文的捕获,把硬件正常转发中的报文通过芯片捕获上来,送交环回处理模块S处理;1) First, send the test data to the loopback processing module S; you can use the capture method to capture specific messages on the chip, capture the messages that are normally forwarded by the hardware through the chip, and send them to the loopback processing Module S processing;

有时软件在硬件上的接口可能是和该芯片上其它硬件接口相同,按照普通转发规则即可将数据送到,不一定非要用到捕获方法。Sometimes the interface of the software on the hardware may be the same as other hardware interfaces on the chip, and the data can be sent according to the normal forwarding rules, and the capture method does not have to be used.

2)软件识别是测试用特征报文后,为了使环回后转发正常,根据需要把报文中的源、目的地址信息进行调换等处理;2) After the software identifies the characteristic message for testing, in order to make the forwarding normal after the loopback, the source and destination address information in the message is exchanged as required;

有必要时,环回处理模块S才对地址等转发寻址相关的信息项进行转换处理,使环回后转发寻路不会发生差错。但并不是绝对的,在改善硬件环回的方案中是必要的,如果硬件不会因地址信息形成混乱、软件也不关心地址内容,则可不必进行这种转换处理。Only when necessary, the loopback processing module S converts information items related to forwarding addressing such as addresses, so that no error occurs in forwarding pathfinding after loopback. But it is not absolute. It is necessary to improve the hardware loopback scheme. If the hardware does not cause confusion due to address information, and the software does not care about the address content, then this conversion process is not necessary.

对不同协议的报文,可能不一定都有源和目的地址,所以对地址信息进行处理并不一定是源和目的地址的调换。Messages of different protocols may not necessarily have source and destination addresses, so processing address information does not necessarily mean exchanging source and destination addresses.

3)然后环回处理模块S将报文送回给硬件,硬件进行转发。如硬件按照新的地址信息寻址,把报文转发到原来的报文入口,使数据转发回来处。3) Then the loopback processing module S sends the message back to the hardware, and the hardware forwards it. For example, the hardware addresses according to the new address information, and forwards the message to the original message entry, so that the data is forwarded back.

在大多数已支持报文捕获功能的芯片上,需要配置特定的捕获条件,如何设置该条件视具体芯片的支持情况和报文本身特征而定,例如很多交换芯片支持按照特定协议值甚至自定义特征字段(如源MAC、目的MAC、源IP、目的IP、vlan值、传输层协议号、应用层协议号)的流分类特点进行捕获,可以根据实际数据的特征如简单地根据报文特定的源MAC和目的MAC对芯片的一个表项进行捕获并送到软件的配置,配置好后发送报文,芯片会按照配置自动捕获报文。On most chips that support the packet capture function, specific capture conditions need to be configured. How to set this condition depends on the support of the specific chip and the characteristics of the packet itself. For example, many switching chips support specific protocol values or even custom Capture the flow classification characteristics of characteristic fields (such as source MAC, destination MAC, source IP, destination IP, vlan value, transport layer protocol number, application layer protocol number), and can be based on the characteristics of actual data The source MAC and the destination MAC capture an entry of the chip and send it to the software configuration. After the configuration is completed, the message is sent, and the chip will automatically capture the message according to the configuration.

采用向下环回的方法可以测试本软件功能,由测试仪器或测试软件如SmartBits构造报文;环回处理模块S收到测试报文并识别后,将一些必要的地址等信息进行改变,使报文能转发回来处,但是可以不对数据的内容进行很细致的处理;在测试仪器或软件上对接收到的环回后报文进行监控、统计。The function of the software can be tested by using the loopback method, and the message is constructed by the test instrument or test software such as SmartBits; after the loopback processing module S receives and recognizes the test message, it changes some necessary addresses and other information, so that The message can be forwarded back, but the content of the data may not be processed in detail; the received loopback message is monitored and counted on the test instrument or software.

这时,增大报文流量,在物理通路上不存在瓶颈的情况下,可以测得通信处理的性能极限,如现有宽带设备的上连口速率指标通常就足够大到不会形成对设备通信性能的瓶颈。通过变化构造报文的长度,可以测得通信处理的报文长度的指标。通过不断变化报文字段内容或长度等数据特征,甚至同时保持最大的流量,可以进行更丰富、充分的稳定性测试。At this time, increase the message flow, and if there is no bottleneck on the physical path, the performance limit of communication processing can be measured. For example, the rate index of the uplink port of existing broadband equipment is usually large enough to avoid causing damage to the equipment. bottleneck in communication performance. By changing the length of the constructed message, an indicator of the length of the message processed by the communication can be measured. By continuously changing the data characteristics such as the content or length of the message field, and even maintaining the maximum flow at the same time, more abundant and sufficient stability tests can be performed.

根据软件处理的协议层次的划分不同,如链路层、传输层和应用层,环回处理模块S可以在不同的软件层次上实现,并根据实际测试目的的需要,在环回时对数据特征进行一些变化处理,如字段内容、长度等。According to different divisions of protocol layers processed by software, such as link layer, transport layer, and application layer, the loopback processing module S can be implemented on different software layers, and according to the needs of actual test purposes, the data characteristics can be analyzed during loopback. Make some changes, such as field content, length, etc.

在测试设备通信功能时,越高层次的环回,越可以模拟更真实的数据状态。如在环回处理模块S接收通信报文后,可把报文进行封装解析,对其最终的数据内容进行环回,这时,下面的软件处理层会将该报文作为自身发包进行完整的封装等处理。用在通信性能测试时,测得的数据就更逼近实际软件运行的真实情况。When testing device communication functions, the higher the level of loopback, the more realistic the data state can be simulated. For example, after the loopback processing module S receives the communication message, it can encapsulate and analyze the message, and loop back the final data content. At this time, the following software processing layer will send the message as its own package for complete Packaging and other processing. When used in communication performance testing, the measured data is closer to the real situation of actual software operation.

本发明需要一个设备、软件或测试仪器制造数据,并对被环回后的数据进行接收分析;发包源在向上环回时是被测设备本身,向下环回时可能是另一台设备或测试软件或测试仪器等各种情况;在环回时,必要时,软件需要对地址等转发识别相关的信息项进行修改,使环回后转发寻路不会发生差错。The present invention requires a device, software or testing instrument to manufacture data, and receive and analyze the looped data; the source of the packet is the device under test itself when looping up, and another device or another device when looping down. Various conditions such as testing software or testing equipment; during loopback, if necessary, the software needs to modify information items related to forwarding identification such as addresses, so that there will be no error in forwarding pathfinding after loopback.

采用软件自环方法的测试方案的构成因素是:The components of a test program using the software self-loop approach are:

1、一个发包源发出报文,可以是做环回的软件自身,也可以是测试仪器、软件或对端设备;1. A packet sending source sends a message, which can be the loopback software itself, or a test instrument, software or peer device;

2、芯片实现捕获测试用报文送软件的功能;对于软件环回中的向上环回,不需要硬件捕获。2. The chip realizes the function of capturing test messages and sending them to the software; for the upward loopback in the software loopback, hardware capture is not required.

3、环回处理模块S可进行一些必要的如地址转换等数据处理;3. The loopback processing module S can perform some necessary data processing such as address conversion;

4、环回处理模块S可进行向上环回或向下环回,可以处于不同的软件层面;4. The loopback processing module S can perform upward loopback or downward loopback, and can be at different software levels;

5、接收端进行测试结果的检查和记录;5. The receiving end checks and records the test results;

6、为了灵活使用软件环回功能,可提供配置软件环回的测试操作接口,可以是命令行或网管。如配置软件环回是否使能、软件环回实现的软件层次、需要环回的数据、及其它环回数据处理等的附加设置,所有设置可取消,接口的实现根据需要可繁可简。6. In order to use the software loopback function flexibly, a test operation interface for configuring software loopback can be provided, which can be a command line or a network management system. For example, configure whether the software loopback is enabled, the software level of the software loopback implementation, the data that needs to be looped back, and other additional settings such as loopback data processing. All settings can be canceled, and the implementation of the interface can be complicated or simplified according to needs.

如图1所示,本发明同时提供一种通信设备,在通讯设备中设置环回处理模块S,环回处理模块S对设备通信数据或业务数据进行环回处理,将上层软件要向下层或硬件发送的数据回送给上层软件;或者将硬件或下层软件送给上层软件的数据中途拦截,并送回给下层软件或硬件。As shown in Figure 1, the present invention provides a communication device at the same time. A loopback processing module S is set in the communication device. The loopback processing module S performs loopback processing on the communication data or business data of the device, and sends the upper layer software to the lower layer or The data sent by the hardware is sent back to the upper-layer software; or the data sent by the hardware or the lower-layer software to the upper-layer software is intercepted midway and sent back to the lower-layer software or hardware.

本发明提供了设备通信功能的灵活测试手段,可以测试性能、稳定性及其它复杂项目;提供了一种通信设备及其测试方法,采用软件环回方法,使环回后转发不受影响;软件实现的数据处理功能测试和调试时,不依赖硬件环境,并减少编写测试代码的工作量。The present invention provides a flexible test method for the communication function of the device, which can test performance, stability and other complex items; provides a communication device and its test method, adopts a software loopback method, so that the forwarding after the loopback is not affected; the software When testing and debugging the implemented data processing function, it does not depend on the hardware environment, and reduces the workload of writing test codes.

本领域技术人员不脱离本发明的实质和精神,可以有多种变形方案实现本发明,以上所述仅为本发明较佳可行的实施例而已,并非因此局限本发明的权利范围,凡运用本发明说明书及附图内容所作的等效变化,均包含于本发明的权利范围之内。Those skilled in the art do not depart from the essence and spirit of the present invention, there can be many variants to realize the present invention, the above description is only a preferred and feasible embodiment of the present invention, and it does not limit the scope of rights of the present invention. The equivalent changes made in the description of the invention and the content of the accompanying drawings are all included in the scope of rights of the present invention.

Claims (9)

1. the method for testing of a communication equipment is characterized in that, may further comprise the steps:
By the loop back processing being module in the communication equipment devices communicating data or business datum are carried out the software loop back processing being;
Described loop back processing being is upwards loopback or loopback downwards, and wherein, when described upwards loopback was a software loopback from the upper strata to the lower floor, the data loopback that described loop back processing being module will send the software on upper strata to the software of lower floor was to the software on upper strata; Perhaps, from the software on upper strata during to Hardware loopback, the data loopback that described loop back processing being module will send the software on upper strata to described hardware is to the software on upper strata;
When described downward loopback is a software loopback from hardware to the upper strata, the data that described loop back processing being module interception is given the software on upper strata from hardware, and the described data that are blocked are sent back to described hardware; Perhaps, during the software loopback of described loop back processing being module from the lower floor to the upper strata, the data that interception is given the software on upper strata from the software of lower floor, and the described data that are blocked are sent back to the software of lower floor.
2. the method for testing of communication equipment according to claim 1, it is characterized in that: according to the division difference of the protocol hierarchy of software processes, described loop back processing being module realizes on different software levels, or according to the test needs, further when loopback the data feature is carried out change process.
3. the method for testing of communication equipment according to claim 2, it is characterized in that: during described upwards loopback, the data that equipment upper layer software (applications) module is sent, in described loop back processing being module, discern according to data characteristics, loopback goes back then, after described upper layer software (applications) module receives data again, test.
4. the method for testing of communication equipment according to claim 2 is characterized in that: during described upwards loopback, by strengthening the flow that upper layer data sends, carry out the software loopback by described loop back processing being module, the data processing performance between the test related software layer.
5. the method for testing of communication equipment according to claim 2 is characterized in that: during described downward loopback, may further comprise the steps:
T1, described loop back processing being module receive message, and described message is from tester, testing software or opposite equip.;
T2, described loop back processing being module are carried out conversion process to the forwarding addressing related information items in the described message as required;
T3, described loop back processing being module are sent back to hardware with described message, and hardware is transmitted.
6. the method for testing of communication equipment according to claim 5, it is characterized in that, described T3 step specifically comprises: after described loop back processing being module is received described message and identification, send back to hardware, hardware is transmitted, in tester or the testing software to the loopback that receives after message carry out analytical test.
7. the method for testing of communication equipment according to claim 6 is characterized in that: by increasing message flow, record the performance boundary of communication process; By changing the length of message, record the index of the message length of communication process; By continuous variation message data feature, carry out stability test.
8. according to the method for testing of each described communication equipment in the claim 1 to 7, it is characterized in that:, the software loopback is configured by the test operation interface of software loopback is set.
9. communication equipment, it is characterized in that, the loop back processing being module is set in communication equipment, and described loop back processing being module is carried out loop back processing being to devices communicating data or business datum, and the data loopback that the software on upper strata will be sent to the software block of lower floor is to the software on upper strata; Perhaps, the data loopback that the software on upper strata will be sent to hardware is to the software on upper strata; Perhaps described loop back processing being module is tackled the data of giving the software on described upper strata from described hardware, and the data of described interception are sent back to described hardware; Perhaps described loop back processing being module is tackled the data of giving the software on upper strata from the software of described lower floor, and the data of described interception is sent back to the software of described lower floor.
CNB2006100331438A 2006-01-17 2006-01-17 A kind of communication equipment and testing method thereof Expired - Fee Related CN100461717C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006100331438A CN100461717C (en) 2006-01-17 2006-01-17 A kind of communication equipment and testing method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006100331438A CN100461717C (en) 2006-01-17 2006-01-17 A kind of communication equipment and testing method thereof

Publications (2)

Publication Number Publication Date
CN1859235A CN1859235A (en) 2006-11-08
CN100461717C true CN100461717C (en) 2009-02-11

Family

ID=37298100

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006100331438A Expired - Fee Related CN100461717C (en) 2006-01-17 2006-01-17 A kind of communication equipment and testing method thereof

Country Status (1)

Country Link
CN (1) CN100461717C (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101330410B (en) * 2008-07-17 2011-06-08 华为技术有限公司 Far-end loopback test method, system and exchange
CN102970187B (en) * 2012-12-04 2015-09-09 华为技术有限公司 A kind of single-board testing method, Apparatus and system
CN103236955B (en) * 2013-04-08 2016-08-31 汉柏科技有限公司 The method realizing network apparatus test performance based on software
CN107786357B (en) * 2016-08-29 2021-05-18 迈普通信技术股份有限公司 Interface performance test method and device and network equipment
CN109617767B (en) * 2019-02-22 2022-09-23 苏州盛科通信股份有限公司 Real-time debugging method and device for message loopback processing in chip
CN111064553B (en) * 2019-12-12 2022-07-05 苏州浪潮智能科技有限公司 Method, device and storage medium for loopback diagnosis of switch and its management network port

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1466315A (en) * 2002-06-05 2004-01-07 华为技术有限公司 Implementation method of remote control loopback of communication equipment
US20040109418A1 (en) * 2002-12-05 2004-06-10 Fedorkow Guy C. Method for verifying function of redundant standby packet forwarder
CN1691609A (en) * 2004-04-20 2005-11-02 北京润光泰力科技发展有限公司 A method and apparatus for Ethernet converter line side loop back detection
CN1716880A (en) * 2004-07-01 2006-01-04 华为技术有限公司 a test device
US20060005092A1 (en) * 2004-06-30 2006-01-05 Tim Frodsham Cache based physical layer self test

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1466315A (en) * 2002-06-05 2004-01-07 华为技术有限公司 Implementation method of remote control loopback of communication equipment
US20040109418A1 (en) * 2002-12-05 2004-06-10 Fedorkow Guy C. Method for verifying function of redundant standby packet forwarder
CN1691609A (en) * 2004-04-20 2005-11-02 北京润光泰力科技发展有限公司 A method and apparatus for Ethernet converter line side loop back detection
US20060005092A1 (en) * 2004-06-30 2006-01-05 Tim Frodsham Cache based physical layer self test
CN1716880A (en) * 2004-07-01 2006-01-04 华为技术有限公司 a test device

Also Published As

Publication number Publication date
CN1859235A (en) 2006-11-08

Similar Documents

Publication Publication Date Title
US11388081B1 (en) Methods, systems, and computer readable media for impairment testing using an impairment device
CN109388530B (en) Blade server-oriented automatic test platform and test method
US11323354B1 (en) Methods, systems, and computer readable media for network testing using switch emulation
US10103851B2 (en) Network link monitoring and testing
CN102439888B (en) Method, device, and system for monitoring fast-lane interconnection links
CN106452942B (en) The vehicle-mounted Ethernet exchanging software performance test system and method for track transportation industry
CN100461717C (en) A kind of communication equipment and testing method thereof
US7843836B2 (en) Systems, methods and computer program products for controlling high speed network traffic in server blade environments
CN108092854B (en) Test method and device for train-level Ethernet equipment based on IEC61375 protocol
CN109714221A (en) The determination method, apparatus and system of network packet
CN106776346B (en) Test method and device of CCMTS (China center testing System) equipment
US20240015051A1 (en) Methods, systems, and computer readable media for capturing dropped packets at a switching fabric emulator
Nelson et al. Simon: Scriptable interactive monitoring for SDNs
CN110519122A (en) A kind of network quality automatic monitoring device and method based on Mtr
CN109964450B (en) A method and device for determining a shared risk link group
CN100396031C (en) A system and method for functional testing of communication equipment
CN110971540B (en) Data information transmission method and device, switch and controller
CN101267350A (en) Debugging method and debugging system
CN114172789B (en) Virtual equipment link detection method, device, equipment and storage medium
CN100486187C (en) A test method and system for L2TP tunnel specification
US20240069099A1 (en) Methods, systems, and computer readable media for using a testbed transpiler
CN100484041C (en) Apparatus for realizing high service amount test in wide-band network
US8230278B2 (en) Test system having a sub-system to sub-system bridge
Aalibagi et al. Low-overhead packet loss diagnosis for virtual private clouds using P4-programmable NICs
CN114598629A (en) A terminal type identification automatic test system and computer equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090211

Termination date: 20180117