Test network configuration consistency checking method suitable for large-scale network test bed
By automatically detecting the configuration consistency between network elements and their neighbors, the problem of configuration inconsistencies in large-scale network testbeds is solved, achieving efficient operation and reliability of the test network.
Patent Information
- Application Number
- CN202511588822.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-03
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2045-11-03
AI Technical Summary
Existing technologies lack methods for verifying the consistency of configurations of various network elements in large-scale network testbeds, leading to frequent configuration inconsistencies that affect the normal operation and efficiency of the test network.
A test network configuration consistency verification method suitable for large-scale network testbeds is adopted. By obtaining the test network topology and network element configuration items and parameters, the method automatically detects the configuration consistency between network elements and neighboring network elements, and generates alarm information to prompt operators to handle the issue.
It significantly improves the accuracy and reliability of test network configuration, reduces the difficulty and time cost of manual error checking, and ensures the efficient operation of the test network.
Smart Images

Figure CN121056356B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer network testing and verification technology, and specifically to a method for verifying the consistency of test network configurations applicable to large-scale network testbeds. Background Technology
[0002] Network testbeds play a crucial role in modern information technology as a key tool for network technology research, new product development, and the testing and verification of construction solutions. They typically consist of various network elements, including computer terminals, servers, switches, routers, firewalls, VPN gateways, intrusion detection systems, intrusion prevention systems, and antivirus gateways. These elements collectively construct a test platform that simulates a real network environment. Through this platform, researchers can perform various complex testing tasks to verify the feasibility and performance of new technologies or solutions, thereby promoting innovation and development in network technology.
[0003] To support diverse testing tasks, network testbeds must possess highly flexible configuration capabilities. This capability requires the ability to dynamically adjust various parameters, policies, and rules of network elements according to specific testing needs, such as network segmentation, IP address allocation, VLAN settings, route planning and definition, and firewall rule customization. Existing technologies have proposed some configuration methods for specific types of network elements or specific functions. These methods typically focus on a single scenario or specific device, such as by porting the minimum network unit configuration or using automated tools to generate configuration commands to simplify the operation process. However, these methods are often limited to specific network elements or functions, lacking comprehensive support for the collaborative configuration of multiple network elements, and are difficult to adapt to the frequently changing configuration requirements in testing tasks.
[0004] In practical applications, the configuration process faces significant challenges. Due to the flexible and varied configuration requirements of testing tasks, and the complexity of configuring common network elements such as switches, routers, and firewalls, inconsistencies are easily generated regardless of whether manual input by operators or automated command generation by the configuration system are used. These inconsistencies may stem from unmet dependencies between configuration items, parameter conflicts, or unexpected failures during command issuance and execution, preventing network elements from completing configuration. More seriously, inconsistencies in the interconnection configurations between test network elements and their neighboring network elements, such as interface type, interface speed, link type, or IP address settings, can cause communication obstacles after configuration, rendering the entire test network unusable. These problems not only delay testing progress but also increase operational costs, impacting the reliability and efficiency of testing tasks.
[0005] While existing technologies explore flexible configuration approaches, a universal method remains lacking for effective consistency verification of configurations for various commonly used network elements in a test network. This deficiency makes it difficult for operators to promptly identify and address inconsistencies during configuration, limiting the overall performance of the testbed. Therefore, a more comprehensive and reliable solution is urgently needed to improve configuration consistency and correctness, ensure the efficient operation of the test network, and provide reliable support for network technology research. Summary of the Invention
[0006] The purpose of this invention is to solve the problems of configuration failures caused by parameter conflicts or missing dependencies during the configuration of network elements in test networks, as well as communication obstacles caused by inconsistent interconnection configurations between network elements. Therefore, a test network configuration consistency verification method suitable for large-scale network testbeds is proposed. This invention can automatically detect inconsistencies between different configuration items of test network elements and configuration inconsistencies between test network elements and their neighboring network elements based on the input test network element adjacency relationships, network element configuration items, and parameter information, and prompt operators to handle these issues by outputting alarm information.
[0007] The present invention employs the following technical solutions to achieve its objective:
[0008] A method for verifying the consistency of test network configurations suitable for large-scale network testbeds includes the following steps:
[0009] S1. Obtain the test network topology and the list of network element configuration items and parameters for all test network elements in the topology. The test network topology includes the list of test network elements, the list of links, and the network element adjacency relationships.
[0010] S2. Sort all network elements in the test network element list according to the preset priority;
[0011] S3. After sorting, check the configuration consistency of each network element with its neighboring network elements in turn;
[0012] S4. If a network element D is consistent with the configuration of its neighboring network elements after inspection, obtain the configuration items and parameter list of the network element D, and further check the consistency between the network element configuration items in the configuration items and parameter list and its associated configuration items and parameters.
[0013] After S5 and the consistency check pass, a configuration command is generated and sent to the corresponding network element D for execution, completing the test network configuration consistency verification process.
[0014] Specifically, in step S1, the network element configuration items and parameter list includes: network element identifier, network element type, network element configuration item list, and associated configuration item list.
[0015] Specifically, the network element configuration item list includes: configuration item number, configuration item name, configuration attribute code, configuration attribute name, and parameter table;
[0016] The list of associated configuration items includes: associated configuration item number, associated configuration item name, corresponding configuration item number, expected configuration attribute code, expected configuration attribute name, and expected parameter table;
[0017] The list of associated configuration items is stored in an empty state or in a state with any finite number of associated configuration items, and the configuration items in the network element configuration item list and the associated configuration items in the associated configuration item list have a preset first correspondence dependency relationship;
[0018] The parameter table in the network element configuration item list and the expected parameter table in the associated configuration item list are stored in an empty state or in a state with any finite number of parameters / expected parameters, respectively, and the parameters in the parameter table and the expected parameters in the expected parameter table have a preset second correspondence dependency relationship.
[0019] Preferably, in step S2, the preset priority is: networking devices > security devices connected in series in the network > end devices > security devices connected in parallel in the network.
[0020] Furthermore, in step S3, the configuration consistency between each network element and its neighboring network elements is checked, specifically as follows:
[0021] S31. Obtain the list of neighboring network elements of network element D from the adjacency relationship of network elements in the test network;
[0022] S32. Traverse each network element E in the neighbor network element list and perform the following operations:
[0023] Obtain the configuration information of the first network interface Pd connecting network element D to network element E;
[0024] Obtain the configuration information of the second network interface Pe that connects network element E to network element D;
[0025] Based on the configuration information of the first network interface Pd and the second network interface Pe, a preset consistency check rule is executed.
[0026] If any configuration inconsistencies are found after the consistency check rules are applied, the corresponding configuration inconsistency alarm information will be recorded.
[0027] S33. Summarize and output all recorded configuration inconsistency alarm information.
[0028] Specifically, the preset consistency check rules include:
[0029] Check whether the interface status of the first network interface Pd and the second network interface Pe is both enabled;
[0030] Check whether the interface types of the first network interface Pd and the second network interface Pe are consistent;
[0031] Check whether the interface speeds of the first network interface Pd and the second network interface Pe are consistent;
[0032] Based on the device types corresponding to network element D and network element E, perform at least one of the following:
[0033] If network element D and network element E are both network devices, check whether the link types of the first network interface Pd and the second network interface Pe are the same; if the link types are the same and are Trunk, check whether the allowed VLANs are the same; if the link types are the same and are Layer 3 interfaces or sub-interfaces, check whether the configured IP addresses are in the same network segment.
[0034] If network element D is a network device but network element E is not a network device, then check whether the link type of the first network interface Pd is Access; if network element E is a network device but network element D is not a network device, then check whether the link type of the second network interface Pe is Access.
[0035] If the result of any of the above check rules is negative, then a configuration inconsistency is determined to exist.
[0036] Furthermore, in step S4, the consistency between the network element configuration items in the configuration item and parameter list and their associated configuration items and parameters is checked, specifically as follows:
[0037] S41. Obtain the configuration item list S and associated configuration item list W of network element D from the network element configuration item and parameter list;
[0038] S42. Traverse each expected configuration property Cw in the associated configuration item list W and perform the following operations:
[0039] Check if there is a corresponding configuration attribute Cs for Cw in the configuration item list S; if it exists, compare the parameters of the expected configuration attribute Cw with the parameters of the configuration attribute Cs; if it does not exist or the comparison result is inconsistent, record the corresponding configuration inconsistency alarm information.
[0040] S43. Summarize and output all recorded configuration inconsistency alarm information.
[0041] Specifically, when comparing the parameters of the expected configuration attribute Cw with those of the configuration attribute Cs, the expected parameter table Lw for the expected configuration attribute Cw and the parameter table Ls for the configuration attribute Cs are obtained respectively. For each expected parameter Pw in the expected parameter table Lw, the corresponding parameter Ps is searched in the parameter table Ls. If the value of the expected parameter Pw is consistent with the value of the parameter Ps, the comparison result is determined to be consistent, and the comparison of the next expected parameter Pw continues. If the parameter Ps is not found or the values of the two are inconsistent, the corresponding configuration inconsistency alarm information is recorded.
[0042] Preferably, for network element D, if in step S3 it is found that its configuration is inconsistent with that of neighboring network elements, or if in step S4 it is found that its network element configuration items are inconsistent with the associated configuration items and parameters, then an alarm message is output to prompt the operator to handle the issue and end the test network configuration consistency verification process.
[0043] Specifically, in step S5, after all consistency checks pass, for each configuration item C in the configuration item list S of network element D, a corresponding configuration command is generated according to the configuration command template of network element D and sent to the network element D for execution.
[0044] In summary, due to the adoption of this technical solution, the beneficial effects of this invention are as follows:
[0045] This invention effectively solves the network failure problem caused by inconsistent configurations in large-scale network testbeds. Through an automated verification mechanism, it significantly improves the accuracy and reliability of test network configurations, providing a reliable guarantee for the smooth implementation of various test tasks.
[0046] This invention also possesses outstanding universal adaptability, making it widely applicable to configuration verification of heterogeneous network devices such as computer terminals, servers, switches, routers, and firewalls. This cross-platform compatibility overcomes the limitations of traditional solutions on specific devices, making configuration management in complex heterogeneous network environments more efficient and unified.
[0047] In terms of detection, this invention achieves a two-tiered intelligent verification mechanism. On the one hand, it can automatically identify interconnection configuration conflicts between network devices and their neighboring devices, such as mismatches in interface parameters or communication protocols. On the other hand, it can accurately locate logical contradictions or missing dependencies between different configuration items within the same device. This three-dimensional verification mechanism fundamentally avoids communication interruptions or functional abnormalities caused by configuration errors.
[0048] By generating accurate alarm information in real time, this invention significantly reduces the difficulty and time cost of manually troubleshooting configuration errors. Operators can quickly locate problem nodes and implement corrections, thereby significantly shortening the test network deployment cycle and ensuring the efficient progress of critical testing tasks. This intelligent management method provides a reliable supporting environment for network technology innovation. Attached Figure Description
[0049] The present invention further illustrates its embodiments and technical solutions in detail with reference to the following figures, specifically including 5 figures as follows:
[0050] Figure 1 This is a flowchart illustrating the network configuration consistency verification method of the present invention.
[0051] Figure 2 This is a schematic diagram of the configuration items and parameter list of the test network elements in this invention;
[0052] Figure 3 This is a schematic diagram of the process for checking the configuration consistency between each network element and its neighboring network elements in this invention.
[0053] Figure 4 This is a flowchart illustrating the process of checking the consistency between network element configuration items and their associated configuration items and parameters in this invention.
[0054] Figure 5 This is a schematic diagram of the test network topology and network planning for an example of the present invention. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0056] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0057] Example 1
[0058] A method for verifying the consistency of test network configurations suitable for large-scale network testbeds. The key steps of this method can be viewed concurrently. Figure 1 As illustrated in the diagram, this embodiment provides a detailed description of the method using specific operational steps; the steps of the method are as follows:
[0059] (1-1) Obtain the test network topology and the list of network element configuration items and parameters for all test network elements in the topology; wherein, the test network topology includes the list of test network elements, the list of links, and the network element adjacency relationships;
[0060] (1-2) Sort all network elements in the test network element list according to the preset priority;
[0061] The default priority here is: networking devices > security devices connected in series in the network > end devices > security devices connected in parallel in the network; typical networking devices include switches, routers, etc.; security devices connected in series in the network include firewalls, VPN gateways, etc.; end devices include servers, storage devices, computer terminals, etc.; security devices connected in parallel in the network include intrusion detection systems, authentication systems, virus scanning servers, etc.
[0062] (1-3) Sort by priority, and execute the loop body from step (1-4) to step (1-11) for each network element D in the test network element list;
[0063] (1-4) Check the configuration consistency between network element D and its neighboring network elements;
[0064] (1-5) If there is a configuration inconsistency, an alarm message will be output to prompt the operator to handle it, and the process will end; otherwise, continue to execute the subsequent steps.
[0065] (1-6) Obtain the configuration items and parameter list of network element D, and check the consistency between the configuration items of network element D and its associated configuration items and parameters;
[0066] (1-7) If there are inconsistencies in configuration items and parameters, an alarm message will be output to prompt the operator to handle the issue, and the process will end; otherwise, continue to execute the subsequent steps.
[0067] (1-8) For each configuration item C in the configuration item list S of network element D, execute the loop body from step (1-9) to step (1-10);
[0068] (1-9) Generate configuration commands for configuration item C according to the configuration command template of network element D;
[0069] (1-10) Send the configuration command to network element D and execute it;
[0070] (1-11) After the loop body from step d (1-9) to step (1-10) has been executed for each configuration item C in the configuration item list S, execute the subsequent steps; otherwise, execute the next loop.
[0071] (1-12) The process ends when the loop body from step (1-4) to step (1-11) has been executed for each network element in the test network element list; otherwise, the next loop is executed.
[0072] In this embodiment, the network element configuration items and parameter list of the test network consists of a set of tree-structured data nodes, which can be seen in [reference]. Figure 2 The illustration.
[0073] The network element configuration items and parameter list includes the following primary data nodes:
[0074] Network element identifier: It is a globally unique representation of the network element;
[0075] Network element type: This refers to the type of network element, such as computer terminal, server, switch, router, firewall, VPN gateway, IPS, IDS, etc.
[0076] Network element configuration item list: is a collection of secondary data nodes, and each secondary data node is a configuration item;
[0077] The associated configuration item list is a collection of secondary data nodes, with each secondary data node being an associated configuration item.
[0078] In this embodiment, each configuration item in the network element configuration item list contains the following information:
[0079] Configuration item number: This is the serial number of the configuration item in the network element configuration item list; within the same network element configuration item list, the serial number of each configuration item should be unique;
[0080] Configuration item name: A concise text that is easy for users to understand and remember; the name of each configuration item should be unique within the same network element configuration item list;
[0081] Configuration attribute code: It is a globally unique identifier for the network element configuration attribute corresponding to this configuration item;
[0082] Configuration attribute name: a short text that is easy for users to understand and remember; within the same network element configuration item list, each configuration attribute code will correspond to a unique configuration attribute name;
[0083] Parameter table: It is a collection of three-level data nodes, each of which is a parameter; each parameter contains a parameter name and a parameter value; the parameter table can be empty or can have any finite number of parameters.
[0084] In this embodiment, the list of associated configuration items can be empty or contain any finite number of associated configuration items. Configuration items in the network element configuration item list have dependencies on their associated configuration items; that is, if a configuration item is configured, all its associated configuration items should also be configured, otherwise the network element configuration will fail. Each associated configuration item contains the following information:
[0085] Associated configuration item number: This is the number of the associated configuration item in the list of associated configuration items; within the same list of associated configuration items, the number of each associated configuration item should be unique.
[0086] Associated configuration item name: concise text that is easy for users to understand and remember; within the same list of associated configuration items, the name of each associated configuration item should be unique;
[0087] The corresponding configuration item number is the number of the configuration item that has a dependency relationship with the associated configuration item in the network element configuration item list, that is, the corresponding configuration item depends on the associated configuration item;
[0088] Expected configuration attribute code: It is a globally unique identifier for the network element configuration attribute corresponding to the associated configuration item;
[0089] Expected configuration property name: The name of the configuration property corresponding to the expected configuration property code;
[0090] The expected parameter table is a collection of three-level data nodes, with each data node representing an expected parameter. Each expected parameter includes a parameter name and a parameter value. The expected parameter table can be empty or contain any finite number of expected parameters. The parameters of a configuration item are dependent on the expected parameters of its associated configuration items. That is, if a configuration item is configured according to its parameter table, all its associated configuration items should also be configured according to the expected parameter table; otherwise, network element configuration will fail.
[0091] In this embodiment, sub-process 1 for checking the configuration consistency between the test network element and its neighboring network elements can be found in [link to documentation]. Figure 3 The illustration includes the following steps:
[0092] (3-1) Obtain the list of neighboring network elements of network element D from the adjacency relationship of network elements in the test network;
[0093] (3-2) For each network element E in the neighbor network element list, execute the loop body from step (3-3) to step (3-19);
[0094] (3-3) Obtain the configuration items and parameters of the network interface Pd connecting network element D to network element E;
[0095] (3-4) Obtain the configuration items and parameters of the network interface Pe that connects network element E to network element D;
[0096] (3-5) If the network interface Pd is configured to be enabled, continue with the subsequent steps; otherwise, proceed to step (3-19).
[0097] (3-6) If the network interface Pe is configured to be enabled, continue with the following steps; otherwise, proceed to step (3-19).
[0098] (3-7) If the interface types of network interface Pd and network interface Pe are consistent, continue to the next step; otherwise, jump to step (3-19).
[0099] (3-8) If the interface speeds of network interface Pd and network interface Pe are the same, continue to the next step; otherwise, jump to step (3-19).
[0100] (3-9) If both network element D and network element E are network devices such as switches, routers, and firewalls, then proceed to step (3-12); otherwise, continue with the subsequent steps.
[0101] (3-10) If network element D is a network device such as a switch, router, or firewall, and network element E is not a network device, then proceed to step (3-17); otherwise, continue with the subsequent steps.
[0102] (3-11) If network element E is a network device such as a switch, router, or firewall, and network element E is not a network device, then proceed to step (3-18); otherwise, proceed to step (3-20).
[0103] (3-12) If the link types of network interface Pd and network interface Pe are the same, continue to the next step; otherwise, jump to step (3-19).
[0104] (3-13) If the link type of both network interface Pd and network interface Pe is trunk, representing a trunk link or a trunk link, then continue to the next step; otherwise, jump to step (3-15).
[0105] (3-14) If both network interface Pd and network interface Pe are allowed to pass through the same VLAN, then continue to the next step; otherwise, jump to step (3-19);
[0106] (3-15) If both network interface Pd and network interface Pe are configured as Layer 3 interfaces or sub-interfaces, continue with the subsequent steps; otherwise, proceed to step (3-20).
[0107] (3-16) If the IP address of the Layer 3 interface or sub-interface of network interface Pd is in the same network segment as that of network interface Pe, then proceed to step (3-20); otherwise, proceed to step (3-19).
[0108] (3-17) If the link type of network interface Pd is access, i.e., access link, then jump to step (3-20); otherwise, jump to step (3-19).
[0109] (3-18) If the link type of network interface Pe is access, i.e., access link, then jump to step (3-20); otherwise, jump to step (3-19).
[0110] (3-19) Record configuration inconsistency alarm information;
[0111] (3-20) After the loop body from step (3-3) to step (3-19) has been executed for each network element E in the neighbor network element list, execute the subsequent steps; otherwise, execute the next loop.
[0112] (3-21) Summarize the alarm information for inconsistent configurations, and sub-process 1 ends.
[0113] In this embodiment, sub-process 2, which checks the consistency between network element configuration items and their associated configuration items and parameters, can be found in [reference needed]. Figure 4 The illustration includes the following steps:
[0114] (4-1) Obtain the list of associated configuration items W for network element D;
[0115] (4-2) Obtain the configuration item list S of network element D;
[0116] (4-3) For each expected configuration attribute Cw in the associated configuration item list W, execute the loop body from step (4-4) to step (4-11);
[0117] (4-4) If the configuration item list S contains the configuration attribute Cs corresponding to the expected configuration attribute Cw, then continue to the next step; otherwise, record the configuration inconsistency alarm information about the expected configuration attribute and jump to step (4-12).
[0118] (4-5) Obtain the expected parameter table Lw for the expected configuration attribute Cw;
[0119] (4-6) Obtain the parameter table Ls of the configuration attribute Cs;
[0120] (4-7) For each expected parameter Pw in the expected parameter table Lw, execute the loop body from step (4-8) to step (4-10);
[0121] (4-8) Find the parameter Ps corresponding to the expected parameter Pw in the parameter table Ls. If not found, jump to step (4-10); otherwise, continue to execute the subsequent steps.
[0122] (4-9) If the parameter Ps matches the expected parameter Pw, proceed to step (4-11); otherwise, continue with the subsequent steps.
[0123] (4-10) Record alarm information regarding inconsistencies in the configuration of expected parameters;
[0124] (4-11) After the loop body from step (4-8) to step (4-10) has been executed for each expected parameter Pw in the expected parameter table Lw, jump to step (4-12); otherwise, execute the next loop.
[0125] (4-12) After the loop body from step (4-4) to step (4-11) has been executed for each expected configuration attribute Cw in the associated configuration item list W, execute the subsequent steps; otherwise, execute the next loop.
[0126] (4-13) Summarize the alarm information for inconsistent configurations, and sub-process 2 ends.
[0127] Example 2
[0128] Building upon Example 1, this example further illustrates the test network configuration consistency verification method using a specific test network example. The example test network topology is as follows: Figure 5 As shown, a router R connects two subnets. Subnet I consists of a switch S1 and three computer terminals, while subnet II consists of a switch S2 and two servers.
[0129] The network plan for the test network is as follows:
[0130] The subnet address of subnet I is 192.168.1.0 / 24; the gateway is located on switch S1, and its IP address is 192.168.1.254;
[0131] The subnet II network segment address is 192.168.2.0 / 24; the gateway is located on switch S2, and its IP address is 192.168.2.254;
[0132] Interface 1 of router R is interconnected with interface 1 of switch S1, with a network segment address of 192.168.111.0 / 30; interface 2 of router R is interconnected with interface 1 of switch S2, with a network segment address of 192.168.111.4 / 30.
[0133] Configure a static route between subnet I and subnet II on router R; configure a static route to subnet II on switch S1; configure a static route to subnet I on switch S2.
[0134] Therefore, this embodiment uses router R as an example to illustrate the process of checking the configuration consistency between the test network element and its neighboring network elements, as well as the process of checking the consistency between the network element configuration items and their associated configuration items and parameters. The execution process of the methods for other network elements in the test network can be deduced by analogy.
[0135] In this embodiment, the operator of the network testbed determines the configuration items that router R needs to be configured and the configuration attributes of each configuration item according to the test network topology and network planning, and sets parameter values for the parameter table of the configuration attributes, thereby obtaining the network element configuration item list of router R as shown in Table 1 below.
[0136] Table 1. Router R network element configuration item list
[0137]
[0138] The operator also sets the necessary associated configuration items, expected configuration attributes and expected parameter tables for the configuration items of router R, thus obtaining the list of associated configuration items of router R as shown in Table 2 below.
[0139] Table 2. List of Router R Associated Configuration Items
[0140]
[0141] Similarly, the network element configuration item lists for switches S1 and S2 are shown in Tables 3 and 4 below, respectively.
[0142] Table 3. List of S1 network element configuration items for switch
[0143]
[0144] Table 4. List of S2 network element configuration items for the switch
[0145]
[0146] The process begins by checking the configuration consistency between router R and its neighboring network elements. Router R's neighboring network elements include switches S1 and S2. This embodiment uses the example of checking the configuration consistency between router R and switch S1 to illustrate the specific process of checking the configuration consistency between router R and its neighboring network elements. The process of checking the configuration consistency between other adjacent network elements can be deduced similarly.
[0147] Router R's network interface 1 is connected to switch S1. The configuration items and parameters of router R's network interface 1 are shown in Table 5 below.
[0148] Table 5. Configuration items and parameters of network interface 1 of router R.
[0149]
[0150] Connect network interface 1 of switch S1 to router R and obtain the configuration items and parameters of network interface 1 of switch S1, as shown in Table 6 below.
[0151] Table 6. Configuration items and parameters of network interface 1 of switch S1.
[0152]
[0153] Both network interface 1 of router R and network interface 1 of switch S1 are configured to be enabled, i.e., the PORT_ENABLE parameter value is up. Therefore, the subsequent check steps will continue.
[0154] The interface type of network interface 1 of router R and network interface 1 of switch S1 is 10GE interface, that is, the value of INTF_TYPE parameter is 10GE. Since the interface types are the same, the subsequent check steps will continue.
[0155] The interface speeds of network interface 1 of router R and network interface 1 of switch S1 are both auto-negotiation, and the interface speeds are consistent. Therefore, the subsequent check steps will continue.
[0156] Since both router R and switch S1 are network devices such as routers, switches, and firewalls, we continue to check the link type configuration of adjacent network interfaces.
[0157] The link type of network interface 1 of router R and network interface 1 of switch S1 is both access, the link types are the same, so continue to perform the subsequent check steps;
[0158] Both network interface 1 of router R and network interface 1 of switch S1 are Layer 3 interfaces, so we continue to check the IP address configuration of adjacent network interfaces.
[0159] The IP address of network interface 1 of router R is 192.168.111.2 / 30, and the IP address of network interface 1 of switch S1 is 192.168.111.1 / 30. They are on the same network segment, so continue with the subsequent check steps.
[0160] No misconfiguration alarms were detected in any of the above inspection steps, and the inspection is now complete.
[0161] Next, check the consistency between the network element configuration items of router R and its associated configuration items and parameters. The same process can be applied to the other network elements. The check process first obtains the associated configuration item list W of router R, which is the previously preset Table 2; at the same time, it obtains the configuration item list S of router R, which is the previously preset Table 1.
[0162] For the first associated configuration item Cw-1 "Enable physical interface for connecting subnet I" in the associated configuration item list W, with the expected configuration attribute being "Enable physical interface", perform the following check steps:
[0163] (51-1) The third configuration item Cs-3 “Enable physical interface for connecting subnet I” in the configuration item list S corresponds to the associated configuration item Cw-1, and its configuration attribute is “Enable physical interface”. Therefore, continue to execute the subsequent steps.
[0164] (51-2) Obtain the expected parameter table Lw-1 of the associated configuration item Cw-1, namely "INTF_TYPE=10GE;INTF_NUM=1;PORT_ENABLE=up";
[0165] (51-3) Obtain the parameter table Ls-3 of configuration item Cs-3, namely "INTF_TYPE=10GE;INTF_NUM=1;PORT_ENABLE=up";
[0166] (51-4) For each expected parameter in the expected parameter table Lw-1, the same parameter can be found in the parameter table Ls-3, and the parameter values are consistent, so continue to execute the subsequent steps.
[0167] For the second associated configuration item Cw-2 "Enable physical interface for connecting subnet II" in the associated configuration item list W, with the expected configuration attribute "Enable physical interface", perform the following check steps:
[0168] (52-1) The fourth configuration item Cs-4 “Enable physical interface for connecting subnet II” in the configuration item list S corresponds to the associated configuration item Cw-2, and its configuration attribute is “Enable physical interface”. Therefore, continue to execute the subsequent steps.
[0169] (52-2) Obtain the expected parameter table Lw-2 of the associated configuration item Cw-2, namely "INTF_TYPE=10GE;INTF_NUM=2;PORT_ENABLE=up";
[0170] (52-3) Obtain the parameter table Ls-4 of configuration item Cs-4, namely "INTF_TYPE=10GE;INTF_NUM=2;PORT_ENABLE=up";
[0171] (52-4) For each expected parameter in the expected parameter table Lw-2, the same parameter can be found in the parameter table Ls-4, and the parameter values are consistent, so continue to the next step.
[0172] No misconfiguration alarms were detected in any of the above inspection steps, and the inspection is now complete.
Claims
1. A method for verifying the consistency of test network configurations suitable for large-scale network testbeds, characterized in that, Includes the following steps: S1. Obtain the test network topology and the list of network element configuration items and parameters for all test network elements in the topology. The test network topology includes the list of test network elements, the list of links, and the network element adjacency relationships. S2. Sort all network elements in the test network element list according to the preset priority; the preset priority is: networking devices > security devices connected in series in the network > end devices > security devices connected in parallel in the network; S3. After sorting, check the configuration consistency of each network element with its neighboring network elements in turn, specifically: S31. Obtain the list of neighboring network elements of network element D from the adjacency relationship of network elements in the test network; S32. Traverse each network element E in the neighbor network element list and perform the following operations: Obtain the configuration information of the first network interface Pd connecting network element D to network element E; Obtain the configuration information of the second network interface Pe that connects network element E to network element D; Based on the configuration information of the first network interface Pd and the second network interface Pe, a preset consistency check rule is executed. If any configuration inconsistencies are found after the consistency check rules are applied, the corresponding configuration inconsistency alarm information will be recorded. S33. Summarize and output all recorded configuration inconsistency alarm information; S4. If a network element D, after inspection, has the same configuration as its neighboring network elements, then obtain the configuration items and parameter list of network element D, and further check the consistency between the network element configuration items in the configuration items and parameter list and their associated configuration items and parameters, specifically: S41. Obtain the configuration item list S and associated configuration item list W of network element D from the network element configuration item and parameter list; S42. Traverse each expected configuration property Cw in the associated configuration item list W and perform the following operations: Check if there is a corresponding configuration attribute Cs for Cw in the configuration item list S; if it exists, compare the parameters of the expected configuration attribute Cw with the parameters of the configuration attribute Cs; if it does not exist or the comparison result is inconsistent, record the corresponding configuration inconsistency alarm information. S43. Summarize and output all recorded configuration inconsistency alarm information; After S5 and the consistency check pass, a configuration command is generated and sent to the corresponding network element D for execution, completing the test network configuration consistency verification process.
2. The test network configuration consistency verification method according to claim 1, characterized in that, In step S1, the network element configuration items and parameter list includes: network element identifier, network element type, network element configuration item list, and associated configuration item list.
3. The test network configuration consistency verification method according to claim 2, characterized in that: The network element configuration item list includes: configuration item number, configuration item name, configuration attribute code, configuration attribute name, and parameter table; The list of associated configuration items includes: associated configuration item number, associated configuration item name, corresponding configuration item number, expected configuration attribute code, expected configuration attribute name, and expected parameter table; The list of associated configuration items is stored in an empty state or in a state with any finite number of associated configuration items, and the configuration items in the network element configuration item list and the associated configuration items in the associated configuration item list have a preset first correspondence dependency relationship; The parameter table in the network element configuration item list and the expected parameter table in the associated configuration item list are stored in an empty state or in a state with any finite number of parameters / expected parameters, respectively, and the parameters in the parameter table and the expected parameters in the expected parameter table have a preset second correspondence dependency relationship.
4. The test network configuration consistency verification method according to claim 1, characterized in that, The preset consistency check rules include: Check whether the interface status of the first network interface Pd and the second network interface Pe is both enabled; Check whether the interface types of the first network interface Pd and the second network interface Pe are consistent; Check whether the interface speeds of the first network interface Pd and the second network interface Pe are consistent; Based on the device types corresponding to network element D and network element E, perform at least one of the following: If network element D and network element E are both network devices, check whether the link types of the first network interface Pd and the second network interface Pe are the same; if the link types are the same and are Trunk, check whether the allowed VLANs are the same; if the link types are the same and are Layer 3 interfaces or sub-interfaces, check whether the configured IP addresses are in the same network segment. If network element D is a network device but network element E is not a network device, then check whether the link type of the first network interface Pd is Access; if network element E is a network device but network element D is not a network device, then check whether the link type of the second network interface Pe is Access. If the result of any of the above check rules is negative, then a configuration inconsistency is determined to exist.
5. The test network configuration consistency verification method according to claim 1, characterized in that: When comparing the parameters of the expected configuration attribute Cw with the parameters of the configuration attribute Cs, the expected parameter table Lw of the expected configuration attribute Cw and the parameter table Ls of the configuration attribute Cs are obtained respectively; for each expected parameter Pw in the expected parameter table Lw, the corresponding parameter Ps is found in the parameter table Ls. If the value of the expected parameter Pw matches the value of the parameter Ps, the comparison result is determined to be consistent, and the comparison continues for the next expected parameter Pw; if the parameter Ps is not found or the two values are inconsistent, the corresponding configuration inconsistency alarm information is recorded.
6. The test network configuration consistency verification method according to claim 1, characterized in that: For network element D, if in step S3 it is found that its configuration is inconsistent with that of neighboring network elements, or if in step S4 it is found that its network element configuration items are inconsistent with the associated configuration items and parameters, then an alarm message will be output to prompt the operator to handle the issue and end the test network configuration consistency verification process.
7. The test network configuration consistency verification method according to claim 1, characterized in that: In step S5, after all consistency checks pass, for each configuration item C in the configuration item list S of network element D, a corresponding configuration command is generated according to the configuration command template of network element D and sent to the network element D for execution.
Citation Information
Patent Citations
Method and device for checking parameter configuration consistence of related network elements
CN101170790A