A system and method for switch test environment setup and monitoring management
By separating the network from the host computer network in the switch testing environment and using a serial port server group to convert data, the management anomalies caused by network storms and device crashes were resolved, enabling device monitoring and management under abnormal scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-30
- Publication Date
- 2026-03-20
AI Technical Summary
In abnormal scenarios such as network storms, the host computer management device may be affected, unable to manage the switch normally, and unable to obtain current information when the device crashes, affecting problem analysis.
By converting the switch's console port data into network data and handing it over to the host computer for processing, a serial port server is used to completely isolate the network of the test environment from the host computer's network, establishing a communication connection between the serial port server group and the switch, and using the host computer for data processing and monitoring.
It enables the management of the host computer without being affected by abnormal scenarios, can monitor the status of the switch, supports independent management of multiple test environments, does not depend on the performance of the serial port server, and can quickly respond to environmental changes.
Smart Images

Figure CN115811491B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of industrial automation communication, in particular to a system and method for switch test environment building and monitoring management. BACKGROUND
[0002] Generally, the network where the host computer is located and the network where the test environment is located are the same, and the business data and the host computer management data are separated by VLAN technology, etc. However, if in the network storm or other abnormal scenarios, the management of the host computer will be affected, and the device cannot be managed; in the device dead or other abnormal scenarios, the current information of the device cannot be obtained, which is not conducive to analyzing and solving problems.
[0003] Chinese patent CN101789889A "A method and system for automatically testing communication equipment" discloses a method for automatically testing communication equipment, which connects the control device and the tested device through a serial port server to realize testing of multiple communication equipment. However, when network storm interference occurs, the above method will cause abnormal management of the host computer because the control device and the tested device are in the same network, and the device dead may also lose data.
[0004] Therefore, there is an urgent need for a system and method for switch test environment building and monitoring management, which converts the Console port data in the switch into network data through a serial port server and then hands it over to the host computer for processing, completely separates the network in the test environment from the network where the host computer is located, so that the test environment can be arbitrarily built without affecting the management of the switch by the host computer. SUMMARY
[0005] Therefore, the present application provides a system and method for switch test environment building and monitoring management, which separates the network of the test environment switch from the host computer, and solves the problem of abnormal management of the host computer and dead switch when facing network storm interference.
[0006] The technical scheme of the present application is implemented as follows: on the one hand, the present application provides a system for switch test environment building and monitoring management, which comprises a host computer, a serial port server group and multiple switches,
[0007] The host computer is in communication connection with the serial port server group, and is used for processing the network data converted by the serial port server group;
[0008] The serial port server group is in communication connection with the host computer and the switch, and is used for receiving the Console port data of the switch and converting it into network data sent to the host computer;
[0009] The switch is in communication connection with the serial port server group, and sends the Console port data to the serial port server group;
[0010] The host computer and the switch are located in different network environments.
[0011] Preferably, the serial server group comprises one or more serial servers, and the number of serial servers in the serial server group is adjusted according to the number of serial ports of the serial server and the number of Console ports of the switch.
[0012] Preferably, the host computer is further configured to process data, manage the switch, and monitor the state of the switch.
[0013] In another aspect, the application also provides a method for building and monitoring a test environment of a switch, comprising the following steps:
[0014] S1, building a test environment, configuring serial servers in batches, and establishing a communication channel between the host computer and the Console ports of the switch;
[0015] S2, establishing a mapping table of serial server IP-serial number-switch IP-mac;
[0016] S3, configuring the switch in batches, managing and monitoring the switch through the host computer, and recording and saving the alarm information of the switch.
[0017] Preferably, step S1 specifically comprises:
[0018] The building process of the test environment specifically comprises connecting the Console ports of the switch in the test environment with the serial ports of the serial servers, connecting the network ports of the serial servers with the network of the host computer, when the total number of serial ports of the serial server group is not less than the number of Console ports of all switches, not adding serial servers, otherwise adding serial servers.
[0019] Preferably, step S1 further comprises:
[0020] The batch configuration of the serial servers specifically comprises scanning the serial servers using the host computer, obtaining the configuration of each serial port of the serial servers, selecting serial ports in batches and modifying the working mode and parameters of the serial ports of the serial servers in batches according to the parameters of the switches in the test environment, and pointing the destination address of the network port to the host computer.
[0021] Preferably, step S2 specifically comprises:
[0022] Using the host computer to send information request messages to each switch in the test environment to obtain the correspondence between the serial server IP-serial number and the switch IP-mac;
[0023] The host computer sends a state request broadcast message to the serial port server. After receiving the state request broadcast message, the serial port server configures the converted serial port data as a heartbeat packet for each serial port. Meanwhile, the serial port server converts the state request broadcast message into serial port data and sends it to each serial port. The console port of the switch in the test environment receives the state request broadcast message and sends a reply message. The IP and mac information of the switch are added to the reply message and sent to the serial port server. The serial port server converts the reply message sent by the console port into network data, adds the serial port number of the source, and sends it back to the host computer in the form of unicast. The host computer establishes a mapping relationship table according to the IP and mac information of the switch and the serial port number of the serial port server and the IP information of the source serial port server.
[0024] Preferably, step S2 further comprises:
[0025] After the serial port server sends the heartbeat packet to the switch, the switch sends its IP and mac information to the serial port server. The serial port server returns the IP and mac information of the switch and the serial port number to the host computer. The host computer compares the received data with the mapping relationship table. If there is a difference, the host computer sends a unicast request message to the switch through the serial port server. The switch sends its IP and mac information again. If the reply information received by the host computer is inconsistent with the mapping table, the mapping table is updated. If they are consistent, the mapping table remains unchanged.
[0026] Preferably, step S2 further comprises:
[0027] When the test environment changes, the state of the switch connected to the serial port end of the serial port server is updated. The heartbeat packet of the serial port server obtains new switch information and sends it to the host computer, triggering the host computer to send a state request message, including the corresponding mapping information in the host computer. The serial port server compares the received information with the actual information of the current serial port server. If they are consistent, the message is not processed. If they are inconsistent, the serial port server replies the latest message information to the host computer. The host computer updates the mapping table according to the received message information.
[0028] When a new test environment is added, a new serial port server is accessed. After receiving the new serial port server information, the host computer sends a configuration message to the serial port server to configure the serial port server. The mapping relationship table of the serial port server IP-serial port number-switch IP-mac is added.
[0029] Preferably, step S3 specifically comprises:
[0030] The host computer selects switches in batches according to test requirements and issues a configuration command. The command is converted into a serial port command by the serial port server and sent to the switch for batch configuration.
[0031] The monitoring command is configured in the host computer, a state request command is sent to the switch every certain time interval, the state information of the switch is acquired, when the memory usage in the state information reaches the set threshold, an alarm information is sent, and the command for collecting the current state information of the switch is triggered, the request command is sent to the switch, and the data returned by the switch is saved to the local of the host computer for the R&D personnel to view.
[0032] When the switch in the test environment abnormally restarts, a segment error alarm or a dead condition occurs, data is transmitted to the host computer through the Console port, and the host computer saves and alarms after receiving the data.
[0033] The system and method for the test environment construction and monitoring management of the switch have the following beneficial effects relative to the prior art:
[0034] (1) The test environment network and the host computer network are completely separated, the abnormal scene test can be performed in the test environment without affecting the host computer network, the host computer can monitor the states of the devices under the abnormal scene, and the host computer can simultaneously manage multiple independent test environments without interference between the test environments.
[0035] (2) The intermediate serial port server group can be a single device or multiple devices, and the multiple devices can be established as a serial port server group and managed by the host computer.
[0036] (3) The state monitoring of the serial port device in the test environment is realized by configuring the heartbeat packet of the serial port server by the host computer, and the state of the mapping relationship table in the host computer can be maintained as the latest state.
[0037] (4) The data processing is not dependent on the serial port server, the serial port server is only used for data conversion of serial port data and network data, and does not perform data processing, the data processing is completed by the host computer, the performance of the serial port server is not dependent on the performance of the serial port server, and the performance of the serial port server does not affect the entire environment.
[0038] (5) The mapping table establishment mechanism is used, and when the test environment changes, the host computer can perceive the changes and update the mapping table items. DETAILED DESCRIPTION
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0040] Figure 1A system structure diagram for a switch test environment building and monitoring management of the present application;
[0041] Figure 2 A method flow chart for a switch test environment building and monitoring management of the present application;
[0042] Figure 3 A serial port server IP-serial port number-switch IP-mac mapping relationship table establishment flow chart for a method for a switch test environment building and monitoring management of the present application;
[0043] Figure 4 A serial port server IP-serial port number-switch IP-mac mapping relationship table updating flow chart for a method for a switch test environment building and monitoring management of the present application;
[0044] Figure 5 A processing flow chart for adding a serial port server or adding a test environment for a method for a switch test environment building and monitoring management of the present application. DETAILED DESCRIPTION
[0045] The technical solutions in the embodiments of the present application will be clearly and completely described in combination with the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0046] Embodiment one
[0047] A system for a switch test environment building and monitoring management is provided, as shown in Figure 1 The system comprises a host computer, a serial port server group and a plurality of switches,
[0048] The host computer is in communication connection with the serial port server group, and is used for processing network data converted by the serial port server group;
[0049] The serial port server group is in communication connection with the host computer and the switches, and is used for receiving Console port data of the switches and converting the Console port data into network data to send to the host computer;
[0050] The switches are in communication connection with the serial port server group, and send the Console port data to the serial port server group;
[0051] The host computer and the switches are in different network environments.
[0052] The network of the test environment and the network of the host computer are separated, and when abnormal conditions such as storms exist in the test environment, the management of the to-be-tested device in the test environment by the host computer is not affected.
[0053] The serial port server group comprises one or more serial port servers, and the number of serial port servers in the serial port server group is adjusted according to the size relationship between the number of serial ports of the serial port server and the number of Console ports of the switch.
[0054] Because the test environment and the host computer network are separated, the topology in the test environment can be increased or modified at any time, and the corresponding mapping table relationship table between the serial port server IP-serial port number-switch IP-mac is updated by the host computer.
[0055] The host computer is also used for data processing, management of the switch and monitoring of the state of the switch.
[0056] It should be noted that the present application does not rely on the serial port server for data processing, and the serial port server is only used for data conversion of serial port data and network data, and does not perform data processing, and the data processing is completed by the host computer, therefore, the performance of the serial port server is not relied on, and the performance of the serial port server is not high and will not affect the entire environment.
[0057] Embodiment two
[0058] A method for building and monitoring and managing a test environment of a switch is provided, as shown in Figure 2 The method comprises the following steps:
[0059] S1, building a test environment, batch configuring serial port servers, and establishing a communication channel between the host computer and the Console port of the switch;
[0060] S2, establishing a mapping relationship table of serial port server IP-serial port number-switch IP-mac;
[0061] S3, batch configuring the switch, managing and monitoring the switch through the host computer, and recording and saving the alarm information of the switch.
[0062] The present application transmits data through the network separately and is not affected by the test environment, and can more conveniently and quickly monitor the device, and can normally manage the device under abnormal network, and is convenient for troubleshooting, and can simultaneously monitor multiple test environments.
[0063] Step S1 specifically comprises:
[0064] The test environment building process specifically comprises connecting a Console port of a switch in the test environment with a serial port of a serial port server, connecting a network port of the serial port server with a network where the upper computer is located, when a total number of serial ports of the serial port server is not less than a number of Console ports of all switches, not adding serial port servers, otherwise adding serial port servers.
[0065] The batch configuration of the serial port server specifically comprises scanning the serial port server by using the upper computer, obtaining serial port configurations of the serial port server, batch selecting serial ports and batch modifying working modes and parameters of the serial ports of the serial port server according to parameters of the switches in the test environment, and pointing a destination address connected by the network port to the upper computer.
[0066] When the number of Console ports of the switches in the current environment is less than the number of serial ports of the serial port server, the number of serial port servers in the serial port server group is 1, and a model diagram is as shown in Figure 1 The topology in each test environment is built according to actual test requirements, and can be networked in a ring network, a link and convergence and the like;
[0067] When the number of Console ports of the switches in the test environment is greater than the number of serial ports of the serial port server, the number of serial port servers in the serial port server group can be directly expanded.
[0068] The network port of each serial port server is connected with the upper computer, and the serial port of each serial port server is connected with a Console port of a switch in the test environment.
[0069] Step S2 specifically comprises:
[0070] The upper computer sends an information request message to each switch in the test environment, and obtains a correspondence between a serial port server IP-serial port number and a switch IP-mac;
[0071] The upper computer sends a state request broadcast message to the serial port server, the serial port server receives the state request broadcast message, configures converted serial port data as a heartbeat packet of each serial port, and simultaneously converts the state request broadcast message into serial port data and sends the serial port data to each serial port, the Console port of the switch in the test environment receives the state request broadcast message and sends a reply message, the IP and mac information of the switch are added to the reply message and sent to the serial port server, the serial port server converts the reply message sent back by the Console port into network data, adds a serial port number of a source, and sends the network data back to the upper computer in a unicast form, and the upper computer establishes a mapping relationship table according to the switch IP and mac information and the serial port server serial port number and the source serial port server IP information.
[0072] A mapping relationship table establishment flow chart is as shown in Figure 3
[0073] Step1, the host computer sends a broadcast to request information of each switch to be tested;
[0074] Step2, the serial server configures a heartbeat packet according to the received command, converts the request command into a serial command, and sends the serial command to each switch connected to the serial server;
[0075] Step3, the switch returns the IP and mac information of the device to the serial server;
[0076] Step4, the serial server converts the information returned by the switch into a network data packet, adds the serial number information of the received serial port, and sends the information to the host computer in the form of unicast;
[0077] Step5, the host computer establishes a mapping relationship table;
[0078] Step6, the serial server sends a heartbeat packet to the switch at a certain time interval to request the switch information;
[0079] Step7, the switch returns the IP and mac information of the device to the serial server;
[0080] Step8, the serial server converts the information returned by the switch into a network data packet, adds the serial number information of the received serial port, and sends the information to the host computer in the form of unicast;
[0081] Step9, the host computer compares the mapping relationship table, if consistent, no processing, if inconsistent, Step10 is executed;
[0082] Step10, the host computer sends a unicast request to the serial server to obtain the switch device information;
[0083] Step11, the serial server converts the request command into a serial command and sends it to the switch;
[0084] Step12, the switch returns the IP and mac information of the device to the serial server;
[0085] Step13, the serial server converts the information returned by the switch into a network data packet, adds the serial number information of the received serial port, and sends the information to the host computer in the form of unicast;
[0086] Step14, according to the result of Step13, compare the mapping relationship table, if consistent, no processing, if inconsistent, update the mapping relationship table.
[0087] The serial port server sends a heartbeat packet to the switch, the switch sends its IP and mac information to the serial port server, the serial port server returns the IP and mac information of the switch and the serial port number to the host computer, the host computer compares the received data with the mapping relationship table, if there is a difference, the host computer sends a unicast request message to the switch through the serial port server, the switch sends its IP and mac information again, if the reply information received by the host computer is inconsistent with the mapping table, the mapping table is updated, if it is consistent, the mapping table remains unchanged.
[0088] The mapping relationship table updating flow chart is shown in Figure 4
[0089] S100 The serial port server sends a heartbeat packet to the switch at a certain time interval;
[0090] S200 The switch returns the IP and mac information of the device to the serial port server;
[0091] S300 The serial port server uploads the reply information to the host computer, and the host computer compares the information with the mapping relationship table;
[0092] If they are consistent, the process ends;
[0093] If they are inconsistent, the host computer sends a unicast status request message to the switch, and the switch returns the IP and mac information of the device;
[0094] S310 The serial port server uploads the reply information to the host computer, and the host computer compares the information with the mapping relationship table;
[0095] If they are consistent, the process ends;
[0096] If they are inconsistent, the mapping relationship table is updated.
[0097] When the test environment changes, the status of the switch connected to the serial port server is updated, the heartbeat packet of the serial port server obtains new switch information, and sends it to the host computer, triggering the host computer to send a status request message, including the corresponding mapping information in the current host computer, the serial port server compares the received information with the actual information of the current serial port server, if they are consistent, the message is not processed, if they are inconsistent, the serial port server returns the latest message information to the host computer, and the host computer updates the mapping table according to the received message information;
[0098] When a new test environment is added, a new serial port server is accessed, the host computer receives the new serial port server information, sends a configuration message to the serial port server to configure the serial port server, and then adds the mapping relationship table of the serial port server IP-serial port number-switch IP-mac.
[0099] When a serial port server or a test environment is added, the host processing flow is as shown in Figure 5
[0100] 1) Add a serial port server;
[0101] 2) The host receives continuous alarm information of the added serial port server;
[0102] 3) The host unicasts a configuration command to configure the parameters of the serial port server, so that the serial port server is connected with the host;
[0103] 4) The host unicasts a state request message to the serial port server;
[0104] 5) The serial port server converts the request message into serial port data and unicasts the serial port data to each serial port connected with the device;
[0105] 6) The switch receives the request message and replies with the IP and mac information of the device;
[0106] 7) The serial port server converts the received message of the serial port into network port data, adds the serial number information of the local machine, and forwards the network port data to the host;
[0107] 8) The host adds a table entry of the mapping relationship table according to the received data.
[0108] Step S3 specifically includes:
[0109] The host selects switches in batches according to test requirements, unicasts a configuration command, the command is converted into a serial port command by the serial port server and is unicasted to the switch, and batch configuration is performed;
[0110] In the host, a monitoring command is configured, a state request command is sent to the switch at a certain time interval, the state information of the switch is obtained, when the memory usage rate in the state information reaches a set threshold, an alarm information is sent, a command for collecting the current state information of the switch is triggered, a request command is sent to the switch, and the data replied by the switch is saved to the local host for viewing by a developer;
[0111] When the switch in the test environment abnormally restarts, a segment error alarm occurs, or the switch dies, data is transmitted to the host through the Console port, the host saves and alarms after receiving the data.
[0112] The developer can perform problem reproduction and problem analysis according to the saved abnormal restart, segment error alarm, or death information, and modify the configuration of the host.
[0113] The above merely provides the preferred embodiment of the present application, and is not used to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A system for setting up and monitoring a switch testing environment, the system comprising a host computer, a serial port server group, and multiple switches. The host computer is connected to the serial port server group for communication and is used to process the network data converted by the serial port server group. The serial port server group is connected to the host computer and the switch for communication, and is used to receive console port data from the switch and convert it into network data to be sent to the host computer. The switch is connected to the serial port server group and sends console port data to the serial port server group. Its features are, The host computer and the switch are located in different network environments.
2. The system for setting up and monitoring a switch testing environment as described in claim 1, characterized in that, The serial port server group includes one or more serial port servers. The number of serial port servers in the serial port server group is adjusted according to the relationship between the number of serial ports of the serial port server and the number of console ports of the switch.
3. The system for setting up and monitoring a switch testing environment as described in claim 2, characterized in that, The host computer is also used for data processing, managing the switch, and monitoring the status of the switch.
4. A method for setting up and monitoring a switch testing environment, characterized in that, Includes the following steps: S1, set up the test environment, configure the serial port server in batches, and establish a communication channel between the host computer and the switch console port; S2, establish a mapping table of serial server IP-serial port number-switch IP-mac; S3 allows for batch configuration of switches, management and monitoring of switches via a host computer, and recording and saving of switch alarm information. The host computer is connected to the serial port server group for communication and is used to process the network data converted by the serial port server group. The serial port server group is connected to the host computer and the switch for communication, and is used to receive console port data from the switch and convert it into network data to be sent to the host computer. The switch is connected to the serial port server group for communication and sends console port data to the serial port server group.
5. The method for setting up and monitoring a switch testing environment as described in claim 4, characterized in that, Step S1 specifically includes: The test environment setup process involves connecting the console port of the switch in the test environment to the serial port of the serial server, and connecting the network port of the serial server to the network where the host computer is located. If the total number of serial ports in the serial server group is not less than the number of console ports of all switches, no additional serial servers are added; otherwise, additional serial servers are added.
6. The method for setting up and monitoring a switch testing environment as described in claim 5, characterized in that, Step S1 further includes: The process of batch configuring the serial port server is as follows: use the host computer to scan the serial port server, obtain the configuration of each serial port of the serial port server, select serial ports in batches according to the parameters of the switch in the test environment, modify the working mode and parameters of the serial port of the serial port server in batches, and point the destination address of the network port connection to the host computer.
7. The method for setting up and monitoring a switch testing environment as described in claim 4, characterized in that, Step S2 specifically includes: Use the host computer to send information request messages to each switch in the test environment to obtain the mapping relationship between the serial port server IP-serial port number and the switch IP-MAC. The host computer sends a status request broadcast message to the serial port server. After receiving the status request broadcast message, the serial port server configures the converted serial port data as heartbeat packets for each serial port. At the same time, the serial port server converts the status request broadcast message into serial port data and sends it to each serial port. The console port of the switch in the test environment receives the status request broadcast message and sends a reply message. The reply message adds the IP and MAC information of the switch to the serial port server. The serial port server converts the reply message sent back from the console port into network data, adds the source serial port number, and sends it back to the host computer in unicast form. The host computer establishes a mapping table based on the switch IP and MAC information, the serial port number of the serial port server, and the source serial port server IP information.
8. The method for setting up and monitoring a switch testing environment as described in claim 7, characterized in that, Step S2 further includes: After the serial server sends a heartbeat packet to the switch, the switch sends its IP and MAC address information back to the serial server. The serial server then returns the switch's IP and MAC address information, along with the serial port number, to the host computer. The host computer compares the received data with the mapping table. If a discrepancy is found, the host computer sends a unicast request message through the serial server to the switch. The switch then sends its IP and MAC address information again. If the response information received by the host computer is inconsistent with the mapping table, the mapping table is updated. If they are consistent, the mapping table remains unchanged.
9. The method for setting up and monitoring a switch testing environment as described in claim 8, characterized in that, Step S2 further includes: When the test environment changes, the status of the switch connected to the serial port server is updated. The serial port server obtains the new switch information through its heartbeat packet and sends it to the host computer, triggering the host computer to send a status request message, including the corresponding mapping information in the current host computer. After receiving the message, the serial port server compares it with the actual information of the current serial port server. If they match, the message is not processed. If they do not match, the serial port server replies with the latest message information to the host computer, and the host computer updates the mapping table according to the received message information. When a new test environment is added, a new serial port server is connected. After receiving the information about the new serial port server, the host computer sends a configuration message to the serial port server to configure it, and then adds a mapping table of the serial port server IP-serial port number-switch IP-MAC address.
10. The method for setting up and monitoring a switch testing environment as described in claim 4, characterized in that, Step S3 specifically includes: Based on the testing requirements, the host computer selects a batch of switches and sends configuration commands. The commands are converted into serial commands by the serial server and sent to the switches for batch configuration. Configure monitoring commands in the host computer, send status request commands to the switch at regular intervals to obtain the switch's status information. When the memory usage rate in the status information reaches the set threshold, send alarm information and trigger the command to collect the switch's current status information, send request commands to the switch, and save the data replied by the switch to the host computer for review by the R&D personnel. When the switch in the test environment experiences an abnormal restart, segmentation fault alarm, or system crash, it sends data to the host computer via the Console port. The host computer receives the data, saves it, and issues an alarm.
Citation Information
Patent Citations
Method and system for automatic testing communication equipment
CN101789889A
Real-time industrial control system monitoring method and system
CN102331751A
Station-domain protection system of intelligent transformer station and function debugging method of system
CN104935079A