CN112866118B - Method, device and storage medium for detecting port capability information of network equipment - Google Patents

Method, device and storage medium for detecting port capability information of network equipment Download PDF

Info

Publication number
CN112866118B
CN112866118B CN201911099847.9A CN201911099847A CN112866118B CN 112866118 B CN112866118 B CN 112866118B CN 201911099847 A CN201911099847 A CN 201911099847A CN 112866118 B CN112866118 B CN 112866118B
Authority
CN
China
Prior art keywords
capability information
port capability
network device
network
lldp
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
CN201911099847.9A
Other languages
Chinese (zh)
Other versions
CN112866118A (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.)
Beijing Huawei Digital Technologies Co Ltd
Original Assignee
Beijing Huawei Digital 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 Beijing Huawei Digital Technologies Co Ltd filed Critical Beijing Huawei Digital Technologies Co Ltd
Priority to CN201911099847.9A priority Critical patent/CN112866118B/en
Publication of CN112866118A publication Critical patent/CN112866118A/en
Application granted granted Critical
Publication of CN112866118B publication Critical patent/CN112866118B/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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • 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/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Small-Scale Networks (AREA)

Abstract

The application discloses a method and a device for detecting port capability information of network equipment and a storage medium, and belongs to the technical field of communication. The method comprises the following steps: the first network device receives and analyzes a first LLDP message sent by a second network device to obtain port capability information and an identifier of the second network device, and when the second network device is detected to be different from the port capability information of the first network device, first alarm information is generated and sent to the network management device. Therefore, in the application, the network device can detect the port capability information by itself and report the alarm information with unmatched port capability information to the network management device, wherein the alarm information carries the respective port capability information and the identifier of the two network devices, that is, the network management device can acquire the difference of the port capability information and the corresponding link information. And the LLDP protocol is not limited to a management domain, so that the scheme can automatically detect the difference of the port capability information of the network equipment at two ends of the link of the whole network.

Description

Method, device and storage medium for detecting port capability information of network equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for detecting port capability information of a network device, and a storage medium.
Background
At present, the variety of network devices is increasingly diversified, and the respective port capability information is complicated, and if the port capability information between two network devices is different, the two network devices may be abnormal in the communication process. For example, the frame gap configured by network device a and network device B may be different, the frame gap may represent a minimum time interval between two adjacent frame data that can be processed by the network device, and assuming that the frame gap of network device a is smaller than the frame gap of network device B, when network device a continuously transmits frame data to network device B, since the number of frame data that can be processed by network device B in a unit time is smaller than the number of frame data transmitted by network device a in a unit time, network device B may lose packets or crash due to too late processing of accumulated frame data. Therefore, in order to better maintain the operation of the communication network, the network management device needs to know the port capability information of each network device.
In the related art, for a plurality of network devices in a management domain, it is necessary to manually trigger the network management device to query port capability information of the network devices in the management domain, and compare the port capability information among the network devices, so as to maintain operation of a communication network in the management domain. But manual methods are less operational and inefficient in detecting port capability information of the network device. For network devices not belonging to the management domain, due to the permission problem, port capability information of the network devices not belonging to the management domain cannot be detected in the related art at present.
Disclosure of Invention
The application provides a method and a device for detecting port capability information of network equipment and a storage medium, which can solve the problems that the operability and the detection efficiency of manually inquiring the port capability information of the network equipment in the related technology are low, and cross-domain detection cannot be realized. The technical scheme is as follows:
in a first aspect, a method for detecting port capability information of a network device is provided, where the method includes: receiving a Link Layer Discovery Protocol (LLDP) message sent by a second network device, where the first LLDP message carries port capability information of the second network device and an identifier of the second network device; analyzing the first LLDP message to obtain port capability information of the second network equipment and an identifier of the second network equipment; when detecting that the port capability information of the second network equipment is different from the port capability information of the second network equipment, generating first alarm information, wherein the first alarm information carries the port capability information of the first network equipment, the port capability information of the second network equipment, the identification of the first network equipment and the identification of the second network equipment; and sending the first alarm information to network management equipment, wherein the first alarm information is used for indicating that the port capability information between the first network equipment and the second network equipment is not matched.
The method for detecting the port capability information of the network device provided by the embodiment of the application is implemented based on the LLDP protocol, and the second network device can carry the port capability information of the second network device and the identifier of the second network device in the first LLDP message and send the first network device capable of communicating with the second network device. For the first network device, the first network device may receive a first LLDP packet sent by the second network device. The first network device refers to any one of network devices in the whole network, the second network device refers to any one of network devices in the whole network except the first network device, and the first network device can communicate with the second network device.
It should be noted that the port capability information in the embodiment of the present application may indicate information of capability of the network device to process data, for example, the port capability information may include a frame gap or a Maximum Transmission Unit (MTU). The port capability information may also include optical module information of the network device, and the like, which is not limited in this embodiment of the present application. In addition, the port capability information carried in one LLDP packet may include one or more of frame gap, MTU, optical module information, and the like, and may be determined according to the actual LLDP protocol specification, and the port capability information is described as one information below.
In addition, an LLDP message generated based on an LLDP protocol may carry a source Media Access Control (MAC) address, where the source MAC address refers to a physical address of a network device that sends the LLDP message, each network device has a unique physical address, and the source MAC address may be carried in a message header of the LLDP message. Based on this, the LLDP message sent by the network device carries the MAC address of the network device, and the MAC address can be used as the identifier of the network device. In addition, the network devices in this embodiment may be types of devices such as a router, a switch, and a Packet Transport Network (PTN) device, and the types of different network devices may be the same or different, that is, the first network device may be the same as or different from the second network device.
In this embodiment, the first network device may analyze the first LLDP packet to obtain the port capability information of the second network device and the identifier of the second network device.
In this embodiment of the present application, a data segment in an LLDP message generated based on an LLDP protocol is an LLDP data unit (LLDPDU), and before forming the LLDPDU, a network device may encapsulate its own device information into type-length-value (TLV) fields, and then combine one or more TLV fields into a data part encapsulated in the LLDP message by the LLDPDU, that is, the TLV fields are units forming the LLDPDU, where each TLV field may represent one piece of information, each TLV field corresponds to one field type (type), each field type may correspond to one piece of device information, and each type of TLV field may carry a corresponding field type and a type of device information corresponding to the field type.
Based on the above description, in this embodiment of the present application, parsing the first LLDP packet to obtain the port capability information of the second network device includes: and analyzing a TLV field with a field type of a target type from the first LLDP message, taking the analyzed TLV field as a target TLV field, acquiring port capability information carried by the target TLV field, and taking the acquired port capability information as the port capability information of the second network equipment.
It should be noted that, because the port capability information of the network device may include frame gap, MTU, optical module information, or the like, in this embodiment of the present application, a field type may be determined for each type of port capability information in advance, and specifically, which reserved field is selected to carry which type of port capability information may be determined according to an actual requirement, which is not limited in this embodiment of the present application.
In addition, the port capability information carried by the target TLV field is acquired, which includes: and acquiring the field length carried by the target TLV field, taking the acquired field length as a target length, and acquiring the port capability information carried by the target TLV field according to the target length.
In this embodiment of the present application, the target TLV field may include three data segments, namely, a field type, a field length, and port capability information, the sequence of the three data segments may sequentially include the field type, the field length, and the port capability information, and a data length occupied by the data segment of the port capability information is equal to a specific length value carried in the data segment of the field length. After the first network device obtains the target TLV field from the first LLDP packet through parsing, a specific length value carried by a field length in the target TLV field may be obtained, the obtained specific length value is used as a target length, and data with a data length equal to the target length is read from a last bit data of the field length, which is the data field, and is used as port capability information of the second network device.
It should be noted that, because the embodiment of the present application is implemented based on the LLDP protocol, in the embodiment of the present application, the LLDP protocol may be configured on each network device in the entire network in advance, a field type corresponding to a target TLV field is specified in the configured LLDP protocol, a data length occupied by the field type is specified, a data length occupied by a field length included in the target TLV field is specified, the target TLV field is specified for transmitting the port capability information, and the data length occupied by the port capability information is equal to the target length.
In this embodiment of the present application, after the first network device analyzes the first LLDP packet to obtain the port capability information of the second network device, it may be detected whether the port capability information of the second network device is the same as the port capability information of the first network device, when it is detected that the port capability information of the second network device is the same as the port capability information of the first network device, no processing may be performed, when it is detected that the port capability information of the second network device is different from the port capability information of the first network device, the first warning information may be generated, and the first warning information may carry the port capability information of the first network device, the port capability information of the second network device, the identifier of the first network device, and the identifier of the second network device.
As can be seen from the above, the network device in the embodiment of the present application may automatically detect the port capability information according to the LLDP packet, and generate the alarm information when the port capability information between the two network devices is different.
In this embodiment, after the first network device generates the first alarm information, the first alarm information may be sent to the network management device, where the first alarm information is used to indicate that port capability information between the first network device and the second network device is not matched. Therefore, the network management device can acquire the difference of the port capability information of the network devices at the two ends of the link formed by the first network device and the second network device, so as to inform the network management personnel that the current port capability information of the two network devices is not matched, which may cause a problem in the communication between the two network devices, that is, the network management personnel can acquire the possible problems in the operation of the current communication network in time, and can take measures to maintain the operation of the communication network in time.
In an embodiment of the present application, the method further includes: generating a second LLDP message, wherein the second LLDP message carries the port capability information of the first network equipment and the identifier of the first network equipment; and sending a second LLDP message to the plurality of network devices to indicate the plurality of network devices to send second alarm information to the network management device when detecting that the port capability information of the plurality of network devices is different from the port capability information of the first network device, wherein the second alarm information carries the port capability information of the plurality of network devices, the identification of the plurality of network devices, and the identification of the plurality of network devices.
The second LLDP message in the embodiment of the present application may also include a target TLV field, where the target TLV field may include three data fields, namely a field type, a field length, and port capability information, and the three data fields in the target TLV field in the second LLDP message also conform to the provisions of the LLDP protocol configured in advance for the whole network.
In this embodiment of the present application, sending the second LLDP packet to the multiple network devices includes: acquiring addresses of a plurality of network devices, wherein the plurality of network devices are network devices capable of communicating with a first network device; and sending a second LLDP message to the plurality of network devices according to the addresses of the plurality of network devices and in a multicast mode.
Because the destination MAC address carried by the LLDP packet specified by the LLDP protocol is a fixed multicast MAC address 0x0180-C200-000E, the first network device may use the destination MAC address as the addresses of the plurality of network devices, and send the second LLDP packet to the plurality of network devices according to the destination MAC address and in a multicast manner. Or a plurality of MAC addresses of a plurality of network devices capable of communicating with the first network device may also be acquired, a multicast MAC address is generated according to the plurality of MAC addresses, the multicast MAC address is used as a destination MAC address of the second LLDP packet, and the second LLDP packet is sent to the plurality of network devices in a multicast manner according to the destination MAC address.
In this embodiment of the present application, generating the second LLDP message includes, but is not limited to, the following manners: when the time length between the current time and the last time is detected to be the cycle length, generating a second LLDP message, wherein the last time refers to the time of sending the second LLDP message last time before the current time; and when detecting that the port capability information of the LLDP is updated, generating a second LLDP message, wherein the port capability information carried by the second LLDP message is the updated port capability information.
The first network device may periodically send the second LLDP packet to the plurality of network devices, and may also immediately send the second LLDP packet carrying the updated port capability information to the plurality of network devices when the port capability information of the first network device is updated, so that each of the plurality of network devices may timely acquire the latest port capability information of the first network device, and determine whether to send the alarm information to the network management device according to the latest port capability information.
In a second aspect, a device for detecting port capability information of a network device is provided, where the device for detecting port capability information has a function of implementing the behavior of the method for detecting port capability information in the first aspect. The device for detecting port capability information includes at least one module, and the at least one module is configured to implement the method for detecting port capability information provided by the first aspect.
In a third aspect, a first network device is provided, where the first network device includes a processor and a memory, and the memory is used to store a program for executing the method for detecting port capability information provided in the first aspect, and store data used to implement the method for detecting port capability information provided in the first aspect. The processor is configured to execute programs stored in the memory. The first network device may further comprise a communication bus for establishing a connection between the processor and the memory.
In a fourth aspect, a computer-readable storage medium is provided, which stores instructions that, when executed on a computer, cause the computer to execute the method for detecting port capability information according to the first aspect.
In a fifth aspect, a computer program product containing instructions is provided, which when run on a computer causes the computer to perform the method for detecting port capability information according to the first aspect.
The technical effects obtained by the above second, third, fourth and fifth aspects are similar to the technical effects obtained by the corresponding technical means in the first aspect, and are not described herein again.
The technical scheme provided by the application can at least bring the following beneficial effects:
in the application, the first network device may receive and analyze the first LLDP packet to obtain the port capability information and the identifier of the second network device, generate the first alarm information when detecting that the port capability information of the second network device is different from the second port capability information of the first network device, and send the first alarm information to the network management device. Therefore, in the application, the network device can automatically detect the port capability information according to the LLDP message, and can report the alarm information with unmatched port capability information to the network management device, where the alarm information carries the respective port capability information and the identifier of the first network device and the second network device, that is, the network management device can obtain the difference of the port capability information of the network device and the corresponding link information. The method and the device are realized based on the LLDP protocol, the LLDP protocol has no limit of a management domain, namely the LLDP message in the method and the device can be sent across the management domain, so that the network management device can acquire the difference of port capability information of the network devices at two ends of a link of the whole network. Therefore, the scheme can improve the detection efficiency of the port capability information difference of the network equipment at the two ends of the link of the whole network and improve the maintenance efficiency of the operation of the communication network.
Drawings
Fig. 1 is a system architecture diagram according to a method for detecting port capability information of a network device provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of a device for detecting port capability information of a network device according to an embodiment of the present application;
fig. 3 is a flowchart of a method for detecting port capability information of a network device according to an embodiment of the present application;
fig. 4 is a flowchart of another method for detecting port capability information of a network device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a device for detecting port capability information of a network device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a detection apparatus for port capability information of another network device according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Fig. 1 is a diagram of a system architecture according to a method for detecting port capability information of a network device shown in an embodiment of the present application, where the system architecture includes a first network device 101, a second network device 102, and a network management device 103, and the system architecture may further include another network device 104 besides the first network device 101 and the second network device 102. The first network device 101 is any network device in the system architecture, and the second network device 103 is any network device in the system architecture except for the first network device 101. Two network devices in the system architecture can be connected in a wireless or wired manner for communication, and any network device in the system architecture can also be connected in a wireless or wired manner for communication with the network management device 103.
The first network device 101 may be configured to receive a first LLDP packet sent by the second network device 102, and send first alarm information to the network management device 103 when it is detected that port capability information of the first network device is different from port capability information carried in the received first LLDP packet. The first network device 101 may be further configured to send the second LLDP packet to a plurality of network devices, where the plurality of network devices are network devices capable of communicating with the first network device.
The second network device 102 may also be configured to receive and send an LLDP packet, and send alarm information to the network management device 103, that is, the second network device 102 may implement the method for detecting port capability information provided in this embodiment of the present application.
The network management device 103 may be configured to receive alarm information sent by the first network device 101, the second network device 102, and the other network devices 104, so as to obtain a difference between port capability information of the network devices in the system architecture, which is beneficial to improving efficiency of maintaining operation of a communication network between network devices in the entire network.
It should be noted that the network devices in the system architecture may be a router, a switch, a PTN device, and the like, types of any two network devices may be the same or different, the network management device may be a desktop computer, a notebook computer, and the like, and may also be a server cluster formed by one server and a plurality of servers, which is not limited in this embodiment of the present application.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a device for detecting port capability information of a network device according to an embodiment of the present application, where the device for detecting port capability information may be the first network device shown in fig. 1. The detection device of port capability information comprises at least one processor 201, a communication bus 202, a memory 203 and at least one communication interface 204.
The processor 201 may be a general-purpose Central Processing Unit (CPU), a Network Processor (NP), a microprocessor, or may be one or more integrated circuits such as an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof, for implementing the aspects of the present disclosure. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
A communication bus 202 is used to transfer information between the above components. The communication bus 202 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
Memory 203 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), a magnetic disc storage medium, or other magnetic storage device, or any other medium which can be used to carry or store desired program code in the form of instructions or data structures and which can be accessed by a computer, but is not limited to such. The memory 203 may be self-contained and coupled to the processor 201 via the communication bus 202. The memory 203 may also be integrated with the processor 201.
The communication interface 204 uses any transceiver or the like for communicating with other devices or communication networks. The communication interface 204 includes a wired communication interface, and may also include a wireless communication interface. The wired communication interface may be an ethernet interface, for example. The ethernet interface may be an optical interface, an electrical interface, or a combination thereof. The wireless communication interface may be a Wireless Local Area Network (WLAN) interface, a cellular network communication interface, or a combination thereof.
In particular implementations, processor 201 may include one or more CPUs, such as CPU0 and CPU1 shown in fig. 2 as one embodiment.
In a specific implementation, the device for detecting port capability information may include a plurality of processors, such as the processor 201 and the processor 205 shown in fig. 2, as an embodiment. Each of these processors may be a single-Core Processor (CPU) or a multi-Core Processor (CPU). A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
In a specific implementation, the device for detecting port capability information may further include an output device 206 and an input device 207, as an embodiment. The output device 206 is in communication with the processor 201 and may display information in a variety of ways. For example, the output device 206 may be a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display device, a Cathode Ray Tube (CRT) display device, a projector (projector), or the like. The input device 207 is in communication with the processor 201 and may receive user input in a variety of ways. For example, the input device 207 may be a mouse, a keyboard, a touch screen device, a sensing device, or the like.
In some embodiments, the memory 203 is used to store program code 210 for performing aspects of the present application, and the processor 201 may execute the program code 210 stored in the memory 203. That is, the device for detecting port capability information may implement the method for detecting port capability information of a network device provided in the embodiment of fig. 3 below through the processor 201 and the program code 210 in the memory 203.
It should be noted that, in this embodiment, a schematic structural diagram of any one of the second network device and the other network devices may be as shown in fig. 2.
Fig. 3 is a flowchart of a method for detecting port capability information of a network device according to an embodiment of the present application, where the method may be applied to a first network device. Referring to fig. 3, the method includes the following steps.
Step 301: and receiving a first LLDP message sent by the second network equipment, wherein the first LLDP message carries the port capability information of the second network equipment and the identifier of the second network equipment.
The method for detecting the port capability information of the network device provided by the embodiment of the application is realized based on an LLDP protocol, and the second network device can carry the port capability information of itself and the identifier of itself in the first LLDP message and send the first LLDP message to the first network device which can communicate with the second network device. For the first network device, the first network device may receive a first LLDP packet sent by the second network device. The first network device refers to any one of network devices in the whole network, the second network device refers to any one of network devices in the whole network except the first network device, and the first network device can communicate with the second network device.
It should be noted that the port capability information in the embodiment of the present application may indicate information of capability of the network device to process data, for example, the port capability information may include a frame gap or an MTU. The frame gap may represent a minimum time interval between two adjacent data frames that can be processed by the network device, and a unit of the frame gap may be a byte, that is, the frame gap may actually refer to a minimum byte length that needs to be spaced between two adjacent data frames. In some embodiments, the frame gap may be referred to as ipg (ipg gap) or ifg (ifg gap). MTU refers to the data size of the largest packet that a network device can handle. The port capability information may also include optical module information of the network device, and the like, which is not limited in this embodiment of the present application. In addition, the port capability information carried in one LLDP packet may include one or more of frame gap, MTU, optical module information, and the like, and may be determined according to the actual LLDP protocol specification, and the port capability information is described as one information below.
In addition, the LLDP message generated based on the LLDP protocol may carry a source MAC address, where the source MAC address refers to a physical address of a network device that sends the LLDP message, each network device has a unique physical address, and the source MAC address may be carried in a message header of the LLDP message. Based on this, the LLDP message sent by the network device carries the MAC address of the network device, and the MAC address can be used as the identifier of the network device. In addition, the network devices in the embodiment of the present application may be types of devices such as a router, a switch, and a PTN device, and the types of different network devices may be the same or different, that is, the first network device may be the same as or different from the second network device.
For example, assuming that the first network device is a switch, the second network device is a router, the identifier of the network device is a MAC address, and the port capability information is a frame gap, the switch may receive a first LLDP packet sent by the router, where the first LLDP packet may carry the frame gap of the router and the MAC address of the router.
Step 302: and analyzing the first LLDP message to obtain the port capability information of the second network equipment and the identifier of the second network equipment.
In this embodiment, the first network device may analyze the first LLDP packet to obtain the port capability information of the second network device and the identifier of the second network device.
For example, assuming that the first network device is a switch, the second network device is a router, the identifier of the network device is a MAC address, and the port capability information is a frame gap, the switch may parse the first LLDP packet to obtain the frame gap and the MAC address of the router.
In this embodiment of the present application, a data segment in an LLDP message generated based on an LLDP protocol is an LLDPDU, before the LLDPDU is formed, a network device may encapsulate its own device information into TLV fields, and then combine one or more TLV fields into a data part encapsulated in an LLDPDU packet, that is, the TLV fields are units forming the LLDPDU, where each TLV field may carry one type of information, each TLV field corresponds to one field type (type), each field type may correspond to one device information, and each type of TLV field may carry a corresponding field type and a type of device information corresponding to the field type.
Table 1 shows TLV fields of some field types and descriptions of the field types shown in the embodiments of the present application, and referring to table 1, TLV fields with type 3 are fields that must be carried as specified by the LLDP protocol, TLV fields with type 4-8 are fields that can be optionally carried, and TLV fields with type 9-126 are reserved fields. The type is 3, which indicates the lifetime of the device information carried in the LLDP packet on the network device that receives the LLDP packet, and the type is 5, which indicates that the TLV field carries the device name of the network device.
TABLE 1
Figure BDA0002269495810000081
Based on the above description, in this embodiment of the application, the first network device may analyze a TLV field whose field type is a target type from the first LLDP message, use the analyzed TLV field as a target TLV field, acquire the port capability information carried in the target TLV field, and use the acquired port capability information as the port capability information of the second network device.
As can be seen from the foregoing, the TLV fields with field types 9 to 126 are reserved fields, and therefore, one of the field types may be selected as a target type to implement the detection method for providing port capability information of a network device according to the embodiment of the present application. Exemplarily, it is assumed that the port capability information is a frame gap, and the target type is 125, that is, the TLV field carrying the field type of 125 is a target TLV field. After receiving the first LLDP packet, the second network device may analyze a TLV field with a field type of 125 from the first LLDP packet, use the TLV field as a target TLV field, acquire a frame gap carried by the target TLV field, and use the acquired frame gap as a frame gap of the second network device.
It should be noted that, because the port capability information of the network device may include frame gap, MTU, optical module information, and the like, in this embodiment of the present application, a field type may be determined in advance for each type of port capability information, for example, a field type may be determined to be 125 for a frame gap, a field type is determined to be 124 for an MTU, and a field type is determined to be 123 for optical module information. Specifically, which reserved field is selected to carry which port capability information may be determined according to actual requirements, which is not limited in the embodiment of the present application.
In addition, the TLV field may also carry a field length, and the first network device may acquire the field length carried by the target TLV field, use the acquired field length as a target length, and acquire the port capability information carried by the target TLV field according to the target length.
In this embodiment of the present application, the target TLV field may include three data segments, namely, a field type, a field length, and port capability information, the sequence of the three data segments may sequentially be the field type, the field length, and the port capability information, and a data length occupied by the data segment of the port capability information is equal to a specific length value carried in the data segment of the field length. After the first network device obtains the target TLV field from the first LLDP packet through parsing, a specific length value carried by a field length in the target TLV field may be obtained, the obtained specific length value is used as a target length, and data with a data length equal to the target length is read from a last bit data of the field length, which is the data field, and is used as port capability information of the second network device.
Exemplarily, assuming that the target type is equal to 125, the target length is 2 bytes, and the port capability information is a frame gap, after the first network device obtains the target TLV field from the first LLDP packet by parsing, it may obtain that the field length carried by the target TLV field is 2 bytes, use the 2 bytes as the target length, and read the 2 bytes of data after the last bit of data of the data field of the field length, as the frame gap of the second network device.
It should be noted that, because the embodiment of the present application is implemented based on the LLDP protocol, the embodiment of the present application may configure the LLDP protocol on each network device in the entire network in advance, and specify a field type corresponding to the target TLV field in the configured LLDP protocol, specify a data length occupied by the field type, specify a data length occupied by a field length included in the target TLV field, specify that the target TLV field is used for transmitting the port capability information, and specify that the data length occupied by the port capability information is equal to the target length.
Illustratively, the target TLV field may carry three data segments of a field type followed by the field length and followed by the port capability information. Referring to table 2, the port capability information shown in table 2 is a frame gap, in the embodiment of the present application, a data length occupied by a field type included in a target TLV field specified by the LLDP protocol is 7 bits and has a value of 125, a data length occupied by a byte length included in the target TLV field is 9 bits and has a value of 2 bytes, a data length occupied by the frame gap is equal to 2 bytes, and a range of the value may be 8-12 bytes. Wherein the value of each data can be updated according to the actual situation. Assuming that the data carried by the target TLV field is "125", "2", and "8", where the data length occupied by "125" is 7 bits, the data length occupied by "2" is 9 bits, and the data length occupied by "8" is 2 bytes, after the target TLV field is obtained by parsing, the first network device may obtain corresponding data according to the data lengths occupied by the three data segments, after the value of the field length is obtained as 2, the data of 2 bytes may be read from the last bit of the data segment of the field length, and the read data is 8, that is, the frame gap of the obtained second network device is 8 bytes.
TABLE 2
Width (data length) Fields Description (Description)
7bits type (field type) 125
9bits length (field length) 2
2bytes IPG/IFG value (frame gap) 8-12
It should be noted that, in the embodiment of the present application, a network device may be newly added, or a certain network device may not be configured with the LLDP protocol for other reasons, or the configured LLDP protocol may not specify to use the target TLV field in the embodiment of the present application, that is, the network device may not recognize the target TLV field. In this case, after receiving the LLDP packet, the network device may not process the target TLV field, and for other TLV fields in the LLDP packet, the network device may analyze the target TLV field normally, that is, the target TLV field included in the LLDP packet in this embodiment does not affect the function that the original LLDP protocol can implement.
Step 303: when detecting that the port capability information of the second network device is different from the port capability information of the second network device, generating first alarm information, wherein the first alarm information carries the port capability information of the first network device, the port capability information of the second network device, the identifier of the first network device and the identifier of the second network device.
In this embodiment of the present application, after the first network device analyzes the first LLDP packet to obtain the port capability information of the second network device, it may be detected whether the port capability information of the second network device is the same as the port capability information of the first network device, when it is detected that the port capability information of the second network device is the same as the port capability information of the first network device, no processing may be performed, when it is detected that the port capability information of the second network device is different from the port capability information of the first network device, the first warning information may be generated, and the first warning information may carry the port capability information of the first network device, the port capability information of the second network device, the identifier of the first network device, and the identifier of the second network device.
Illustratively, still taking the port capability information as the frame gap, assume that the first network device is a router, the frame gap of the router is 8 bytes, and the MAC address is MAC1, and the second network device is a switch, the frame gap of the switch is 10 bytes, and the MAC address is MAC 2. After the router analyzes the first LLDP packet sent by the switch to obtain the frame gap of the router, if it is detected that the frame gap of the switch is different from the frame gap of the router, the router may generate first alarm information, where the frame gap corresponding to the first alarm information carrying MAC1 is 8 bytes, and the frame gap corresponding to MAC2 is 10 bytes.
As can be seen from the above, the network device in the embodiment of the present application may automatically detect the port capability information according to the LLDP message, and generate the alarm information when the port capability information between two network devices is different.
Step 304: and sending first alarm information to the network management equipment, wherein the first alarm information is used for indicating that the port capability information between the first network equipment and the second network equipment is not matched.
In this embodiment, after the first network device generates the first alarm information, the first alarm information may be sent to the network management device to indicate that the port capability information between the first network device and the second network device is not matched. Therefore, the network management device can acquire the difference of the port capability information of the network devices at the two ends of the link formed by the first network device and the second network device, so as to inform the network management personnel that the current port capability information of the two network devices is not matched, which may cause a problem in the communication between the two network devices, that is, the network management personnel can acquire the possible problems in the operation of the current communication network in time, and can take measures to maintain the operation of the communication network in time.
In the foregoing, the first network device may receive and process the first LLDP packet sent by the second network device, and in this embodiment, the first network device may further generate a second LLDP packet and send the second LLDP packet to the plurality of network devices, which will be described in detail below.
In this embodiment of the present application, the first network device may further generate a second LLDP packet, where the second LLDP packet carries the port capability information of the first network device and the identifier of the first network device. The first network device may send a second LLDP packet to the multiple network devices to indicate that the multiple network devices send second alarm information to the network management device when detecting that the port capability information of the multiple network devices is different from the port capability information of the first network device, where the second alarm information carries the port capability information of the multiple network devices and the port capability information of the first network device, and an identifier of the multiple network devices and an identifier of the first network device.
The second LLDP message in this embodiment of the application may also include a target TLV field, where the target TLV field may include three data segments, namely a field type, a field length, and port capability information, and the three data segments in the target TLV field in the second LLDP message also conform to the specification of the LLDP protocol configured in advance in the whole network.
In this embodiment of the present application, the LLDP packet may be sent periodically, and the first network device may send the second LLDP packet to the multiple network devices every other period length. That is, when it is detected that the time length between the current time and the last time is the cycle length, the first network device may generate the second LLDP packet and send the second LLDP packet to the plurality of network devices. The last time refers to the time of sending the second LLDP packet last time before the current time.
In addition, the user may update the port capability information of the network device, and based on this, when the first network device detects that the port capability information of the first network device is updated, a second LLDP message may be generated and sent to the multiple network devices, where the port capability information carried in the second LLDP message at this time is the updated port capability information.
As can be seen from the foregoing, the first network device may periodically send the second LLDP packet to the multiple network devices, and may also immediately send the second LLDP packet carrying the updated port capability information to the multiple network devices when the port capability information of the first network device is updated, so that each network device in the multiple network devices may timely acquire the latest port capability information of the first network device, and determine whether to send the alarm information to the network management device according to the latest port capability information.
It should be noted that, in the embodiment of the present application, the manner in which the network device periodically sends the LLDP packet and the manner in which the LLDP packet is sent immediately when the port capability information is updated may be used alone or in combination, that is, the network device may send only periodically, or send only immediately when the port capability information is updated, or send immediately when the port capability information is detected to be updated in the process of periodically sending by the network device. In this embodiment, the two modes may be used in combination, so that each network device may notify the latest port capability information of other network devices in time through an immediate sending mode, and for a newly added network device and a network device that has just configured an LLDP protocol, the port capability information of other network devices may be obtained through LLDP messages periodically sent by other network devices.
Exemplarily, assuming that the cycle length is 3 seconds, the port capability information is a frame gap, and the frame gap of the first network device is 9 bytes, the first network device may send a second LLDP packet carrying the frame gap of 9 bytes to the multiple network devices every 3 seconds in a multicast manner, and when the first network device detects that the frame gap of itself is updated to 8 bytes, may generate the second LLDP packet carrying the frame gap of 8 bytes, and immediately send the LLDP packet to the multiple network devices.
The method and the device for sending the second LLDP message are achieved based on an LLDP protocol, the LLDP message is sent in a multicast mode, on the basis, the first network device can obtain addresses of a plurality of network devices, the plurality of network devices refer to network devices capable of communicating with the first network device, and the first network device can send the second LLDP message to the plurality of network devices in the multicast mode according to the addresses of the plurality of network devices.
Because the destination MAC address carried by the LLDP packet specified by the LLDP protocol is a fixed multicast MAC address 0x0180-C200-000E, the first network device may use the destination MAC address as the addresses of the plurality of network devices, and send the second LLDP packet to the plurality of network devices according to the destination MAC address and in a multicast manner. Or, a plurality of MAC addresses of a plurality of network devices capable of communicating with the first network device may be acquired, a multicast MAC address is generated according to the plurality of MAC addresses, the multicast MAC address is used as a destination MAC address of the second LLDP packet, and the second LLDP packet is sent to the plurality of network devices according to the destination MAC address in a multicast manner.
It should be noted that, in the embodiment of the present application, the multicast MAC address may also be updated according to an actual situation, and the updated multicast MAC address is used as the addresses of the multiple network devices.
As can be seen from the foregoing, in this embodiment of the present application, all network devices configured with the LLDP protocol specified in this embodiment of the present application may implement the method for detecting port capability information provided in this embodiment of the present application, referring to fig. 4, assuming that the port capability information is a frame gap, a network device 1 and a network device 2 may perform communication therebetween, the network device 1 may periodically send an LLDP packet carrying a frame gap thereof according to a multicast manner, and the network device 2 may receive and analyze the frame gap of the network device 1, and if it is detected that the frame gap of the network device 1 is not consistent with the frame gap of the network device 2, alarm information may be reported to a network management device, and if it is consistent, an alarm may be eliminated. The network device 2 may also periodically send an LLDP packet carrying its own frame gap in a multicast manner, the network device 1 may receive and analyze the LLDP packet to obtain the frame gap of the network device 2, if the frame gap of the network device 2 is not consistent with the frame gap of the network device 1, the network device may report the alarm information to the network management device, and if the frame gap of the network device 2 is consistent with the frame gap of the network device 1, the alarm may be eliminated.
In summary, in this embodiment of the present application, the first network device may receive and analyze the first LLDP packet to obtain the port capability information and the identifier of the second network device, and when it is detected that the port capability information of the second network device is different from the second port capability information of the first network device, generate the first alarm information, and send the first alarm information to the network management device. Therefore, in the embodiment of the present application, the network device may automatically detect the port capability information according to the LLDP message, and may report the alarm information that the port capability information is not matched to the network management device, where the alarm information carries the respective port capability information and the identifier of the first network device and the second network device, that is, the network management device may obtain the difference of the port capability information of the network device and the corresponding link information. The embodiment of the present application is implemented based on the LLDP protocol, and the LLDP protocol has no limitation of the management domain, that is, the LLDP packet in the embodiment of the present application may be sent across the management domain, so that the network management device may obtain the difference of the port capability information of the network devices at both ends of the link in the whole network. Therefore, the scheme can improve the detection efficiency of the port capability information difference of the network equipment at the two ends of the link of the whole network and improve the maintenance efficiency of the operation of the communication network.
Fig. 5 is a schematic structural diagram of a device for detecting port capability information of a network device according to an embodiment of the present application, where the device 500 for detecting port capability information is implemented by software, hardware, or a combination of the two, and the device for detecting port capability information may be a device for detecting port capability information of the network device shown in fig. 2. Referring to fig. 5, the apparatus 500 for detecting port capability information includes: a receiving module 501, a parsing module 502, a first generating module 503 and a first sending module 504.
A receiving module 501, configured to receive a first LLDP packet sent by a second network device, where the first LLDP packet carries port capability information of the second network device and an identifier of the second network device;
an analyzing module 502, configured to analyze the first LLDP packet to obtain port capability information of the second network device and an identifier of the second network device;
a first generating module 503, configured to generate first alarm information when it is detected that port capability information of the second network device is different from port capability information of the second network device, where the first alarm information carries the port capability information of the first network device and the port capability information of the second network device, and an identifier of the first network device and an identifier of the second network device;
a first sending module 504, configured to send first alarm information to the network management device, where the first alarm information indicates that port capability information between the first network device and the second network device is not matched.
Optionally, the parsing module 502 includes:
the analyzing unit is used for analyzing a TLV field with a field type being a target type from the first LLDP message and taking the analyzed TLV field as a target TLV field;
and the first acquisition unit is used for acquiring the port capability information carried by the target TLV field and taking the acquired port capability information as the port capability information of the second network equipment.
Optionally, the first obtaining unit includes:
the first obtaining subunit is configured to obtain a field length carried by the target TLV field, and use the obtained field length as a target length;
and the second acquiring subunit is used for acquiring the port capability information carried by the target TLV field according to the target length.
Referring to fig. 6, the apparatus 500 for detecting port capability information further includes:
a second generating module 505, configured to generate a second LLDP message, where the second LLDP message carries port capability information of the first network device and an identifier of the first network device;
a second sending module 506, configured to send a second LLDP message to the multiple network devices to indicate that the multiple network devices send second alarm information to the network management device when detecting that port capability information of the multiple network devices is different from port capability information of the first network device, where the second alarm information carries port capability information of the multiple network devices and port capability information of the first network device, and an identifier of the multiple network devices and an identifier of the first network device.
Optionally, the second sending module 506 includes:
a second acquiring unit configured to acquire addresses of the plurality of network devices, where the plurality of network devices are network devices that can communicate with the first network device;
and the sending unit is used for sending the second LLDP message to the plurality of network devices according to the addresses of the plurality of network devices and in a multicast mode.
Optionally, the second generating module 505 includes, but is not limited to, the following:
the first generating unit is used for generating a second LLDP message when detecting that the time length between the current time and the last time is a cycle length, wherein the last time is the time of sending the second LLDP message last time before the current time;
and the second generating unit is used for generating a second LLDP message when the update of the port capability information of the second LLDP is detected, wherein the port capability information carried by the second LLDP message is the updated port capability information.
Optionally, the port capability information includes a frame gap or an MTU.
In summary, in this embodiment of the present application, the first network device may receive and analyze the first LLDP packet to obtain the port capability information and the identifier of the second network device, and when it is detected that the port capability information of the second network device is different from the second port capability information of the first network device, generate the first alarm information, and send the first alarm information to the network management device. Therefore, in the embodiment of the present application, the network device may automatically detect the port capability information according to the LLDP message, and may report the alarm information that the port capability information is not matched to the network management device, where the alarm information carries the respective port capability information and the identifier of the first network device and the second network device, that is, the network management device may obtain the difference of the port capability information of the network device and the corresponding link information. The embodiment of the present application is implemented based on the LLDP protocol, and the LLDP protocol has no limitation of the management domain, that is, the LLDP packet in the embodiment of the present application may be sent across the management domain, so that the network management device may obtain the difference of the port capability information of the network devices at both ends of the link in the whole network. Therefore, the scheme can improve the detection efficiency of the port capability information difference of the network equipment at the two ends of the link of the whole network and improve the maintenance efficiency of the operation of the communication network.
It should be noted that: in the detection apparatus for port capability information of a network device provided in the foregoing embodiment, when detecting the port capability information of the network device, only the division of the functional modules is used for illustration, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the apparatus for detecting port capability information of a network device and the method for detecting port capability information of a network device provided in the foregoing embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments, and are not described herein again.
In the above embodiments, the implementation may be wholly or partly realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., Digital Versatile Disk (DVD)), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others. It is noted that the computer-readable storage medium referred to herein may be a non-volatile storage medium, in other words, a non-transitory storage medium.
The above-mentioned embodiments are provided not to limit the present application, and any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (15)

1. A method for detecting port capability information of a network device is applied to a first network device, and is characterized in that the method comprises the following steps:
receiving a first Link Layer Discovery Protocol (LLDP) message sent by a second network device, wherein the first LLDP message carries port capability information of the second network device and an identifier of the second network device, the port capability information is used for indicating the capability of the corresponding network device for processing data, and the port capability information includes a frame gap;
analyzing the first LLDP message to obtain port capability information of the second network equipment and an identifier of the second network equipment;
when detecting that the port capability information of the second network equipment is different from the port capability information of the second network equipment, generating first alarm information, wherein the first alarm information carries the port capability information of the first network equipment, the port capability information of the second network equipment, and the identifier of the first network equipment and the identifier of the second network equipment;
and sending the first alarm information to network management equipment, wherein the first alarm information is used for indicating that the port capability information between the first network equipment and the second network equipment is not matched.
2. The method of claim 1, wherein the parsing the first LLDP packet to obtain the port capability information of the second network device comprises:
analyzing a type-length-value TLV field with a field type being a target type from the first LLDP message, and taking the analyzed TLV field as a target TLV field;
and acquiring the port capability information carried by the target TLV field, and taking the acquired port capability information as the port capability information of the second network equipment.
3. The method of claim 2, wherein said obtaining port capability information carried by said target TLV field comprises:
acquiring the field length carried by the target TLV field, and taking the acquired field length as a target length;
and acquiring the port capability information carried by the target TLV field according to the target length.
4. The method of any of claims 1-3, wherein the method further comprises:
generating a second LLDP message, where the second LLDP message carries the port capability information of the first network device and the identifier of the first network device;
and sending the second LLDP message to a plurality of network devices to indicate that the plurality of network devices send second alarm information to the network management device when detecting that the port capability information of the plurality of network devices is different from the port capability information of the first network device, wherein the second alarm information carries the port capability information of the plurality of network devices and the port capability information of the first network device, and the identification of the plurality of network devices and the identification of the first network device.
5. The method of claim 4, wherein the sending the second LLDP packet to a plurality of network devices comprises:
acquiring addresses of the plurality of network devices, wherein the plurality of network devices refer to network devices capable of communicating with the first network device;
and sending a second LLDP message to the plurality of network devices according to the addresses of the plurality of network devices and in a multicast mode.
6. The method of claim 4, wherein the generating the second LLDP message includes but is not limited to the following:
when the time length between the current time and the last time is detected to be the cycle length, generating the second LLDP message, wherein the last time refers to the time of sending the second LLDP message last time before the current time;
and when detecting that the port capability information of the LLDP is updated, generating the second LLDP, wherein the port capability information carried by the second LLDP is the updated port capability information.
7. The method of claim 5, wherein the generating the second LLDP message includes, but is not limited to, the following:
when the time length between the current time and the last time is detected to be the cycle length, generating the second LLDP message, wherein the last time refers to the time of sending the second LLDP message last time before the current time;
and when detecting that the port capability information of the LLDP is updated, generating the second LLDP, wherein the port capability information carried by the second LLDP is the updated port capability information.
8. A detection device of port capability information of a network device, applied to a first network device, the device comprising:
a receiving module, configured to receive an LLDP message of a first link layer discovery protocol sent by a second network device, where the LLDP message carries port capability information of the second network device and an identifier of the second network device, the port capability information is used to indicate a capability of a corresponding network device to process data, and the port capability information includes a frame gap;
the analyzing module is used for analyzing the first LLDP message to obtain port capability information of the second network equipment and an identifier of the second network equipment;
a first generating module, configured to generate first alarm information when it is detected that port capability information of the second network device is different from port capability information of the second network device, where the first alarm information carries the port capability information of the first network device and the port capability information of the second network device, and an identifier of the first network device and an identifier of the second network device;
a first sending module, configured to send the first warning information to a network management device, and to indicate that port capability information between the first network device and the second network device is not matched.
9. The apparatus of claim 8, wherein the parsing module comprises:
the analyzing unit is used for analyzing a type-length-value TLV field with a field type being a target type from the first LLDP message, and taking the analyzed TLV field as a target TLV field;
a first obtaining unit, configured to obtain the port capability information carried in the target TLV field, and use the obtained port capability information as the port capability information of the second network device.
10. The apparatus of claim 9, wherein the first obtaining unit comprises:
the first obtaining subunit is configured to obtain a field length carried by the target TLV field, and use the obtained field length as a target length;
and the second acquiring subunit is configured to acquire, according to the target length, the port capability information carried in the target TLV field.
11. The apparatus of any of claims 8-10, wherein the apparatus further comprises:
a second generating module, configured to generate a second LLDP packet, where the second LLDP packet carries the port capability information of the first network device and the identifier of the first network device;
and the second sending module is used for sending the second LLDP message to a plurality of network devices so as to indicate that the plurality of network devices send second alarm information to the network management device when detecting that the port capability information of the plurality of network devices is different from the port capability information of the first network device, wherein the second alarm information carries the port capability information of the plurality of network devices and the port capability information of the first network device, and the second alarm information carries the identification of the plurality of network devices and the identification of the first network device.
12. The apparatus of claim 11, wherein the second sending module comprises:
a second obtaining unit, configured to obtain addresses of the plurality of network devices, where the plurality of network devices are network devices that can communicate with the first network device;
and the sending unit is used for sending the second LLDP message to the plurality of network devices according to the addresses of the plurality of network devices and in a multicast mode.
13. The apparatus of claim 11, in which the second generating module comprises but is not limited to the following:
a first generating unit, configured to generate the second LLDP packet when detecting that a time length between a current time and a last time is a cycle length, where the last time is a time when the second LLDP packet is sent last time before the current time;
and the second generating unit is configured to generate the second LLDP packet when it is detected that the port capability information of the second LLDP packet is updated, where the port capability information carried in the second LLDP packet is the updated port capability information.
14. The apparatus of claim 12, wherein the second generating module includes, but is not limited to, the following:
a first generating unit, configured to generate the second LLDP packet when detecting that a time length between a current time and a last time is a cycle length, where the last time is a time when the second LLDP packet is sent last time before the current time;
and the second generating unit is configured to generate the second LLDP packet when it is detected that the port capability information of the second LLDP packet is updated, where the port capability information carried in the second LLDP packet is the updated port capability information.
15. A computer-readable storage medium, characterized in that a computer program is stored in the storage medium, which computer program, when being executed by a processor, carries out the steps of the method according to any one of claims 1-7.
CN201911099847.9A 2019-11-12 2019-11-12 Method, device and storage medium for detecting port capability information of network equipment Active CN112866118B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911099847.9A CN112866118B (en) 2019-11-12 2019-11-12 Method, device and storage medium for detecting port capability information of network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911099847.9A CN112866118B (en) 2019-11-12 2019-11-12 Method, device and storage medium for detecting port capability information of network equipment

Publications (2)

Publication Number Publication Date
CN112866118A CN112866118A (en) 2021-05-28
CN112866118B true CN112866118B (en) 2022-09-02

Family

ID=75984186

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911099847.9A Active CN112866118B (en) 2019-11-12 2019-11-12 Method, device and storage medium for detecting port capability information of network equipment

Country Status (1)

Country Link
CN (1) CN112866118B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101047712A (en) * 2006-06-19 2007-10-03 华为技术有限公司 Device and method for detecting Ethernet interface configuration
CN103178997A (en) * 2013-03-19 2013-06-26 杭州华三通信技术有限公司 Same MAC (Media Access Control) address detection method and device based on LLDP (Link Layer Discovery Protocol)
CN103236941A (en) * 2013-04-03 2013-08-07 华为技术有限公司 Link discovery method and device
CN104394034A (en) * 2014-12-04 2015-03-04 上海斐讯数据通信技术有限公司 Method and system based on LLDP protocol detection link aggregation configuration
CN105450432A (en) * 2014-07-31 2016-03-30 华为技术有限公司 Method for positioning port connection error and associated equipment
CN108521341A (en) * 2018-03-23 2018-09-11 紫光华山信息技术有限公司 Message transmitting method and device
CN109905285A (en) * 2017-12-11 2019-06-18 北京华为数字技术有限公司 A kind of method and the network equipment of network management
CN110391979A (en) * 2018-04-23 2019-10-29 华为技术有限公司 A kind of network equipment stacking method, the network equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107968751B (en) * 2016-10-20 2021-01-19 中兴通讯股份有限公司 Information processing method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101047712A (en) * 2006-06-19 2007-10-03 华为技术有限公司 Device and method for detecting Ethernet interface configuration
CN103178997A (en) * 2013-03-19 2013-06-26 杭州华三通信技术有限公司 Same MAC (Media Access Control) address detection method and device based on LLDP (Link Layer Discovery Protocol)
CN103236941A (en) * 2013-04-03 2013-08-07 华为技术有限公司 Link discovery method and device
CN105450432A (en) * 2014-07-31 2016-03-30 华为技术有限公司 Method for positioning port connection error and associated equipment
CN104394034A (en) * 2014-12-04 2015-03-04 上海斐讯数据通信技术有限公司 Method and system based on LLDP protocol detection link aggregation configuration
CN109905285A (en) * 2017-12-11 2019-06-18 北京华为数字技术有限公司 A kind of method and the network equipment of network management
CN108521341A (en) * 2018-03-23 2018-09-11 紫光华山信息技术有限公司 Message transmitting method and device
CN110391979A (en) * 2018-04-23 2019-10-29 华为技术有限公司 A kind of network equipment stacking method, the network equipment and storage medium

Also Published As

Publication number Publication date
CN112866118A (en) 2021-05-28

Similar Documents

Publication Publication Date Title
US11469949B2 (en) Hierarchical configuration of networked communication devices
US11528235B2 (en) Internet of things resource subscription method, device, and system
CN108833202B (en) Method, device and computer readable storage medium for detecting fault link
US20160164963A1 (en) Method, system, and device for managing server hardware resources in a cloud scheduling environment
US20220407791A1 (en) Network performance detection method and apparatus, and network device
EP4270898A1 (en) Message processing method, device, and computer storage medium
US10470111B1 (en) Protocol to detect if uplink is connected to 802.1D noncompliant device
CN112039796B (en) Data packet transmission method and device, storage medium and electronic equipment
CN106921578B (en) Method and device for generating forwarding table item
CN110740072A (en) fault detection method, device and related equipment
CN102291465B (en) Load balancing method, device and system
CN108737221B (en) Packet loss detection method and communication link system
CN112311674B (en) Message sending method, device and storage medium
JP2015057931A (en) Network apparatus, communication system, and detection method and program for abnormal traffic
CN113098770A (en) Message sending method, routing table entry generating method, device and storage medium
US20200244579A1 (en) Flexible Ethernet Frame Forwarding Method and Apparatus
WO2022247308A1 (en) Flow measurement method and apparatus, and related device
US8886913B2 (en) Apparatus and method for identifier management
CN112866118B (en) Method, device and storage medium for detecting port capability information of network equipment
CN112019492B (en) Access control method, device and storage medium
US20230140821A1 (en) Power negotiation method for power over ethernet, power sourcing equipment, system, and storage medium
EP4319089A1 (en) Path determination method and apparatus, device, system, and computer readable storage medium
CN113114588B (en) Data processing method and device, electronic equipment and storage medium
CN116962161A (en) Path detection method, device, system and computer readable storage medium
CN113872687A (en) Optical attenuation detection method and device based on link layer discovery protocol

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