Network element equipment configuration information viewing system and working method thereof
Technical Field
The invention belongs to the technical field of data communication network management, and particularly relates to a network element equipment configuration information viewing system.
Background
With the vigorous development of the information age, various services in daily life of people are added into the cloud, and the scale and complexity of a data communication network are increased in a geometric level. For the construction and maintenance side of the data communication network, a network operator needs to manage each network element device, and especially, the efficiency requirements on the configuration, viewing and setting of the network element devices are higher and higher. At present, SNMP (Simple Network Management Protocol) is widely used in implementation of Network Management workstation to manage Network element devices as a de facto standard. The protocol is a typical client/server architecture, wherein a network management workstation runs an SNMPServer (server program), and a network element device runs an SNMPagent (client agent). The network element equipment configuration is defined by a Management Information Base (MIB), and the SNMP provides five messages including GET _ REQUEST, GETNEXT _ REQUEST, GET _ RESPONSE, SET _ REQUEST and TRAP for reading and writing the MIBs, so as to complete configuration Information access and realize the Management of the network Management workstation on the network element.
The current method has the following problems in terms of execution efficiency, implementation cost, expansibility and the like. Firstly, the network management workstation reads the configuration of one network element device in real time each time, and particularly, the network management workstation repeatedly executes the configuration when the network management workstation switches the configuration to be checked back and forth among a plurality of network element devices. Secondly, the Agent running on the network element equipment is an independent process, and the network management workstation and the network element equipment can work only by realizing an SNMP protocol for the service of the network management workstation. Problems with either party can result in an unmanageable situation. Thirdly, if any service changes, the network management workstation needs to sense the change, the MIB also needs to sense the change, and both sides can respond to the change after being modified.
Disclosure of Invention
In order to solve the above problems, the present invention provides a system for viewing network element device configuration information, which includes a network management workstation and a network element device, wherein the network management workstation is in communication connection with the network element device.
The network management workstation is provided with an SNMP server, an FTP server, a configuration interactive interface logic unit, a configuration human-computer interactive interface and a regular expression analyzer.
The network element equipment comprises an SNMP agent module and an FTP client.
The SNMP server is in communication connection with the SNMP agent module, and the FTP server is in communication connection with the FTP client.
The SNMP server is used for the network management workstation to issue a command for the FTP server to upload the device configuration file to the network element device.
The SNMP agent module is used for completing command communication by cooperating with the SNMP server.
The FTP server is responsible for transmitting configuration files between the network element equipment and the network management workstation.
The FTP client is used for being matched with the FTPF server to transmit the configuration file.
And configuring a human-computer interaction interface for a user to input a configuration viewing item of the network element equipment and displaying returned configuration content.
The regular expression parser is used for processing the configuration file of the SNMP server end and reversely parsing the conversion work of the configuration file and the interface configuration items.
Further, the SNMP agent module is further configured to monitor whether a configuration file changes.
Furthermore, the network management workstation is also provided with an SNMP alarm receiver which is in communication connection with the SNMP agent module and is used for receiving the alarm of the SNMP agent when the configuration file of the network element equipment is changed and informing the network management workstation to synchronize the configuration file after receiving the alarm information.
Further, the command for the TP server to upload the device configuration file includes a destination address, an FTP username, and a password for uploading the configuration file.
The working method of the network element equipment configuration information viewing system comprises the following steps:
the method comprises the following steps: the SNMP server sends a command for acquiring the equipment configuration file to the network element equipment at regular time.
Step two: and the SNMP agent informs the FTP client to upload the device configuration file.
Step three: and the FTP client uploads the configuration file to the FTP server.
Step four: and the user sends a configuration viewing instruction through the interface configuration item of the configuration human-computer interaction interface.
Step five: and the regular expression parser parses the interface configuration items of the human-computer interaction interface into corresponding configuration items in the configuration file to obtain corresponding data.
Step seven: and the human-computer interaction interface presents the obtained configuration content.
Further, in the fifth step, the regular expression analyzer analyzes the configuration in the configuration file through the regular expression to extract configuration content, and the configuration content and the configured identifier form a key value pair and return to the human-computer interaction interface.
The working method of the above-mentioned network element device configuration information viewing system further includes an alarm synchronization process, including the following steps:
the method comprises the following steps: the profile of the network element device changes.
Step two: the SNMP agent module monitors the change and gives an alarm to the SNMP alarm receiver.
Step three: the SNMP alarm receiver informs the network management workstation of synchronizing the configuration file.
Step four: the SNMP server issues a command for acquiring the equipment configuration file to the network element equipment.
Step five: and the SNMP agent informs the FTP client to upload the device configuration file.
Step six: and the FTP client uploads the configuration file to the FTP server.
The invention has the beneficial effects that:
the invention directly uploads the configuration file of the network element equipment to the network management server through the FTP service by simplifying the service configuration defined by the MIB, reversely analyzes the service configuration in the configuration file through the regular expression, bypasses the mode of defining the service configuration by the MIB, finishes the reading of the service configuration, and provides a synchronization mechanism to ensure that the configuration on the network management workstation is consistent with the network element equipment. In the invention, the network management workstation can complete reading and displaying of the configuration locally without acquiring from the client agent in real time, thereby effectively reducing the consumption on the network. Because the method is completed locally in the network management workstation, the presentation speed is high on the user interaction level. The invention can reduce the workload of the client agent, and only needs to pay attention to the maintenance of the configuration file for the newly added function, rather than developing and maintaining the MIB file defining the configuration item for the network management.
Detailed Description
The invention relates to a network element equipment configuration information viewing system which comprises a network management workstation and network element equipment. And the network management workstation is in communication connection with the network element equipment.
Besides the functional modules in the prior art, the network management workstation is also provided with an SNMP server, an FTP server, a human-computer interaction interface and a regular expression parser.
Besides the functional modules in the prior art, the network element equipment is also provided with an SNMP agent module and an FTP client.
The SNMP server is used for the network management workstation to issue a command for the FTP server to upload the device configuration file to the network element device. The command comprises transmission related parameters such as a destination address uploaded by a configuration file, an FTP user name, a password and the like.
The SNMP agent module is used for completing command communication by cooperating with the SNMP server. The command may include a command to upload a device profile, or may include other instructions. The SNMP agent module is an interface for communication between the SNMP server and the network element equipment.
The FTP server is responsible for transmitting configuration files between the network element equipment and the network management workstation.
The FTP client is used for being matched with the FTPF server to transmit the configuration file.
And configuring a human-computer interaction interface for a user to input a configuration viewing item of the network element equipment and displaying returned configuration content. The setting of the human-computer interaction interface facilitates the user to directly check the configuration information of the network element equipment in the network management workstation.
The regular expression parser is used for processing the configuration file of the SNMP server end and reversely parsing the conversion work of the configuration file and the interface configuration items. The regular expression parser is the core of the invention and is responsible for replacing the complicated MIB converter work, directly processing the configuration file of the server end and reversely parsing the conversion work responsible for the configuration file and the interface configuration item. The regular expression is a logic formula for operating character strings, namely, a 'regular character string' is formed by using a plurality of specific characters defined in advance and a combination of the specific characters, and the 'regular character string' is used for expressing a filtering logic for the character string. The invention uses java language as regular expression analyzer, and the analysis content can be transmitted based on parameter configuration.
And the reverse analysis is carried out to generate the configuration items based on the mapping relation between the configuration file and the regular expression. And analyzing the configuration in the configuration file through the regular expression to extract configuration content, forming a key value pair with the configuration identifier, and returning the key value pair to the interface.
Configuration text examples show that:
<?xml version="1.0"encoding="UTF-8"?>
<policys>
<policy cfg="hostname"desc="device name"algorithm="^hostname(/S+)"/>
</policys>
Preferably, in order to ensure that the network management workstation and the configuration file of the network element device can be updated synchronously when the SNMP server does not issue a command for acquiring the device configuration file to the network element device, the SNMP agent module of the present invention is further designed with a function of monitoring whether the configuration file changes, periodically polling the change condition, calculating an MD5 value after the file is read, comparing the MD5 value with the MD5 value polled last time, discarding the MD5 value if the MD5 value is consistent, updating the MD5 value if the MD5 value is inconsistent, and sending an alarm in a trap form. The network management server is provided with an SNMP alarm receiver which is in communication connection with the SNMP agent and can receive the alarm sent by the network element equipment, the alarm content is changed in the configuration file, and the network management server is used for receiving the alarm of the SNMP agent when the configuration file of the network element equipment is changed and informing the network management workstation to synchronize the configuration file after receiving the alarm. The network management workstation commands the SNMP server to issue a command for uploading the device configuration file by the FTP server to the network element device.
The working method of the present invention is explained below.
The method comprises the following steps: the SNMP server issues a command for acquiring the equipment configuration file to the network element equipment. The issuing of the command is a timed loop issuing.
Step two: and the SNMP agent informs the FTP client to upload the device configuration file.
Step three: the FTP client uploads a configuration file to the FTP server;
step four: and the user sends a configuration viewing instruction through the interface configuration item of the configuration human-computer interaction interface.
Step five: and the regular expression parser parses the interface configuration items of the human-computer interaction interface into corresponding configuration items in the configuration file to obtain corresponding data.
Step seven: and the human-computer interaction interface presents the obtained configuration content.
When the SNMP alarm receiver is arranged, the method comprises an alarm synchronization process and comprises the following steps:
the method comprises the following steps: the profile of the network element device changes.
Step two: the SNMP agent module monitors the change and sends an alarm information alarm to the SNMP alarm receiver.
Step three: the SNMP alarm receiver informs the network management workstation of synchronizing the configuration file.
Step four: the SNMP server issues a command for acquiring the equipment configuration file to the network element equipment.
Step five: and the SNMP agent informs the FTP client to upload the device configuration file.
Step six: and the FTP client uploads the configuration file to the FTP server.