CN109067574A - A kind of processing router control remaining method of planar configuration - Google Patents
A kind of processing router control remaining method of planar configuration Download PDFInfo
- Publication number
- CN109067574A CN109067574A CN201810845204.3A CN201810845204A CN109067574A CN 109067574 A CN109067574 A CN 109067574A CN 201810845204 A CN201810845204 A CN 201810845204A CN 109067574 A CN109067574 A CN 109067574A
- Authority
- CN
- China
- Prior art keywords
- configuration
- file
- now
- block
- son
- 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/02—Standardisation; Integration
- H04L41/024—Standardisation; Integration using relational databases for representation of network management data, e.g. managing via structured query language [SQL]
-
- 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/0803—Configuration setting
-
- 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/085—Retrieval of network configuration; Tracking network configuration history
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a kind of processing routers to control the remaining method of planar configuration, comprising: the data for reading single network element from network management database generate a complete standard configuration file right;Download existing net configuration file now;Configuration block, sub- configuration and the son configuration entry keyword for comparing right and now configuration file, identify different configurations, remaining configuration, the configuration lost, and be respectively labeled as D, R, M;The residual for being marked as R is configured and be relied on the sequence of relation preference grade, and the order traversal low to high according to the relationship that is relied on, the association residual found out in right configuration file configures and labeled as DR;It is, the configuration of R, M to generate the script for updating, deleting, adding configuration to label;Three scripts are aggregated into a script, to handle the configuration of problems of existing net.The present invention realizes the remaining configuration of batch processing, reduces newly-increased configuration conflict, improves the efficiency of newly-increased configuration.
Description
Technical field
The present invention relates to the control planes of router, and in particular to a kind of processing router control remaining side of planar configuration
Method.
Background technique
In IPRAN (wireless access network IPization) mobile retransmission local network, business is all by network management or CLI
(command-line interface, Command Line Interface) is configured and is created.When portfolio is continuously increased, especially picture
Mobile static scene, device configuration also linear increase.Due to network management database problem, manual operation, cut over etc.,
It will lead to the residual of configuration;Configuration residual can cause the failure of subsequent newly-increased configuration, after needing manually to remove residual, could increase newly
Configuration, it is seen then that configuration residual reduces the efficiency that new business is opened.
Summary of the invention
The technical problem to be solved by the present invention is to configure residual to cause the failure of subsequent newly-increased configuration, need artificial clear
After residual, configuration could be increased newly, new business is caused to open the problem of efficiency reduces.
In order to solve the above-mentioned technical problem, the technical scheme adopted by the invention is that provide a kind of control of processing router flat
Face configures remaining method, comprising the following steps:
Step S10, the data that tool reads single network element from network management database are first passed through, and generate a complete standard
Configuration file claims right configuration file;It downloads there may be the existing net configuration file of residual configuration, claims now configuration file;
Step S20, the keyword of configuration block of comparison right configuration file and now configuration file, sub- configuration keyword and
Son configuration entry keyword identifies different configurations, remaining configuration, the configuration lost, and is respectively labeled as D, R, M;
Step S30, it finds out in the residual configuration for being marked as R and is remained with right configuration file with associated association
Configuration, and it is labeled as DR;
Step S40, for the configuration labeled as D, the script for updating configuration is generated;For being only labeled as the configuration of R, generate
Delete the script of configuration;For being labeled as the configuration of M, the script of addition configuration is generated;It is raw for being labeled as the configuration of R and DR
At corresponding log;
Step S50, three scripts are aggregated into a script, be supplied to worker maintenance personnel processing now net it is of problems
Configuration.
In the above-mentioned methods, right configuration file and now configuration file can be divided into configuration block, sub- configuration and son configuration item
Mesh is three levels;
The type of the configuration block of right configuration file and now configuration file specifically include interface configuration block, OAM configuration block,
L2VPN business configuration block, L3VPN business configuration block, protocol configuration block, static routing configuration block;
The configuration block of each type includes multiple sub- configurations, and every height configuration is made of multiple configuration entries.
In the above-mentioned methods, the keyword of the configuration block of comparison right configuration file and now configuration file, sub- configuration are closed
Key word and son configuration entry keyword, identify different configurations, remaining configuration, the configuration lost, are by traversing respectively
Compare right configuration file and configuration block, sub- configuration and son in now configuration file configure entry to complete, specifically:
Configuration block is first traversed, right configuration file is existed, the configuration block that now configuration file is not present is directly labeled as
The configuration M of loss;Right configuration file is not present, and now configuration file exists, and is labeled as remaining configuration R;
Exist for right configuration file, configuration block existing for now configuration file traverses the son of these configuration blocks respectively
Configuration;Exist for right configuration block, the son configuration that now configuration block is not present, labeled as the configuration M of loss;Right configuration
Block is not present, and the configuration of son existing for now configuration block is labeled as remaining configuration R;
Exist for right configuration block, the configuration of son existing for now configuration block, traverses the son configuration of this little configuration respectively
Entry;Right is configured and is existed, the son configuration entry that now configuration is not present, labeled as the configuration M of loss;right
Son configuration is not present, and the existing son configuration entry of now configuration is labeled as remaining configuration R;
Right is configured and is existed, the existing son configuration entry of now configuration, more corresponding two sons configuration item
Whether mesh is identical, if it is different, the sub- configuration entry is labeled as different configuration D, if identical, without label.
In the above-mentioned methods, traversal compare configuration block specifically includes the following steps:
Step S210, all configuration blocks present in right configuration file are identified by configuration block keyword i_key;
Step S211, a configuration block right_i successively is taken out from right configuration file, according to configuration block right_i's
Keyword i_key traverses now configuration file;
Step S212, judge to whether there is and the consistent configuration block of configuration block right_i title in now configuration file
Otherwise now_i, executes step S214 if it does, executing step S213;
Step S213, in standard configuration block file right_config_i and existing net configuration block file now_config_i
Configuration block right_i and configuration block now_i is saved respectively, and deletes match from right configuration file and now configuration file respectively
Block right_i and configuration block now_i are set, step S215 is then executed;
Step S214, by the entire configuration block right_i in right configuration file labeled as the configuration identifier M lost;
Step S215, judge whether to have had stepped through all configuration block right_i in right configuration file, if so, holding
Row step S216;Otherwise, step S211 is executed;
Step S216, all configuration blocks remaining in now configuration file are labeled as remaining configuration identifier R;
Step S217, to standard configuration block file right_config_i and existing net configuration block file now_config_i into
Row configuration traversal compares.
In the above-mentioned methods, more sub- configuration is traversed, specifically includes the following steps:
Step S220, a son configuration right_i_j is successively taken out from standard configuration block file right_config_i,
And existing net configuration block file now_config_i is traversed according to the keyword i_j_key of sub- configuration right_i_j;
Step S221, whether there is and sub- configuration right_i_j in the existing net configuration block file now_config_i of judgement
Claim consistent sub- configuration now_i_j;If it does, executing step S222;Otherwise, step S223 is executed;
Step S222, respectively in the sub- configuration file right_config_i_j of standard and existing net configuration file now_
Son configuration right_i_j and right_i_j is saved in config_i_j, and from standard configuration block file right_config_i and
Son configuration right_i_j and now_i_j is deleted in now net configuration block file now_config_i, then executes step S224;
Step S223, by the son configuration right_i_j in standard configuration block file right_config_i labeled as loss
Configuration identifier M;
Step S224, judge whether to have traversed all sub- configurations in standard configuration block file right_config_i, if
It is to execute step S225;Otherwise, step S220 is executed;
Step S225, it configures remaining all sons in existing net configuration file now_config_i_j to labeled as residual
Configuration identifier R;
Step S226, configuration file right_config_i_j to standard and existing net configuration file now_config_
I_j carries out son configuration entry traversal and compares.
In the above-mentioned methods, more sub- configuration entry is traversed, specifically includes the following steps:
Step S230, son configuration entry right_i_ is successively taken out from the sub- configuration file right_config_i_j of standard
J_k, and existing net configuration file now_config_ is traversed according to the keyword i_j_k_key of sub- configuration entry right_i_j_k
i_j;
Step S231, judge to whether there is and sub- configuration entry right_ in existing net configuration file now_config_i_j
The consistent sub- configuration entry of i_j_k title deposits now_i_j_k, if it does, executing step S232;Otherwise, S235 is executed;
Step S232, judge whether consistent sub- configuration entry right_i_j_k and the now_i_j_k content of title is identical,
If identical, step S233 is executed;Otherwise, step S234 is executed;
Step S233, from the sub- configuration file right_config_i_j of standard and existing net configuration file now_config_
Identical sub- configuration entry right_i_j_k and now_i_j_k are deleted in i_j respectively, then executes step S236;
Step S234, by the son configuration entry right_i_j_k mark in the sub- configuration file right_config_i_j of standard
It is denoted as different configuration flag D, then executes step S236;
Step S235, by the son configuration entry right_i_j_k mark in the sub- configuration file right_config_i_j of standard
It is denoted as the configuration flag M of loss;
Step S236, judge whether to have traversed son configuration item all in the sub- configuration file right_config_i_j of standard
Mesh right_i_j_k, if so, executing step S237;Otherwise, step S230 is executed;
Step S237, by sub- configuration entry now_i_j_k mark remaining in existing net configuration file now_config_i_j
It is denoted as remaining configuration flag R;
Step S238, terminate identification.
In the above-mentioned methods, after the completion of traversal, by the configuration for being labeled as different configuration D, it is labeled as remaining configuration R
Configuration, labeled as the configuration M of loss configuration be respectively written into temporary file different configuration file different, residual
Configuration file remain, loss configuration file miss, and generated according to different configuration file different and update configuration
Script, according to the configuration file miss of loss generate addition configuration script, according to remaining configuration file remain generate
Corresponding log generates the foot for deleting configuration according to the remaining configuration file remain deleted labeled as association residual configuration DR
This.
In the above-mentioned methods, after the completion of traversal, the residual configuration block for being marked as R is carried out to be relied on relation preference grade row
Sequence traverses all residual configurations according to the sequence of the relationship that is relied on from low to high, finds out to have with right configuration file and close
The association of connection remains configuration, and marks association residual configuration DR.
In the above-mentioned methods, all residual configurations are traversed, label is associated with residual configuration, specifically:
Step S301, son configuration is taken out from the residual configuration block remain_i of remaining configuration file remain
Remain_i_j generates a keyword m_n_key according to the associated configuration of upper level;
Step S302, upper level is searched in right and now backed-up config file by keyword m_n_key to be associated
Son configuration right_m_n and now_m_n;
Step S303, after completing the associated upper level configuration of traversal label, the son of associated next stage is configured
Carry out traversal label;
Step S304, multilevel iudge is with the presence or absence of son configuration right_m_n and now_m_n, as fruit configures right_m_n
All exist with now_m_n, executes step S305;If only son configuration right_m_n exists, step S305 is executed;Such as fruit
Configuration right_m_n and now_m_n is not present, and executes step S306;If only son configuration now_m_n exists, step is executed
Rapid S306;
Step S305, label configuration remain_i_j is DR;
Step S306, judge whether to have traversed all sub- configurations of all configuration block remain_i;If so, executing step
S308;Otherwise, step S307 is executed;
Step S307, j=j+1 is enabled, step S301 is executed;
Step S308 judges whether all configuration blocks for having traversed remaining configuration file remain, if it is not, executing
Step S309;Otherwise, process terminates;
Step S309, i=i+1 is then enabled, step S301 is executed.
The present invention, by that will likely have the existing net configuration file of residual configuration from standard configuration file according to different grading
Row traverses layer by layer, and the configuration of the residual in net configuration file occurs in identification, and is marked, further according to residual configuration respectively at it
Associated configuration is found in upper and lower grade, and is marked, finally the residual configuration of label is uniformly processed, to realize
The remaining configuration of batch processing reduces newly-increased configuration conflict, improves the efficiency of newly-increased configuration, brings for engineering staff's to maintain equipment
It is convenient.
Detailed description of the invention
Fig. 1 is the flow chart that a kind of processing router provided by the invention controls the remaining method of planar configuration;
Fig. 2 is the flow chart that traversal compares configuration block in the present invention;
Fig. 3 is the flow chart that more sub- configuration is traversed in the present invention;
Fig. 4 is the flow chart that more sub- configuration entry is traversed in the present invention
Fig. 5 is the flow chart of label incidence relation configuration in the present invention.
Specific embodiment
The present invention is described in detail with specific embodiment with reference to the accompanying drawings of the specification.
As shown in Figure 1, a kind of processing router provided by the invention controls the remaining method of planar configuration, including following step
It is rapid:
Step S10, the data that tool reads single network element from network management database are first passed through, and generate a complete standard
Configuration file claims right configuration file;It downloads there may be the existing net configuration file of residual configuration, claims now configuration file.
Step S20, the keyword of configuration block of comparison right configuration file and now configuration file, sub- configuration keyword and
Son configuration entry keyword identifies different configurations, remaining configuration, the configuration lost, and is respectively labeled as D
(Different)、R(Remain)、M(Miss)。
In the present invention, right configuration file and now configuration file can be divided into configuration block (right_i and now_i), son
It configures (right_i_j and now_i_j) and son configuration entry (right_i_j_k and now_i_j_k) is three levels, right
Configuration file and now configuration file include many different type configuration blocks, different type configuration block specifically include interface configuration block,
OAM configuration block, L2VPN business configuration block, L3VPN business configuration block, protocol configuration block (including OSPF, ISIS, BGP, LDP,
RSVP-TE etc.), static routing configuration block etc., the configuration block of each type includes multiple sub- configurations, and every height configuration is matched by multiple
Set entry composition;Such as total interface configuration is a configuration block, individual interface configuration is a son configuration, each interface configuration
Under one order be one son configuration entry.
Step S30, it finds out in the residual configuration for being marked as R and is remained with right configuration file with associated association
Configuration, and it is labeled as DR (Dependency Relationship).
Step S40, according to there are the label of problematic arrangement, different disposal is done, for being labeled as the configuration of D, generates and updates
The script of configuration;For being only labeled as the configuration of R, the script for deleting configuration is generated;For being labeled as the configuration of M, addition is generated
The script of configuration;For the configuration labeled as R and DR, corresponding log is generated, prompting user, these are configured there are incidence relation,
It will affect business when handling corresponding scripts, need to check log, manual identified handles manually.
Step S50, three scripts are aggregated into a script, be supplied to worker maintenance personnel processing now net it is of problems
Configuration.
In the present invention, the keyword of the configuration block of comparison right configuration file and now configuration file, sub- configuration are crucial
Word and son configuration entry keyword, identify different configurations, remaining configuration, the configuration lost, are by traversing ratio respectively
It is completed compared with configuration block, sub- configuration and the son configuration entry in right configuration file and now configuration file, specifically:
Configuration block is first traversed, right configuration file is existed, the configuration block that now configuration file is not present is directly labeled as
The configuration M of loss;Right configuration file is not present, and now configuration file exists, and is labeled as remaining configuration R;
Exist for right configuration file, configuration block existing for now configuration file traverses the son of these configuration blocks respectively
Configuration;Exist for right configuration block, the son configuration that now configuration block is not present, labeled as the configuration M of loss;Right configuration
Block is not present, and the configuration of son existing for now configuration block is labeled as remaining configuration R;
Exist for right configuration block, the configuration of son existing for now configuration block, traverses the son configuration of this little configuration respectively
Entry;Right is configured and is existed, the son configuration entry that now configuration is not present, labeled as the configuration M of loss;right
Son configuration is not present, and the existing son configuration entry of now configuration is labeled as remaining configuration R;
Right is configured and is existed, the existing son configuration entry of now configuration, more corresponding two sons configuration item
Whether mesh is identical, if it is different, the sub- configuration entry is labeled as different configuration D, if identical, without label.
As shown in Fig. 2, traversal compare configuration block specifically includes the following steps:
Step S210, all configuration blocks present in right configuration file are identified by configuration block keyword i_key;
Step S211, a configuration block right_i successively is taken out from right configuration file, according to configuration block right_i's
Keyword i_key traverses now configuration file;
Step S212, judge to whether there is and the consistent configuration block of configuration block right_i title in now configuration file
Otherwise now_i, executes step S214 if it does, executing step S213;
Step S213, in standard configuration block file right_config_i and existing net configuration block file now_config_i
Configuration block right_i and configuration block now_i is saved respectively, and deletes match from right configuration file and now configuration file respectively
Block right_i and configuration block now_i are set, step S215 is then executed;
Step S214, by the entire configuration block right_i in right configuration file labeled as the configuration identifier M lost;
Step S215, judge whether to have had stepped through all configuration block right_i in right configuration file, if so, holding
Row step S216;Otherwise, step S211 is executed;
Step S216, all configuration blocks remaining in now configuration file are labeled as remaining configuration identifier R;
Step S217, to standard configuration block file right_config_i and existing net configuration block file now_config_i into
Row configuration traversal compares.
As shown in figure 3, the more sub- configuration of traversal, specifically includes the following steps:
Step S220, a son configuration right_i_j is successively taken out from standard configuration block file right_config_i,
And existing net configuration block file now_config_i is traversed according to the keyword i_j_key of sub- configuration right_i_j;
Step S221, whether there is and sub- configuration right_i_j in the existing net configuration block file now_config_i of judgement
Claim consistent sub- configuration now_i_j;If it does, executing step S222;Otherwise, step S223 is executed;
Step S222, respectively in the sub- configuration file right_config_i_j of standard and existing net configuration file now_
Son configuration right_i_j and right_i_j is saved in config_i_j, and from standard configuration block file right_config_i and
Son configuration right_i_j and now_i_j is deleted in now net configuration block file now_config_i, then executes step S224;
Step S223, by the son configuration right_i_j in standard configuration block file right_config_i labeled as loss
Configuration identifier M;
Step S224, judge whether to have traversed all sub- configurations in standard configuration block file right_config_i, if
It is to execute step S225;Otherwise, step S220 is executed;
Step S225, it configures remaining all sons in existing net configuration file now_config_i_j to labeled as residual
Configuration identifier R;
Step S226, configuration file right_config_i_j to standard and existing net configuration file now_config_
I_j carries out son configuration entry traversal and compares.
As shown in figure 4, the more sub- configuration entry of traversal, specifically includes the following steps:
Step S230, son configuration entry right_i_ is successively taken out from the sub- configuration file right_config_i_j of standard
J_k, and existing net configuration file now_config_ is traversed according to the keyword i_j_k_key of sub- configuration entry right_i_j_k
i_j;
Step S231, judge to whether there is and sub- configuration entry right_ in existing net configuration file now_config_i_j
The consistent sub- configuration entry of i_j_k title deposits now_i_j_k, if it does, executing step S232;Otherwise, S235 is executed;
Step S232, judge whether consistent sub- configuration entry right_i_j_k and the now_i_j_k content of title is identical,
If identical, step S233 is executed;Otherwise, step S234 is executed;
Step S233, from the sub- configuration file right_config_i_j of standard and existing net configuration file now_config_
Identical sub- configuration entry right_i_j_k and now_i_j_k are deleted in i_j respectively, then executes step S236;
Step S234, by the son configuration entry right_i_j_k mark in the sub- configuration file right_config_i_j of standard
It is denoted as different configuration flag D, then executes step S236;
Step S235, by the son configuration entry right_i_j_k mark in the sub- configuration file right_config_i_j of standard
It is denoted as the configuration flag M of loss;
Step S236, judge whether to have traversed son configuration item all in the sub- configuration file right_config_i_j of standard
Mesh right_i_j_k, if so, executing step S237;Otherwise, step S230 is executed;
Step S237, by sub- configuration entry now_i_j_k mark remaining in existing net configuration file now_config_i_j
It is denoted as remaining configuration flag R;
Step S238, terminate traversal.
After the completion of traversal, by labeled as different configuration D configuration, labeled as it is remaining configure R configuration, be labeled as
The configuration of the configuration M of loss is respectively written into different configuration file different, the remaining configuration file of temporary file
The configuration file miss of remain, loss, and the script for updating configuration, root are generated according to different configuration file different
The script that addition configuration is generated according to the configuration file miss of loss generates corresponding log according to remaining configuration file remain,
The script for deleting configuration is generated according to the remaining configuration file remain deleted labeled as association residual configuration DR.
After the completion of traversal, be relied on the sequence of relation preference grade to the residual configuration block for being marked as R, according to being relied on
The sequence of relationship from low to high traverses all residual configurations;Finding out with right configuration file there is associated association residual to match
It sets, and marks association residual configuration DR.If Fig. 5 is that label incidence relation configures implementation process.Specifically includes the following steps:
Step S301, son configuration is taken out from the residual configuration block remain_i of remaining configuration file remain
Remain_i_j generates a keyword m_n_key according to the associated configuration of upper level;
Step S302, upper level is searched in right and now backed-up config file by keyword m_n_key to be associated
Son configuration right_m_n and now_m_n;
Step S303, after completing the associated upper level configuration of traversal label, the son of associated next stage is configured
Carry out traversal label;
Step S304, multilevel iudge is with the presence or absence of son configuration right_m_n and now_m_n, as fruit configures right_m_n
All exist with now_m_n, executes step S305;If only son configuration right_m_n exists, step S305 is executed;Such as fruit
Configuration right_m_n and now_m_n is not present, and executes step S306;If only son configuration now_m_n exists, step is executed
Rapid S306;
Step S305, label configuration remain_i_j is DR;
Step S306, judge whether to have traversed all sub- configurations of all configuration block remain_i;If so, executing step
S308;Otherwise, step S307 is executed;
Step S307, j=j+1 is enabled, step S301 is executed, continues to traverse next height configuration;
Step S308 judges whether all configuration blocks for having traversed remaining configuration file remain, if it is not, executing
Step S309;Otherwise, process terminates;
Step S309, i=i+1 is then enabled, step S301 is executed, traverses next configuration block.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.
Claims (9)
1. a kind of processing router controls the remaining method of planar configuration, which comprises the following steps:
Step S10, the data that tool reads single network element from network management database are first passed through, and generate a complete standard configuration
File claims right configuration file;It downloads there may be the existing net configuration file of residual configuration, claims now configuration file;
Step S20, it compares right configuration file and the keyword, sub- configuration keyword and son of the configuration block of now configuration file is matched
Entry keyword is set, identifies different configurations, remaining configuration, the configuration lost, and be respectively labeled as D, R, M;
Step S30, finding out in the residual configuration for being marked as R with right configuration file there is associated association residual to configure,
And it is labeled as DR;
Step S40, for the configuration labeled as D, the script for updating configuration is generated;For being only labeled as the configuration of R, generates and delete
The script of configuration;For being labeled as the configuration of M, the script of addition configuration is generated;For being labeled as the configuration of R and DR, phase is generated
The log answered;
Step S50, three scripts are aggregated into a script, are supplied to worker maintenance personnel processing and now net of problems match
It sets.
2. the method according to claim 1, wherein right configuration file and now configuration file can be divided into configuration
Block, sub- configuration and son configuration entry are three levels;
The type of the configuration block of right configuration file and now configuration file specifically include interface configuration block, OAM configuration block,
L2VPN business configuration block, L3VPN business configuration block, protocol configuration block, static routing configuration block;
The configuration block of each type includes multiple sub- configurations, and every height configuration is made of multiple configuration entries.
3. according to the method described in claim 2, it is characterized in that, the configuration of comparison right configuration file and now configuration file
The keyword of block, sub- configuration keyword and son configuration entry keyword, identify different configurations, it is remaining configuration, lose
Configuration is by traversing the configuration block compared in right configuration file and now configuration file, sub- configuration and son configuration item respectively
Mesh is completed, specifically:
Configuration block is first traversed, right configuration file is existed, the configuration block that now configuration file is not present is directly labeled as losing
Configuration M;Right configuration file is not present, and now configuration file exists, and is labeled as remaining configuration R;
Exist for right configuration file, configuration block existing for now configuration file, traverses the son configuration of these configuration blocks respectively;
Exist for right configuration block, the son configuration that now configuration block is not present, labeled as the configuration M of loss;Right configuration block is not deposited
In the configuration of son existing for now configuration block, labeled as remaining configuration R;
Exist for right configuration block, the configuration of son existing for now configuration block, traverses the son configuration entry of this little configuration respectively;
Right is configured and is existed, the son configuration entry that now configuration is not present, labeled as the configuration M of loss;The configuration of right
It is not present, the existing son configuration entry of now configuration is labeled as remaining configuration R;
Right is configured and is existed, now configures existing son configuration entry, and more corresponding two sons, which configure entry, is
It is no identical, if it is different, the sub- configuration entry is labeled as different configuration D, if identical, without label.
4. according to the method described in claim 3, it is characterized in that, traversal compare configuration block specifically includes the following steps:
Step S210, all configuration blocks present in right configuration file are identified by configuration block keyword i_key;
Step S211, a configuration block right_i successively is taken out from right configuration file, according to the key of configuration block right_i
Word i_key traverses now configuration file;
Step S212, judge in now configuration file with the presence or absence of with the consistent configuration block now_i of configuration block right_i title,
If it does, executing step S213, otherwise, step S214 is executed;
Step S213, in standard configuration block file right_config_i and existing net configuration block file now_config_i respectively
Configuration block right_i and configuration block now_i is saved, and deletes configuration block from right configuration file and now configuration file respectively
Then right_i and configuration block now_i executes step S215;
Step S214, by the entire configuration block right_i in right configuration file labeled as the configuration identifier M lost;
Step S215, judge whether to have had stepped through all configuration block right_i in right configuration file, if so, executing step
Rapid S216;Otherwise, step S211 is executed;
Step S216, all configuration blocks remaining in now configuration file are labeled as remaining configuration identifier R;
Step S217, son is carried out to standard configuration block file right_config_i and existing net configuration block file now_config_i
Configuration traversal compares.
5. according to the method described in claim 3, it is characterized in that, the more sub- configuration of traversal, specifically includes the following steps:
Step S220, a son configuration right_i_j, and root are successively taken out from standard configuration block file right_config_i
According to the existing net configuration block file now_config_i of the keyword i_j_key traversal of sub- configuration right_i_j;
Step S221, whether there is and sub- configuration right_i_j title one in the existing net configuration block file now_config_i of judgement
The son configuration now_i_j of cause;If it does, executing step S222;Otherwise, step S223 is executed;
Step S222, respectively in the sub- configuration file right_config_i_j of standard and existing net configuration file now_config_
Son configuration right_i_j and right_i_j is saved in i_j, and is matched from standard configuration block file right_config_i and existing net
It sets and deletes son configuration right_i_j and now_i_j in block file now_config_i, then execute step S224;
Step S223, the son configuration right_i_j in standard configuration block file right_config_i is matched labeled as what is lost
Set mark M;
Step S224, judge whether to have traversed all sub- configurations in standard configuration block file right_config_i, if so, holding
Row step S225;Otherwise, step S220 is executed;
Step S225, remaining all sons in existing net configuration file now_config_i_j are configured to match labeled as remaining
Set mark R;
Step S226, configuration file right_config_i_j to standard and existing net configuration file now_config_i_j into
Row configuration entry traversal compares.
6. according to the method described in claim 3, it is characterized in that, the more sub- configuration entry of traversal, specifically includes the following steps:
Step S230, son configuration entry right_i_j_k is successively taken out from the sub- configuration file right_config_i_j of standard,
And existing net configuration file now_config_i_j is traversed according to the keyword i_j_k_key of sub- configuration entry right_i_j_k;
Step S231, judge to whether there is and sub- configuration entry right_i_j_ in existing net configuration file now_config_i_j
The consistent sub- configuration entry of k title deposits now_i_j_k, if it does, executing step S232;Otherwise, S235 is executed;
Step S232, judge whether consistent sub- configuration entry right_i_j_k and the now_i_j_k content of title is identical, if
It is identical, execute step S233;Otherwise, step S234 is executed;
Step S233, from the sub- configuration file right_config_i_j of standard and existing net configuration file now_config_i_j
Identical sub- configuration entry right_i_j_k and now_i_j_k are deleted respectively, then execute step S236;
Step S234, the son configuration entry right_i_j_k in the sub- configuration file right_config_i_j of standard is labeled as
Then different configuration flag D executes step S236;
Step S235, the son configuration entry right_i_j_k in the sub- configuration file right_config_i_j of standard is labeled as
The configuration flag M of loss;
Step S236, judge whether to have traversed son configuration entry all in the sub- configuration file right_config_i_j of standard
Right_i_j_k, if so, executing step S237;Otherwise, step S230 is executed;
Step S237, sub- configuration entry now_i_j_k remaining in existing net configuration file now_config_i_j is labeled as
Remaining configuration flag R;
Step S238, terminate identification.
7. according to the method described in claim 3, it is characterized in that, matching for different configuration D will be labeled as after the completion of traversal
It sets, the configuration labeled as remaining configuration R, the configuration labeled as the configuration M of loss are respectively written into the different of temporary file and match
Set file different, remaining configuration file remain, loss configuration file miss, and according to different configuration files
Different generates the script for updating configuration, the script of addition configuration is generated according to the configuration file miss of loss, according to residual
Configuration file remain generate corresponding log, according to the remaining configuration file deleted labeled as association residual configuration DR
Remain generates the script for deleting configuration.
8. the method according to the description of claim 7 is characterized in that after the completion of traversal, to be marked as the residual configuration block of R into
Row is relied on the sequence of relation preference grade, according to the sequence of the relationship that is relied on from low to high, traverses all residuals configurations, find out and
Right configuration file has associated association residual configuration, and marks association residual configuration DR.
9. according to the method described in claim 8, configuring it is characterized in that, traversing all residuals, label association remains configuration,
Specifically:
Step S301, son configuration remain_i_ is taken out from the residual configuration block remain_i of remaining configuration file remain
J generates a keyword m_n_key according to the associated configuration of upper level;
Step S302, the associated son of upper level is searched in right and now backed-up config file by keyword m_n_key to match
Set right_m_n and now_m_n;
Step S303, after completing the associated upper level configuration of traversal label, the son configuration of associated next stage is carried out
Traversal label;
Step S304, multilevel iudge with the presence or absence of son configuration right_m_n and now_m_n, as fruit configuration right_m_n and
Now_m_n exists, and executes step S305;If only son configuration right_m_n exists, step S305 is executed;As fruit is matched
It sets right_m_n and now_m_n is not present, execute step S306;If only son configuration now_m_n exists, step is executed
S306;
Step S305, label configuration remain_i_j is DR;
Step S306, judge whether to have traversed all sub- configurations of all configuration block remain_i;If so, executing step
S308;Otherwise, step S307 is executed;
Step S307, j=j+1 is enabled, step S301 is executed;
Step S308 judges whether all configuration blocks for having traversed remaining configuration file remain, if it is not, executing step
S309;Otherwise, process terminates;
Step S309, i=i+1 is then enabled, step S301 is executed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810845204.3A CN109067574B (en) | 2018-07-27 | 2018-07-27 | Method for processing configuration residue of router control plane |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810845204.3A CN109067574B (en) | 2018-07-27 | 2018-07-27 | Method for processing configuration residue of router control plane |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109067574A true CN109067574A (en) | 2018-12-21 |
CN109067574B CN109067574B (en) | 2022-03-25 |
Family
ID=64836007
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810845204.3A Active CN109067574B (en) | 2018-07-27 | 2018-07-27 | Method for processing configuration residue of router control plane |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109067574B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112564929A (en) * | 2019-09-10 | 2021-03-26 | 烽火通信科技股份有限公司 | Residual data cleaning method and system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1968133A (en) * | 2006-04-11 | 2007-05-23 | 华为技术有限公司 | Equipment configuration information management method and its system |
EP1780941B1 (en) * | 2005-10-31 | 2009-07-22 | PacketFront Systems AB | Network configuration |
CN103229458A (en) * | 2012-11-28 | 2013-07-31 | 华为技术有限公司 | Residual information processing method and device |
CN104601366A (en) * | 2014-12-05 | 2015-05-06 | 无锡城市云计算中心有限公司 | Configuration service method and device for control and service nodes |
CN105939205A (en) * | 2015-08-28 | 2016-09-14 | 杭州迪普科技有限公司 | Configuration rollback method and device |
-
2018
- 2018-07-27 CN CN201810845204.3A patent/CN109067574B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1780941B1 (en) * | 2005-10-31 | 2009-07-22 | PacketFront Systems AB | Network configuration |
CN1968133A (en) * | 2006-04-11 | 2007-05-23 | 华为技术有限公司 | Equipment configuration information management method and its system |
CN103229458A (en) * | 2012-11-28 | 2013-07-31 | 华为技术有限公司 | Residual information processing method and device |
CN104601366A (en) * | 2014-12-05 | 2015-05-06 | 无锡城市云计算中心有限公司 | Configuration service method and device for control and service nodes |
CN105939205A (en) * | 2015-08-28 | 2016-09-14 | 杭州迪普科技有限公司 | Configuration rollback method and device |
Non-Patent Citations (1)
Title |
---|
郑柳清: "电信级业务平台安全体系的构建", 《电信技术 》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112564929A (en) * | 2019-09-10 | 2021-03-26 | 烽火通信科技股份有限公司 | Residual data cleaning method and system |
CN112564929B (en) * | 2019-09-10 | 2022-08-05 | 烽火通信科技股份有限公司 | Residual data cleaning method and system |
Also Published As
Publication number | Publication date |
---|---|
CN109067574B (en) | 2022-03-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20160112269A1 (en) | Identifying configuration inconsistency in edge-based software defined networks (sdn) | |
CN107682197A (en) | Device updating method, the network equipment and server | |
Sun et al. | A systematic approach for evolving VLAN designs | |
CN113475040B (en) | Learning by inference from brown deployments | |
US7558835B1 (en) | Application of a configuration patch to a network device | |
CN105187475B (en) | The method and system that data synchronize | |
CN107347017A (en) | The method, apparatus and configuration point device of a kind of device upgrade | |
US7957300B2 (en) | Network management apparatus and method thereof | |
CN107222347B (en) | Configuration reverse-brushing method based on PTN equipment | |
EP3101842B1 (en) | Method, system and computer readable medium for network management automation | |
CN105072398B (en) | A kind of device updating method and device | |
US8201144B2 (en) | Method and system for distributing software components | |
CN109067574A (en) | A kind of processing router control remaining method of planar configuration | |
CN107368513A (en) | The method and device of client database renewal | |
BR102022001453A2 (en) | METHOD AND SYSTEM TO PROVIDE A WIDESPREAD APPROACH TO CULTURE MAPPING IN REGIONS WITH VARIOUS CHARACTERISTICS | |
CN102480377B (en) | Management method and system of aggregation link | |
CN111800339B (en) | Route optimization method with path number constraint in hybrid SDN scene | |
US8260932B2 (en) | Using broadcast domains to manage virtual local area networks | |
CN107977310A (en) | One kind traversal test command generation method and device | |
CN1946039A (en) | Method and device for analyzing command line back display information based on template volume | |
CN107220809A (en) | The method and system of change tissue based on Active Directory organizational structure | |
CN111104247A (en) | Method, apparatus and computer program product for managing data replication | |
CN113162782B (en) | Data center network configuration method and device | |
CN103595554A (en) | Business data increment loading method for web master | |
CN107018014A (en) | It is a kind of based on circuit configure to flash cut method |
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 |