Summary of the invention
The shortcoming of prior art in view of the above, the object of the present invention is to provide a kind of control method of switch, system and there is the switch of this system, need utilize external PC or take down notes original configuration switch for solving in prior art, or can only by the problem of several button easy configuration switches limited in front panel.
For achieving the above object and other relevant objects, the invention provides a kind of control method of switch, be applied to comprise switch and mobile terminal communication network, the control method of described switch comprises the following steps: make switch and mobile terminal shake hands to establish a communications link; Judge whether described switch is in normal operating conditions, if so, performs next step; If not, then the abnormal operation information of described switch is shown; Input configuration key is to judge whether described mobile terminal has configuration authority; If so, then output order input command to make the instruction of user's input configuration to configure the working attributes of described switch; If not, then return and judge whether described switch is in the step of normal operating conditions; Wherein, judge that basis for estimation that whether described switch is in normal operating conditions is that the packet that whether mobile terminal can be sent according to described switch is complete inerrably from source address, namely mobile terminal is transferred to destination address, if, then represent that switch is in normal operating conditions, if not, then represent that switch is in abnormal operation.Alternatively, the control method of described switch also comprises the normal operating conditions information showing described switch.
Alternatively, the normal operating conditions information of described switch comprises the linking status of described switch network port, the start-up course of described switch; Described switch normal operating conditions information can be kept in the memory of described switch with the form of text document; The abnormal operation information of described switch comprises the link interruption of the described network port, described switch power down, described switch packet loss.
Alternatively, the control method of described switch also comprises and judges whether described switch completes configuration according to user's actual need, if so, then returns and judges whether described switch is in the step of normal operating conditions; If not, then output order input command is returned to make the instruction of user's input configuration to configure the step of the working attributes of described switch.
Alternatively, configure described switch and refer to the working attributes reconfiguring switch, the working attributes of described switch comprises switch name, switch pin, IP address, subnet mask, default gateway.
The present invention also provides a kind of control system of switch on the other hand, be applied to comprise switch and mobile terminal communication network, the control system of described switch comprises: control module of shaking hands, and shakes hands to establish a communications link for making switch and mobile terminal; First judge module, be connected with described control module of shaking hands, for judging whether described switch is in normal operating conditions, if so, call for the input module of input configuration key with for judging whether described mobile terminal has the second judge module of configuration authority; If not, then the first display module of the abnormal operation information for showing described switch is called; If described second judge module judges that described mobile terminal has configuration authority, then continue to call order for exporting input configuration instruction to make the instruction of user's input configuration to configure the order output module of the working attributes of described switch; If described second judge module judges that described mobile terminal does not have configuration authority, then the first judge module described in re invocation; Wherein, described first judge module is configured with for judging whether described switch is in the basis for estimation of normal operating conditions, whether described basis for estimation is can by complete inerrably from source address for the packet of mobile terminal transmission according to described switch, namely mobile terminal is transferred to destination address, if, then represent that switch is in normal operating conditions, if not, then represent that switch is in abnormal operation.。
Alternatively, the control system of described switch also comprises the second display module be connected with described first judge module and the second judge module respectively, and described second display module is for showing the normal operating conditions information of described switch.
Alternatively, the control system of described switch also comprises the 3rd judge module be connected with described input module, described 3rd judge module is used for judging whether described switch completes configuration according to user's actual need, if so, then the first judge module described in re invocation; If not, then input module described in re invocation.
Another aspect of the invention also provides a kind of switch, and described switch comprises: the control system of switch.
Alternatively, described switch also comprises: the ethernet physical layer transceiver module be connected with the control system of described switch, for transmitting the Frame of the control system from described switch in bit stream mode.
As mentioned above, the control method of switch of the present invention, system and have the switch of this system, have following beneficial effect:
The control method of switch of the present invention, system and the switch with this system understand the running status of switch by mobile terminal, and configure whenever and wherever possible without the need to any data wire and manage switch.
Embodiment
Below by way of specific instantiation, embodiments of the present invention are described, those skilled in the art the content disclosed by this specification can understand other advantages of the present invention and effect easily.The present invention can also be implemented or be applied by embodiments different in addition, and the every details in this specification also can based on different viewpoints and application, carries out various modification or change not deviating under spirit of the present invention.It should be noted that, when not conflicting, the feature in following examples and embodiment can combine mutually.
It should be noted that, the diagram provided in following examples only illustrates basic conception of the present invention in a schematic way, then only the assembly relevant with the present invention is shown in graphic but not component count, shape and size when implementing according to reality is drawn, it is actual when implementing, and the kenel of each assembly, quantity and ratio can be a kind of change arbitrarily, and its assembly layout kenel also may be more complicated.
Embodiment one
The present embodiment provides a kind of control method of switch, be applied to comprise switch and mobile terminal communication network.Refer to Fig. 1, be shown as the control method schematic flow sheet of switch.As shown in Figure 1, the control method of described switch comprises following step:
S1, makes switch and mobile terminal shake hands to establish a communications link.In the present embodiment, described switch and mobile terminal are shaken hands and are comprised three-way handshake:
First time shakes hands: described mobile terminal sends connection request to described switch by radio connection;
Second handshake, after described switch receives the connection request of described mobile terminal transmission, if switch is agreed to connect, then returns confirmation message;
Third time shakes hands, and described mobile terminal provides another confirmation message again to determine to establish a communications link between described switch and described mobile terminal after receiving the confirmation message that described switch returns to switch.
S2, judges whether described switch is in normal operating conditions, if so, performs next step S3, proceeds to step S5 after execution of step S3; If not, then perform step S4, namely show the abnormal operation information of described switch.In the present embodiment, judge that basis for estimation that whether described switch is in normal operating conditions is that the packet that whether mobile terminal can be sent according to described switch is complete inerrably from source address, namely mobile terminal is transferred to destination address, if, then represent that switch is in normal operating conditions, if not, then represent that switch is in abnormal operation.
S3, shows the normal operating conditions information of described switch.The work state information of described switch refers to the various information that switch produces in normal course of operation, in the memory generally all can changed planes with the form the preserving existence intersection property of text document, such as, in Flash, just can be seen by the dependent instruction of switch.Generally, the normal operating conditions information of described switch comprises the information such as the linking status of described switch network port, the start-up course of described switch.
S4, shows the abnormal operation information of described switch.The abnormal operation information of described switch comprises the information such as the link interruption of the described network port, described switch power down, described switch packet loss.
S5, according to the described password of input, input configuration key also judges whether described mobile terminal has configuration authority; If so, then step S6 is performed; If not, then return step S2, namely return and judge whether described switch is in the step of normal operating conditions.In the present embodiment, judge whether described mobile terminal has the foundation configuring authority whether consistent with the web-privilege password Web be pre-stored in described switch for judging the configuring cipher key inputted, if consistent, then represent that mobile terminal has configuration authority, if inconsistent, then represent that mobile terminal does not have configuration authority.And to be described switch configuration authority be for the consideration of switch management and safety.Such as, built-in 16 grades of Permission Levels in cisco switch, the scope of Permission Levels is from 0 to 15, and each Permission Levels can configure separately its password; Rank 15 has the authority of highest level, provides switch access rights completely; And the order that rank 0 can use and configuration very limited.
S6, output order input command is to make the instruction of user's input configuration to configure the working attributes of described switch.In the present embodiment, the described switch of described configuration refers to the working attributes reconfiguring switch, and the working attributes of described switch comprises switch name, switch pin, IP address, subnet mask, default gateway.Configuring described switch is realize the configuration of switch by the instruction of input relevant configuration, such as, configures certain Cisco's money switch and creates switch name instruction and switch pin instruction:
Switch (config) #username (switch name) password (switch pin).
According to user's actual need, S7, judges whether described switch completes configuration, if so, then returns step S2, namely return and judge whether described switch is in the step of normal operating conditions; If not, then return step S6, namely return output order input command to make the instruction of user's input configuration to configure the step of the working attributes of described switch, until reach user's actual need to terminate this control method.
The control method of the switch described in the present embodiment understands the running status of switch by mobile terminal, and configures whenever and wherever possible without the need to any data wire and manage switch.
Embodiment two
The present embodiment provides a kind of control system 1 of switch, be applied to comprise switch and mobile terminal communication network, described mobile terminal is smart mobile phone, panel computer etc., and in the present embodiment, described mobile terminal is a smart mobile phone.Refer to Fig. 2, be shown as the theory structure schematic diagram of the control system of switch.As shown in Figure 2, the control system 1 of described switch comprises: handshake module 11, first judge module 12, first display module 13, second display module 14, order output module 15, input module 16, second judge module 17 and the 3rd judge module 18.
Described control module 11 of shaking hands shakes hands to establish a communications link for making switch and mobile terminal.In the present embodiment, described switch and mobile terminal are shaken hands and are comprised three-way handshake:
First time shakes hands: described mobile terminal sends connection request to described switch by radio connection;
Second handshake, after described switch receives the connection request of described mobile terminal transmission, if switch is agreed to connect, then returns confirmation message;
Third time shakes hands, and described mobile terminal provides another confirmation message again to determine to establish a communications link between described switch and described mobile terminal after receiving the confirmation message that described switch returns to switch.
Described handshake module 11 is for completing second handshake.In the present embodiment, described in control module 11 of shaking hands comprise wireless communication unit, such as WIFI unit, described WIFI cell location has antenna so that with described mobile terminal wireless connections.In the present embodiment, control module 11 is shaken hands also for maintaining the communication link set up between switch and mobile terminal and discharging, and when switch communicates with multiple mobile terminal, in order to the distribution of ruling resource described in.
The first judge module 12 be connected with described handshake module 11, for judging whether described switch is in normal operating conditions, if not, calls the first display module 13 of the abnormal operation information for showing described switch.The abnormal operation information of described switch comprises the information such as the link interruption of the described network port, described switch power down, described switch packet loss.If so, the second display module 14, described order output module 15, described input module 16 and described second judge module 17 that are connected with the first judge module 12 and the second judge module 17 of the normal operating conditions information for showing described switch is then called.The work state information of described switch refers to the various information that switch produces in normal course of operation, in the memory generally all can changed planes with the form the preserving existence intersection property of text document, such as, in Flash, just can be seen by the dependent instruction of switch.Generally, the normal operating conditions information of described switch comprises the information such as the linking status of described switch network port, the start-up course of described switch.The order input configuration key of described input module 16 for exporting according to described order output module 15.Described second judge module 17 be connected with described order output module 15 and described input module 16 is for judging whether described mobile terminal has configuration authority.In the present embodiment, described first judge module 12 prestores and judges whether described switch is in the basis for estimation of normal operating conditions, whether this basis for estimation is can by complete inerrably from source address for the packet of mobile terminal transmission according to described switch, namely mobile terminal is transferred to destination address, if, then represent that switch is in normal operating conditions, if not, then represent that switch is in abnormal operation.
When described second judge module 17 judges that described mobile terminal has configuration authority, then continue to call described order output module 15, described order output module 15 is for exporting the order of input configuration instruction to make the instruction of user's input configuration to configure the working attributes of described switch; When described second judge module 17 judges that described mobile terminal does not have configuration authority, namely call described first judge module 12, rejudge described switch and whether be in normal operating conditions.In the present embodiment, described second judge module 17 prestores and judges whether described mobile terminal has the foundation of configuration authority, this foundation is judge that whether the configuring cipher key inputted is consistent with the web-privilege password Web be pre-stored in described switch, if consistent, then represent that mobile terminal has configuration authority, if inconsistent, then represent that mobile terminal does not have configuration authority.And to be described switch configuration authority be for switch management and safety consideration such as, built-in 16 grades of Permission Levels in cisco switch, the scope of Permission Levels is from 0 to 15, and each Permission Levels can configure separately its password; Rank 15 has the authority of highest level, provides switch access rights completely; And the order that rank 0 can use and configuration very limited.In the present embodiment, the described switch of described configuration refers to the working attributes reconfiguring switch, and the working attributes of described switch comprises switch name, switch pin, IP address, subnet mask, default gateway.Configuring described switch is realize the configuration of switch by the instruction of input relevant configuration, such as, configures certain Cisco's money switch and creates switch name instruction and switch pin instruction:
Switch (config) #username (switch name) password (switch pin).
In the present embodiment, if described second judge module 17 judges that described mobile terminal has configuration authority, then continue to call order for exporting input configuration instruction to make the instruction of user's input configuration to configure the order output module 15 of the working attributes of described switch; If described second judge module 17 judges that described mobile terminal does not have configuration authority, then the first judge module 12 described in re invocation.
The 3rd judge module 18 be connected with described input module 16 and the second judge module 17 for judging according to user's actual need whether described switch completes configuration, if so, then the first judge module 12 described in re invocation; If not, then input module 16 described in re invocation in case according in described input module 16 input configuration-direct reconfigure described switch.
In the present embodiment, shaking hands in the control system 1 of described switch between control module 11, first judge module 12, first display module 13, second display module 14, order output module 15, input module 16, second judge module 17 and the 3rd judge module 18 adopts PCIE to be connected.
The control system of the switch described in the present embodiment can make the running status being understood switch by mobile terminal, and configures whenever and wherever possible without the need to any data wire and manage switch.
The present embodiment also provides a kind of switch 2, refers to Fig. 3, is shown as the theory structure schematic diagram of switch.As shown in Figure 3, described switch 2 control system 21, the ethernet physical layer transceiver module 22 that is connected with the control system of described switch that comprise switch described above.Described ethernet physical layer transceiver module 22 is for transmitting the Frame of the control system 21 from described switch in bit stream mode.
In sum, the control method of switch of the present invention, system and the switch with this system understand the running status of switch by mobile terminal, and configure whenever and wherever possible without the need to any data wire and manage switch.So the present invention effectively overcomes various shortcoming of the prior art and tool high industrial utilization.
Above-described embodiment is illustrative principle of the present invention and effect thereof only, but not for limiting the present invention.Any person skilled in the art scholar all without prejudice under spirit of the present invention and category, can modify above-described embodiment or changes.Therefore, such as have in art usually know the knowledgeable do not depart from complete under disclosed spirit and technological thought all equivalence modify or change, must be contained by claim of the present invention.