CN108650336A - IP address dynamic allocation method, device and storage medium, wireless relay apparatus - Google Patents

IP address dynamic allocation method, device and storage medium, wireless relay apparatus Download PDF

Info

Publication number
CN108650336A
CN108650336A CN201810335789.4A CN201810335789A CN108650336A CN 108650336 A CN108650336 A CN 108650336A CN 201810335789 A CN201810335789 A CN 201810335789A CN 108650336 A CN108650336 A CN 108650336A
Authority
CN
China
Prior art keywords
relay apparatus
address
configuration protocol
host configuration
protocol 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.)
Pending
Application number
CN201810335789.4A
Other languages
Chinese (zh)
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.)
TP Link Technologies Co Ltd
Original Assignee
TP Link Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TP Link Technologies Co Ltd filed Critical TP Link Technologies Co Ltd
Priority to CN201810335789.4A priority Critical patent/CN108650336A/en
Publication of CN108650336A publication Critical patent/CN108650336A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a kind of IP address dynamic allocation method, the method is executed respectively by each wireless relay apparatus in LAN, including:Detect whether this wireless relay apparatus connect with front end wireless aps;When not connected, the Dynamic Host Configuration Protocol server of this wireless relay apparatus is opened to provide IP address and dynamically distributes service;When attached, it detects and whether there is Dynamic Host Configuration Protocol server in LAN;If being not present, the Dynamic Host Configuration Protocol server of this wireless relay apparatus is opened to provide IP address and dynamically distributes service;If in the presence of the Dynamic Host Configuration Protocol server of this wireless relay apparatus is closed, and already present Dynamic Host Configuration Protocol server obtains corresponding IP address from LAN.Correspondingly, the invention also discloses a kind of IP address to dynamically distribute device, computer storage media and wireless relay apparatus.Technical solution using the present invention can improve the ease for use of wireless relay apparatus, and effectively reduce the Network Abnormal generated by user's misconfiguration.

Description

IP address dynamic allocation method, device and storage medium, wireless relay apparatus
Technical field
The present invention relates to a kind of radio network technique field more particularly to IP address dynamic allocation method, device and calculating Machine storage medium, wireless relay apparatus.
Background technology
Wireless relay apparatus (Repeater) is the wireless device extended for wireless signal, both can be wireless with receiving front-end The signal of AP can also be used as wireless aps and provide wireless network to its upper rear end equipment of connection, realizes the function of wireless relay. If front end wireless aps, wireless relay apparatus, rear end equipment are in the same LAN, this relates to the equipment in LAN IP address dynamically distribute the problem of.In most cases, front end wireless aps can open the Dynamic Host Configuration Protocol server of itself (for moving State distributes the server of IP address) IP address is distributed to its upper equipment of connection, wireless relay apparatus is wireless not with front end The Dynamic Host Configuration Protocol server of itself can be also opened in the case of AP connections, IP address distribution clothes are provided to connect its upper rear end equipment Business, still, in the same LAN, only permission provides IP address there are one Dynamic Host Configuration Protocol server and dynamically distributes service, otherwise very Network Abnormal may occur.
To solve the above-mentioned problems, wireless relay apparatus can configure at it and provide a Dynamic Host Configuration Protocol server switch on page, It can be turned on or off Dynamic Host Configuration Protocol server with manual configuration, when wireless relay apparatus needs to connect offer with front end wireless aps wirelessly It when relay services, needs manually to close DHCP service, to prevent in LAN while occur multiple Dynamic Host Configuration Protocol server, to suitable The demand for answering IP address to dynamically distribute.
However, being widely used with wireless relay apparatus, requirement of the user for wireless relay apparatus ease for use is more next Higher, the manual configuration method that the prior art provides increases the difficulty that user uses wireless relay apparatus;In addition, above-mentioned needs The method for carrying out Dynamic Host Configuration Protocol server configuration manually requires user to have certain rudimentary knowledge to network configuration, otherwise may be because matching It sets mistake and leads to Network Abnormal, for example, opening wireless relay apparatus when having Dynamic Host Configuration Protocol server and user in LAN When Dynamic Host Configuration Protocol server, the IP address of the miscellaneous equipment in network can be caused to obtain abnormal and influence communication;When not having in LAN When Dynamic Host Configuration Protocol server and user close the Dynamic Host Configuration Protocol server of wireless relay apparatus, it can cause the other equipment in network that can not obtain It can not be communicated to IP address.
Invention content
Technical problem to be solved of the embodiment of the present invention is, provide a kind of IP address dynamic allocation method, device and Computer storage media, wireless relay apparatus, can improve the ease for use of wireless relay apparatus, and effectively reduce because user mismatches The Network Abnormal set and generated.
In order to solve the above-mentioned technical problem, an embodiment of the present invention provides a kind of IP address dynamic allocation method, the sides Method is executed respectively by each wireless relay apparatus in LAN, including:
Detect whether this wireless relay apparatus connect with front end wireless aps;
When this wireless relay apparatus and front end wireless aps are not connected, open the Dynamic Host Configuration Protocol server of this wireless relay apparatus with IP address is provided and dynamically distributes service;
When this wireless relay apparatus is connect with front end wireless aps, detects and whether there is DHCP service in the LAN Device;
If Dynamic Host Configuration Protocol server is not present in the LAN, the Dynamic Host Configuration Protocol server of this wireless relay apparatus is opened to provide IP address dynamically distributes service;
If there are Dynamic Host Configuration Protocol server in the LAN, the Dynamic Host Configuration Protocol server of this wireless relay apparatus is closed, and from institute It states already present Dynamic Host Configuration Protocol server in LAN and obtains corresponding IP address.
Further, whether described this wireless relay apparatus of detection connect with front end wireless aps, specifically includes:
The interface provided from wireless driving by network testing mechanism obtains connection state information;
Judge whether this wireless relay apparatus connect with front end wireless aps according to the connection state information of acquisition.
Further, the method further includes:
When the Dynamic Host Configuration Protocol server for opening this wireless relay apparatus dynamically distributes service to provide IP address, by restarting this The wireline equipment and wireless device that wireline interface and the wireless interface notice of wireless relay apparatus are connect with this wireless device are again Obtain IP address.
Further, the Dynamic Host Configuration Protocol server of this wireless relay apparatus provides IP address by following steps and dynamically distributes clothes Business:
When receiving the probe messages that any wireline equipment being connect with this wireless relay apparatus or wireless device are sent, Corresponding detection, which is generated, according to IP address currently available in the Dynamic Host Configuration Protocol server of this wireless relay apparatus replys message;
By the detection reply message be sent to the wireline equipment or the wireless device so that the wireline equipment or The wireless device replys the IP address described in message according to the detection received and returns to corresponding request message;
Generate corresponding request confirmation message according to the request message that receives, and be sent to the wireline equipment or The wireless device.
Further, by following steps, the already present Dynamic Host Configuration Protocol server from the LAN obtains this wireless relay apparatus Take corresponding IP address:
Probe messages are sent to the already present Dynamic Host Configuration Protocol server so that the already present Dynamic Host Configuration Protocol server is receiving When to the probe messages, detected back accordingly according to IP address return currently available in the already present Dynamic Host Configuration Protocol server Multiple message;
The IP address described in message, which is replied, according to the detection received generates corresponding request message;
The request message is sent to the already present Dynamic Host Configuration Protocol server so that the already present Dynamic Host Configuration Protocol server Corresponding request confirmation message is returned according to the request message received;
Confirm that the IP address obtains successfully according to the request confirmation message received.
Further, the method further includes:
When Dynamic Host Configuration Protocol server is not present in the LAN, the Dynamic Host Configuration Protocol server of this wireless relay apparatus is opened to provide IP When address dynamically distributes service, continuation, which periodically detects, whether there is Dynamic Host Configuration Protocol server in the LAN.
In order to solve the above-mentioned technical problem, the embodiment of the present invention additionally provides a kind of IP address dynamic allocation device, described In each wireless relay apparatus of device setting in a local network, including:
Network detection module, detects whether this wireless relay apparatus connect with front end wireless aps;
First execution module, for when this wireless relay apparatus is not connected with front end wireless aps, opening this wireless relay The Dynamic Host Configuration Protocol server of equipment dynamically distributes service to provide IP address;
Dynamic Host Configuration Protocol server detecting module, for when this wireless relay apparatus is connect with front end wireless aps, detecting the office It whether there is Dynamic Host Configuration Protocol server in the net of domain;
Second execution module opens this wireless relay apparatus if for Dynamic Host Configuration Protocol server to be not present in the LAN Dynamic Host Configuration Protocol server with provide IP address dynamically distribute service;And
Third execution module closes this wireless relay apparatus if for there are Dynamic Host Configuration Protocol server in the LAN Dynamic Host Configuration Protocol server, and already present Dynamic Host Configuration Protocol server obtains corresponding IP address from the LAN.
In order to solve the above-mentioned technical problem, the embodiment of the present invention additionally provides a kind of computer storage media, the calculating Machine storage medium includes the computer program of storage;Wherein, the computer program controls the computer storage at runtime Equipment where medium executes IP address dynamic allocation method described in any one of the above embodiments.
In order to solve the above-mentioned technical problem, the embodiment of the present invention additionally provides a kind of wireless relay apparatus, including processor, Memory and it is stored in the memory and is configured as the computer program executed by the processor, the processor IP address dynamic allocation method described in any one of the above embodiments is realized when executing the computer program.
Compared with prior art, an embodiment of the present invention provides a kind of IP address dynamic allocation method, device and computers Storage medium, wireless relay apparatus open wireless relay apparatus when wireless relay apparatus and not connected front end wireless aps Dynamic Host Configuration Protocol server dynamically distributes service to provide IP address;When wireless relay apparatus is connect with front end wireless aps, local is detected Whether Dynamic Host Configuration Protocol server is had existed in net, if being not present, opens the Dynamic Host Configuration Protocol server of wireless relay apparatus with providing IP Location dynamically distributes service, and if it exists, then IP address is obtained from already existing Dynamic Host Configuration Protocol server, so as to improve wireless relay The ease for use of equipment, and effectively reduce the Network Abnormal generated by user's misconfiguration.
Description of the drawings
Fig. 1 is a kind of flow chart of a preferred embodiment of IP address dynamic allocation method provided by the invention;
Fig. 2 is that the Dynamic Host Configuration Protocol server of wireless relay apparatus provided by the invention provides one that IP address dynamically distributes service The particular flow sheet of preferred embodiment;
Fig. 3 is that wireless relay apparatus provided by the invention already present Dynamic Host Configuration Protocol server from LAN obtains corresponding IP The particular flow sheet of one preferred embodiment of address;
Fig. 4 is a kind of usage scenario figure of IP address dynamic allocation method provided by the invention;
Fig. 5 is the structure diagram for the preferred embodiment that a kind of IP address provided by the invention dynamically distributes device;
Fig. 6 is a kind of structure diagram of a preferred embodiment of wireless relay apparatus provided by the invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained all without creative efforts Other embodiment shall fall within the protection scope of the present invention.
It is shown in Figure 1, it is a kind of stream of a preferred embodiment of IP address dynamic allocation method provided by the invention Cheng Tu, the method are executed respectively by each wireless relay apparatus in LAN, including step S11 to step S15:
Step S11, detect whether this wireless relay apparatus connect with front end wireless aps;
Step S12, when this wireless relay apparatus and not connected front end wireless aps, the DHCP of this wireless relay apparatus is opened Server dynamically distributes service to provide IP address;
Step S13, it when this wireless relay apparatus is connect with front end wireless aps, detects and whether there is in the LAN Dynamic Host Configuration Protocol server;
If Dynamic Host Configuration Protocol server is not present in step S14, the described LAN, the DHCP service of this wireless relay apparatus is opened Device dynamically distributes service to provide IP address;
If there are Dynamic Host Configuration Protocol server in step S15, the described LAN, the DHCP service of this wireless relay apparatus is closed Device, and already present Dynamic Host Configuration Protocol server obtains corresponding IP address from the LAN.
When the network connection state of this wireless relay apparatus changes, for example, there is new rear end equipment to be connected to this In wireless relay apparatus, this wireless relay apparatus and front end wireless aps from connect become being not connected to or this wireless relay apparatus with Front end wireless aps are then connected in this wireless relay apparatus, and IP address acquisition modes are configured from being not connected to become connecting To obtain IP address automatically, rather than the equipment of static ip address needs to reacquire IP address, i.e., the DHCP clothes in LAN Business device needs to provide IP address dynamic allocation service.
Specifically, the connection status between this wireless relay apparatus and front end wireless aps is detected, in detecting that this is wireless When not connecting (or this wireless relay apparatus and front end wireless aps from connect become being not connected to) after equipment and front end wireless aps, The equipment that this wireless relay apparatus opens the Dynamic Host Configuration Protocol server of itself to be connect with this wireless relay apparatus provides IP address dynamic Distribution service;When detecting that this wireless relay apparatus is connect with front end wireless aps, needs to detect and whether deposited in LAN In Dynamic Host Configuration Protocol server, if Dynamic Host Configuration Protocol server is not present in LAN, this wireless relay apparatus opens the DHCP service of itself Device provides IP address dynamic allocation service for the equipment being connect with this wireless relay apparatus;If having existed DHCP in LAN Server, then this wireless relay apparatus closes the Dynamic Host Configuration Protocol server of itself, and is reacquired from already existing Dynamic Host Configuration Protocol server The IP address of itself provides IP address by already existing Dynamic Host Configuration Protocol server and dynamically distributes service, set with this wireless relay The equipment of standby connection similarly reacquires corresponding IP address from already existing Dynamic Host Configuration Protocol server.
It should be noted that the IP address acquisition modes of this wireless relay apparatus are configured as obtaining IP address automatically, because This is also required to reacquire IP address.
A kind of IP address dynamic allocation method that the embodiment of the present invention is provided, when the network connection of this wireless relay apparatus When state changes, by judging in connection status and LAN between this wireless relay apparatus and front end wireless aps The existence of Dynamic Host Configuration Protocol server decides whether to open the Dynamic Host Configuration Protocol server of this wireless relay apparatus, without carrying out manual configuration behaviour Make, and ensure that the uniqueness of Dynamic Host Configuration Protocol server in LAN, realize Dynamic Host Configuration Protocol server dynamic detection and configuration and The flexible allocation of IP address to improve the ease for use of wireless relay apparatus, while effectively reducing due to user's misconfiguration The Network Abnormal of generation.
In a further advantageous embodiment, whether described this wireless relay apparatus of detection connect with front end wireless aps, specifically Including:
The interface provided from wireless driving by network testing mechanism obtains connection state information;
Judge whether this wireless relay apparatus connect with front end wireless aps according to the connection state information of acquisition.
The connection procedure of this wireless relay apparatus and front end wireless aps is by wirelessly driving completion, this wireless relay apparatus is with before After holding wireless aps successful connection, wireless driving can record corresponding connection state information, and upper procedure can be by wirelessly driving The interface of offer obtains the connection state information, i.e., the interface that can be provided from wireless driving by network testing mechanism obtains should Connection state information, to judge the connection status of this wireless relay apparatus and front end wireless aps according to the connection state information.
In another preferred embodiment, the method further includes:
When the Dynamic Host Configuration Protocol server for opening this wireless relay apparatus dynamically distributes service to provide IP address, by restarting this The wireline equipment and wireless device that wireline interface and the wireless interface notice of wireless relay apparatus are connect with this wireless device are again Obtain IP address.
It should be noted that the equipment being connected in wireless relay apparatus generally has two kinds of wireline equipment and wireless device, Wireline equipment refers to the equipment being connected to by cable on wireless relay apparatus wireline interface, such as PC machine, what wireless device referred to It is the equipment being connected to by wifi agreements in wireless relay apparatus, therefore, when this wireless relay apparatus opens Dynamic Host Configuration Protocol server It, can be leading to by way of the wireline interface and wireless interface of restarting this wireless relay apparatus when IP address dynamic allocation service is provided Know that the wireline equipment being connect with this wireless device and wireless device reacquire IP address.
In addition, working as this wireless relay apparatus already existing Dynamic Host Configuration Protocol server from LAN with reacquiring the IP of itself It, also can be notifying to connect with this wireless device by way of the wireline interface and wireless interface of restarting this wireless relay apparatus when location Wireline equipment and wireless device reacquire corresponding IP address from already existing Dynamic Host Configuration Protocol server.
It is shown in Figure 2, it is that the Dynamic Host Configuration Protocol server of wireless relay apparatus provided by the invention provides IP address dynamic allocation The particular flow sheet of one preferred embodiment of service, the Dynamic Host Configuration Protocol server of this wireless relay apparatus pass through step S101 to step S103 provides IP address and dynamically distributes service:
Step S101, when the spy for receiving any wireline equipment being connect with this wireless relay apparatus or wireless device transmission When observing and predicting text, corresponding detection is generated according to IP address currently available in the Dynamic Host Configuration Protocol server of this wireless relay apparatus and replys report Text;
Step S102, detection reply message is sent to the wireline equipment or the wireless device so that described Wireline equipment or the wireless device are replied the IP address described in message according to the detection received and are returned accordingly Request message;
Step S103, corresponding request confirmation message is generated according to the request message received, and be sent to described Wireline equipment or the wireless device.
Specifically, the DHCP standard agreements of the Dynamic Host Configuration Protocol server operation standard of this wireless relay apparatus, are monitored in LAN Other equipment send DHCP Discover probe messages, have when receiving some being connect with this wireless relay apparatus When the DHCP Discover probe messages that line equipment or wireless device are sent, corresponding DHCP Offer detections can be replied and replied Message, DHCP Offer detections reply in the Dynamic Host Configuration Protocol server for having recorded this wireless relay apparatus in message it is currently available not An assigned IP address, above-mentioned wireline equipment or wireless device reply message according to the DHCP Offer detections received, The above-mentioned IP address of DHCP Request request message acquisition requests, this nothing can be sent to the Dynamic Host Configuration Protocol server of this wireless relay apparatus The Dynamic Host Configuration Protocol server of line trunking can reply corresponding DHCP Ack requests after receiving the DHCP Request request messages Confirmation message illustrates above-mentioned IP if above-mentioned wireline equipment or wireless device receive the DHCP Ack request confirmation messages Address is successfully allocated to above-mentioned wireline equipment or wireless device.
It is shown in Figure 3, it is that wireless relay apparatus provided by the invention already present Dynamic Host Configuration Protocol server from LAN obtains The particular flow sheet of a preferred embodiment of corresponding IP address, this wireless relay apparatus is taken to pass through step S201 to step S204 already present Dynamic Host Configuration Protocol server from the LAN obtains corresponding IP address:
Step S201, probe messages are sent to the already present Dynamic Host Configuration Protocol server so that the already present DHCP clothes Device be engaged in when receiving the probe messages, phase is returned to according to IP address currently available in the already present Dynamic Host Configuration Protocol server Message is replied in the detection answered;
Step S202, the IP address described in message is replied according to the detection received and generates corresponding request Message;
Step S203, the request message is sent to the already present Dynamic Host Configuration Protocol server so that described already present Dynamic Host Configuration Protocol server returns to corresponding request confirmation message according to the request message received;
Step S204, confirm that the IP address obtains successfully according to the request confirmation message received.
Specifically, the DHCP standard agreements of this wireless relay apparatus operation standard, periodically send DHCP Discover detections Message can reply corresponding DHCP when already existing Dynamic Host Configuration Protocol server receives the DHCP Discover probe messages Message is replied in Offer detections, which replys has recorded in already existing Dynamic Host Configuration Protocol server currently in message An available unassigned IP address, this wireless relay apparatus reply message according to the DHCP Offer detections received, The above-mentioned IP address of DHCP Request request message acquisition requests can be sent to already existing Dynamic Host Configuration Protocol server, it is already existing Dynamic Host Configuration Protocol server can reply corresponding DHCP Ack request confirmation messages after receiving the DHCP Request request messages, if This wireless relay apparatus receives the DHCP Ack request confirmation messages, illustrates this wireless relay apparatus with successfully obtaining above-mentioned IP Location.
In another preferred embodiment, the method further includes:
When Dynamic Host Configuration Protocol server is not present in the LAN, the Dynamic Host Configuration Protocol server of this wireless relay apparatus is opened to provide IP When address dynamically distributes service, continuation, which periodically detects, whether there is Dynamic Host Configuration Protocol server in the LAN.
The present embodiment open this wireless relay apparatus Dynamic Host Configuration Protocol server provide IP address dynamically distribute service while, It whether there is Dynamic Host Configuration Protocol server in the detection LAN of hold period, the Dynamic Host Configuration Protocol server for occurring new in LAN can be prevented And output conflict.
It is shown in Figure 4, it is a kind of usage scenario figure of IP address dynamic allocation method provided by the invention, front end in figure Wireless aps and cascade 1~wireless relay apparatus of wireless relay apparatus N are in the same LAN, front end wireless aps with Internet connections, illustrate by taking wireless relay apparatus 1 as an example here, other situations are similarly.
When wireless relay apparatus 1 is not connect with front end wireless aps, wireless relay apparatus 1 opens the DHCP service of itself Device provides IP address and dynamically distributes service.
When wireless relay apparatus 1 is connect with front end wireless aps, wireless relay apparatus 1 periodically sends DHCP Discover Probe messages are to detect in LAN whether have existed Dynamic Host Configuration Protocol server, if (the root in pre-set timeout period It is configured according to actual needs) corresponding DHCP Offer detections reply message is not received, illustrate to be not present in LAN Dynamic Host Configuration Protocol server, then the Dynamic Host Configuration Protocol server offer IP address of the unlatching of wireless relay apparatus 1 itself, which dynamically distributes, services;If pre- Corresponding DHCP Offer detections are received in the timeout period being first arranged and reply message, illustrate to have existed in LAN Dynamic Host Configuration Protocol server is simultaneously in open state, such as the Dynamic Host Configuration Protocol server of front end wireless aps is opened, then wireless relay apparatus 1 is closed certainly The Dynamic Host Configuration Protocol server of body obtains IP address from the Dynamic Host Configuration Protocol server of front end wireless aps.
It should be noted that when wireless relay apparatus 1 is connect with front end wireless aps, if the DHCP clothes of front end wireless aps Business device is opened, then closes the Dynamic Host Configuration Protocol server of 1~wireless relay apparatus of wireless relay apparatus N in LAN, and wireless relay 1~wireless relay apparatus of equipment N obtains corresponding IP address from the Dynamic Host Configuration Protocol server of front end wireless aps;If front end wireless aps Dynamic Host Configuration Protocol server close, since 1~wireless relay apparatus of wireless relay apparatus N can periodically detect DHCP in LAN The existence of server, if wireless relay apparatus 2 does not receive in pre-set timeout period accordingly first Message is replied in detection, then wireless relay apparatus 2 opens the Dynamic Host Configuration Protocol server of itself and provides IP address dynamic allocation service, and replys Other wireless relay apparatus send probe messages, at this time other wireless relay apparatus according to receive detection reply message just Know and have existed Dynamic Host Configuration Protocol server in LAN and be in open state, so other wireless relay apparatus close itself Dynamic Host Configuration Protocol server.
It is shown in Figure 5, it is the knot for the preferred embodiment that a kind of IP address provided by the invention dynamically distributes device Structure block diagram, described device are arranged in each wireless relay apparatus in a local network, including:
Network detection module 11, detects whether this wireless relay apparatus connect with front end wireless aps;
First execution module 12 is used for when this wireless relay apparatus and not connected front end wireless aps, in opening this wirelessly After the Dynamic Host Configuration Protocol server of equipment service is dynamically distributed to provide IP address;
Dynamic Host Configuration Protocol server detecting module 13 is used for when this wireless relay apparatus is connect with front end wireless aps, described in detection It whether there is Dynamic Host Configuration Protocol server in LAN;
Second execution module 14 is opened this wireless relay and is set if for Dynamic Host Configuration Protocol server to be not present in the LAN Standby Dynamic Host Configuration Protocol server dynamically distributes service to provide IP address;And
Third execution module 15 closes this wireless relay apparatus if for there are Dynamic Host Configuration Protocol server in the LAN Dynamic Host Configuration Protocol server, and already present Dynamic Host Configuration Protocol server obtains corresponding IP address from the LAN.
Preferably, the network detection module 11 specifically includes:
Connection status acquiring unit, the interface for being provided from wireless driving by network testing mechanism obtain connection status Information;
Connection status judging unit, for according to the connection state information of acquisition judge this wireless relay apparatus and front end without Whether line AP connects.
Preferably, described device further includes:
Interface restarts module, for when the Dynamic Host Configuration Protocol server for opening this wireless relay apparatus is to provide IP address dynamic allocation When service, wired set by what the wireline interface and wireless interface notice of restarting this wireless relay apparatus were connect with this wireless device Standby and wireless device reacquires IP address.
Preferably, the Dynamic Host Configuration Protocol server of this wireless relay apparatus provides IP address by following steps and dynamically distributes service:
When receiving the probe messages that any wireline equipment being connect with this wireless relay apparatus or wireless device are sent, Corresponding detection, which is generated, according to IP address currently available in the Dynamic Host Configuration Protocol server of this wireless relay apparatus replys message;
By the detection reply message be sent to the wireline equipment or the wireless device so that the wireline equipment or The wireless device replys the IP address described in message according to the detection received and returns to corresponding request message;
Generate corresponding request confirmation message according to the request message that receives, and be sent to the wireline equipment or The wireless device.
Preferably, by following steps, the already present Dynamic Host Configuration Protocol server from the LAN obtains this wireless relay apparatus Corresponding IP address:
Probe messages are sent to the already present Dynamic Host Configuration Protocol server so that the already present Dynamic Host Configuration Protocol server is receiving When to the probe messages, detected back accordingly according to IP address return currently available in the already present Dynamic Host Configuration Protocol server Multiple message;
The IP address described in message, which is replied, according to the detection received generates corresponding request message;
The request message is sent to the already present Dynamic Host Configuration Protocol server so that the already present Dynamic Host Configuration Protocol server Corresponding request confirmation message is returned according to the request message received;
Confirm that the IP address obtains successfully according to the request confirmation message received.
Preferably, described device further includes:
4th execution module, for when Dynamic Host Configuration Protocol server is not present in the LAN, opening this wireless relay apparatus When Dynamic Host Configuration Protocol server dynamically distributes service to provide IP address, continuation, which periodically detects, whether there is DHCP in the LAN Server.
It should be noted that the effect that above-mentioned IP address dynamically distributes device can be detected by the network on equipment platform Mechanism, open source software module udhcpd modules and open source software module udhcpc modules are realized, specifically, can pass through net Network testing mechanism detects the connection status of wireless relay apparatus and front end wireless aps, the DHCP marks of udhcpd module operation standards Quasi- agreement, the Dynamic Host Configuration Protocol server as wireless relay apparatus can be used for providing IP address when opening and dynamically distribute service, The DHCP standard agreements of udhcpc module operation standards, the dhcp client as wireless relay apparatus can be used for when opening The existence of Dynamic Host Configuration Protocol server periodically in detection LAN, and when detecting successfully from already existing DHCP service Device dynamic access IP address.
A kind of IP address that the embodiment of the present invention is provided dynamically distributes device, can realize in any of the above-described embodiment All flows of IP address dynamic allocation method, the technique effect point of effect and the realization of modules and unit in device It is corresponding not identical as the technique effect of effect and the realization of the IP address dynamic allocation method in above-described embodiment, here no longer It repeats.
The embodiment of the present invention additionally provides a kind of computer storage media, and the computer storage media includes the meter of storage Calculation machine program;Wherein, the equipment where the computer program controls the computer storage media at runtime executes above-mentioned IP address dynamic allocation method described in any embodiment.
The embodiment of the present invention additionally provides a kind of wireless relay apparatus, shown in Figure 6, is a kind of nothing provided by the invention The structure diagram of one preferred embodiment of line trunking, including processor 10, memory 20 and it is stored in the storage In device 20 and it is configured as the computer program executed by the processor 10, the processor 10 is executing the computer journey The IP address dynamic allocation method described in any of the above-described embodiment is realized when sequence.
Preferably, the computer program can be divided into one or more module/units (such as computer program 1, meter Calculation machine program 2), one or more of module/units are stored in the memory 20, and by The processor 10 executes, to complete the present invention.One or more of module/units can complete specific function Series of computation machine program instruction section, the instruction segment is for describing the computer program holding in the wireless relay apparatus Row process.
The processor 10 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc., general processor can be microprocessor or the processor 10 can also be any conventional place Device is managed, the processor 10 is the control centre of the wireless relay apparatus, using wireless described in various interfaces and connection The various pieces of trunking.
The memory 20 includes mainly program storage area and data storage area, wherein program storage area can store operation Application program etc. needed for system, at least one function, data storage area can store related data etc..In addition, the memory 20 can be high-speed random access memory, can also be nonvolatile memory, such as plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card and flash card (Flash Card) etc., or The memory 20 can also be other volatile solid-state parts.
It should be noted that above-mentioned wireless relay apparatus may include, but it is not limited only to, processor, memory, this field skill Art personnel are appreciated that Fig. 6 structure diagrams are only the example of wireless relay apparatus, do not constitute the limit to wireless relay apparatus It is fixed, may include either combining certain components or different components than illustrating more or fewer components.
A kind of IP address dynamic allocation method, device and computer storage media that sum up, the embodiment of the present invention is provided, Wireless relay apparatus, when the network connection state of this wireless relay apparatus changes, by judging this wireless relay apparatus The existence of Dynamic Host Configuration Protocol server decides whether to open originally wireless in connection status and LAN between the wireless aps of front end The Dynamic Host Configuration Protocol server of trunking without carrying out manual configuration operation, and ensure that the unique of Dynamic Host Configuration Protocol server in LAN Property, the dynamic detection and the flexible allocation of configuration and IP address of Dynamic Host Configuration Protocol server are realized, is set to improve wireless relay Standby ease for use, while effectively reducing the Network Abnormal generated by user's misconfiguration.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, without departing from the technical principles of the invention, several improvement and deformations can also be made, these improvement and deformations Also it should be regarded as protection scope of the present invention.

Claims (9)

1. a kind of IP address dynamic allocation method, which is characterized in that the method is by each wireless relay apparatus in LAN It executes respectively, including:
Detect whether this wireless relay apparatus connect with front end wireless aps;
When this wireless relay apparatus and not connected front end wireless aps, the Dynamic Host Configuration Protocol server of this wireless relay apparatus is opened to provide IP address dynamically distributes service;
When this wireless relay apparatus is connect with front end wireless aps, detects and whether there is Dynamic Host Configuration Protocol server in the LAN;
If Dynamic Host Configuration Protocol server is not present in the LAN, the Dynamic Host Configuration Protocol server of this wireless relay apparatus is opened with providing IP Location dynamically distributes service;
If there are Dynamic Host Configuration Protocol server in the LAN, the Dynamic Host Configuration Protocol server of this wireless relay apparatus is closed, and from the office Already present Dynamic Host Configuration Protocol server obtains corresponding IP address in the net of domain.
2. IP address dynamic allocation method as described in claim 1, which is characterized in that described this wireless relay apparatus of detection with Whether front end wireless aps connect, and specifically include:
The interface provided from wireless driving by network testing mechanism obtains connection state information;
Judge whether this wireless relay apparatus connect with front end wireless aps according to the connection state information of acquisition.
3. IP address dynamic allocation method as described in claim 1, which is characterized in that the method further includes:
It is wireless by restarting this when the Dynamic Host Configuration Protocol server for opening this wireless relay apparatus dynamically distributes service to provide IP address The wireline equipment and wireless device that wireline interface and the wireless interface notice of trunking are connect with this wireless device reacquire IP address.
4. IP address dynamic allocation method as described in claim 1, which is characterized in that the DHCP service of this wireless relay apparatus Device provides IP address by following steps and dynamically distributes service:
When receiving the probe messages that any wireline equipment being connect with this wireless relay apparatus or wireless device are sent, according to Currently available IP address generates corresponding detection and replys message in the Dynamic Host Configuration Protocol server of this wireless relay apparatus;
Detection reply message is sent to the wireline equipment or the wireless device so that the wireline equipment is described Wireless device replys the IP address described in message according to the detection received and returns to corresponding request message;
Corresponding request confirmation message is generated according to the request message received, and is sent to the wireline equipment or described Wireless device.
5. IP address dynamic allocation method as described in claim 1, which is characterized in that this wireless relay apparatus passes through following step Suddenly already present Dynamic Host Configuration Protocol server obtains corresponding IP address from the LAN:
Probe messages are sent to the already present Dynamic Host Configuration Protocol server so that the already present Dynamic Host Configuration Protocol server is receiving When stating probe messages, corresponding detection is returned to according to IP address currently available in the already present Dynamic Host Configuration Protocol server and replys report Text;
The IP address described in message, which is replied, according to the detection received generates corresponding request message;
The request message is sent to the already present Dynamic Host Configuration Protocol server so that the already present Dynamic Host Configuration Protocol server according to The request message received returns to corresponding request confirmation message;
Confirm that the IP address obtains successfully according to the request confirmation message received.
6. IP address dynamic allocation method as described in claim 1, which is characterized in that the method further includes:
When Dynamic Host Configuration Protocol server is not present in the LAN, the Dynamic Host Configuration Protocol server of this wireless relay apparatus is opened to provide IP address When dynamically distributing service, continuation, which periodically detects, whether there is Dynamic Host Configuration Protocol server in the LAN.
7. a kind of IP address dynamically distributes device, which is characterized in that each wireless relay of described device setting in a local network In equipment, including:
Network detection module, detects whether this wireless relay apparatus connect with front end wireless aps;
First execution module, for when this wireless relay apparatus is not connected with front end wireless aps, opening this wireless relay apparatus Dynamic Host Configuration Protocol server with provide IP address dynamically distribute service;
Dynamic Host Configuration Protocol server detecting module, for when this wireless relay apparatus is connect with front end wireless aps, detecting the LAN In whether there is Dynamic Host Configuration Protocol server;
Second execution module opens this wireless relay apparatus if for Dynamic Host Configuration Protocol server to be not present in the LAN Dynamic Host Configuration Protocol server dynamically distributes service to provide IP address;And
Third execution module closes the DHCP of this wireless relay apparatus if for there are Dynamic Host Configuration Protocol server in the LAN Server, and already present Dynamic Host Configuration Protocol server obtains corresponding IP address from the LAN.
8. a kind of computer storage media, which is characterized in that the computer storage media includes the computer program of storage;Its In, the equipment where the computer program controls the computer storage media at runtime is executed as in claim 1 to 6 Any one of them IP address dynamic allocation method.
9. a kind of wireless relay apparatus, which is characterized in that including processor, memory and be stored in the memory and by It is configured to the computer program executed by the processor, the processor realizes such as right when executing the computer program It is required that the IP address dynamic allocation method described in any one of 1 to 6.
CN201810335789.4A 2018-04-13 2018-04-13 IP address dynamic allocation method, device and storage medium, wireless relay apparatus Pending CN108650336A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810335789.4A CN108650336A (en) 2018-04-13 2018-04-13 IP address dynamic allocation method, device and storage medium, wireless relay apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810335789.4A CN108650336A (en) 2018-04-13 2018-04-13 IP address dynamic allocation method, device and storage medium, wireless relay apparatus

Publications (1)

Publication Number Publication Date
CN108650336A true CN108650336A (en) 2018-10-12

Family

ID=63746240

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810335789.4A Pending CN108650336A (en) 2018-04-13 2018-04-13 IP address dynamic allocation method, device and storage medium, wireless relay apparatus

Country Status (1)

Country Link
CN (1) CN108650336A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109981822A (en) * 2019-04-26 2019-07-05 武汉思创易控科技有限公司 Alternative address distribution method, storage medium and terminal based on DHCP detection
CN112152930A (en) * 2020-09-24 2020-12-29 上海安杰环保科技股份有限公司 Routing device, method, instrument and medium with automatic DHCP (dynamic host configuration protocol) identification function
CN115348237A (en) * 2022-08-04 2022-11-15 广西电网有限责任公司百色供电局 IP address configuration method and AP equipment
CN115550967A (en) * 2022-08-25 2022-12-30 深圳市格林科数码有限公司 Connection mode switching method and device based on wireless repeater
US11729141B2 (en) 2019-09-16 2023-08-15 Zhejiang Dahua Technology Co., Ltd. Network connection systems and methods and network access devices

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1859445A (en) * 2006-03-15 2006-11-08 华为技术有限公司 Mobile terminal IP address distributing method
CN102143509A (en) * 2010-12-16 2011-08-03 华为终端有限公司 Method, device and system for managing wireless repeater by using access point (AP)
CN102523628A (en) * 2011-12-23 2012-06-27 华为终端有限公司 Wireless relay equipment and relaying method thereof
CN102651707A (en) * 2012-04-16 2012-08-29 深圳市共进电子股份有限公司 Automatic configuration method of wireless bridge
US20130080614A1 (en) * 2011-09-27 2013-03-28 Pradeep Iyer Client Aware DHCP Lease Management
CN107547668A (en) * 2016-06-24 2018-01-05 南京中兴软件有限责任公司 Message processing method and device, Dynamic Host Configuration Protocol server

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1859445A (en) * 2006-03-15 2006-11-08 华为技术有限公司 Mobile terminal IP address distributing method
CN102143509A (en) * 2010-12-16 2011-08-03 华为终端有限公司 Method, device and system for managing wireless repeater by using access point (AP)
US20130080614A1 (en) * 2011-09-27 2013-03-28 Pradeep Iyer Client Aware DHCP Lease Management
CN102523628A (en) * 2011-12-23 2012-06-27 华为终端有限公司 Wireless relay equipment and relaying method thereof
CN102651707A (en) * 2012-04-16 2012-08-29 深圳市共进电子股份有限公司 Automatic configuration method of wireless bridge
CN107547668A (en) * 2016-06-24 2018-01-05 南京中兴软件有限责任公司 Message processing method and device, Dynamic Host Configuration Protocol server

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109981822A (en) * 2019-04-26 2019-07-05 武汉思创易控科技有限公司 Alternative address distribution method, storage medium and terminal based on DHCP detection
CN109981822B (en) * 2019-04-26 2022-01-25 武汉思创易控科技有限公司 Alternative address allocation method based on DHCP detection, storage medium and terminal
US11729141B2 (en) 2019-09-16 2023-08-15 Zhejiang Dahua Technology Co., Ltd. Network connection systems and methods and network access devices
CN112152930A (en) * 2020-09-24 2020-12-29 上海安杰环保科技股份有限公司 Routing device, method, instrument and medium with automatic DHCP (dynamic host configuration protocol) identification function
CN115348237A (en) * 2022-08-04 2022-11-15 广西电网有限责任公司百色供电局 IP address configuration method and AP equipment
CN115550967A (en) * 2022-08-25 2022-12-30 深圳市格林科数码有限公司 Connection mode switching method and device based on wireless repeater

Similar Documents

Publication Publication Date Title
CN108650336A (en) IP address dynamic allocation method, device and storage medium, wireless relay apparatus
CN105430108B (en) Test environment access method and proxy server
CN101159714B (en) Instant communication method and device
US9503957B2 (en) Low cost mesh network capability
US20100228843A1 (en) Element management system in wireless communication network
EP2169877A1 (en) Processing method and device for qinq termination configuration
CN106101171B (en) Server connection method and device
CN104993998A (en) Enterprise-level safety instant messaging system supporting cloud deploying and method
CN101485141B (en) Method and system for two-phase mechanism for discovering web services based on management service
CN106100939B (en) The network equipment starts time test method and test console
CN107547665A (en) A kind of method, equipment and the system of dhcp address distribution
CN105704256B (en) A kind of IP address management methods, devices and systems
CN103109497B (en) For measuring the dynamic-configuration of the interconnect equipment of net neutral energy characteristic
CN107613023B (en) Equipment connection method and device
CN103716230A (en) Message sending method, device and server
CN108989130B (en) Network fault reporting method and device
WO2020253626A1 (en) Method, device, equipment for determining edge application, and storage medium
CN105490829A (en) Message transmission control methods and apparatuses, and network functions virtualization system
CN109005122B (en) Message sending method and device and network equipment
CN101088266A (en) Network interface with remote control functionality
CN104580547A (en) IP (internet protocol) configuration method and device for Linux operation system
CN102158432A (en) Telecom operator network middleware device prior to being embedded to terminal operating system
CN104902497B (en) A kind of method and device of managing mobile phone hot spot connection
CN114710485A (en) Processing method and processing apparatus
CN111193794A (en) File transmission method and device, computer equipment and storage medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181012