CN116094957A - Port connection detection method, device and storage medium - Google Patents

Port connection detection method, device and storage medium Download PDF

Info

Publication number
CN116094957A
CN116094957A CN202310010476.2A CN202310010476A CN116094957A CN 116094957 A CN116094957 A CN 116094957A CN 202310010476 A CN202310010476 A CN 202310010476A CN 116094957 A CN116094957 A CN 116094957A
Authority
CN
China
Prior art keywords
port
target
flow rate
connection detection
waveform diagram
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
CN202310010476.2A
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.)
China United Network Communications Group Co Ltd
China Information Technology Designing and Consulting Institute Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
China Information Technology Designing and Consulting Institute 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 China United Network Communications Group Co Ltd, China Information Technology Designing and Consulting Institute Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202310010476.2A priority Critical patent/CN116094957A/en
Publication of CN116094957A publication Critical patent/CN116094957A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0894Packet rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks

Landscapes

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

Abstract

The disclosure provides a port connection detection method, a port connection detection device and a storage medium, relates to the technical field of communication, and solves the technical problem that the accuracy of updating routing table data in the related art is difficult to guarantee. The method comprises the following steps: acquiring a link layer discovery protocol LLDP message in target equipment; the target device includes at least one first port; determining at least one adjacent device of the target device according to the LLDP message; each of the at least one adjoining device includes at least one second port; acquiring a first flow rate of each first port in a preset time period; and a second flow rate for each second port over a preset period of time; a target second port for each first port connection is determined based on the first flow rate and the second flow rate. And updating the routing table according to the determined port relation, so that the accuracy of the routing table is ensured. The present disclosure is used in the context of port connection detection.

Description

Port connection detection method, device and storage medium
Technical Field
The disclosure relates to the field of communication technologies, and in particular, to a method and a device for detecting port connection, and a storage medium.
Background
Currently, in a scenario of device port management, after a device port is adjusted according to service requirements, a routing table needs to be updated to record the connection relationship between the device and its port identification information and the port.
However, since the information in the routing table relates to a plurality of departments, when the routing table is updated, people of different departments need to fill in the connection relation of the ports, and the accuracy of the connection relation of the ports recorded by each person is difficult to ensure, so that the accuracy of the data recorded by the routing table is difficult to ensure, and therefore, how to accurately determine the connection relation between the ports becomes a technical problem to be solved currently.
Disclosure of Invention
The disclosure provides a port connection detection method, a port connection detection device and a storage medium. The method solves the technical problem that the connection relation between ports is difficult to accurately determine in the related art.
In order to achieve the above purpose, the present disclosure adopts the following technical scheme:
in a first aspect, a method for detecting port connection is provided, including: acquiring a link layer discovery protocol LLDP message in target equipment; the target device includes at least one first port; the LLDP message includes an identification of an adjacent device of the target device; determining at least one adjacent device of the target device according to the LLDP message; each of the at least one adjoining device includes at least one second port; acquiring a first flow rate of each first port in a preset time period; and a second flow rate for each second port over a preset period of time; a target second port for each first port connection is determined based on the first flow rate and the second flow rate.
With reference to the first aspect, in one possible implementation manner, acquiring a link layer discovery protocol LLDP packet in a target device includes: receiving an LLDP message from a target device; storing LLDP messages of the target equipment into a management information base MIB; after receiving a first operation instruction, acquiring an LLDP message of the target device from the MIB; the first operation instruction is used for indicating to determine port connection information of the target device.
With reference to the first aspect, in one possible implementation manner, the first flow rate is specifically a first flow rate waveform chart, and the second flow rate is specifically a second flow rate waveform chart; the flow rate waveform diagram is used for representing flow rates at a plurality of time points in a preset time period; determining a target second port to which the first port is connected based on the first flow rate and the second flow rate, comprising: respectively executing target operation on each first port, and determining a target second port connected with each first port; the target operations include: determining a first flow rate waveform diagram of a target first port; determining the similarity between the first flow rate waveform diagram of the target first port and the second flow rate waveform diagram of each second port; the target first port is one of the at least one first port; and determining a second port corresponding to a second flow rate waveform diagram with highest similarity with the first flow rate waveform diagram of the target first port as a target second port.
With reference to the first aspect, in one possible implementation manner, the target device and at least one neighboring device are cross-domain neighboring devices; after determining the target second port for each first port connection based on the first flow rate and the second flow rate, the method further comprises: generating a routing table according to the target second port connected with each first port; the routing table is used for storing port connection relations between the cross-domain adjacent devices and port parameters.
In a second aspect, there is provided a port connection detection apparatus including: a communication unit and a processing unit; a communication unit, configured to obtain a link layer discovery protocol LLDP message in a target device; the target device includes at least one first port; the LLDP message includes an identification of an adjacent device of the target device; a processing unit, configured to determine at least one neighboring device of the target device according to the LLDP packet; each of the at least one adjoining device includes at least one second port; the communication unit is also used for acquiring the first flow rate of each first port in a preset time period; and a second flow rate for each second port over a preset period of time; and the processing unit is also used for determining a target second port connected with each first port according to the first flow rate and the second flow rate.
With reference to the second aspect, in one possible implementation manner, the communication unit is further configured to receive an LLDP packet from the target device; the processing unit is also used for storing the LLDP message of the target device into a Management Information Base (MIB); the processing unit is further used for acquiring an LLDP message of the target device from the MIB after receiving the first operation instruction; the first operation instruction is used for indicating to determine port connection information of the target device.
With reference to the second aspect, in one possible implementation manner, the first flow rate is specifically a first flow rate waveform chart, and the second flow rate is specifically a second flow rate waveform chart; the flow rate waveform diagram is used for representing flow rates at a plurality of time points in a preset time period; the processing unit is specifically used for: respectively executing target operation on each first port, and determining a target second port connected with each first port; the target operations include: determining a first flow rate waveform diagram of a target first port; determining the similarity between the first flow rate waveform diagram of the target first port and the second flow rate waveform diagram of each second port; the target first port is one of the at least one first port; and determining a second port corresponding to a second flow rate waveform diagram with highest similarity with the first flow rate waveform diagram of the target first port as a target second port.
With reference to the second aspect, in one possible implementation manner, the target device and at least one neighboring device are cross-domain neighboring devices; the processing unit is specifically used for: generating a routing table according to the target second port connected with each first port; the routing table is used for storing port connection relations between the cross-domain adjacent devices and port parameters.
In a third aspect, there is provided a port connection detection apparatus comprising: a processor and a memory; the processor executes the computer-executable instructions stored in the memory, so that the port connection detection device performs the port connection detection method described in any one of the possible implementations of the first aspect.
In a fourth aspect, there is provided a computer-readable storage medium having instructions stored therein, which when executed by a processor of a port connection detection apparatus, cause the port connection detection apparatus to perform the port connection detection method described in the first aspect and any one of the possible implementations thereof.
In the present disclosure, the names of the above-mentioned port connection detecting apparatuses do not constitute limitations on the devices or function modules themselves, and in actual implementations, these devices or function modules may appear under other names. Insofar as the function of each device or functional module is similar to the present disclosure, it is within the scope of the present disclosure and the equivalents thereof.
These and other aspects of the disclosure will be more readily apparent from the following description.
The technical scheme provided by the disclosure at least brings the following beneficial effects: the present disclosure provides a port connection detection method applied in a routing table update scenario, where a port connection detection device determines, according to an LLDP packet stored in an MIB, an adjacent device of a target device, that is, determines an adjacent relationship between devices. After the adjacent equipment of the target equipment is determined, the flow rates of all ports of the target equipment and the adjacent equipment in a preset time period are called, and the connection relation between the ports is accurately determined according to the comparison flow rates.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the prior art, the drawings that are used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a schematic hardware structure diagram of a port connection detection device according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a connection relationship between adjacent devices according to an embodiment of the disclosure;
fig. 3 is a schematic diagram of sending and receiving LLDP packets between adjacent devices according to an embodiment of the disclosure;
FIG. 4 is a waveform diagram of port flow rates provided by an embodiment of the present disclosure;
fig. 5 is a flow chart of a port connection detection method according to an embodiment of the present disclosure;
fig. 6 is a flowchart of another method for detecting port connection according to an embodiment of the present disclosure;
fig. 7 is a flowchart of another method for detecting port connection according to an embodiment of the present disclosure;
fig. 8 is a flowchart of another method for detecting port connection according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a port connection detection device according to an embodiment of the present disclosure.
Detailed Description
The following describes in detail a port connection detection method, device and storage medium provided in an embodiment of the present disclosure with reference to the accompanying drawings.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone.
The terms "first" and "second" and the like in the description and in the drawings of the present disclosure are used for distinguishing between different objects or for distinguishing between different processes of the same object and not for describing a particular sequential order of objects.
Furthermore, references in the description of this disclosure to the terms "comprise" and "have," and any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed but may optionally include other steps or elements not listed or inherent to such process, method, article, or apparatus.
It should be noted that in the embodiments of the present disclosure, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g." in the examples of this disclosure should not be taken as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In the description of the present disclosure, unless otherwise indicated, the meaning of "a plurality" means two or more.
Fig. 1 is a schematic structural diagram of a port connection detection device according to an embodiment of the present disclosure, and as shown in fig. 1, the port connection detection device 100 includes at least one processor 101, a communication line 102, at least one communication interface 104, and a memory 103. The processor 101, the memory 103, and the communication interface 104 may be connected through a communication line 102.
The processor 101 may be a central processing unit (central processing unit, CPU), or may be an application specific integrated circuit (application specific integrated circuit, ASIC), or one or more integrated circuits configured to implement embodiments of the present disclosure, such as: one or more digital signal processors (digital signal processor, DSP), or one or more field programmable gate arrays (field programmable gate array, FPGA).
Communication line 102 may include a pathway for communicating information between the aforementioned components.
The communication interface 104, for communicating with other devices or communication networks, may use any transceiver-like device, such as ethernet, radio access network (radio access network, RAN), wireless local area network (wireless local area networks, WLAN), etc.
The memory 103 may be, but is not limited to, a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (random access memory, RAM) or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), a compact disc read-only memory (compact disc read-only memory) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to include or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
In a possible design, the memory 103 may exist independent of the processor 101, that is, the memory 103 may be a memory external to the processor 101, where the memory 103 may be connected to the processor 101 through a communication line 102, for storing execution instructions or application program codes, and the execution is controlled by the processor 101, to implement a port connection detection method provided in the following embodiments of the disclosure. In yet another possible design, the memory 103 may be integrated with the processor 101, i.e., the memory 103 may be an internal memory of the processor 101, e.g., the memory 103 may be a cache, and may be used to temporarily store some data and instruction information, etc.
As one implementation, processor 101 may include one or more CPUs, such as CPU0 and CPU1 in fig. 1. As another implementation, the port connection detection apparatus 100 may include a plurality of processors, such as the processor 101 and the processor 107 in fig. 1. As yet another implementation, the port connection detection apparatus 100 may further include an output device 105 and an input device 106.
From the foregoing description of the embodiments, it will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of functional modules is illustrated, and in practical application, the above-described functional allocation may be implemented by different functional modules according to needs, i.e. the internal structure of the network node is divided into different functional modules to implement all or part of the functions described above. The specific working processes of the above-described system, module and network node may refer to the corresponding processes in the foregoing method embodiments, which are not described herein.
The following explains terms related to the embodiments of the present disclosure, for convenience of the reader.
1. Standing book
The original account book is placed on the desk for people to read. The standing book currently includes information such as files, work plans, work reports and the like.
The routing ledger table in the present disclosure is a ledger table in which port connection relationship information between network devices as shown in fig. 2 is recorded. Wherein a first network device 201 is deployed in a machine room a, and a second network device 202 is deployed in a machine room B. The port of the first network device 201 is connected to the optical distribution frame (Optical Distribution Frame, ODF) 203 in the machine room a through a receiving fiber core and a transmitting fiber core, the port of the second network device is connected to the optical distribution frame ODF203 in the machine room B through a receiving fiber core and a transmitting fiber core, and the first network device 201 can perform fiber skipping through the ODF203 and connect to the second device 202.
Illustratively, the first network device 201 may be an optical transport network (optical transport network, OTN) device and the second network device 202 may be a router device.
The routing table of the OTN device and the router device is shown in table 1 below.
Table 1 routing ledger sheet
Figure BDA0004037893930000071
After the device port is regulated according to service requirements, the routing ledger table is required to be updated, but because the ledger table is updated and carded by different departments and the updating and carding modes of the ledgers are different for each person, the accuracy of the updated routing ledger table is difficult to guarantee.
2. Link layer discovery protocol LLDP
At present, network devices are increasingly various and are complicated in configuration, and in order to enable devices of different manufacturers to discover and interact with each other in a network, a standard information exchange platform is required.
The link layer discovery protocol (Link Layer Discovery Protocol, LLDP) is generated in such a background, and provides a standard link layer discovery manner, so that the information such as the main capability, management address, device identifier, interface identifier and the like of the local terminal device can be organized into different TLVs (types/Length/values), and the different TLVs are encapsulated in the LLDPDU (Link Layer Discovery Protocol Data Unit ) to be issued to the neighboring device in the form of an LLDP message, and the neighboring device can be stored in the form of a standard MIB (Management Information Base ) after receiving the information, so as to be used by the network management system for inquiring and judging the communication condition of the link.
LLDP message
The packet encapsulated with the LLDPDU is called an LLDP packet, and has two encapsulation formats, i.e., ethernet II and SNAP (Subnetwork Access Protocol, subnet access protocol).
Transmission mechanism: when the port is operated, the device periodically transmits an LLDP message to the neighboring device. And if the local configuration of the equipment changes, immediately sending an LLDP message to inform the adjacent equipment of the change condition of the local information as soon as possible. However, in order to prevent the frequent change of the local information from causing a large amount of sending of the LLDP messages, each time an LLDP message is sent, it is necessary to delay a period of time before continuing to send the next message. When the device discovers a new adjacent device, i.e. receives a new LLDP message and the local device does not store the information of the device for transmitting the message yet, the device automatically starts a quick transmission mechanism, shortens the transmission period of the LLDP message to 1 second, continuously transmits a designated number of LLDP messages and then returns to a normal transmission period.
Reception mechanism: when the port works, the device checks the validity of the received LLDP message and the TLV protocol carried by the LLDP message, and stores neighbor information to the local after checking.
Illustratively, as shown in fig. 3, the fourth network device 302 sends an LLDP message to port 1 of the third network device 301 via port 3. Accordingly, the third network device 301 receives, through the port 1, the LLDP packet sent by the fourth network device 302 through the port 3.
The third network device 301 sends an LLDP message to port 4 of the fourth network device 302 via port 2. Accordingly, the fourth network device 302 receives the LLDP message from the third network device 301 via port 2 via port 4.
The fifth network device 303 transmits an LLDP message to port 5 of the fourth network device 302 via port 8. Accordingly, the fourth network device 302 receives the LLDP message sent by the fifth network device 303 through the port 8 through the port 5.
The fourth network device 302 transmits an LLDP message to port 7 of the fifth network device 303 through port 6. Accordingly, the fifth network device 303 receives the LLDP message sent by the fourth network device 302 through the port 6 through the port 7.
The sixth network device 304 transmits an LLDP message to the port 10 of the fifth network device 303 through the port 12. Accordingly, the fourth network device 303 receives the LLDP message sent by the fifth network device 303 through the port 12 through the port 10.
The fifth network device 303 transmits an LLDP message to the port 11 of the sixth network device 304 through the port 9. Accordingly, the sixth network device 304 receives the LLDP message sent by the fifth network device 303 through the port 9 through the port 11.
Based on the message transmission situation that the network devices mutually transmit the LLDP message, it can be determined that the third network device 301 has an adjacency relationship with the fourth network device 302, the fourth network device 302 has an adjacency relationship with the third network device 301 and the fifth network device 303, the fifth network device 303 has a connection relationship with the fourth network device 302 and the sixth network device 304, and the sixth network device 304 has an adjacency relationship with the fifth network device 303.
3. Flow rate waveform diagram
The first flow rate waveform diagram in the present disclosure is used to characterize the flow rate of the port of the target device within the preset time period, and the second flow rate waveform diagram is used to characterize the flow rate of the port of the adjacent device of the target device within the preset time period.
Illustratively, as shown in fig. 4, wherein the first traffic rate waveform is the port traffic transmission rate of the target device and the second traffic rate waveform is the port traffic reception rate of the neighboring device of the target device. And determining the connection relation between the port of the target device and the port of the adjacent device according to the similarity between the first flow chart and the second flow chart.
In the current scenario of device port management, after the device port is adjusted according to the service requirement, the route ledger table recording device and the identification information and the position information of the port thereof need to be updated. However, since the information in the routing table relates to a plurality of departments, people of different departments are required to update the routing table together, and the updating and carding modes of the routing table of each person are different, so that the accuracy of the data recorded by the routing table is difficult to guarantee.
In order to solve the technical problems in the related art, the present disclosure provides a port connection detection method, where a port connection detection apparatus determines, according to an LLDP packet, an adjacent device of a target device, that is, determines an adjacent relationship between devices. After the adjacent equipment of the target equipment is determined, the flow rates of all ports of the target equipment and the adjacent equipment in a preset time period are called, and the ports connected with the target equipment and the adjacent equipment are determined according to the flow rates of all the ports, so that the connection relation between the ports is accurately determined.
As shown in fig. 5, fig. 5 is a diagram illustrating a port connection detection method according to an embodiment of the present disclosure, for determining a connection relationship between ports of a device, where the method includes the following steps S501 to S504.
S501, the port connection detection device acquires the LLDP message of the target device.
Wherein the target device comprises at least one first port. The LLDP message includes an identification of the target device's neighboring devices.
It is understood that the target device supports and enables devices of the LLDP protocol.
Illustratively, the target device may be a router, and the LLDP message includes at least one of: the management address of the router, the device identification of the router, and the router port identification.
S502, the port connection detection device determines at least one adjacent device of the target device according to the LLDP message.
Wherein each of the at least one adjoining device comprises at least one second port.
It can be understood that the adjacent device is a device supporting and enabling the LLDP protocol, because the target device can only receive the LLDP message transmitted by the device having an adjacency relationship with the target device, the adjacent device of the target device can be confirmed based on the LLDP message.
The adjacency device may be an OTN device, and the port connection detecting apparatus may determine that the router has an adjacency relationship with the OTN device according to an identifier of the OTN device in the LLDP packet.
S503, the port connection detection device acquires a first flow rate of each first port in a preset time period and a second flow rate of each second port in the preset time period.
In a possible implementation manner, the port connection detection device determines, according to data provided by the network management system, a traffic rate of each port of the router and a traffic rate of each port of the OTN device adjacent to the router in a preset period of time.
S504, the port connection detection device determines a target second port connected with each first port according to the first flow rate and the second flow rate.
Optionally, the first flow rate is a sending rate of each flow corresponding to each port of the router in a preset time period, and the second flow rate is a receiving rate of each flow corresponding to each port of the OTN device in the preset time period.
In a possible implementation manner, the port connection detection device determines a connection relationship between a port of the router and a port of the OTN device according to each flow sending rate corresponding to each port of the router in a preset time period and each flow receiving rate corresponding to each port of the OTN device in the preset time period.
The technical scheme provided by the embodiment at least has the following beneficial effects: the port connection detecting means determines the adjacent devices of the target device, that is, confirms the adjacent relationship between the devices, based on the LLDP message stored in the MIB. After the adjacent equipment of the target equipment is determined, the flow rates of all ports of the target equipment and the adjacent equipment in a preset time period are called, and the connection relation between the ports is accurately determined according to the comparison flow rates.
In a possible implementation manner, as shown in fig. 6 in conjunction with fig. 5, the above-mentioned step S501 of the port connection detecting apparatus obtaining the link layer discovery protocol LLDP message in the target device specifically includes the following steps S601-S603, which are described in detail below.
S601, the port connection detection device receives an LLDP message from the target device.
In a possible implementation manner, the OTN device generates an LLDP packet according to its device location information and port connection information, and sends the LLDP packet to an adjacent router. And after receiving the LLDP message sent by the OTN equipment, the adjacent router sends the LLDP message to the port connection detection device.
S602, the port connection detection device stores the LLDP message of the target device into the MIB.
In one possible implementation manner, the port connection detecting device determines an association relationship between an LLDP message and a router after receiving the LLDP message from the router, and stores the LLDP message in the MIB.
S603, the port connection detection device acquires the LLDP message of the target device from the MIB after receiving the first operation instruction.
The first operation instruction is used for indicating to determine port connection information of the target device.
Illustratively, when the operator needs to update the router ledger, a first instruction for instructing to determine port connection information of the target device is input to the port connection detection apparatus. After receiving the first operation instruction, the port connection detection device acquires an LLDP message of the target device from the MIB, executes the port connection detection method described in the application, determines the port connection relation between the router and the OTN device, and updates the router ledger according to the connection relation.
The technical scheme provided by the embodiment at least has the following beneficial effects: after receiving the LLDP message from the adjacent device, the target device sends the LLDP message to the port connection detection device, the port connection detection device stores the LLDP message in the MIB library, and after receiving the instruction for determining the port connection information of the target device, the port connection detection device can directly acquire the LLDP message from the MIB library, so that the port connection detection device determines the port connection information of the target device according to the LLDP message.
In a possible implementation manner, the first flow rate is specifically a first flow rate waveform chart, and the second flow rate is specifically a second flow rate waveform chart, where the flow rate waveform chart is used to characterize the flow rate at a plurality of time points within a preset time period.
In a possible implementation manner, as shown in fig. 7, the port connection detection apparatus in S504 may perform a target operation on each of the first ports, and determine a target second port to which each of the first ports is connected.
The target operation specifically includes S701 to S703, which will be described in detail below.
S701, the port connection detection device determines a first flow rate waveform diagram of the target first port.
In a possible implementation manner, the port connection device may acquire, through the network management system, a traffic rate waveform diagram of all ports of the target device in a preset time period, and a traffic rate waveform diagram of all ports of an adjacent device of the target device in the preset time period.
S702, the port connection detection device determines the similarity between the first flow rate waveform diagram of the target first port and the second flow rate waveform diagram of each second port.
Wherein the target first port is one of the at least one first port.
In one possible implementation manner, the port connection detection device may determine, according to a traffic rate waveform diagram of all ports of the target device in a preset time period and a traffic rate waveform diagram of all ports of the adjacent devices of the target device in the preset time period, each port of each adjacent device having the highest similarity to the port traffic rate waveform diagram of the target device.
S703, the port connection detection device determines that a second port corresponding to the second flow rate waveform diagram with the highest similarity with the first flow rate waveform diagram of the target first port is the target second port.
It can be understood that if the similarity between the first flow rate waveform diagram of the target first port and the second flow rate waveform diagram of the target second port is the highest, it can be stated that the flow receiving/transmitting rates of the first port and the second port are similar in the preset period, and then the connection relationship between the target first port and the target second port can be determined.
The first traffic rate waveform is exemplary of traffic transmission rates of ports of the router at a plurality of time points within a preset time period.
The second flow rate waveform diagram is exemplary of flow reception rates of the ports of the OTN device at a plurality of time points within a preset period of time.
In a possible implementation manner, the port connection detection device determines a traffic sending rate waveform diagram of each port of the router in a preset time period and a traffic receiving rate waveform diagram of each port of the OTN device in the preset time period. And determining two ports with high similarity between the flow sending rate waveform diagram and the flow receiving rate waveform diagram as connected ports.
The technical scheme provided by the embodiment at least has the following beneficial effects: after determining the adjacent device of the target device, the port connection detection device invokes the flow wave patterns of all ports of the target device and the adjacent device in a preset time period, and can determine the ports connected with the adjacent device according to the similarity of the flow wave patterns.
In one possible implementation manner, the target device and at least one neighboring device are cross-domain neighboring devices.
Wherein the cross-domain adjacent device is an adjacent device that is different from the functional domain of the target device.
Illustratively, the target device may be a router, and the adjacent device may be an OTN device.
In a possible implementation manner, as shown in fig. 8 in conjunction with fig. 6, after the port connection detection device determines the target second port of each first port connection according to the first flow rate and the second flow rate, the port connection detection method further includes S801, which is described in detail below.
S801, the port connection detection device generates a routing ledger table according to the target second port connected with each first port.
The routing account table is mainly used for storing port connection relations and port parameters between the cross-domain adjacent devices.
Illustratively, the parameters stored in the routing table include at least one of: adjacent device location, adjacent device identification, adjacent device port number, adjacent device port rate.
Optionally, the port connection detection device updates and corrects the routing ledger according to the target second port connected with each first port.
The technical scheme provided by the embodiment at least has the following beneficial effects: the present disclosure provides a port connection detection method applied in a routing table update scenario, where a port connection detection device determines, according to an LLDP packet stored in an MIB, an adjacent device of a target device, that is, determines an adjacent relationship between devices. After the adjacent equipment of the target equipment is determined, the flow wave patterns of all ports of the target equipment and the adjacent equipment in a preset time period are called, the ports connected with the target equipment and the adjacent equipment are determined according to the similarity of the flow wave patterns, and the routing table is updated, so that the accuracy of the data recorded by the routing table is ensured.
The port connection detection method according to the embodiment of the present disclosure is described in detail above.
It can be seen that the foregoing description has mainly been presented with respect to a method of providing a technical solution according to an embodiment of the present disclosure. To achieve the above functions, it includes corresponding hardware structures and/or software modules that perform the respective functions. Those of skill in the art will readily appreciate that the various illustrative modules and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
The embodiment of the disclosure may divide the functional modules of the port connection detection apparatus according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated in one processing module. The integrated modules may be implemented in hardware or in software functional modules. Optionally, the division of the modules in the embodiments of the present disclosure is schematic, which is merely a logic function division, and other division manners may be actually implemented.
Fig. 9 is a schematic structural diagram of a port connection detection device 900 according to an embodiment of the disclosure.
The port connection detection apparatus 900 includes: a communication unit 901 and a processing unit 902, where the communication unit 901 is configured to obtain a link layer discovery protocol LLDP packet in a target device; the target device includes at least one first port; the LLDP message includes an identification of an adjacent device of the target device; a processing unit 902, configured to determine at least one neighboring device of the target device according to the LLDP packet; each of the at least one adjoining device includes at least one second port; the communication unit 901 is further configured to obtain a first flow rate of each first port in a preset time period; and a second flow rate for each second port over a preset period of time; the processing unit 902 is further configured to determine a target second port to which each first port is connected according to the first flow rate and the second flow rate.
In a possible implementation manner, the communication unit 901 is further configured to receive an LLDP packet from the target device; the processing unit 902 is further configured to store an LLDP packet of the target device into a management information base MIB; the processing unit 902 is further configured to obtain an LLDP packet of the target device from the MIB after receiving the first operation instruction; the first operation instruction is used for indicating to determine port connection information of the target device.
In one possible implementation, the first flow rate is embodied as a first flow rate waveform, and the second flow rate is embodied as a second flow rate waveform; the flow rate waveform diagram is used for representing flow rates at a plurality of time points in a preset time period; the processing unit 902 is specifically configured to: respectively executing target operation on each first port, and determining a target second port connected with each first port; the target operations include: determining a first flow rate waveform diagram of a target first port; determining the similarity between the first flow rate waveform diagram of the target first port and the second flow rate waveform diagram of each second port; the target first port is one of the at least one first port; and determining a second port corresponding to the second flow rate waveform diagram with the highest similarity as a target second port, wherein the second port corresponds to the first flow rate waveform diagram of the target first port.
In a possible implementation manner, the target device and at least one neighboring device are a cross-domain neighboring device processing unit 902, which is specifically configured to: generating a routing table according to the target second port connected with each first port; the routing table is used for storing port connection relations between the cross-domain adjacent devices and port parameters.
The embodiment of the disclosure also provides a port connection detection device, which comprises a processor and a memory; the processor executes the computer-executable instructions stored in the memory, so that the port connection detection device executes the port connection detection method according to the embodiment of the present disclosure.
Embodiments of the present disclosure provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform the port connection detection method in the method embodiments described above.
Embodiments of the present disclosure provide a chip comprising a processor and a communication interface, the communication interface and the processor being coupled, the processor being configured to execute a computer program or instructions to implement a port connection detection method as in the method embodiments described above.
The computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: electrical connections having one or more wires, portable computer diskette, hard disk. Random access Memory (Random Access Memory, RAM), read-Only Memory (ROM), erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), registers, hard disk, optical fiber, portable compact disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any other form of computer-readable storage medium suitable for use by a person or persons of skill in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an application specific integrated circuit (Application Specific Integrated Circuit, ASIC). In the disclosed embodiments, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
Since the apparatus, device, computer readable storage medium, and computer program product in the embodiments of the present disclosure may be applied to the above-mentioned method, the technical effects that may be obtained by the apparatus, device, computer readable storage medium, and computer program product may also refer to the above-mentioned method embodiments, and the embodiments of the present disclosure are not repeated herein.
The foregoing is merely illustrative of specific embodiments of the present disclosure, but the scope of the present disclosure is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims (10)

1. A port connection detection method, comprising:
acquiring a link layer discovery protocol LLDP message of target equipment; the target device includes at least one first port; the LLDP message comprises the identification of the adjacent equipment of the target equipment;
determining at least one adjacent device of the target device according to the LLDP message; each of the at least one adjoining device includes at least one second port;
acquiring a first flow rate of each first port in a preset time period; and a second flow rate for each of the second ports over the preset time period;
And determining a target second port connected with each first port according to the first flow rate and the second flow rate.
2. The method of claim 1, wherein the obtaining a link layer discovery protocol LLDP message in the target device comprises:
receiving an LLDP message from the target device;
storing the LLDP message of the target device into a Management Information Base (MIB);
after receiving a first operation instruction, acquiring an LLDP message of the target device from the MIB; the first operation instruction is used for indicating to determine port connection information of the target device.
3. The method according to claim 1 or 2, wherein the first flow rate is in particular a first flow rate waveform and the second flow rate is in particular a second flow rate waveform; the flow rate waveform diagram is used for representing flow rates at a plurality of time points in the preset time period;
the determining, according to the first flow rate and the second flow rate, a target second port to which the first port is connected, includes:
respectively executing target operation on each first port, and determining a target second port connected with each first port;
The target operation includes: determining a first flow rate waveform diagram of a target first port;
determining the similarity of a first flow rate waveform diagram of the target first port and a second flow rate waveform diagram of each second port; the target first port is one of the at least one first port;
and determining a second port corresponding to a second flow rate waveform diagram with highest similarity to the first flow rate waveform diagram of the target first port as the target second port.
4. The method according to claim 1 or 2, wherein the target device and the at least one neighboring device are cross-domain neighboring devices;
after determining a target second port for each of the first port connections based on the first flow rate and the second flow rate, the method further comprises:
generating a routing table according to the target second port connected with each first port; the routing table is used for storing port connection relations between the cross-domain adjacent devices and port parameters.
5. A port connection detection apparatus, comprising: a communication unit and a processing unit;
The communication unit is used for acquiring a link layer discovery protocol LLDP message in the target equipment; the target device includes at least one first port; the LLDP message comprises the identification of the adjacent equipment of the target equipment;
the processing unit is configured to determine at least one neighboring device of the target device according to the LLDP packet; each of the at least one adjoining device includes at least one second port;
the communication unit is further used for acquiring a first flow rate of each first port in a preset time period; and a second flow rate for each of the second ports over the preset time period;
the processing unit is further configured to determine a target second port connected to each of the first ports according to the first flow rate and the second flow rate.
6. The apparatus of claim 5, wherein the communication unit is further configured to receive an LLDP message from the target device;
the processing unit is further configured to store an LLDP packet of the target device into a management information base MIB;
the processing unit is further configured to obtain an LLDP packet of the target device from the MIB after receiving the first operation instruction; the first operation instruction is used for indicating to determine port connection information of the target device.
7. The apparatus according to claim 5 or 6, wherein the first flow rate is in particular a first flow rate waveform and the second flow rate is in particular a second flow rate waveform; the flow rate waveform diagram is used for representing flow rates at a plurality of time points in the preset time period;
the processing unit is specifically configured to:
respectively executing target operation on each first port, and determining a target second port connected with each first port;
the target operation includes: determining a first flow rate waveform diagram of a target first port;
determining the similarity of a first flow rate waveform diagram of the target first port and a second flow rate waveform diagram of each second port; the target first port is one of the at least one first port;
and determining a second port corresponding to a second flow rate waveform diagram with highest similarity to the first flow rate waveform diagram of the target first port as the target second port.
8. The apparatus of claim 5 or 6, wherein the target device and the at least one neighboring device are cross-domain neighboring devices;
The processing unit is specifically configured to:
generating a routing table according to the target second port connected with each first port; the routing table is used for storing port connection relations between the cross-domain adjacent devices and port parameters.
9. A port connection detection apparatus, comprising: a processor and a memory; wherein the memory is configured to store computer-executable instructions that, when executed by the port connection detection apparatus, cause the port connection detection apparatus to perform the port connection detection method of any one of claims 1-4.
10. A computer readable storage medium having instructions stored therein, which when executed by a processor of a port connection detection apparatus, cause the port connection detection apparatus to perform the port connection detection method of any one of claims 1-4.
CN202310010476.2A 2023-01-04 2023-01-04 Port connection detection method, device and storage medium Pending CN116094957A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310010476.2A CN116094957A (en) 2023-01-04 2023-01-04 Port connection detection method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310010476.2A CN116094957A (en) 2023-01-04 2023-01-04 Port connection detection method, device and storage medium

Publications (1)

Publication Number Publication Date
CN116094957A true CN116094957A (en) 2023-05-09

Family

ID=86207740

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310010476.2A Pending CN116094957A (en) 2023-01-04 2023-01-04 Port connection detection method, device and storage medium

Country Status (1)

Country Link
CN (1) CN116094957A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105049239A (en) * 2015-06-25 2015-11-11 北京百度网讯科技有限公司 Interface connection relation identification method and system
CN108337111A (en) * 2018-01-05 2018-07-27 新华三技术有限公司 Obtain the method and device of network node topology
CN110401568A (en) * 2019-07-31 2019-11-01 普联技术有限公司 A kind of method for discovering network topology and equipment
CN110830290A (en) * 2019-10-28 2020-02-21 华为技术有限公司 Network topology generation method and server
CN115396320A (en) * 2022-08-10 2022-11-25 中国联合网络通信集团有限公司 Method, device, equipment and storage medium for determining port connection relation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105049239A (en) * 2015-06-25 2015-11-11 北京百度网讯科技有限公司 Interface connection relation identification method and system
CN108337111A (en) * 2018-01-05 2018-07-27 新华三技术有限公司 Obtain the method and device of network node topology
CN110401568A (en) * 2019-07-31 2019-11-01 普联技术有限公司 A kind of method for discovering network topology and equipment
CN110830290A (en) * 2019-10-28 2020-02-21 华为技术有限公司 Network topology generation method and server
CN115396320A (en) * 2022-08-10 2022-11-25 中国联合网络通信集团有限公司 Method, device, equipment and storage medium for determining port connection relation

Similar Documents

Publication Publication Date Title
CN1937589B (en) Routing configuration validation apparatus and methods
CN110830290B (en) Network topology generation method and server
CN102711193B (en) Perform the apparatus and method switched fast
EP3846396A1 (en) Method and device for sending routing information
US9391842B2 (en) Self-configuring transport network
CN111083120B (en) Data transmission method and device, electronic equipment and storage medium
CN102546374A (en) Method and system for automatically discovering ODU (Optical Digital Unit) flex bandwidth lossless regulation capability
CN115150305A (en) System, method, electronic device and storage medium for determining time delay link of bearer network
EP3306872B1 (en) Method and apparatus for exploring fronthaul topology
CN205622762U (en) Internet protocol camera and monitored control system thereof
CN102684966B (en) Equipment method of network entry, Apparatus and system
US20050089029A1 (en) Method for operating a transmission system and transmission system in an energy supply network
CN113179215B (en) Networking communication method, system, node device, storage medium and electronic device
KR20050000501A (en) Communication terminal device and communication control method
CN103108347A (en) Association alarm method and association alarm device of wired network and wireless network
CN110958170B (en) Network interconnection method and device
CN116094957A (en) Port connection detection method, device and storage medium
CN105100300A (en) Method and device for network address translation
US20210274023A1 (en) Apparatus control method, device, control node, network apparatus and data center
FI109261B (en) Establishing a management channel
CN111163499B (en) Access method, device, electronic equipment and storage medium
CN110233799A (en) A kind of method and communication equipment of port configuration
CN102332997B (en) Network equipment and method for adjusting link capacity by using network equipment
CN101616092B (en) Method and device for routing discovery
EP1780942A1 (en) Method for automatically discovering a bus system in a multipoint transport network, multipoint transport network and network node

Legal Events

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