CN108989069B - Network link detection method, electronic equipment and computer storage medium - Google Patents

Network link detection method, electronic equipment and computer storage medium Download PDF

Info

Publication number
CN108989069B
CN108989069B CN201710400663.6A CN201710400663A CN108989069B CN 108989069 B CN108989069 B CN 108989069B CN 201710400663 A CN201710400663 A CN 201710400663A CN 108989069 B CN108989069 B CN 108989069B
Authority
CN
China
Prior art keywords
electronic device
network link
electronic
network
electronic equipment
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.)
Active
Application number
CN201710400663.6A
Other languages
Chinese (zh)
Other versions
CN108989069A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201710400663.6A priority Critical patent/CN108989069B/en
Publication of CN108989069A publication Critical patent/CN108989069A/en
Application granted granted Critical
Publication of CN108989069B publication Critical patent/CN108989069B/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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • 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/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors

Abstract

The invention discloses a method for detecting network links, which comprises the following steps: the method comprises the steps that a first electronic device receives attribute information of a second electronic device; the attribute information of the second electronic device at least includes: port attributes of the second electronic device or location information of the second electronic device; and detecting a network link between the first electronic device and the second electronic device according to a preset strategy based on the attribute information of the second electronic device. The invention also discloses an electronic device and a computer storage medium.

Description

Network link detection method, electronic equipment and computer storage medium
Technical Field
The present invention relates to network communication technologies, and in particular, to a method for detecting a network link, an electronic device, and a computer storage medium.
Background
With the rapid development of the internet technology, the application range of the data center network is increasingly wide; the data center network is not only large in scale and complex in structure, but also has countless network links among the internal devices, so that the situation that the network links are wrong is inevitable.
Existing data center networks all have fixed network architectures, including: a Data center Network of a multi-layer architecture shown in fig. 1, a Data center Network of a fat tree (FATTREE) architecture shown in fig. 2, a Data center Network of a Matrix Data Communication Network (Matrix DCN) architecture shown in fig. 3, a Data center Network of a DCELL architecture shown in fig. 4, and the like. At present, methods for detecting a data center network link with a fixed network architecture mainly include two types, i.e., manual comparison detection and automatic comparison detection.
However, when the network link of the data center with huge detection scale is detected by manual comparison, the efficiency is low, and detection errors are easy to occur; when the automatic comparison is used for detecting the network link of the data center, the following problems exist: firstly, when the network link of the data center is automatically compared and detected, a network topology structure needs to be established in advance, and the workload for establishing a data center network with huge scale is quite huge; secondly, when the network link of the data center is detected by automatic comparison, the identification of each network device needs to be matched with a control center and the like, which is difficult; thirdly, when the automatic comparison is used for detecting the network link of the data center, after the equipment is configured one-to-one based on the Identification (ID) of the equipment, the configuration information cannot be flexibly changed, and inconvenience is brought to the configuration and maintenance of the equipment.
Disclosure of Invention
In view of this, embodiments of the present invention are to provide a method, an electronic device, and a computer storage medium for detecting a network link, which can quickly detect an error of the network link without configuring and identifying the device or establishing a network topology in advance.
In order to achieve the above purpose, the technical solution of the embodiment of the present invention is realized as follows:
the embodiment of the invention provides a method for detecting network links, which comprises the following steps: the method comprises the steps that a first electronic device receives attribute information of a second electronic device; the attribute information of the second electronic device at least includes: port attributes of the second electronic device or location information of the second electronic device;
and detecting a network link between the first electronic device and the second electronic device according to a preset strategy based on the attribute information of the second electronic device.
In the foregoing solution, the detecting, according to a preset policy, a network link between the first electronic device and the second electronic device based on the attribute information of the second electronic device includes:
the first electronic equipment matches the attribute information of the first electronic equipment with the attribute information of the second electronic equipment according to a preset strategy to obtain a matching result;
and detecting whether the network link relation between the first electronic equipment and the second electronic equipment is correct or not based on the matching result.
In the foregoing solution, the detecting whether the network link between the first electronic device and the second electronic device is correct based on the matching result includes:
when the matching result is determined to be that the first electronic device and the second electronic device are located in the same layer network based on the position information of the first electronic device and the position information of the second electronic device, detecting a network link relation error between the first electronic device and the second electronic device; or the like, or, alternatively,
and determining that the matching result is that the port attribute of the first electronic device is the same as the port attribute of the second electronic device based on the port attribute of the first electronic device and the port attribute of the second electronic device, and detecting a network link relation error between the first electronic device and the second electronic device.
In the foregoing solution, when the attribute information of the second electronic device carries a detection policy, detecting a network link between the first electronic device and the second electronic device according to a preset policy, includes:
the first electronic equipment detects a network link between the first electronic equipment and the second electronic equipment according to the detection strategy;
when the attribute information of the second electronic device does not carry a detection strategy, detecting a network link between the first electronic device and the second electronic device according to a preset strategy, including:
and the first electronic equipment detects the network link between the first electronic equipment and the second electronic equipment according to a detection strategy stored by the first electronic equipment.
In the above scheme, the method further comprises:
and the first electronic equipment reports the wrong network link.
An embodiment of the present invention further provides an electronic device, where the electronic device includes: the device comprises a receiving module and a detecting module; wherein the content of the first and second substances,
the receiving module is used for receiving attribute information of the third electronic equipment; the attribute information of the third electronic device at least includes: port attributes of the third electronic device or location information of the third electronic device;
the detection module is configured to detect, according to a preset policy, a network link between the electronic device and the third electronic device based on the attribute information of the third electronic device.
In the above scheme, the detection module is specifically configured to match the attribute information of the electronic device with the attribute information of the third electronic device according to a preset policy, so as to obtain a matching result;
and detecting whether the network link between the electronic equipment and the third electronic equipment is correct or not based on the matching result.
In the foregoing solution, the detecting module is specifically configured to detect a network link relationship error between the electronic device and the third electronic device when it is determined, based on the location information of the electronic device and the location information of the third electronic device, that the matching result indicates that the electronic device and the third electronic device are located in a same layer network; or the like, or a combination thereof,
and determining that the matching result is that the port attribute of the electronic equipment is the same as the port attribute of the third electronic equipment based on the port attribute of the electronic equipment and the port attribute of the third electronic equipment, and detecting a network link relation error between the electronic equipment and the third electronic equipment.
In the above scheme, when the attribute information of the third electronic device carries a detection policy, the detection module is specifically configured to detect a network link between the electronic device and the third electronic device according to the detection policy;
when the attribute information of the third electronic device does not carry a detection policy, the detection module is specifically configured to detect a network link between the electronic device and the third electronic device according to the detection policy stored in the electronic device.
In the above solution, the electronic device further includes:
and the reporting module is used for reporting the wrong network link.
An embodiment of the present invention further provides a computer storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps of the foregoing method.
An embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method when executing the program.
According to the network link detection method, the electronic device and the computer storage medium provided by the embodiment of the invention, the first electronic device obtains the attribute information of the second electronic device based on the communication connection, and detects the network link between the first electronic device and the second electronic device according to the network link rule in the data center network by using the attribute information of the second electronic device and the attribute information of the first electronic device; therefore, the network link error can be quickly detected without configuring and identifying equipment and establishing a network topology structure in advance.
Drawings
FIG. 1 is a schematic diagram of a data center network with a multi-tier architecture according to the present invention;
FIG. 2 is a schematic diagram of a data center network of the FATTREE architecture of the present invention;
FIG. 3 is a schematic diagram of a data center network of the Matrix DCN architecture of the present invention;
FIG. 4 is a schematic diagram of a data center network of the DCELL architecture of the present invention;
fig. 5 is a flowchart illustrating a method for detecting a network link according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a format of a message carrying attribute information of a second electronic device according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a format of an LLDP packet extended in the embodiment of the present invention;
fig. 8 is a flowchart illustrating a method for detecting a network link according to a second embodiment of the present invention;
fig. 9 is a schematic flowchart of a method for detecting a network link according to a third embodiment of the present invention;
fig. 10 is a schematic flowchart illustrating a method for detecting a network link according to a fourth embodiment of the present invention;
fig. 11 is a schematic flowchart of a fifth method for detecting a network link according to an embodiment of the present invention;
fig. 12 is a schematic diagram illustrating a decision system sending configuration information to a vSwitch according to an embodiment of the present invention;
FIG. 13 is a first diagram illustrating network links according to an embodiment of the present invention;
FIG. 14 is a second exemplary network link diagram according to the present invention;
FIG. 15 is a schematic diagram of an electronic device according to an embodiment of the present invention;
fig. 16 is a schematic diagram of a hardware composition structure of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to better understand the technical solution of the embodiment of the present invention, a brief description is provided below of a scheme for detecting a data center network link by automatic alignment in the prior art.
In the prior art, the scheme for detecting the network link of the data center by using automatic comparison mainly comprises the following steps: the first method is to establish a known network topological structure in advance, digitize the network topological structure, and collect dynamic network topological structures for automatic comparison when the network topological structure operates; the second method is that a known network topological structure is established in advance, the network topological structure is digitalized and imaged, a dynamic network topological structure is collected when the network topological structure runs, and then the dynamic network topological structure is imaged for manual comparison; thirdly, collecting dynamic network topology structure when the network topology structure runs, and manually comparing the dynamic network topology structure with a design planning chart; and the fourth method is that the IDs of two devices with network link relation are confirmed in advance, the devices are configured one by one based on the IDs of the two devices, and then whether the network link relation is correct or not is detected automatically.
So that the manner in which the features and aspects of the embodiments of the present invention can be understood in detail, a more particular description of the embodiments of the invention, briefly summarized above, may be had by reference to the embodiments, some of which are illustrated in the appended drawings. In addition, the following embodiments are provided as partial embodiments for implementing the present invention, not all embodiments for implementing the present invention, and the technical solutions described in the embodiments of the present invention may be implemented in any combination without conflict.
It should be noted that the terms "first \ second \ third \ fourth" related to the embodiments of the present invention are merely used for distinguishing similar objects, and do not represent a specific ordering for the objects, and it should be understood that "first \ second \ third \ fourth" may exchange a specific order or sequence order if allowed. It should be understood that the first, second, third, fourth "distinguishing objects may be interchanged under appropriate circumstances such that embodiments of the invention described herein may be practiced in sequences other than those illustrated or described herein.
In the embodiment of the present invention, the electronic device may include, but is not limited to, any device having information or message sending and receiving functions, such as a core device, a switching device, and an aggregation device inside a data center network.
Example one
As shown in fig. 5, an implementation process of a network link detection method according to an embodiment of the present invention includes the following steps:
step S101, a first electronic device receives attribute information of a second electronic device;
wherein the port attributes include at least: the types of the ports, such as an uplink port and a downlink port, a row port and a column port, an internal connection port and an external connection port, and the like; the position information is expressed by node coordinates X and Y, and the position information at least includes: the layer information, or the column information, or the row information of the electronic equipment in the data center network.
Specifically, the first electronic device receives attribute information of the second electronic device sent by the second electronic device through a message or information.
Taking an example that the second electronic device sends the attribute information of the second electronic device through a message, as shown in fig. 6, the format of the message includes: network architecture type, port type, node coordinate X and node coordinate Y; wherein the network architecture type comprises: multilayer architecture, FATTREE, matrix DCN and DCELL. The port types do not have the same meaning in different network architecture types; in a data center network of a multi-layer architecture and a data center network of FATTREE, the port types comprise an upstream port and a downstream port; in a data center network of Matrix DCN, the port types include a row interface and a column interface; in a data center network of DCELL, the port types include inline ports and external links. The node coordinate X and the node coordinate Y are used for representing the position information of the electronic equipment, and the meanings of the node coordinate X and the node coordinate Y in different network architecture types are different; in the data center network of the multi-tier architecture and the data center network of the FATTREE, the node coordinate X includes: the hierarchy and the container identification, the value range of the hierarchy is 0-255, and 0 represents a host layer; the value range of the container identifier is 0-255; the value range of the node coordinate Y is 0-65535. In a data center network of Matrix DCN, the value range of a node coordinate X is 0-65535, and 0 represents a head-of-line switch; the value range of the node coordinate Y is 0-65535, and 0 represents a head switch. In the data center network of DCELL, the node coordinates X include: the hierarchy and the container identification, the value range of the hierarchy is 0-255,0 represents the port of the innermost layer, and the value range of the container identification is 0-255; the value range of the node coordinate Y is 0-65535.
The message may also be extended based on an existing protocol message, taking the extension based on an LLDP message as an example, the format of the LLDP message is shown in fig. 7, and the "custom information" is an extended message carrying attribute information of the second electronic device; the network architecture type and the port type in the extended message both occupy 1 byte, and the node coordinate X and the node coordinate Y in the extended message both occupy 2 bytes.
Here, the attribute information of the second electronic device may be directly configured on the second electronic device, or may be sent to the second electronic device by a management unit, a control unit, or the like inside a data center network that is independent of the second electronic device; the attribute information of the second electronic device at least includes a port attribute of the second electronic device or location information of the second electronic device.
Step S102, based on the attribute information of the second electronic device, detecting a network link between the first electronic device and the second electronic device according to a preset strategy;
specifically, the first electronic device matches its own attribute information with the attribute information of the second electronic device according to a preset strategy to obtain a matching result; the first electronic device detects whether the network connection relationship between the first electronic device and the second electronic device is correct or not based on the matching result.
Here, the preset policy may be a detection policy carried in the received attribute information of the second electronic device, or may also be a detection policy stored in the first electronic device itself, where each detection policy corresponds to a network architecture type.
Wherein the preset strategy comprises: two electronic devices having the same port type cannot have a link relationship therebetween, i.e., cannot be interconnected; two electronic devices in the same layer of the data center network cannot have a link relationship, namely cannot be interconnected; two electronic devices across layers cannot be intercommunicated, namely only two electronic devices positioned between adjacent layers of the data center network can be intercommunicated; the electronic device at the head of the row may have a link relationship with the electronic device at the row, and the electronic device at the head of the column may have a link relationship with the electronic device at the column; the preset policy further includes a link relationship between the self-defined Y coordinates, for example, a link relationship may be defined between electronic devices with an odd Y coordinate, or a link relationship may be defined between electronic devices with an even Y coordinate, or a link relationship may be defined between an electronic device with an odd Y coordinate and an electronic device with an even Y coordinate, and the like.
Taking the attribute information of the second electronic device as location information as an example, when it is determined that the matching result is that the first electronic device and the second electronic device are located in the same layer network based on the location information of the first electronic device and the location information of the second electronic device, a network link relationship error between the first electronic device and the second electronic device is detected.
Taking the attribute information of the second electronic device as a port attribute as an example, and determining that the matching result is that the port attribute of the first electronic device is the same as the port attribute of the second electronic device based on the port attribute of the first electronic device and the port attribute of the second electronic device according to the port attribute of the port, detecting a network link relation error between the first electronic device and the second electronic device; namely, when the port type of the first electronic device is the same as the port type of the second electronic device, the network link relationship between the first electronic device and the second electronic device is incorrect.
Taking the example that the attribute information of the second device includes both the location information and the port attribute, the location information of the first electronic device needs to be matched with the location information of the second electronic device to obtain a first matching result; matching the port attribute of the first electronic equipment with the port attribute of the second electronic equipment to obtain a second matching result; and determining the network link relation between the first electronic equipment and the second electronic equipment by combining the first matching result and the second matching result. And determining that the network link relationship between the first electronic device and the second electronic device is correct only when the first matching result and the second matching result both represent that the network link relationship between the first electronic device and the second electronic device is correct. When any one of the first matching result and the second matching result represents that the network link relationship between the first electronic device and the second electronic device is wrong, the network link relationship between the first electronic device and the second electronic device can be determined to be wrong.
Example two
As shown in fig. 8, an implementation flow of a method for detecting a network link according to a second embodiment of the present invention is similar to the method shown in fig. 5, except that, in step S102, after the first electronic device detects a network link relationship error between the first electronic device and the second electronic device, the method further includes:
step S103, reporting the wrong network link by the first electronic equipment;
specifically, the first electronic device sends information to a designated functional unit; the information is used for indicating that the network link relation of the first electronic equipment and the second electronic equipment is wrong; the information may also be used to indicate a reason for the network link relation error.
The functional unit may be an electronic device or module inside a data center network, or may be a remote electronic device or module independent of the data center network; the information may be alarm information or common communication information.
Third embodiment as shown in fig. 9, a third embodiment of the present invention is a process for implementing a network link detection method, including the following steps:
step S201, a first electronic device receives attribute information of a second electronic device;
wherein the port attributes include at least: the types of the ports, such as an upstream port and a downstream port, a row interface and a column interface, an internal connection port and an external connection port, and the like; the position information is expressed by node coordinates X and Y, and the position information at least comprises: the layer information, the column information or the row information of the electronic equipment in the data center network.
Specifically, the first electronic device receives attribute information of the second electronic device sent by the second electronic device through a message or information.
Taking an example that the second electronic device sends the attribute information of the second electronic device through a message, as shown in fig. 6, the format of the message includes: network architecture type, port type, node coordinate X and node coordinate Y; wherein the network architecture type comprises: multilayer architecture, FATTREE, matrix DCN and DCELL. The port types do not have the same meaning in different network architecture types; in a data center network of a multi-layer architecture and a data center network of FATTREE, the port types comprise an upstream port and a downstream port; in a data center network of Matrix DCN, the port types comprise row interfaces and column interfaces; in a data center network of DCELL, the port types include inline ports and external links. The node coordinate X and the node coordinate Y are used for representing the position information of the electronic equipment, and the meanings of the node coordinate X and the node coordinate Y in different network architecture types are different; in the data center network of the multi-tier architecture and the data center network of the FATTREE, the node coordinate X includes: the hierarchy and the container identification, the value range of the hierarchy is 0-255, and 0 represents a host layer; the value range of the container identifier is 0-255; the value range of the node coordinate Y is 0-65535. In a data center network of Matrix DCN, the value range of a node coordinate X is 0-65535, and 0 represents a head-of-line switch; the value range of the node coordinate Y is 0-65535, and 0 represents the head switch. In the data center network of DCELL, the node coordinates X include: the hierarchy and the container identification, the value range of the hierarchy is 0-255,0 represents the port of the innermost layer, and the value range of the container identification is 0-255; the value range of the node coordinate Y is 0-65535.
The message may also be extended based on an existing protocol message, taking the extension based on an LLDP message as an example, the format of the LLDP message is shown in fig. 7, and the "custom information" is an extended message carrying attribute information of the second electronic device; the network architecture type and the port type in the extended message both occupy 1 byte, and the node coordinate X and the node coordinate Y in the extended message both occupy 2 bytes.
Here, the attribute information of the second electronic device may be directly configured on the second electronic device, or may be sent to the second electronic device by a management unit, a control unit, or the like inside a data center network that is independent of the second electronic device; the attribute information of the second electronic device at least includes a port attribute of the second electronic device or location information of the second electronic device.
Step S202, the first electronic equipment sends the attribute information of the first electronic equipment and the attribute information of the second electronic equipment to a judgment system;
here, the decision system is an electronic device or a module or a functional unit having a communication function and an information processing function, which is independent of the data center network.
Step S203, the decision system detects a network link between the first electronic device and the second electronic device according to a preset policy;
specifically, the judgment system matches the attribute information of the first electronic device with the attribute information of the second electronic device according to a preset strategy to obtain a matching result; and detecting whether the network link relation between the first electronic equipment and the second electronic equipment is correct or not based on the matching result.
The preset policy may be sent to the decision system by the first electronic device, may also be pre-stored in the decision system, or may be obtained by any other decision system, which is not specifically limited herein.
Here, a specific implementation manner of the decision system detecting the network link between the first electronic device and the second electronic device is the same as the specific implementation manner of the first electronic device detecting the network link between the first electronic device and the second electronic device in step S102, and details are not repeated here.
Example four
As shown in fig. 10, an implementation flow of a method for detecting a network link according to four embodiments of the present invention is similar to the method shown in fig. 9, except that after step S203, the method further includes:
step S204, the judgment system processes the wrong network link;
specifically, the decision system sends a blocking instruction to a data center network, where the blocking instruction is used to instruct the data center network to disconnect a detected erroneous network link; or the judgment system sends alarm information to a manager of the data center network, wherein the alarm information is used for indicating wrong network links; the alarm information is also used for indicating the reason of the network link relation error.
EXAMPLE five
As shown in fig. 11, a flow for implementing a method for detecting a network link according to a fifth embodiment of the present invention includes the following steps:
step S301, the virtual switch (vSwitch) acquires the configuration information of the virtual switch;
here, the configuration information may be directly configured on the vSwitch, or may be sent to the vSwitch by another functional unit; taking the example that the decision system sends the configuration information to the vSwitch, as shown in fig. 12, where the vSwitch is a forwarding node in fig. 12, and the decision system sends the configuration information of the forwarding node to each forwarding node; and sending self configuration information among all forwarding nodes through an LLDP message.
Step S302, the vSwitch sends a detection message to opposite terminal equipment;
here, vSwitch can periodically send detection messages, and the period can be flexibly set according to needs; the vSwitch can also send a detection message when the trigger condition is met; the trigger condition may be a port UP (UP) of the vSwitch, or a change in configuration information of the vSwitch, or the like.
Step S303, after receiving the detection message sent by the vSwitch, the opposite terminal equipment performs network link detection based on the detection message;
specifically, the specific implementation manner of the network link detection performed by the peer device is the same as that in step S102 in the first embodiment, and is not described here again.
In the embodiment of the present invention, after detecting a network link relationship between the peer device itself and a vSwitch based on a detection packet sent by the vSwitch, the peer device may send the detection packet to the vSwitch when a trigger condition is met, or send the detection packet to the vSwitch periodically; or the detection message may not be sent to the vSwitch any more.
Based on the method for detecting network links described in the foregoing embodiment, a network architecture shown in fig. 13 is taken as an example to describe in detail a wrong network link relationship.
The network architecture shown in fig. 13 is a variation of a multi-tier architecture combined with a FATTREE network architecture, which has both a hierarchy and different container units (PODs);
the preset strategy comprises the following steps: two devices of adjacent layers can have a network link relation; the uplink port of the equipment positioned at the lower layer is connected with the downlink port positioned at the upper layer; different PODs are connected by a network link to an upper layer.
The network links in the network architecture shown in fig. 13 are identified by dashed and solid lines, respectively; wherein, link 1, link 2, link 3 and link 4 are marked by dotted lines and are wrong network links; the network link identified by the solid line is the correct network link; the reasons for the network link error are:
1) Link 1 is a link between access device 1 (ac 1) and core device 2 (core 2), since ac1 is located at a layer in the network architecture that is not adjacent to the layer where core2 is located in the network architecture; thus, link 1 is an erroneous link.
2) Link 2 is a link between ac1 and ac2, since ac1 and ac2 are located at the same layer in the network architecture; thus, link 2 is an erroneous link.
3) Link 3 is a link between ac2 and aggregation device 3 (ag 3), and since ac2 and ag3 are located in different containers in the network architecture, different containers cannot be directly connected with each other; thus, link 3 is an erroneous link.
4) The link 4 is a link between ac5 and ag6, and the ac5 and the ag6 are uplink ports, while the ports of the same type are connected differently; thus, link 4 is an erroneous link.
Based on the method for detecting network links in the foregoing embodiments, the network architecture shown in fig. 14 is taken as an example to describe in detail the relationship of the network links that are wrong.
Based on the DCELL network architecture shown in fig. 14, the preset policies include: the devices in the same unit can only be connected through the inline port, namely, the host can only be connected with the switch; different units are connected through an external port, namely the units can be connected with other units only through the external port of the host; all the hosts in the same unit are connected with the switch; the external ports of the same tier of devices may be interconnected.
The network links in the network architecture shown in fig. 14 are identified by dashed and solid lines, respectively; wherein, link 1, link 2 and link 3 are marked by dotted lines and are wrong network links; the network link identified by the solid line is the correct network link; the reasons for the network link error are:
1) The link 1 is formed by interconnecting an inline port of the switch 1 (sw 1) with an inline port of the sw 2; since sw1 and sw2 belong to different containers respectively, the inline ports cannot be connected across the containers; thus, link 1 is an erroneous link.
2) The link 2 is a link between the sw1 and the host 2-1 through an external port; since the external port cannot connect to the device in the container, link 2 is the wrong link.
3) Link 3 host 0-0 and host 0-1 through the link between 1 layer of external ports through 0 layer of external ports, because the external ports of different layers can not be interconnected, link 3 is a wrong link.
In order to implement the foregoing method, an embodiment of the present invention further provides an electronic device, as shown in fig. 15, where the electronic device includes: a receiving module 10 and a detecting module 20; wherein the content of the first and second substances,
the receiving module 10 is configured to receive attribute information of a third electronic device; the attribute information of the third electronic device at least includes: port attributes of the third electronic device or location information of the third electronic device;
the detecting module 20 is configured to detect a network link between the electronic device and the third electronic device according to a preset policy based on the attribute information of the third electronic device.
In a specific embodiment, the detection module 20 is specifically configured to match the attribute information of the electronic device with the attribute information of the third electronic device according to a preset policy, so as to obtain a matching result;
detecting whether a network link between the electronic device and the third electronic device is correct based on the matching result.
In a specific embodiment, the detecting module 20 is specifically configured to detect a network link relationship error between the electronic device and the third electronic device when it is determined that the matching result is that the electronic device and the third electronic device are located in the same layer network based on the location information of the electronic device and the location information of the third electronic device; or the like, or, alternatively,
and determining that the matching result is that the port attribute of the electronic equipment is the same as the port attribute of the third electronic equipment based on the port attribute of the electronic equipment and the port attribute of the third electronic equipment, and detecting a network link relation error between the electronic equipment and the third electronic equipment.
In a specific embodiment, when the attribute information of the third electronic device carries a detection policy, the detection module 20 is specifically configured to detect a network link between the electronic device and the third electronic device according to the detection policy;
when the attribute information of the third electronic device does not carry a detection policy, the detection module 20 is specifically configured to detect the network link between the electronic device and the third electronic device according to the detection policy stored in the electronic device.
In a specific embodiment, the electronic device further includes: a reporting module 30, configured to report the wrong network link.
It should be noted that: in the above embodiment, when the electronic device performs the network link detection, only the division of the program modules is used for illustration, and in practical applications, the processing distribution may be completed by different program modules according to needs, that is, the internal structure of the apparatus is divided into different program modules, so as to complete all or part of the above-described processing. In addition, the embodiments of the method for detecting the electronic device and the network link provided by the embodiments belong to the same concept, and specific implementation processes thereof are detailed in the embodiments of the method and are not described herein again.
In practical applications, the functions executed by the receiving module 10, the detecting module 20, and the reporting module 30 can be implemented by a Central Processing Unit (CPU), a microprocessor Unit (MPU), a Digital Signal Processor (DSP), or a Field Programmable Gate Array (FPGA) on an electronic device. The functions performed by the detection module 20 may also be implemented by the electronic device in cooperation with a CPU, MPU, DSP, or FPGA on a functional unit independent of the electronic device.
An embodiment of the present invention further provides an electronic device, where a hardware component structure of the electronic device is schematically illustrated, and as shown in fig. 16, the electronic device 700 includes: a processor 701 and a memory 702 for storing a computer program capable of running on the processor;
wherein the processor is configured to execute, when running the computer program:
receiving attribute information of a second electronic device; the attribute information of the second electronic device at least includes: port attributes of the second electronic device or location information of the second electronic device;
and detecting a network link between the first electronic device and the second electronic device according to a preset strategy based on the attribute information of the second electronic device.
The processor is further configured to, when executing the computer program, perform:
the equipment matches the attribute information of the equipment with the attribute information of the second electronic equipment according to a preset strategy to obtain a matching result;
and detecting whether the network link relation between the first electronic equipment and the second electronic equipment is correct or not based on the matching result.
The processor is further configured to, when executing the computer program, perform:
when the matching result is determined to be that the first electronic device and the second electronic device are located in the same layer network based on the position information of the first electronic device and the position information of the second electronic device, detecting a network link relation error between the first electronic device and the second electronic device; or the like, or a combination thereof,
and determining that the matching result is that the port attribute of the first electronic device is the same as the port attribute of the second electronic device based on the port attribute of the first electronic device and the port attribute of the second electronic device, and detecting a network link relation error between the first electronic device and the second electronic device.
The processor is further configured to, when executing the computer program, perform:
when the attribute information of the second electronic device carries a detection strategy, detecting a network link between the first electronic device and the second electronic device according to the detection strategy;
and when the attribute information of the second electronic equipment does not carry a detection strategy, detecting the network link between the first electronic equipment and the second electronic equipment according to the detection strategy stored in the second electronic equipment.
The processor is further configured to, when executing the computer program, perform: and reporting the wrong network link.
It will be appreciated that the memory 702 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), synchronous Static Random Access Memory (SSRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic Random Access Memory (SDRAM), double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), enhanced Synchronous Dynamic Random Access Memory (ESDRAM), enhanced Synchronous Dynamic Random Access Memory (Enhanced DRAM), synchronous Dynamic Random Access Memory (SLDRAM), direct Memory (DRmb Access), and Random Access Memory (DRAM). The memory 702 described in connection with the embodiments of the invention is intended to comprise, without being limited to, these and any other suitable types of memory.
The memory 702 in embodiments of the present invention is used to store various types of data in support of the operation of the electronic device 700. Examples of such data include: any computer programs for operating on the electronic device 700, such as an operating system 7021 and application programs 7022. The operating system 7021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks. The application programs 7022 may include various application programs, and programs that implement methods according to embodiments of the present invention are also included in the application programs 7022.
In an exemplary embodiment, the embodiment of the present invention further provides a computer readable storage medium, for example, a memory 702 including a computer program, which is executable by a processor 701 of an electronic device to perform the steps of the foregoing method. The computer readable storage medium can be Memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash Memory, magnetic surface Memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories, such as network devices like switches, hosts, etc.
An embodiment of the present invention further provides a computer storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the network link detection method.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, performs:
receiving attribute information of a second electronic device; the attribute information of the second electronic device at least includes: port attributes of the second electronic device or location information of the second electronic device;
and detecting a network link between the first electronic device and the second electronic device according to a preset strategy based on the attribute information of the second electronic device.
The computer program, when executed by the processor, further performs:
when the matching result is determined to be that the first electronic device and the second electronic device are located in the same layer network based on the position information of the first electronic device and the position information of the second electronic device, detecting a network link relation error between the first electronic device and the second electronic device; or the like, or, alternatively,
and determining that the matching result is that the port attribute of the first electronic device is the same as the port attribute of the second electronic device based on the port attribute of the first electronic device and the port attribute of the second electronic device, and detecting a network link relation error between the first electronic device and the second electronic device.
The computer program, when executed by the processor, further performs:
matching the attribute information of the second electronic equipment with the attribute information of the second electronic equipment according to a preset strategy to obtain a matching result;
and detecting whether the network link relation between the first electronic equipment and the second electronic equipment is correct or not based on the matching result.
The computer program, when executed by the processor, further performs:
when the matching result is determined to be that the first electronic device and the second electronic device are located in the same layer network based on the position information of the first electronic device and the position information of the second electronic device, detecting a network link relation error between the first electronic device and the second electronic device; or the like, or, alternatively,
and determining that the matching result is that the port attribute of the first electronic device is the same as the port attribute of the second electronic device based on the port attribute of the first electronic device and the port attribute of the second electronic device, and detecting a network link relation error between the first electronic device and the second electronic device.
The computer program, when executed by the processor, further performs:
detecting a network link between the first electronic device and the second electronic device according to the detection strategy;
when the attribute information of the second electronic device does not carry a detection policy, detecting a network link between the first electronic device and the second electronic device according to a preset policy, including:
and the first electronic equipment detects the network link between the first electronic equipment and the second electronic equipment according to a detection strategy stored by the first electronic equipment.
The computer program, when executed by the processor, further performs: and reporting the wrong network link.
The above description is only exemplary of the present invention and should not be taken as limiting the scope of the invention, which is intended to include all modifications, equivalents, and improvements that are within the spirit and scope of the invention.

Claims (12)

1. A method for detecting a network link, the method comprising:
the method comprises the steps that a first electronic device receives attribute information of a second electronic device; the attribute information of the second electronic device at least includes: port attributes of the second electronic device or location information of the second electronic device;
detecting a network link between the first electronic device and the second electronic device according to a preset strategy based on the attribute information of the second electronic device;
wherein the preset strategy comprises: two electronic devices of the same port type cannot be interconnected; and/or two electronic devices on the same layer network.
2. The method according to claim 1, wherein the detecting a network link between the first electronic device and the second electronic device according to a preset policy based on the attribute information of the second electronic device comprises:
the first electronic equipment matches the attribute information of the first electronic equipment with the attribute information of the second electronic equipment according to a preset strategy to obtain a matching result;
and detecting whether the network link relation between the first electronic equipment and the second electronic equipment is correct or not based on the matching result.
3. The method of claim 2, wherein the detecting whether the network link between the first electronic device and the second electronic device is correct based on the matching result comprises:
when the matching result is determined to be that the first electronic device and the second electronic device are located on the same layer network based on the position information of the first electronic device and the position information of the second electronic device, detecting a network link relation error between the first electronic device and the second electronic device; or the like, or, alternatively,
and determining that the matching result is that the port attribute of the first electronic device is the same as the port attribute of the second electronic device based on the port attribute of the first electronic device and the port attribute of the second electronic device, and detecting a network link relation error between the first electronic device and the second electronic device.
4. The method according to claim 1, wherein when the attribute information of the second electronic device carries a detection policy, detecting a network link between the first electronic device and the second electronic device according to a preset policy includes:
the first electronic equipment detects a network link between the first electronic equipment and the second electronic equipment according to the detection strategy;
when the attribute information of the second electronic device does not carry a detection strategy, detecting a network link between the first electronic device and the second electronic device according to a preset strategy, including:
and the first electronic equipment detects the network link between the first electronic equipment and the second electronic equipment according to a detection strategy stored by the first electronic equipment.
5. The method of claim 3, further comprising:
and reporting the wrong network link by the first electronic equipment.
6. An electronic device, characterized in that the electronic device comprises: the device comprises a receiving module and a detecting module; wherein the content of the first and second substances,
the receiving module is used for receiving attribute information of the third electronic equipment; the attribute information of the third electronic device at least includes: port attributes of the third electronic device or location information of the third electronic device;
the detection module is used for detecting a network link between the electronic equipment and the third electronic equipment according to a preset strategy based on the attribute information of the third electronic equipment;
wherein the preset strategy comprises: two electronic devices of the same port type cannot be interconnected; and/or two electronic devices on the same layer network.
7. The electronic device according to claim 6, wherein the detection module is specifically configured to match attribute information of the electronic device with attribute information of the third electronic device according to a preset policy, so as to obtain a matching result;
detecting whether a network link between the electronic device and the third electronic device is correct based on the matching result.
8. The electronic device according to claim 7, wherein the detecting module is specifically configured to detect a network link relationship error between the electronic device and the third electronic device when it is determined that the matching result is that the electronic device and the third electronic device are located in a same layer network based on the location information of the electronic device and the location information of the third electronic device; or the like, or a combination thereof,
and determining that the matching result is that the port attribute of the electronic equipment is the same as the port attribute of the third electronic equipment based on the port attribute of the electronic equipment and the port attribute of the third electronic equipment, and detecting a network link relation error between the electronic equipment and the third electronic equipment.
9. The electronic device according to claim 6, wherein when the attribute information of the third electronic device carries a detection policy, the detection module is specifically configured to detect a network link between the electronic device and the third electronic device according to the detection policy;
when the attribute information of the third electronic device does not carry a detection policy, the detection module is specifically configured to detect the network link between the electronic device and the third electronic device according to the detection policy stored in the electronic device.
10. The electronic device of claim 8, further comprising:
and the reporting module is used for reporting the wrong network link.
11. A computer storage medium on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the steps of the method of any one of claims 1 to 5.
12. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the method according to any of claims 1 to 5 are implemented when the processor executes the program.
CN201710400663.6A 2017-05-31 2017-05-31 Network link detection method, electronic equipment and computer storage medium Active CN108989069B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710400663.6A CN108989069B (en) 2017-05-31 2017-05-31 Network link detection method, electronic equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710400663.6A CN108989069B (en) 2017-05-31 2017-05-31 Network link detection method, electronic equipment and computer storage medium

Publications (2)

Publication Number Publication Date
CN108989069A CN108989069A (en) 2018-12-11
CN108989069B true CN108989069B (en) 2022-11-15

Family

ID=64500897

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710400663.6A Active CN108989069B (en) 2017-05-31 2017-05-31 Network link detection method, electronic equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN108989069B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112019365A (en) * 2019-05-31 2020-12-01 华为技术有限公司 Method and device for determining port attribute

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103024874A (en) * 2011-09-21 2013-04-03 中国移动通信集团山东有限公司 Method and device for selecting network access
CN105630894A (en) * 2015-12-18 2016-06-01 北京奇虎科技有限公司 Processing method and system of network link

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103501254B (en) * 2013-10-23 2017-05-03 北京旋极信息技术股份有限公司 Multipurpose avionics relay network topology configuration management method and multipurpose avionics relay network topology configuration management system
US9955421B2 (en) * 2014-07-09 2018-04-24 Qualcomm Incorporated Traffic advertisement and scheduling in a neighbor aware network data link
CN104283738B (en) * 2014-10-11 2018-07-17 新华三技术有限公司 A kind of chain circuit detecting method and equipment
CN104518927A (en) * 2014-12-15 2015-04-15 清华大学 Detecting method and device of error connection in data center network
CN106452880B (en) * 2016-10-19 2020-04-14 深信服科技股份有限公司 Network wiring detection method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103024874A (en) * 2011-09-21 2013-04-03 中国移动通信集团山东有限公司 Method and device for selecting network access
CN105630894A (en) * 2015-12-18 2016-06-01 北京奇虎科技有限公司 Processing method and system of network link

Also Published As

Publication number Publication date
CN108989069A (en) 2018-12-11

Similar Documents

Publication Publication Date Title
US11012261B2 (en) Associating VXLANs with tunnels
CN107466079B (en) Automatic relay switching method and device
US8438307B2 (en) Method and device of load-sharing in IRF stack
CN110417569B (en) Network link fault processing method and tunnel endpoint equipment
US10277454B2 (en) Handling failure of stacking system
WO2015188579A1 (en) Distributed virtual firewall apparatus and method, and firewall controller
RU2612599C1 (en) Control device, communication system, method for controlling switches and program
CN105049502B (en) The method and apparatus that device software updates in a kind of cloud network management system
CN113542008A (en) Network OAM method and device
US20200067821A1 (en) Loop check packets
CN104283802A (en) Neighbor discovery method and device
CN104980293A (en) Method and device for quickly transmitting and detecting OAM message
CN108574583A (en) A kind of device updating method and access device
CN105530115A (en) Method and device for realizing operation management and maintenance function
CN108989069B (en) Network link detection method, electronic equipment and computer storage medium
JP2022523452A (en) Data processing method and equipment
CN107465621A (en) A kind of router finds method, SDN controllers, router and network system
CN106230658B (en) A kind of method and apparatus monitoring the network equipment
CN112583736A (en) Signaling message distribution method, device, equipment and medium
CN109510730A (en) Distributed system and its monitoring method, device, electronic equipment and storage medium
CN110661836B (en) Message routing method, device and system, and storage medium
CN110248156B (en) Video analysis method, platform equipment, intelligent camera and intelligent monitoring system
CN113938405A (en) Data processing method and device
CN109286583A (en) A kind of controller network port management method, device, equipment and storage medium
US11800262B2 (en) Service path switching method and related device

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