CN109151859B - Multi-machine test method for AP (access point) product without fixed IP (Internet protocol) at network port - Google Patents
Multi-machine test method for AP (access point) product without fixed IP (Internet protocol) at network port Download PDFInfo
- Publication number
- CN109151859B CN109151859B CN201810796615.8A CN201810796615A CN109151859B CN 109151859 B CN109151859 B CN 109151859B CN 201810796615 A CN201810796615 A CN 201810796615A CN 109151859 B CN109151859 B CN 109151859B
- Authority
- CN
- China
- Prior art keywords
- message
- vlan
- sends
- product
- dhcp server
- 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.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W24/00—Supervisory, monitoring or testing arrangements
- H04W24/02—Arrangements for optimising operational condition
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5007—Internet protocol [IP] addresses
- H04L61/5014—Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5046—Resolving address allocation conflicts; Testing of addresses
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4641—Virtual LANs, VLANs, e.g. virtual private networks [VPN]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a multi-machine test method of AP products with network ports without fixed IP, which comprises the following steps: the AP product sends a DHCPDISCOVERY message to the switch; after receiving the message, the switch adds a VLAN label to the message and then sends the message to a DHCP server; after receiving the request, the DHCP server analyzes the VLAN ID; the DHCP server searches a corresponding table of the VLAN ID and the IP, finds out the corresponding VLAN ID and obtains a corresponding IP address; and the DHCP server uses the IP address to form a DHCPOFFER message, adds a VLAN ID to the message on a link layer, and sends the message to the switch. The invention can use one testing computer to test a plurality of products at one time, so as to improve the production efficiency. Meanwhile, the problems of repeated IP distribution and unfixed IP distribution caused by the fact that the MAC of a plurality of products is the same are solved.
Description
Technical Field
The invention relates to the field of AP product production test, in particular to a multi-machine test method for AP products with network ports without fixed IP.
Background
Many AP products can access and set AP product parameters through a network port accessing a fixed IP address at the time of production, but sometimes due to some special requirements and special use environments, the network port of the AP product does not set a fixed IP, but needs to allocate an IP through a DHCP server, and access the AP product (e.g., Web page, etc.) through the allocated IP.
The general mode is that both the AP product and the test PC are connected to a router with a DHCP function, the router allocates a fixed IP to the product (the IP pool of the router only has one IP, and the duration period is set to be short, so that an unchangeable IP can be allocated), and the test PC can access the AP product and test the AP product through the IP address.
The following problems are encountered when implementing multi-machine testing (i.e., one testing PC can only test multiple products at a time):
1. the MAC addresses of the products produced on the production line are the same (because the actual MAC addresses of the products are not written yet, or the default values of the burning software are not written yet), so that the common DHCP function cannot distinguish DHCP requests of multiple products.
2. The multi-machine test necessarily assigns a different IP to each product, but how the test program associates the product number with the IP address is also a problem to be solved (because the IP assigned by the DHCP service is not fixed).
Disclosure of Invention
The invention aims to provide a multi-machine test method for AP products with network ports without fixed IP, which solves the problems that IP distribution is repeated easily and IP distribution is unfixed and cannot correspond to corresponding products when a plurality of products are tested by using the conventional single test PC.
In order to solve the technical problems, the invention adopts the following technical scheme:
a multi-machine test method for AP products with network ports without fixed IP comprises the following steps:
connecting a plurality of AP products to a switch, and distributing a VLAN ID for a port connected with each AP product;
the switch is connected to the test PC through the DHCP server;
configuring the corresponding relation between VLAN ID and IP;
the AP product sends a DHCPDISCOVERY message to the switch;
after receiving the message, the switch adds a VLAN label to the message and then sends the message to a DHCP server;
after receiving the request, the DHCP server analyzes the VLAN ID;
the DHCP server searches a corresponding table of the VLAN ID and the IP, finds out the corresponding VLAN ID and obtains a corresponding IP address;
the DHCP server uses the IP address to form a DHCPOFFER message, adds VLAN ID to the message on a link layer and sends the message to the switch;
the switch removes the VLAN label from the response packet according to the VLANID and sends the response packet back to the AP product;
the product sends out a DHCPREQUEST message after receiving the DHCPOFFER message, and sends the DHCPREQUEST message to the switch;
after receiving the message, the switch adds a VLAN label to the message and then sends the message to a DHCP server;
after receiving the request, the DHCP server forms a DHCPACK message, adds a VLAN ID to the message at a link layer and sends the message to the exchange;
the switch removes the VLAN label from the response packet according to the VLANID and sends the response packet back to the AP product;
and the product configures network parameters according to the obtained IP and the parameters, completes IP distribution and performs testing.
The further technical scheme is that the DHCP server is a router with a DHCP function.
Before testing, the DHCP implementation source code needs to be modified, a corresponding table of VLAN ID and IP is established, and an interface for editing the corresponding table is provided.
A further technical solution is that the IP allocation specifically includes:
the AP product initiates a DHCPDISCOVERY message;
when the DHCP server receives the dhcpdiscover message, the DHCP server needs to analyze VLAN information (VLAN ID) in the link layer in addition to analyzing a normal message.
Searching IP from a corresponding table of VLAN ID and IP according to VLAN ID, and forming DHCPOFFER message by using the IP;
the DHCP server sends the DHCPOFFER message to an AP product;
the AP product sends a DHCPREQUEST message;
after receiving the DHCPREQUEST message, the DHCP server uses the found IP to form a DHCPACK message and sends the DHCPACK message to the AP product;
and the AP product configures TCP/IP parameters according to the received information, and the IP distribution is completed.
Compared with the prior art, the invention has the beneficial effects that: a plurality of products can be tested at a time by using one testing computer, so that the production efficiency is improved. Meanwhile, the problems of repeated IP distribution and unfixed IP distribution caused by the fact that the MAC of a plurality of products is the same are solved.
Drawings
FIG. 1 is a system configuration diagram of the testing method of the present invention.
Fig. 2 is a flow chart of the DHCP server in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Fig. 1 shows an embodiment of a multi-machine testing method for AP products with network ports without fixed IP in the present invention: a multi-machine test method for AP products with network ports without fixed IP comprises the following steps:
connecting a plurality of AP products to a switch, and distributing a VLAN ID for a port connected with each AP product;
the switch is connected to the test PC through the DHCP server;
configuring the corresponding relation between VLAN ID and IP;
the AP product sends a DHCPDISCOVERY message to the switch;
after receiving the message, the switch adds a VLAN label to the message and then sends the message to a DHCP server;
after receiving the request, the DHCP server analyzes the VLAN ID;
the DHCP server searches a corresponding table of the VLAN ID and the IP, finds out the corresponding VLAN ID and obtains a corresponding IP address;
the DHCP server uses the IP address to form a DHCPOFFER message, adds VLAN ID to the message on a link layer and sends the message to the switch;
the switch removes the VLAN label from the response packet according to the VLANID and sends the response packet back to the AP product;
the product sends out a DHCPREQUEST message after receiving the DHCPOFFER message, and sends the DHCPREQUEST message to the switch;
after receiving the message, the switch adds a VLAN label to the message and then sends the message to a DHCP server;
after receiving the request, the DHCP server forms a DHCPACK message, adds a VLAN ID to the message at a link layer and sends the message to the exchange;
the switch removes the VLAN label from the response packet according to the VLANID and sends the response packet back to the AP product;
and the product configures network parameters according to the obtained IP and the parameters, completes IP distribution and performs testing.
As a preferred solution of the foregoing embodiment, the DHCP server is a router having a DHCP function.
According to another embodiment of the invention, the multi-machine test method for the AP product without the fixed IP of the network port comprises the following steps: a multi-machine test method for AP products with network ports without fixed IP comprises the following steps:
before testing, as shown in fig. 2, a DHCP implementation source code needs to be modified first, a correspondence table of VLAN IDs and IP is established, and an interface for editing the correspondence table is provided;
connecting a plurality of AP products to a switch, and distributing a VLAN ID for a port connected with each AP product;
the switch is connected to the test PC through the DHCP server;
configuring the corresponding relation between VLAN ID and IP;
the AP product sends a DHCPDISCOVERY message to the switch;
after receiving the message, the switch adds a VLAN label to the message and then sends the message to a DHCP server;
after receiving the request, the DHCP server analyzes the VLAN ID;
the DHCP server searches a corresponding table of the VLAN ID and the IP, finds out the corresponding VLAN ID and obtains a corresponding IP address;
the DHCP server uses the IP address to form a DHCPOFFER message, adds VLAN ID to the message on a link layer and sends the message to the switch;
the switch removes the VLAN label from the response packet according to the VLANID and sends the response packet back to the AP product;
the product sends out a DHCPREQUEST message after receiving the DHCPOFFER message, and sends the DHCPREQUEST message to the switch;
after receiving the message, the switch adds a VLAN label to the message and then sends the message to a DHCP server;
after receiving the request, the DHCP server forms a DHCPACK message, adds a VLAN ID to the message at a link layer and sends the message to the exchange;
the switch removes the VLAN label from the response packet according to the VLANID and sends the response packet back to the AP product;
and the product configures network parameters according to the obtained IP and the parameters, completes IP distribution and performs testing.
According to a preferred embodiment of the present invention, the IP allocation specifically includes:
the AP product initiates a DHCPDISCOVERY message;
when the DHCP server receives the dhcpdiscover message, the DHCP server needs to analyze VLAN information (VLAN ID) in the link layer in addition to analyzing a normal message.
Searching IP from a corresponding table of VLAN ID and IP according to VLAN ID, and forming DHCPOFFER message by using the IP;
the DHCP server sends the DHCPOFFER message to an AP product;
the AP product sends a DHCPREQUEST message;
after receiving the DHCPREQUEST message, the DHCP server uses the found IP to form a DHCPACK message and sends the DHCPACK message to the AP product;
and the AP product configures TCP/IP parameters according to the received information, and the IP distribution is completed.
Although the invention has been described herein with reference to a number of illustrative embodiments thereof, it should be understood that numerous other modifications and embodiments can be devised by those skilled in the art that will fall within the spirit and scope of the principles of this disclosure. More specifically, various variations and modifications are possible in the component parts and/or arrangements of the subject combination arrangement within the scope of the disclosure, the drawings and the appended claims. In addition to variations and modifications in the component parts and/or arrangements, other uses will also be apparent to those skilled in the art.
Claims (3)
1. A multi-machine test method for AP products with network ports without fixed IP is characterized by comprising the following steps:
connecting a plurality of AP products to a switch, and distributing a VLAN ID for a port connected with each AP product;
the switch is connected to the test PC through the DHCP server;
configuring the corresponding relation between VLAN ID and IP;
the AP product sends a DHCPDISCOVERY message to the switch;
after receiving the message, the switch adds a VLAN label to the message and then sends the message to a DHCP server;
after receiving the request, the DHCP server analyzes the VLAN ID;
the DHCP server searches a corresponding table of the VLAN ID and the IP, finds out the corresponding VLAN ID and obtains a corresponding IP address;
the DHCP server uses the IP address to form a DHCPOFFER message, adds VLAN ID to the message on a link layer and sends the message to the switch;
the switch removes the VLAN label from the response packet according to the VLANID and sends the response packet back to the AP product;
the product sends out a DHCPREQUEST message after receiving the DHCPOFFER message, and sends the DHCPREQUEST message to the switch;
after receiving the message, the switch adds a VLAN label to the message and then sends the message to a DHCP server;
after receiving the request, the DHCP server forms a DHCPACK message, adds a VLAN ID to the message at a link layer and sends the message to the exchange;
the switch removes the VLAN label from the response packet according to the VLANID and sends the response packet back to the AP product;
the product configures network parameters according to the obtained IP and the parameters, completes IP distribution and tests;
the IP allocation specifically includes:
the AP product initiates a DHCPDISCOVERY message;
when the DHCP server receives the DHCPDISCOVERY message, the DHCP server needs to analyze a VLAN ID in a link layer besides analyzing a normal message;
searching IP from a corresponding table of VLAN ID and IP according to VLAN ID, and forming DHCPOFFER message by using the IP;
the DHCP server sends the DHCPOFFER message to an AP product;
the AP product sends a DHCPREQUEST message;
after receiving the DHCPREQUEST message, the DHCP server uses the found IP to form a DHCPACK message and sends the DHCPACK message
DHCPACK message to AP product;
and the AP product configures TCP/IP parameters according to the received information, and the IP distribution is completed.
2. The multi-machine testing method for AP products without fixed IP of network port according to claim 1, characterized in that: the DHCP server is a router with a DHCP function.
3. The multi-machine testing method for AP products without fixed IP of network port according to claim 1, characterized in that: before testing, the DHCP implementation source code needs to be modified firstly, a corresponding table of VLAN ID and IP is established, and an interface for editing the corresponding table is provided.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810796615.8A CN109151859B (en) | 2018-07-19 | 2018-07-19 | Multi-machine test method for AP (access point) product without fixed IP (Internet protocol) at network port |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810796615.8A CN109151859B (en) | 2018-07-19 | 2018-07-19 | Multi-machine test method for AP (access point) product without fixed IP (Internet protocol) at network port |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109151859A CN109151859A (en) | 2019-01-04 |
CN109151859B true CN109151859B (en) | 2021-09-07 |
Family
ID=64801035
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810796615.8A Active CN109151859B (en) | 2018-07-19 | 2018-07-19 | Multi-machine test method for AP (access point) product without fixed IP (Internet protocol) at network port |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109151859B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110351401B (en) * | 2019-07-10 | 2022-10-14 | 锐捷网络股份有限公司 | Method and system for realizing STA (station) nearby service in large two-layer network |
CN114244701B (en) * | 2021-12-24 | 2024-04-12 | 四川天邑康和通信股份有限公司 | Large-scale production and test method for wireless router equipment |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103475545B (en) * | 2013-09-24 | 2016-08-24 | 深圳市共进电子股份有限公司 | The Performance Test System of a kind of electronic equipment to be measured, method and device |
CN104768179A (en) * | 2014-01-06 | 2015-07-08 | 中国移动通信集团江苏有限公司 | Monitoring system and monitoring method of access control device |
CN104753743A (en) * | 2015-04-27 | 2015-07-01 | 太仓市同维电子有限公司 | Automatic testing method based on automatic testing tool router function |
US10015188B2 (en) * | 2015-08-20 | 2018-07-03 | Cyberx Israel Ltd. | Method for mitigation of cyber attacks on industrial control systems |
EP3507704A4 (en) * | 2016-08-30 | 2020-02-26 | Ruckus Wireless, Inc. | Virtual-machine dataplane with dhcp-server functionality |
CN106789402B (en) * | 2016-11-30 | 2020-04-03 | 太仓市同维电子有限公司 | Multi-network-port mapping multi-machine test system and method based on automation platform |
CN109560980A (en) * | 2018-06-19 | 2019-04-02 | 深圳极智联合科技股份有限公司 | A kind of multimachine test method and system based on telnet agreement |
-
2018
- 2018-07-19 CN CN201810796615.8A patent/CN109151859B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN109151859A (en) | 2019-01-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101883158B (en) | Method and client for acquiring VLAN (Virtual Local Area Network) IDs (Identifiers) and network protocol addresses | |
CN102594933B (en) | Method, device and system for address allocation of public networks | |
EP2169877B1 (en) | Processing method and device for qinq termination configuration | |
US9525648B2 (en) | Method for acquiring physical address of virtual machine | |
CN104378455B (en) | IP address distribution method and device | |
US9973399B2 (en) | IPV6 address tracing method, apparatus, and system | |
JP2016540448A (en) | Virtual extended LAN communication method, apparatus, and system | |
WO2016179950A1 (en) | Internet protocol ip address allocation method and device | |
CN101043461A (en) | Method for testing DHCPv6 service and client | |
CN109151859B (en) | Multi-machine test method for AP (access point) product without fixed IP (Internet protocol) at network port | |
WO2016202016A1 (en) | Device management method, apparatus and system | |
CN104753743A (en) | Automatic testing method based on automatic testing tool router function | |
CN108694116B (en) | Network stability testing method, device and system of VPC cluster | |
CN106878485B (en) | Message processing method and device | |
CN104104749A (en) | Method and device for allocating tunnel IP addresses | |
CN110247778B (en) | Operating system installation method and device, electronic equipment and storage medium | |
CN105338131A (en) | Testing method and system for address pool capacity of DHCP server | |
US20130086259A1 (en) | Method for acquiring an ip address and network access device | |
WO2016177185A1 (en) | Method and apparatus for processing media access control (mac) address | |
US20200267116A1 (en) | Internet protocol version six address management | |
CN107172229B (en) | Router configuration method and device | |
CN104580545A (en) | Virtual computer IP management method based on address monitoring | |
CN107070725A (en) | A kind of method that server two-level management intermodule communication is shaken hands | |
Chelius et al. | No Administration Protocol (NAP) for IPv6 router auto-configuration | |
JP5587254B2 (en) | Allocation apparatus, allocation program, allocation method, and allocation system |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |