CN105407184A - Initial configuration method and device in equipment - Google Patents

Initial configuration method and device in equipment Download PDF

Info

Publication number
CN105407184A
CN105407184A CN201510740557.3A CN201510740557A CN105407184A CN 105407184 A CN105407184 A CN 105407184A CN 201510740557 A CN201510740557 A CN 201510740557A CN 105407184 A CN105407184 A CN 105407184A
Authority
CN
China
Prior art keywords
address
terminal
equipment
configuration
described terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510740557.3A
Other languages
Chinese (zh)
Other versions
CN105407184B (en
Inventor
陈熹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Star Net Ruijie Networks Co Ltd
Original Assignee
Beijing Star Net Ruijie Networks 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 Beijing Star Net Ruijie Networks Co Ltd filed Critical Beijing Star Net Ruijie Networks Co Ltd
Priority to CN201510740557.3A priority Critical patent/CN105407184B/en
Publication of CN105407184A publication Critical patent/CN105407184A/en
Application granted granted Critical
Publication of CN105407184B publication Critical patent/CN105407184B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0806Configuration setting for initial configuration or provisioning, e.g. plug-and-play
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/59Network arrangements, protocols or services for addressing or naming using proxies for addressing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to the field of communication, and discloses an initial configuration method and device in equipment. The method comprises the steps that an address analysis protocol ARP proxy is turned on under the initial configuration state; when an ARP request transmitted by a terminal is received, the media access control MAC address of the equipment acts as a gateway MAC address by utilizing the ARP proxy, and the MAC address of the equipment is replied to the terminal via an ARP response message; after the message transmitted by the terminal is received, connection with the terminal is established, a configuration webpage is transmitted to the terminal, and configuration information inputted to the configuration webpage is received; and initial configuration is performed by utilizing the configuration information, and the ARP proxy is turned off after initial configuration is completed. The limitation of the acquisition mode of the IP address in the terminal can be avoided so that initial configuration efficiency can be enhanced.

Description

Method and the device of initial configuration is carried out in equipment
Technical field
The present invention relates to the communications field, particularly, relate to the method and device of in a kind of equipment, carrying out initial configuration.
Background technology
Equipment, after dispatching from the factory, when initially using, needs to be configured, i.e. initial configuration.In prior art, provide CLI (Command Line Interface, CommandLineInterface) as the operation interface of equipment in a device, equipment is configured.Adopt CLI to be configured, require that operating personnel grasp various configuration order, add the difficulty of configuration.Therefore, further provide the image conversion subscriber administration interface based on WEB (webpage) in prior art, by this WEB interface, equipment is configured.
In the prior art, equipment, when dispatching from the factory, configures default ip address, such as a 192.168.1.1 to specified interface, and terminal accesses the WEB interface of equipment by this IP address, the configuration of finishing equipment.Wherein, terminal is needed to adopt the pattern automatically obtaining IP address, namely by DHCP (DynamicHostConfigurationProtocol, DHCP) obtain IP address, and in the IP address of web browser input equipment, such as 192.168.1.1, just can have access to the WEB interface of equipment.
When terminal is not when adopting the pattern automatically obtaining IP address, such as use static ip address pattern access communications equipment, if the static ip address network segment is different with communication equipment IP address network segment, then terminal cannot and devices communicating, and then initial configuration cannot be carried out by the WEB interface of equipment.
Summary of the invention
The object of this invention is to provide the method and device of in a kind of equipment, carrying out initial configuration, in order to solve the problems of the technologies described above, solve the problems of the technologies described above at least in part.
To achieve these goals, the invention provides a kind of method of carrying out initial configuration in equipment, the method comprises:
Under initial configuration state, open ARP agency; When receiving the ARP request that terminal sends, utilizing ARP proxy using the MAC address of described equipment as gateway MAC address, by arp reply message, the MAC Address of equipment being replied to described terminal; After receiving the message of described terminal transmission, connect with described terminal, configuration webpage is sent to described terminal, and receive the configuration information inputted in configuration webpage; Utilize described configuration information to carry out initial configuration, after completing initial configuration, close ARP proxy.
Preferably, described method also comprises: under initial configuration state, opens address resolution DNS proxy; Before described and described terminal connects, described method also comprises: when receiving the DNS request that terminal sends, utilize DNS proxy using the IP address of described equipment as IP address corresponding to domain name in DNS request, by DNS response message, the IP address of equipment is replied to described terminal; Described method also comprises: after completing initial configuration, closes DNS proxy.
Preferably, described receive described terminal send message after, connect with described terminal and comprise: when receiving object IP address that terminal sends and being the TCP connection request of IP address of equipment, connect response to described terminal replies TCP, set up TCP with described terminal after receiving the TCP acknowledgment of described terminal and be connected.
Preferably, described configuration webpage is sent to described terminal, and receive the configuration information inputted in configuration webpage and comprise: when receiving object IP address that terminal sends and being the HTTP request of IP address of equipment, comprise the HTTP response of configuration webpage to described terminal replies, and receive the configuration information that described terminal sent by HTTP message.
Preferably, described method also comprises: under initial configuration state, opens synchronous SYN and acts on behalf of and HTML (Hypertext Markup Language) HTTP redirection; Described receive described terminal send message after, connect with described terminal and comprise: when receiving TCP connection request for IP address of equipment of object IP address that terminal sends, utilize SYN to act on behalf of and replace described object IP address to connect response to described terminal replies TCP, set up TCP with described terminal after receiving the TCP acknowledgment of described terminal and be connected; Described configuration webpage is sent to described terminal, and before receiving the configuration information inputted in configuration webpage, described method also comprises: when the object IP address receiving terminal transmission is not the HTTP request of IP address of equipment, utilize HTTP redirection to replace described object IP address to reply to described terminal replies HTTP, and send the redirect message being redirected to IP address of equipment to described terminal; Described method also comprises: after completing initial configuration, closes SYN agency and HTTP redirection.
According to a further aspect in the invention, additionally provide the device carrying out initial configuration in a kind of equipment, this device comprises: transceiver module, for receiving and sending message; Control module, under initial configuration state, opens ARP agency;
ARP proxy module, when the ARP sent for receiving terminal when described transceiver module asks, utilize ARP proxy using the MAC address of described equipment as gateway MAC address, by arp reply message, the MAC Address of equipment is replied to described terminal; Transport module, for receive at described transceiver module described terminal send message after, connect with described terminal, configuration webpage sent to described terminal, and receive the configuration information inputted in configuration webpage; Configuration module, for utilizing described configuration information to carry out initial configuration, after completing initial configuration, closes ARP proxy.
Preferably, described device also comprises: address resolution DNS proxy module, and described control module, also under initial configuration state, opens DNS proxy; Described DNS proxy module is used for when described transceiver module receives the DNS request of terminal transmission, utilize DNS proxy using the IP address of described equipment as IP address corresponding to domain name in DNS request, by DNS response message, the IP address of equipment is replied to described terminal; Described configuration module, also for after completing initial configuration, closes DNS proxy.
Preferably, described transport module comprises: transmission control protocol TCP connexon module, when the object IP address sent for receiving terminal when described transceiver module is the TCP connection request of IP address of equipment, connect response to described terminal replies TCP, set up TCP with described terminal after receiving the TCP acknowledgment of described terminal and be connected.
Preferably, described transport module comprises: HTTP connexon module, for when receiving object IP address that terminal sends and being the HTTP request of IP address of equipment, comprise the HTTP response of configuration webpage to described terminal replies, and receive the configuration information that described terminal sent by HTTP message.
Preferably, described control module, also under initial configuration state, is opened synchronous SYN and is acted on behalf of and HTML (Hypertext Markup Language) HTTP redirection; Described transport module, comprise: SYN agent sub-module, when the object IP address sent for receiving terminal when described transceiver module is not the TCP connection request of IP address of equipment, utilize SYN to act on behalf of and replace described object IP address to connect response to described terminal replies TCP, set up TCP with described terminal after receiving the TCP acknowledgment of described terminal and be connected; HTTP redirection submodule, when the object IP address sent for receiving terminal when described transceiver module is not the HTTP request of IP address of equipment, utilize HTTP redirection to replace described object IP address to reply to described terminal replies HTTP, and send the redirect message being redirected to IP address of equipment to described terminal; Described configuration module, also for after completing initial configuration, closes SYN agency and HTTP redirection.
Pass through technique scheme, ARP is utilized to act on behalf of the MAC address of equipment as gateway MAC address, terminal is replied to by arp reply message, afterwards, the message that receiving terminal sends, connect with terminal, thus make terminal can access the configuration webpage of equipment, utilize configuration webpage to carry out initial configuration.So, avoid the restriction to IP address acquisition mode in terminal, ensure that terminal is under the mode of non-automatic acquisition IP address, also can access configuration webpage, initial configuration is carried out to terminal, improves initial configuration efficiency.
Other features and advantages of the present invention are described in detail in embodiment part subsequently.
Accompanying drawing explanation
Accompanying drawing is used to provide a further understanding of the present invention, and forms a part for specification, is used from explanation the present invention, but is not construed as limiting the invention with embodiment one below.In the accompanying drawings:
Fig. 1 is the flow chart carrying out the method for initial configuration according to an embodiment of the invention in equipment;
Fig. 2 is that equipment carries out the flow chart of the method for initial configuration in scene according to an embodiment of the invention;
Fig. 3 is that equipment carries out the flow chart of the method for initial configuration in scene according to an embodiment of the invention;
Fig. 4 is that equipment carries out the flow chart of the method for initial configuration in scene according to an embodiment of the invention;
Fig. 5 is that equipment carries out the structure chart of the device of initial configuration according to an embodiment of the invention;
Fig. 6 is that equipment carries out the structure chart of the device of initial configuration according to an embodiment of the invention;
Fig. 7 is that equipment carries out the structure chart of the device of initial configuration according to an embodiment of the invention; And
Fig. 8 is that equipment carries out the structure chart of the device of initial configuration according to an embodiment of the invention.
Embodiment
Below in conjunction with accompanying drawing, the specific embodiment of the present invention is described in detail.Should be understood that, embodiment described herein, only for instruction and explanation of the present invention, is not limited to the present invention.
Fig. 1 is the flow chart carrying out the method for initial configuration according to an embodiment of the invention in equipment, and the method can be used for various equipment, such as router, Cloud Server etc., and as shown in Figure 1, the method comprises the steps S110-S140.
In step s 110, under initial configuration state, open address ARP (analysis protocol) agency.
In one embodiment, described method also comprises: after device power-up, the configuration status of checkout equipment, and whether judgment device is positioned at initial configuration state; And after completing initial configuration, the configuration status of equipment is changed to running status from initial configuration state.
For example, equipment arranges the flag bit of configuration status when dispatching from the factory, and 0 represents initial configuration state, and 1 represents running status.After device power-up, detect the flag bit of this configuration status, if flag bit is 0, in expression initial configuration state.Now, ARP proxy is opened.After initial configuration completes, change flag bit into 1, represent and enter running status.
In the step s 120, when receiving the ARP request that terminal sends, utilize ARP proxy that the MAC Address of equipment, as gateway MAC address, is replied to terminal by arp reply message by MAC (media interviews control) address of equipment.
For example, terminal is connected with equipment, and because terminal does not have gateway MAC address, therefore, terminal sends ARP request.Equipment utilizes ARP proxy the MAC Address of equipment self to be encapsulated in arp reply message and replies to terminal after receiving ARP request.After terminal receives arp reply message, parse device mac address wherein, using this device mac address as gateway MAC address.Afterwards, terminal, when sending message, using equipment as gateway, sends message to this equipment.
In step s 130, which, after receiving the message of terminal transmission, connect with terminal, configuration webpage is sent to terminal, and receive the configuration information inputted in configuration webpage.
In one embodiment, the message that receiving terminal sends, connect with terminal and comprise: when the object IP address receiving terminal transmission is TCP (transmission control protocol) connection request of IP address of equipment, connect response to terminal replies TCP, set up TCP with terminal after receiving the TCP acknowledgment of terminal and be connected.
Configuration webpage is sent to terminal, and receive the configuration information inputted in configuration webpage and comprise: when receiving object IP address that terminal sends and being the HTTP request of IP address of equipment, the HTTP response of configuration webpage is comprised to terminal replies, and the configuration information that receiving terminal is sent by HTTP message.
For example, the IP address of input equipment in the web browser of terminal, to conduct interviews to the WEB interface of equipment.Before carrying out HTTP transmission, set up TCP by three-way handshake and connect.Terminal sends TCP connection request to equipment, and equipment connects response to terminal replies TCP, and terminal replies TCP acknowledgment, equipment and terminal room are set up TCP and be connected.Afterwards, terminal sends HTTP request to equipment, and in HTTP request, object IP address is IP address of equipment, and after equipment receives the HTTP request of terminal, parsing object IP address is local ip address, replys the HTTP response comprising configuration webpage.So, at the configuration webpage of terminal presentation facility.User carries out information configuration in configuration webpage, and configuration information is sent to equipment by HTTP message by terminal, and equipment obtains configuration information.
In step S140, utilize configuration information to carry out initial configuration, after completing initial configuration, close ARP proxy.
Fig. 2 is that equipment carries out the flow chart of the method for initial configuration in scene according to an embodiment of the invention.In this scene, equipment is router, and terminal is PC (PC), and IP address of router is that in 192.168.1.1, PC, static ip address is 10.1.1.2, and gateway address is 10.1.1.1.When initial configuration, the IP address of user's input router in the web browser of PC, such as http:192.168.1.1, the configuration webpage of explicit routing device in PC, input configuration information in configuration webpage.Router receives configuration information, utilizes this configuration information to complete initial configuration.As shown in Figure 2, comprising step S210-S260.
In step S210, router powers on after start, and whether be initial configuration state, under initial configuration state, then open ARP proxy if detecting current.
In step S220, between router and PC, set up physical connection.
In step S230, router receives the ARP request that PC sends.
When inputting http in PC browser: during // 192.168.1.1, because PC does not have the MAC Address of gateway, can there is acquisition request gateway A RP in PC.
In step S240, router utilizes ARP proxy to replace gateway to send arp reply message to PC.
Wherein, in arp reply message, the MAC Address of gateway extends this as router mac address.
In step s 250, router receive PC send object IP address be IP address of router TCP request, set up TCP with PC and be connected, receive PC send HTTP request, to PC reply configuration webpage, receive PC transmission configuration information.
After PC receives arp reply message, using router as gateway.Because input http in browser: // 192.168.1.1, PC can initiate TCP to 192.168.1.1 and connect, and namely set up TCP with router by TCP three-way handshake or other improved procedures and are connected.Afterwards, PC obtains configuration webpage by HTTP from router, in a browser the echo configuration of routers page.Receive the configuration of user in PC, by HTTP message, configuration information is sent to router.Router receives HTTP message and obtains configuration information.
In step S260, router enters running status after utilizing configuration information to complete configuration, and closes ARP proxy.
Pass through technique scheme, utilize ARP proxy using the MAC Address of equipment as gateway MAC address, terminal is replied to by arp reply message, afterwards, the message that receiving terminal sends, connect with terminal, thus make terminal can access the configuration webpage of equipment, utilize configuration webpage to carry out initial configuration.So, avoid the restriction to IP address acquisition mode in terminal, ensure that terminal is under non-dhcp address obtain manner, also can access configuration webpage, initial configuration is carried out to terminal, improves networking allocative efficiency.
In one embodiment, method also comprises: under initial configuration state, opens address resolution DNS proxy.Before connecting with terminal, method also comprises: when receiving the DNS request that terminal sends, and utilizes DNS proxy using the IP address of equipment as IP address corresponding to domain name in DNS request, by DNS response message, the IP address of equipment is replied to terminal.Method also comprises: after completing initial configuration, closes DNS proxy.
Fig. 3 is that equipment carries out the flow chart of the method for initial configuration in scene according to an embodiment of the invention.In this scene, equipment is router, and terminal is PC (PC), and IP address of router is that in 192.168.1.1, PC, static ip address is 10.1.1.2, and gateway address is 10.1.1.1.When initial configuration, user inputs webpage domain name in the web browser of PC, such as http:www.xxx.com, the configuration webpage of explicit routing device in PC, input configuration information in configuration webpage.Router receives configuration information, utilizes this configuration information to complete initial configuration.As shown in Figure 3, comprising step S310-S390.
In step S310, router powers on after start, and whether can detect current is initial configuration state, under initial configuration state, then opens ARP proxy and DNS proxy.
In step s 320, physical connection is carried out between router and PC.
In step S330, router receives the ARP request that PC sends.
In step S340, router utilizes ARP proxy to replace gateway to send arp reply message to PC.
PC browser directly inputs http://www.xxx.com, and now because PC does not have the MAC Address of gateway, acquisition request gateway A RP can occur PC.After router receives ARP request, ARP proxy is utilized to replace gateway to send arp reply message to PC.MAC Address extends this as router mac address.
In step S350, router receives the DNS request that PC sends.
In step S360, router utilizes DNS proxy to be associated with domain name in DNS request by IP address of router, replies to PC by DNS response message.
After PC obtains ARP, using router as gateway.Meanwhile, PC can initiate to dns server the request obtaining the corresponding IP address of xxx.com.
After router receives DNS request, utilize DNS proxy to replace dns server to send DNS response message to PC, the IP address of domain name association extends this as IP address of router (192.168.1.1).
In step S370, router receive PC send object IP address be IP address of router TCP request, set up TCP with PC and be connected, receive PC send HTTP request, to PC reply configuration webpage, receive PC transmission configuration information.
After PC obtains the corresponding IP address of xxx.com, PC can initiate TCP to 192.168.1.1 and connect, and namely sets up TCP with router by TCP three-way handshake or other improved procedures and is connected.Afterwards, PC obtains configuration webpage by HTTP from router, in a browser the echo configuration of routers page.Receive the configuration of user in PC, by HTTP message, configuration information is sent to router.Router receives HTTP message and obtains configuration information.
In step S380, router enters running status after utilizing configuration information to complete configuration, and closes ARP proxy and DNS proxy.
In the above-described embodiments, by the DNS proxy in equipment, device IP is associated with the domain name of accessed web page in terminal, thus, make user pass through to input any webpage domain name in a browser and also can obtain the configuration page, and then by configuration page finishing equipment initial configuration.So, make to configure convenient carrying out, improve networking allocative efficiency.
In one embodiment, described method also comprises: under initial configuration state, opens synchronous SYN and acts on behalf of and HTML (Hypertext Markup Language) HTTP redirection.Described receive terminal send message after, connect with terminal and comprise: when the object IP address receiving terminal transmission is not the TCP connection request of IP address of equipment, utilize SYN to act on behalf of and replace described object IP address to connect response to terminal replies TCP, set up TCP with terminal after receiving the TCP acknowledgment of terminal and be connected.Described configuration webpage is sent to terminal, and before receiving the configuration information inputted in configuration webpage, method also can comprise: when the object IP address receiving terminal transmission is not the HTTP request of IP address of equipment, utilize HTTP redirection to replace object IP address to reply to terminal replies HTTP, and send the redirect message being redirected to IP address of equipment to terminal.Described method also comprises: after completing initial configuration, closes SYN agency and HTTP redirection.
Fig. 4 is that equipment carries out the flow chart of the method for initial configuration in scene according to an embodiment of the invention.In this scene, equipment is router, and terminal is PC, and IP address of router is that in 192.168.1.1, PC, static ip address is 10.1.1.2, and gateway address is 10.1.1.1.When initial configuration, user inputs random access address in the web browser of PC, such as http:192.168.52.1, the configuration webpage of explicit routing device in PC, input configuration information in configuration webpage.Router receives configuration information, utilizes this configuration information to complete initial configuration.As shown in Figure 4, comprising step S4010-S4100.
In step S4010, router powers on after start, and whether detect current is initial configuration state, under initial configuration state, opens ARP proxy, SYN agency and HTTP redirection.
In step S4020, between router and PC, carry out physical connection.
In step S4030, router receives the ARP request that PC sends.
In step S4040, router utilizes ARP proxy to replace gateway to send arp reply message to PC.
PC browser directly inputs http: // 192.168.52.1, and now because PC does not have the MAC Address of gateway, acquisition request gateway A RP can occur PC.After router receives ARP request, ARP proxy replaces gateway to send arp reply message to PC, and the MAC Address of gateway is extended this as router mac address.
In step S4050, it is not the TCP connection request of IP address of router that router receives object IP address.
In step S4060, router utilizes SYN to act on behalf of replacement object IP address and replys TCP connection response to PC, sets up TCP be connected with PC.
After PC receives ARP, using router as gateway.PC can initiate TCP connection request to 192.168.52.1 simultaneously.The TCP connection request (i.e. SYN request) that receives of router replaces 192.168.52.1 to send connection response (i.e. ACK response) to PC afterwards, and completes TCP connection three-way handshake, sets up TCP and connects.
In step S4070, it is not the HTTP request of IP address of router that router receives object IP address.
In step S4080, router utilizes HTTP redirection to replace object IP address to reply HTTP response to PC, and sends the redirect message being redirected to IP address of router (192.168.1.1) to PC.
PC initiates HTTP connection request to 192.168.52.1.After router receives HTTP request, utilize HTTP redirection to replace 192.168.52.1 to send response message to PC, and send redirect message requirement pc access 192.168.1.1.After PC receives redirect message, automatically can jump to 192.168.1.1.
In step S4090, the destination address that router receives PC transmission is the HTTP request of 192.168.1.1, replys configuration webpage to PC, receives the configuration information that PC sends.
In step S4100, router utilizes the configuration information received to be configured, and after completing configuration, enters running status, closes ARP proxy, SYN agency and HTTP redirection.
In the above-described embodiments, by the SYN agency in equipment, set up TCP with terminal and be connected, and by HTTP redirection, require terminal access equipment.Thus, make user pass through to input any IP address in a browser and also can obtain the configuration page, and then by configuration page finishing equipment initial configuration.So, make to configure convenient carrying out, improve networking allocative efficiency.
Fig. 5 is the structure chart carrying out the device of initial configuration according to an embodiment of the invention in equipment, and this device can be used for various equipment, such as router, Cloud Server etc., and as shown in Figure 5, this device comprises as lower module.
Transceiver module 510, for receiving and sending message;
Control module 520, under initial configuration state, opens ARP agency;
ARP proxy module 530, when the ARP sent for receiving terminal when transceiver module 510 asks, utilize ARP proxy using the MAC address of described equipment as gateway MAC address, by arp reply message, the MAC Address of equipment is replied to described terminal;
Transport module 540, for receive at transceiver module 510 described terminal send message after, connect with described terminal, configuration webpage sent to described terminal, and receive the configuration information inputted in configuration webpage;
Configuration module 550, for utilizing configuration information to carry out initial configuration, after completing initial configuration, closes ARP proxy.
In one embodiment, control module 520 for after device power-up, the configuration status of checkout equipment, whether judgment device is positioned at initial configuration state; And after completing initial configuration, the configuration status of equipment is changed to running status from initial configuration state.
In one embodiment, as shown in Figure 6, device also comprises: address resolution DNS proxy module 610,
Control module 520, also under initial configuration state, opens DNS proxy;
DNS proxy module 610 for receive when transceiver module 510 terminal send DNS request time, utilize DNS proxy using the IP address of described equipment as IP address corresponding to domain name in DNS request, by DNS response message, the IP address of equipment is replied to described terminal;
Configuration module 550, also for after completing initial configuration, closes DNS proxy.
In one embodiment, as shown in Figure 7, transport module 540 comprises: transmission control protocol TCP connexon module 542, when the object IP address sent for receiving terminal when transceiver module 510 is the TCP connection request of IP address of equipment, connect response to described terminal replies TCP, set up TCP with described terminal after receiving the TCP acknowledgment of described terminal and be connected.
In one embodiment, as shown in Figure 8, control module 520, also under initial configuration state, is opened synchronous SYN and is acted on behalf of and HTML (Hypertext Markup Language) HTTP redirection;
Transport module 540 comprises: SYN agent sub-module 544, when the object IP address sent for receiving terminal when transceiver module 510 is not the TCP connection request of IP address of equipment, utilize SYN to act on behalf of and replace described object IP address to connect response to described terminal replies TCP, set up TCP with described terminal after receiving the TCP acknowledgment of described terminal and be connected; And HTTP redirection submodule 546, when the object IP address sent for receiving terminal when transceiver module 510 is not the HTTP request of IP address of equipment, utilize HTTP redirection to replace described object IP address to reply to described terminal replies HTTP, and send the redirect message being redirected to IP address of equipment to described terminal;
Configuration module 550, also for after completing initial configuration, closes SYN agency and HTTP redirection.
In one embodiment, as shown in Figure 8, transport module 540 comprises: HTTP connexon module 548, for when the object IP address receiving terminal transmission is the HTTP request of IP address of equipment, comprise the HTTP response of configuration webpage to described terminal replies, and receive the configuration information that described terminal sent by HTTP message.
Said apparatus is corresponding with preceding method, and the detailed description for device refers to corresponding part in method, does not repeat them here.
Pass through technique scheme, utilize ARP proxy using the MAC Address of equipment as gateway MAC address, terminal is replied to by arp reply message, afterwards, the message that receiving terminal sends, connect with terminal, thus make terminal can access the configuration webpage of equipment, utilize configuration webpage to carry out initial configuration.So, avoid the restriction to IP address acquisition mode in terminal, ensure that terminal is under non-dhcp address obtain manner, also can access configuration webpage, initial configuration is carried out to terminal, improves networking allocative efficiency.
Below the preferred embodiment of the present invention is described in detail by reference to the accompanying drawings; but; the present invention is not limited to the detail in above-mentioned execution mode; within the scope of technical conceive of the present invention; can carry out multiple simple variant to technical scheme of the present invention, these simple variant all belong to protection scope of the present invention.
It should be noted that in addition, each concrete technical characteristic described in above-mentioned embodiment, in reconcilable situation, can be combined by any suitable mode, in order to avoid unnecessary repetition, the present invention illustrates no longer separately to various possible compound mode.
In addition, also can carry out combination in any between various different execution mode of the present invention, as long as it is without prejudice to thought of the present invention, it should be considered as content disclosed in this invention equally.

Claims (10)

1. carry out a method for initial configuration in equipment, it is characterized in that, the method comprises:
Under initial configuration state, open ARP agency;
When receiving the ARP request that terminal sends, utilizing ARP proxy using the MAC address of described equipment as gateway MAC address, by arp reply message, the MAC Address of equipment being replied to described terminal;
After receiving the message of described terminal transmission, connect with described terminal, configuration webpage is sent to described terminal, and receive the configuration information inputted in configuration webpage;
Utilize described configuration information to carry out initial configuration, after completing initial configuration, close ARP proxy.
2. method according to claim 1, is characterized in that, described method also comprises:
Under initial configuration state, open address resolution DNS proxy;
Before described and described terminal connects, described method also comprises:
When receiving the DNS request that terminal sends, utilizing DNS proxy using the IP address of described equipment as IP address corresponding to domain name in DNS request, by DNS response message, the IP address of equipment being replied to described terminal;
Described method also comprises:
After completing initial configuration, close DNS proxy.
3. method according to claim 1 and 2, is characterized in that, described in receive described terminal send message after, connect with described terminal and comprise:
When the object IP address receiving terminal transmission is the TCP connection request of IP address of equipment, connects response to described terminal replies TCP, set up TCP with described terminal after receiving the TCP acknowledgment of described terminal and be connected.
4. method according to claim 1 and 2, is characterized in that, described configuration webpage is sent to described terminal, and receives the configuration information inputted in configuration webpage and comprise:
When receiving object IP address that terminal sends and being the HTTP request of IP address of equipment, comprise the HTTP response of configuration webpage to described terminal replies, and receive the configuration information that described terminal sent by HTTP message.
5. method according to claim 1, is characterized in that, described method also comprises:
Under initial configuration state, open synchronous SYN and act on behalf of and HTML (Hypertext Markup Language) HTTP redirection;
Described receive described terminal send message after, connect with described terminal and comprise:
When the object IP address receiving terminal transmission is not the TCP connection request of IP address of equipment, utilize SYN to act on behalf of and replace described object IP address to connect response to described terminal replies TCP, set up TCP with described terminal after receiving the TCP acknowledgment of described terminal and be connected;
Described configuration webpage is sent to described terminal, and before receiving the configuration information inputted in configuration webpage, described method also comprises:
When the object IP address receiving terminal transmission is not the HTTP request of IP address of equipment, utilizes HTTP redirection to replace described object IP address to reply to described terminal replies HTTP, and send the redirect message being redirected to IP address of equipment to described terminal;
Described method also comprises:
After completing initial configuration, close SYN agency and HTTP redirection.
6. carry out a device for initial configuration in equipment, it is characterized in that, this device comprises:
Transceiver module, for receiving and sending message;
Control module, under initial configuration state, opens ARP agency;
ARP proxy module, when the ARP sent for receiving terminal when described transceiver module asks, utilize ARP proxy using the MAC address of described equipment as gateway MAC address, by arp reply message, the MAC Address of equipment is replied to described terminal;
Transport module, for receive at described transceiver module described terminal send message after, connect with described terminal, configuration webpage sent to described terminal, and receive the configuration information inputted in configuration webpage;
Configuration module, for utilizing described configuration information to carry out initial configuration, after completing initial configuration, closes ARP proxy.
7. device according to claim 6, is characterized in that, described device also comprises: address resolution DNS proxy module,
Described control module, also under initial configuration state, opens DNS proxy;
Described DNS proxy module is used for when described transceiver module receives the DNS request of terminal transmission, utilize DNS proxy using the IP address of described equipment as IP address corresponding to domain name in DNS request, by DNS response message, the IP address of equipment is replied to described terminal;
Described configuration module, also for after completing initial configuration, closes DNS proxy.
8. the device according to claim 6 or 7, is characterized in that, described transport module comprises:
Transmission control protocol TCP connexon module, when the object IP address sent for receiving terminal when described transceiver module is the TCP connection request of IP address of equipment, connect response to described terminal replies TCP, set up TCP with described terminal after receiving the TCP acknowledgment of described terminal and be connected.
9. the device according to claim 6 or 7, is characterized in that, described transport module comprises:
HTTP connexon module, for when receiving object IP address that terminal sends and being the HTTP request of IP address of equipment, comprises the HTTP response of configuration webpage, and receives the configuration information that described terminal sent by HTTP message to described terminal replies.
10. device according to claim 6, is characterized in that,
Described control module, also under initial configuration state, is opened synchronous SYN and is acted on behalf of and HTML (Hypertext Markup Language) HTTP redirection;
Described transport module, comprising:
SYN agent sub-module, when the object IP address sent for receiving terminal when described transceiver module is not the TCP connection request of IP address of equipment, utilize SYN to act on behalf of and replace described object IP address to connect response to described terminal replies TCP, set up TCP with described terminal after receiving the TCP acknowledgment of described terminal and be connected;
HTTP redirection submodule, when the object IP address sent for receiving terminal when described transceiver module is not the HTTP request of IP address of equipment, utilize HTTP redirection to replace described object IP address to reply to described terminal replies HTTP, and send the redirect message being redirected to IP address of equipment to described terminal;
Described configuration module, also for after completing initial configuration, closes SYN agency and HTTP redirection.
CN201510740557.3A 2015-11-04 2015-11-04 The method and device of initial configuration is carried out in equipment Active CN105407184B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510740557.3A CN105407184B (en) 2015-11-04 2015-11-04 The method and device of initial configuration is carried out in equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510740557.3A CN105407184B (en) 2015-11-04 2015-11-04 The method and device of initial configuration is carried out in equipment

Publications (2)

Publication Number Publication Date
CN105407184A true CN105407184A (en) 2016-03-16
CN105407184B CN105407184B (en) 2019-01-29

Family

ID=55472428

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510740557.3A Active CN105407184B (en) 2015-11-04 2015-11-04 The method and device of initial configuration is carried out in equipment

Country Status (1)

Country Link
CN (1) CN105407184B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108881178A (en) * 2018-05-29 2018-11-23 网易(杭州)网络有限公司 Method for sending information and device, equipment, storage medium and electronic device
CN108886477A (en) * 2018-06-22 2018-11-23 深圳前海达闼云端智能科技有限公司 A kind of equipment configuration method, device, customer terminal equipment and cloud server

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1512722A (en) * 2002-12-27 2004-07-14 武汉烽火网络有限责任公司 Method and device for connecting wide hand network user into Internet
CN1674563A (en) * 2004-03-26 2005-09-28 北京葳网通科技有限公司 Immediate plug and instant use proxy gateway and method thereof
CN103354669A (en) * 2013-06-26 2013-10-16 上海斐讯数据通信技术有限公司 Internet access configuration method for wireless router
CN103379186A (en) * 2012-04-26 2013-10-30 安美世纪(北京)科技有限公司 Plug and play access method of hotel public network
CN104994077A (en) * 2015-06-08 2015-10-21 北京奇虎科技有限公司 Wireless local area network access equipment identity marking method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1512722A (en) * 2002-12-27 2004-07-14 武汉烽火网络有限责任公司 Method and device for connecting wide hand network user into Internet
CN1674563A (en) * 2004-03-26 2005-09-28 北京葳网通科技有限公司 Immediate plug and instant use proxy gateway and method thereof
CN103379186A (en) * 2012-04-26 2013-10-30 安美世纪(北京)科技有限公司 Plug and play access method of hotel public network
CN103354669A (en) * 2013-06-26 2013-10-16 上海斐讯数据通信技术有限公司 Internet access configuration method for wireless router
CN104994077A (en) * 2015-06-08 2015-10-21 北京奇虎科技有限公司 Wireless local area network access equipment identity marking method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108881178A (en) * 2018-05-29 2018-11-23 网易(杭州)网络有限公司 Method for sending information and device, equipment, storage medium and electronic device
CN108881178B (en) * 2018-05-29 2020-02-14 网易(杭州)网络有限公司 Information transmission method and apparatus, device, storage medium, and electronic apparatus
CN108886477A (en) * 2018-06-22 2018-11-23 深圳前海达闼云端智能科技有限公司 A kind of equipment configuration method, device, customer terminal equipment and cloud server
WO2019242007A1 (en) * 2018-06-22 2019-12-26 深圳前海达闼云端智能科技有限公司 Device configuration method and apparatus, client terminal device, and cloud server
CN108886477B (en) * 2018-06-22 2022-03-11 达闼机器人有限公司 Equipment configuration method and device, client terminal equipment and cloud server

Also Published As

Publication number Publication date
CN105407184B (en) 2019-01-29

Similar Documents

Publication Publication Date Title
US8903962B2 (en) Method and apparatus for loading a landing page
KR101670344B1 (en) Access control method and system, and access point
CN101621802B (en) Method, system and device for authenticating portal in wireless network
US9781234B2 (en) Electronic device, network relay device, and non-transitory computer readable storage medium
US20070274290A1 (en) Apparatus and method for packet forwarding in layer 2 network
CN105141621A (en) Network access monitoring method and device
US20210044456A1 (en) Method for implementing gre tunnel, access point and gateway
US20120179785A1 (en) Method and apparatus for loading landing page
CN104243506A (en) Browser redirection method and device
US9781034B2 (en) Electronic device, network relay device, and non-transitory computer readable storage medium
US9929942B2 (en) Remote access to a residential multipath entity
US20130064250A1 (en) Remotely accessing and controlling user equipment in a private network
CN105407184A (en) Initial configuration method and device in equipment
US20080180524A1 (en) Remote monitoring control method of network camera
WO2015171023A1 (en) Establishing a multipath tcp (mptcp) connection
JP4292897B2 (en) Relay device and port forward setting method
US10257802B2 (en) Binding registration method, data forwarding method, related device, and network system
JP5846502B2 (en) Method and apparatus for realizing communication between different networks
EP2124397A1 (en) A method for transfering the ip transmission session and the equipment whereto
JP5723808B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM
Cisco Timer and Retry Enhancements for L2TP and L2F
CN106657039A (en) Portal page obtaining method, wireless AP, and Portal server
CN106454817A (en) WLAN authentication method, WLAN authentication system and AP equipment
JP6369179B2 (en) Tunnel end point device, DHCP server, interface automatic setting method and program
JP4478084B2 (en) Communication terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant