CN104363143A - Port mapping test method of wireless router - Google Patents
Port mapping test method of wireless router Download PDFInfo
- Publication number
- CN104363143A CN104363143A CN201410707070.0A CN201410707070A CN104363143A CN 104363143 A CN104363143 A CN 104363143A CN 201410707070 A CN201410707070 A CN 201410707070A CN 104363143 A CN104363143 A CN 104363143A
- Authority
- CN
- China
- Prior art keywords
- server
- port
- port mapping
- client
- wireless router
- 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
Links
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
- Small-Scale Networks (AREA)
Abstract
The invention provides a port mapping method of a wireless router. The method comprises the following steps that S1, the LAN side of the router to be tested is connected to a client side, the WAN side of the router to be tested is connected with a server, and the router to be tested is configured to enable the client side to be connected with the server in a ping mode; S2, a port mapping rule is set on the router to be tested; S3, nc.exe executable programs are arranged on the server and the client side respectively, and an nc.exe route is switched to in a cmd window; S4, the client side is used for inputting a monitoring command, and the server is used for inputting a sending command; S5, whether port mapping between the server and the client side succeeds is judged. By means of the port mapping method of the wireless router, on one hand, complexity and time delay caused by existing software are avoided, and on the other hand, the coverage is wide and meets testing requirements.
Description
Technical field
The present invention relates to a kind of technical field of router, particularly relate to a kind of port mapping method of wireless router.
Background technology
The method of testing that current router port maps is: use hfs.exe, 3CDaemon software as server end in LAN side, WAN-side browser access http-server, is realized the object of test different port by the port numbers revising hfs.exe.Hfs.exe, 3CDaemon etc. are conventional, and what do the software application of server is all tcp port, without using the simple tool of udp port to do server.
Therefore, existing route device port mapping method of testing mainly has following shortcoming:
(1) existing server generally all uses tcp port, cannot test the mapping function of udp port.
(2) client needs to use browser access http-server, uses continuously and causes browser to react comparatively slow, the extended testing system time.
(3) some particular port of browser automatic shield such as Firefox, Google port of serving as ftp, causes testing some particular port.
(4) space of hfs.exe software own is little, belongs to non-mounting software, easily without response during use.
(5) when browser rs cache causes even without mapping, also can successful access http-server.
Cygwin is a class UNIX simulated environment run on windows platform, is the set of much software.Wherein integrated NetCat function can isolated operation in Windows system.What the reality of NetCat can be run is named as nc, is the Unix instrument of a unusual simple and flexible, without the need to installing, fast small and exquisite, can reading and writing TCP or UDP network connect.Nc is designed to a rear ending tool reliably, directly or easily can be driven by other program or script; Nc is again Networked E-Journals and the developing instrument of a feature richness simultaneously, because it can set up the connection of the almost any type that may use.And this connection can be sustained, until the stop connecting two ends connects; Nc can also complete these functions by UDP, therefore can be used for test tcp/UDP server.
Particularly, the parameter of nc is as follows:
-h: check help information
-d: background mode
-e prog: program redirect, just performs (danger) once connect
-i secs: the interval of time delay
-l: listen mode, for inbound connection
-L: listen mode, connects after sky closes and still continues to monitor, until CTR+C
-n:IP address, can not use domain name
-o film: the transmission of recording 16 systems
-p [space]: port local port number
-r: random local and remote port
-t: use Telnet interactive mode
-u:UDP pattern
-v: export in detail will be more detailed with-vv
-w: digital timeout time delay interval
-z: will input, exports and turns off (during for sweeping anchor)
To sum up, nc how is utilized to become when next hot research problem to the port mapping test realizing wireless router.
Summary of the invention
The shortcoming of prior art in view of the above, the object of the present invention is to provide a kind of port mapping method of wireless router, solve existing testing software cannot relate to all types of port and some particular port and the problem such as cannot to test, be applicable to all routers supporting the functions such as DMZ, Virtual Service, head of a family's control, MAC/IP/ ports filter, port triggerings.
For achieving the above object and other relevant objects, the invention provides a kind of port mapping method of wireless router, comprise the following steps: step S1, by Devices to test LAN side connect client, WAN-side connection server, configuration Devices to test can lead to server by ping to make client; Step S2, port mapping rule is set on Devices to test; Step S3, server and client side arrange nc.exe executable program respectively, and be switched to nc.exe path in cmd window under; Step S4, client input snoop command, server input sends order; Step S5, judge the whether success of port mapping between server and client side.
According to the port mapping method of above-mentioned wireless router, wherein: in described step S2, when arranging port mapping rule, client logs in the GUI of Devices to test to arrange port mapping rule.
According to the port mapping method of above-mentioned wireless router, wherein: in described step S4, the snoop command for tcp port of client input comprises nc-l-pX or nc-v-l-pX, snoop command for udp port comprises nc-u-l-p or nc-u-v-l-p, wherein, " X " represents that listening port is port to be tested, and "-v " represents output details, "-u " represents udp port, does not comprise "-u " expression and be defaulted as tcp port in snoop command.
According to the port mapping method of above-mentioned wireless router, wherein: in described step S4, the transmission order of server input comprises nc-pY server ip X or nc-v-pY server ip X, nc-u-pY server ip X or nc-u-v-pY server ip X; Wherein, " Y " represents source port, and " X " represents destination interface and monitor the listening port of end.
According to the port mapping method of above-mentioned wireless router, wherein: in described step S5, whether connect successful connection by checking between server and client side, and whether Successful transmissions data can judge that whether the port mapping between server and client side is successful.
According to the port mapping method of above-mentioned wireless router, wherein: described step S5 comprises the following steps:
Step S51, judge snoop command and send order in whether comprise "-v "; Step S52 is proceeded to if comprise; If do not comprise and proceed to step S53;
Whether the connection between step S52, inspection server and client side is successfully established, if successfully proceed to step S53; Step S57 is proceeded to if unsuccessful;
Step S53, server input data;
Whether step S54, inspection client receive the data that server sends, and if so, proceed to step S55, proceed to step S57 if not;
Step S55, client input data;
Whether step S56, inspection server receive the data that client is sent, if so, port mapping success, and flow process terminates; Proceed to step S57 if not;
The failure of step S57, port mapping, flow process terminates.
Further, according to the port mapping method of above-mentioned wireless router, wherein: server and client side inputs data by keyboard.
Further, according to the port mapping method of above-mentioned wireless router, wherein: server and client side inputs data by touch-screen.
Further, according to the port mapping method of above-mentioned wireless router, wherein: server and client side inputs data and there is no sequencing.
As mentioned above, the port mapping method of wireless router of the present invention, has following beneficial effect:
(1) the hfs.exe small software easily inefficient defect caused slow in reacting is in the past eliminated;
(2) volume is little, without the need to installing, in the operation of cmd window utility command, not easily stuck;
(3) browser access time delay is eliminated, the time of debug when namely some browser cannot access particular port;
(4) can test tcp/UDP all of the port, broad covered area;
(5) filtration of all C/S (Client/Server) pattern can be tested, and port mapping function.
Accompanying drawing explanation
Fig. 1 is shown as the structural representation of the port mapping test macro of wireless router of the present invention;
Fig. 2 is shown as the flow chart of the port mapping method of testing of wireless router of the present invention;
Fig. 3 is shown as the detail flowchart of the port mapping method of testing of wireless router of the present invention.
Element numbers explanation
1 client
2 servers
3 Devices to tests
Embodiment
Below by way of specific instantiation, embodiments of the present invention are described, those skilled in the art the content disclosed by this specification can understand other advantages of the present invention and effect easily.The present invention can also be implemented or be applied by embodiments different in addition, and the every details in this specification also can based on different viewpoints and application, carries out various modification or change not deviating under spirit of the present invention.
It should be noted that, the diagram provided in the present embodiment only illustrates basic conception of the present invention in a schematic way, then only the assembly relevant with the present invention is shown in graphic but not component count, shape and size when implementing according to reality is drawn, it is actual when implementing, and the kenel of each assembly, quantity and ratio can be a kind of change arbitrarily, and its assembly layout kenel also may be more complicated.
The port mapping method of testing of wireless router of the present invention, by monitoring local port respectively server and client side, sends data after connection establishment success between client/server and family end, can test out result.By using nc.exe not only can test DMZ, Virtual Service, upnp, the correlation function based on ports filter can also be tested, as the MAC/IP/ ports filter function of router.
With reference to Fig. 1, the port mapping test macro of wireless router of the present invention comprises client 1 (PC1), server 2 (PC2) and Devices to test (Device Under Testing, DUT) 3.Wherein, Devices to test 3LAN side connects client 1, WAN-side connection server 2.
With reference to Fig. 2-Fig. 3, the port mapping method of testing of wireless router of the present invention comprises the following steps:
Step S1, by Devices to test LAN side connect client rs PC 1, WAN-side connection server PC2, configuration Devices to test can lead to server PC2 by ping to make client rs PC 1.
Step S2, port mapping rule is set on Devices to test.
Particularly, PC1 logs in the GUI of Devices to test, arranges the mapping ruler such as DMZ, Virtual Service.
Step S3, server PC2 and client rs PC 1 arrange nc.exe executable program respectively, and be switched to nc.exe path in cmd window under.
Particularly, server PC2 and client rs PC 1 open cmd window, and under being switched to nc.exe path.
Step S4, client rs PC 1 input snoop command, and server PC2 inputs and sends order.
Particularly, client rs PC 1 can input the snoop command for tcp port: nc-l-pX or nc-v-l-pX, also can input the snoop command nc-u-l-p for udp port or nc-u-v-l-p.
Wherein, " X " represents that listening port is port to be tested, and "-v " represents output details, and "-u " represents udp port, does not input "-u " expression and is defaulted as tcp port.
Server PC2 inputs and sends order: nc-pY server ip X or nc-v-pY server ip X, nc-u-pY server ip X or nc-u-v-pY server ip X.
Wherein, " Y " represents source port, and " X " represents destination interface and monitor the listening port of end.
Step S5, judge the whether success of port mapping between server and client side.
Wherein, by checking whether whether connect successful connection between server and client side also Successful transmissions data can judge that whether the port mapping between server and client side is successful.
Particularly, step S5 comprises the following steps again:
Step S51, judge snoop command and send order in whether comprise "-v "; Step S52 is proceeded to if comprise; If do not comprise and proceed to step S53.
Whether the connection between step S52, inspection server and client side is successfully established, if successfully proceed to step S53; Step S57 is proceeded to if unsuccessful.
Step S53, server input data.
Whether step S54, inspection client receive the data that server sends, and if so, proceed to step S55, proceed to step S57 if not.
Step S55, client input data.
Whether step S56, inspection server receive the data that client is sent, if so, port mapping success, and flow process terminates; Proceed to step S57 if not.
The failure of step S57, port mapping, flow process terminates.
Wherein, if when comprising "-v ", whether successful connection after "-v " exports details, could to be checked between server and client side; If do not comprised "-v ", then directly can input data, the other side receives data and then proves successful connection.
Usually, server and client side inputs data by the input unit such as keyboard, touch-screen.When judging whether the connection between server and client side is successfully established, server and client side inputs data and there is no sequencing, can perform arbitrarily according to demand.
In sum, the port mapping method of wireless router of the present invention eliminates the hfs.exe small software easily inefficient defect caused slow in reacting in the past; Volume is little, without the need to installing, in the operation of cmd window utility command, not easily stuck; Eliminate browser access time delay, the time of debug when namely some browser cannot access particular port; Can test tcp/UDP all of the port, broad covered area; The filtration of all C/S models can be tested, and port mapping function.So the present invention effectively overcomes various shortcoming of the prior art and tool high industrial utilization.
Above-described embodiment is illustrative principle of the present invention and effect thereof only, but not for limiting the present invention.Any person skilled in the art scholar all without prejudice under spirit of the present invention and category, can modify above-described embodiment or changes.Therefore, such as have in art usually know the knowledgeable do not depart from complete under disclosed spirit and technological thought all equivalence modify or change, must be contained by claim of the present invention.
Claims (9)
1. a port mapping method for wireless router, is characterized in that, comprises the following steps:
Step S1, by Devices to test LAN side connect client, WAN-side connection server, configuration Devices to test can lead to server by ping to make client;
Step S2, port mapping rule is set on Devices to test;
Step S3, server and client side arrange nc.exe executable program respectively, and be switched to nc.exe path in cmd window under;
Step S4, client input snoop command, server input sends order;
Step S5, judge the whether success of port mapping between server and client side.
2. the port mapping method of wireless router according to claim 1, is characterized in that: in described step S2, and when arranging port mapping rule, client logs in the GUI of Devices to test to arrange port mapping rule.
3. the port mapping method of wireless router according to claim 1, it is characterized in that: in described step S4, the snoop command for tcp port of client input comprises nc-l-pX or nc-v-l-pX, snoop command for udp port comprises nc-u-l-p or nc-u-v-l-p, wherein, " X " represents that listening port is port to be tested, and "-v " represents output details, "-u " represents udp port, does not comprise "-u " expression and be defaulted as tcp port in snoop command.
4. the port mapping method of wireless router according to claim 1, it is characterized in that: in described step S4, the transmission order of server input comprises nc-pY server ip X or nc-v-pY server ip X, nc-u-pY server ip X or nc-u-v-pY server ip X; Wherein, " Y " represents source port, and " X " represents destination interface and monitor the listening port of end.
5. the port mapping method of wireless router according to claim 1, it is characterized in that: in described step S5, whether connect successful connection by checking between server and client side, and whether Successful transmissions data can judge that whether the port mapping between server and client side is successful.
6. the port mapping method of wireless router according to claim 1, is characterized in that: described step S5 comprises the following steps:
Step S51, judge snoop command and send order in whether comprise "-v "; Step S52 is proceeded to if comprise; If do not comprise and proceed to step S53;
Whether the connection between step S52, inspection server and client side is successfully established, if successfully proceed to step S53; Step S57 is proceeded to if unsuccessful;
Step S53, server input data;
Whether step S54, inspection client receive the data that server sends, and if so, proceed to step S55, proceed to step S57 if not;
Step S55, client input data;
Whether step S56, inspection server receive the data that client is sent, if so, port mapping success, and flow process terminates; Proceed to step S57 if not;
The failure of step S57, port mapping, flow process terminates.
7. the port mapping method of wireless router according to claim 6, is characterized in that: server and client side inputs data by keyboard.
8. the port mapping method of wireless router according to claim 6, is characterized in that: server and client side inputs data by touch-screen.
9. the port mapping method of wireless router according to claim 6, is characterized in that: server and client side inputs data and there is no sequencing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410707070.0A CN104363143B (en) | 2014-11-27 | 2014-11-27 | A kind of port mapping method of testing of wireless router |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410707070.0A CN104363143B (en) | 2014-11-27 | 2014-11-27 | A kind of port mapping method of testing of wireless router |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104363143A true CN104363143A (en) | 2015-02-18 |
CN104363143B CN104363143B (en) | 2017-11-21 |
Family
ID=52530370
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410707070.0A Expired - Fee Related CN104363143B (en) | 2014-11-27 | 2014-11-27 | A kind of port mapping method of testing of wireless router |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104363143B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107104827A (en) * | 2017-04-12 | 2017-08-29 | 上海斐讯数据通信技术有限公司 | DMZ method for automatically testing functions and system based on Socket |
CN109005172A (en) * | 2018-08-02 | 2018-12-14 | 郑州云海信息技术有限公司 | A kind of method, apparatus and storage medium for adding port forward rule |
CN113411367A (en) * | 2020-03-17 | 2021-09-17 | 浙江宇视科技有限公司 | Method, device, equipment, system and storage medium for establishing connection of monitoring equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1909487A (en) * | 2006-08-24 | 2007-02-07 | 华为数字技术有限公司 | Method and system for set testing of router |
CN101388882A (en) * | 2007-09-13 | 2009-03-18 | 英业达股份有限公司 | Network protocol address configuring system and method |
KR101335437B1 (en) * | 2012-01-11 | 2013-11-29 | (주)넷텐션 | Communication method of terminals based on the reuse of network address translation port map |
-
2014
- 2014-11-27 CN CN201410707070.0A patent/CN104363143B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1909487A (en) * | 2006-08-24 | 2007-02-07 | 华为数字技术有限公司 | Method and system for set testing of router |
CN101388882A (en) * | 2007-09-13 | 2009-03-18 | 英业达股份有限公司 | Network protocol address configuring system and method |
KR101335437B1 (en) * | 2012-01-11 | 2013-11-29 | (주)넷텐션 | Communication method of terminals based on the reuse of network address translation port map |
Non-Patent Citations (1)
Title |
---|
李瑾: "《路由器测试规范-低端路由器》标准简介", 《通信世界》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107104827A (en) * | 2017-04-12 | 2017-08-29 | 上海斐讯数据通信技术有限公司 | DMZ method for automatically testing functions and system based on Socket |
CN109005172A (en) * | 2018-08-02 | 2018-12-14 | 郑州云海信息技术有限公司 | A kind of method, apparatus and storage medium for adding port forward rule |
CN113411367A (en) * | 2020-03-17 | 2021-09-17 | 浙江宇视科技有限公司 | Method, device, equipment, system and storage medium for establishing connection of monitoring equipment |
CN113411367B (en) * | 2020-03-17 | 2022-07-19 | 浙江宇视科技有限公司 | Method, device, equipment, system and storage medium for establishing connection of monitoring equipment |
Also Published As
Publication number | Publication date |
---|---|
CN104363143B (en) | 2017-11-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3363156B1 (en) | Cloud based system and method for managing testing configurations for cable test devices | |
US20170315522A1 (en) | Virtual simulator and building management system including the same | |
CN113064780B (en) | Automatic test system and method based on router product | |
CN106326088B (en) | Method and device for realizing construction of test object and device for realizing service configuration test | |
CN103618645A (en) | Complex network environment test system and method with intelligent simulation function | |
CN102546266B (en) | Method and platform for diagnosing network failures | |
EP3053053A1 (en) | Software-defined network application deployment | |
CN111404779B (en) | Method, device and system for testing role switching of router nodes | |
CN109525461A (en) | A kind of test method of the network equipment, device, equipment and storage medium | |
US11405302B1 (en) | Methods, systems, and computer readable media for network testing using configurable test infrastructure | |
WO2018106304A1 (en) | Deploying a networking test tool in a cloud computing system | |
CN109413678A (en) | A kind of Wi-Fi module automatic test approach and test macro | |
CN108234246B (en) | Method and system for multi-directionally testing network performance of server | |
CN104216828A (en) | Testing method for performing function traversal on tested application program | |
CN104536900A (en) | Method and device for controlling mobile terminal | |
CN104363143A (en) | Port mapping test method of wireless router | |
JP6767479B2 (en) | System and cloud-based computer server for matching cabling test results with cabling test configuration | |
CN104468279A (en) | Routing protocol interaction testing method and tool | |
CN108134711B (en) | Method for testing terminal APP, simulation household appliance system and storage medium | |
CN106875765B (en) | Electronic classroom implementation method and device based on VDI | |
CN114598629B (en) | Terminal type identification automatic test system and computer equipment | |
CN112860568B (en) | Multi-route testing method and system based on Selenium | |
CN107204895A (en) | A kind of method of testing and system of DUT port collisions disposal ability | |
CN106789400B (en) | Test method and test system for wireless extension function | |
CN105516017A (en) | Directed acceleration method and device, and terminal equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20171121 Termination date: 20181127 |
|
CF01 | Termination of patent right due to non-payment of annual fee |