Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than the embodiment of whole.It is based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made
Embodiment, belongs to the scope of protection of the invention.
Embodiments provide a kind of network equipment and start the method for automatically configuring, be applied to the automatic of the network equipment
During configuration, automatically configure and refer to and referring to that the network equipment no longer needs artificial participation after power, the network equipment is just
A kind of collocation method of device configuration can be completed, its flow chart is as shown in figure 1, specifically include:
101st, after network equipment startup, judge whether control port is shorted and system starts for empty configuration, if judging
As a result for being then to enter step 102, if judged result is for otherwise into step 103.
102nd, the network equipment starts and automatically configures.
Wherein, be shorted when judging control port, and system be when starting for empty configuration, illustrate the network equipment by
Configured, it is not necessary to enter and automatically configure flow process, then, the network equipment directly initiates the configuration mode being currently configured
In.
103rd, the network equipment does not start and automatically configures.
A kind of network equipment provided in an embodiment of the present invention starts the method for automatically configuring, by before starting device is configured
The method that the control port of the detection network equipment is shorted situation, judges whether this network equipment is in what is need not configured
Under non-automatic configuration scene, compared in prior art, only before starting device configuration, whether detecting system is that empty configuration starts
Determine the need for carrying out the mode of device configuration, increased and the step of whether control port is shorted judged, so as in detection
When going out the control port of the network equipment and not being shorted, the network equipment is determined in non-automatic configuration scene, therefore do not start and set
Standby configuration, can still enter the network for automatically configuring flow process and causing under the scene of non-automatic configuration in solving prior art
Equipment starts slow problem.
In order to judge described in implementation steps 101 whether control port is shorted, the invention provides specific method stream
Journey, it is concrete as shown in Fig. 2 including:
201st, the level signal of previously selected at least two pin of the network equipment detection control port.
The previously selected control port pin mentioned in the step, is not used because current in the typically optional network equipment
And idle control port pin.
202nd, adjust the level signal of any one in previously selected at least two pin.
The adjustment action is used for making level signal produce change to be different from current level signal, for example, if level
Signal only has the timesharing of high level and low level, if then the level signal of control port pin is currently high level, adjusts it
It is just low level afterwards, on the contrary it is similar.If level signal has two or more quantification gradations, adjustment when need to only be adjusted to
Current different level.
203rd, detect again the level signal of previously selected at least two pin.
In the present embodiment, above-mentioned steps 201 to 203 are intended to determine that previously selected at least two control ports pin is
It is no in short circuit state, therefore, step 203 require ensure to confirm controlled control port pin in execution step 202
Level signal has enough time perform after having influence on be possible to other control port pins being affected.Thus may be used
See, may need to wait for a period of time to be further continued for execution step 203 after execution step 202, this period can be according to reality
Measurement or empirical value are set, and can also be not provided with this period certainly for the network equipment of level signal sensitive.
204th, when adjustment before control port each previously selected pin level signal it is identical, and adjustment after each
When the level signal of previously selected pin is identical, determine that the control port of the network equipment is shorted.
Wherein, it is described when the level signal of each previously selected pin of control port before adjustment is identical, and adjust
When the level signal of each previously selected pin is identical afterwards, the pin of control port must be shorted, it is thus determined that should
The network equipment needs to be automatically configured.It should be noted that in the present invention is example, selection is control when the network equipment
When the pin of port processed is shorted, it is believed that the network equipment needs to be automatically configured.Other similar sides can certainly be adopted
Formula assert whether the network equipment needs to be automatically configured, and such as when the pin of the control port of the network equipment is shorted, recognizes
Need not carry out the similar fashion such as automatically configuring for the network equipment, will not be described here.
205th, when the level signal of each previously selected pin of control port before adjustment is different, or, control after adjustment
When the level signal of each previously selected pin of port processed is different, determine that the control port of the network equipment is not short
Connect.
Wherein, when the level signal of each previously selected pin of control port before adjustment is different, or, control after adjustment
When the level signal of each previously selected pin of port processed is different, the pin of control port must not be shorted, because
This determines that the network equipment need not be configured, can directly according to existing configuration operation.
In embodiments of the present invention, by, after the network equipment in non-automatic configuration scene is predefined, not locating
The mode of short circuit is carried out at least two idle control port pins of the network equipment of non-automatic configuration scene, so as to become
After one of pin level of the control port of the dynamic network equipment, detect whether other pin level signals are identical, so as to sentence
Break and the control port of the network equipment and whether be shorted so that the network equipment can know whether which needs to be matched somebody with somebody automatically
Put, the probability implemented is provided for starting the judgement for automatically configuring.
In order to obtain configuration file necessary to automatic Configuration network equipment, and the network equipment is automatically configured, this
How inventive embodiments start the network equipment in being also directed to step 204 automatically configures three kinds of implementations of offer, specific as follows:
The first implementation:
Its flow chart is as shown in figure 3, specifically include:
301st, all FPDP enable ports are isolated by the network equipment, receive first obtained needed for configuration file
Required parameter information, the first required parameter information include FTP(File Transfer Protocol, file transfer protocol (FTP))
Authentication information, configuration file mark needed for the address information of server, the access ftp server.
In the present embodiment, the isolation of all FPDP enable ports is to prevent because of construction by the network equipment
FPDP connection error is caused network loop occur by personnel, hence in so that the phenomenon that whole net normally can not be used occurs.Institute
Request method that the first required parameter information can be specified by DHCP is stated to Dynamic Host Configuration Protocol server acquisition request.Its concrete request flow process
For general DHCP modes in the industry, the embodiment of the present invention does not do excessive description to this.
In addition, the authentication information accessed needed for the ftp server generally comprised the user name of ftp server and
The information such as password, the configuration file mark can be represented by configuration filename.
302nd, the address information according to ftp server, the network equipment sends a FTP to the ftp server please
Ask, a FTP is asked to obtain for the network equipment and started required configuration file when automatically configuring, and described the
One FTP requests are carried and access authentication information needed for the ftp server, configuration file mark.
303rd, the network equipment receive that the ftp server asks in response to a FTP and send with it is described
Configuration file identifies corresponding configuration file.
Ftp server, can be first right according to the FTP authentication informations of network equipment transmission when the FTP requests are responded
The identity of the network equipment is authenticated, and after certification passes through, can just search and the configuration file corresponding configuration file of mark.
304th, the network equipment carries out device configuration according to the configuration file for receiving.
In embodiments of the present invention, configuration file is asked to ftp server after getting configuration information, and receiving
The method that the network equipment is automatically configured is carried out to after configuration file, completes the flow process that the network equipment is automatically configured.With prior art
Compare, this method embodiment using by FTP by the way of obtain the mode of configuration file, adopted with prior art
The mode of TFTP is compared, and when configuration file is obtained, needs to be authenticated with the authentication information of FTP, so with higher peace
Quan Xing.
Second implementation:
Its purpose of design is in order that the network equipment can be obtained and be matched somebody with somebody in the case where getting configuration file mark
Put the configuration file needed for the network equipment.
Its flow chart is as shown in figure 4, specifically include:
401st, all FPDP enable ports are isolated by the network equipment, receive second obtained needed for configuration file
Required parameter information, the second required parameter information include the address information of ftp server, access the ftp server institute
The authentication information for needing.
402nd, the address information according to ftp server, the network equipment sends the 2nd FTP to the ftp server please
Ask, when the 2nd FTP asks to automatically configure for network equipment acquisition startup, required configuration file is corresponding configures text
Part is identified, and the 2nd FTP requests carry the authentication information accessed needed for the ftp server.
403rd, the network equipment receive startup that the ftp server ask in response to the 2nd FTP and send oneself
Required configuration file corresponding configuration file mark during dynamic configuration.
In this step, ftp server is sent out to the network equipment after the 2nd FTP requests for receiving network equipment transmission
Intermediate file is sent, configuration file corresponding with the network equipment is searched and obtained to the network equipment after this intermediate file is received
Mark.Wherein, the intermediate file is used for providing configuration file mark corresponding with the MAC Address of the network equipment.
404th, the address information according to ftp server, the network equipment sends the 3rd FTP to the ftp server please
Ask, the 3rd FTP is asked to obtain for the network equipment and started required configuration file when automatically configuring, and described the
Three FTP requests are carried and access authentication information needed for the ftp server, configuration file mark.
405th, the network equipment receive that the ftp server asks in response to the 3rd FTP and send with it is described
Configuration file identifies corresponding configuration file.
406th, the network equipment carries out device configuration according to the configuration file for receiving.
In embodiments of the present invention, obtained from ftp server after getting the configuration information for lacking configuration file mark
Configuration file mark is taken, and then configuration file is asked to ftp server again, and is carried out device configuration after configuration file is received
Method, complete the flow process of device configuration so that the network equipment get lack configuration file mark configuration information after, still
The configuration file needed for Configuration network equipment can be so obtained, and then completes device configuration.
The third implementation:
Its purpose of design obtains asking when identifying less than configuration file in order to make up by above-mentioned first two implementation
Topic.Can also use under the configuration file identical scene of a large amount of network equipments.
Its flow chart is as shown in figure 5, specifically include:
501st, all FPDP enable ports are isolated by the network equipment, receive the 3rd obtained needed for configuration file
Required parameter information, the 3rd required parameter information include the address information of ftp server, access the ftp server institute
The authentication information for needing.
502nd, the address information according to ftp server, the network equipment sends the 4th FTP to the ftp server please
Ask, the 4th FTP asks to obtain public configuration file, and the described 4th when starting and automatically configure for the network equipment
FTP requests carry the authentication information accessed needed for the ftp server.
Wherein, the public configuration file is used for being configured for all network equipments to be configured, is only used for as net
Basic configuration information necessary to the operation of network device configuration, or, for when the configuration needed for all network equipments to be configured
When file is identical, it is that the network equipment is configured.
What the 503rd, the network equipment received that the ftp server asks in response to the 4th FTP and send public matches somebody with somebody
Put file.
504th, the network equipment carries out device configuration according to the public configuration file for receiving.
In embodiments of the present invention, if the network equipment cannot get configuration file mark, or, all nets to be configured
Configuration file needed for network equipment is identical, after getting link information necessary to connection ftp server, directly from FTP
Server obtains the mode of public configuration file, completes the flow process of device configuration so that the network equipment is in several cases, complete
Forming apparatus are automatically configured.
301,401 and 501 middle port isolation action of above step is completing by the port isolation equipment in the network equipment
's.
Implementation above mode in addition to it independently can realize the network equipment and automatically configure, the embodiment of the present invention also here
The method flow that another kind of network equipment startup is automatically configured, idiographic flow such as Fig. 6 institutes are provided with reference to three of the above implementation
Show, specifically include:
601st, all FPDP enable ports are isolated by the network equipment.
602nd, the network equipment receives the 4th required parameter information obtained needed for configuration file, judges that the described 4th please
Whether identify including configuration file in seeking parameter information, it is such as no, into step 603, otherwise into step 604.
603rd, the network equipment is according to the address information of the ftp server in the 4th required parameter information and described
Authentication information needed for ftp server, sends the 5th FTP requests to the ftp server, and the 5th FTP is asked for institute
State the network equipment and obtain startup required configuration file corresponding configuration file mark when automatically configuring, if the network equipment from
The ftp server receives the corresponding configuration file mark of required configuration file when startup is automatically configured, then into step
604, otherwise into step 605.
604th, the network equipment sends the 6th FTP requests to the ftp server, and the 6th FTP is asked for institute
State the network equipment and obtain and start configuration file required when automatically configuring, and the 6th FTP requests are carried described in access
Authentication information needed for ftp server, configuration file mark;If the network equipment is received from the ftp server
Required configuration file when automatically configuring to startup, into step 606;Step 605 is entered otherwise.
605th, the network equipment is according to the address information of the ftp server in the 4th required parameter information and described
Authentication information needed for ftp server, sends the 7th FTP requests to the ftp server, and the 7th FTP is asked for institute
State and when the network equipment starts configuration, obtain public configuration file, and the 7th FTP requests carry the access FTP service
Authentication information needed for device;If the network equipment receives public configuration file from the ftp server, into step
606。
606th, the network equipment carries out device configuration according to the configuration file for receiving.
607th, terminate to automatically configure flow process.
In addition, especially, it should be noted that, start in the network equipment and automatically configure and configuration file loading is completed
Afterwards, the network management system being connected with the network equipment starts detection of connectivity, and such as detection passes through, then the network equipment is matched somebody with somebody automatically
Put flow process to terminate, otherwise send a warning message.
Wherein, detection of connectivity is preferably using by the corresponding network equipment in the logical configuration files of network guard system ping
The mode of IP address, and the result that the network equipment is automatically configured is shown upon completion of the assays.And pass-through mode three completes network and sets
In the standby configuration file for automatically configuring, the IP address of the corresponding network equipment is identified not comprising configuration file, so, it is impossible to carry out
The inspection of connectivity, after the completion of the network equipment is automatically configured, directly terminates to automatically configure flow process.Wherein, the network management system
For managing and monitoring the terminal unit in the network.
The method that a kind of startup network equipment provided in an embodiment of the present invention is automatically configured, by starting certainly in the network equipment
The method that the control port of the detection network equipment is shorted situation before dynamic configuration, judges whether this network equipment is in enter
Under the non-automatic configuration scene of row configuration, compared in prior art, only before starting the network equipment and automatically configuring, detecting system is
It is no to start to determine the need for carrying out the mode that the network equipment is automatically configured for empty configuration, increased and whether judge control port
The step of being shorted, during so as to not being shorted in the control port for detecting the network equipment, determine the network equipment in it is non-from
Dynamic configuration scene, therefore do not start the network equipment and automatically configure, solve in prior art under the scene of non-automatic configuration according to
The network equipment for automatically configuring flow process and causing can so be entered and start the slow, problem of bandwidth waste.
A kind of network equipment provided in an embodiment of the present invention, as shown in fig. 7, to realize as shown in arbitrary in Fig. 1 to Fig. 6
Method flow, the network equipment includes:
Whether detection module 71, for judging whether the control port of the place network equipment is shorted and being that empty configuration is opened
It is dynamic, when the control port for judging the place network equipment is shorted and starts for empty configuration, notifies that starting module starts and match somebody with somebody automatically
Put;
Starting module 72, for the notice according to detection module 71, enters the place network equipment and automatically configures flow process.
In addition, the detection module 71 is additionally operable to the level letter of previously selected at least two pin for detecting control port
Number;Adjust the level signal of any one in previously selected at least two pin;Again detect described Yu Xianxuanding
At least two pins level signal;Before adjusting, the level signal of each previously selected pin of control port is identical,
And when the level signal of each previously selected pin is identical after adjusting, determine that the control port of the network equipment is short
Connect;When the level signal difference of each previously selected pin of control port before adjustment, or, after adjustment, control port is each
When the level signal of individual previously selected pin is different, determine that the control port of the network equipment is not shorted.;
The starting module 72, is additionally operable to the place network equipment into after automatically configuring flow process, first by all data terminals
The isolation of mouth enable port.
In addition, as shown in figure 8, the starting module 72 includes:
Acquiring unit 81, for obtain obtain when the place network equipment starts and automatically configures needed for configuration file first please
Parameter information, the first required parameter information is asked to include the address information of ftp server, access needed for the ftp server
Authentication information;
Transmitting element 82, for when the first required parameter information for obtaining includes that configuration file is identified, according to FTP
The address information of server, sends FTP requests to the ftp server, and a FTP is asked for obtaining place net
Network equipment starts configuration file required when automatically configuring, and FTP requests carry the access ftp server
Required authentication information, configuration file mark;And/or be additionally operable to not include when the first required parameter information for obtaining
When configuration file is identified, according to the address information of ftp server, the 2nd FTP requests are sent to the ftp server, described the
Two FTP ask for obtain the place network equipment start automatically configure when the corresponding configuration file of required configuration file, and institute
State the 2nd FTP requests and carry the authentication information accessed needed for the ftp server;And/or be additionally operable to when described for obtaining
When one required parameter information does not include that configuration file is identified, according to the address information of ftp server, send out to the ftp server
The 3rd FTP is sent to ask, the 3rd FTP asks to obtain public configuration file when starting and automatically configure for the network equipment,
And the 3rd FTP requests carry the authentication information accessed needed for the ftp server;
Receiving unit 83, is matched somebody with somebody with described for receive that the ftp server asks in response to a FTP and send
Put the corresponding configuration file of file identification;With or, asking in response to the 2nd FTP and sending out for receiving the ftp server
Send with the configuration file corresponding configuration file of mark;With or, for receiving the ftp server in response to the described 3rd
The public configuration file that FTP is asked and sent;
Dispensing unit 84, carries out device configuration according to the configuration file for receiving.
A kind of network equipment provided in an embodiment of the present invention, by detecting that network sets before the network equipment starts and automatically configures
The method that standby control port is shorted situation, judges whether this network equipment is in the non-automatic configuration that need not be configured
Under scene, compared in prior art, only before starting the network equipment and automatically configuring, whether detecting system is that empty configuration startup comes true
It is fixed whether to need to carry out the mode that the network equipment is automatically configured, increased and the step of whether control port is shorted judged, so as to
When the control port for detecting the network equipment is not shorted, the network equipment is determined in non-automatic configuration scene, therefore not
Start the network equipment to automatically configure, can still enter under the scene of non-automatic configuration in solving prior art and automatically configure stream
Journey and the network equipment that causes starts the slow, problem of bandwidth waste.
Through the above description of the embodiments, those skilled in the art can be understood that the present invention can be borrowed
Software is helped to add the mode of required common hardware to realize, naturally it is also possible to which by hardware, but the former is more preferably in many cases
Embodiment.Based on such understanding, the portion that technical scheme is substantially contributed to prior art in other words
Divide and can be embodied in the form of software product, the computer software product is stored in the storage medium that can read, such as count
The floppy disk of calculation machine, hard disk or CD etc., use so that a computer equipment including some instructions(Can be personal computer,
Server, or the network equipment etc.)Perform the method described in each embodiment of the invention.
The above, the only specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, any
Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all be contained
Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be defined by the scope of the claims.