A method and apparatus for detecting port state consistency

CN115037662BActive Publication Date: 2026-08-07NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NEW H3C TECH CO LTD
Filing Date
2022-04-12
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0005]本申请提供了一种端口状态一致性检测方法及装置,用以解决现有技术中存在的无法自动检测冗余配对端口组各接口状态是否一致的问题

Benefits of technology

[0040] In summary, the port status consistency detection method provided in this application obtains the interface information of each network device in the target network. The interface information of a network device includes the interface description information and interface configuration information of each interface of the network device. Based on the interface description information of each interface of the network device, redundant paired port groups are identified. For each identified redundant paired port group, based on the interface configuration information of each interface included in the redundant paired port group, the interface status of each interface included in the redundant paired port group is detected to be consistent.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115037662B_ABST
    Figure CN115037662B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of network communication, in particular to a port state consistency detection method and device. The method comprises the following steps: acquiring interface information of each network device in a target network group, wherein the interface information of one network device comprises interface description information and interface configuration information of each interface of the network device; identifying a redundant pairing port group based on the interface description information of each interface of each network device; and detecting whether the interface states of each interface included in the redundant pairing port group are consistent based on the interface configuration information of each interface included in the redundant pairing port group for each identified redundant pairing port group.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network communication technology, and in particular to a method and apparatus for detecting port status consistency. Background Technology

[0002] With the continuous development and widespread application of information technology, the reliability requirements of application systems are becoming increasingly stringent. In application service reliability design, physical network redundancy design is a crucial component. In a physical network redundancy scenario, an application server is simultaneously connected to ports GE0 / 27 of both switch A and switch B. If the port configurations and states of the paired ports on switches A and B are inconsistent, the redundancy scheme may fail, leading to network failure.

[0003] Currently, when redundancy solutions fail, operations engineers need to determine the scope of network devices affected by the fault, then further determine the paired ports based on the device configuration descriptions, and finally determine whether the paired ports' statuses are consistent based on their experience. Alternatively, port speeds and other parameters could be included as monitoring items in routine automated checks. When redundancy solutions fail, operations engineers would determine the scope of network devices affected by the fault, then further determine the paired ports based on the device configuration descriptions. Based on the results of routine monitoring checks, operations engineers would query the status information of the paired ports and manually compare the consistency of their statuses.

[0004] However, when business failures occur, it takes a lot of time and effort for operations engineers to troubleshoot manually or with the help of monitoring products to locate the fault. More importantly, routine checks are not performed in advance to prevent problems from happening in the first place. Summary of the Invention

[0005] This application provides a port status consistency detection method and apparatus to solve the problem in the prior art that it is impossible to automatically detect whether the status of each interface in a redundant paired port group is consistent.

[0006] Firstly, this application provides a port state consistency detection method, the method comprising:

[0007] Obtain the interface information of each network device in the target network. The interface information of a network device includes the interface description information and interface configuration information of each interface of the network device.

[0008] Based on the interface description information of each interface of each network device, redundant paired port groups are identified;

[0009] For each identified redundant paired port group, based on the interface configuration information of each interface included in the redundant paired port group, it is detected whether the interface status of each interface included in the redundant paired port group is consistent.

[0010] Optionally, the steps for obtaining the interface information of each network device in the target network include:

[0011] Get the list of network devices in the target network;

[0012] Based on a preset protocol, log in to each network device included in the network device list, and obtain the interface information of each network device from each network device.

[0013] Optionally, if an interface belongs to a redundant paired port group, the interface description information of the interface shall include at least the interface identifier of the interface and the interface identifiers of other peer interfaces that form a redundant paired port group with the interface.

[0014] The interface configuration information for this interface includes at least MTU, simplex / duplex mode, operating mode, port speed, negotiated speed, IP subnet, and VLAN configuration.

[0015] Optionally, the preset protocol is Secure Shell Protocol (SSH) or Telnet Remote Terminal Protocol (Telnet).

[0016] The target network is pre-configured with usernames and passwords for each network device. The username and password for each network device are used to log in to that network device.

[0017] Based on a preset protocol, the steps for logging into each network device in the network device list include:

[0018] Based on the SSH / Telnet protocol, users can log in to the corresponding network device using the username and password associated with each device.

[0019] Optionally, the step of detecting whether the interface states of the interfaces included in the redundant paired port group are consistent, based on the interface configuration information of each interface in the redundant paired port group, includes:

[0020] Check whether the MTU, simplex mode, working mode, port speed, negotiation speed, IP subnet and VLAN configurations of each interface in the redundant paired port group are consistent.

[0021] Secondly, this application provides a port state consistency detection device, the device comprising:

[0022] The acquisition unit is used to acquire the interface information of each network device in the target network. The interface information of a network device includes the interface description information and interface configuration information of each interface of the network device.

[0023] The identification unit is used to identify redundant paired port groups based on the interface description information of each interface of each network device.

[0024] The detection unit is used to detect whether the interface status of each interface in each redundant paired port group is consistent, based on the interface configuration information of each interface in the redundant paired port group.

[0025] Optionally, when obtaining the interface information of each network device in the target network, the obtaining unit is specifically used for:

[0026] Get the list of network devices in the target network;

[0027] Based on a preset protocol, log in to each network device included in the network device list, and obtain the interface information of each network device from each network device.

[0028] Optionally, if an interface belongs to a redundant paired port group, the interface description information of the interface shall include at least the interface identifier of the interface and the interface identifiers of other peer interfaces that form a redundant paired port group with the interface.

[0029] The interface configuration information for this interface includes at least MTU, simplex / duplex mode, operating mode, port speed, negotiated speed, IP subnet, and VLAN configuration.

[0030] Optionally, the preset protocol is Secure Shell Protocol (SSH) or Telnet Remote Terminal Protocol (Telnet).

[0031] The target network is pre-configured with usernames and passwords for each network device. The username and password for each network device are used to log in to that network device.

[0032] When logging into each network device included in the network device list based on a preset protocol, the acquisition unit is specifically used for:

[0033] Based on the SSH / Telnet protocol, users can log in to the corresponding network device using the username and password associated with each device.

[0034] Optionally, when detecting whether the interface states of the interfaces included in the redundant paired port group are consistent based on the interface configuration information of each interface in the redundant paired port group, the detection unit is specifically used for:

[0035] Check whether the MTU, simplex mode, working mode, port speed, negotiation speed, IP subnet and VLAN configurations of each interface in the redundant paired port group are consistent.

[0036] Thirdly, embodiments of this application provide a port state consistency detection device, which includes:

[0037] Memory, used to store program instructions;

[0038] A processor is configured to invoke program instructions stored in the memory and execute the steps of the method as described in any one of the first aspects above, according to the obtained program instructions.

[0039] Fourthly, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the steps of the method as described in any of the first aspects above.

[0040] In summary, the port status consistency detection method provided in this application obtains the interface information of each network device in the target network. The interface information of a network device includes the interface description information and interface configuration information of each interface of the network device. Based on the interface description information of each interface of the network device, redundant paired port groups are identified. For each identified redundant paired port group, based on the interface configuration information of each interface included in the redundant paired port group, the interface status of each interface included in the redundant paired port group is detected to be consistent.

[0041] The port status consistency detection method provided in this application embodiment enables the detection server to automatically obtain the corresponding interface information from each network device in the network, and then identify the interfaces belonging to the same redundant paired port group based on the interface information. Furthermore, based on the obtained interface information, it determines whether the status of each interface in each redundant paired port group is consistent. This can effectively detect potential system failures that may lead to redundancy failure, prevent problems before they occur, replace manual troubleshooting operations, and improve operation and maintenance efficiency and response time. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments of this application or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings of the embodiments of this application.

[0043] Figure 1 A detailed flowchart of a port state consistency detection method provided in this application embodiment;

[0044] Figure 2 This is a schematic diagram of the structure of a port state consistency detection device provided in an embodiment of this application;

[0045] Figure 3 This is a schematic diagram of another port state consistency detection device provided in an embodiment of this application. Detailed Implementation

[0046] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the application. The singular forms “a,” “the,” and “the” as used in this application and claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to any and all possible combinations comprising one or more of the associated listed items.

[0047] It should be understood that although the terms first, second, third, etc., may be used to describe various information in embodiments of this application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" may also be interpreted as "when," "when," or "in response to a determination."

[0048] For example, see Figure 1 The diagram shown is a detailed flowchart of a port state consistency detection method provided in an embodiment of this application. The method includes the following steps:

[0049] Step 100: Obtain the interface information of each network device in the target network. The interface information of a network device includes the interface description information and interface configuration information of each interface of the network device.

[0050] It should be noted that, in this embodiment of the application, a preferred implementation is that the above-mentioned port status consistency detection method is executed by a detection server, and the detection server is a third-party detection device outside the network.

[0051] Of course, the detection server can also be a network device in the network that can perform the detection server function. In this embodiment of the application, no specific limitation is made here.

[0052] In this embodiment of the application, when obtaining the interface information of each network device in the target network, a preferred implementation method is to: obtain a list of network devices in the target network; based on a preset protocol, log in to each network device included in the network device list, and obtain the interface information of each network device from each network device.

[0053] Preferably, the preset protocol is Secure Shell Protocol (SSH) or Telnet. Accordingly, in this embodiment, the usernames and passwords corresponding to each network device in the target network can be pre-configured on the device used for port status consistency detection, wherein the username and password corresponding to one network device are used to log in to that network device.

[0054] Therefore, when logging into each network device in the network device list based on a preset protocol, a preferred implementation is to log into the corresponding network device using the username and password corresponding to each network device based on the SSH / Telnet protocol.

[0055] For example, on the detection server, username 1 and password 1 are pre-set for network device 1, username 2 and password 2 for network device 2, ..., username n and password n ​​for network device n. Then, when logging into network device 1, username 1 and password 1 are used based on the SSH / Telnet protocol. Similarly, when logging into network device m, username m and password m are used based on the SSH / Telnet protocol.

[0056] Next, the detection server obtains the interface information of each logged-in network device.

[0057] In this embodiment of the application, the interface information of a network device includes the interface description information and interface configuration information of each interface of the network device. Specifically, if an interface belongs to a redundant paired port group, the interface description information of the interface includes at least the interface identifier of the interface and the interface identifiers of other peer interfaces that form a redundant paired port group with the interface; the interface configuration information of the interface includes at least MTU, simplex mode, working mode, port speed, negotiation speed, IP subnet and VLAN configuration.

[0058] After logging into each network device, the detection server can obtain the interface information of each interface included in each network device.

[0059] In this embodiment, the detection server can periodically obtain device interface information from various network devices. For example, the preset period is 1 day, and the server obtains device interface information from various network devices at 2:00 AM every day. Specifically, the preset period length can be set based on user needs and / or different application scenarios, and is not specifically limited in this embodiment.

[0060] Step 110: Based on the interface description information of each interface of each network device, identify redundant paired port groups.

[0061] In this embodiment of the application, after the detection server obtains the interface information of each network device, it can identify and determine each interface belonging to the redundant pairing port based on the interface description information of each interface. Furthermore, it can also identify each redundant pairing port group.

[0062] The interface description information for each interface includes the interface's identifier, the device identifier to which the interface belongs, the identifiers of other peer interfaces belonging to the same redundant paired port group, and the device identifiers of those peer interfaces. Based on this information, it is possible to determine which interfaces form a redundant paired port group, thus identifying multiple redundant paired port groups.

[0063] For example, if the interface description information of interface 11 includes the identifier of interface 11, and the other peer interface that forms a redundant paired port group with interface 11 is interface 12, then it can be identified that interface 11 and interface 12 are a redundant paired port group.

[0064] Step 120: For each identified redundant paired port group, based on the interface configuration information of each interface included in the redundant paired port group, check whether the interface status of each interface included in the redundant paired port group is consistent.

[0065] As can be seen from the above, the interface configuration information of each interface belonging to the redundant paired port group includes at least MTU, simplex / duplex mode, working mode, port speed, negotiation speed, IP subnet and VLAN configuration.

[0066] Therefore, when detecting whether the interface status of each interface in the redundant paired port group is consistent based on the interface configuration information of each interface in the redundant paired port group, a better implementation method is to detect whether the MTU, simplex mode, working mode, port speed, negotiation speed, IP subnet and VLAN configuration of each interface in the redundant paired port group are consistent.

[0067] If the status of all interfaces in a redundant paired port group is consistent, the redundant paired port group is considered to be in normal status; otherwise, the redundant paired port group is considered to be in abnormal status.

[0068] At this point, an alarm message can be issued to prompt the operations and maintenance engineer to handle the faulty redundant port group in an abnormal state.

[0069] For example, see Figure 2 The diagram shown is a structural schematic of a port state consistency detection device provided in an embodiment of this application. The device includes:

[0070] The acquisition unit 20 is used to acquire the interface information of each network device in the target network, wherein the interface information of a network device includes the interface description information and interface configuration information of each interface of the network device;

[0071] The identification unit 21 is used to identify redundant paired port groups based on the interface description information of each interface of each network device.

[0072] The detection unit 22 is used to detect whether the interface status of each interface included in the redundant paired port group is consistent based on the interface configuration information of each interface included in the redundant paired port group.

[0073] Optionally, when obtaining the interface information of each network device in the target network, the obtaining unit 20 is specifically used for:

[0074] Get the list of network devices in the target network;

[0075] Based on a preset protocol, log in to each network device included in the network device list, and obtain the interface information of each network device from each network device.

[0076] Optionally, if an interface belongs to a redundant paired port group, the interface description information of the interface shall include at least the interface identifier of the interface and the interface identifiers of other peer interfaces that form a redundant paired port group with the interface.

[0077] The interface configuration information for this interface includes at least MTU, simplex / duplex mode, operating mode, port speed, negotiated speed, IP subnet, and VLAN configuration.

[0078] Optionally, the preset protocol is Secure Shell Protocol (SSH) or Telnet Remote Terminal Protocol (Telnet).

[0079] The target network is pre-configured with usernames and passwords for each network device. The username and password for each network device are used to log in to that network device.

[0080] When logging into each network device included in the network device list based on a preset protocol, the acquisition unit 20 is specifically used for:

[0081] Based on the SSH / Telnet protocol, users can log in to the corresponding network device using the username and password associated with each device.

[0082] Optionally, when detecting whether the interface states of the interfaces included in the redundant paired port group are consistent based on the interface configuration information of each interface in the redundant paired port group, the detection unit 22 is specifically used for:

[0083] Check whether the MTU, simplex mode, working mode, port speed, negotiation speed, IP subnet and VLAN configurations of each interface in the redundant paired port group are consistent.

[0084] These units can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more digital signal processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when one of these units is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these units can be integrated together to form a system-on-a-chip (SOC).

[0085] Furthermore, regarding the port state consistency detection device provided in this application embodiment, from a hardware perspective, the hardware architecture diagram of the port state consistency detection device can be found in [reference needed]. Figure 3 As shown, the port status consistency detection device may include: a memory 30 and a processor 31.

[0086] The memory 30 is used to store program instructions; the processor 31 calls the program instructions stored in the memory 30 and executes the above method embodiment according to the obtained program instructions. The specific implementation method and technical effect are similar, and will not be described again here.

[0087] Optionally, this application also provides a port state consistency detection device, including at least one processing element (or chip) for performing the above method embodiments.

[0088] Optionally, this application also provides a program product, such as a computer-readable storage medium storing computer-executable instructions for causing the computer to perform the above-described method embodiments.

[0089] Here, a machine-readable storage medium can be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, a machine-readable storage medium can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.

[0090] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which can take the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet computer, wearable device, or any combination of these devices.

[0091] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.

[0092] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0093] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0094] Furthermore, these computer program instructions can also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in the process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0095] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0096] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for detecting port state consistency, characterized in that, This method, applied to server active-active access scenarios, is executed by a detection server and includes: Obtain a list of network devices in the target network; based on a preset protocol, log in to each network device included in the network device list, and obtain the interface information of each network device. The interface information of a network device includes the interface description information and interface configuration information of each interface of the network device. If an interface belongs to a redundant paired port group, the interface description information of the interface shall at least include the interface identifier of the interface and the interface identifiers of other peer interfaces that form a redundant paired port group with the interface. The interface configuration information of the interface shall at least include MTU, simplex mode, working mode, port speed, negotiated speed, IP subnet and VLAN configuration. Based on the interface description information of each interface of each network device, redundant paired port groups are identified. The redundant paired port groups are logical paired port groups formed by the ports of the same server connected to two different network devices in the dual-active access scenario of the server. For each identified redundant paired port group, based on the interface configuration information of each interface included in the redundant paired port group, it is detected whether the interface status of each interface included in the redundant paired port group is consistent. The consistency detection of the interface status includes a step-by-step comparison of port speed, duplex mode, MTU, VLAN configuration, IP subnet, working mode and negotiated speed. When an inconsistency is detected, an alarm message is generated and pushed to the operation and maintenance management platform.

2. The method as described in claim 1, characterized in that, The preset protocol is either Secure Shell Protocol (SSH) or Telnet Remote Terminal Protocol. The target network is pre-configured with usernames and passwords for each network device. The username and password for each network device are used to log in to that network device. Based on a preset protocol, the steps for logging into each network device in the network device list include: Based on the SSH / Telnet protocol, users can log in to the corresponding network device using the username and password associated with each device.

3. A port status consistency detection device, characterized in that, The detection server is used in a dual-active access scenario for servers, and the device includes: The acquisition unit is used to acquire a list of network devices in the target network; based on a preset protocol, it logs into each network device included in the network device list and acquires the interface information of each network device. The interface information of a network device includes the interface description information and interface configuration information of each interface of the network device. If an interface belongs to a redundant paired port group, the interface description information of the interface includes at least the interface identifier of the interface and the interface identifiers of other peer interfaces that form a redundant paired port group with the interface. The interface configuration information of the interface includes at least MTU, simplex mode, working mode, port speed, negotiation speed, IP subnet and VLAN configuration. The identification unit is used to identify redundant paired port groups based on the interface description information of each interface of each network device. The detection unit is used to detect whether the interface status of each interface in each redundant paired port group is consistent, based on the interface configuration information of each interface in the redundant paired port group.

4. The apparatus as described in claim 3, characterized in that, The preset protocol is either Secure Shell Protocol (SSH) or Telnet Remote Terminal Protocol. The target network is pre-configured with usernames and passwords for each network device. The username and password for each network device are used to log in to that network device. When logging into each network device included in the network device list based on a preset protocol, the acquisition unit is specifically used for: Based on the SSH / Telnet protocol, users can log in to the corresponding network device using the username and password associated with each device.

Citation Information

Patent Citations

  • Method and device for modifying port description

    CN112787839A

  • Link aggregation method and device, computing equipment and computer storage medium

    CN113572695A