CN107979497A - A kind of method of automatic configuration and device - Google Patents
A kind of method of automatic configuration and device Download PDFInfo
- Publication number
- CN107979497A CN107979497A CN201711431162.0A CN201711431162A CN107979497A CN 107979497 A CN107979497 A CN 107979497A CN 201711431162 A CN201711431162 A CN 201711431162A CN 107979497 A CN107979497 A CN 107979497A
- Authority
- CN
- China
- Prior art keywords
- server
- port
- parameter
- configuration
- port mode
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0876—Aspects of the degree of configuration automation
- H04L41/0886—Fully automatic configuration
Landscapes
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a kind of method of automatic configuration and device, method includes:Receive the server parameter of server to be configured;The server parameter includes server ip, the shelf position and server wire size of server;Obtain configuration parameter corresponding with the server parameter;Configuration parameter corresponding with the server parameter, including:Virtual local area network No. corresponding with the server ip, interchanger IP corresponding with the shelf position of the server, switch ports themselves number corresponding with the server wire size;Network configuration is carried out based on the configuration parameter;It is described that network configuration is carried out based on the configuration parameter, including:The virtual local area network No., target port port corresponding with the switch ports themselves number obtained for parsing are configured on the target port of the corresponding target switch of the interchanger IP;It can be seen from the above that the present invention can realize automatically configuring for the network equipment based on the server parameter of acquisition, improve work efficiency.
Description
Technical field
The present invention relates to technical field is automatically configured, a kind of method of automatic configuration and device are more particularly to.
Background technology
With the fast development of internet, the quantity that each company manages the network equipment is also increasing, the network equipment
Realization is automatically configured as trend.
At present, network management system is used for realization automatically configuring for the network equipment, is mainly used in matching somebody with somebody for automated execution repeatability
Put management role, batch configuration bulk device.Specifically, network management system is built-in with abundant parameter configuration template, so as to fulfill
Batch application is into tens even hundreds of routers or switch device;A large amount of networks can also be completed in a short time to set
Standby parameter configuration, quickly performs the network rebuilding, device upgrade etc..
But for the network equipment in daily O&M, since network parameter renewal is frequent, network management system can not obtain in advance
Know its network configuration parameters, therefore can not realize automatically configuring for the network equipment in daily O&M.At present, rely primarily on manually
Configured manually, work efficiency is low.
The content of the invention
In view of this, the present invention provides a kind of method of automatic configuration and device, to realize the network equipment in daily O&M
Automatically configure, improve work efficiency.
To achieve the above object, the present invention provides following technical solution:
A kind of method of automatic configuration, including:
Receive the server parameter of server to be configured;The server parameter includes server ip, the rack of server
Position and server wire size;
Obtain configuration parameter corresponding with the server parameter;Wherein, configuration ginseng corresponding with the server parameter
Number, including:Virtual local area network No. corresponding with the server ip, interchanger corresponding with the shelf position of the server
IP, switch ports themselves number corresponding with the server wire size;
Network configuration is carried out based on the configuration parameter;Wherein, it is described that network configuration, bag are carried out based on the configuration parameter
Include:
The virtual local area network No. is configured on the target port of the corresponding target switch of the interchanger IP, wherein,
Target port port corresponding with the switch ports themselves number obtained for parsing.
Preferably, the configuration parameter further includes:The port mode that need to be configured;
It is described that network configuration is carried out based on the configuration parameter, further include:
Obtain the current port mode of the target port of the corresponding target switch of the interchanger IP;
Judge whether the port mode is the port mode that need to be configured;
If it is not, the port mode is switched to the port mode to be configured.
Preferably, the server parameter further includes the MAC Address of the server;This method further includes:
Judge whether PING leads to the server ip;
If so, obtain the port learnt in the corresponding target switch of the interchanger IP for the server ip
Number and MAC Address;
Judge whether the port numbers for learning to obtain and the obtained switch ports themselves number that parses are consistent, described in judgement
Whether the MAC Address for learning to obtain is consistent with the MAC Address of the server;
If consistent, into described the step of carrying out network configuration based on the configuration parameter.
Preferably, further include:
When the PING of the server ip is obstructed, the target port of the corresponding target switch of the interchanger IP is obtained
Flow value;
Judge whether the flow value is less than threshold value;
If so, enter described the step of network configuration is carried out based on the configuration parameter.
Preferably, further include:
When the flow value is more than the threshold value, the current port mode of the target port is obtained;
Judge whether the port mode is default port mode;
If so, enter described the step of network configuration is carried out based on the configuration parameter.
Preferably, further include:
Computer room number residing for the server is determined based on the server ip;
Judge whether computer room number residing for the server is to automatically configure computer room number;
If so, enter described the step of network configuration is carried out based on the configuration parameter.
One kind automatically configures device, it is characterised in that including:
Parameters unit is received, for receiving the server parameter of server to be configured;The server parameter includes service
Device IP, the shelf position and server wire size of server;
Get parms unit, for obtaining configuration parameter corresponding with the server parameter;Wherein, with the server
The corresponding configuration parameter of parameter, including:Virtual local area network No. corresponding with the server ip, the rack position with the server
Corresponding interchanger IP is put, switch ports themselves number corresponding with the server wire size;
Network configuration element, network configuration is carried out based on the configuration parameter;Wherein, the network configuration element includes the
One configuration module, for configuring the virtual LAN on the target port of the corresponding target switch of the interchanger IP
Number, wherein, target port port corresponding with the switch ports themselves number obtained for parsing.
Preferably, the configuration parameter further includes:The port mode that need to be configured;
The network configuration element further includes:
First port module, the current port of target port for obtaining the corresponding target switch of the interchanger IP
Pattern;
First judgment module, for judging whether the port mode is the port mode that need to be configured;
First handover module, for the port mode be not it is described need to configure port mode when, by the port
Pattern switching is the port mode to be configured.
Preferably, the server parameter further includes the MAC Address of the server;The device further includes:
First judging unit, for judging whether PING leads to the server ip;
First acquisition unit, for when the PING of the server ip is logical, obtaining the corresponding targets of the interchanger IP
The port numbers and MAC Address learnt in interchanger for the server ip;
Second judging unit, for judging that the port numbers for learning to obtain parse obtained switch ports themselves number with described
It is whether consistent, judge whether the MAC Address for learning to obtain is consistent with the MAC Address of the server;
First trigger element, for when consistent, triggering the network configuration element.
Preferably, further include:
Second acquisition unit, for when the PING of the server ip is obstructed, obtaining the corresponding mesh of the interchanger IP
Mark the flow value of the target port of interchanger;
3rd judging unit, for judging whether the flow value is less than threshold value;
Second trigger element, for when flow value is less than threshold value, triggering the network configuration element.
Preferably, further include:
3rd acquiring unit, for when the flow value is more than the threshold value, obtaining the current end of the target port
Mouth mold formula;
4th judging unit, for judging whether the port mode is default port mode;
3rd trigger element, for when the port mode is default port mode, triggering the network configuration element.
Preferably, further include:
First determination unit, for determining computer room number residing for the server based on the server ip;
5th judging unit, for judging whether computer room number residing for the server is to automatically configure computer room number;
4th trigger element, for when computer room number residing for the server is to automatically configure computer room, triggering the net
Network dispensing unit.
It can be seen via above technical scheme that compared with prior art, the embodiment of the invention discloses one kind to automatically configure
Method, including:The server parameter of server to be configured is received, obtains configuration parameter corresponding with the server parameter, its
In, configuration parameter corresponding with the server parameter, including:Virtual local area network No. corresponding with the server ip;With institute
State the corresponding interchanger IP of shelf position of server;Switch ports themselves number corresponding with the server wire size, so as to be based on
Configure parameter and carry out network configuration, specifically, configuring institute on the target port of the corresponding target switch of the interchanger IP
Virtual local area network No. is stated, wherein, target port port corresponding with the switch ports themselves number obtained for parsing, thus may be used
See, the present invention can realize automatically configuring for the network equipment based on the server parameter of acquisition, improve work efficiency.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is attached drawing needed in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
The embodiment of invention, for those of ordinary skill in the art, without creative efforts, can also basis
The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of flow diagram of method of automatic configuration disclosed in one embodiment of the invention;
Fig. 2 is a kind of flow diagram of method of automatic configuration disclosed in another embodiment of the present invention;
Fig. 3 is a kind of flow diagram of method of automatic configuration disclosed in further embodiment of this invention;
Fig. 4 is a kind of flow diagram of method of automatic configuration disclosed in further embodiment of this invention;
Fig. 5 is a kind of structure diagram for automatically configuring device disclosed in one embodiment of the invention;
Fig. 6 is the structure diagram of network configuration element disclosed in another embodiment of the present invention;
Fig. 7 is a kind of structure diagram for automatically configuring device disclosed in further embodiment of this invention;
Fig. 8 is a kind of structure diagram for automatically configuring device disclosed in further embodiment of this invention.
Embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other without making creative work
Embodiment, belongs to the scope of protection of the invention.
One embodiment of the invention discloses a kind of method of automatic configuration, as shown in Figure 1, comprising the following steps:
Step 101:Receive the server parameter of server to be configured;
It should be noted that method of automatic configuration of the invention can be applied in automatic configuration system, mainly for daily
The network equipment in O&M automatically configures, when the server being connected in daily O&M with interchanger has altered, then user
The server parameter of server to be configured can be sent to automatic configuration system.
The automatic configuration system can be used for communicating with resource management platform, and resource management platform sets for management network
The platform of standby various basic information parameters, for example, the basis such as the IP of each network equipment, MAC Address, shelf position, wire size
Information parameter.When user, which has, automatically configures demand, it can apply for that server configures work order, resource on resource management platform
Management platform can be based on server configuration work order generation server parameter, and send it to automatic configuration system.
Wherein, which includes server ip, the shelf position and server wire size of server.
Step 102:Obtain the corresponding configuration parameter of the server parameter;
Specifically, configuration parameter corresponding with the server parameter includes:Virtual office corresponding with the server ip
Domain network No., interchanger IP corresponding with the shelf position of the server, switch port corresponding with the server wire size
Number.
Wherein, each server ip is corresponding with a virtual local area network No..And the shelf position of server is referred to as taking
Device be engaged in the really position on the spot of computer room, the rack wiring to server, interchanger in computer room is regular.For example, one
A 10 servers of rack management, an interchanger can connect 40 servers, then an interchanger can cover 4 machines
Frame, that is to say, that the corresponding interchanger of 4 racks is same interchanger.Therefore, can be determined based on the shelf position of server
Go out to manage the interchanger IP of the server, and the switch port that can determine to be connected with the server based on server wire size
Number.Specifically, server parameter can be previously stored with configuring the correspondence of parameter, so as to be determined based on server parameter
Corresponding configuration parameter.
Step 103:Network configuration is carried out based on the configuration parameter.
Specifically include:The virtual LAN is configured on the target port of the corresponding target switch of the interchanger IP
Number.Wherein, target port port corresponding with the switch ports themselves number obtained for parsing.
It should be noted that before network configuration is carried out based on configuration parameter, in an alternative embodiment of the invention, can be with
Including being detected to the integrality for configuring parameter, i.e., whether detection configuration parameter includes virtual local area network No., and interchanger IP, is handed over
Port numbers of changing planes (in following embodiment, if desired for using other specification, can also judge, such as the MAC of server here
Location), it is such as complete, then network configuration is carried out based on configuration parameter, if imperfect, can not carry out automatically configuring turning by people
Work processing.
It can be seen from the above that in the present embodiment, by receiving the server parameter of server to be configured, obtain and the server
The corresponding configuration parameter of parameter, wherein, configuration parameter corresponding with the server parameter, including:With the server ip pair
The virtual local area network No. answered;Interchanger IP corresponding with the shelf position of the server;It is corresponding with the server wire size
Switch ports themselves number, so that network configuration is carried out based on configuration parameter, specifically, being exchanged in the corresponding targets of the interchanger IP
The virtual local area network No. is configured on the target port of machine, wherein, the target port and the switch port obtained for parsing
Number corresponding port, it can be seen that, the present invention can realize automatically configuring for the network equipment based on the server parameter of acquisition,
Improve work efficiency.
In an alternative embodiment of the invention, the configuration to the port mode of interchanger can also be realized, specifically, server
Parameter can also include the port mode that need to be configured, correspondingly, configuration parameter also further includes the port mode that need to be configured.Such as
Shown in Fig. 2, a kind of method of automatic configuration comprises the following steps:
Step 201:Receive the server parameter of server to be configured;
Wherein, the server parameter includes server ip, the shelf position of server, server wire size and needs to configure
Port mode.
Step 202:Obtain configuration parameter corresponding with the server parameter;
Wherein, configuration parameter corresponding with the server parameter, including:Virtual local area corresponding with the server ip
Network No., interchanger IP corresponding with the shelf position of the server, switch ports themselves number corresponding with the server wire size,
Since the port mode that need to be configured can be obtained directly from server parameter, then, can directly it determine in server parameter
The port mode that need to be configured is configuration parameter.
Step 203:Obtain the current port mode of the target port of the corresponding target switch of the interchanger IP;
Wherein, target port port corresponding with the switch ports themselves number obtained for parsing.
The port mode of interchanger generally comprises two kinds of pattern, and one kind passes through for only one virtual LAN of permission
Pattern, i.e., only allow the patterns that pass through of IP of a network segment, this port mode is known as first kind port mode (can also
Referred to as access port modes).Another kind allows multiple and different nets to allow the pattern that multiple virtual LAN pass through
The pattern that the IP of section passes through, this port mode, which is properly termed as Second Type port mode, (can also be referred to as trunk ports mould
Formula).
Due to having the port mould of the port mode configured before or default acquiescence on the target port of target switch
Formula, the port mode current therefore, it is necessary to obtain the target port.Such as, port mode current on the target port of acquisition is
First kind port mode.
Step 204:Judge whether the port mode is the port mode that need to be configured, if it is not, 205 are entered step,
If so, enter step 206;
Step 205:The port mode is switched to the port mode to be configured;
, need to be to the current of target port when the current port mode of target port and the inconsistent port mode that need to be configured
Port mode switch over, the port mode that need to such as configure is Second Type port mode, then, it is necessary to by target port work as
Preceding first kind port mode is switched to Second Type port mode.206 are entered step after port mode is switched.
Step 206:The virtual LAN is configured on the target port of the corresponding target switch of the interchanger IP
Number.
Port mode such as current to target port is switched, then after port switching pattern, is exchanged in the target
Configuring virtual LAN number on the target port of machine, such as port mode not current to target port switch over, then directly
The configuring virtual LAN number on the target port of the target switch.
It should be noted that above-mentioned steps 203-206 is the specific implementation matched somebody with somebody based on the configuration parameter progress network.
It can be seen from the above that the present invention can realize automatically configuring for the network equipment based on the server parameter of acquisition, improve
Work efficiency.
In the present invention, in order to ensure the accuracy automatically configured, before network configuration is carried out based on configuration parameter, need
First the accuracy of the parameter of acquisition is judged, further embodiment of this invention discloses a kind of method of automatic configuration, such as Fig. 3 institutes
Show, this method comprises the following steps:
Step 301:Receive the server parameter of server to be configured;
Wherein, which includes server ip, the shelf position of server, server wire size and server
MAC Address.
Step 302:Obtain configuration parameter corresponding with the server parameter;
Wherein, configuration parameter corresponding with the server parameter, including:Virtual local area corresponding with the server ip
Network No., interchanger IP corresponding with the shelf position of the server, switch ports themselves number corresponding with the server wire size.
Step 303:Judge whether PING leads to the server ip, if so, 304 are entered step, if it is not, entering step 306;
Wherein it is possible to judge whether PING leads to server ip using PING instruments.
Step 304:Obtain what is learnt in the corresponding target switch of the interchanger IP for the server ip
Port numbers and MAC Address;
Specifically, can be in target switch by naming inquiry or being directed to the service by snmp protocol crawl
The port numbers and MAC Address that device IP learns.
Step 305:Judge whether the obtained port numbers of study and the switch ports themselves number that parsing obtains are consistent, described in judgement
Whether consistent learn the MAC Address of obtained MAC Address and server, if consistent, enter step 310;If it is not, enter step
311;
When the obtained port numbers of study and switch ports themselves number that parsing obtains are inconsistent, or with learning obtained MAC
Location and the MAC Address of the server are inconsistent, then enter step 311.
Step 306:Obtain the flow value of the target port of the corresponding target switch of the interchanger IP;
In the case that the PING of server ip is obstructed, illustrate that the network under the IP of the server is obstructed, in this case,
Need to judge flow value under the target port of target switch whether very little, specifically, be able to can be captured by snmp protocol
To the flow value of the target port of target switch.
Step 307:Judge whether the flow value is less than threshold value, if it is not, entering step 308;If so, enter step 310;
The threshold value is flow value set in advance, can set a relatively small value.By whether judging flow value
Determine that whether the port that parses based on server signal is correct, if flow value is less than threshold value, illustrates destination end less than threshold value
The port mode of mouth is the pattern for only allowing a virtual LAN to pass through, i.e., the pattern for only allowing the IP of a network segment to pass through,
This port mode is known as first kind port mode (can also be referred to as access port modes).It is possible to carry out certainly
Dynamic configuration process, that is, enter step 310.
Step 308:Obtain the current port mode of the target port;
When flow value is more than threshold value, the current port mode of target port need to be obtained.
Step 309:Judge whether the port mode is default port mode, if so, 310 are entered step, if it is not, into
Step 311;
Default port mode is Second Type port mode, wherein, Second Type port mode can also be referred to as trunk
Port mode, to allow the pattern that multiple virtual LAN pass through, the pattern for as allowing the IP of multiple and different network segments to pass through.
Under this pattern, although the PING of server ip to be configured is obstructed, the PING of other server ips leads to, therefore occurs
Common port flow is very big, more than the situation of threshold value.That is, when the flow value of target port is more than threshold value, if mesh
It is Second Type port mode to mark the current port mode in port, can also carry out automatic configuration process, that is, enter step 310.
It is more than threshold value in the flow value of target port, but the current port mode of target port is not default port mould
Formula, then illustrate that the port numbers that are parsed according to wire size are incorrect, in this case, enter step 311.
Step 310:Network configuration is carried out based on the configuration parameter;
Specifically, configure the virtual LAN on the target port of the corresponding target switch of the interchanger IP
Number, target port port corresponding with the switch ports themselves number obtained for parsing.
Step 311:Stop automatic configuration process.
It can turn by artificial treatment after stopping automatic configuration process.
It should be noted that in the present embodiment, the judgement of various information accuracies being blended together and is described, it is simultaneously
The restriction to automatically configuring is not formed, that is to say, that can only include the judgement of partial information.
It can be seen from the above that the present invention can realize automatically configuring for the network equipment based on the server parameter of acquisition, improve
Work efficiency.Also, before network configuration is carried out based on the configuration parameter, the judgement of advanced row information accuracy, from
And improve the accuracy automatically configured.
Further embodiment of this invention discloses a kind of method of automatic configuration, as shown in figure 4, this method comprises the following steps:
Step 401:Receive the server parameter of server to be configured;
Server parameter includes server ip, the shelf position and server wire size of server.
Step 402:Obtain configuration parameter corresponding with the server parameter;
Wherein, configuration parameter corresponding with the server parameter, including:Virtual local area corresponding with the server ip
Network No., interchanger IP corresponding with the shelf position of the server, switch ports themselves number corresponding with the server wire size.
Step 403:Computer room number residing for the server is determined based on the server ip;
Computer room number residing for server is included in server ip, therefore, by the way that service can be got to server ip parsing
Computer room number residing for device.
Step 404:Judge whether computer room number residing for the server is to automatically configure computer room number, if so, entering step
405, if it is not, entering step 406;
Some computer rooms do not possess the condition automatically configured, can will be provided with automatically configuring condition computer room put be set as it is automatic
Configuration machine room number, so as to judge whether computer room number residing for the server is to automatically configure computer room number.
Step 405:Network configuration is carried out based on the configuration parameter;
Specifically, configure the virtual LAN on the target port of the corresponding target switch of the interchanger IP
Number, wherein, target port port corresponding with the switch ports themselves number obtained for parsing.
Step 406:Stopping currently automatically configuring.
It can turn by artificial treatment after stopping automatic configuration process.
It can be seen from the above that the present invention can realize automatically configuring for the network equipment based on the server parameter of acquisition, improve
Work efficiency.Also, before network configuration is carried out based on the configuration parameter, whether first judge computer room number residing for server
To automatically configure computer room number, when determining that computer room number is automatically configures computer room residing for server, net is carried out based on configuration parameter
Network configures, and improves the accuracy automatically configured.
In still another embodiment of the process, after the completion of automatically configuring, it can detect whether network configuration succeeds, specifically
, can with detection service device IP, whether PING leads to, if PING leads to, illustrate to automatically configure success.
Corresponding with a kind of above-mentioned method of automatic configuration, the invention also discloses one kind to automatically configure device, below by way of
Several embodiments are described in detail.
One embodiment of the invention discloses one kind and automatically configures device, as shown in figure 5, the device includes:Receive parameter
Unit 501, get parms unit 502 and network configuration element 503;Wherein:
Parameters unit 501 is received, for receiving the server parameter of server to be configured;The server parameter includes clothes
Be engaged in device IP, the shelf position and server wire size of server;
It should be noted that the device that automatically configures of the invention can be applied in automatic configuration system, mainly for daily
The network equipment in O&M automatically configures, when the server being connected in daily O&M with interchanger has altered, then user
The server parameter of server to be configured can be sent to automatic configuration system.
The automatic configuration system can be used for communicating with resource management platform, and resource management platform sets for management network
The platform of standby various basic information parameters, for example, the basis such as the IP of each network equipment, MAC Address, shelf position, wire size
Information parameter.When user, which has, automatically configures demand, it can apply for that server configures work order, resource on resource management platform
Management platform can be based on server configuration work order generation server parameter, and send it to automatic configuration system.
Wherein, which includes server ip, the shelf position and server wire size of server.
Get parms unit 502, for obtaining configuration parameter corresponding with the server parameter;
Wherein, configuration parameter corresponding with the server parameter includes:Virtual local area corresponding with the server ip
Network No., interchanger IP corresponding with the shelf position of the server, switch ports themselves number corresponding with the server wire size.
Wherein, each server ip is corresponding with a virtual local area network No..And the shelf position of server is referred to as taking
Device be engaged in the really position on the spot of computer room, the rack wiring to server, interchanger in computer room is regular.For example, one
A 10 servers of rack management, an interchanger can connect 40 servers, then an interchanger can cover 4 machines
Frame, that is to say, that the corresponding interchanger of 4 racks is same interchanger.Therefore, can be determined based on the shelf position of server
Go out to manage the interchanger IP of the server, and the switch port that can determine to be connected with the server based on server wire size
Number.Specifically, server parameter can be previously stored with configuring the correspondence of parameter, so as to be determined based on server parameter
Corresponding configuration parameter.
Network configuration element 503, network configuration is carried out based on the configuration parameter;
Wherein, network configuration element 503 includes the first configuration module, for being exchanged in the corresponding targets of the interchanger IP
The virtual local area network No. is configured on the target port of machine.The target port is corresponding with to parse obtained switch ports themselves number
Port.
It should be noted that before network configuration is carried out based on configuration parameter, in an alternative embodiment of the invention, can be with
Including:First detection unit, for being detected the integrality for configuring parameter, that is, is used to detect whether configuration parameter includes void
Intend local network No., interchanger IP, switch ports themselves number (in following embodiment, can also be herein if desired for using other specification
Place judges, such as the MAC Address of server), such as complete, triggering network configuration element is based on configuration parameter and carries out network configuration, such as
Fruit is imperfect, then can not carry out automatically configuring turning by artificial treatment.
It can be seen from the above that the present invention can realize automatically configuring for the network equipment based on the server parameter of acquisition, improve
Work efficiency.
In an alternative embodiment of the invention, configuration parameter further includes the port mode that need to be configured.Specifically, as shown in fig. 6,
Network configuration element 603 includes:First port module 6031, the first judgment module 6032, the first handover module 6033 and
One configuration module 6034;Wherein:
First port module 6031, target port for obtaining the corresponding target switch of the interchanger IP are current
Port mode;
Wherein, target port port corresponding with the switch ports themselves number obtained for parsing.
The port mode of interchanger generally comprises two kinds of pattern, and one kind passes through for only one virtual LAN of permission
Pattern, i.e., only allow the patterns that pass through of IP of a network segment, this port mode is known as first kind port mode (can also
Referred to as access port modes).Another kind allows multiple and different nets to allow the pattern that multiple virtual LAN pass through
The pattern that the IP of section passes through, this port mode, which is properly termed as Second Type port mode, (can also be referred to as trunk ports mould
Formula).
Due to having the port mould of the port mode configured before or default acquiescence on the target port of target switch
Formula, the port mode current therefore, it is necessary to obtain the target port.Such as, port mode current on the target port of acquisition is
First kind port mode.
First judgment module 6032, for judging whether the port mode is the port mode that need to be configured;
First handover module 6033, for the port mode be not it is described need to configure port mode when, will described in
Port mode is switched to the port mode to be configured;
First configuration module 6034, for configuring institute on the target port of the corresponding target switch of the interchanger IP
State virtual local area network No..
When the first handover module port mode current to target port is switched, then the first configuration module is used for
After first handover module port switching pattern, the configuring virtual LAN number on the target port of target switch;Cut when first
Mold changing block port mode not current to target port switches over, then the first configuration module is used directly in target switch
Target port on configuring virtual LAN number.
It can be seen from the above that the present invention can realize automatically configuring for the network equipment based on the server parameter of acquisition, improve
Work efficiency.
Further embodiment of this invention discloses one kind and automatically configures device, as shown in fig. 7, the device includes:Receive parameter
Unit 701, the unit 702 that gets parms, the first judging unit 703, first acquisition unit 704, the second judging unit 705, first
Trigger element 706, network configuration element 707;Wherein:
Parameters unit 701 is received, for receiving the server parameter of server to be configured;
Wherein, server parameter includes server ip, the shelf position of server, server wire size and server MAC
Address.
Get parms unit 702, for obtaining configuration parameter corresponding with the server parameter;
Wherein, configuration parameter corresponding with the server parameter, including:Virtual local area corresponding with the server ip
Network No., interchanger IP corresponding with the shelf position of the server, switch ports themselves number corresponding with the server wire size.
First judging unit 703, for judging whether PING leads to the server ip;
Wherein, the first judging unit 703 is used for PING instruments to judge whether PING leads to server ip.
First acquisition unit 704, for when the PING of the server ip is logical, obtaining the corresponding mesh of the interchanger IP
The port numbers and MAC Address learnt in mark interchanger for the server ip;
Second judging unit 705, for judging that the port numbers for learning to obtain exchange generator terminal with what the parsing obtained
Whether slogan is consistent, judges whether the MAC Address for learning to obtain is consistent with the MAC Address of the server;
Specifically, the second judging unit 705 can be used in target switch by naming inquiry or passing through SNMP
The port numbers and MAC Address that agreement crawl learns for the server ip.
First trigger element 706, for when consistent, triggering network configuration element 707;
Network configuration element 707, network configuration is carried out based on the configuration parameter;
Wherein, network configuration element 707 includes the first configuration module, for being exchanged in the corresponding targets of the interchanger IP
The virtual local area network No. is configured on the target port of machine.
Wherein, target port port corresponding with the switch ports themselves number obtained for parsing.
In an alternative embodiment of the invention, further included with continued reference to Fig. 7, the device:Second acquisition unit the 708, the 3rd is sentenced
709 and second trigger element 710 of disconnected unit;Wherein:
Second acquisition unit 708, for when the PING of the server ip is obstructed, it is corresponding to obtain the interchanger IP
The flow value of the target port of target switch;
In the case that the PING of server ip is obstructed, illustrate that the network under the IP of the server is obstructed, in this case,
Need to judge flow value under the target port of target switch whether very little, specifically, second acquisition unit 708 can be used for leading to
The flow value of target port of target switch can be grabbed by crossing snmp protocol.
3rd judging unit 709, for judging whether the flow value is less than threshold value;
The threshold value is flow value set in advance, can set a relatively small value.By whether judging flow value
Determine that whether the port that parses based on server signal is correct, if flow value is less than threshold value, illustrates destination end less than threshold value
The port mode of mouth is the pattern for only allowing a virtual LAN to pass through, i.e., the pattern for only allowing the IP of a network segment to pass through,
This port mode is known as first kind port mode (can also be referred to as access port modes).
Second trigger element 710, for when flow value is less than threshold value, triggering the network configuration element.
In an alternative embodiment of the invention, with continued reference to Fig. 7, further include:3rd acquiring unit 711, the 4th judging unit
712 and the 3rd trigger element 713;Wherein:
3rd acquiring unit 711, it is current for when the flow value is more than the threshold value, obtaining the target port
Port mode;
4th judging unit 712, for judging whether the port mode is default port mode;
Default port mode is Second Type port mode, wherein, Second Type port mode can also be referred to as trunk
Port mode, to allow the pattern that multiple virtual LAN pass through, the pattern for as allowing the IP of multiple and different network segments to pass through.
Under this pattern, although the PING of server ip to be configured is obstructed, the PING of other server ips leads to, therefore occurs
Common port flow is very big, more than the situation of threshold value.That is, when the flow value of target port is more than threshold value, if mesh
It is Second Type port mode to mark the current port mode in port, can also carry out automatic configuration process.
3rd trigger element 713, for when the port mode is default port mode, triggering the network configuration list
Member.
In still another embodiment of the process, which can also include:Stop dispensing unit.
Stop dispensing unit, for the obtained port numbers of study and switch ports themselves number that parsing obtains it is inconsistent or
When the MAC Address of the MAC Address that study obtains and the server is inconsistent, stop automatic configuration process;It is additionally operable in target
The current port mode in port is not default port mode, stops automatic configuration process.
Further embodiment of this invention discloses one kind and automatically configures device, as shown in figure 8, the device includes:Receive parameter
Unit 801, the unit 802 that gets parms, the first determination unit 803, the 5th judging unit 804, the 4th trigger element 805 and net
Network dispensing unit 806;Wherein:
Parameters unit 801 is received, for receiving the server parameter of server to be configured;
Server parameter includes server ip, the shelf position of server, server wire size.
Get parms unit 802, for obtaining configuration parameter corresponding with the server parameter;
Wherein, configuration parameter corresponding with the server parameter includes:Virtual local area corresponding with the server ip
Network No., interchanger IP corresponding with the shelf position of the server, switch ports themselves number corresponding with the server wire size.
First determination unit 803, for determining computer room number residing for the server based on the server ip;
Wherein, computer room number residing for server is included in server ip, therefore, by that can be got to server ip parsing
Computer room number residing for server.
5th judging unit 804, for judging whether computer room number residing for the server is to automatically configure computer room number;
Some computer rooms do not possess the condition automatically configured, can will be provided with automatically configuring condition computer room put be set as it is automatic
Configuration machine room number, so as to judge whether computer room number residing for the server is to automatically configure computer room number.
4th trigger element 805, during for automatically configuring computer room when computer room number residing for the server, described in triggering
Network configuration element;
Network configuration element 806, network configuration is carried out based on the configuration parameter.
Wherein, network configuration element 806 includes the first configuration module, for being exchanged in the corresponding targets of the interchanger IP
The virtual local area network No. is configured on the target port of machine.The target port is corresponding with to parse obtained switch ports themselves number
Port.
In an alternative embodiment of the invention, device is automatically configured to further include:Stop dispensing unit, in the server
Residing computer room number is not when automatically configuring computer room, and stopping currently automatically configuring.
In still another embodiment of the process, device is automatically configured to further include:Dispensing unit is detected, for detecting network configuration
Whether succeed, specifically, can with detection service device IP, whether PING leads to, if PING leads to, illustrate to automatically configure success.
Each embodiment is described by the way of progressive in this specification, what each embodiment stressed be and other
The difference of embodiment, between each embodiment identical similar portion mutually referring to.For device disclosed in embodiment
For, since it is corresponded to the methods disclosed in the examples, so description is fairly simple, related part is said referring to method part
It is bright.
The foregoing description of the disclosed embodiments, enables professional and technical personnel in the field to realize or use the present invention.
A variety of modifications to these embodiments will be apparent for those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, it is of the invention
The embodiments shown herein is not intended to be limited to, and is to fit to and the principles and novel features disclosed herein phase one
The most wide scope caused.
Claims (12)
- A kind of 1. method of automatic configuration, it is characterised in that including:Receive the server parameter of server to be configured;The server parameter includes server ip, the shelf position of server And server wire size;Obtain configuration parameter corresponding with the server parameter;Wherein, configuration parameter corresponding with the server parameter, bag Include:Virtual local area network No. corresponding with the server ip, interchanger IP corresponding with the shelf position of the server, with institute State the corresponding switch ports themselves number of server wire size;Network configuration is carried out based on the configuration parameter;Wherein, it is described that network configuration is carried out based on the configuration parameter, including:The virtual local area network No. is configured on the target port of the corresponding target switch of the interchanger IP, wherein, it is described Target port port corresponding with the switch ports themselves number obtained for parsing.
- 2. according to the method described in claim 1, it is characterized in that, the configuration parameter further includes:The port mode that need to be configured;It is described that network configuration is carried out based on the configuration parameter, further include:Obtain the current port mode of the target port of the corresponding target switch of the interchanger IP;Judge whether the port mode is the port mode that need to be configured;If it is not, the port mode is switched to the port mode to be configured.
- 3. method according to claim 1 or 2, it is characterised in that the server parameter further includes the server MAC Address;This method further includes:Judge whether PING leads to the server ip;If so, obtain the port numbers that learn in the corresponding target switch of the interchanger IP for the server ip with And MAC Address;Judge whether the port numbers for learning to obtain and the obtained switch ports themselves number that parses are consistent, judge the study Whether obtained MAC Address is consistent with the MAC Address of the server;If consistent, into described the step of carrying out network configuration based on the configuration parameter.
- 4. according to the method described in claim 3, it is characterized in that, further include:When the PING of the server ip is obstructed, the stream of the target port of the corresponding target switch of the interchanger IP is obtained Value;Judge whether the flow value is less than threshold value;If so, enter described the step of network configuration is carried out based on the configuration parameter.
- 5. according to the method described in claim 4, it is characterized in that, further include:When the flow value is more than the threshold value, the current port mode of the target port is obtained;Judge whether the port mode is default port mode;If so, enter described the step of network configuration is carried out based on the configuration parameter.
- 6. method according to claim 1 or 2, it is characterised in that further include:Computer room number residing for the server is determined based on the server ip;Judge whether computer room number residing for the server is to automatically configure computer room number;If so, enter described the step of network configuration is carried out based on the configuration parameter.
- 7. one kind automatically configures device, it is characterised in that including:Parameters unit is received, for receiving the server parameter of server to be configured;The server parameter includes server ip, The shelf position and server wire size of server;Get parms unit, for obtaining configuration parameter corresponding with the server parameter;Wherein, with the server parameter Corresponding configuration parameter, including:Virtual local area network No. corresponding with the server ip, the shelf position pair with the server The interchanger IP answered, switch ports themselves number corresponding with the server wire size;Network configuration element, network configuration is carried out based on the configuration parameter;Wherein, the network configuration element is matched somebody with somebody including first Module is put, for configuring the virtual local area network No. on the target port of the corresponding target switch of the interchanger IP, its In, target port port corresponding with the switch ports themselves number obtained for parsing.
- 8. device according to claim 7, it is characterised in that the configuration parameter further includes:The port mode that need to be configured;The network configuration element further includes:First port module, the current port mould of target port for obtaining the corresponding target switch of the interchanger IP Formula;First judgment module, for judging whether the port mode is the port mode that need to be configured;First handover module, for the port mode be not it is described need to configure port mode when, by the port mode It is switched to the port mode to be configured.
- 9. the device according to claim 7 or 8, it is characterised in that the server parameter further includes the server MAC Address;Further include:First judging unit, for judging whether PING leads to the server ip;First acquisition unit, for when the PING of the server ip is logical, obtaining the corresponding targets of the interchanger IP and exchanging The port numbers and MAC Address learnt in machine for the server ip;Second judging unit, for judging whether the port numbers for learning to obtain parse obtained switch ports themselves number with described Unanimously, judge whether the MAC Address for learning to obtain is consistent with the MAC Address of the server;First trigger element, for when consistent, triggering the network configuration element.
- 10. device according to claim 9, it is characterised in that the device further includes:Second acquisition unit, is handed over for when the PING of the server ip is obstructed, obtaining the corresponding targets of the interchanger IP The flow value for the target port changed planes;3rd judging unit, for judging whether the flow value is less than threshold value;Second trigger element, for when flow value is less than threshold value, triggering the network configuration element.
- 11. device according to claim 10, it is characterised in that further include:3rd acquiring unit, for when the flow value is more than the threshold value, obtaining the current port mould of the target port Formula;4th judging unit, for judging whether the port mode is default port mode;3rd trigger element, for when the port mode is default port mode, triggering the network configuration element.
- 12. the device according to claim 7 or 8, it is characterised in that further include:First determination unit, for determining computer room number residing for the server based on the server ip;5th judging unit, for judging whether computer room number residing for the server is to automatically configure computer room number;4th trigger element, for when computer room number residing for the server is to automatically configure computer room, triggering the network and matching somebody with somebody Put unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711431162.0A CN107979497B (en) | 2017-12-26 | 2017-12-26 | Automatic configuration method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711431162.0A CN107979497B (en) | 2017-12-26 | 2017-12-26 | Automatic configuration method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107979497A true CN107979497A (en) | 2018-05-01 |
CN107979497B CN107979497B (en) | 2021-08-13 |
Family
ID=62007573
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711431162.0A Active CN107979497B (en) | 2017-12-26 | 2017-12-26 | Automatic configuration method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107979497B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109309633A (en) * | 2018-09-21 | 2019-02-05 | 郑州云海信息技术有限公司 | A kind of whole machine cabinet server node management method and device based on management interchanger |
WO2020082416A1 (en) * | 2018-10-23 | 2020-04-30 | 网宿科技股份有限公司 | Virtual ip port configuration method and apparatus |
WO2020238523A1 (en) * | 2019-05-24 | 2020-12-03 | 深圳云里物里科技股份有限公司 | Gateway configuration method, system, computer storage medium and electronic device |
CN113347046A (en) * | 2021-07-08 | 2021-09-03 | 中国建设银行股份有限公司 | Network access method and device |
CN114095350A (en) * | 2021-11-22 | 2022-02-25 | 中国电信股份有限公司 | Equipment configuration method, service configuration method, device, equipment and medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101242305A (en) * | 2008-02-25 | 2008-08-13 | 中兴通讯股份有限公司 | Parameter configuration method and device for network device |
CN102624557A (en) * | 2012-03-09 | 2012-08-01 | 浪潮通信信息系统有限公司 | Method for automatic check, configuration and backup for client-side equipment configuration |
CN104065758A (en) * | 2013-03-18 | 2014-09-24 | 杭州华三通信技术有限公司 | Active device automatic deployment method, device and system |
CN104202192A (en) * | 2014-09-05 | 2014-12-10 | 上海斐讯数据通信技术有限公司 | Method for configuring exchangers in batches |
CN105071948A (en) * | 2015-07-06 | 2015-11-18 | 李雅妮 | Automatic deployment method and device for access switcher |
-
2017
- 2017-12-26 CN CN201711431162.0A patent/CN107979497B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101242305A (en) * | 2008-02-25 | 2008-08-13 | 中兴通讯股份有限公司 | Parameter configuration method and device for network device |
CN102624557A (en) * | 2012-03-09 | 2012-08-01 | 浪潮通信信息系统有限公司 | Method for automatic check, configuration and backup for client-side equipment configuration |
CN104065758A (en) * | 2013-03-18 | 2014-09-24 | 杭州华三通信技术有限公司 | Active device automatic deployment method, device and system |
CN104202192A (en) * | 2014-09-05 | 2014-12-10 | 上海斐讯数据通信技术有限公司 | Method for configuring exchangers in batches |
CN105071948A (en) * | 2015-07-06 | 2015-11-18 | 李雅妮 | Automatic deployment method and device for access switcher |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109309633A (en) * | 2018-09-21 | 2019-02-05 | 郑州云海信息技术有限公司 | A kind of whole machine cabinet server node management method and device based on management interchanger |
CN109309633B (en) * | 2018-09-21 | 2021-06-15 | 郑州云海信息技术有限公司 | Whole cabinet server node management method and device based on management switch |
WO2020082416A1 (en) * | 2018-10-23 | 2020-04-30 | 网宿科技股份有限公司 | Virtual ip port configuration method and apparatus |
EP3869735A4 (en) * | 2018-10-23 | 2021-12-15 | Wangsu Science & Technology Co., Ltd. | Virtual ip port configuration method and apparatus |
WO2020238523A1 (en) * | 2019-05-24 | 2020-12-03 | 深圳云里物里科技股份有限公司 | Gateway configuration method, system, computer storage medium and electronic device |
CN113347046A (en) * | 2021-07-08 | 2021-09-03 | 中国建设银行股份有限公司 | Network access method and device |
CN113347046B (en) * | 2021-07-08 | 2023-08-25 | 中国建设银行股份有限公司 | Network access method and device |
CN114095350A (en) * | 2021-11-22 | 2022-02-25 | 中国电信股份有限公司 | Equipment configuration method, service configuration method, device, equipment and medium |
Also Published As
Publication number | Publication date |
---|---|
CN107979497B (en) | 2021-08-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107979497A (en) | A kind of method of automatic configuration and device | |
US9325568B2 (en) | Technique for determining correlated events in a communication system | |
RU2608879C2 (en) | Driven by oam controller for openflow | |
US7978595B2 (en) | Method for processing multiple active devices in stacking system and stacking member device | |
US20190288905A1 (en) | Fault detection method, apparatus, and system in nfv system | |
CN107431642A (en) | For controlling interchanger to capture and monitor the system and method for network traffics | |
US8165014B2 (en) | Methods and systems for using managed port circuitry to map connections among structured cabling apparatus and network devices | |
CN107566152A (en) | Method and device for virtual network link detection | |
CN104601394B (en) | A kind of method, apparatus and system of business chain detection of connectivity | |
CN107465565A (en) | Link test method and apparatus and system | |
CN104702468B (en) | Determine the method, apparatus and system of transmission path | |
CN105376101B (en) | A kind of method and system of material object equipment access of virtual network | |
CN107094091B (en) | A kind of intelligent substation station level network configuration method of calibration and system | |
CN106330501A (en) | Fault correlation method and device | |
CN112291075B (en) | Network fault positioning method and device, computer equipment and storage medium | |
CN106341656A (en) | Video equipment monitoring method, device and system | |
CN102457403A (en) | Method and device for detecting network connection faults | |
CN107528715A (en) | The determination method and apparatus of fault type | |
CN106655502A (en) | Method and device for acquiring running state data of power distribution network equipment | |
CN101977142B (en) | Simple network management method and device based on multiple routing protocol instances | |
CN107172653A (en) | A kind of method, control system and system for connecting many wireless access points | |
CN105207835B (en) | A kind of determination method and device of the network element working condition of WLAN | |
CN109327343B (en) | Automatic inspection method and system for openstack cloud environment | |
CN106506265B (en) | Detection fpga chip hangs dead method and device | |
CN109787865A (en) | A kind of verification method of upgrade case, system, interchanger and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |