CN1300983C - Exchange dynamic configuration restoring method - Google Patents

Exchange dynamic configuration restoring method Download PDF

Info

Publication number
CN1300983C
CN1300983C CNB2004100008476A CN200410000847A CN1300983C CN 1300983 C CN1300983 C CN 1300983C CN B2004100008476 A CNB2004100008476 A CN B2004100008476A CN 200410000847 A CN200410000847 A CN 200410000847A CN 1300983 C CN1300983 C CN 1300983C
Authority
CN
China
Prior art keywords
command template
keyword
configuration information
call back
order
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.)
Expired - Fee Related
Application number
CNB2004100008476A
Other languages
Chinese (zh)
Other versions
CN1558602A (en
Inventor
袁峰峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB2004100008476A priority Critical patent/CN1300983C/en
Publication of CN1558602A publication Critical patent/CN1558602A/en
Application granted granted Critical
Publication of CN1300983C publication Critical patent/CN1300983C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Small-Scale Networks (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention provides a dynamic configuration recovery method for an L3 exchanger, which belongs to the field of computer network communication. The method firstly generates and stores configuration information, and then, relevant commands of each single board in the configuration information are extracted to respective buffers when a device is restarted. Common character strings which are designated in a command template are compared with a common character string comparison function in the matching process, and character strings of key characters are compared with a callback function. The callback function is used for carrying out comparison, the callback function can be neatly operated, and many commands can be extracted into the corresponding buffers of each single board. After match is successful, the callback function which is successfully matched can be called. Commands which are matched in the configuration information are used as parameters to be inputted, and the modes of other command templetes are modified according to the parameters, and matching operation for influencing subsequent operation in the matching process becomes possible.

Description

Switch dynamic-configuration restoration methods
Technical field
The invention belongs to computer network communication field, be specifically related in the distributed frame communication equipment, the configuration when complete machine startup and veneer (module) plug is preserved and is recovered.
Background technology
In communication equipment, particularly be in the communication equipment in the complex network environment, after device looses power was restarted, administrative staff need be configured again, and this is a very hard work, under the more situation of equipment, makes the people be difficult to stand.If the user be configured finish after, can preserve configuration, when equipment restarts next time,, just can alleviate user's configuration effort automatically recovery of these configurations.
In addition, if equipment is based on distributed architecture design, so when a veneer (module) wherein when extracting, need to preserve the relevant configuration information of this piece plate, when plate inserts once more, recover its relevant configuration, return to the state when extracting, i.e. the configuration of " hot plug " is preserved and is recovered.
The flow process of at present commonplace these two functions of realization is as follows:
When 1, the user preserved configuration, each module was exported the configuration information of oneself respectively with the form of order, and these information are saved on the memory devices such as flash or disk;
When 2, equipment is restarted, the relevant order of every veneer is extracted among separately the buffer.Whether corresponding the process of this extraction generally be the plate of the plate number in the comparison command number, extract then among each buffer, this plate number more generally be character string relatively;
3, when veneer inserts, the order among the buffer of running plate correspondence.
Because in extracting the configuration information process, more only carry out the coupling of plate number by character string, such implementation has following problem:
1, uses character string relatively, can only realize simple matching feature, cause some order relevant not extracted among the corresponding buffer of plate with veneer;
2, the process underaction of Ti Quing can't the follow-up extraction operation of decision in the process of extracting.
Summary of the invention
The present invention overcomes the deficiency of above-mentioned configuration restore function, and a kind of restoration methods of dynamic-configuration flexibly is provided.
Technology contents of the present invention: a kind of L3 switch dynamic-configuration restoration methods at first is the generation and the preservation of configuration information, then when equipment is restarted, the relevant order of every veneer is extracted among separately the buffer.Extracting method is as follows: for every block of plate one command template collection is set earlier, the command template collection comprises a plurality of command template, command template is corresponding to the form of an order, command template comprises: common character string and keyword strings, and the comparison call back function of common character string comparison function and keyword strings; When extracting, take out each the bar order in the configuration information, compare coupling with each command template in every block of plate successively, in this matching process, to the common character string that indicates in the command template, use common character string comparison function to compare, use the comparison call back function of keyword strings to compare keyword strings.
Command template also comprises the value of a keyword, i.e. the value of keyword strings in this command template in the order.In matching process, the value of this keyword and the value of the keyword in the configuration information can be passed in the call back function jointly, whether mate by the return value decision of call back function.
Command template also comprises one the match is successful call back function, and after the match is successful, the call back function that can call that the match is successful was being imported into as parameter by the order on the coupling in the configuration information, and according to other the pattern of command template of this parameter modification.
Technique effect of the present invention: using relatively, call back function carries out the comparison of keyword, make that this relatively can be very flexible, such as, whether can compare two IP addresses at the same network segment, perhaps search in a character string whether comprise some specific characters or the like, thereby can extract among the more buffer that orders each plate correspondence.When the match is successful, the call back function that calls that the match is successful modified command mode or the value of keyword, makes that the follow-up matching operation of influence becomes possibility in the process of coupling.
Description of drawings
Fig. 1 is the process chart of extraction configuration information of the present invention;
Fig. 2 is the schematic diagram of command template collection of the present invention.
Embodiment
With reference to figure 1, the present invention includes following steps:
1, at first be the generation and the preservation of configuration information, when the user preserved configuration, each module was exported the configuration information of oneself respectively with the form of order, and these information are saved on the memory devices such as flash or disk;
When 2, equipment is restarted, be every plate warning order template set, command template is concentrated and is comprised a plurality of command template.A command template has indicated the form of an order of this piece plate care, form by four parts, the one, command string has indicated common character string and the keyword strings in the order, common character string is constant part, and keyword strings is different with different command template; The 2nd, the value of keyword, the value of the keyword strings that just in command string, indicates in this command template; The 3rd, the common character string comparison function and the comparison call back function of keyword strings, above-mentioned function is used for carrying out the comparison of command string; The 4th, the match is successful call back function, if there is certain bar order to go up with certain command template coupling in the configuration information, the match is successful that call back function will be called for this command template;
3, configuration information is read (if the mode that memory device support row reads also can directly be read each row) among the buffer, take out each the bar order in the configuration information, compare with each command template in every block of plate successively, if there is a command template coupling to go up this order, this order just is extracted among the buffer of the plate under this command template, show that this order is relevant with this piece plate, this order just is extracted among the buffer of this piece plate correspondence.In this matching process, whether the common character string that compares earlier in the template is the same with corresponding characters string in the order, if it is the same, just keyword strings is compared, the value of " value of keyword " in the command template and the keyword in the configuration information is passed in " relatively call back function ", whether the return value decision by call back function mates, i.e. common character string to indicating in the command template, use common character string comparison function to compare, use call back function to compare keyword strings;
4, when the match is successful, the match is successful in call instruction module call back function, order the key value of change (change or increase or deletion) certain (command template that is modified this template that not necessarily the match is successful) command template or modification command template in this function at this, promptly being imported into as parameter by this order on the coupling in the configuration information, in the match is successful the call back function according to other command mode of this parameter modification;
5, also have configuration information not handle as crossing, forward step 3 to;
6, wait for the order that moves when plate inserts among the corresponding buffer
With reference to figure 2, the schematic diagram of the command template collection of plate correspondence, interface eth<key1 wherein〉be the command template of card 1,<key1〉be keyword, key_cmp_func is the comparison function of key1 correspondence, the 1st,<kery1〉for the key value of card 1, ext_func is this command template the match is successful call back function.Give the command template set of card 2 simultaneously, at this moment interface eth<key1〉in<kery1 key value be exactly 2 rather than 1
In order more to clearly demonstrate the present invention, especially exemplified by a specific embodiment:
Suppose to have disposed two orders, order A: " ip address ethernet 1/1 10.5.3.32 " on an interface of plate 1, disposed an IP, order B: " ip route 192.168.0.1/24 10.5.3.32 " disposed a static routing, next jumps the IP:10.5.3.32 that uses exactly in A.Order B just relevant so in fact, also should when plate 1 inserts, carry out with plate 1.But commonsense method can't be finished this function, because the relation of A and B is just can know in the process of analyzing order, and common method can't influence the analysis of back in the process of analyzing, and dynamically the strategy that extracts is analyzed in change.Use method of the present invention can finish this function, performing step is as follows:
1, two command template of design, the order B of command template 1 coupling configuring static route, keyword is the purpose route, and the keyword manner of comparison is the comparison of IP address, and the value of keyword is empty in the time of initial, and the match is successful, and call back function also is empty.The order A of command template 2 couplings configuration of IP on interface, keyword is a plate number, manner of comparison is that common character string compares, and the operation of call back function execution that the match is successful is that a current IP address setting that compares in the successful order is the value of the keyword of command template 1;
2, the command template that these two command template are added to plate 1 correspondence is concentrated;
3, in configuration restore, match order A earlier: " ip address ethernet 1/1 10.5.3.32 ", on command template 2 couplings, order A is extracted among the relevant buffer of plate 1, call instruction template 2 the match is successful call back function simultaneously, the key value of command mode 1 is set to IP address 10.5.3.32;
4, match order B: " ip route 192.168.0.1/24 10.5.3.32 " time, the common character string of front is all followed on command mode 1 coupling, among the B next jumped also on key value " 10.5.3.32 " coupling with command mode 1, like this, order B also is extracted among the relevant buffer of plate 1.

Claims (3)

1. a switch dynamic-configuration restoration methods at first is the generation and the preservation of configuration information, then when equipment is restarted, the relevant order of every veneer is extracted among separately the buffer, it is characterized in that leaching process comprises:
(1) for every block of plate one command template collection is set, the command template collection comprises several command template, command template is corresponding to the form of an order, and command template comprises: the comparison call back function of the value of common character string and keyword strings, keyword, common character string comparison function and keyword strings and the match is successful call back function;
(2) when extracting, take out each the bar order in the configuration information, compare coupling with each command template in every block of plate successively, in this matching process, to the common character string that indicates in the command template, use common character string comparison function to compare, using relatively to keyword strings, call back function compares.
2. switch dynamic-configuration restoration methods as claimed in claim 1, it is characterized in that: the value of described keyword is the value of this keyword strings in this command template, in matching process, the value of this keyword and the value of the keyword in the configuration information are passed in the call back function jointly, whether mate by the return value decision of call back function.
3. switch dynamic-configuration restoration methods as claimed in claim 1 or 2, it is characterized in that: described the match is successful that call back function is used for after the match is successful, being imported into as parameter by the order on the coupling in the configuration information, and according to other the pattern of command template of this parameter modification.
CNB2004100008476A 2004-01-17 2004-01-17 Exchange dynamic configuration restoring method Expired - Fee Related CN1300983C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004100008476A CN1300983C (en) 2004-01-17 2004-01-17 Exchange dynamic configuration restoring method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004100008476A CN1300983C (en) 2004-01-17 2004-01-17 Exchange dynamic configuration restoring method

Publications (2)

Publication Number Publication Date
CN1558602A CN1558602A (en) 2004-12-29
CN1300983C true CN1300983C (en) 2007-02-14

Family

ID=34350523

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004100008476A Expired - Fee Related CN1300983C (en) 2004-01-17 2004-01-17 Exchange dynamic configuration restoring method

Country Status (1)

Country Link
CN (1) CN1300983C (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100459515C (en) * 2005-12-27 2009-02-04 迈普(四川)通信技术有限公司 Preservation method of hot swab board configuration
CN100440809C (en) * 2006-11-13 2008-12-03 杭州华三通信技术有限公司 Method and device for service configuration of network equipment
CN101262375B (en) * 2008-04-21 2011-07-20 北京星网锐捷网络技术有限公司 A dynamic configuration recovery method and system for network devices

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1412995A (en) * 2002-10-16 2003-04-23 华为技术有限公司 Information management method in data communication equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1412995A (en) * 2002-10-16 2003-04-23 华为技术有限公司 Information management method in data communication equipment

Also Published As

Publication number Publication date
CN1558602A (en) 2004-12-29

Similar Documents

Publication Publication Date Title
CN103310475B (en) animation playing method and device
JP5492814B2 (en) SEARCH DEVICE, SEARCH SYSTEM, METHOD, AND PROGRAM
CN107301170A (en) The method and apparatus of cutting sentence based on artificial intelligence
CN106547534A (en) The device and method of displayed page extension point
CN102521712A (en) Process instance data processing method and device
CN110247984A (en) Method for processing business, device and storage medium
JP2003323239A5 (en)
DE102012217315A1 (en) Use native routines instead of emulated routines in an emulated application
CN113469294A (en) Method and system for detecting icons in RPA robot
CN110263021B (en) Theme library generation method based on personalized label system
CN107329802A (en) A kind of virtual machine creation method and electronic equipment
CN116360879A (en) Method and device for creating multi-level information framework
CN1300983C (en) Exchange dynamic configuration restoring method
CN114169303A (en) Method, device, equipment and medium for editing table based on vue.js
CN111968624B (en) Data construction method, device, electronic equipment and storage medium
US10628632B2 (en) Generating a structured document based on a machine readable document and artificial intelligence-generated annotations
CN1412995A (en) Information management method in data communication equipment
JP2002007020A (en) Method for automating routine processing based on operation monitoring
Bouali Weak and branching bisimulation in FCTOOL
CN114565316A (en) Task issuing method based on micro-service architecture and related equipment
CN101063984A (en) system and method for automatically arranging order of picture frame
CN105653386A (en) Process breakdown processing method and terminal equipment
Xu et al. Stdnet: Spatio-temporal decomposed network for video grounding
CN105630634A (en) Application system disaster recovery backup switching method and device
JP2010092108A (en) Similar sentence extraction program, method, and apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
ASS Succession or assignment of patent right

Owner name: HUAWEI TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: GANGWAN NETWORK CO., LTD.

Effective date: 20060922

C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20060922

Address after: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Applicant after: Huawei Technologies Co., Ltd.

Address before: 100089, No. 21 West Third Ring Road, Beijing, Haidian District, Long Ling Building, 13 floor

Applicant before: Harbour Networks Holdings Limited

C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20070214

Termination date: 20120117