Background technology
In a computer network, SNMP (Simple Network Management Protocol, simple net can be passed through
Network management agreement) computer network resources are managed.SNMP basic function includes monitoring network performance, detection and analysis
Network errors and Configuration network equipment etc..In network normal work, SNMP can realize the functions such as statistics, configuration and test, when
When network is out of order, various error detections can be achieved and recover function.
OID (Object Identifier, object identifier) is with SMI (Structure of Management
Information, structure of management information) based on a series of dotted notations, these dotted notations are in any network equipment
All some data parameters of unique mark.Their set we be referred to as MIB (Management Information Base, pipe
Manage information bank).SNMP set is operated:Write-only, read-write object carry out set behaviour
Make.That is SNMP can be entered by sending corresponding SetRequest to some parameters, configuration, the state of control device as requested
Row reconfigures.Control device defines the object of an operation by MIB, and type is write-only or read-write, about
Surely value is operated, SNMP can configure to this object, and control device learns that the value of this object changes in a manner of oneself
Afterwards, operation can be performed according to the implication of object value, so as to realize remote control.
In common control device, SNMP can be good at realizing the control to control device.But in dual master control system
In system (do not only have host apparatus in systems, and also have the stand-by equipment of the standby as host apparatus), current
SNMP can not realize that host apparatus is synchronous with the operation of stand-by equipment, i.e., when SNMP is being configured on host apparatus,
Its configuration information can not be synchronized to stand-by equipment by the operation of snmp protocol in itself.This will cause when carry out host apparatus with
After stand-by equipment is switched, new host apparatus (stand-by equipment originally) can not correctly run what is run on original host apparatus
Business, so as to cause the business originally run to go wrong.
The content of the invention
In view of the above the shortcomings that prior art, it is an object of the invention to provide a kind of host apparatus and stand-by equipment
The method and SNMP systems synchronously configured, for solving in the prior art in master control system, SNMP can not realize primary set
The standby operation with stand-by equipment it is synchronous the problem of.
In order to achieve the above objects and other related objects, the present invention provides a kind of host apparatus configuration synchronous with stand-by equipment
Method, applied in SNMP systems, the host apparatus includes with the method that stand-by equipment synchronously configures:Host apparatus receives
To the configuring request information for following snmp protocol, the identification information of the configuring request packet containing object to be configured;It is primary to set
The standby configuration completed according to the configuring request information to the object to be configured, if be configured to the object to be configured
Work(, then the host apparatus send synchronizing information to the stand-by equipment;The synchronizing information includes:The object to be configured exists
The identification information of corresponding standby object in the stand-by equipment;If the stand-by equipment receives the synchronizing information,
Complete the configuration to the standby object.
Preferably, if configuration successful to the object to be configured, the host apparatus will perform with it is described to institute
Object configuration successful to be configured is stated to operate accordingly.
Preferably, if configuration successful to the standby object, the stand-by equipment will be performed with described to described
Standby object configuration successful operates accordingly.
Preferably, described host apparatus according to the configuring request information complete to it is described configuration object configuration, such as
Synchronizing information is sent to the tool in the stand-by equipment by fruit to the configuration successful of the object to be configured, the then host apparatus
Body, which is realized, to be included realizing by SNMP readjustment treatment mechanism.
Preferably, the object id information to be configured includes OID information.
Preferably, the identification information of the corresponding standby object is that the host apparatus and the stand-by equipment are advance
The information for being used to identify the object to be configured of agreement.
Preferably, the configuring request information is realized by SetRequest messages.
Preferably, configuration and described completion of the described completion to the object to be configured are to the standby object
Configuration have invoked the same API for being used to deal with objects configuration.
Preferably, the SNMP systems include IDB engine, and the API registration for being used to deal with objects configuration is in IDB
On engine.
The present invention also provides a kind of SNMP systems, and the SNMP systems include:Host apparatus and stand-by equipment, wherein,
The host apparatus completes the configuration to object to be configured according to the configuring request information for following snmp protocol received;It is described
Identification information of the configuring request packet containing the object to be configured;If to the configuration successful of the object to be configured, institute
State host apparatus and send synchronizing information to the stand-by equipment;The synchronizing information includes:The object to be configured is described standby
With standby object id information corresponding in equipment;The stand-by equipment is completed to institute according to the synchronizing information is received
State the configuration of standby object;The synchronizing information includes:The object to be configured is corresponding standby in the stand-by equipment
Object id information.
As described above, method and SNMP systems that a kind of host apparatus of the present invention synchronously configures with stand-by equipment, have
Following beneficial effect:Host apparatus configuration synchronous with stand-by equipment can be realized in master control system so that led
When being switched with equipment and stand-by equipment, stand-by equipment is capable of the business of normal operation configuration before.
Embodiment
Illustrate embodiments of the present invention below by way of specific instantiation, those skilled in the art can be by this specification
Disclosed content understands other advantages and effect of the present invention easily.The present invention can also pass through specific realities different in addition
The mode of applying is embodied or practiced, the various details in this specification can also be based on different viewpoints with application, without departing from
Various modifications or alterations are carried out under the spirit of the present invention.
It should be noted that the diagram provided in the present embodiment only illustrates the basic conception of the present invention in a schematic way,
Then the component relevant with the present invention is only shown in schema rather than is painted according to component count, shape and the size during actual implement
System, kenel, quantity and the ratio of each component can be a kind of random change during its actual implementation, and its assembly layout kenel also may be used
Can be increasingly complex.
As shown in figure 1, in one embodiment of the invention, it is synchronous with stand-by equipment that the present invention provides a kind of host apparatus
The method of configuration, applied in SNMP systems, the SNMP systems refer to provide computer network including the use of snmp protocol
The system that source is managed.The host apparatus refers to the equipment that system related service is currently running in the system of dual master control,
The stand-by equipment refers in master control system, the equipment as the standby of host apparatus.Stand-by equipment and host apparatus phase
Unanimously, therefore, stand-by equipment can substitute host apparatus runtime related service, i.e. stand-by equipment when system needs
It can be used when system needs as host apparatus.This process when system needs using stand-by equipment as host apparatus
Host apparatus is referred to as to switch with stand-by equipment.The object to be configured of host apparatus can include mark configuration or state
Variable, parameter.To any one object A to be configured in host apparatus, have in stand-by equipment and the object to be placed
Corresponding standby object A '.Effects of the object A to be configured in the host apparatus is with the standby object A ' standby
It is completely the same with the effect in equipment, i.e., the object A to be configured of the described host apparatus and standby object A ' of the stand-by equipment
Correspond.The host apparatus includes with the method that stand-by equipment synchronously configures:
Step S1, host apparatus receive SNMP configuring request information, and the configuring request packet is containing to be configured right
As identification information.The configuring request information of the SNMP refers to the configuring request information for following snmp protocol transmission.
In one embodiment, the configuring request information of the SNMP is realized by sending Set-Request messages
's.The content of set-request operations is contained in the Set-Request messages, set-request is operated for setting one
The value of individual or multiple variable parameters.In Set-Request messages, by specifying the content of set-request operations, pair set
Standby some parameters, configuration, state are reconfigured, and set-request operations can be to authority in MIB:write-
Only, read-write object carry out set operations.Equipment defines the object of an operation, type write- by MIB
Only or read-write, provisioning operations value;At this moment can follows snmp protocol and this object is configured.Configuring
In solicited message, the object that this needs reconfigures just turns into object to be configured.In one embodiment, the configuring request
The object id information to be configured that packet contains, the identification information of this object to be configured include the OID of the object to be configured
Information.
Step S2, host apparatus completes the configuration to the object to be configured according to the configuring request information, if right
The configuration successful of the object to be configured, then the host apparatus send synchronizing information to the stand-by equipment;The synchronous letter
Breath includes:The object to be configured standby object id information corresponding in the stand-by equipment.
Specifically, the OID information of to be configured object of the host apparatus in the configuring request information and corresponding
Configuration Values complete the configuration to the object to be configured.It is if described primary to set to the configuration successful of the object to be configured
Preparation send synchronizing information to the stand-by equipment;The synchronizing information includes:The object to be configured is in the stand-by equipment
Corresponding standby object id information.
In one embodiment, realized in SNMP readjustment treatment mechanism:Host apparatus is believed according to the configuring request
Breath completes the configuration to the object to be configured, if to the configuration successful of the object to be configured, the host apparatus hair
Synchronizing information is sent to the stand-by equipment;The synchronizing information includes:The object to be configured is relative in the stand-by equipment
The standby object id information answered.The corresponding standby object id information is the host apparatus and the stand-by equipment
That makes an appointment is used to identify the information of the object to be configured.In one embodiment, described completion is to described to be configured
The configuration of object have invoked one be used for deal with objects configure API.Host apparatus is according to the different object definitions for needing to configure
Different cmdId, API then is handled according to corresponding to different cmdId definition, i.e. host apparatus can be believed according to configuring request
Breath calls and object to be configured handles API to complete the configuration to object to be configured accordingly.Master can be passed through in stand-by equipment
CmdId is standby in stand-by equipment to determine configuration object corresponding with the cmdId in host apparatus defined in equipment
Object, now, cmdId corresponding to the object to be configured can be used as the object to be configured relative in the stand-by equipment
The standby object id information answered.That is, cmdId corresponding to described object to be configured is the host apparatus and the stand-by equipment
That makes an appointment is used to identify the information of the object to be configured.In one embodiment, the host apparatus is by the synchronization
It is to communicate with realizing by socket that information, which is sent in the stand-by equipment, and the synchronizing information is included as described to be configured
The cmdId of object standby object id information corresponding in the stand-by equipment.
In one embodiment, the SNMP systems, which include IDB engine, IDB engine, is one and is used for administrative office
Manage the API of object configuration mechanism.API (Application Programming Interface, application programming interface)
It is some pre-defined functions, it is therefore an objective to application program is provided and is able to access one group based on certain software or hardware with developer
The ability of routine, and source code need not be accessed, or understand the details of internal work mechanism.It is described to be used to deal with objects configuration
API can be registered in IDB engine.Host apparatus can call from IDB engine with stand-by equipment degree and be registered in IDB
API in engine, you can to call the API of corresponding process object configuration from IDB engine.
In one embodiment, method provided by the invention also includes:If to the configuration successful of the object to be configured,
The host apparatus will be performed and corresponding to the object configuration successful to be configured operated with described.Specifically, when to described
, can be by after host apparatus learns that the value of this object to be configured changes in a manner of oneself during the configuration successful of object to be configured
Corresponding operation is performed according to the implication of object value to be configured.
Step S3, if the stand-by equipment receives the synchronizing information, complete the configuration to the standby object.
In one embodiment, the synchronizing information includes being used as the object to be configured relative in the stand-by equipment
The cmdId for the standby object id information answered, it is corresponding standby right in stand-by equipment that stand-by equipment determines according to the cmdId
As, and complete the configuration to standby object.In one embodiment, the SNMP systems include IDB engine, and IDB refers to sweep
Retouch and follow the trail of database, be mainly used in depositing IP address information, geographical location information, domain-name information, MAC Address data etc..IDB
Engine is used for the API for managing process object configuration.The API for being used to deal with objects configuration can be registered in IDB
In engine.Stand-by equipment can call the API being registered in IDB engine from IDB engine, you can with from IDB
The API of corresponding process object configuration is called in engine, and is completed with reference to the content in the synchronizing information to described standby
The configuration of object.
In one embodiment, method provided by the invention also includes:If to the configuration successful of the standby object, institute
State stand-by equipment and will perform and corresponding to the standby object configuration successful operated with described.Specifically, when to described standby
, can be according to standby right after stand-by equipment learns that the value of this standby object changes in a manner of oneself during the configuration successful of object
As the implication of value performs corresponding operation.
The present invention also provides a kind of SNMP systems.The SNMP systems refer to come to computer network including the use of snmp protocol
The system that network resource is managed.As shown in Fig. 2 in one embodiment, the SNMP systems 1 include:Host apparatus 11 with
And stand-by equipment 12.The host apparatus 11 refers to the equipment that system related service is currently running in the system of dual master control, institute
State stand-by equipment 12 to refer in master control system, the equipment as the standby of host apparatus 11.Wherein:
The host apparatus 11 is completed to object to be configured according to the configuring request information for following snmp protocol received
Configuration;Identification information of the configuring request packet containing the object to be configured;If the object to be configured is matched somebody with somebody
Work(is set to, then the host apparatus 11 sends synchronizing information to the stand-by equipment 12.The synchronizing information includes:It is described to wait to match somebody with somebody
Put object standby object id information corresponding in the stand-by equipment 12.
The stand-by equipment 12 completes the configuration to the standby object according to the synchronizing information is received;It is described same
Step information includes:The object to be configured standby object id information corresponding in the stand-by equipment 12.
The SNMP systems can apply the method that the host apparatus that the invention described above is related to synchronously configures with stand-by equipment,
To realize that host apparatus is synchronous with stand-by equipment.
In summary, the method and SNMP systems that a kind of host apparatus of the invention synchronously configures with stand-by equipment, can
In master control system, host apparatus configuration synchronous with stand-by equipment is realized so that carrying out host apparatus and stand-by equipment
When switching, stand-by equipment is capable of the business of normal operation configuration before.So the present invention effectively overcomes kind of the prior art
Plant shortcoming and have high industrial utilization.
The above-described embodiments merely illustrate the principles and effects of the present invention, not for the limitation present invention.It is any ripe
Know the personage of this technology all can carry out modifications and changes under the spirit and scope without prejudice to the present invention to above-described embodiment.Cause
This, those of ordinary skill in the art is complete without departing from disclosed spirit and institute under technological thought such as
Into all equivalent modifications or change, should by the present invention claim be covered.