CN113872687A - Optical attenuation detection method and device based on link layer discovery protocol - Google Patents

Optical attenuation detection method and device based on link layer discovery protocol Download PDF

Info

Publication number
CN113872687A
CN113872687A CN202111135981.7A CN202111135981A CN113872687A CN 113872687 A CN113872687 A CN 113872687A CN 202111135981 A CN202111135981 A CN 202111135981A CN 113872687 A CN113872687 A CN 113872687A
Authority
CN
China
Prior art keywords
port
network device
value
light attenuation
optical
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.)
Pending
Application number
CN202111135981.7A
Other languages
Chinese (zh)
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.)
WeBank Co Ltd
Original Assignee
WeBank 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 WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN202111135981.7A priority Critical patent/CN113872687A/en
Publication of CN113872687A publication Critical patent/CN113872687A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/07Arrangements for monitoring or testing transmission systems; Arrangements for fault measurement of transmission systems
    • H04B10/075Arrangements for monitoring or testing transmission systems; Arrangements for fault measurement of transmission systems using an in-service signal
    • H04B10/079Arrangements for monitoring or testing transmission systems; Arrangements for fault measurement of transmission systems using an in-service signal using measurements of the data signal
    • H04B10/0795Performance monitoring; Measurement of transmission parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks
    • H04L69/32Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
    • H04L69/322Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
    • H04L69/324Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the data link layer [OSI layer 2], e.g. HDLC
    • 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)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a link layer discovery protocol-based optical attenuation detection method and a link layer discovery protocol-based optical attenuation detection device. Therefore, according to the scheme, the existing LLDP message is modified, so that the port light attenuation parameter field is configured in the existing LLDP message, the first network device can actively encapsulate the light attenuation parameter value of the first port in the modified LLDP message, and transmit the encapsulated LLDP message to the second network device, so that the second network device can obtain the light attenuation parameter value of the first port in time, and the debugging efficiency of a communication link between the interconnected network devices can be effectively improved.

Description

Optical attenuation detection method and device based on link layer discovery protocol
Technical Field
The embodiment of the invention relates to the field of financial technology (Fintech), in particular to a light attenuation detection method and device based on a link layer discovery protocol.
Background
With the development of computer technology, more and more technologies are applied in the financial field, and the traditional financial industry is gradually changing to financial technology, but due to the requirements of the financial industry on safety and real-time performance, higher requirements are also put forward on the technologies. In the financial field, in order to facilitate a financial user or a financial enterprise to timely and normally access a network device to be accessed, it is generally required to detect light attenuation of a communication link between interconnected network devices so as to determine whether quality of the communication link between the interconnected network devices meets a set requirement, thereby completing debugging of the communication link between the interconnected network devices. In order to ensure the quality of financial services, how to timely and effectively detect the optical attenuation of the communication link between the interconnected network devices is an urgent problem to be solved.
At present, debugging a communication link between interconnected network devices usually needs to be completed by means of mutual cooperation between a technician of a home terminal network device and a technician of an opposite terminal network device. Specifically, taking network device a and network device B as an example, network device a sends an optical signal to port 2 of network device B through port 1, and measures a sending optical attenuation value of port 1. When the network device B detects the optical signal through the port 2, the network device B measures the optical signal to determine a received optical attenuation value of the port 2. Meanwhile, the network device B may also send an optical signal to the port 1 of the network device a through the port 2, and measure a sending optical attenuation value of the port 2, and when the network device a detects the optical signal through the port 1, the network device a measures the optical signal and determines a receiving optical attenuation value of the port 1. Then, a technician of the network device a queries the transmission light attenuation value of the port 1, and notifies the transmission light attenuation value of the port 1 to a technician of the network device B, and the technician of the network device B compares the reception light attenuation value of the port 2 with the transmission light attenuation value of the port 1, so as to determine whether the quality of a communication link between the network device a and the network device B meets a set requirement. And a technician of the network device B may query the transmission light attenuation value of the port 2 and notify the transmission light attenuation value of the port 2 to a technician of the network device a, and the technician of the network device a compares the reception light attenuation value of the port 1 with the transmission light attenuation value of the port 2, so as to determine whether the quality of a communication link between the network device a and the network device B meets a set requirement. However, this processing method requires a technician to debug the communication link, which requires a long time and effort, and thus results in inefficient debugging of the communication link between the interconnected network devices.
In summary, there is a need for an optical attenuation detection method based on a link layer discovery protocol, so as to effectively improve the debugging efficiency of a communication link between interconnected network devices.
Disclosure of Invention
The embodiment of the invention provides a link layer discovery protocol-based optical attenuation detection method and device, which are used for effectively improving the debugging efficiency of a communication link between interconnected network devices.
In a first aspect, an embodiment of the present invention provides an optical attenuation detection method based on a link layer discovery protocol, including:
the first network equipment encapsulates the acquired optical attenuation parameter value of the first port in a modified Link Layer Discovery Protocol (LLDP) message to generate a first detection message; the modified LLDP message is determined by configuring a port light attenuation parameter field in the LLDP message; the first port is a port of the first network device, which is interconnected with a second network device;
the first network equipment performs conversion processing on the first detection message to generate a first optical signal;
the first network device sends the first optical signal to the second network device through the first port; the second network device is configured to perform conversion processing on the first optical signal to obtain the first detection packet, and store an optical attenuation parameter value of the first port obtained by analyzing the first detection packet.
In the above technical solution, in the prior art, the debugging of the communication link between the interconnected network devices can be completed only by means of mutual cooperation of respective technicians of the interconnected network devices, so that a long time and effort are required to be consumed, which results in low debugging efficiency of the communication link between the interconnected network devices. Based on this, the technical scheme of the invention modifies the existing link layer discovery protocol LLDP message, and configures the port light attenuation parameter field in the existing LLDP message, so as to actively report the light attenuation parameter values of the respective ports of the interconnected network equipment through the modified LLDP message, thereby reducing the time and energy consumed by manual debugging. Specifically, after configuring the port optical attenuation parameter field for the existing LLDP packet, the first network device may encapsulate the acquired optical attenuation parameter value of the first port in the modified LLDP packet to generate the first detection packet, so that the first detection packet includes the optical attenuation parameter value of the first port, and perform conversion processing on the first detection packet to generate the first optical signal. Then, the first optical signal is sent to the interconnected second network device through the first port, so that when the second network device detects the first optical signal through the second port, the first optical signal can be converted to obtain a first detection message, and the first detection message is analyzed to obtain an optical attenuation parameter value of the first port in time. Thus, the scheme is to configure the port optical attenuation parameter field in the existing LLDP message by modifying the existing LLDP message, interconnected network devices (such as the first network device or the second network device) can be enabled to actively encapsulate the optical attenuation parameter value of any port of the network device in the modified LLDP message, therefore, the local network device transmits the encapsulated LLDP message to the opposite network device, so that the opposite network device can timely obtain the optical attenuation parameter value of the interconnection port of the local network device, without depending on the technical personnel of the local terminal network equipment to inform the technical personnel of the opposite terminal equipment of the optical attenuation parameter value of the interconnection port of the local terminal network equipment, therefore, the labor time cost can be reduced, and the debugging efficiency of the communication link between the interconnected network devices can be effectively improved.
Optionally, the method further comprises:
when the first network device detects a second optical signal sent by the second network device through a second port through the first port, the first network device performs conversion processing on the second optical signal to obtain a second detection message; the second port is a port in the second network device, which is interconnected with the first network device;
and the first network equipment analyzes and processes the second detection message to obtain and store the light attenuation parameter value of the second port.
In the above technical solution, before the first network device sends the first optical signal to the second network device, in the process of sending the first optical signal to the second network device by the first network device, or after the first network device sends the first optical signal to the second network device, the first network device may receive the second optical signal sent by the second network device, that is, after the first network device receives the second optical signal sent by the second network device through the second port through the first port, the first network device may process the second optical signal to obtain the optical attenuation parameter value of the second port, so that the first network device can timely obtain the optical attenuation parameter value of the second port of the second network device, and does not need to notify the technical staff of the first network device of the optical attenuation parameter value of the second port through the technical staff of the second network device, thereby reducing the time and energy consumed by manual interaction, the debugging efficiency of the communication link between the interconnected network devices can be effectively improved to a certain extent.
Optionally, the light attenuation parameter value of the first port is obtained by:
the first network equipment acquires the light attenuation parameter value of the first port from a first information base; the first information base is used for storing the light attenuation parameter value of any port of the first network equipment;
obtaining and storing a light attenuation parameter value of the second port, including:
the first network equipment stores the light attenuation parameter value of the second port into a second information base; the second information base is used for storing the optical attenuation parameter value of the port of any network equipment interconnected with the first network equipment.
In the above technical solution, by storing the optical attenuation parameter value of any port of the local network device (such as the first network device) in the first information base, and by storing the optical attenuation parameter values of the interconnect port of the peer network device (such as the second network device) in the second information base, therefore, operation and maintenance personnel, technicians or managers and the like can conveniently acquire the light attenuation parameter value of a certain port of the local terminal equipment from the first information base in time through the query command, it is of course also possible to obtain the optical attenuation parameter value of the interconnection port of the peer network device from the second information base in time through the query command, therefore, the time for operation and maintenance personnel or technicians or managers of the local terminal equipment to obtain the optical attenuation parameter value of the interconnection port of the opposite terminal network equipment can be reduced, and the efficiency for obtaining the optical attenuation parameter value of the interconnection port of the opposite terminal network equipment is improved.
Optionally, encapsulating, by the first network device, the obtained optical attenuation parameter value of the first port in a modified link layer discovery protocol LLDP message, where the encapsulating includes:
the first network equipment encapsulates the acquired sending light attenuation value of the first port in the modified LLDP message; alternatively, the first and second electrodes may be,
the first network equipment encapsulates the acquired sending light attenuation value of the first port and the acquired receiving light attenuation value of the first port in the modified LLDP message; the received optical attenuation value of the first port is obtained by measuring a second optical signal when the first network device detects the second optical signal through the first port.
In the above technical solution, there are two situations when the first network device encapsulates the optical attenuation parameter value of the first port in the modified LLDP message, where one situation is that the second optical signal sent by the second network device is not received before the first network device sends the first optical signal to the second network device, and then only the sending optical attenuation value of the first port can be obtained from the first information base, but not the receiving optical attenuation value of the first port, so that the optical attenuation parameter value encapsulated in the modified LLDP message only has the sending optical attenuation value of the first port; another situation is that before the first network device sends the first optical signal to the second network device, the second network device receives the second optical signal sent by the second network device, and then the second network device can obtain the sending optical attenuation value and the receiving optical attenuation value of the first port from the first information base, so that the optical attenuation parameter values encapsulated in the modified LLDP message include the sending optical attenuation value and the receiving optical attenuation value of the first port. For this reason, the first network device periodically transmits the optical signal according to the set time interval, so that the second network device can timely acquire the latest optical attenuation parameter value of the interconnection port of the first network device.
Optionally, the analyzing, by the first network device, the second probe packet to obtain an optical attenuation parameter value of the second port includes:
the first network equipment analyzes the second detection message to obtain a sending light attenuation value of the second port; alternatively, the first and second electrodes may be,
the first network device analyzes the second detection message to obtain a sending light attenuation value of the second port and a receiving light attenuation value of the second port; the received optical attenuation value of the second port is obtained by measuring a first optical signal when the second network device detects the first optical signal through the second port.
In the above technical solution, there are also two situations in the LLDP message, which is received by the first network device and corresponds to the optical signal sent by the second network device and is encapsulated in the LLDP message, where one situation is that the optical signal sent by the first network device is not received before the second network device sends the second optical signal to the first network device, and then the second network device can only obtain the sending optical attenuation value of the second port of the second network device from an information base of the optical attenuation parameter value used for storing any port of the second network device, and cannot obtain the receiving optical attenuation value of the second port of the second network device, so that the second detection message only contains the sending optical attenuation value of the second port; another situation is that before the second network device sends the second optical signal to the first network device, the optical signal sent by the first network device is received, and then the second network device can obtain the sending optical attenuation value and the receiving optical attenuation value of the second port of the second network device from an information base of the second network device, which is used for storing the optical attenuation parameter value of any port of the second network device, so that the second detection packet also includes the sending optical attenuation value and the receiving optical attenuation value of the second port. For this reason, the second network device periodically transmits the optical signal at a set time interval, so that the first network device can timely acquire the latest optical attenuation parameter value of the interconnection port of the second network device.
Optionally, after storing the light attenuation parameter value of the second port in a second information base, the method further includes:
and acquiring a transmitting light attenuation value of the first port from the first information base, acquiring a receiving light attenuation value of the second port from the second information base, comparing the transmitting light attenuation value of the first port with the receiving light attenuation value of the second port, acquiring a receiving light attenuation value of the first port from the first information base, acquiring a transmitting light attenuation value of the second port from the second information base, and comparing the receiving light attenuation value of the first port with the transmitting light attenuation value of the second port, thereby determining whether the quality of a communication link between the first network device and the second network device meets a set requirement.
In the above technical solution, after the first network device and the second network device emit light signals mutually, only the network device on one side needs to check the light attenuation parameter value of the interconnection port of the peer network device, and certainly the network device on the local side and the port interconnected with the peer network device, that is, only the operation and maintenance personnel, technician, or manager of the network device on one side needs to debug the communication link between the first network device and the second network device, that is, for example, taking the first network device side as an example, the operation and maintenance personnel, technician, or manager of the first network device can obtain the transmission light attenuation value of the first port from the first information base through a query command, obtain the reception light attenuation value of the second port from the second information base through the query command, and compare the transmission light attenuation value of the first port with the reception light attenuation value of the second port to determine that the first network device is used as the first network device Whether the communication link quality at the sending end meets the set requirement or not is judged, meanwhile, the receiving light attenuation value of the first port is obtained from the first information base through the query command, and obtaining the transmitting light attenuation value of the second port from the second information base through the query command, comparing the receiving light attenuation value of the first port with the transmitting light attenuation value of the second port to judge whether the communication link quality of the first network equipment as a receiving end meets the set requirement, the optical attenuation parameter value of the interconnection port of the opposite-end network equipment can be obtained without depending on interaction of operation and maintenance personnel, technicians or managers of the network equipment at two sides, thereby completing commissioning of the communication link between the first network device and the second network device, therefore, the scheme can reduce the time and the energy consumed by manual cooperation interaction to complete the debugging of the communication link, thereby effectively improving the debugging efficiency of the communication link.
Optionally, determining the modified LLDP packet by configuring a port light attenuation parameter field in the LLDP packet includes:
adding a type/length/value TLV format port optical attenuation parameter field in a reserved field of a data unit in the LLDP message; the value of the port light attenuation parameter field is used for configuring a port light attenuation parameter value; the port light attenuation parameter values comprise port identification numbers, light attenuation parameter types and light attenuation parameter values; alternatively, the first and second electrodes may be,
dividing a storage space with set capacity from a position area where a value is located in a port identification field of a data unit in the LLDP message; the storage space with the set capacity is used for configuring the optical attenuation parameter value of the port; the port light attenuation parameter values comprise light attenuation parameter types and light attenuation parameter values.
In the above technical solution, there may be two ways to configure the port optical attenuation parameter field in the existing LLDP message, one way is to add the port optical attenuation parameter field in type/length/value TLV format in the reserved field of the data unit in the existing LLDP message, so that the optical attenuation parameter value of a certain port of any network device can be encapsulated in the modified LLDP message; another way is to divide a storage space with a set capacity from a location area where a value is located in a port identification field of a data unit in an existing LLDP message, and configure a port optical attenuation parameter value in the storage space with the set capacity, so that an optical attenuation parameter value of a certain port of any network device can be encapsulated in the modified LLDP message. Therefore, the scheme can realize that the first network device or the second network device actively encapsulates the optical attenuation parameter value of a certain interconnection port of the local terminal device in the modified LLDP message, so that the optical attenuation parameter value of the certain interconnection port of the local terminal device can be sent to the opposite terminal device through optical signal transmission, and the opposite terminal device is facilitated to timely obtain the optical attenuation parameter value of the interconnection port of the local terminal device, and the optical attenuation parameter value of the interconnection port of the local terminal device or the opposite terminal device does not need to be obtained by means of manual interaction.
In a second aspect, an embodiment of the present invention further provides an optical attenuation detection apparatus based on a link layer discovery protocol, including:
the generation unit is used for encapsulating the acquired optical attenuation parameter value of the first port in a modified Link Layer Discovery Protocol (LLDP) message to generate a first detection message; the modified LLDP message is determined by configuring a port light attenuation parameter field in the LLDP message; the first port is a port which is interconnected with second network equipment in the first network equipment;
the processing unit is used for performing conversion processing on the first detection message to generate a first optical signal; transmitting the first optical signal to the second network device through the first port; the second network device is configured to perform conversion processing on the first optical signal to obtain the first detection packet, and store an optical attenuation parameter value of the first port obtained by analyzing the first detection packet.
In a third aspect, an embodiment of the present invention provides a computing device, including at least one processor and at least one memory, where the memory stores a computer program, and when the program is executed by the processor, the processor is caused to execute the optical attenuation detection method based on the link layer discovery protocol according to any of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program executable by a computing device, and when the program runs on the computing device, the computer program causes the computing device to execute the optical attenuation detection method based on the link layer discovery protocol according to any of the first aspects.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of a possible system architecture according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of an optical attenuation detection method based on a link layer discovery protocol according to an embodiment of the present invention;
fig. 3a is a schematic diagram of an Ethernet II format encapsulated LLDP packet according to an embodiment of the present invention;
fig. 3b is a schematic diagram of an SNAP format encapsulated LLDP packet according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a format of LLDPDU according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a basic format of a TLV according to an embodiment of the present invention;
fig. 6 is a schematic format diagram of an added network device port optical attenuation parameter TLV according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a transmit-receive optical attenuation value of a port of a network device according to an embodiment of the present invention;
fig. 8a is a schematic format diagram of a Port ID TLV according to an embodiment of the present invention;
fig. 8b is a schematic format diagram of a modified Port ID TLV according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an optical attenuation detection apparatus based on a link layer discovery protocol according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a computing device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
To facilitate understanding of the embodiment of the present invention, first, an optical attenuation detection system architecture based on a link layer discovery protocol applicable to the embodiment of the present invention is described by taking one possible system architecture shown in fig. 1 as an example. The system architecture can be applied to debugging of communication links between interconnected network devices. As shown in fig. 1, two interconnected network devices, such as network device a 100 and network device B200, are taken as an example. One port (for example, port a) of the network device a is interconnected with one port (for example, port B) of the network device B, that is, the network device a and the network device B use the port a to establish a communication link. After the communication link is established, the communication link needs to be debugged, that is, whether the optical attenuation of the communication link is normal or not is detected. Illustratively, taking the example that the network device first transmits an optical signal as an example, the network device a encapsulates the transmission optical attenuation value of the port a in the modified LLDP message. The generated optical signal is sent to the network device B, when the network device B detects the optical signal sent by the network device a through the port B, the optical signal is measured, the received optical attenuation value of the port B is determined and stored, and meanwhile, the network device B can obtain and store the sent optical attenuation value of the port a of the network device a by processing the optical signal. Similarly, the network device B encapsulates the received light attenuation value of the port B and the transmitted light attenuation value of the port B in the modified LLDP message to generate an optical signal, and transmits the optical signal to the network device a, when the network device a detects the optical signal transmitted by the network device B through the port a, the network device a measures the optical signal to determine and store the received light attenuation value of the port a, and at the same time, the network device a processes the optical signal to obtain and store the transmitted light attenuation value and the received light attenuation value of the port B of the network device B. Thus, the network device a periodically generates an optical signal according to a set time interval (e.g. every 1 second, 5 seconds, 10 seconds, or 20 seconds) and sends the optical signal to the network device B, the optical attenuation parameter value of the port a of the network device a is continuously updated, and the network device B can timely obtain the latest optical attenuation parameter value of the port a of the network device a, and the network device B periodically generates an optical signal according to the set time interval and sends the optical signal to the network device a, so that the optical attenuation parameter value of the port B of the network device a is continuously updated, and the network device a can timely obtain the latest optical attenuation parameter value of the port B of the network device B, so that a device (e.g. the network device a) on one side of the interconnected network devices can timely obtain the optical attenuation parameter value of the interconnected port of the opposite network device (e.g. the port B of the network device B), and the optical attenuation parameter value of the interconnection port of the opposite-end equipment can be obtained without depending on manual interaction of operation and maintenance personnel, technicians or managers of the network equipment at the two sides.
It should be noted that the system structure shown in fig. 1 is only an example, and the embodiment of the present invention is not limited thereto.
Based on the above description, fig. 2 exemplarily shows a flow of an optical attenuation detection method based on a link layer discovery protocol according to an embodiment of the present invention, where the flow may be performed by an optical attenuation detection apparatus based on a link layer discovery protocol. The optical attenuation detection method based on the link layer discovery protocol may be executed by the first network device, or may be executed by the second network device, or may also be executed by a chip or an integrated circuit capable of supporting the first network device or the second network device to implement the functions required by the optical attenuation detection method based on the link layer discovery protocol. The following description is given by taking as an example that the first network device executes an optical attenuation detection method based on a link layer discovery protocol.
As shown in fig. 2, the process specifically includes:
step 201, the first network device encapsulates the obtained optical attenuation parameter value of the first port in the modified link layer discovery protocol LLDP message, and generates a first detection message.
Step 202, the first network device performs conversion processing on the first detection packet to generate a first optical signal.
In the embodiment of the present invention, the first network device obtains the optical attenuation parameter value of the first port from the first information base. Each network device maintains two Information bases, namely a local device Information Base (Management Information Base) and a remote device Information Base (remote system MIB), where the local device Information Base (for example, the first Information Base) is used to store an optical attenuation parameter value of any port of the first network device, that is, to maintain related Information of the local device, and the remote device Information Base (for example, the second Information Base) is used to store an optical attenuation parameter value of a port of any network device interconnected with the first network device, that is, to maintain related Information of the remote device, and for example, after receiving the related Information of the remote device, the local device updates the related Information of the remote device to the remote device Information Base. It should be noted that the two information bases maintained by each network device are determined based on a Link Layer Discovery Protocol LLDP (Link Layer Discovery Protocol), which is a Protocol for notifying and acquiring information, and the LLDP may enable one network device accessing a network to send information about its main capabilities, such as a management address, a device identifier, an interface identifier, and the like, to other network devices accessing the same lan. That is, the device identifier, the interface identifier, and other information of the local device may be organized into different TLVs (Type/Length/Value) and encapsulated in an LLDPDU (Link Layer Discovery Protocol Data Unit) to be sent to the neighbor network device connected to the local device, and after receiving the information, the directly connected neighbor network device stores the information in the form of a standard MIB for the operation and maintenance staff, the technical staff, or the administrator, to inquire and judge the communication status of the communication Link between the interconnected network devices. The light attenuation parameter value may include a transmitting light attenuation value and/or a receiving light attenuation value, etc. Among them, the main work involved in LLDP is: (1) initializing and maintaining information in a local MIB (management information base); (2) extracting information from a local MIB (management information base) and packaging the information into an LLDP (link layer discovery protocol) frame, wherein the transmission of the LLDP frame has two trigger modes, one is triggered by expiration of a timer, and the other is triggered by change of the state of network equipment; (3) identifying and processing the received LLDPDU frame; (4) maintaining an MIB information base of the remote network equipment; (5) when the information in the MIB information base of the local or remote network equipment is changed, a notification event is sent out.
Then, after the optical attenuation parameter value of the first port is obtained from the first information base, the optical attenuation parameter value of the first port may be encapsulated in the modified LLDP message, so as to generate a first detection message, and a first optical signal is generated by performing conversion processing on the first detection message. The first port is a port of the first network device interconnected with the second network device. However, there are two situations in encapsulating the optical attenuation parameter value of the first port in the modified LLDP message, where the first situation is that before the first network device sends the first optical signal to the second network device, the first network device does not receive the optical signal (for example, the second optical signal) sent by the second network device, and then the first network device cannot obtain the received optical attenuation value of the first port from the first information base, and can only obtain the sent optical attenuation value of the first port, that is, encapsulates the sent optical attenuation value of the first port in the modified LLDP message, so as to generate the first probe message, where the optical attenuation parameter value in the first probe message only includes the sent optical attenuation value of the first port. The second situation is that before the first network device sends the first optical signal to the second network device, the first network device receives an optical signal (for example, a second optical signal) sent by the second network device, and then the first network device can obtain the sending optical attenuation value and the receiving optical attenuation value of the first port from the first information base, that is, the sending optical attenuation value and the receiving optical attenuation value of the first port are encapsulated in the modified LLDP message, so as to generate the first detection message, where the optical attenuation parameter value in the first detection message includes the sending optical attenuation value and the receiving optical attenuation value of the first port. The received optical attenuation value of the first port is obtained by measuring the second optical signal when the first network device detects the second optical signal through the first port, for example, the optical signal measurement module may measure the second optical signal when detecting the second optical signal through the second port, so as to obtain the optical attenuation value when the first port receives the second optical signal. For this reason, the first network device may periodically transmit the optical signal at a set time interval (e.g., every 1 second, 5 seconds, 10 seconds, 20 seconds, or 1 minute), and then the second network device may timely acquire the latest optical attenuation parameter value of the interconnection port of the first network device. After generating the first probe packet, the first network device may convert the first probe packet into an electrical signal through the signal conversion module, convert the electrical signal into an optical signal (e.g., a first optical signal), and then send the first optical signal to the interconnected network devices through the first port.
In addition, before the first network device sends the first optical signal to the second network device, in the process of sending the first optical signal to the second network device by the first network device, or after the first network device sends the first optical signal to the second network device, the first network device may receive the second optical signal sent by the second network device, that is, when the first network device receives the second optical signal sent by the second network device through the second port through the first port, the first network device performs conversion processing on the second optical signal to obtain the second detection packet. The second port is a port in the second network device, which is interconnected with the first network device. And analyzing the second detection message to obtain the light attenuation parameter value of the second port, and storing the light attenuation parameter value of the second port into a second information base. Therefore, the first network device can timely know the light attenuation parameter value of the second port of the second network device, and the technician of the first network device does not need to be informed of the light attenuation parameter value of the second port by the technician of the second network device, so that the time and the energy consumed by relying on manual interaction can be reduced. When the first network device analyzes and processes the second detection message, the first network device receives an encapsulated LLDP message corresponding to an optical signal sent by the second network device, where one of the two situations is that the optical signal sent by the first network device is not received before the second network device sends the second optical signal to the first network device, and then the second network device can only obtain a sending optical attenuation value of the second port of the second network device from an information base of the second network device, where the information base is used to store an optical attenuation parameter value of any port of the second network device, and cannot obtain a receiving optical attenuation value of the second port of the second network device, so that the optical attenuation parameter value in the second detection message only contains the sending optical attenuation value of the second port; another situation is that before the second network device sends the second optical signal to the first network device, the optical signal sent by the first network device is received, and then the second network device can obtain the sending optical attenuation value and the receiving optical attenuation value of the second port of the second network device from an information base of the second network device, which is used for storing the optical attenuation parameter value of any port of the second network device, so that the optical attenuation parameter value in the second detection message also includes the sending optical attenuation value and the receiving optical attenuation value of the second port. Therefore, the optical signal is periodically transmitted by the second network device at a set time interval, and the first network device can timely acquire the latest optical attenuation parameter value of the interconnection port of the second network device. And the receiving light attenuation value of the second port is obtained by measuring the first optical signal when the second network device detects the first optical signal through the second port.
Wherein, the modified LLDP message is determined by configuring the port light attenuation parameter field in the LLDP message. Specifically, there may be two ways to configure a port light attenuation parameter field for an existing LLDP packet, where the first way is to add a port light attenuation parameter field in a type/length/value TLV format in a reserved field of a data unit (i.e., LLDPDU) in the existing LLDP packet, and then configure a port light attenuation parameter value in a value area of the port light attenuation parameter field, where the port light attenuation parameter value may include a port identification number, a light attenuation parameter type, and a light attenuation parameter value, and thus, the light attenuation parameter value of a certain port of any network device may be encapsulated in the modified LLDP packet. The second method is to divide a storage space with a set capacity from a location area where a median is located in a port identification field of a data unit in an existing LLDP message, and configure a port optical attenuation parameter value in the storage space with the set capacity, where the port optical attenuation parameter value may include an optical attenuation parameter type and an optical attenuation parameter value, so that the optical attenuation parameter value of a certain port of any network device can be encapsulated in the modified LLDP message. Therefore, the scheme can realize that the first network device or the second network device actively encapsulates the optical attenuation parameter value of a certain interconnection port of the local terminal device in the modified LLDP message, so that the optical attenuation parameter value of the certain interconnection port of the local terminal device can be sent to the opposite terminal device through optical signal transmission, and the optical attenuation parameter value of the interconnection port of the local terminal device or the opposite terminal device does not need to be acquired by means of manual interaction.
In addition, it should be noted that the LLDP packet with the LLDPDU built therein may also be referred to as an LLDP frame, and the encapsulation format of the LLDP packet mainly includes two formats, that is, Ethernet II and SNAP (subnet Access Protocol). As shown in fig. 3a, based on fig. 3a, it can be seen that the Ethernet II format encapsulated LLDP message includes a Destination Media Access Control address (i.e., a Destination physical address, that is, a fixed multicast MAC address, 0x0180-C200-000E), a Source Media Access Control address (i.e., a Source physical address, that is, a port MAC address or a network device MAC address, for example, a port MAC address is used if the port MAC address exists, or a network device MAC address is used if the port MAC address does not exist), a Type (i.e., a Frame Type, 0x88CC), a Data (i.e., a Data area, that is, a LLDPDU), and a Frame Check Sequence (FCS, Frame Check Sequence). As shown in fig. 3b, based on fig. 3b, it can be seen that the SNAP-format encapsulated LLDP message includes a Destination Media Access Control address (i.e., a Destination physical address, that is, a fixed multicast MAC address, 01-80-C2-00-00-0E), a Source Media Access Control address (i.e., a Source physical address, that is, a port MAC address or a device MAC address, for example, a port MAC address is used if the port MAC address is present, or a device MAC address is used if the device MAC address is not present), a Type (i.e., a Frame Type, that is, 0 xAAAA-0300-. The embodiment of the present invention is described by using an Ethernet II format encapsulated LLDP packet, and taking the Ethernet II format encapsulated LLDP packet shown in fig. 3a as an example, an LLDPDU is a data unit encapsulated in a data portion of the LLDP packet, that is, an payload of the LLDP packet, and is used to carry a message to be sent. Before the LLDPDU is formed, the network device encapsulates the local information into TLV format, and then a plurality of TLVs are combined into one LLDPDU, which is encapsulated in the data portion of the LLDP packet for transmission. Fig. 4 shows a schematic format diagram of an LLDPDU, where the LLDPDU adopts a format of Type + Length + Value, where Type represents Type, Length is Length of TLV in bytes, and Value represents the TLV. Wherein, the four kinds Of the chatsis ID TLV, the Port ID TLV, the Time To Live TLV and the End Of LLDPDU TLV are carried necessarily, and the rest TLVs are carried optionally.
After the data unit LLDPDU in the LLDP message is introduced, the information related to the TLV is described below.
TLVs are elements constituting LLDPDUs, each of which represents one piece of information. The encapsulated TLVs in the LLDP message can be divided into two categories, one is a TLV set which is the basis of network management, all LLDP implementations need to be supported, and the other is an extended set of organization-defined TLVs, including 802.1 organization-defined TLVs, 802.3 organization-defined TLVs and other organization-defined TLVs. These TLVs are used to enhance the management of the network device, and can be selected according to actual needs to be sent in LLDPDU or not. Wherein, the type field of the TLV may be defined as shown in table 1. And, a basic format diagram of TLV may be as shown in fig. 5.
TABLE 1
TLV type* TLV name Usage in LLDPDU
0 End Of LLDPDU Mandatory
1 Chassis ID Mandatory
2 Port ID Mandatory
3 Time To Live Mandatory
4 Port Description Optional
5 System Name Optional
6 System Description Optional
7 System Capabilities Optional
8 Management Address Optional
9-126 reserved
127 Organizationally Specific TLVs Optional
Wherein, based on table 1, TLV types 0-8 belong to the basic TLV set for which the TLV of Mandatory must be included in the LLDP. TLV types 9-126 are all reserved types, and in the embodiment of the present invention, a network device port light attenuation parameter TLV is added to the reserved type portion of the data unit in the LLDP message, for example, the type of the network device port light attenuation parameter TLV is 9. A schematic format diagram of the newly added network device port optical attenuation parameter TLV may be as shown in fig. 6. In addition, the values of the optical attenuation parameter types in the newly added network device port optical attenuation parameter TLV can be as shown in table 2.
TABLE 2
OPT subtype ID basis
0 RX
1 TX
2-255 reserved
Wherein, based on table 2, OPT (Optical) subtype represents a light attenuation option; RX denotes receive, i.e. the received light attenuation; TX denotes transport, i.e., the transmitted light attenuation value.
In addition, the design concept of the network device port optical attenuation parameter TLV in the embodiment of the present invention is described. Specifically, a data structure of optical attenuation parameters of a network device port is introduced, where the optical attenuation parameters mainly include a current received optical attenuation value, a current transmitted optical attenuation value, a maximum received optical attenuation alarm value, a maximum transmitted optical attenuation alarm value, a minimum received optical attenuation alarm value, and a minimum transmitted optical attenuation alarm value. However, in the daily operation and maintenance of the network device, the current values are used, so that only the current receiving light attenuation value and the current transmitting light attenuation value need to be obtained from the information base. Then, the embodiment of the present invention designs two field values, namely RX and TX, and the purpose of this field value is to read the light attenuation field value (namely RX and/or TX) in the TLV after the opposite device receives the TLV, which is sent by the local device, and store the light attenuation field value in the information base, so that operation and maintenance personnel, technicians, or managers and the like can obtain the received light attenuation value and/or the sent light attenuation value of the local network device from the information base in time through a command-line interface (CLI) query command. If only RX or TX is designed, an operation and maintenance person, a technician, a manager, or the like of the peer-side network device cannot completely know the condition of the transmit-receive optical attenuation value of the interconnection port of the home-side network device, and the design of the OPT subtype/OPT value field is to solve the problem of transmission and storage of the transmit-receive optical attenuation value. It should be noted that a network device may have many ports, and if there is no Port field, the transmit-receive optical attenuation values of the ports cannot be distinguished, so that a field is needed to associate the transmit-receive optical attenuation values, that is, a Port field Port ID is designed to solve the problem, and the transmit-receive optical attenuation value of a certain Port can be completely displayed through three fields, for example, as shown in fig. 7, which is a schematic diagram of the transmit-receive optical attenuation value of a certain Port of a network device provided in the embodiment of the present invention. Based on fig. 7, the received optical attenuation value of the 1/1 port of the network device is-5.3, and the transmitted optical attenuation value is-4.9, so that the design of the optical attenuation parameter field of the network device port according to the embodiment of the present invention completely shows the transmit-receive optical attenuation value of the 1/1 port.
As described above, the technical solution of the embodiment of the present invention is to add a network device port optical attenuation parameter TLV to the reserved type portion of the data unit in the LLDP message, and the following is introduced to the technical solution of the embodiment of the present invention that a storage space with a set capacity is partitioned from the location area where the value is located in the port identification field of the data unit in the existing LLDP message to configure the port optical attenuation parameter value.
In the embodiment of the invention, the transmission of the Port light attenuation parameter information is realized by directly utilizing the existing Port ID TLV field in the LLDP message and adding the network equipment Port light attenuation parameter value field in the Port ID TLV field. Specifically, the Port ID TLV is used to identify the Port of the network device that sent the LLDPDU. Similar to the chassis ID, there are many ways to identify a Port, and therefore the Port ID TLV also contains a subtype field. Wherein, the format diagram of the Port ID TLV can be as shown in fig. 8 a. It should be noted that each LLDPDU must contain one and only one TLV of this type. Meanwhile, when a port is available, the TLV of the LLDPDU transmitted out of the port should remain unchanged. In addition, as can be seen from fig. 8a, the maximum storage space of 255 bytes is allowed in the Port ID field, and considering that the space occupied by the Port ID value is limited, a part of the storage space can be divided from the storage space area occupied by the Port ID field as the storage space of the OPT subtype and the OPT value, so that the format schematic diagram of the modified Port ID TLV shown in fig. 8b can be formed, and then the transmission of the Port transmit-receive optical attenuation value can be realized through the modified LLDP packet.
Step 203, the first network device sends the first optical signal to the second network device through the first port.
In the embodiment of the present invention, the first network device may send the first optical signal to the second network device through the first port, that is, the optical attenuation parameter value of the first port is transmitted to the second network device, so that the second network device may obtain the optical attenuation parameter value of the first port of the first network device in time. Specifically, when the second network device detects the first optical signal through the second port, the second network device may perform conversion processing on the first optical signal to obtain a first detection packet, perform analysis processing on the first detection packet to obtain an optical attenuation parameter value of the first port in time, and then store the optical attenuation parameter value of the first port of the first network device in an information base for storing the optical attenuation parameter value of the first port. In addition, before the second network device detects the first optical signal through the second port, during the process that the second network device detects the first optical signal through the second port, or after the second network device detects the first optical signal through the second port, the second network device may send the second optical signal to the first network device, that is, the second network device may obtain an optical attenuation parameter value of the second port from an information base thereof for storing the optical attenuation parameter value of any port of the second network device, and encapsulate the optical attenuation parameter value of the second port in the modified LLDP message, so as to generate the second probe message, and generate the second optical signal by performing conversion processing on the first probe message. Then, the second optical signal is sent to the interconnected first network device through the second port, and after the first network device receives the second optical signal sent by the second network device through the second port through the first port, the first network device can process the second optical signal to obtain an optical attenuation parameter value of the second port, so that the first network device can acquire the optical attenuation parameter value of the second port of the second network device in time. Therefore, the first network device and the second network device perform mutual light emission for multiple times according to the set time interval, that is, perform the exchange of LLDPDU information for multiple times, so that the optical attenuation parameter values of the interconnection port are stored in the information bases of the local network device and the opposite network device. The transmitting optical attenuation value and the receiving optical attenuation value of the port of the home terminal network device may or may not be changed, but after the transmitting optical attenuation value and the receiving optical attenuation value of the port of the home terminal network device are measured each time, the transmitting optical attenuation value and the receiving optical attenuation value of the port of the home terminal network device are stored in an information base for storing relevant information of the home terminal network device, and are stored in the information base in a self-sequence number increasing mode according to time sequence. Moreover, the transmitting optical attenuation value and the receiving optical attenuation value of the interconnection port of the peer network device may or may not change, but after receiving the transmitting optical attenuation value and the receiving optical attenuation value of the interconnection port of the peer network device each time, the transmitting optical attenuation value and the receiving optical attenuation value of the interconnection port of the peer network device are stored in an information base for storing related information of the peer network device, and are stored in the information base in a self-sequence number increasing manner according to the time sequence. It should be noted that, no matter the local network device or the peer network device, the optical attenuation parameter value of the interconnection port of any network device changes, at this time, the network device will immediately update the LLDPDU information and send the LLDPDU information to the interconnected network device, and after receiving the updated LLDPDU information, the interconnected network device will immediately update the changed optical attenuation parameter value of the interconnection port of the network device into the information base for storing the related information of the remote network device.
After the first network device and the second network device emit light signals mutually, it is only necessary to check the optical attenuation parameter value of the interconnection port of the opposite network device in the network device on one side, and certainly, it is also possible to check the optical attenuation parameter value of the port of the local network device interconnected with the opposite network device, that is, it is only necessary to rely on the operation and maintenance personnel, technicians, or managers of the network device on one side to complete the debugging of the communication link between the first network device and the second network device, for example, taking the first network device side as an example, the operation and maintenance personnel, technicians, or managers of the first network device can obtain the transmitting optical attenuation value and the receiving optical attenuation value of the first port from the first information base of the first network device by querying a command, and at this time, it can be determined whether the first port is in an available state, for example, it is determined whether the transmitting optical attenuation value of the first port is within a set range of the transmitting optical attenuation value, meanwhile, whether the receiving light attenuation value of the first port is in the set range of the receiving light attenuation value is judged, and therefore the available condition of the first port can be determined. And judging whether the communication link quality of the first network equipment serving as a transmitting end meets the set requirement or not by comparing the transmitting light attenuation value of the first port with the receiving light attenuation value of the second port. Meanwhile, the sending light attenuation value and the receiving light attenuation value of the second port can be obtained from the second information base of the first network device through the query command, so as to judge whether the second port is in an available state, for example, whether the sending light attenuation value of the second port is in a set range of the sending light attenuation value and whether the receiving light attenuation value of the second port is in a set range of the receiving light attenuation value, so that the available state of the second port can be determined. And the receiving light attenuation value of the first port is obtained from the first information base through the query command, and the receiving light attenuation value of the first port is compared with the sending light attenuation value of the second port to judge whether the communication link quality of the first network equipment serving as a receiving end meets the set requirement.
In addition, the embodiment of the present invention may also configure a monitoring component in any network device, or may also configure a monitoring device for any network device, for example, the monitoring device may be configured in any network device, or may be set independently from any network device. The monitoring component or the monitoring device is used for monitoring the optical attenuation parameter value of the port of the network device and monitoring the optical attenuation parameter value of the port of the interconnected network device, and setting an alarm threshold value for the sending optical attenuation value and the receiving optical attenuation value of the port of the network device respectively, so that the alarm can be given in time when the sending optical attenuation value or the receiving optical attenuation value of the port of the network device is abnormal, and operation and maintenance personnel, technical personnel or management personnel and the like can find hidden dangers in time and process the hidden dangers in time. Meanwhile, because the monitoring component or the monitoring device of the network device can also monitor the transmitting light attenuation value and the receiving light attenuation value of the ports of the interconnected network devices, an alarm threshold value is respectively set for the transmitting light attenuation value and the receiving light attenuation value of the ports of the interconnected network devices, so that the ports of the interconnected network devices can alarm in time when the transmitting light attenuation value or the receiving light attenuation value is abnormal, and then the network device can timely transmit the abnormal alarm information of the ports of the interconnected network devices to the interconnected network devices, so that operation and maintenance personnel, technicians, managers and the like of the interconnected network devices can process in time, and the operation capacity can be effectively improved.
The above embodiments show that, in the prior art, the debugging of the communication link between the interconnected network devices can be completed only by means of mutual cooperation of respective technicians of the interconnected network devices, which requires a long time and effort, resulting in low debugging efficiency of the communication link between the interconnected network devices. Based on this, the technical scheme of the invention modifies the existing link layer discovery protocol LLDP message, and configures the port light attenuation parameter field in the existing LLDP message, so as to actively report the light attenuation parameter values of the respective ports of the interconnected network equipment through the modified LLDP message, thereby reducing the time and energy consumed by manual debugging. Specifically, after configuring the port optical attenuation parameter field for the existing LLDP packet, the first network device may encapsulate the acquired optical attenuation parameter value of the first port in the modified LLDP packet to generate the first detection packet, so that the first detection packet includes the optical attenuation parameter value of the first port, and perform conversion processing on the first detection packet to generate the first optical signal. Then, the first optical signal is sent to the interconnected second network device through the first port, so that when the second network device detects the first optical signal through the second port, the first optical signal can be converted to obtain a first detection message, and the first detection message is analyzed to obtain an optical attenuation parameter value of the first port in time. Thus, the scheme is to configure the port optical attenuation parameter field in the existing LLDP message by modifying the existing LLDP message, interconnected network devices (such as the first network device or the second network device) can be enabled to actively encapsulate the optical attenuation parameter value of any port of the network device in the modified LLDP message, therefore, the local network device transmits the encapsulated LLDP message to the opposite network device, so that the opposite network device can timely obtain the optical attenuation parameter value of the interconnection port of the local network device, without depending on the technical personnel of the local terminal network equipment to inform the technical personnel of the opposite terminal equipment of the optical attenuation parameter value of the interconnection port of the local terminal network equipment, therefore, the labor time cost can be reduced, and the debugging efficiency of the communication link between the interconnected network devices can be effectively improved.
Based on the same technical concept, fig. 9 exemplarily shows an optical attenuation detection apparatus based on a link layer discovery protocol according to an embodiment of the present invention, and the apparatus may execute a flow of an optical attenuation detection method based on a link layer discovery protocol. The optical attenuation detection method based on the link layer discovery protocol may be executed by the first network device, or may be executed by the second network device, or may also be executed by a chip or an integrated circuit capable of supporting the first network device or the second network device to implement the functions required by the optical attenuation detection method based on the link layer discovery protocol.
As shown in fig. 9, the apparatus includes:
a generating unit 901, configured to encapsulate the obtained optical attenuation parameter value of the first port in a modified link layer discovery protocol LLDP message, and generate a first detection message; the modified LLDP message is determined by configuring a port light attenuation parameter field in the LLDP message; the first port is a port which is interconnected with second network equipment in the first network equipment;
a processing unit 902, configured to perform conversion processing on the first detection packet to generate a first optical signal; transmitting the first optical signal to the second network device through the first port; the second network device is configured to perform conversion processing on the first optical signal to obtain the first detection packet, and store an optical attenuation parameter value of the first port obtained by analyzing the first detection packet.
Optionally, the processing unit 902 is further configured to:
when detecting a second optical signal sent by the second network device through a second port through the first port, performing conversion processing on the second optical signal to obtain a second detection message; the second port is a port in the second network device, which is interconnected with the first network device;
and analyzing and processing the second detection message to obtain and store the light attenuation parameter value of the second port.
Optionally, the generating unit 901 is specifically configured to:
acquiring a light attenuation parameter value of the first port from a first information base; the first information base is used for storing the light attenuation parameter value of any port of the first network equipment;
the processing unit 902 is specifically configured to:
storing the light attenuation parameter value of the second port into a second information base; the second information base is used for storing the optical attenuation parameter value of the port of any network equipment interconnected with the first network equipment.
Optionally, the generating unit 901 is specifically configured to:
encapsulating the acquired transmitting light attenuation value of the first port in the modified LLDP message; alternatively, the first and second electrodes may be,
encapsulating the obtained sending light attenuation value of the first port and the obtained receiving light attenuation value of the first port in the modified LLDP message; the received optical attenuation value of the first port is obtained by measuring a second optical signal when the first network device detects the second optical signal through the first port.
Optionally, the processing unit 902 is specifically configured to:
analyzing the second detection message to obtain a sending light attenuation value of the second port; alternatively, the first and second electrodes may be,
analyzing the second detection message to obtain a sending light attenuation value of the second port and a receiving light attenuation value of the second port; the received optical attenuation value of the second port is obtained by measuring a first optical signal when the second network device detects the first optical signal through the second port.
Optionally, the processing unit 902 is further configured to:
after the light attenuation parameter value of the second port is stored in a second information base, the transmitting light attenuation value of the first port is obtained from the first information base, the receiving light attenuation value of the second port is obtained from the second information base, the transmitting light attenuation value of the first port is compared with the receiving light attenuation value of the second port, the receiving light attenuation value of the first port is obtained from the first information base, the transmitting light attenuation value of the second port is obtained from the second information base, and the receiving light attenuation value of the first port is compared with the transmitting light attenuation value of the second port, so that whether the quality of a communication link between first network equipment and second network equipment meets a set requirement is determined.
Optionally, the generating unit 901 is specifically configured to:
adding a type/length/value TLV format port optical attenuation parameter field in a reserved field of a data unit in the LLDP message; the value of the port light attenuation parameter field is used for configuring a port light attenuation parameter value; the port light attenuation parameter values comprise port identification numbers, light attenuation parameter types and light attenuation parameter values; alternatively, the first and second electrodes may be,
dividing a storage space with set capacity from a position area where a value is located in a port identification field of a data unit in the LLDP message; the storage space with the set capacity is used for configuring the optical attenuation parameter value of the port; the port light attenuation parameter values comprise light attenuation parameter types and light attenuation parameter values.
Based on the same technical concept, an embodiment of the present invention further provides a computing device, as shown in fig. 10, including at least one processor 1001 and a memory 1002 connected to the at least one processor, where a specific connection medium between the processor 1001 and the memory 1002 is not limited in the embodiment of the present invention, and the processor 1001 and the memory 1002 in fig. 10 are connected through a bus as an example. The bus may be divided into an address bus, a data bus, a control bus, etc.
In the embodiment of the present invention, the memory 1002 stores instructions executable by the at least one processor 1001, and the at least one processor 1001 may execute the steps included in the aforementioned optical attenuation detection method based on the link layer discovery protocol by executing the instructions stored in the memory 1002.
The processor 1001 is a control center of the computing device, and may connect various parts of the computing device by using various interfaces and lines, and implement data processing by executing or executing instructions stored in the memory 1002 and calling data stored in the memory 1002. Optionally, the processor 1001 may include one or more processing units, and the processor 1001 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application program, and the like, and the modem processor mainly processes an issued instruction. It will be appreciated that the modem processor described above may not be integrated into the processor 1001. In some embodiments, the processor 1001 and the memory 1002 may be implemented on the same chip, or in some embodiments, they may be implemented separately on separate chips.
The processor 1001 may be a general-purpose processor, such as a Central Processing Unit (CPU), a digital signal processor, an Application Specific Integrated Circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof, configured to implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present invention. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the optical attenuation detection method based on the link layer discovery protocol may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
Memory 1002, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 1002 may include at least one type of storage medium, and may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charge Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and so on. The memory 1002 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 1002 of embodiments of the present invention may also be circuitry or any other device capable of performing a storage function to store program instructions and/or data.
Based on the same technical concept, embodiments of the present invention further provide a computer-readable storage medium storing a computer program executable by a computing device, where the program, when executed on the computing device, causes the computing device to execute the steps of the above-mentioned optical attenuation detection method based on the link layer discovery protocol.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present application and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. An optical attenuation detection method based on a link layer discovery protocol, comprising:
the first network equipment encapsulates the acquired optical attenuation parameter value of the first port in a modified Link Layer Discovery Protocol (LLDP) message to generate a first detection message; the modified LLDP message is determined by configuring a port light attenuation parameter field in the LLDP message; the first port is a port of the first network device, which is interconnected with a second network device;
the first network equipment performs conversion processing on the first detection message to generate a first optical signal;
the first network device sends the first optical signal to the second network device through the first port; the second network device is configured to perform conversion processing on the first optical signal to obtain the first detection packet, and store an optical attenuation parameter value of the first port obtained by analyzing the first detection packet.
2. The method of claim 1, wherein the method further comprises:
when the first network device detects a second optical signal sent by the second network device through a second port through the first port, the first network device performs conversion processing on the second optical signal to obtain a second detection message; the second port is a port in the second network device, which is interconnected with the first network device;
and the first network equipment analyzes and processes the second detection message to obtain and store the light attenuation parameter value of the second port.
3. The method of claim 2, wherein the value of the optical attenuation parameter for the first port is obtained by:
the first network equipment acquires the light attenuation parameter value of the first port from a first information base; the first information base is used for storing the light attenuation parameter value of any port of the first network equipment;
obtaining and storing a light attenuation parameter value of the second port, including:
the first network equipment stores the light attenuation parameter value of the second port into a second information base; the second information base is used for storing the optical attenuation parameter value of the port of any network equipment interconnected with the first network equipment.
4. The method of claim 2, wherein the analyzing, by the first network device, the second probe packet to obtain the light attenuation parameter value of the second port comprises:
the first network equipment analyzes the second detection message to obtain a sending light attenuation value of the second port; alternatively, the first and second electrodes may be,
the first network device analyzes the second detection message to obtain a sending light attenuation value of the second port and a receiving light attenuation value of the second port; the received optical attenuation value of the second port is obtained by measuring a first optical signal when the second network device detects the first optical signal through the second port.
5. The method of claim 3, further comprising, after storing the optical attenuation parameter value for the second port in a second information repository:
and acquiring a transmitting light attenuation value of the first port from the first information base, acquiring a receiving light attenuation value of the second port from the second information base, comparing the transmitting light attenuation value of the first port with the receiving light attenuation value of the second port, acquiring a receiving light attenuation value of the first port from the first information base, acquiring a transmitting light attenuation value of the second port from the second information base, and comparing the receiving light attenuation value of the first port with the transmitting light attenuation value of the second port, thereby determining whether the quality of a communication link between the first network device and the second network device meets a set requirement.
6. The method according to any one of claims 1 to 3, wherein the first network device encapsulates the obtained optical attenuation parameter value of the first port in a modified Link layer discovery protocol, LLDP, message, comprising:
the first network equipment encapsulates the acquired sending light attenuation value of the first port in the modified LLDP message; alternatively, the first and second electrodes may be,
the first network equipment encapsulates the acquired sending light attenuation value of the first port and the acquired receiving light attenuation value of the first port in the modified LLDP message; the received optical attenuation value of the first port is obtained by measuring a second optical signal when the first network device detects the second optical signal through the first port.
7. The method of any of claims 1 to 3, wherein determining the modified LLDP packet by configuring a port optical attenuation parameter field in the LLDP packet comprises:
adding a type/length/value TLV format port optical attenuation parameter field in a reserved field of a data unit in the LLDP message; the value of the port light attenuation parameter field is used for configuring a port light attenuation parameter value; the port light attenuation parameter values comprise port identification numbers, light attenuation parameter types and light attenuation parameter values; alternatively, the first and second electrodes may be,
dividing a storage space with set capacity from a position area where a value is located in a port identification field of a data unit in the LLDP message; the storage space with the set capacity is used for configuring the optical attenuation parameter value of the port; the port light attenuation parameter values comprise light attenuation parameter types and light attenuation parameter values.
8. An optical attenuation detection apparatus based on a link layer discovery protocol, comprising:
the generation unit is used for encapsulating the acquired optical attenuation parameter value of the first port in a modified Link Layer Discovery Protocol (LLDP) message to generate a first detection message; the modified LLDP message is determined by configuring a port light attenuation parameter field in the LLDP message; the first port is a port which is interconnected with second network equipment in the first network equipment;
the processing unit is used for performing conversion processing on the first detection message to generate a first optical signal; transmitting the first optical signal to the second network device through the first port; the second network device is configured to perform conversion processing on the first optical signal to obtain the first detection packet, and store an optical attenuation parameter value of the first port obtained by analyzing the first detection packet.
9. A computing device comprising at least one processor and at least one memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the method of any of claims 1 to 7.
10. A computer-readable storage medium, storing a computer program executable by a computing device, the program, when run on the computing device, causing the computing device to perform the method of any of claims 1 to 7.
CN202111135981.7A 2021-09-27 2021-09-27 Optical attenuation detection method and device based on link layer discovery protocol Pending CN113872687A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111135981.7A CN113872687A (en) 2021-09-27 2021-09-27 Optical attenuation detection method and device based on link layer discovery protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111135981.7A CN113872687A (en) 2021-09-27 2021-09-27 Optical attenuation detection method and device based on link layer discovery protocol

Publications (1)

Publication Number Publication Date
CN113872687A true CN113872687A (en) 2021-12-31

Family

ID=78991211

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111135981.7A Pending CN113872687A (en) 2021-09-27 2021-09-27 Optical attenuation detection method and device based on link layer discovery protocol

Country Status (1)

Country Link
CN (1) CN113872687A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114449049A (en) * 2022-01-19 2022-05-06 广东优力普物联科技有限公司 Communication device and communication system based on light management data interaction

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114449049A (en) * 2022-01-19 2022-05-06 广东优力普物联科技有限公司 Communication device and communication system based on light management data interaction

Similar Documents

Publication Publication Date Title
US10187272B2 (en) Interface management service entity, function service entity, and element management method
CN111490893B (en) Method, device and system for establishing network forwarding model
KR20180098426A (en) Network node availability prediction based on past history data
EP1819096B1 (en) A method for acquiring network key performance indicators and the key performance indicators groupware thereof
CN110401568A (en) A kind of method for discovering network topology and equipment
CN107092243B (en) Power supply control intelligent safety monitoring system based on Internet of things
WO2021233224A1 (en) Fault processing method, apparatus, and system
US11489759B2 (en) Method for determining route flapping information and related device
CN108964976A (en) A kind of alarm prompt method and warning instruction device based on optical module
CN111865745B (en) Non-delay polling method and system for automatically identifying slave equipment
CN113872687A (en) Optical attenuation detection method and device based on link layer discovery protocol
CN109964450A (en) A kind of method and device of determining sharing memory
CN106936510B (en) Method for adjusting optical power, network equipment and network management equipment
CN101252477B (en) Determining method and analyzing apparatus of network fault root
US20230087446A1 (en) Network monitoring method, electronic device and storage medium
US20230171018A1 (en) Information transmission method and device, communication device, and readable storage medium
CN107920348B (en) Device network state information
US20190335378A1 (en) Access point connectivity
CN113965512A (en) MPLS VPN customer-oriented network quality measurement method and electronic equipment
CN102195746A (en) Loop detection method and network device applying same
CN105488608A (en) Configuration-free rack server information acquisition method and system
CN112866118B (en) Method, device and storage medium for detecting port capability information of network equipment
CN103595636A (en) A method, an apparatus and a system for obtaining maintenance entity group end point MAC addresses
WO2023185214A1 (en) Network switching method, node, electronic device and readable storage medium
EP4287585A1 (en) Data communication processing method and 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