CN107204895A - A kind of method of testing and system of DUT port collisions disposal ability - Google Patents

A kind of method of testing and system of DUT port collisions disposal ability Download PDF

Info

Publication number
CN107204895A
CN107204895A CN201710357406.9A CN201710357406A CN107204895A CN 107204895 A CN107204895 A CN 107204895A CN 201710357406 A CN201710357406 A CN 201710357406A CN 107204895 A CN107204895 A CN 107204895A
Authority
CN
China
Prior art keywords
port
dut
test
rule
submodule
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.)
Granted
Application number
CN201710357406.9A
Other languages
Chinese (zh)
Other versions
CN107204895B (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.)
Huzhou Yinglie Intellectual Property Operation Co ltd
Original Assignee
Shanghai Feixun Data Communication Technology 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 Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201710357406.9A priority Critical patent/CN107204895B/en
Publication of CN107204895A publication Critical patent/CN107204895A/en
Application granted granted Critical
Publication of CN107204895B publication Critical patent/CN107204895B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

Abstract

The invention discloses the method for testing of DUT port collision disposal abilities:Configure DUT ports forwarding rule and DMZ host functions;Corresponding test port in call instruction snoopy test system;It is connected by telnet agreements with accompanying survey PC to set up, creates multithreading;Call instruction from accompany survey PC to DUT initiate multithreading tested;The connection for surveying PC is disconnected and accompanied, the snoop results of corresponding test port are obtained;According to snoop results, judge whether DUT port collision disposal ability is qualified.The invention also discloses the test system of DUT port collision disposal abilities, including:Rule configuration module, monitoring module, thread creation module, test module, control module, control module are connected with rule configuration module, monitoring module, thread creation module and test module respectively.Whether the port collision disposal ability that can fast and accurately test out Devices to test by the present invention is qualified, reduces testing cost, improves testing efficiency.

Description

A kind of method of testing and system of DUT port collisions disposal ability
Technical field
The present invention relates to testing field, more particularly to a kind of method of testing and system of DUT port collisions disposal ability.
Background technology
There is not strict test to port collision at present, existing test is also relatively complicated:One tester makes With one test computer can not create simultaneously two bag, it is necessary to two testers respectively using two test computers simultaneously to DUT same port is given out a contract for a project.
Therefore the prior art is defective:The performance disposal ability of two test computers is variant, with Devices to test (DUT) Between connective stability it is also variant, the operation of two testers has successively, and these can all influence test result.
The content of the invention
The present invention provides a kind of method of testing and system of DUT port collisions disposal ability, overcomes above-mentioned prior art Defect so that Devices to test port collision disposal ability test become more rigorous and simple and easy to apply, reduce and test into This, improves testing efficiency.
On the one hand, the present invention provides a kind of method of testing of DUT port collisions disposal ability, including:
S100 configuration DUT port forwarding rules and DMZ host functions;
Corresponding test port in S200 call instruction snoopy test systems;
S300 is connected by telnet agreements with accompanying survey PC to set up, and creates multithreading;
S400 call instructions are tested from accompanying to survey PC and initiate the multithreading to the DUT;
S500 disconnects the connection that PC is surveyed with accompanying, and obtains the snoop results of corresponding test port;
S600 judges whether the port collision disposal ability of the DUT is qualified according to the snoop results.
Port forwards (Port forwarding), is a kind of method used for secure communication of network.Port forwarding is to turn Behavior of the network port from a network node to another network node is sent out, it makes an external user from the outside through mistake One NAT router being activated reaches an a port on privately owned implicit IP address (inside LAN).
DMZ is that " demilitarized zone " abbreviation, Chinese is " isolated area ", also referred to as " demilitarization to English Area ".It is in order to solve to install the problem of access user of external network can not access internal network server after fire wall, and The buffering area between non-security system and security system set up.The buffering area is located at Intranet and external network Between small network area in.Some can be placed in this small network area must disclosed server utility, such as enterprise Web server, ftp server and forum etc..On the other hand, by such a DMZ regions, inside is more efficiently protected Network.
Telnet agreements are a member in TCP/IP protocol suite, are standard agreement and the master of the service of Internet telnets Want mode.It has provided the user the ability for completing distance host work on the local computer.In the computer of terminal user Upper use telnet programs, server is connected to it.Terminal user can input order in telnet programs, these lives Order can be run on the server, just as being inputted directly on the console of server.Service can be just controlled local Device.
Further, the step S100 includes:
S110 configures a port forwarding rule on DUT, and configuration server IP is the IP that DUT distributes to test system, And configure the second port that DUT WAN-side IP first port maps test system;So as to by the first of DUT WAN-side IP The bag of port request is forwarded to the second port of the test system of mapping;
S120 opens DMZ host functions, and the DMZ IP of configuration DMZ host functions are the IP of test system, so as to will be to DUT The WAN-side IP bag of first port request be forwarded to the 3rd port of corresponding test system.
Step S110 and step S120 are respectively provided with a port rule, and this two rule is conflict in fact.
Further, the step S300 includes:
S310 calls telnet functions to accompany survey PC by the connection of telnet agreements;
S320 accompanies the test script surveyed on PC by ordering to start;
Test script described in S330 calls two threads of thread function creations, and described two threads are to call nc orders The bag that the first port of from the WAN-side IP to DUT makes requests on is sent from survey PC is accompanied.
Further, the step S400 includes:
S410 calls thread.start orders while initiating two threads created in previous step, by accompanying survey PC same When send two bags made requests on to DUT WAN-sides IP first port.
Further, the step S600 includes:
S610 judges whether the snoop results meet port collision rule, and the port collision rule is the rule first configured Then come into force;
S620 ought listen to the second port and receive the request bag sent, and the 3rd port does not receive and sent Request bag, then judge that the DUT meets port collision rule, the DUT port collisions disposal ability is qualified;
S630 then judges that the DUT is unsatisfactory for port collision when listening to the request bag that the 3rd port reception is sent Rule, the DUT port collisions disposal ability is unqualified.
On the other hand, present invention additionally comprises a kind of test system of DUT port collisions disposal ability, including:Rule configuration Module, monitoring module, thread creation module, test module, control module, the control module configure mould with the rule respectively Block, monitoring module, thread creation module and test module are connected;Wherein:The rule configuration module call function is matched somebody with somebody on DUT Put DUT ports forwarding rule and open DMZ host functions;It is corresponding in the monitoring module call instruction snoopy test system to survey Try port;The thread creation module is connected by telnet agreements with accompanying survey PC to set up, and creates multithreading;The test module Call instruction is tested from accompanying to survey PC and initiate the multithreading to the DUT;The control module call instruction disconnects described Test system and the connection for accompanying survey PC, and pass through the snoop results that the monitoring module obtains test port;The control module According to the snoop results, judge whether the port collision disposal ability of the DUT is qualified.
Further, the rule configuration module includes:First rule configuration submodule, Second Rule configuration submodule, Wherein:The first rule configuration submodule call function configures a port forwarding rule on DUT, and configuration server IP is DUT distributes to the IP of test system, and configures the second port that DUT WAN-side IP first port maps test system;So as to The bag of first port request to DUT WAN-side IP is forwarded to the second port of the test system of mapping;The Second Rule Configure submodule and open DMZ host functions, the DMZ IP of configuration DMZ host functions are the IP of test system, so as to by DUT's The bag of WAN-side IP first port request is forwarded to the 3rd port of corresponding test system.
Further, the thread creation module includes:Connection submodule, script startup submodule and thread set up submodule Block, the script startup submodule is connected with the connection submodule, the thread setting up submodule respectively, wherein:The company Connecing submodule calls telnet functions to accompany survey PC by the connection of telnet agreements;The script startup submodule is started by ordering Accompany the test script surveyed on PC;The thread setting up submodule calls two lines of thread function creations by the test script Journey, described two threads are to call nc orders to be made requests on from the first port for accompanying survey PC to send the WAN-side IP to DUT Bag.
Further, the test module calls thread.start orders while initiating two created in previous step Thread, by accompanying survey PC to be simultaneously emitted by two bags made requests on to DUT WAN-sides IP first port.
Further, the control module includes:Operation submodule, the judgement submodule being connected with the operation submodule Block;Wherein:The operation submodule disconnects and accompanied the connection for surveying PC after the test module initiates test, pass through the prison Module is listened to obtain second port, the snoop results of the 3rd port;The judging submodule judges the second port, the 3rd port Snoop results whether meet port collision rule, port collision rule is the taking effect rules that first configure;Monitored when described Module listens to the second port and receives the request bag sent, and the 3rd port does not receive the request bag sent, Then the judging submodule judges that the DUT meets port collision rule, and the DUT port collisions disposal ability is qualified;Work as institute State monitoring module and listen to the request bag that the 3rd port reception is sent, then the judging submodule judges that the DUT is discontented with Sufficient port collision rule, the DUT port collisions disposal ability is unqualified.
The present invention tests DUT port collision disposal abilities by sending request bag to DUT same port simultaneously;Using many The method of thread is realized to send to DUT same ports simultaneously and asked.At least include with the next item down beneficial effect:
(1) difficulty of test is simplified.
(2) testing efficiency is improved.
(3) tester's work difficulty is mitigated.
(4) test period is shortened.
(5) product cost is reduced.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, makes required in being described below to embodiment Accompanying drawing is briefly introduced, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for this For the those of ordinary skill in field, without having to pay creative labor, it can also be obtained according to these accompanying drawings His accompanying drawing.
Fig. 1 is the DUT port collision disposal ability method of testing flow charts in first embodiment of the invention;
Fig. 2 is the DUT port collision disposal ability method of testing flow charts in second embodiment of the invention;;
Fig. 3 is the test topology schematic diagram in third embodiment of the invention;
Fig. 4 is the test script schematic diagram in third embodiment of the invention;
Fig. 5 is the DUT port collision disposal ability test system block diagrams in fourth embodiment of the invention;
Fig. 6 is the DUT port collision disposal ability test system block diagrams in fifth embodiment of the invention.
Embodiment
In order that the object, technical solutions and advantages of the present invention are clearer, below in conjunction with accompanying drawing the present invention is made into One step it is described in detail, it is clear that described embodiment is only embodiment of the invention a part of, rather than whole implementation Example.Based on the embodiment in the present invention, what those of ordinary skill in the art were obtained under the premise of creative work is not made All other embodiment, belongs to the scope of protection of the invention.
The invention discloses a kind of method of testing of DUT port collisions disposal ability, embodiment one as shown in figure 1, including:
S100 configuration DUT port forwarding rules and DMZ host functions;
Corresponding test port in S200 call instruction snoopy test systems;
S300 is connected by telnet agreements with accompanying survey PC to set up, and creates multithreading;
S400 call instructions are tested from accompanying to survey PC and initiate the multithreading to the DUT;
S500 disconnects the connection that PC is surveyed with accompanying, and obtains the snoop results of corresponding test port;
S600 judges whether the port collision disposal ability of the DUT is qualified according to the snoop results.
Idea of the invention is that configuring a plurality of port rule on Devices to test (DUT), this several port rules are mutually to rush Prominent, the test port that the packet of reception can be sent to rule agreement by DUT is gone, and therefore, only needs the number of snoopy test port According to bag reception condition, it is possible to which Devices to test is known in which rule forwarding is according to.One qualified product is running into conflict Port rule when, can carry out port forwarding according to the rule first configured, therefore it may only be necessary to detect the monitoring knot of test port Fruit is it may determine that whether the port collision disposal ability for going out this Devices to test is qualified.
Step S100 in above-described embodiment 1 includes:
S110 configures a port forwarding rule on DUT, and configuration server IP is the IP that DUT distributes to test system, And configure the second port that DUT WAN-side IP first port maps test system;So as to by the first of DUT WAN-side IP The bag of port request is forwarded to the second port of the test system of mapping;
S120 opens DMZ host functions, and the DMZ IP of configuration DMZ host functions are the IP of test system, so as to will be to DUT The WAN-side IP bag of first port request be forwarded to the 3rd port of corresponding test system.
Test system call function configures a port forwarding rule on DUT, and server ip is that DUT distributes to test system The IP of system, is 8000 as the first port of outside port if being 80 as the second port of internal port;So first Port rule is:80 ports of server ip will be forwarded to the bag of DUT WAN-side IP 8000 port requests, that is, Say the internal port 80 for forwarding a packet to test system for asking the outside port 8000 of Devices to test.
After first port forwarding rule of configuration, DMZ host functions are then turned on, the DMZ IP of DMZ host functions are set It is set to consistent with the inside IP of port forwarding function, therefore, the Article 2 port rule of setting is:By to DUT WAN-side IP's The bag of arbitrary port request is forwarded to the corresponding ports of server ip, and the of DUT WAN-side IP first port and test system Three ports are corresponding, i.e. DUT WAN-side first port is 8000, and the corresponding port of test system the 3rd is also 8000.Turn During hair, the bag asked to DUT WAN-side IP port 8000 is forwarded to the port 8000 of corresponding test system.
After this good two rule of configuration, then only need to 80 ports and 8000 ports of snoopy test system, after test just may be used Test result is obtained with situation about being arrived according to the two port snoops.
Step S200 in above-described embodiment 1, can be by calling nc orders at test system end to the 80 of test system Port and 8000 ports are monitored.
Nc is writing a Chinese character in simplified form for netcat, the Swiss Army Knife good reputation for having the dotcom world.Because its short and pithy, practical function, quilt It is designed as a simple, reliable network tool.Nc effect has:
(1) intercepting for any TCP/UDP ports is realized, nc in TCP or UDP modes can intercept designated ends as server Mouthful
(2) scanning of port, nc can initiate TCP or UDP connections as client
(3) file is transmitted between machine
(4) network tests the speed between machine.
Step S300 in above-described embodiment 1 includes:
S310 calls telnet functions to accompany survey PC by the connection of telnet agreements;
S320 accompanies the test script surveyed on PC by ordering to start;
Test script described in S330 calls two threads of thread function creations, and described two threads are to call nc orders The bag that the first port of from the WAN-side IP to DUT makes requests on is sent from survey PC is accompanied.
Test system calls telnet functions to accompany survey PC by the connection of telnet agreements, and is accompanying survey PC by ordering to start On script;Script calls two threads of thread function creations (such as according to the port rule above set, can create thread 1 content is:Call nc orders from accompany survey PC send the bag that 8000 ports of from the WAN-side IP to DUT make requests on;Thread 2 Content is:Call nc orders from accompany survey PC send the bag that 8000 ports of from the WAN-side IP to DUT make requests on).
Step S400 in above-described embodiment 1 includes:
S410 calls thread.start orders while initiating two threads created in previous step, by accompanying survey PC same When send two bags made requests on to DUT WAN-sides IP first port.
Thread is started using thread.start modes, multithreading operation is truly realized.
Step S600 in above-described embodiment 1 includes:
S610 judges whether the snoop results meet port collision rule, and the port collision rule is the rule first configured Then come into force;
S620 ought listen to the second port and receive the request bag sent, and the 3rd port does not receive and sent Request bag, then judge that the DUT meets port collision rule, the DUT port collisions disposal ability is qualified;
S630 then judges that the DUT is unsatisfactory for port collision when listening to the request bag that the 3rd port reception is sent Rule, the DUT port collisions disposal ability is unqualified.
It can be seen from the step of above, first port of setting forwarding rule is by DUT WAN-side IP first end The bag of mouth request is forwarded to the second port of the test system of mapping.According to the port collision of the taking effect rules first configured rule, Understand that only second port listens to the request bag sent, and the 3rd port does not receive request bag, can just verify to be measured The port collision disposal ability of equipment (DUT) is OK;If from the 3rd port snoop to the request bag sent, illustrating do not have Meet port collision rule, then, the port collision disposal ability for illustrating Devices to test is underproof.
Following several situations occur in the second port of snoopy test system and the 3rd port of test system:
1st, listen to second port and receive the request bag sent, the 3rd port is then not received by request bag;
2nd, listen to second port and the 3rd port have received the request bag sent;
3rd, listen to second port and do not receive the request bag sent, the 3rd port but have received request bag;
4th, listen to second port and the 3rd port is not received by request bag.
In above-mentioned four kinds of situations, in addition to the first situation is test passes, three kinds are test failures in addition.Because The rule set before is conflict, and the port forwarding rule first set before is to connect DUT WAN-side IP first port The request bag of receipts is transmitted to the second port of test system, therefore, if detecting the 3rd port has the number for receiving and sending According to bag, then the principle that explanation does not come into force first according to the rule first configured, also it is determined that Devices to test handles port collision Ability is unqualified.
Here it is necessary illustratively, the present embodiment is tested without a thread is only initiated.But employ two lines Journey, and be to be initiated simultaneously to DUT first port simultaneously, also for the test environment for constructing port collision, in addition, it Two port rules of preceding setting are also conflict, and test equipment under test is running into same interface while at when running into multiple threads Manage port collision disposal ability.
The second embodiment of the present invention, as shown in Fig. 2 including step:
S110 configures a port forwarding rule on DUT, and configuration server IP is the IP that DUT distributes to test system, And configure the second port that DUT WAN-side IP first port maps test system;So as to by the first of DUT WAN-side IP The bag of port request is forwarded to the second port of the test system of mapping;
S120 opens DMZ host functions, and the DMZ IP of configuration DMZ host functions are the IP of test system, so as to will be to DUT The WAN-side IP bag of first port request be forwarded to the 3rd port of corresponding test system;
Second port and the 3rd port in S210 call instruction snoopy test systems;
S310 calls telnet functions to accompany survey PC by the connection of telnet agreements;
S320 accompanies the test script surveyed on PC by ordering to start;
Test script described in S330 calls two threads of thread function creations, and described two threads are to call nc orders The bag that the first port of from the WAN-side IP to DUT makes requests on is sent from survey PC is accompanied;
S410 calls thread.start orders while initiating two threads created in previous step, by accompanying survey PC same When send two bags made requests on to DUT WAN-sides IP first port;
S510 disconnects the connection that PC is surveyed with accompanying, and obtains the second port and the snoop results of the 3rd port;
S610 judges whether the snoop results meet port collision rule, and the port collision rule is the rule first configured Then come into force;
S620, which works as, listens to the request bag that the second port reception is sent, and the 3rd port does not receive what is sent Request bag, then judge that the DUT meets port collision rule, the DUT port collisions disposal ability is qualified;
S630 then judges that the DUT is unsatisfactory for port collision when listening to the request bag that the 3rd port reception is sent Rule, the DUT port collisions disposal ability is unqualified.
In order to which the Expected Results of the present invention is better described, the third embodiment of the present invention is said with K3C automatic test Bright, technique according to the invention scheme is described in further detail.
Test topology schematic diagram is as shown in Figure 3.
Test prepares:Tester is by the DUT WAN-side address input test systems obtained and starts test system;Test Method flow as shown in figure 4, including:
Step S1, system call function configures a port forwarding rule on DUT, and server ip is that DUT distributes to survey The IP of test system, internal port is that 90, outside port is 9000, is then turned on DMZ host functions, by the DMZ of DMZ host functions IP is arranged to consistent with the inside IP of port forwarding function;(two rule contents are:Port is forwarded, by DUT WAN-side IP The bags of 9000 port requests be forwarded to 90 ports of server ip;DMZ host functions, by DUT WAN-side IP arbitrary end The bag of mouth request is forwarded to the corresponding ports of server ip, i.e. the WAN-side port of DUT is 9000, and corresponding ports are also for 9000)
Step S2, test system calls nc orders to be supervised at test system end to 90 and 9000 ports of test system Listen;
Step S3, test system calls telnet functions to accompany survey PC by the connection of telnet agreements, and is started by ordering Script on survey PC is accompanied;Script calls two threads of thread function creations, and (content of thread 1 is:Nc orders are called from accompanying Survey PC and send the bag that 9000 ports of from the WAN-side IP to DUT make requests on;The content of thread 2 is:Call nc orders from accompany survey PC Send the bag that 9000 ports of from the WAN-side IP to DUT make requests on.)
Step S4, calls thread.start orders while initiating two threads, that is, accompanies survey PC to be simultaneously emitted by two to DUT The bag that WAN-side IP 9000 ports make requests on;
Step S5, call instruction disconnects test system and accompanies the telnet connections surveyed between computer;
Step S6, checks the result that test system end nc is monitored, judges whether to meet conflict rule.If test system 90 ports receive the request bag sent, and 9000 ports of test system do not receive request bag, then are PASS, if test system It is then FAIL that 9000 ports of system, which receive the request bag sent,;(port collision rule is the taking effect rules first configured.)
Step S7, returns to test result and terminates test.
The key point of the present invention is to test at DUT port collisions by sending request bag to DUT same port simultaneously Reason ability;Realize to send to DUT same ports simultaneously using the method for multithreading and ask.Those skilled in the art without departing substantially from On the premise of the principle and essence of the present invention, various changes or modifications can be made to these embodiments, but these changes and Modification each falls within protection scope of the present invention
Based on identical technical concept, the embodiment of the present invention also provides a kind of test system of DUT port collisions disposal ability System, the test system can perform above method embodiment.The test system that fourth embodiment of the invention is provided is as shown in figure 5, bag Include:Rule configuration module 10, monitoring module 20, thread creation module 30, test module 40, control module 50, the control mould Block 50 is connected with the rule configuration module 10, monitoring module 20, thread creation module 30 and test module 40 respectively;Wherein: The call function of rule configuration module 10 configures forwarding rule in DUT ports on DUT and opens DMZ host functions;The prison Listen corresponding test port in the call instruction snoopy test system of module 20;The thread creation module 30 passes through telnet agreements It is connected with accompanying survey PC to set up, creates multithreading;The call instruction of test module 40 from accompany survey PC to the DUT initiate it is described many Thread is tested;The call instruction of control module 50 disconnects the test system and accompanies the connection for surveying PC, and by described Monitor the snoop results that module 20 obtains test port;The control module 50 judges the DUT's according to the snoop results Whether port collision disposal ability is qualified.
The fifth embodiment of the present invention, as shown in fig. 6, on the basis of above-described embodiment four, the rule of the test system Then configuration module 10 includes:First rule configuration submodule 11, Second Rule configuration submodule 12, wherein:First rule The configuration call function of submodule 11 configures a port forwarding rule on DUT, and configuration server IP is that DUT distributes to test system The IP of system, and configure the second port that DUT WAN-side IP first port maps test system;So as to by DUT WAN-side The bag of IP first port request is forwarded to the second port of the test system of mapping;The Second Rule configuration submodule is opened DMZ host functions, the DMZ IP of configuration DMZ host functions are the IP of test system, so as to by the first of DUT WAN-side IP The bag of port request is forwarded to the 3rd port of corresponding test system.
Preferably, the thread creation module 30 includes:Submodule 31, script startup submodule 32 and thread is connected to set up Submodule 33, the script startup submodule 32 is connected with the connection submodule 31, the thread setting up submodule 33 respectively, Wherein:The connection submodule 31 calls telnet functions to accompany survey PC by the connection of telnet agreements;The script startup submodule Block 32 accompanies the test script surveyed on PC by ordering to start;The thread setting up submodule 33 is called by the test script Two threads of thread function creations, described two threads are to call nc orders to survey PC and send WAN-side IP to DUT from accompanying The bag that first port makes requests on.
Preferably, the test module 40 calls thread.start orders while initiating two created in previous step Thread, by accompanying survey PC to be simultaneously emitted by two bags made requests on to DUT WAN-sides IP first port.
Preferably, the control module 50 includes:Operation submodule 51, judgement being connected with the operation submodule 51 Module 52;Wherein:The operation submodule 51 disconnects and accompanied the connection for surveying PC after the test module 40 initiates test, leads to Cross the monitoring module 20 and obtain second port, the snoop results of the 3rd port;The judging submodule 52 judges described second Whether port, the snoop results of the 3rd port meet port collision rule, and the port collision rule is raw for the rule first configured Effect;The request bag sent is received when the monitoring module 20 listens to the second port, and the 3rd port does not receive hair The request come, then the judging submodule 52 judge that the DUT meets port collision rule, the DUT port collisions handle energy Power is qualified;The request bag sent is received when the monitoring module 20 listens to the 3rd port, then the judging submodule 52 Judge that the DUT is unsatisfactory for port collision rule, the DUT port collisions disposal ability is unqualified.
The test system of the embodiment of the present invention is used for the test of the port collision ability of device under test, and Devices to test includes SOHO products, such as interchanger, router etc..
, but those skilled in the art once know basic creation although preferred embodiments of the present invention have been described Property concept, then can make other change and modification to these embodiments.So, appended claims are intended to be construed to include excellent Select embodiment and fall into having altered and changing for the scope of the invention.
Obviously, those skilled in the art can carry out the essence of various changes and modification without departing from the present invention to the present invention God and scope.So, if these modifications and variations of the present invention belong to the scope of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to comprising including these changes and modification.

Claims (10)

1. a kind of method of testing of DUT port collisions disposal ability, it is characterised in that including:
S100 configuration DUT port forwarding rules and DMZ host functions;
Corresponding test port in S200 call instruction snoopy test systems;
S300 is connected by telnet agreements with accompanying survey PC to set up, and creates multithreading;
S400 call instructions are tested from accompanying to survey PC and initiate the multithreading to the DUT;
S500 disconnects the connection that PC is surveyed with accompanying, and obtains the snoop results of corresponding test port;
S600 judges whether the port collision disposal ability of the DUT is qualified according to the snoop results.
2. a kind of method of testing of DUT port collisions disposal ability according to claim 1, it is characterised in that the step Rapid S100 includes:
S110 configures a port forwarding rule on DUT, and configuration server IP is that DUT distributes to the IP of test system, and is matched somebody with somebody The first port for putting DUT WAN-side IP maps the second port of test system;So as to by DUT WAN-side IP first port The bag of request is forwarded to the second port of the test system of mapping;
S120 opens DMZ host functions, and the DMZ IP of configuration DMZ host functions are the IP of test system, so as to by DUT's The bag of WAN-side IP first port request is forwarded to the 3rd port of corresponding test system.
3. the method for testing of a kind of DUT port collisions disposal ability according to claim 1 or 2, it is characterised in that described Step S300 includes:
S310 calls telnet functions to accompany survey PC by the connection of telnet agreements;
S320 accompanies the test script surveyed on PC by ordering to start;
Test script described in S330 calls two threads of thread function creations, and described two threads are to call nc orders from accompanying Survey PC and send the bag that the first port of from the WAN-side IP to DUT makes requests on.
4. a kind of method of testing of DUT port collisions disposal ability according to claim 1, it is characterised in that the step Rapid S400 includes:
S410 calls thread.start orders while initiating two threads created in previous step, by accompanying survey PC to send out simultaneously Go out two bags made requests on to DUT WAN-sides IP first port.
5. a kind of method of testing of DUT port collisions disposal ability according to claim 2, it is characterised in that the step Rapid S600 includes:
S610 judges whether the snoop results meet port collision rule, and the port collision rule is raw for the rule first configured Effect;
S620 receives the request bag sent when listening to the second port, and the 3rd port do not receive send please Bag is sought, then judges that the DUT meets port collision rule, the DUT port collisions disposal ability is qualified;
S630 then judges that the DUT is unsatisfactory for port collision rule when listening to the request bag that the 3rd port reception is sent, The DUT port collisions disposal ability is unqualified.
6. a kind of test system of DUT port collisions disposal ability, it is characterised in that including:Rule configuration module, monitoring mould Block, thread creation module, test module, control module, the control module respectively with the rule configuration module, monitor mould Block, thread creation module and test module are connected;Wherein:
The rule configuration module call function configures forwarding rule in DUT ports on DUT and opens DMZ host functions;
Corresponding test port in the monitoring module call instruction snoopy test system;
The thread creation module is connected by telnet agreements with accompanying survey PC to set up, and creates multithreading;
The test module call instruction is tested from accompanying to survey PC and initiate the multithreading to the DUT;
The control module call instruction disconnects the test system and accompanies the connection for surveying PC, and is obtained by the monitoring module The snoop results of test port;
The control module judges whether the port collision disposal ability of the DUT is qualified according to the snoop results.
7. a kind of test system of DUT port collisions disposal ability according to claim 6, it is characterised in that the rule Then configuration module includes:First rule configuration submodule, Second Rule configuration submodule, wherein:
The first rule configuration submodule call function configures a port forwarding rule on DUT, and configuration server IP is DUT distributes to the IP of test system, and configures the second port that DUT WAN-side IP first port maps test system;So as to The bag of first port request to DUT WAN-side IP is forwarded to the second port of the test system of mapping;
The Second Rule configuration submodule opens DMZ host functions, and the DMZ IP of configuration DMZ host functions are test system IP, so as to which the bag of the first port request to DUT WAN-side IP to be forwarded to the 3rd port of corresponding test system.
8. the test system of a kind of DUT port collisions disposal ability according to claim 6 or 7, it is characterised in that described Thread creation module includes:Connect submodule, script startup submodule and thread setting up submodule, the script startup submodule It is connected respectively with the connection submodule, the thread setting up submodule, wherein:
The connection submodule calls telnet functions to accompany survey PC by the connection of telnet agreements;
The script startup submodule accompanies the test script surveyed on PC by ordering to start;
The thread setting up submodule calls two threads of thread function creations, described two threads by the test script Be call nc orders from accompany survey PC send the bag that the first port of from the WAN-side IP to DUT makes requests on.
9. a kind of test system of DUT port collisions disposal ability according to claim 6, it is characterised in that the survey Die trial block calls thread.start orders while initiating two threads created in previous step, by accompanying survey PC to be simultaneously emitted by Two bags for being made requests on to DUT WAN-sides IP first port.
10. a kind of test system of DUT port collisions disposal ability according to claim 7, it is characterised in that the control Molding block includes:Operation submodule, the judging submodule being connected with the operation submodule;Wherein:
The operation submodule disconnects and accompanied the connection for surveying PC after the test module initiates test, pass through the monitoring mould Block obtains second port, the snoop results of the 3rd port;
The judging submodule judges whether the second port, the snoop results of the 3rd port meet port collision rule, institute The taking effect rules for stating port collision rule first to configure;
The request bag sent is received when the monitoring module listens to the second port, and the 3rd port is not received The request bag sent, then the judging submodule judge that the DUT meets port collision rule, DUT port collisions processing Ability is qualified;
When the monitoring module listens to the request bag that the second port reception is sent, then the judging submodule judges described DUT is unsatisfactory for port collision rule, and the DUT port collisions disposal ability is unqualified.
CN201710357406.9A 2017-05-19 2017-05-19 Method and system for testing conflict handling capacity of DUT (device under test) port Active CN107204895B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710357406.9A CN107204895B (en) 2017-05-19 2017-05-19 Method and system for testing conflict handling capacity of DUT (device under test) port

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710357406.9A CN107204895B (en) 2017-05-19 2017-05-19 Method and system for testing conflict handling capacity of DUT (device under test) port

Publications (2)

Publication Number Publication Date
CN107204895A true CN107204895A (en) 2017-09-26
CN107204895B CN107204895B (en) 2020-12-25

Family

ID=59906207

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710357406.9A Active CN107204895B (en) 2017-05-19 2017-05-19 Method and system for testing conflict handling capacity of DUT (device under test) port

Country Status (1)

Country Link
CN (1) CN107204895B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110890995A (en) * 2019-05-14 2020-03-17 研祥智能科技股份有限公司 Network port testing method and network port testing device
WO2021163825A1 (en) * 2020-02-17 2021-08-26 Arris Enterprises Llc Method and system for obtaining listening ports of a device under test

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101621499A (en) * 2008-07-03 2010-01-06 中兴通讯股份有限公司 Method for simultaneously realizing remote access control and isolation area application on terminal device
CN102164058A (en) * 2011-05-13 2011-08-24 北京航空航天大学 IEC61850 standard transformer substation based communication network and system test method
CN102710518A (en) * 2012-05-31 2012-10-03 福建升腾资讯有限公司 Method and system for realizing NAT (Network Address Translator) traversal under wide area network
US9038151B1 (en) * 2012-09-20 2015-05-19 Wiretap Ventures, LLC Authentication for software defined networks

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101621499A (en) * 2008-07-03 2010-01-06 中兴通讯股份有限公司 Method for simultaneously realizing remote access control and isolation area application on terminal device
CN102164058A (en) * 2011-05-13 2011-08-24 北京航空航天大学 IEC61850 standard transformer substation based communication network and system test method
CN102710518A (en) * 2012-05-31 2012-10-03 福建升腾资讯有限公司 Method and system for realizing NAT (Network Address Translator) traversal under wide area network
US9038151B1 (en) * 2012-09-20 2015-05-19 Wiretap Ventures, LLC Authentication for software defined networks

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110890995A (en) * 2019-05-14 2020-03-17 研祥智能科技股份有限公司 Network port testing method and network port testing device
CN110890995B (en) * 2019-05-14 2021-08-13 研祥智能科技股份有限公司 Network port testing method and network port testing device
WO2021163825A1 (en) * 2020-02-17 2021-08-26 Arris Enterprises Llc Method and system for obtaining listening ports of a device under test

Also Published As

Publication number Publication date
CN107204895B (en) 2020-12-25

Similar Documents

Publication Publication Date Title
US7289449B1 (en) Device and method for managing fault detection and fault isolation in voice and data networks
CN101035037B (en) Method, system and related device for detecting the network communication quality
JP2019501553A (en) Cloud-based system and method for managing test configurations of cable test devices
US9473381B2 (en) Systems and methods for network testing
CN102546292B (en) Detect the method and apparatus of server application health status
CN107332726A (en) A kind of detection method and device of communication link
JP2018037066A (en) Process control communication architecture
US10097442B2 (en) Methods, systems, and computer readable media for receiving test configuration information
CN104796298A (en) SDN (Software Defined Network) network fault analyzing method and device
CN107026764A (en) A kind of remote debugging method, equipment, server and system
CN104113443A (en) Network equipment detection method, device and cloud detection system
CN101656637A (en) Virtual trunk measuring device and method for network protocol
CN107360036B (en) Network fault positioning method, terminal and server
CN107204895A (en) A kind of method of testing and system of DUT port collisions disposal ability
CN110768862B (en) Cloud platform physical link connectivity detection device, method and system
CN104506396B (en) The method of testing and system of the full port Full Mesh performances of equipment
EP3360285B1 (en) System and method to reconcile cabling test results with cabling test configurations
CN105703969B (en) Method, field device and the IP-based network of the accessibility of diagnostic network user
CN105959160A (en) Debugging information transmission method and apparatus
CN108551460A (en) A kind of SOCKET communication establishing methods under complex network environment
CN110048909A (en) Network O&M method and device
CN113009246B (en) PSE device detection device and PSE device detection method
CN104363143A (en) Port mapping test method of wireless router
CN106603348B (en) A kind of method and system that simulation DHCP Offer floods
KR102149229B1 (en) AP apparatus for inspecting AP device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201110

Address after: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

Address before: 201616 Shanghai city Songjiang District Sixian Road No. 3666

Applicant before: Phicomm (Shanghai) Co.,Ltd.

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201208

Address after: Room 703, building 3, Yangguang Chuncheng, Lubei street, Luqiao District, Taizhou City, Zhejiang Province

Applicant after: Taizhou zhiao communication equipment Co.,Ltd.

Address before: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant before: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221227

Address after: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee after: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Address before: Room 703, building 3, Yangguang Chuncheng, Lubei street, Luqiao District, Taizhou City, Zhejiang Province

Patentee before: Taizhou zhiao communication equipment Co.,Ltd.