Summary of the invention
At the defective that exists in the prior art, the object of the present invention is to provide the method for batch upgrade in a kind of cluster network, only need cluster protocol is carried out very little modification, can be based on the software of equipment in efficient, quick, the controlled realization batch upgrade cluster network of cluster protocol, and be easy to realize and expansion.
For reaching above purpose, the technical scheme that the present invention takes is:
The method of batch upgrade in a kind of cluster network is characterized in that: its concrete steps are:
101, in cluster network, dispose at least one computer as the upgrading Control Server that the network equipment in the cluster network is sent control command, simultaneously this computer is configured to provide the main file server of upgrading network equipment file; Said control command comprises at least: the IP address is set, the role is set, inquires about upgrade status, download, upgrade and restart;
102, the upgrading Control Server quantity, type, the IP address that obtain the network equipment by snmp protocol, quantity according to type, at least one with every type the network equipment is set to relay file servers, and the remaining network equipment is set to end-equipment; From the upgrading Control Server by the IP address control instruction is set, the upgrade file source IP address of relay file servers is set to the IP address of main file server, and the upgrade file source IP address of end-equipment is set to the IP address of the relay file servers consistent with its type; By the downloading control instruction, start relay file servers and download upgrade file from main file server;
103, whether the periodic test relay file servers has finished the download of upgrade file, when download finishes, upgrade file is stored in the relay file servers, changes step 104;
104, pass through the upgrading control command from the upgrading Control Server, start the escalation process of relay file servers; By the downloading control instruction, start end-equipment and download upgrade file from the relay file servers consistent with its type;
105, whether the periodic test end-equipment has finished the download of upgrade file, when download finishes, changes step 106;
106, pass through the upgrading control command from the upgrading Control Server, start the escalation process of end-equipment;
107, pass through inquiry upgrade status control command from the upgrading Control Server, whether periodic test relay file servers and end-equipment have finished escalation process, time limit still fails to finish escalation process or wrong relay file servers or end-equipment appear in upgrading to exceeding, by the upgrading control command, restart escalation process, still can't finish the relay file servers or the end-equipment of escalation process for surpassing number of times, by snmp protocol its record and the mode by form are shown to the keeper, investigate reason or manually to its independent upgrading by the keeper; Change step 108;
108, from the upgrading Control Server by restarting control command, restart all relay file servers and end-equipment.
On the basis of technique scheme, in the step 102, the cluster network middle distance main file server network equipment nearer, that be in the network centre is set to relay file servers, is set to end-equipment apart from the main file server network equipment far away, that be in network end-point.
On the basis of technique scheme, in the step 107, for surpassing continuously relay file servers or the end-equipment that still can't finish escalation process for 5 times, by snmp protocol its record and the mode by form are shown to the keeper, investigate reason or manually to its independent upgrading by the keeper.
The method of batch upgrade in the cluster network of the present invention only needs to carry out very little modification to cluster protocol, can be based on the software of equipment in efficient, quick, the controlled realization batch upgrade cluster network of cluster protocol, and be easy to realize and expansion.
Embodiment
Below in conjunction with accompanying drawing the present invention is described in further detail.
The method of batch upgrade in the cluster network provided by the invention, as shown in Figure 1, by disposing " main file server ", " upgrading Control Server ", " relay file servers "; Allow a plurality of " relay file servers " simultaneously from " main file server " download and upgrade file and upgrading; Allow a large amount of " end-equipment " simultaneously from different " relay file servers " download and upgrade files and upgrading.In the cluster network flow chart of the method for batch upgrade as shown in Figure 2, concrete steps are as follows:
101, in cluster network, dispose at least one computer as the upgrading Control Server that the network equipment in the cluster network is sent control command, simultaneously this computer is configured to provide the main file server of upgrading network equipment file; Said control command comprises at least: the IP address is set, the role is set, inquires about upgrade status, download, upgrade and restart;
102, the upgrading Control Server quantity, type, the IP address that obtain the network equipment by snmp protocol, quantity according to type, at least one with every type the network equipment is set to relay file servers, the remaining network equipment is set to end-equipment, the quantity that is relay file servers should be more than or equal to the quantity of the type of the network equipment, for example: the network equipment one has 5 types, and then the quantity of Relay Server is at least 5; From the upgrading Control Server by the IP address control instruction is set, the upgrade file source IP address of relay file servers is set to the IP address of main file server, and the upgrade file source IP address of end-equipment is set to the IP address of the relay file servers consistent with its type; By the downloading control instruction, start relay file servers and download upgrade file from main file server;
103, whether the periodic test relay file servers has finished the download of upgrade file, when download finishes, upgrade file is stored in the relay file servers, changes step 104;
104, pass through the upgrading control command from the upgrading Control Server, start the escalation process of relay file servers; By the downloading control instruction, start end-equipment and download upgrade file from the relay file servers consistent with its type;
105, whether the periodic test end-equipment has finished the download of upgrade file, when download finishes, changes step 106;
106, pass through the upgrading control command from the upgrading Control Server, start the escalation process of end-equipment;
107, pass through inquiry upgrade status control command from the upgrading Control Server, whether periodic test relay file servers and end-equipment have finished escalation process, a specified time still fails to finish escalation process or wrong relay file servers or end-equipment appear in upgrading to exceeding, by the upgrading control command, restart escalation process, still can't finish the relay file servers or the end-equipment of escalation process for surpassing certain number of times, by snmp protocol its record and the mode by form are shown to the keeper, investigate reason or manually to its independent upgrading by the keeper; Change step 108;
108, from the upgrading Control Server by restarting control command, restart all relay file servers and end-equipment.After restarting, equipment switches to upgrading back software work.
On the basis of technique scheme, in the step 102, the cluster network middle distance main file server network equipment nearer, that be in the network centre is set to relay file servers, is set to end-equipment apart from the main file server network equipment far away, that be in network end-point.The network equipment as relay file servers is preferably closer from main file server, and every kind of device type will be selected one at least as relay file servers, if the equipment of a certain type has only one,, all to be set to relay file servers then regardless of its position.End-equipment is downloaded upgrade file from the Relay Server of same type, has improved the efficient of download, upgrading, has also reduced the workload of main file server and taking the network bandwidth.About choosing of Relay Server, because by passing through snmp protocol, the network management upgrading program has known that in advance the information of all devices of whole cluster (comprises type, distance or the like), so how much platform equipment is every type have, how which equipment connects, and all knows, so choose and to formulate some strategy according to actual needs and select automatically, and have many for same one type of Relay Server.
On the basis of technique scheme, in the step 107, for surpassing continuously relay file servers or the end-equipment that still can't finish escalation process for 5 times, by snmp protocol its record and the mode by form are shown to the keeper, investigate reason or manually to its independent upgrading by the keeper.
The method of batch upgrade in the cluster network that the present invention provides, can be by the deployment of distributed file server, allow the escalation process of heterogeneous networks equipment synchronous, distributedly carry out, improved efficient, reduced the consumption of the network bandwidth, can help the network manager fast, accurately, all devices of the cluster network of upgrading efficiently.Method provided by the invention is to supporting more multi-layered inferior cluster network structure, reduce consumption simultaneously for the network bandwidth in the whole cluster, it is flexible, efficient that function is used, and satisfies under the different networking situations, to the quick and correctness of cluster device the whole network upgrading.
Switch device with Firberhome Networks is an example, and switch is supported TFTP Server and TFTP Client function simultaneously, that is to say to have comprised TFTP Client and two programs of TFTP Serve (perhaps being task, process) in the switch device.TFTP Client task is finished the file in download from other tftp server (may be computer, also can be the equipment of supporting tftp server).TFTP Server task is accepted the request from the file file in download of TFTP Client, sends the file content of request to it.The equipment TFTP download or the upgrading that possess the switch of this function both can be finished with command line mode by the telnet login that is similar to cisco, Huawei, simultaneously also can realize that TFTP downloads and upgrading by the Proprietary MIB that snmp protocol is provided with Firberhome Networks, the method that the present invention provides can be used as a batch upgrade subprogram in the network management system, cooperates switch to finish upgrade function.
Below to utilize SNMP Proprietary MIB, common process by an equipment of network management upgrading program upgrade with one be example:
Supposing to have individual IP address of equipment is 192.168.0.100, and network management system place computer is 192.168.0.2, and the network management upgrading program is carried out following steps by the snmp protocol operating equipment so:
The 1st step: SetTFTPServerIP is 192.168.0.2, and the meaning is that the tftp server ip of equipment is pointed to computer 192.168.0.2
The 2nd step: Set fileName is 2006.2b, and the meaning is the upgrade file name to be pointed to the 2006.2b. of computer 192.168.0.2
The 3rd step: Set action is download, and the meaning is to allow the device start downloading process, and this moment, the tftp client task of equipment began file in download with regard to the parameter that adopted for the 1st, 2 steps set.
The 4th step: periodicity Get upgradeStatus, check whether to download and finish
The 5th step: finish if find to download, Set action is upgrade, and the meaning is to allow the device start escalation process, is that the file that downloads in the internal memory is saved in the flash exactly.
The 6th step: periodicity Get upgradeStatus, look at whether to upgrade and finish
The 7th step: finish if find upgrading, Set action is reboot, allows equipment restart, and finishes escalation process.
If the form of expression of above process in program may be: the user selects an equipment, eject a dialog box, require the user to import some parameters, click beginning then, show a progress bar (program is inquired about upgrade status on the backstage) at last, eject an information at last, success or failure.
Because network management system is to all devices information of whole cluster, all can obtain by snmp protocol in advance to comprise number of devices, type, IP address or the like, and be saved in the database, so " instruction issues " in escalation process, " judgement of device type ", " choosing of Relay Server ", " inquiry of upgrade status " or the like every operation can finish.The ROMPaq of network management system just can realize method of the present invention as long as 7 above-mentioned steps are done some strategies, automated procedures realization.
Because switch is supported TFTP Server function (" Relay Server " need use this function) simultaneously, allow " end-equipment " sensing " Relay Server " file in download, can accomplish fully, and because " Relay Server " downloaded upgrade file in advance, and be kept in the internal memory, when receiving from the tftp client of " end-equipment " request, file is read from internal memory, send to " module device " with the tftp protocol package and just can realize.
Sheng Ji benefit has like this: the 1st: distributed, and can allow multiple devices carry out synchronously.The the 2nd: save bandwidth, because if all equipment is all from the words of computer file in download, the flow of downloading can pass through all links, take the bandwidth of whole circuits, and adopt this mode, each equipment is the device downloads file from oneself comparing nearer all, and the link of downloading flow process has reduced a lot, has reduced bandwidth occupancy.The 3rd: because the link of process has lacked, speed of download is also just fast.
The above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.