CN115378816A - Network configuration detection method, device and storage medium - Google Patents

Network configuration detection method, device and storage medium Download PDF

Info

Publication number
CN115378816A
CN115378816A CN202210923585.9A CN202210923585A CN115378816A CN 115378816 A CN115378816 A CN 115378816A CN 202210923585 A CN202210923585 A CN 202210923585A CN 115378816 A CN115378816 A CN 115378816A
Authority
CN
China
Prior art keywords
detection
detected
local area
node
virtual local
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210923585.9A
Other languages
Chinese (zh)
Other versions
CN115378816B (en
Inventor
郑南成
陈铭祥
何斌
郑家豪
张丽荣
李隆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN202210923585.9A priority Critical patent/CN115378816B/en
Publication of CN115378816A publication Critical patent/CN115378816A/en
Application granted granted Critical
Publication of CN115378816B publication Critical patent/CN115378816B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0866Checking the configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a network configuration detection method, a device and a storage medium, wherein the method comprises the following steps: acquiring virtual local area network configuration information, and forming a plurality of first detection messages of nodes to be detected, which respectively correspond to the virtual local area networks to which the nodes respectively belong, based on the virtual local area network configuration information; respectively sending the first detection messages to a plurality of nodes to be detected at intervals of a certain time length, wherein the first detection messages correspond to the virtual local area networks to which the first detection messages belong; determining a middle node to be tested communicated with a physical link in a plurality of nodes to be tested based on received response messages fed back by the plurality of nodes to be tested; constructing a second detection message based on the middle first detection message corresponding to the middle node to be detected; the second detection message is different from the middle first detection message in that the second detection message contains identification information of a virtual local area network to which the middle node to be detected belongs; and determining a configuration detection result of the virtual local area network to which the intermediate node to be detected belongs based on the second detection message. The timeliness of the detection of the network link configuration is improved.

Description

Network configuration detection method, device and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers and internet, in particular to a network configuration detection method, a network configuration detection device and a storage medium.
Background
In the deployment of the managed cloud, if a client has a requirement such as a special line for a certain cluster, a corresponding Virtual Local Area Network (VLAN) is put through for any one server. Otherwise, the server which is not put through is not connected with the corresponding VLAN network, and network failure is caused. In the related art, a possible problem in the VLAN network can be detected only by a corresponding device after a service has a problem, which results in low timeliness of detecting a network link configuration fault.
Disclosure of Invention
The network configuration detection method, the network configuration detection device and the storage medium provided by the embodiment of the invention can improve the timeliness of the detection of the network link configuration.
The technical scheme of the invention is realized as follows:
the embodiment of the invention provides a network configuration detection method, which is applied to a master control node and comprises the following steps:
acquiring virtual local area network configuration information, and forming a plurality of first detection messages of nodes to be detected, which respectively correspond to the virtual local area networks to which the nodes respectively belong, based on the virtual local area network configuration information;
sending the first detection messages to the multiple nodes to be detected respectively at regular intervals, wherein the first detection messages correspond to the virtual local area networks to which the first detection messages belong;
determining a middle node to be tested communicated with a physical link in the nodes to be tested based on the received response messages fed back by the nodes to be tested;
constructing a second detection message based on the middle first detection message corresponding to the middle node to be detected; the second detection message is different from the middle first detection message in that the second detection message contains identification information of a virtual local area network to which the middle node to be detected belongs;
and determining a configuration detection result of the virtual local area network to which the intermediate node to be detected belongs based on the second detection message.
In the foregoing solution, the obtaining of the configuration information of the virtual local area network and forming, based on the configuration information of the virtual local area network, first detection packets that correspond to the respective virtual local area networks of the plurality of nodes to be detected respectively includes:
acquiring local tunnel network address information and a virtual local area network configuration information set at regular intervals;
and constructing the first detection messages of the multiple nodes to be detected respectively corresponding to the virtual local area networks to which the multiple nodes to be detected respectively belong based on the local tunnel network address information and the virtual local area network configuration information set.
In the foregoing solution, the determining, based on the received response packet fed back by the multiple nodes to be tested, an intermediate node to be tested that is connected by a physical link in the multiple nodes to be tested includes:
receiving a first response message fed back by at least one node to be detected of each virtual local area network in response to the corresponding first detection message;
matching information carried by at least one first response message corresponding to each virtual local area network with information carried by the corresponding first detection messages respectively to determine a first matching result;
if the first matching result represents that the information carried by any first response message of the ith virtual local area network is respectively and correspondingly matched with the information carried by the intermediate first detection message, determining that the node to be detected corresponding to the any first response message is the intermediate node to be detected; i is an integer of 1 or more and N or less.
In the foregoing solution, the constructing a second detection packet based on the middle first detection packet corresponding to the middle node to be detected includes:
and adding the identification information of the ith virtual local area network and a second random serial number to a preset position corresponding to the middle first detection message to form a second detection message of the ith virtual local area network corresponding to the middle node to be detected.
In the foregoing solution, the determining, based on the second detection packet, a configuration detection result of a virtual local area network to which the intermediate node to be detected belongs includes:
sending the corresponding second detection message to the intermediate node to be detected;
receiving a second response message fed back by the intermediate node to be detected in response to the second detection message;
and matching the information carried by the second response message with the information carried by the second detection message to determine the configuration detection result.
In the foregoing solution, the matching information carried in at least one first reply packet corresponding to each virtual local area network with information carried in the corresponding first detection packet includes:
matching the message header information and the at least one third serial number carried by the at least one first response message corresponding to each virtual local area network with local tunnel network address information, at least one node to be tested tunnel network address information corresponding to the virtual local area network and at least one corresponding first random serial number respectively;
the matching of the information carried by the second response message and the information carried by the second detection message includes:
and respectively matching the message header information, the second identification information and at least one fourth serial number carried by the second response message with the local tunnel network address information, the tunnel network address information of the intermediate node to be tested, the identification information of the ith virtual local area network and the second random serial number.
In the foregoing solution, the matching the information carried in the second response packet with the information carried in the second detection packet to determine the detection result includes:
and if the information carried by the second response message is not matched with any item of the information carried by the second detection message, determining the configuration detection result with wrong configuration of the middle node to be detected corresponding to the ith virtual local area network.
In the foregoing solution, before the obtaining the configuration information of the virtual local area network and forming the first detection packets of the multiple nodes to be detected respectively corresponding to the respective virtual local area networks based on the configuration information of the virtual local area network, the method further includes:
and after the system is started, acquiring the information of the main control node from the local, detecting to obtain a detection result that the information of the local equipment is matched with the information of the main control node, and determining that the local equipment is the main control node.
In the foregoing solution, after determining that the configuration detection result of the intermediate node to be detected that is configured incorrectly corresponds to the ith vlan is obtained if any of the information carried in the second response packet and the information carried in the second detection packet is not matched, the method further includes:
and listing the intermediate node to be tested in a fault list so that the intermediate node to be tested is failed to schedule corresponding to the ith virtual local area network.
The embodiment of the invention also provides a network configuration detection method, which is applied to the intermediate node to be detected and comprises the following steps:
receiving a first detection message which is sent by a master control node and corresponds to a virtual local area network to which the master control node belongs; the first detection message is formed by the main control node based on the acquired virtual local area network configuration information;
constructing a corresponding response message based on the first detection message;
and feeding back the corresponding response message to the master control node, so that the master control node determines that a local link is communicated based on the first detection message and the response message, and constructing a corresponding second detection message for determining a configuration detection result of a local virtual local area network.
In the above-mentioned scheme, the first step of the method,
the establishing of the corresponding response message based on the first detection message includes:
modifying a first preset field of the first detection message, and exchanging source and destination tunnel network address information to obtain a corresponding first response message;
the feeding back the corresponding response packet to the master control node includes:
and feeding back the corresponding first response message to the master control node.
In the foregoing solution, after the first response packet corresponding to the first response packet is fed back to the master control node, the method further includes:
receiving a second detection message which is sent by the master control node and corresponds to the virtual local area network;
modifying a second preset field of the second detection message, and exchanging second source and destination tunnel network address information to obtain a corresponding second response message;
and feeding back the corresponding second response message to the master control node.
In the foregoing solution, before the receiving a first detection packet sent by a master control node and corresponding to a virtual local area network to which the master control node belongs, the method further includes:
and after the local device is started, acquiring the information of the main control node from the local device, detecting to obtain a detection result that the information of the second local device is not matched with the information of the main control node, and determining that the local device is the first node to be detected.
The embodiment of the present invention further provides a network configuration detection apparatus, which is applied to a master control node, and includes:
the information acquisition unit is used for acquiring virtual local area network configuration information and forming a plurality of first detection messages of the nodes to be detected, which respectively correspond to the virtual local area networks to which the nodes to be detected belong, based on the virtual local area network configuration information;
a first sending unit, configured to send the first detection packet to the multiple nodes to be detected respectively at intervals of a certain duration, where the first detection packet corresponds to the respective virtual local area network to which the first detection packet belongs;
the determining unit is used for determining a middle node to be tested, communicated by a physical link, in the nodes to be tested based on the received response messages fed back by the nodes to be tested;
the construction unit is used for constructing a second detection message based on the middle first detection message corresponding to the middle node to be detected; the second detection message is different from the middle first detection message in that the second detection message contains identification information of a virtual local area network to which the middle node to be detected belongs;
and the determining unit is used for determining a configuration detection result of the virtual local area network to which the intermediate node to be detected belongs based on the second detection message.
The embodiment of the present invention further provides a network configuration detection apparatus, applied to an intermediate node to be detected, including:
the second receiving unit is used for receiving a first detection message which is sent by the main control node and corresponds to the virtual local area network to which the main control node belongs; the first detection message is formed by the main control node based on the acquired virtual local area network configuration information;
a second constructing unit, configured to construct a corresponding response packet based on the first detection packet;
and the second sending unit is used for feeding back the corresponding response message to the master control node, so that the master control node determines that a local link is communicated based on the first detection message and the response message, and a corresponding second detection message is constructed and used for determining a configuration detection result of a local virtual local area network.
The embodiment of the invention also provides a network configuration detection device, which comprises a first memory and a first processor, wherein the first memory stores a computer program capable of running on the first processor, and the first processor realizes the steps in the method at the side of the main control node when executing the program.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by the first processor, implements the steps in the method on the master node side.
The embodiment of the invention also provides a network configuration detection device, which comprises a second memory and a second processor, wherein the second memory stores a computer program capable of running on the second processor, and the second processor executes the program to realize the steps of the method at the side of the first node to be detected.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a second processor, implements the steps in the method on the side of the first node under test.
In the embodiment of the invention, the configuration information of the virtual local area network is obtained, and a plurality of nodes to be detected are formed to respectively correspond to first detection messages of the virtual local area networks to which the nodes respectively belong on the basis of the configuration information of the virtual local area network; respectively sending the first detection messages to a plurality of nodes to be detected at intervals of a certain length, and corresponding to the first detection messages of the virtual local area networks to which the nodes to be detected respectively belong; determining a middle node to be tested communicated with a physical link in a plurality of nodes to be tested based on received response messages fed back by the plurality of nodes to be tested; constructing a second detection message based on the middle first detection message corresponding to the middle node to be detected; the second detection message is different from the middle first detection message in that the second detection message contains identification information of a virtual local area network to which the middle node to be detected belongs; and determining a configuration detection result of the virtual local area network to which the intermediate node to be detected belongs based on the second detection message. According to the scheme, the main control node sends the first detection message to the node to be detected at regular intervals, and when the link of the middle node to be detected is communicated, the second detection message corresponding to the virtual local area network to which the middle node to be detected belongs can be sent in time, so that the network configuration problem of the node to be detected can be detected quickly, and the timeliness of the detection of the network link configuration is improved.
Drawings
Fig. 1 is a schematic diagram illustrating an alternative effect of a related art according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating an optional effect of the network configuration detection method according to the embodiment of the present invention;
fig. 3 is a schematic diagram illustrating an optional effect of the network configuration detection method according to the embodiment of the present invention;
fig. 4 is a schematic diagram illustrating an optional effect of the network configuration detection method according to the embodiment of the present invention;
fig. 5 is an alternative flowchart of a network configuration detection method according to an embodiment of the present invention;
fig. 6 is an alternative flowchart of a network configuration detecting method according to an embodiment of the present invention;
fig. 7 is an interaction diagram of a network configuration detection method according to an embodiment of the present invention;
fig. 8 is a first schematic structural diagram of a network configuration detection apparatus according to an embodiment of the present invention;
fig. 9 is a first schematic diagram of a hardware entity of the network configuration detection apparatus according to the embodiment of the present invention;
fig. 10 is a schematic structural diagram of a network configuration detecting device according to an embodiment of the present invention;
fig. 11 is a hardware entity diagram of a network configuration detecting apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention are further described in detail with reference to the drawings and the embodiments, the described embodiments should not be construed as limiting the present invention, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
The following description will be added if a similar recitation of "first/second" appears in the patent document, and reference is made in the following description to the term "first/second/third" merely to distinguish between similar objects and not to imply a particular ordering with respect to the objects, it being understood that "first/second/third" may, where permissible, be interchanged in a particular order or sequence to enable the embodiments of the invention described herein to be practiced otherwise than as illustrated or described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to be limiting of the invention.
Illustratively, in conjunction with fig. 1, the network cluster may include: a core network and two switches (switch 1 and switch 2) respectively connected with the core network. The switch 1 is connected with a client resource pool A, and the switch 2 is connected with a client resource pool B. The client resource pool A comprises servers SVR-1, SVR-2, SVR-3 and SVR-4, and the client resource pool B comprises servers SVR-5, SVR-6, SVR-7 and SVR-8. For example, the client resource pool a pulls two private lines, if the upper connection port of the SVR-1 server does not put through the corresponding vlan, at this time, if a virtual machine drifts to the server SVR-1, the two private line networks cannot be accessed, and the client service network is interrupted. In the related art, a possible problem in the VLAN network can be detected only by a corresponding device after a service has a problem, which results in low timeliness of detecting a network link failure.
Referring to fig. 2, a schematic flow chart of an alternative method for detecting network configuration according to an embodiment of the present invention will be described with reference to the steps shown in fig. 2.
S101, obtaining configuration information of the virtual local area network, and forming a plurality of first detection messages of the nodes to be detected, wherein the nodes to be detected respectively correspond to the virtual local area networks to which the nodes belong, based on the configuration information of the virtual local area network.
In the embodiment of the invention, a main control node acquires Virtual Local Area Network (VLAN) configuration information, and forms a plurality of first detection messages of nodes to be detected, which respectively correspond to the respective VLAN to which the nodes belong, based on the VLAN configuration information.
In the embodiment of the invention, after the master control node is started, the master control node detects that the local equipment is the master control node, and then the master control node obtains the configuration information of the virtual local area network from local scanning. The master control node forms a plurality of first detection messages of the to-be-detected nodes corresponding to the virtual local area networks of the to-be-detected nodes respectively based on the configuration information of the virtual local area networks. The master control node can scan locally at preset time intervals to acquire the configuration information of the virtual local area network. At least one virtual local area network to which each node to be tested belongs can be provided.
In the embodiment of the present invention, the master control node and the node to be tested may be any switch or server in the network cluster. After each node in the network cluster is started, the information of the main control node is acquired from the local and matched with the information of the local equipment. And determining the attribute of each node through matching by each node, if the local equipment information of one node is matched with the main control node information, determining that the node is the main control node, and if the local equipment information of another node is not matched with the main control node information, determining that the other node is the node to be tested. The network cluster comprises a main control node and a plurality of nodes to be tested.
For example, the virtual local area network to which any node to be tested belongs may include: VLAN1 and VLAN2. The main control node can construct a first detection message of the VLAN1 corresponding to the node to be detected according to the configuration information of the virtual local area network, and simultaneously construct a first detection message of the VLAN2 corresponding to the node to be detected according to the configuration information of the virtual local area network.
In the embodiment of the present invention, the virtual local area network configuration information includes: the system comprises local tunnel network address information, VLAN lists put through by all virtual local area networks, tunnel port names of master control nodes and tunnel network address information of a plurality of nodes to be tested. Each virtual local area network can correspondingly put through at least one node to be tested, and the nodes to be tested corresponding to the virtual local area networks can be overlapped. The master control node may form, based on the virtual local area network configuration information, first detection packets of the virtual local area networks to which the plurality of nodes to be detected respectively belong, and the master control node may form, based on the virtual local area network configuration information, second detection packets of the virtual local area networks to which the plurality of nodes to be detected respectively belong. The first detection message does not include identification information of a virtual local area network to which the corresponding node to be detected belongs, and the second detection message includes identification information of a virtual local area network to which the corresponding node to be detected belongs.
Both the first detection Message and the second detection Message may be Loop Back Message (LBM).
In the embodiment of the invention, the main control node obtains the main control node information from the local after being started, and the local equipment information and the main control node information are detected to obtain the detection result matched with each other, so that the local equipment is determined to be the main control node.
S102, sending the first detection messages to a plurality of nodes to be detected at intervals of a certain length, and corresponding to the first detection messages of the virtual local area networks to which the nodes to be detected belong.
In the embodiment of the invention, the master control node respectively sends the first detection messages corresponding to the virtual local area networks to which the master control node respectively belongs to a plurality of nodes to be detected at intervals of a fixed time length.
In the embodiment of the invention, the master control node respectively sends the first detection messages corresponding to the virtual local area networks to which the master control node respectively belongs to a plurality of nodes to be detected at intervals of a fixed time length. And each node to be detected forms a corresponding first response message after receiving the first detection message and feeds the first response message back to the main control node. And the main control node matches the information in the first detection message and the first response message. And if the corresponding information is completely matched, the main control node determines that the link of the node to be detected corresponding to the first detection message is normal, and the main control node constructs and sends a second detection message of the node to be detected. And if any information is not correspondingly matched, the main control node determines the detection result of the link abnormity of the node to be detected corresponding to the first detection message, and the main control node cannot send a second detection message of the node to be detected.
In the embodiment of the invention, the main control node sends the corresponding first detection message to each node to be detected, and if any node to be detected does not feed back the corresponding response message, the main control node does not send a subsequent second detection message to the node to be detected. And the main control node determines the detection result of the link fault of the node to be detected.
S103, determining a middle node to be tested which is communicated with a physical link in the nodes to be tested based on the received response messages fed back by the nodes to be tested.
In the embodiment of the invention, the master control node determines the middle node to be tested which is communicated with the physical link in the nodes to be tested based on receiving the response messages fed back by the nodes to be tested.
In the embodiment of the invention, after each node to be detected receives the first detection message which is sent by the main control node and corresponds to the virtual local area network, a response message corresponding to the first detection message is formed. Each node to be detected can feed back a response message corresponding to the received first detection message to the master control node. And the main control node matches the information in the first detection message and the first response message. If all the corresponding information is matched, the main control node determines that the link of the node to be detected corresponding to the first detection message is normal, and further determines that the node to be detected corresponding to the first response message is the middle node to be detected.
For example, the virtual local area network to which any node to be tested belongs may include: VLAN1 and VLAN2. The main control node may send first detection packets corresponding to VLAN1 and VLAN2, respectively, to the node to be detected. The node to be detected forms response messages respectively corresponding to the first detection messages of the VLAN1 and the VLAN2, and the response messages are fed back to the main control node.
The response message may include: loop Back detection Reply (LBR).
Illustratively, in conjunction with fig. 3, the network cluster includes: nodes PE1, PE2, PE3 and PE4. After each node is started, each node judges through the acquired master control node information, and determines that PE1 is a master control node and PE2, PE3 and PE4 are nodes to be detected. The main control node PE1 constructs first detection messages corresponding to the nodes to be detected respectively. The main control node PE1 sends corresponding first detection messages to the PE2, the PE3 and the PE4 respectively. The nodes PE2 and PE3 to be tested feed back the corresponding response messages to the main control node PE1, and PE4 does not feed back the corresponding response messages to the main control node PE1, then the main control node PE1 will continue to send the second message to be tested to the nodes PE2 and PE3 to be tested, and the main control node PE1 will not send the corresponding second message to be tested to the node PE4 to be tested.
S104, constructing a second detection message based on the middle first detection message corresponding to the middle node to be detected; the second detection message is different from the middle first detection message in that the second detection message contains identification information of a virtual local area network to which the middle node to be detected belongs.
In the embodiment of the invention, the main control node constructs a second detection message based on the middle first detection message corresponding to the middle node to be detected; the second detection message is different from the middle first detection message in that the second detection message contains identification information of a virtual local area network to which the middle node to be detected belongs.
In the embodiment of the invention, the main control node matches the first detection message of each node to be detected with the source and destination tunnel network address information and the corresponding random serial number in the corresponding response message, and if all the information are matched, the main control node determines the normal detection result of the link of the node to be detected. The main control node adds the identification information of the virtual local area network to the first detection message of the middle to-be-detected contact point with a normal link to form a corresponding second detection message.
And S105, determining a configuration detection result of the virtual local area network to which the intermediate node to be detected belongs based on the second detection message.
In the embodiment of the invention, the main control node determines the configuration detection result of the virtual local area network to which the middle node to be detected belongs based on the second detection message.
In the embodiment of the invention, the main control node sends a second detection message to the intermediate node to be detected and receives a second response message fed back by the intermediate node to be detected, and the main control node determines the configuration detection result of the virtual local area network to which the intermediate node to be detected belongs according to the matching result of the second detection message and the second response message.
In the embodiment of the invention, under the condition that the link of the intermediate node to be detected is normal, the main control node sends the second detection message corresponding to the virtual local area network to the intermediate node to be detected, and the intermediate node to be detected feeds back the second response message corresponding to the second detection message to the main control node. And the main control node matches the second detection message with the source and destination tunnel network address information, the local area network identification information and the corresponding random serial number in the corresponding second response message, and if all the information are matched, the main control node determines that the virtual local area network to which the node to be detected belongs is configured with a normal detection result. And if any information is not correspondingly matched, the main control node determines the detection result of the configuration error of the virtual local area network to which the node to be detected belongs.
In the embodiment of the invention, the configuration information of the virtual local area network is obtained, and a plurality of nodes to be detected are formed to respectively correspond to first detection messages of the virtual local area networks to which the nodes respectively belong on the basis of the configuration information of the virtual local area network; respectively sending the first detection messages to a plurality of nodes to be detected at intervals of a certain length, and corresponding to the first detection messages of the virtual local area networks to which the nodes to be detected respectively belong; determining a middle node to be tested communicated with a physical link in a plurality of nodes to be tested based on received response messages fed back by the plurality of nodes to be tested; constructing a second detection message based on the middle first detection message corresponding to the middle node to be detected; the second detection message is different from the middle first detection message in that the second detection message contains identification information of a virtual local area network to which the middle node to be detected belongs; and determining a configuration detection result of the virtual local area network to which the intermediate node to be detected belongs based on the second detection message. According to the scheme, the main control node sends the first detection message to the node to be detected at regular intervals, and when the link of the middle node to be detected is communicated, the second detection message corresponding to the virtual local area network to which the middle node to be detected belongs can be sent in time, so that the network configuration problem of the node to be detected can be detected quickly, and the timeliness of network link configuration detection is improved.
In some embodiments, S101 shown in fig. 2 can also be implemented through S106 to S107, which will be described in conjunction with each step.
And S106, acquiring local tunnel network address information and a virtual local area network configuration information set at regular intervals.
In the embodiment of the invention, the main control node acquires the local tunnel network address information and the virtual local area network configuration information set at regular intervals.
In the embodiment of the invention, the configuration information in the main control node is configured by an operator and can change at certain intervals, so that the main control node needs to acquire the address information of the local tunnel network and a new virtual local area network configuration information set at certain intervals.
Wherein, the virtual local area network configuration information set comprises: identification information of N virtual local area networks and tunnel network address information of at least one node to be tested corresponding to each virtual local area network; n is an integer of 1 or more.
The certain duration of the interval for sending the first detection message by the master control node may be the same as or different from the certain duration of the interval for obtaining the local tunnel network address information and the virtual local area network configuration information set.
S107, based on the local tunnel network address information and the virtual local area network configuration information set, a plurality of first detection messages of the nodes to be detected, which respectively correspond to the virtual local area networks to which the nodes to be detected belong, are constructed.
In the embodiment of the invention, the main control node constructs a plurality of first detection messages of the nodes to be detected, which respectively correspond to the virtual local area networks to which the nodes to be detected belong, based on the local tunnel network address information and the virtual local area network configuration information set.
In the embodiment of the invention, a master control node combines local tunnel network address information, tunnel network address information of at least one node to be detected corresponding to an ith virtual local area network and at least one first random serial number to form first detection messages of at least one node to be detected corresponding to the ith virtual local area network respectively until first detection messages corresponding to at least one node to be detected of an Nth virtual local area network are formed; i is an integer of 1 or more and less than N.
The master control node may also add, to a predetermined location corresponding to each of the at least one first detection packet of the ith virtual local area network, the identification information and the second random sequence number of the ith virtual local area network to form a second detection packet in which at least one node to be detected corresponds to each of the ith virtual local area network, until a second detection packet in which at least one node to be detected of the nth virtual local area network corresponds to each of the at least one node to be detected is formed.
In the embodiment of the invention, the main control node combines the local tunnel network address information, the tunnel network address information of at least one node to be detected corresponding to each virtual local area network and at least one first random serial number to form a first detection message of at least one node to be detected corresponding to each virtual local area network respectively. The main control node combines the local tunnel network address information, the identification information of each virtual local area network, the tunnel network address information of at least one node to be detected corresponding to each virtual local area network and at least one second random serial number to form a second detection message of at least one node to be detected corresponding to each virtual local area network respectively.
Illustratively, in conjunction with fig. 3, the network cluster includes: the system comprises a main control node PE1 and nodes to be tested PE2, PE3 and PE4. The configuration information of the virtual local area network collectively represents that the virtual local area network VLAN1 corresponds to nodes PE2 and PE3 to be tested, and the virtual local area network VLAN2 corresponds to the nodes PE3 and PE4 to be tested. The main control node combines the local tunnel network address information, the PE2 tunnel network address information and a first random serial number to form a first detection message of the PE2 corresponding to the VLAN 1. The main Control node inserts the identification information of the VLAN1 behind a Media Access Control Address (MAC) of a source tunnel network of a first detection message of the VLAN1 corresponding to the PE2, and inserts a second random serial number at a predetermined position to form a second detection message of the VLAN1 corresponding to the PE 2. The main control node combines the local tunnel network address information, the PE3 tunnel network address information and a first random serial number to form a first detection message of the PE3 corresponding to the VLAN 1. The main control node inserts the identification information of VLAN1 behind the source MAC address of the first detection message of VLAN1 corresponding to PE3, and inserts a second random serial number at a preset position to form a second detection message of VLAN1 corresponding to PE 3. The main control node combines the local tunnel network address information, the PE3 tunnel network address information and a first random serial number to form a first detection message of the PE3 corresponding to the VLAN2. The main control node inserts the identification information of VLAN2 behind the source MAC address of the first detection message of VLAN2 corresponding to PE3, and inserts a second random serial number at a preset position to form a second detection message of VLAN2 corresponding to PE 3. The main control node combines the local tunnel network address information, the PE4 tunnel network address information and a first random serial number to form a first detection message of the PE4 corresponding to the VLAN2. The main control node inserts the identification information of VLAN2 behind the source MAC address of the first detection message of VLAN2 corresponding to PE4, and inserts a second random serial number at a preset position to form a second detection message of VLAN2 corresponding to PE4.
The first random serial number and the second random serial number can be any randomly formed number combination.
In the embodiment of the invention, because the first detection message and the second detection message are constructed based on the local area network configuration information, the relevance of the first detection message and the second detection message to the local area network corresponding to each node to be detected is stronger, and when a network link fault occurs, the fault reason can be rapidly detected through the two detection messages.
In some embodiments, S103 shown in fig. 2 can also be implemented through S108 to S110, which will be described in conjunction with each step.
S108, receiving a first response message fed back by at least one node to be detected of each virtual local area network in response to the corresponding first detection message.
In the embodiment of the invention, the master control node receives the first response message fed back by at least one node to be detected of each virtual local area network in response to the corresponding first detection message.
For example, the main control node may receive a first response packet fed back by a first detection packet of the node PE2 to be detected corresponding to the VLAN 1. The main control node may receive a first response packet fed back by a first detection packet of the node PE3 to be detected corresponding to the VLAN 1. The main control node may receive a first response packet fed back by a first detection packet of the node PE3 to be detected corresponding to the VLAN2. The main control node may receive a first response packet fed back by a first detection packet of the to-be-detected node PE4 corresponding to the VLAN2.
S109, matching the information carried by at least one first response message corresponding to each virtual local area network with the information carried by the corresponding first detection messages respectively, and determining a first matching result.
In the embodiment of the invention, the main control node matches the information carried by at least one first response message corresponding to each virtual local area network with the information carried by the corresponding first detection messages respectively to determine a first matching result.
In the embodiment of the invention, the master control node respectively matches the message header information and at least one third serial number carried by at least one first response message corresponding to each virtual local area network with the local tunnel network address information, at least one to-be-tested node tunnel network address information corresponding to the virtual local area network and at least one corresponding first random serial number to determine a first matching result.
S110, if the first matching results represent that the information carried by any first response message of the ith virtual local area network is correspondingly matched with the information carried by the middle first detection message respectively, determining that the node to be detected corresponding to any first response message is the middle node to be detected.
In the embodiment of the invention, if the first matching result represents that the information carried by any first response message of the ith virtual local area network is respectively and correspondingly matched with the information carried by the middle first detection message, the main control node determines that the node to be detected corresponding to any first response message is the middle node to be detected.
In the embodiment of the invention, if the first matching result represents that the information carried by any first response message of the ith virtual local area network is not matched with any item of the information carried by the corresponding first detection message, the main control node determines the detection result of the link fault of the node to be detected corresponding to any first response message. According to the scheme, the main control node sends the first detection message to the node to be detected at regular intervals, so that the link problem of the node to be detected can be detected in time after the network link of the node to be detected fails, and the timeliness of detecting the network link failure is improved.
In some embodiments, S103 shown may be implemented by S111 to S114 later, and the description will be made with reference to each step.
And S111, adding identification information and a second random sequence number of the ith virtual local area network to a preset position corresponding to the middle first detection message to form a second detection message of the ith virtual local area network corresponding to the middle node to be detected.
In the embodiment of the invention, the main control node adds the identification information of the ith virtual local area network and the second random serial number to the preset position corresponding to the middle first detection message to form the second detection message of the ith virtual local area network corresponding to the middle node to be detected.
And S112, sending a corresponding second detection message to the middle node to be detected.
In the embodiment of the invention, the main control node sends the corresponding second detection message to the middle node to be detected.
And S113, receiving a second response message fed back by the middle node to be detected in response to the second detection message.
In the embodiment of the invention, the main control node receives a second response message fed back by at least one node to be detected of the ith virtual local area network in response to a respective corresponding second detection message.
S114, matching the information carried by the second response message with the information carried by the second detection message to determine a configuration detection result.
In the embodiment of the invention, the master control node respectively matches the message header information, the second identification information and at least one fourth serial number carried by the second response message with the local tunnel network address information, the intermediate node to be detected tunnel network address information, the identification information of the ith virtual local area network and the second random serial number.
In the embodiment of the invention, if the information carried by the second response message is not matched with any item of the information carried by the second detection message, the main control node determines the detection result of the configuration error of the middle node to be detected corresponding to the ith virtual local area network.
In the embodiment of the invention, the master control node lists the middle node to be tested in the fault list so that the middle node to be tested fails to schedule the ith virtual local area network.
For example, please refer to fig. 4. The network cluster can comprise: the switch and its connected servers HCI (Hyper Converged Infrastructure, HCI) 201, HCI202 and HCI203. VLANs in a network cluster may include traffic VLANs and leased line VLANs. The server HCI201 may serve as a master node, and the server HCI201 sends an OAM (Operation, administration, and Management) LBM message to other nodes to be tested. The server HCI202 and the server HCI203 are used as nodes to be tested to start service monitoring OAM LBM messages.
The Virtual Local Area Network (VLAN) is a group of logical devices and users, the devices and the users are not limited by physical positions, the devices and the users can be organized according to factors such as functions, departments, applications and the like, and the devices and the users communicate with each other as if the devices and the users are in the same network segment, so that the VLAN is obtained.
1. The OAM protocol is specially used for fault management of a two-layer network, and has wide and mature application in an operator network, so that the idea of the OAM protocol can be used for reference in a managed cloud network, and fault detection and fault diagnosis can be performed by utilizing the characteristics of the OAM protocol.
2. The HCI server supports an OAM function (a conventional OAM function is generally implemented by a hardware chip) by implementing a tool or a feature through software, a transmitting/detecting end is used to transmit an OAM detection message, and a receiving end is used to monitor and respond to the OAM message.
3. In the embodiment of the invention, the main control node utilizes the ethping (namely loopback) function of OAM to realize VLAN configuration error detection, namely the VLAN configuration error detection can be realized without the VLAN tag, and the VLAN tag can be used as a judgment condition for VLAN configuration error when the VLAN tag is not connected.
4. In the embodiment of the invention, the main control node can rapidly determine that the VLAN configuration is mistakenly and leaked and rapidly demarcated to a single physical path by utilizing the physical path passed by the ethping detection of the OAM.
In the scheme, the main control node sends the corresponding second detection message to the node to be detected after the link of the corresponding node is normal, so that the local area network configuration problem of the node to be detected can be detected in time after the local area network configuration of the node to be detected is wrong, and the timeliness of detecting the network link fault is further improved.
Referring to fig. 5, a schematic flow chart of an alternative method for detecting network configuration according to an embodiment of the present invention will be described with reference to the steps shown in fig. 5.
S301, starting oam _ detector service.
In the embodiment of the invention, each HCI server in the network cluster starts OAM detection service (OAM _ detector).
S302, whether the node is the master control node or not.
In the embodiment of the invention, each HCI server obtains the information of the main control node through API (vtpsh get/cluster/hosts/master/info). Each HCI server obtains the name of the main control node, compares the name with the name of the current system, and if the names are the same, the HCI server is judged to be the main control node. If not, the node is judged to be the node to be tested.
S303, acquiring the service network port name of the node.
S304, start dot1agd listening service.
In the embodiment of the invention, the node to be tested detects that the local equipment is a non-master control node, acquires the network port name of the tunnel network of the node, and starts OAM message monitoring service (dot 1 agd).
S305, obtaining a VLAN list for putting through the cluster service network port, the name of the tunnel network port of the main control node and the MAC address of the tunnel network port of other nodes of the cluster.
In the embodiment of the invention, if the node is a master control node, network configuration is periodically scanned, and a VLAN list put through by a cluster service network port, the name of a tunnel network port of the master control node and the MAC address of other cluster nodes are obtained.
S306, starting ethping detection service.
In the embodiment of the invention, a master control node starts an ethping service, constructs an OAM LBM message by taking the network port MAC address of a tunnel network at a local end as a source MAC address and the network port MAC address of a tunnel network at a target node as a target MAC address, writes a VLAN tag into a message header if the detection message needs to carry the VLAN tag, does not write if the detection message does not need to carry the VLAN tag, and finally sends the message to the target node in parallel.
OAM message monitoring service (dot 1 agd) of the node to be tested monitors OAM LBM message, modifies message type into LBR (LBM message response), exchanges source MAC address and destination MAC address of the message at the same time, and sends back the message in original path.
And S307, judging whether the untag link is connected or not.
The main control node ethping service receives an LBR message of a node to be detected, validity check is carried out on the message (whether the message heads are matched or not is checked, whether the sequence number is consistent with the LBM or not is mainly checked under the condition without the VLAN tag or not, whether the VLAN tag is consistent with the LBM or not needs to be judged if the message is detected to be provided with the VLAN tag or not is checked), correct response is considered to be received if the check is passed, and the node to be detected can Ping communication; and if the correct LBR message is not received after the preset time (default is 1 second), the ethping request is considered to be overtime, and the node Ping to be detected is not passed.
And S308, link failure.
If the master control node finds that the detection message of a certain node without the VLAN tag can not be Ping passed, the link fault of the node to be detected can be diagnosed.
S309, the link is normal.
If the main control node finds that the detection message of a certain node without the VLAN tag can Ping pass, the link of the node to be detected is diagnosed to be normal.
And S310, judging whether the link with the VLAN tag is connected or not.
S311, configuration error.
If the main control node detects that the detection message without the VLAN tag can be Ping connected and the detection message with the VLAN tag is not connected, the main control node can diagnose that the VLAN is not connected and generates alarm information to inform operation and maintenance personnel to position and repair the fault as soon as possible.
The main control node can add the physical machine generating the alarm into the sub-health list, and the virtual machine is prevented from being scheduled. The working personnel can rapidly locate the root cause of the configuration fault and leakage problem and rapidly modify the configuration according to the fault alarm prompt and the VLAN release configuration of the single physical link is checked, so that the fault recovery is realized.
And S312, correct configuration.
If the detection message without the VLAN tag can be Ping-pass and the detection message with the VLAN tag can be Ping-pass, the VLAN configuration is diagnosed to be correct.
In the embodiment of the invention, the main control node realizes the ethping function of OAM by using software, quickly finds the problem of VLAN configuration error and leakage, realizes minute-level fault delimitation and fault recovery, and solves the problem of managed cloud network faults.
Referring to fig. 6, a schematic flow chart of an alternative method for detecting network configuration according to an embodiment of the present invention will be described with reference to the steps shown in fig. 6.
S201, receiving a first detection message which is sent by a main control node and corresponds to a virtual local area network to which the main control node belongs; the first detection message is formed by the main control node based on the acquired virtual local area network configuration information.
In the embodiment of the invention, an intermediate node to be detected receives a first detection message which is sent by a main control node and corresponds to a virtual local area network to which the intermediate node to be detected belongs; the first detection message is formed by the main control node based on the acquired virtual local area network configuration information.
In the embodiment of the invention, the intermediate node to be tested obtains the information of the main control node from the local after being started, and the detection result that the information of the second local device is not matched with the information of the main control node is obtained through detection, so that the local device is determined to be the intermediate node to be tested.
S202, constructing a corresponding response message based on the first detection message.
In the embodiment of the invention, the intermediate node to be detected constructs the corresponding response message based on the first detection message.
And S203, feeding back a corresponding response message to the master control node, so that the master control node determines that a local link is communicated based on the first detection message and the response message, and constructing a corresponding second detection message for determining a configuration detection result of a local virtual local area network.
In the embodiment of the invention, the intermediate node to be detected feeds back the corresponding response message to the main control node, so that the main control node determines that the local link is communicated based on the first detection message and the response message, and constructs the corresponding second detection message for determining the configuration detection result of the local virtual local area network.
In the embodiment of the invention, an intermediate node to be detected receives a first detection message which is sent by a master control node and corresponds to a virtual local area network to which the intermediate node belongs; modifying a first preset field of the first detection message, and exchanging the network address information of the source tunnel and the destination tunnel to obtain a corresponding first response message; and feeding back the corresponding first response message to the master control node.
In the embodiment of the invention, the intermediate node to be detected receives a second detection message which is sent by the master control node and corresponds to the virtual local area network to which the intermediate node to be detected belongs; modifying a second preset field of the second detection message, and exchanging network address information of a second source tunnel and a second destination tunnel to obtain a corresponding second response message; and feeding back the corresponding second response message to the master control node.
According to the scheme, the main control node sends the first detection message to the node to be detected at regular intervals, and when the link of the middle node to be detected is communicated, the second detection message corresponding to the virtual local area network to which the middle node to be detected belongs can be sent in time, so that the network configuration problem of the node to be detected can be detected quickly, and the timeliness of network link configuration detection is improved.
In some embodiments, referring to fig. 7, fig. 7 is an interaction schematic diagram of a network configuration detection method provided by an embodiment of the present invention, and the interaction schematic diagram will be described with reference to steps.
S401, the main control node obtains the configuration information of the virtual local area network, and forms a plurality of first detection messages of the nodes to be detected, which respectively correspond to the virtual local area networks to which the nodes to be detected belong, based on the configuration information of the virtual local area network.
The specific implementation process of S401 may refer to S101, which is not described herein.
S402, the main control node respectively sends the first to-be-detected nodes at intervals of a certain time length, and the first to-be-detected nodes correspond to first detection messages of virtual local area networks to which the main control node respectively belongs.
The specific implementation process of S402 may refer to S102, which is not described herein.
And S403, the main control node determines the middle node to be tested, which is communicated with the physical links in the plurality of nodes to be tested, based on receiving the response message fed back by the middle node to be tested.
The specific implementation process of S403 may refer to S103, which is not described herein.
S404, the main control node constructs a second detection message based on the middle first detection message corresponding to the middle node to be detected; the second detection message is different from the middle first detection message in that the second detection message contains identification information of a virtual local area network to which the middle node to be detected belongs.
The specific implementation process of S404 may refer to S104, which is not described herein.
S405, the main control node determines a configuration detection result of the virtual local area network to which the middle node to be detected belongs based on the second detection message.
The specific implementation process of S405 may refer to S105, which is not described herein.
Referring to fig. 8, fig. 8 is a first schematic structural diagram of a network configuration detecting device according to an embodiment of the present invention.
An embodiment of the present invention further provides a network configuration detection apparatus 800, which is applied to a master control node, and includes: an information acquisition unit 803, a first transmission unit 804, a determination unit 805, and a construction unit 806.
An information obtaining unit 803, configured to obtain virtual local area network configuration information, and form, based on the virtual local area network configuration information, first detection packets that correspond to multiple nodes to be detected respectively and to the virtual local area networks to which the nodes respectively belong;
a first sending unit 804, configured to send the first detection packets to the multiple nodes to be detected respectively at regular intervals, where the first detection packets correspond to the respective virtual local area networks;
a determining unit 805, configured to determine, based on the received response messages fed back by the multiple nodes to be tested, a middle node to be tested, where physical links of the multiple nodes to be tested are communicated with each other;
a constructing unit 806, configured to construct a second detection packet based on the intermediate first detection packet corresponding to the intermediate node to be detected; the second detection message is different from the middle first detection message in that the second detection message contains identification information of a virtual local area network to which the middle node to be detected belongs;
a determining unit 805, configured to determine, based on the second detection packet, a configuration detection result of the virtual local area network to which the intermediate node to be detected belongs.
In this embodiment of the present invention, the information obtaining unit 803 in the network configuration detecting apparatus 800 is configured to obtain local tunnel network address information and a virtual local area network configuration information set at regular intervals; and constructing the first detection messages of the multiple nodes to be detected respectively corresponding to the virtual local area networks to which the multiple nodes to be detected respectively belong based on the local tunnel network address information and the virtual local area network configuration information set.
In this embodiment of the present invention, the determining unit 805 in the network configuration detecting apparatus 800 is configured to receive a first response packet fed back by at least one node to be detected of each virtual local area network in response to the respective corresponding first detection packet;
matching information carried by at least one first response message corresponding to each virtual local area network with information carried by the corresponding first detection messages respectively to determine a first matching result;
if the first matching result represents that the information carried by any first response message of the ith virtual local area network is respectively and correspondingly matched with the information carried by the intermediate first detection message, determining that the node to be detected corresponding to the any first response message is the intermediate node to be detected; i is an integer of 1 or more and N or less.
In this embodiment of the present invention, the constructing unit 806 in the network configuration detecting apparatus 800 is configured to add, to the predetermined position corresponding to the middle first detection packet, the identification information of the ith virtual local area network and the second random sequence number to form a second detection packet corresponding to the ith virtual local area network by the middle node to be detected.
In this embodiment of the present invention, the determining unit 805 in the network configuration detecting apparatus 800 is configured to send the corresponding second detection packet to the intermediate node to be detected;
receiving a second response message fed back by the intermediate node to be detected in response to the second detection message;
and matching the information carried by the second response message with the information carried by the second detection message to determine the configuration detection result.
In this embodiment of the present invention, the determining unit 805 in the network configuration detecting apparatus 800 is configured to match, respectively, the packet header information and the at least one third serial number carried in the at least one first reply packet corresponding to each virtual local area network with the local tunnel network address information, the at least one tunnel network address information of the node to be tested corresponding to the virtual local area network, and the corresponding at least one first random serial number;
the matching of the information carried by the second response message and the information carried by the second detection message includes:
and matching the message header information, the second identification information and at least one fourth serial number carried by the second response message with the local tunnel network address information, the tunnel network address information of the intermediate node to be detected, the identification information of the ith virtual local area network and the second random serial number respectively.
In this embodiment of the present invention, the determining unit 805 in the network configuration detecting apparatus 800 is configured to determine the configuration detection result of the configuration error of the intermediate node to be detected corresponding to the ith virtual local area network, if the information carried in the second response packet does not match any item of the information carried in the second detection packet.
In this embodiment of the present invention, the information obtaining unit 803 in the network configuration detecting apparatus 800 is configured to obtain, after being started, the information of the main control node from the local, detect a detection result that the information of the local device matches the information of the main control node, and determine that the local device is the main control node.
In this embodiment of the present invention, the network configuration detecting apparatus 800 is configured to list the intermediate node to be tested in a fault list, so that the intermediate node to be tested fails to schedule the ith virtual local area network.
In this embodiment of the present invention, the information obtaining unit 803 is configured to obtain configuration information of a virtual local area network, and form, based on the configuration information of the virtual local area network, first detection messages that correspond to a plurality of nodes to be detected respectively and to the virtual local area networks to which the nodes belong; a first sending unit 804, configured to send, to each of the multiple nodes to be detected, a first detection message corresponding to a respective virtual local area network at a certain time interval; the determining unit 805 is configured to determine, based on the received response messages fed back by the multiple nodes to be tested, an intermediate node to be tested, where physical links of the multiple nodes to be tested are communicated; the constructing unit 806 is configured to construct a second detection packet based on the intermediate first detection packet corresponding to the intermediate node to be detected; the second detection message is different from the middle first detection message in that the second detection message contains identification information of a virtual local area network to which the middle node to be detected belongs; the determining unit 805 is configured to determine, based on the second detection packet, a configuration detection result of a virtual local area network to which the intermediate node to be detected belongs. According to the scheme, the main control node sends the first detection message to the node to be detected at regular intervals, and when the link of the middle node to be detected is communicated, the second detection message corresponding to the virtual local area network to which the middle node to be detected belongs can be sent in time, so that the network configuration problem of the node to be detected can be detected quickly, and the timeliness of network link configuration detection is improved.
It should be noted that, in the embodiment of the present invention, if the network configuration detection method is implemented in the form of a software functional module and is sold or used as a standalone product, the network configuration detection method may also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a network configuration detecting device (which may be a personal computer or the like) to perform all or part of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, or an optical disk. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
Correspondingly, the embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the above-mentioned method.
Correspondingly, the embodiment of the present invention provides a network configuration detecting apparatus 800, which includes a first memory 802 and a first processor 801, where the first memory 802 stores a computer program that is executable on the first processor 801, and the first processor 801 implements the steps in the method when executing the computer program.
Here, it should be noted that: the above description of the storage medium and apparatus embodiments is similar to the description of the method embodiments above, with similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and the apparatus according to the invention, reference is made to the description of the embodiments of the method according to the invention.
It should be noted that fig. 9 is a schematic diagram of a hardware entity of a network configuration detecting apparatus according to an embodiment of the present invention, as shown in fig. 9, the hardware entity of the network configuration detecting apparatus 800 includes: a first processor 801 and a first memory 802, wherein;
the first processor 801 generally controls the overall operation of the network configuration detection apparatus 800.
The first Memory 802 is configured to store instructions and applications executable by the first processor 801, and may also buffer data (e.g., image data, audio data, voice communication data, and video communication data) to be processed or already processed by each module in the first processor 801 and the network configuration detection apparatus 800, and may be implemented by a FLASH Memory (FLASH) or a Random Access Memory (RAM).
Referring to fig. 10, fig. 10 is a schematic structural diagram of a network configuration detecting device according to an embodiment of the present invention.
The embodiment of the present invention further provides a network configuration detection apparatus 900, which is applied to an intermediate node to be detected, and includes: a second receiving unit 903, a second constructing unit 904 and a second transmitting unit 905.
A second receiving unit 903, configured to receive a first detection message sent by the master node and corresponding to the virtual local area network to which the master node belongs; the first detection message is formed by the main control node based on the acquired virtual local area network configuration information;
a second constructing unit 904, configured to construct a corresponding response packet based on the first detection packet;
a second sending unit 905, configured to feed back the corresponding response packet to the main control node, so that the main control node determines that a local link is connected based on the first detection packet and the response packet, so as to construct a corresponding second detection packet, where the second detection packet is used to determine a configuration detection result of a local virtual local area network.
In this embodiment of the present invention, the second receiving unit 903 in the network configuration detecting apparatus 900 is configured to receive a first detection packet, which is sent by the main control node and corresponds to the virtual local area network to which the main control node belongs; in this embodiment of the present invention, the second constructing unit 904 in the network configuration detecting apparatus 900 is configured to modify the first predetermined field of the first detection packet, and exchange source and destination tunnel network address information to obtain a corresponding first response packet; in this embodiment of the present invention, the second sending unit 905 in the network configuration detecting apparatus 900 is configured to feed back the corresponding first response packet to the master node.
In this embodiment of the present invention, a second receiving unit 903 in the network configuration detecting apparatus 900 is configured to receive a second detection packet, which is sent by the main control node and corresponds to the virtual local area network to which the main control node belongs; the second constructing unit 904 is configured to modify a second predetermined field of the second detection packet, and exchange second source and destination tunnel network address information to obtain a corresponding second response packet; the second sending unit 905 is configured to feed back the corresponding second response packet to the main control node.
In this embodiment of the present invention, the network configuration detecting apparatus 900 is configured to obtain the information of the master control node from the local after being turned on, detect that the information of the second local device is not matched with the information of the master control node, and determine that the local device is the first node to be detected.
In the embodiment of the present invention, the second receiving unit 903 is configured to receive a first detection packet, which is sent by the main control node and corresponds to the virtual local area network to which the main control node belongs; the first detection message is formed by the main control node based on the acquired virtual local area network configuration information; a second constructing unit 904, configured to construct a corresponding response packet based on the first detection packet; a second sending unit 905, configured to feed back the corresponding response packet to the master node, so that the master node determines that a local link is connected based on the first detection packet and the response packet, so as to construct a corresponding second detection packet and use the second detection packet to determine a configuration detection result of a local virtual local area network. According to the scheme, the main control node sends the first detection message to the node to be detected at regular intervals, and when the link of the middle node to be detected is communicated, the second detection message corresponding to the virtual local area network to which the middle node to be detected belongs can be sent out in time, so that the network configuration problem of the node to be detected can be detected quickly, and the timeliness of network link configuration detection is improved.
Correspondingly, an embodiment of the present invention provides a network configuration detecting apparatus 900, which includes a second memory 902 and a second processor 901, where the second memory 902 stores a computer program that is executable on the second processor 901, and the second processor 901 implements the steps in the above method when executing the computer program.
It is to be noted here that: the above description of the storage medium and apparatus embodiments, similar to the description of the method embodiments above, have similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and the apparatus according to the invention, reference is made to the description of the embodiments of the method according to the invention.
It should be noted that fig. 11 is a schematic diagram of a hardware entity of a network configuration detection apparatus according to an embodiment of the present invention, as shown in fig. 11, the hardware entity of the network configuration detection apparatus 900 includes: a second processor 901 and a second memory 902, wherein;
the second processor 901 generally controls the overall operation of the network configuration detection apparatus 900.
The second Memory 902 is configured to store instructions and applications executable by the second processor 901, and may also buffer data (e.g., image data, audio data, voice communication data, and video communication data) to be processed or already processed by each module in the second processor 901 and the network configuration detection apparatus 900, and may be implemented by a FLASH Memory (FLASH) or a Random Access Memory (RAM).
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present invention, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention. The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. The above-described device embodiments are merely illustrative, for example, the division of the unit is only one logical functional division, and other division ways may be implemented in practice, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps of implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer-readable storage medium, and when executed, executes the steps including the method embodiments; and the aforementioned storage medium includes: various media capable of storing program codes, such as a removable storage device, a Read Only Memory (ROM), a magnetic disk, and an optical disk.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media that can store program codes, such as a removable storage device, a ROM, a magnetic disk, or an optical disk.
The above description is only an embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present invention, and all such changes or substitutions are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (12)

1. A network configuration detection method is applied to a master control node, and comprises the following steps:
acquiring virtual local area network configuration information, and forming a plurality of first detection messages of nodes to be detected, which respectively correspond to the virtual local area networks to which the nodes respectively belong, based on the virtual local area network configuration information;
sending the first detection messages to the multiple nodes to be detected at regular intervals, wherein the first detection messages correspond to the first detection messages of the virtual local area networks to which the nodes to be detected belong;
determining a middle node to be tested in the plurality of nodes to be tested, wherein the middle node to be tested is communicated with a physical link in the plurality of nodes to be tested, based on the received response messages fed back by the plurality of nodes to be tested;
constructing a second detection message based on the middle first detection message corresponding to the middle node to be detected; the second detection message is different from the middle first detection message in that the second detection message contains identification information of a virtual local area network to which the middle node to be detected belongs;
and determining a configuration detection result of the virtual local area network to which the intermediate node to be detected belongs based on the second detection message.
2. The method according to claim 1, wherein the obtaining of the vlan configuration information and the forming of the first detection packet corresponding to each of the vlans to which the plurality of nodes to be detected belong based on the vlan configuration information comprises:
acquiring local tunnel network address information and a virtual local area network configuration information set at regular intervals;
and constructing the first detection messages of the multiple nodes to be detected respectively corresponding to the virtual local area networks to which the multiple nodes to be detected respectively belong based on the local tunnel network address information and the virtual local area network configuration information set.
3. The method according to claim 1, wherein the determining, based on the received response packets fed back by the multiple nodes to be tested, an intermediate node to be tested whose physical links are connected among the multiple nodes to be tested comprises:
receiving a first response message fed back by at least one node to be detected of each virtual local area network in response to the corresponding first detection message;
matching information carried by at least one first response message corresponding to each virtual local area network with information carried by the corresponding first detection messages respectively to determine a first matching result;
if the first matching result represents that the information carried by any first response message of the ith virtual local area network is respectively and correspondingly matched with the information carried by the intermediate first detection message, determining that the node to be detected corresponding to the any first response message is the intermediate node to be detected; i is an integer greater than or equal to 1.
4. The method according to claim 3, wherein the constructing a second detection packet based on the intermediate first detection packet corresponding to the intermediate node to be detected includes:
and adding the identification information of the ith virtual local area network and a second random serial number to a preset position corresponding to the intermediate first detection message to form a second detection message of the ith virtual local area network corresponding to the intermediate node to be detected.
5. The method according to claim 4, wherein the determining, based on the second detection packet, the configuration detection result of the virtual local area network to which the intermediate node to be detected belongs includes:
sending the corresponding second detection message to the intermediate node to be detected;
receiving a second response message fed back by the intermediate node to be detected in response to the second detection message;
and matching the information carried by the second response message with the information carried by the second detection message to determine the configuration detection result.
6. The method according to claim 5, wherein the matching information carried in at least one first reply packet corresponding to each of the virtual local area networks with information carried in the corresponding first detection packet includes:
matching the message header information and the at least one third serial number carried by the at least one first response message corresponding to each virtual local area network with local tunnel network address information, at least one node to be tested tunnel network address information corresponding to the virtual local area network and at least one corresponding first random serial number respectively;
the matching of the information carried in the second response message and the information carried in the second detection message includes:
and matching the message header information, the second identification information and at least one fourth serial number carried by the second response message with the local tunnel network address information, the tunnel network address information of the intermediate node to be detected, the identification information of the ith virtual local area network and the second random serial number respectively.
7. The method according to claim 5, wherein the matching the information carried in the second response packet with the information carried in the second detection packet to determine the detection result comprises:
and if the information carried by the second response message is not matched with any item of the information carried by the second detection message, determining the configuration detection result with wrong configuration of the middle node to be detected corresponding to the ith virtual local area network.
8. The method according to claim 1, wherein before the obtaining of the vlan configuration information and the forming of the first detection packet of each of the plurality of nodes to be detected corresponding to the respective vlan based on the vlan configuration information, the method further comprises:
and after the system is started, acquiring the information of the main control node from the local, detecting to obtain a detection result that the information of the local equipment is matched with the information of the main control node, and determining that the local equipment is the main control node.
9. The method according to claim 7, wherein if any item of information carried in the second response packet does not match any item of information carried in the second detection packet, after determining that the configuration detection result of the i-th vlan corresponding to the configuration error of the intermediate node to be detected, the method further includes:
and listing the intermediate node to be tested in a fault list so that the intermediate node to be tested is failed to schedule corresponding to the ith virtual local area network.
10. A network configuration detection device is applied to a master control node and comprises the following components:
the information acquisition unit is used for acquiring virtual local area network configuration information and forming a plurality of first detection messages of the nodes to be detected, which respectively correspond to the virtual local area networks to which the nodes to be detected belong, based on the virtual local area network configuration information;
a first sending unit, configured to send the first detection packet to the multiple nodes to be detected respectively at regular intervals, where the first detection packet corresponds to the first detection packet of the respective virtual local area network;
the determining unit is used for determining a middle node to be tested, communicated by a physical link, in the nodes to be tested based on the received response messages fed back by the nodes to be tested;
the construction unit is used for constructing a second detection message based on the middle first detection message corresponding to the middle node to be detected; the second detection message is different from the middle first detection message in that the second detection message contains identification information of a virtual local area network to which the middle node to be detected belongs;
and the determining unit is used for determining a configuration detection result of the virtual local area network to which the intermediate node to be detected belongs based on the second detection message.
11. A network configuration detection apparatus comprising a first memory and a first processor, the first memory storing a computer program operable on the first processor, the first processor implementing the steps of the method of any one of claims 1 to 9 when executing the program.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a first processor, carries out the steps of the method of any one of claims 1 to 9.
CN202210923585.9A 2022-08-02 2022-08-02 Network configuration detection method, device and storage medium Active CN115378816B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210923585.9A CN115378816B (en) 2022-08-02 2022-08-02 Network configuration detection method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210923585.9A CN115378816B (en) 2022-08-02 2022-08-02 Network configuration detection method, device and storage medium

Publications (2)

Publication Number Publication Date
CN115378816A true CN115378816A (en) 2022-11-22
CN115378816B CN115378816B (en) 2024-02-23

Family

ID=84062834

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210923585.9A Active CN115378816B (en) 2022-08-02 2022-08-02 Network configuration detection method, device and storage medium

Country Status (1)

Country Link
CN (1) CN115378816B (en)

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1812361A (en) * 2006-01-23 2006-08-02 杭州华为三康技术有限公司 Fast ring network protecting method and system
CN101562552A (en) * 2009-05-27 2009-10-21 华为技术有限公司 Method, system and device for detecting virtual private LAN loop
CN102271064A (en) * 2011-07-26 2011-12-07 福建星网锐捷网络有限公司 Pseudo wire connectivity failure detection method, device and system
JP2012034080A (en) * 2010-07-29 2012-02-16 Fuji Electric Co Ltd Network system
CN103825766A (en) * 2014-02-28 2014-05-28 杭州华三通信技术有限公司 Device and method for detecting BFD links
CN106878480A (en) * 2016-12-29 2017-06-20 新华三技术有限公司 A kind of DHCP service process sharing method and device
CN108075936A (en) * 2016-11-16 2018-05-25 中国移动通信有限公司研究院 VxLAN detection methods and device
CN109005088A (en) * 2018-09-28 2018-12-14 北京东土科技股份有限公司 The detection method and device of duplicate message in parallel redundancy network
CN109218121A (en) * 2017-07-03 2019-01-15 中兴通讯股份有限公司 Machinery of consultation, device and the equipment of Air conduct measurement parameter
CN109787878A (en) * 2017-11-10 2019-05-21 北京华为数字技术有限公司 A kind of tunnel links detection method and relevant device
CN111327504A (en) * 2020-02-26 2020-06-23 深信服科技股份有限公司 Virtual local area network loop detection method, device, equipment and readable storage medium
CN112751733A (en) * 2021-02-08 2021-05-04 北京金山云网络技术有限公司 Link detection method, device, equipment, system and switch
CN112769650A (en) * 2021-01-11 2021-05-07 杭州锐思客技术有限公司 Multi-VLAN loop detection method and system
CN114079613A (en) * 2020-08-14 2022-02-22 华为技术有限公司 Communication method and related equipment
CN114189564A (en) * 2020-08-28 2022-03-15 华为技术有限公司 Message transmission method, device and system
CN114389967A (en) * 2020-10-19 2022-04-22 南京中兴新软件有限责任公司 Link detection method, device, equipment and storage medium
US20220278925A1 (en) * 2019-11-19 2022-09-01 Huawei Technologies Co., Ltd. Method for Delivering OAM Configuration Information and Control Node
US20230198876A1 (en) * 2020-05-15 2023-06-22 Inspur Suzhou Intelligent Technology Co., Ltd. Network adapter node performance detection method and apparatus, device, and readable medium

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1812361A (en) * 2006-01-23 2006-08-02 杭州华为三康技术有限公司 Fast ring network protecting method and system
CN101562552A (en) * 2009-05-27 2009-10-21 华为技术有限公司 Method, system and device for detecting virtual private LAN loop
JP2012034080A (en) * 2010-07-29 2012-02-16 Fuji Electric Co Ltd Network system
CN102271064A (en) * 2011-07-26 2011-12-07 福建星网锐捷网络有限公司 Pseudo wire connectivity failure detection method, device and system
CN103825766A (en) * 2014-02-28 2014-05-28 杭州华三通信技术有限公司 Device and method for detecting BFD links
CN108075936A (en) * 2016-11-16 2018-05-25 中国移动通信有限公司研究院 VxLAN detection methods and device
CN106878480A (en) * 2016-12-29 2017-06-20 新华三技术有限公司 A kind of DHCP service process sharing method and device
CN109218121A (en) * 2017-07-03 2019-01-15 中兴通讯股份有限公司 Machinery of consultation, device and the equipment of Air conduct measurement parameter
CN109787878A (en) * 2017-11-10 2019-05-21 北京华为数字技术有限公司 A kind of tunnel links detection method and relevant device
CN109005088A (en) * 2018-09-28 2018-12-14 北京东土科技股份有限公司 The detection method and device of duplicate message in parallel redundancy network
US20220278925A1 (en) * 2019-11-19 2022-09-01 Huawei Technologies Co., Ltd. Method for Delivering OAM Configuration Information and Control Node
CN111327504A (en) * 2020-02-26 2020-06-23 深信服科技股份有限公司 Virtual local area network loop detection method, device, equipment and readable storage medium
US20230198876A1 (en) * 2020-05-15 2023-06-22 Inspur Suzhou Intelligent Technology Co., Ltd. Network adapter node performance detection method and apparatus, device, and readable medium
CN114079613A (en) * 2020-08-14 2022-02-22 华为技术有限公司 Communication method and related equipment
CN114189564A (en) * 2020-08-28 2022-03-15 华为技术有限公司 Message transmission method, device and system
CN114389967A (en) * 2020-10-19 2022-04-22 南京中兴新软件有限责任公司 Link detection method, device, equipment and storage medium
CN112769650A (en) * 2021-01-11 2021-05-07 杭州锐思客技术有限公司 Multi-VLAN loop detection method and system
CN112751733A (en) * 2021-02-08 2021-05-04 北京金山云网络技术有限公司 Link detection method, device, equipment, system and switch

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
周明;郦苏丹;王宏;: "基于ICMP扩展的链路状态检测方法", 计算机系统应用, no. 11 *

Also Published As

Publication number Publication date
CN115378816B (en) 2024-02-23

Similar Documents

Publication Publication Date Title
US7284147B2 (en) Reliable fault resolution in a cluster
CN103442008B (en) A kind of routing safety detecting system and detection method
US7280486B2 (en) Detection of forwarding problems for external prefixes
US7990959B2 (en) Packet transfer apparatus and packet transfer method
CN110224883B (en) Gray fault diagnosis method applied to telecommunication bearer network
CN101986604A (en) Link fault positioning method and system of packet transport network (PTN)
CN112291116A (en) Link fault detection method and device and network equipment
WO2015143810A1 (en) Node fault detection method and apparatus
CN102882704A (en) Link protection method and apparatus in soft restart upgrade process of ISSU (in-service software upgrade)
CN109981404B (en) Ad hoc network structure and diagnosis method thereof
CN102833122B (en) Loopback detection method and system
CN109412851B (en) Link layer path detection method, device and system
CN115378816B (en) Network configuration detection method, device and storage medium
CN102868616B (en) Method for establishing virtual MAC (Media Access Control) address table item in network as well as router and system
JP5643453B1 (en) Communication path management apparatus and program
CN112636999A (en) Port detection method and network monitoring system
WO2021046565A2 (en) Pce controlled network reliability
CN117155937B (en) Cluster node fault detection method, device, equipment and storage medium
JP5367002B2 (en) Monitoring server and monitoring program
CN112737949A (en) Fault detection method and device, electronic equipment and computer readable medium
JP6512037B2 (en) Wireless communication device, method and program
CN107733677B (en) Alarm generation method and device for overlay network
WO2015120581A1 (en) Traffic loop detection in a communication network
JP6662486B1 (en) Network management device, failure section determination method, and program
CN118175011A (en) VPN diagnosis method, management node and associated VPN node

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant