CN112532517A - OSPF protocol configuration comprehensive scheme based on domain specific language - Google Patents

OSPF protocol configuration comprehensive scheme based on domain specific language Download PDF

Info

Publication number
CN112532517A
CN112532517A CN202011220342.6A CN202011220342A CN112532517A CN 112532517 A CN112532517 A CN 112532517A CN 202011220342 A CN202011220342 A CN 202011220342A CN 112532517 A CN112532517 A CN 112532517A
Authority
CN
China
Prior art keywords
configuration
strategy
topology
file
user
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
Application number
CN202011220342.6A
Other languages
Chinese (zh)
Other versions
CN112532517B (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.)
Northeastern University China
Original Assignee
Northeastern University China
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 Northeastern University China filed Critical Northeastern University China
Priority to CN202011220342.6A priority Critical patent/CN112532517B/en
Publication of CN112532517A publication Critical patent/CN112532517A/en
Application granted granted Critical
Publication of CN112532517B publication Critical patent/CN112532517B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/14Routing performance; Theoretical aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/425Lexical analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0889Techniques to speed-up the configuration process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention realizes an OSPF protocol configuration comprehensive scheme based on a domain specific language, a user writes a strategy file and a topology file of a target network as system diagram input, and the system checks the feasibility of a user strategy and automatically generates a configuration file meeting the user strategy for target network routing equipment. The scheme designs a high-level grammar for describing the OSPF protocol flow strategy, designs a method for verifying the feasibility of user intention, designs a method and optimization for translating strategy statements into a first-order logic expression, designs a method for generating and solving configuration parameters, and designs a flow and a framework of an overall system. The invention can provide the automatic configuration of the OSPF protocol flow strategy of the intra-domain network with high efficiency and accuracy for the user, greatly lightens the workload of the manual configuration of the user and reduces the possibility of network failure caused by the manual configuration.

Description

OSPF protocol configuration comprehensive scheme based on domain specific language
Technical Field
The invention belongs to the field of network configuration integration, in particular to an OSPF protocol configuration integration scheme based on a domain specific language, and relates to a DSL primitive for describing OSPF configuration intention and an integrated method for verifying, translating and solving the intention.
Background
The internet is more and more complex, the functions and services supported by the network equipment are more and more, and the configuration work of the network becomes fussy and complex. Configuration errors are frequent due to the complexity of network configuration, and research shows that the configuration errors are one of the main reasons for network interruption and exception generation, and the reason for the configuration errors is that the current network configuration work is mostly manual configuration, which is time-consuming and inefficient and greatly increases the possibility of configuration errors. The OSPF protocol is used as a link state protocol, is widely applied to an intra-domain network in various aspects such as loop avoidance and the like, has quite high configuration frequency, can realize the path control of intra-domain network flow through the cost attribute of an interface, but has higher requirement on network configuration personnel by realizing a flow strategy through the OSPF protocol.
The Domain Specific Language (DSL) is a custom programming language designed to solve specific problems, and the DSL is limited in expression scope compared with a general-purpose programming language such as JAVA, but is generally higher in expression level than the general-purpose programming language, and mostly has an explicit syntax in its syntax structure, which is a small and specific computer programming language. In the field of network configuration, DSL is often used to design policy input describing a user, and the characteristics of its programming language can accurately represent the configuration intention of the user. The scheme designs DSL grammar for describing the flow path strategy based on the principle of OSPF protocol and the configuration requirement, and realizes the configuration strategy for flow routing, load balancing and flow isolation.
Disclosure of Invention
Under the characteristics of low language level of current network equipment configuration, time and labor consumption of manual configuration, easy configuration error, network fault and the like, in order to efficiently and correctly configure network configuration and realize complex and various flow strategies, a set of high-level flow strategy configuration grammar related to an OSPF protocol is designed based on a DSL method, and the solution of configuration key parameters is realized based on a formalization method. The scheme can generate configuration topology irrelevant to equipment manufacturers, and automatically generate the configuration file of the target network routing equipment by mapping the parameters to the configuration template.
A comprehensive scheme for realizing OSPF protocol configuration based on a domain specific language is characterized in that flow is used as a description main body, keywords and nodes are used as strategy development description strategy syntax design, strategy syntax verification and strategy intention feasibility analysis methods are adopted, constraint conversion is used for converting strategy statements into a section of logic expression, a pruning method is used for optimizing topology, reducing constraint conversion scale and accelerating solving efficiency, configuration topology irrelevant to equipment manufacturers is used for storing configuration key parameters, and the parameters are mapped to a configuration template to generate a configuration file of target network routing equipment;
the main steps of the OSPF protocol configuration synthesis based on DSL are:
step 1: a user writes a configuration file and a topology file according to the strategy intention and the grammar rule;
step 2: analyzing a configuration file and a topology file input by a user;
and step 3: carrying out feasibility verification on a user configuration strategy, and carrying out pruning processing on the topology;
and 4, step 4: converting the user strategy into a first-order logic expression as the input of an SMT solver;
and 5: performing feasibility solution by using an SMT solver;
step 6: and mapping the generated abstract configuration parameters to a configuration template to generate a configuration file.
The step 1 of writing the configuration file and the topology file by the user specifically comprises the following steps:
step 1.1, a user writes a policy file according to the grammar shown in the figure 1, and the node name in the policy file is consistent with the node in the topology file;
step 1.2, a user writes a topology file according to the network topology structure, and the topology file describes the connection relation between the node name and the node by using an XML format.
The step 2 of analyzing the configuration file and the topology file input by the user specifically comprises the following steps:
step 2.1, carrying out lexical analysis on the configuration file by using a lexical analyzer to reduce keywords and other parameters;
step 2.2, carrying out lexical analysis on the token stream processed by the lexical analyzer by using a grammar analyzer, and sorting and extracting the input corresponding to different keywords to input to different corresponding modules;
and 2.3, constructing a bidirectional directed graph according to the topology file, namely, two directed edges in opposite directions are arranged between every two connected nodes, and constructing additional data structures on the nodes and the edges to express configuration information of the routing equipment, such as an interface ip and a cost attribute.
The step 3 of performing feasibility verification on the user configuration strategy and pruning the topology specifically comprises the following steps:
step 3.1, carrying out feasibility verification on the traffic paths in the policy file to prevent unrealizable policies; when the shortest path of two traffic policies ip1 is A, B, C, and the shortest path of ip2 is A, D, C, the traffic policies for the traffic policies ip1 and ip2 cannot be realized simultaneously through an OSPF protocol, because the cost attribute of the OSPF cannot distinguish different ip traffic; conflict paths need to be found out through analysis among the paths;
and 3.2, pruning the edges which do not appear on the strategy path in the topology to generate a simplified topology for subsequent path calculation, and carrying out cost maximum value assignment on the pruned edges in the original topology to ensure that the edges do not influence the strategy.
The step 4 of converting the user policy into a first-order logic expression as an input of the SMT solver specifically comprises the following steps:
step 4.1, acquiring other path sets related to the strategy according to the path related to each strategy statement and the optimized topology subjected to pruning;
step 4.2, generating a corresponding first-order logic expression for each strategy; for the optimal path, the path priority relationship and the equal cost multipath, the unequal relationship of the sum of the path weights between two points can be converted according to the characteristics of the OSPF protocol; expression of the optimal path:
C(P(ab))<C(P(other))
wherein P (ab) is node a to node b having the policy optimal path, P (other) is the path set of node a to node b except the policy path, C (P) represents the link weight of path P; and generating corresponding unequal expressions according to different keywords of each strategy statement.
The feasibility solving in the step 5 by using an SMT solver specifically comprises the following steps: and setting corresponding variables for each edge according to the topological graph, setting the pruned edges as fixed constants, performing constraint solution by using the first-order logic expression as a constraint condition, and assigning cost attributes of the edges in the topological graph according to the corresponding relation between the variables and the edges.
The concrete step of mapping the generated abstract configuration parameters to the configuration template to generate the configuration file in the step 6 comprises the following steps: automatically generating an interface ip address according to the connection relation of the topology, and setting the ip of the network and corresponding interface information at the topology node according to the target ip of the strategy; combining with the cost attribute value generated by solving, the topology already contains all the configuration key parameters irrelevant to the equipment manufacturer; and writing a configuration template by combining a pair of equipment manufacturers, filling key parameters, and generating a specific configuration file for each equipment.
The invention has the advantages that:
the invention designs a grammar which takes ip flow as a description main body, different keywords represent different flow strategies, and node paths are taken as the specific expansion of the strategies. The user can quickly generate the configuration file of the OSPF protocol of the routing equipment meeting the user flow strategy in an intra-domain network, such as a backbone network or a campus network, the user directly guides the generated configuration file into the routing equipment, the target network can meet the connectivity and simultaneously meet the path control of the user on the target flow, and the comprehensively calculated key parameters are stored in a topological structure, the comprehensive algorithm is irrelevant to a routing equipment manufacturer, so the configuration template module is changed to generate the configuration file of the routing equipment for a user equipment manufacturer, such as Huacheng and Cisco. The grammar structure of the scheme is light, popular and easy to understand, and the user can learn quickly with low cost. In the process of configuring and comprehensively solving, the feasibility verification of the intention level is carried out on the input strategy, whether the intention strategy of the user cannot be realized can be checked, if no strategy intention conflict exists, the result generated by the system can be ensured to be in accordance with the intention of the user configuration strategy. The method for configuring the comprehensive solution uses a method for converting the strategy into a first-order logic expression as the input of an SMT solver, and the solvable method is calculated by the solver, so that the method can be applied to all link state protocols, such as the ISIS protocol. Meanwhile, in the configuration comprehensive calculation part, the topology is optimized by a pruning method, the conversion process of the first-order logic expression is greatly improved, the number of strategy sentences is less, the optimization effect is more obvious, and the configuration generation time is greatly reduced.
Drawings
FIG. 1 is an OSPF configuration integration system model of the present invention.
FIG. 2 is a comprehensive flow chart of OSPF configuration of the present invention.
Detailed Description
The invention is described in further detail below with reference to figures 1-2.
A comprehensive scheme for realizing OSPF protocol configuration based on domain specific language mainly comprises the following steps:
step 1: a user writes a configuration file and a topology file according to the strategy intention and the grammar rule;
step 2: analyzing a configuration file and a topology file input by a user;
and step 3: carrying out feasibility verification on a user configuration strategy, and carrying out pruning processing on the topology;
and 4, step 4: converting the user strategy into a first-order logic expression as the input of an SMT solver;
and 5: performing feasibility solution by using an SMT solver;
step 6: and mapping the generated abstract configuration parameters to a configuration template to generate a configuration file.
The step 1 of writing the configuration file and the topology file by the user specifically comprises the following steps:
step 1.1, a user writes a policy file according to the grammar shown in the figure 1, and the node name in the policy file is consistent with the node in the topology file;
step 1.2, a user writes a topology file according to the network topology structure, and the topology file describes the connection relation between the node name and the node by using an XML format.
Step 2, the specific steps of analyzing the configuration file and the topology file input by the user comprise:
step 2.1, carrying out lexical analysis on the configuration file by using a lexical analyzer to reduce keywords and other parameters;
step 2.2, carrying out lexical analysis on the token stream processed by the lexical analyzer by using a grammar analyzer, and sorting and extracting the input corresponding to different keywords to input to different corresponding modules;
and 2.3, constructing a bidirectional directed graph according to the topology file, namely, two directed edges in opposite directions are arranged between every two connected nodes, and constructing additional data structures on the nodes and the edges to express configuration information of the routing equipment, such as an interface ip and a cost attribute.
Step 3, feasibility verification is carried out on the user configuration strategy, and the specific steps of pruning the topology comprise:
and 3.1, carrying out feasibility verification on the traffic paths in the policy file to prevent unrealizable policies. For example, the shortest path between two traffic policies ip1 is a, B, C, and the shortest path between ip2 is a, D, C, and at this time, the traffic policies cannot be simultaneously implemented by using the traffic ip1 and ip2 through the OSPF protocol, because the cost attribute of OSPF cannot be distinguished from different ip traffic. Finding out conflict paths through analysis among the paths;
and 3.2, pruning the edges which do not appear on the strategy path in the topology to generate a simplified topology for subsequent path calculation, and carrying out cost maximum value assignment on the pruned edges in the original topology to ensure that the edges do not influence the strategy.
Step 4, converting the user strategy into a first-order logic expression as an input of the SMT solver, and the specific steps comprise:
step 4.1, acquiring other path sets related to the strategy according to the path related to each strategy statement and the optimized topology subjected to pruning;
step 4.2 generates a corresponding first order logical expression for each policy. For the optimal path, the path priority relationship and the equal cost multipath, the unequal relationship of the sum of the path weights between two points can be converted according to the characteristics of the OSPF protocol. For example, if there is a policy optimal path from node a to node B as P (ab), the set of paths from node a to node B except the policy path is P (other), and C (P) represents the sum of link weights of path P, then there is C (P (ab) < C (P (other)). And generating corresponding unequal expressions according to different keywords of each strategy statement.
Step 5, performing feasibility solution by using an SMT solver specifically comprises the following steps: and setting corresponding variables for each edge according to the topological graph, setting the pruned edges as fixed constants, performing constraint solution by using the first-order logic expression as a constraint condition, and assigning cost attributes of the edges in the topological graph according to the corresponding relation between the variables and the edges.
Step 6, the concrete steps of mapping the generated abstract configuration parameters to the configuration template to generate the configuration file comprise: and automatically generating an interface ip address according to the connection relation of the topology, and setting the ip of the network and corresponding interface information at the topology node according to the target ip of the strategy. In combination with solving the generated cost attribute values, the topology already contains all device vendor independent configuration key parameters. And writing a configuration template by combining a pair of equipment manufacturers, filling key parameters, and generating a specific configuration file for each equipment.
The system model of the scheme is designed as shown in fig. 1, a configuration strategy and a network topology are used as system input, and a configuration file of equipment is generated after system solution. The syntax design of this scheme is shown in table 1.
Table 1 OSPF configures the integrated DSL syntax.
Figure BDA0002761739670000061
The whole strategy description language takes a destination ip as a description main body, and corresponds to a prefix part in the figure. The nodes are separated by commas, and traffic paths are represented by a plurality of nodes, and the path part in the graph is mapped. Two different paths are connected by equal signs and greater signs to represent the priority relationship between the paths, and the paths are reduced to the con part in the graph. And describing constraints by using different types of keywords to realize a corresponding configuration strategy, wherein the grammar of the keyword part corresponds to the typ part and is divided into a simple optimal path strategy, an order ordered path strategy and an ecmp equal-cost multi-path strategy. The deconstruction of the target ip plus the keyword plus the path constraint relation forms a single sentence which is the most basic of the strategy grammar, a user expresses the configuration intention in a mode of combining the keyword and the path, and pol corresponds to the configuration intention. A plurality of pol sentences jointly form the whole strategy file and correspond to the prog part.
The configuration flow of the whole scheme is shown in fig. 2, and firstly, a user writes a policy file and a topology file according to the self configuration intention and the target network topology by using the grammar rule. The policy file syntax is shown in fig. 1. The topology file describes the target using an XML format. < topology > </topology > identifies the head and tail, with the topology body content in between. The format of the node part is < node name ═ node name > < node >. The description of the edge portion is < edge source ═ node name ═ target ═ node name >.
After the strategy file and the topology file are input, grammar check and analysis and intention feasibility analysis are carried out on the strategy file, and a topological graph is constructed according to the topology file. The strategy file grammar checking and parsing are completed through a lexical analyzer and a grammar parser, firstly, the lexical analyzer scans character strings of the strategy file, and converts the character strings into token streams according to a token table and transmits the token streams to the grammar analyzer. The grammar parser matches tokens into the grammar by move/reduce according to grammar rules. In the whole process, grammar errors such as spelling errors and the like are found by the lexical analysis and grammar parser and reported. The intention feasibility analysis of the policy file mainly analyzes each policy path according to the principle that the sub-path of the shortest path is also the shortest path. Creating a detection set, generating all sub-path sets containing the detection set for each strategy path when reading in each strategy path, adding the path subsets into the detection set, detecting whether the paths in the sub-paths and the paths in the detection set have the same head node and tail node but different middle nodes in the adding process, reporting an error if the paths exist, and returning a conflict strategy. The topological structure is a bidirectional directed graph, that is, two directed edges in opposite directions are arranged between every two connected nodes, and an additional data structure is constructed between the nodes and the edges to represent configuration information of the routing device, such as network ip and the like on the nodes, and interfaces ip and cost attributes on the edges.
The topology is directly applied after the topology construction is completed, so that the time consumption is serious in the process of carrying out constraint conversion in the case of a large-scale network, and the topology scale is optimized by the pruning method. The cost attribute of the OSPF protocol is a global attribute, and feasible solution solving is carried out on the constraints of all strategy statements simultaneously in the solving process of the cost attribute value, so that the problem that the solving result influences other strategies to cause strategy configuration errors due to independent solving is prevented. Paths which are subjected to errors in separate solution have intersection, so that edges which do not appear in the strategy paths are pruned, and the fact that the cost attribute value is set as the maximum constant value does not affect the accuracy of the solution. The number of the topological edges after pruning is reduced, so that the constraint required to be generated by each strategy statement in the constraint conversion process is correspondingly reduced, and the comprehensive configuration time of a large-scale network is greatly saved.
Constraint conversion is a process of converting a policy path into a first-order logic expression according to a policy type, and using the first-order logic expression as an input of an SMT solver. Converting a policy statement to an equivalent expression constraint can be expressed as finding a feasible solution to the following formula:
Figure BDA0002761739670000081
wherein the content of the first and second substances,
Figure BDA0002761739670000082
representing a set of link weights, r representing an OSPF path requirement, paths (r) representing a set of paths with the same start and end points, encodeopf returns a logical constraint on the requirement coding, since paths (r) is too large in number, especially when the network topology contains a large number of nodes, finding a feasible solution is difficult. In all the schemes, pruning optimization processing is performed on the topology, so that the number of topology edges is reduced, and further the number of paths (r) is reduced. This gives a new formula:
Figure BDA0002761739670000083
in the new formula, S represents a subset of Paths (r), i.e.
Figure BDA0002761739670000084
And after constraint conversion, creating solver variables corresponding to the edges of the optimized topology. And obtaining a representation equivalent to the strategy statement through constraint conversion. And (4) bringing the variable into the corresponding edge, and finally using the variable as an input to carry out feasibility solution by using an SMT solver. And writing the value into the original topology according to the corresponding relation between the variable and the edge by the solved result.
And finally, assigning values to the network attributes of the nodes in the original topology according to the target ip in the strategy statement, and automatically setting the ip attributes of each interface according to the connection relation between the nodes. After the configuration parameter topology irrelevant to the equipment manufacturer is obtained, the parameters are mapped to the configuration template of the equipment of the manufacturer to be generated, and then the configuration files of all the routing equipment of the target network can be generated. The configuration template can be changed according to the change of equipment of different manufacturers, and the expansibility of the scheme is improved.
Application scenarios
The DSL-based OSPF configuration synthesis can apply the automatic configuration of the flow strategy of the OSPF network protocol in the domain. When a user wants to quickly realize the flow strategy of the OSPF protocol in a target network, a high-level strategy file for describing the flow state of the whole network and a topology file for describing the node connection relation are compiled to be used as input and are compiled by a system, if strategy conflicts exist, the conflict strategy is returned, and if the strategy conflicts exist, a specific configuration file of each routing device is generated through compiling. And importing the configuration file into the routing equipment, namely, the flow strategy can be realized.
Evaluation of example
78 real network topologies are selected from Topology Zoo, and the Topology types are divided into three types according to the number of routers in the Topology: small (30-70), medium (70-100), large (130-170). For path demand we generate four demand types: optimal path, equal cost multi-path, ordered path, hybrid. Where the mix contains the first three demand types. Each demand is defined as a randomly chosen path between the starting router and the end router, the randomly chosen path being multiple for equal cost multipath and ordered path type demands.
The experiment was performed in an environment with a CPU frequency of 1.8GHz and a memory of 8G, five runs were performed for each example, and the average value was calculated for each network type as the final result, in seconds. The results of the experiment are shown in table 2, time units are in seconds:
Figure BDA0002761739670000091
TABLE 2 time spent in the experiment
The link weight solving algorithm: the algorithm for link weight solving is as follows. The input is a strategy set pol and a network topological Graph, and the output is a topological Graph Topo with a weight value. First, the satisfiability of the strategy is detected, and the strategy-related edge is obtained (rows 2-7). The other edges are then assigned values and a simplified topology is created based on the policy-related edges (lines 8-9). The strategy is then converted into inequality constraints in turn (lines 10-12). And finally, detecting whether a solution exists or not, and assigning a value to the calculation result of the solver in the topological graph if the solution exists (rows 13-16).
Figure BDA0002761739670000101

Claims (7)

1. A comprehensive scheme for realizing OSPF protocol configuration based on a domain specific language is characterized in that flow is used as a description main body, keywords and nodes are used as strategy syntax design for strategy expansion description, a strategy syntax verification and strategy intention feasibility analysis method is adopted, constraint conversion is adopted to convert strategy statements into a section of logic expression, a pruning method is used for optimizing topology, reducing constraint conversion scale and accelerating solving efficiency, configuration topology irrelevant to equipment manufacturers is used for storing configuration key parameters, and the parameters are mapped to a configuration template to generate a configuration file of target network routing equipment;
the main steps of the OSPF protocol configuration synthesis based on DSL are:
step 1: a user writes a configuration file and a topology file according to the strategy intention and the grammar rule;
step 2: analyzing a configuration file and a topology file input by a user;
and step 3: carrying out feasibility verification on a user configuration strategy, and carrying out pruning processing on the topology;
and 4, step 4: converting the user strategy into a first-order logic expression as the input of an SMT solver;
and 5: performing feasibility solution by using an SMT solver;
step 6: and mapping the generated abstract configuration parameters to a configuration template to generate a configuration file.
2. The OSPF protocol configuration integration scheme based on a domain specific language according to claim 1, wherein the specific step of step 1, writing configuration files and topology files by the user comprises:
step 1.1, a user writes a policy file according to the grammar shown in the figure 1, and the node name in the policy file is consistent with the node in the topology file;
step 1.2, a user writes a topology file according to the network topology structure, and the topology file describes the connection relation between the node name and the node by using an XML format.
3. The OSPF protocol configuration integration scheme based on a domain specific language according to claim 1, wherein the specific step of parsing the configuration file and topology file inputted by the user in step 2 comprises:
step 2.1, carrying out lexical analysis on the configuration file by using a lexical analyzer to reduce keywords and other parameters;
step 2.2, carrying out lexical analysis on the token stream processed by the lexical analyzer by using a grammar analyzer, and sorting and extracting the input corresponding to different keywords to input to different corresponding modules;
and 2.3, constructing a bidirectional directed graph according to the topology file, namely, two directed edges in opposite directions are arranged between every two connected nodes, and constructing additional data structures on the nodes and the edges to express configuration information of the routing equipment, such as an interface ip and a cost attribute.
4. The OSPF protocol configuration integration scheme based on the domain specific language according to claim 1, wherein the step 3 of performing feasibility verification on the user configuration policy and the specific step of pruning the topology comprises:
step 3.1, carrying out feasibility verification on the traffic paths in the policy file to prevent unrealizable policies; when the shortest path of two traffic policies ip1 is A, B, C, and the shortest path of ip2 is A, D, C, the traffic policies for the traffic policies ip1 and ip2 cannot be realized simultaneously through an OSPF protocol, because the cost attribute of the OSPF cannot distinguish different ip traffic; conflict paths need to be found out through analysis among the paths;
and 3.2, pruning the edges which do not appear on the strategy path in the topology to generate a simplified topology for subsequent path calculation, and carrying out cost maximum value assignment on the pruned edges in the original topology to ensure that the edges do not influence the strategy.
5. The OSPF protocol configuration integration scheme based on a domain specific language implementation of claim 1, wherein the specific step of converting the user policy into a first order logic expression as input to an SMT solver in step 4 comprises:
step 4.1, acquiring other path sets related to the strategy according to the path related to each strategy statement and the optimized topology subjected to pruning;
step 4.2, generating a corresponding first-order logic expression for each strategy; for the optimal path, the path priority relationship and the equal cost multipath, the unequal relationship of the sum of the path weights between two points can be converted according to the characteristics of the OSPF protocol; expression of the optimal path:
C(P(ab))<C(P(other))
wherein P (ab) is node a to node b having the policy optimal path, P (other) is the path set of node a to node b except the policy path, C (P) represents the link weight of path P; and generating corresponding unequal expressions according to different keywords of each strategy statement.
6. The OSPF protocol configuration integration scheme based on domain specific language implementation of claim 1, wherein said step 5 of feasibility solving using an SMT solver specifically comprises: and setting corresponding variables for each edge according to the topological graph, setting the pruned edges as fixed constants, performing constraint solution by using the first-order logic expression as a constraint condition, and assigning cost attributes of the edges in the topological graph according to the corresponding relation between the variables and the edges.
7. The OSPF protocol configuration integration scheme based on a domain specific language implementation of claim 1 wherein the specific step of generating a configuration file according to the mapping of the generated abstract configuration parameters to the configuration template in step 6 comprises: automatically generating an interface ip address according to the connection relation of the topology, and setting the ip of the network and corresponding interface information at the topology node according to the target ip of the strategy; combining with the cost attribute value generated by solving, the topology already contains all the configuration key parameters irrelevant to the equipment manufacturer; and writing a configuration template by combining a pair of equipment manufacturers, filling key parameters, and generating a specific configuration file for each equipment.
CN202011220342.6A 2020-11-05 2020-11-05 OSPF protocol configuration comprehensive scheme based on domain specific language Active CN112532517B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011220342.6A CN112532517B (en) 2020-11-05 2020-11-05 OSPF protocol configuration comprehensive scheme based on domain specific language

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011220342.6A CN112532517B (en) 2020-11-05 2020-11-05 OSPF protocol configuration comprehensive scheme based on domain specific language

Publications (2)

Publication Number Publication Date
CN112532517A true CN112532517A (en) 2021-03-19
CN112532517B CN112532517B (en) 2022-04-05

Family

ID=74979635

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011220342.6A Active CN112532517B (en) 2020-11-05 2020-11-05 OSPF protocol configuration comprehensive scheme based on domain specific language

Country Status (1)

Country Link
CN (1) CN112532517B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113765708A (en) * 2021-08-19 2021-12-07 东北大学 VLAN configuration comprehensive method based on DSL
CN113872804A (en) * 2021-09-24 2021-12-31 北京金山云网络技术有限公司 Bandwidth allocation method and device, electronic equipment and computer-readable storage medium
CN114844760A (en) * 2022-05-05 2022-08-02 鹏城实验室 Network fault sensing and positioning method, device, terminal and storage medium
CN113872804B (en) * 2021-09-24 2024-05-28 北京金山云网络技术有限公司 Bandwidth allocation method, device, electronic equipment and computer readable storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744563A (en) * 2004-08-31 2006-03-08 杭州华为三康技术有限公司 Method for realizing strate gic route in Ethernet switch
US20140376402A1 (en) * 2013-06-19 2014-12-25 Cumulus Networks, Inc. Methods and systems for automatic generation of routing configuration files
CN105335412A (en) * 2014-07-31 2016-02-17 阿里巴巴集团控股有限公司 Method and device for data conversion and data migration
CN108206780A (en) * 2016-12-19 2018-06-26 中国电信股份有限公司 Flow scheduling strategy report method, autonomy field system and SDN network system
CN108595341A (en) * 2018-05-11 2018-09-28 清华大学 Automatic example generation method and system
US20180336453A1 (en) * 2017-05-19 2018-11-22 Salesforce.Com, Inc. Domain specific language for generation of recurrent neural network architectures
CN110908640A (en) * 2019-11-26 2020-03-24 京东数字科技控股有限公司 Method for realizing service function and script engine
CN111835532A (en) * 2019-04-11 2020-10-27 华为技术有限公司 Network authentication method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744563A (en) * 2004-08-31 2006-03-08 杭州华为三康技术有限公司 Method for realizing strate gic route in Ethernet switch
US20140376402A1 (en) * 2013-06-19 2014-12-25 Cumulus Networks, Inc. Methods and systems for automatic generation of routing configuration files
CN105335412A (en) * 2014-07-31 2016-02-17 阿里巴巴集团控股有限公司 Method and device for data conversion and data migration
CN108206780A (en) * 2016-12-19 2018-06-26 中国电信股份有限公司 Flow scheduling strategy report method, autonomy field system and SDN network system
US20180336453A1 (en) * 2017-05-19 2018-11-22 Salesforce.Com, Inc. Domain specific language for generation of recurrent neural network architectures
CN108595341A (en) * 2018-05-11 2018-09-28 清华大学 Automatic example generation method and system
CN111835532A (en) * 2019-04-11 2020-10-27 华为技术有限公司 Network authentication method and device
CN110908640A (en) * 2019-11-26 2020-03-24 京东数字科技控股有限公司 Method for realizing service function and script engine

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
SALEEM BHATTI等: "Domain Specific Languages (DSLs) for Network Protocols", 《2009 29TH IEEE INTERNATIONAL CONFERENCE ON DISTRIBUTED COMPUTING SYSTEMS WORKSHOPS》 *
李艳玲等: "IPv6地址路由机制研究综述", 《计算机工程与应用》 *
赵卫东等: "一种领域特定语言的研究与实现", 《 成都大学学报(自然科学版)》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113765708A (en) * 2021-08-19 2021-12-07 东北大学 VLAN configuration comprehensive method based on DSL
CN113765708B (en) * 2021-08-19 2022-06-07 东北大学 VLAN configuration comprehensive method based on DSL
CN113872804A (en) * 2021-09-24 2021-12-31 北京金山云网络技术有限公司 Bandwidth allocation method and device, electronic equipment and computer-readable storage medium
CN113872804B (en) * 2021-09-24 2024-05-28 北京金山云网络技术有限公司 Bandwidth allocation method, device, electronic equipment and computer readable storage medium
CN114844760A (en) * 2022-05-05 2022-08-02 鹏城实验室 Network fault sensing and positioning method, device, terminal and storage medium
CN114844760B (en) * 2022-05-05 2023-07-25 鹏城实验室 Network fault sensing and positioning method, device, terminal and storage medium

Also Published As

Publication number Publication date
CN112532517B (en) 2022-04-05

Similar Documents

Publication Publication Date Title
Guha et al. Machine-verified network controllers
Wang et al. FSR: Formal analysis and implementation toolkit for safe interdomain routing
US7299155B2 (en) Method and apparatus for decomposing and verifying configurable hardware
CN112532517B (en) OSPF protocol configuration comprehensive scheme based on domain specific language
Li et al. A survey on network verification and testing with formal methods: Approaches and challenges
Denney et al. A formal basis for safety case patterns
US8838440B2 (en) Generating parser combination by combining language processing parsers
KR20060040548A (en) Methods and systems for automated test-case generation
CN103853650A (en) Test case generating method and device for fuzz testing
Giannarakis et al. NV: An intermediate language for verification of network control planes
Yen et al. Semi-automated protocol disambiguation and code generation
CN111767217B (en) JS unit test case generation method and device
Zhao et al. Ruletailor: Optimizing flow table updates in openflow switches with rule transformations
Thijm et al. Kirigami, the verifiable art of network cutting
JP2002520716A (en) Configuration Description Language System
CN107404440B (en) Forwarding table item sending method, message forwarding method and device
Gheorghita et al. Constructing checkers from PSL properties
Pinto et al. A methodology for constraint-driven synthesis of on-chip communications
Giannarakis et al. ProbNV: probabilistic verification of network control planes
Martin et al. Definition of the DISPEL Language
EP4186212B1 (en) Network verification systems and methods
US20230300053A1 (en) Network verification systems and methods
Giannarakis An Intermediate Language for Network Verification
Deng et al. Witnessing network transformations
Deussen et al. Formal test purposes and the validity of test cases

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