CN1160971C - Operation and maintenance of router and storage and explanation of configuration command - Google Patents

Operation and maintenance of router and storage and explanation of configuration command Download PDF

Info

Publication number
CN1160971C
CN1160971C CNB001252046A CN00125204A CN1160971C CN 1160971 C CN1160971 C CN 1160971C CN B001252046 A CNB001252046 A CN B001252046A CN 00125204 A CN00125204 A CN 00125204A CN 1160971 C CN1160971 C CN 1160971C
Authority
CN
China
Prior art keywords
command
tree
order
router
chained list
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
CNB001252046A
Other languages
Chinese (zh)
Other versions
CN1336770A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CNB001252046A priority Critical patent/CN1160971C/en
Publication of CN1336770A publication Critical patent/CN1336770A/en
Application granted granted Critical
Publication of CN1160971C publication Critical patent/CN1160971C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention relates to a command storing and explaining method of an operating, maintaining and configuring command of a router, which comprises the steps that primarily, a whole command group of the router is preserved by newly adopting a tree hierarchical relation command tree mode, and the indexes, the deletion or the addition of the command group are carried out according to command hierarchy, and a command tree is independently stored in a high-speed memory memorizer or a permanent random memorizer; after the command is completely explained, a program is informed by obtaining a command execution number to invoke a corresponding functional module and realize a user request function. The present invention has the advantages that the present invention can quickly and conveniently match and search the command, the on-line modification and the expansion of the command group are possible, and the possibility of an operating, maintaining and configuring system of the router is increased.

Description

Router operation is safeguarded demanded storage and the command interpretation method with configuration order
Technical field
The present invention is a kind of new router operation maintenance and the demanded storage and the command interpretation method of configuration order, particularly a kind of method that adopts tree-like hierarchical structure to do router demanded storage and command interpretation.
Background technology
Along with the development of Internet, the computer in the global range all competitively is connected into Internet to share information, the incomparable facility that enjoy network is brought.Follow increasing of the main frame number that is connected into network, single network can not be satisfied the demand, particularly the main frame that ought be connected into network more and more disperses, when the geographical position is more and more far away, the different ownership of difference in geographical location and computer, the control of information resources makes people begin progressively main frame to be divided into some sub-networks, and is that unit is connected into Internet with the sub-network.In network interconnection, a subnet need be known the position of another sub-network even all-ones subnet, so that the computer of subnet inside can mutual communication.Router is the network equipment that satisfies this demand, and it is responsible for seeking the purpose subnet address and is responsible for packet is forwarded to the purpose subnet.
Present network configuration is increasingly sophisticated, simultaneously, owing to be connected into the different situations of the main frame of Internet, possible some machinery requirement shutdown, perhaps change configuration, like this, different variations also just may take place in the situation that is connected into the subnet of Internet.Router not only needs the awareness network topological structure as seeking route and the correct equipment of transmitting packet, also needs to know the real-time change of network configuration.In order to realize this two main functions, the Routing Protocol that people have developed IGP and EGP specially comes the awareness network structure.IGP (Interior Gateway Protocol) Interior Gateway Protocol, it is exactly Routing Protocol at a relatively independent autonomous networks internal operation, be responsible for resolving the network configuration of network internal, EGP (External Gateway Protocol) Exterior Gateway Protocol, the router that moves between relatively independent autonomous networks is responsible for resolving the network configuration between the network exactly.
These Routing Protocols have been arranged, also needed to carry out certain operations and configuration, could allow the whole network topology of the correct understanding of router.Because router is made a special networks equipment, its major function is the forwarding for addressing that realizes network and packet, is not to have clear and definite man-machine interface as other the network equipment, and it is not with display, is not with keyboard, mouse yet.Thereby, to the operation of router, also just be different from other the network equipment, perhaps our common computer equipment.
Except needs router is operated, made outside its function of finishing route and forwarding, also need the work that router is safeguarded.Because any one equipment all needs to be serviced, router is no exception.Some problems occurred such as router, we need debug router, perhaps it are carried out the upgrading or the renewal of software.These maintenances, the same with operation to router, all can not import by keyboard, mouse, export by display, because router itself is not with these equipment.
Router generally only provides Operation and Maintenance and the configuration of carrying out with command line mode by the standard terminal.That is to say, to all operations of router, nearly all be by on the accurate terminal of another station symbol, finishes Operation and Maintenance to router by the order of input delegation delegation.Router will be known the implication of the order that the user imports, and just must at first parse the implication of these orders, and then calls different functional entity fill orders.
Because the function that router need be finished is quite complicated, because a router can be played the part of different functional roles in different network node positions.Thereby the command set of router is also very huge, and general all has the hundreds of bar to thousands of more than.To so huge command set, router not only to consider interpreted command accurately, fast, also to consider the convenient of the expansion of command set and modification.That is to say, command interpretation in router operation service portion part not only wants to mate fast and accurately and to find out the meaning of order in the order of nearly thousand complexity in a short relatively time, also want can the compatible router operational maintenance command modification and expansion.When one needs modification or expands an order, and in router, to react apace.
In the solution that existing router operation is safeguarded, all be that whole order is divided into several independent command words generally, be unit encapsulates with the command word, in the content of encapsulation, comprised the calling logic relation of command word.It had both comprised its left command word, had comprised its right command word again, and from the beginning an order of finishing need find tail in this chained list relation,, only in strict accordance with the logical relation of its appointment, could form an order of finishing that is.
The storage format and the command interpretation mode of this command word encapsulation, programmed logic more complicated when having caused command search, all command words are rambling to be left among the internal memory, organizes by the company's table relation in the command word encapsulation merely.Simultaneously, the modification of order will almost be impossible realize, because, this needs the manual command word encapsulation accurately that finds in thousands of command words encapsulate, change left and right sides command word relation then, go to revise all relevant command words simultaneously again, make whole order obtain complete modification.
Numerous and diverse logical relation, disorderly orderliness makes the command interpretation of router partly seem and chaotic lacks extended capability.As a perfect product, should overcome these shortcomings, make the order line command interpretation of router partly be relatively independent of other parts of Operation and Maintenance, and clear and definite and succinct interface arranged that the while is extended command set easily with other parts.
Summary of the invention
The objective of the invention is to overcome the shortcoming of existing route device demanded storage and interpretation scheme, provide a kind of new router operation to safeguard and the demanded storage of configuration order and the method for command interpretation, make it to carry out commands match fast, easily and search; Make the online modification of command set can realize with expansion.
The object of the present invention is achieved like this, and a kind of router operation is safeguarded and the demanded storage and the command interpretation method of configuration order, is characterized in:
(1) the whole command set of router is broken, adopt the command tree mode of tree hierarchy relation to preserve, carry out index, deletion or add order by the order level;
(2) command tree is independently left on rapid memory memory (FLASH) or the nonvolatile random-access memory (NVRAM);
(3) after command interpretation is finished, number come advising process to call the function that corresponding functional modules realizes user's request by obtaining command execution.
The form of the employing multidimensional chained list of said command tree, the reorientation of multidimensional order chained list is to deposit tree-like method with the structure array to realize, it is the node that each element is represented command tree in the array, association in the tree between the node is to use the subscript of array to represent, will have these two information of the structure array of command tree and array element sum and write in the computer command script document on FLASH or the NVRAM.
At first define a dummy argument and come the whole multidimensional order of index chained list, what dummy argument was pointed is the head pointer of ground floor order chained list, by traveling through this chained list, obtain all command words of ground floor order in the whole router command set, each element in the ground floor chained list except that the pointer that comprises with the next element of layer chained list, has also comprised the command word full name, the meaning of command word, the head pointer of the order chained list of following one deck order of command word.
The online updating of command set is realized by update command script file mode.
The specific practice of said command set online updating is: at first generate new command set outside router, cover FLASH or the original computer command script document of NVRAM, go up computer command script document reading order tree from FLASH or NVRAM once more by the command interpretation part.
Advantage of the present invention is:
1, owing to set up storage and the explanation that the command tree of a clear and definite tree hierarchy relation is realized ordering among the present invention, makes it to carry out commands match fast, easily and search;
2, since command set data of the present invention independently deposit, make command set online modification and be expanded into possibility;
3, after command interpretation is finished, be number to come advising process to call the function that the corresponding function module is realized user's request by obtaining command execution, command interpretation part like this is relatively independent, has improved the maintainability of router operation maintenance and configuration-system.
Description of drawings
The invention will be further described below in conjunction with accompanying drawing.
Fig. 1 is the legend of command tree.
Fig. 2 is a multidimensional chain hoist pennants.
Fig. 3 is the logical flow chart of look-up command.
Embodiment
For can search out fast, commands match and searching easily, we need at first carry out detailed research to order line itself.Find that by studying us the router command set has following high-definition characteristics:
Characteristics 1: be exactly that order line has very significantly level, promptly an order line is made up of several command words and some parameters.These are had the structure of level, and we can come index as setting up chained list originally, also can similarly set up a command tree and come index.Because our front of shortcoming of list structure was analyzed, worthless, so for the tree hierarchy storage? we find that storage mode comes hold-over command if we adopt tree hierarchy, when order line is mated and searched, will have natural convenience.We can be finishing first order command word in the order line as the ground floor node of command tree, second level command word in the complete order row is as the second layer node of command tree, and by that analogy, simultaneously we also in the order with parameter be mapped in the command tree according to the form of command word.
Characteristics 2: be exactly that the tree-like level of the order of router operation maintenance command is not dark, this makes preserving with the command tree form of order become possibility.In other words, be exactly in the router order, if order is divided into level, we will find that the level of order can be too not dark, the command word of each layer neither be too many simultaneously, belongs to a kind of and distribute more uniformly.
By above two characteristics, we think can adopt so a kind of command index method, exactly whole command set is broken, and preserves in the mode of tree hierarchy command tree.When needs carry out command interpretation, in command tree, carry out index according to the order level.Simultaneously, because command set has adopted command tree level storage, make and to revise or seem convenient unusually during extended command set.If revise certain order, as long as go on, find the order that will revise along command tree, make amendment; If increase order, only need be along existing order branch, the leaf or the branch place interpolation command word of adding at needs; If delete command as long as find the command word that will delete along command tree, is deleted this command word leaf and is got final product.
The legend of command tree as shown in Figure 1.
Fig. 1 is the command tree of following command set
disable
enable
show?buffer
show?clock
show?flash?all
show?flash?chips
show?flash?detailed
Because shown in Figure 1 only is visual, a pro forma command tree.Want actual and preserve it, also it must be converted into the logic data structure of a definite form.For this reason, we can adopt the form of multidimensional chained list to come hold-over command.
Fig. 2 is the multidimensional chain hoist pennants with four levels.
Here at first define a dummy argument and come the whole order chained list of index.What dummy argument was pointed is the head pointer of ground floor order chained list, by traveling through this chained list, can obtain all command words of ground floor order in the whole router command set.Each element in the ground floor chained list except comprising the pointer with the next element of layer chained list, has comprised the command word full name, the meaning of command word, the head pointer of the order chained list of following one deck order of command word.Like this, when command lookup, just can come look-up command by the string matching of carrying out command word full name in input command and the chained list, obtain down the chain list index of one deck order after the coupling again, the coupling of following one deck order is until the coupling of finishing whole order.
The logic flow of look-up command is described below:
1, command string is resolved into several command words, coupling is word for word resolved in layering;
2, obtain that the inlet of command tree is a dummy argument in the internal memory, obtain the inlet of ground floor command word chained list;
3, the whole layer of traversal chained list obtains this layer command word and compares one by one, the command word of checking input whether with command set in the command word coupling;
4,, this layer order and the order note that travels through out returned, and report an error if do not match;
5, if mate, obtain the command byte period of coupling;
6, check whether be that order finishes;
If 7, return after obtaining command execution number;
8, if not, viewing command sign, whether parameter;
If 9, enter parameter type and detect;
10, if not, obtain down one deck command pointer;
11, repeated for 3 to 10 steps, finish until command analysis.
Its logic flow is seen Fig. 3,
An important consideration of the present invention is exactly the correlation that as far as possible reduces between each module.Command execution and command interpretation part is carried out by definition command and number is reduced correlation, so, to command interpretation, it will also will reduce correlation with the command tree of command set itself as far as possible, be that the command interpretation part also should be relatively independent, irrelevant with the order that will carry out.Therefore, we leave command tree separately on FLASH or the NVRAM.The command tree of multidimensional chained list to be saved in the continuous linear memory block of a slice among FLASH or the NVRAM, need carry out reorientation the chained list of command tree.
To the reorientation of multidimensional command tree chained list, be exactly of the mapping of multidimensional storage of linked list in fact in a slice order FLASH or NVRAM address.We adopt to deposit tree-like method with the structure array and realize, promptly each element is represented a node of command tree in the array, and the association in the tree between the node is to use the subscript of array to represent.To there be these two information of the structure array of command tree and array element sum like this and write in the computer command script document on FLASH or the NVRAM, finish the physical store of command set.The command interpretation part will directly be read in the internal memory the computer command script document of this array on FLASH or NVRAM, just can the travel all over command tree.
The invention still further relates to a bit, is exactly the online updating of the command set emphasized again and again.Because command set is to be stored in the relatively independent computer command script document of a slice among FLASH or the NVRAM, we can come the update command collection by the mode of update command script file.Specific practice is exactly, at first outside router device, generate new command set, cover FLASH or the original computer command script document of NVRAM, notification command explains that part goes up computer command script document reading order tree from FLASH or NVRAM once more, has so just realized the online upgrading of order.

Claims (5)

1, a kind of router operation is safeguarded and the demanded storage and the command interpretation method of configuration order, it is characterized in that:
(1) the whole command set of router is broken, adopt the command tree mode of tree hierarchy relation to preserve, carry out index, deletion or add order by the order level;
(2) command tree is independently left on rapid memory memory (FLASH) or the nonvolatile random-access memory (NVRAM);
(3) after command interpretation is finished, number come advising process to call the function that corresponding functional modules realizes user's request by obtaining command execution.
2, demanded storage according to claim 1 and command interpretation method, the form that it is characterized in that the employing multidimensional chained list of said command tree, the reorientation of multidimensional order chained list is to deposit tree-like method with the structure array to realize, it is the node that each element is represented command tree in the array, association in the tree between the node is to use the subscript of array to represent, will have these two information of the structure array of command tree and array element sum and write in the computer command script document on FLASH or the NVRAM.
3, demanded storage according to claim 2 and command interpretation method, it is characterized in that at first defining a dummy argument and come the whole multidimensional order of index chained list, what dummy argument was pointed is the head pointer of ground floor order chained list, by traveling through this chained list, obtain all command words of ground floor order in the whole router command set, each element in the ground floor chained list, except that the pointer that comprises with the next element of layer chained list, also comprised the command word full name, the meaning of command word, the head pointer of the order chained list of following one deck order of command word.
4, demanded storage according to claim 1 and 2 and command interpretation method is characterized in that the online updating of command set is realized by update command script file mode.
5, demanded storage according to claim 4 and command interpretation method, the specific practice that it is characterized in that said command set online updating is: at first generate new command set outside router, cover FLASH or the original computer command script document of NVRAM, go up computer command script document reading order tree from FLASH or NVRAM once more by the command interpretation part.
CNB001252046A 2000-09-15 2000-09-15 Operation and maintenance of router and storage and explanation of configuration command Expired - Fee Related CN1160971C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB001252046A CN1160971C (en) 2000-09-15 2000-09-15 Operation and maintenance of router and storage and explanation of configuration command

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB001252046A CN1160971C (en) 2000-09-15 2000-09-15 Operation and maintenance of router and storage and explanation of configuration command

Publications (2)

Publication Number Publication Date
CN1336770A CN1336770A (en) 2002-02-20
CN1160971C true CN1160971C (en) 2004-08-04

Family

ID=4590996

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB001252046A Expired - Fee Related CN1160971C (en) 2000-09-15 2000-09-15 Operation and maintenance of router and storage and explanation of configuration command

Country Status (1)

Country Link
CN (1) CN1160971C (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100345414C (en) * 2003-12-08 2007-10-24 鸿富锦精密工业(深圳)有限公司 Command line interface and control method
CN100390794C (en) * 2005-04-27 2008-05-28 华为技术有限公司 Method for organizing command set of telecommunciation apparatus by navigation tree mode
CN100549981C (en) * 2005-07-15 2009-10-14 中兴通讯股份有限公司 A kind of route equipment is carried out the online and method off-line mixed configuration
CN1925482B (en) * 2005-09-01 2013-03-27 中兴通讯股份有限公司 Transforming method and device for human-machine order format
CN101136780A (en) * 2007-09-12 2008-03-05 华为技术有限公司 Method, system to obtain user command information, and user command registered device
EP2804342A2 (en) * 2012-02-17 2014-11-19 Huawei Technologies Co., Ltd. Method and device for clearing configuration command in communication equipment
CN102880471B (en) * 2012-09-24 2018-06-08 中兴通讯股份有限公司 Command executing method and order line operating system based on order line
CN106301870A (en) * 2015-06-25 2017-01-04 中兴通讯股份有限公司 A kind of method and device realizing command lookup on network devices
CN113821211B (en) * 2021-09-17 2023-06-27 杭州迪普科技股份有限公司 Command parsing method and device, storage medium and computer equipment
CN115048913B (en) * 2022-07-01 2024-07-23 联想(北京)有限公司 Command processing method and device and electronic equipment
CN117194278B (en) * 2023-11-08 2024-02-23 新华三网络信息安全软件有限公司 Device command management method and device, storage medium and electronic device

Also Published As

Publication number Publication date
CN1336770A (en) 2002-02-20

Similar Documents

Publication Publication Date Title
CN107092656B (en) A kind of tree data processing method and system
CN103336813B (en) A kind of Internet of Things data integrated management scheme based on middleware framework
CN107016071B (en) A kind of method and system using simple path characteristic optimization tree data
CN1160971C (en) Operation and maintenance of router and storage and explanation of configuration command
CN107066551B (en) Row-type and column-type storage method and system for tree-shaped data
CN102780574B (en) The collocation method of the office data of service-oriented, device and check method, device
CN109213820B (en) Method for realizing fusion use of multiple types of databases
CN101291253B (en) Man-machine command interaction method for network management terminal based on graphical interface
US20230048726A1 (en) Streaming Network Monitoring Caching Infrastructure
CN1928813A (en) Translation method and system for man/machine interaction interface of application program
CN112367211B (en) Method, device and storage medium for generating configuration template by device command line
CN106095698A (en) OO caching write, read method and device
CN113157723B (en) SQL access method for Hyperridge Fabric
CN113139100B (en) Network flow real-time indexing method and system
KR102428849B1 (en) Method and apparatus for processing image, electronic device, storage medium and program
JP2001166977A (en) Device, system and method for managing data structure and recording medium having data structure management program
CN110928939A (en) Method for converting Sql result set into Json data based on tree structure
CN1549163A (en) Across-platform data base researching method
CN111797111A (en) Dynamic combined query method based on ES search engine
CN105468776A (en) Method, device and system for operating database
CN109739910B (en) Method and system for managing openness label
CN100340996C (en) A digit signal processor software debugging information output method
CN108763127B (en) Method for realizing Modbus adapter capable of realizing interconversion of source data and target data
CN1521989A (en) A method for implementing configuration data organization and centralized management in network management system
KR101342560B1 (en) Mobile Database System for Navigation and Method Therefor

Legal Events

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

Owner name: SHENZHENG CITY ZTE CO., LTD.

Free format text: FORMER OWNER: SHENZHENG CITY ZTE CO., LTD. SHANGHAI SECOND INSTITUTE

Effective date: 20010912

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

Effective date of registration: 20010912

Address after: 518057 Ministry of law, 6 floor, Zhongxing building, South hi tech Industrial Park, Nanshan District hi tech Industrial Park, Guangdong, Shenzhen

Applicant after: Zhongxing Communication Co., Ltd., Shenzhen City

Address before: 200233 No. 396, Shanghai, Guilin Road

Applicant before: Shanghai Inst. of No.2, Zhongxing Communication Co., Ltd., Shenzhen City

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

Granted publication date: 20040804

Termination date: 20190915