CN111130887B - Method for realizing intelligent notification of topological relation between devices - Google Patents

Method for realizing intelligent notification of topological relation between devices Download PDF

Info

Publication number
CN111130887B
CN111130887B CN201911364167.5A CN201911364167A CN111130887B CN 111130887 B CN111130887 B CN 111130887B CN 201911364167 A CN201911364167 A CN 201911364167A CN 111130887 B CN111130887 B CN 111130887B
Authority
CN
China
Prior art keywords
link
port
message
address
link direction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911364167.5A
Other languages
Chinese (zh)
Other versions
CN111130887A (en
Inventor
邹昕
张纪艳
李高超
戴丽
吴潇
吴伟雄
李政
贾有春
王晖
严伟
陈训逊
韩伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NANJING SINOVATIO TECHNOLOGY CO LTD
National Computer Network and Information Security Management Center
Original Assignee
NANJING SINOVATIO TECHNOLOGY CO LTD
National Computer Network and Information Security Management Center
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 NANJING SINOVATIO TECHNOLOGY CO LTD, National Computer Network and Information Security Management Center filed Critical NANJING SINOVATIO TECHNOLOGY CO LTD
Priority to CN201911364167.5A priority Critical patent/CN111130887B/en
Publication of CN111130887A publication Critical patent/CN111130887A/en
Application granted granted Critical
Publication of CN111130887B publication Critical patent/CN111130887B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks

Landscapes

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

Abstract

The invention discloses a method for realizing intelligent notification of topological relation between devices, which utilizes the characteristic that a data unit of an LLDP protocol is extensible, encapsulates a link ID and a link direction of the device to an extended data unit of an LLDP according to configuration information of a monitoring port group on the device, and regularly sends an LLDP message to the outside so as to realize intelligent external notification of the link and the link direction existing in the device.

Description

Method for realizing intelligent notification of topological relation between devices
Technical Field
The invention relates to the technical field of Internet management, in particular to a method for realizing intelligent notification of topological relation between devices.
Background
Network flow control equipment is connected in a router in series, network neighbors can be obtained after an LLDP link layer discovery protocol is enabled on the equipment, but the maintenance of the topological relation and the link direction between the equipment is realized in a manual table recording mode at present, and the maintenance workload of the network topological relation is large under the conditions that the network topology is complex and changes.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method for intelligently notifying topology relationships between devices, which can intelligently notify the external links and link directions existing in the devices.
In order to solve the above technical problem, the present invention provides a method for implementing intelligent notification of topological relation between devices, which comprises the following steps:
(1) adding two TLVs in an extension field of an LLDP data unit, wherein one TLV represents a link ID and the other TLV represents a link direction;
(2) setting a timing notice period by using a network topology notice function, inquiring available monitoring port group information stored by equipment in each period, acquiring a link ID and a link direction, setting the ID of the monitoring port group as the link ID, setting the direction corresponding to two ports of the monitoring port group as the link direction, assembling the acquired link information into an LLDP data unit, and sending out the link information in an LLDP message mode;
(3) if the message carries the link ID and the link direction, acquiring the message; otherwise, according to the port name of the input port, traversing and inquiring whether the port exists in the monitoring port group, if so, acquiring the link ID and the link direction of the port in the monitoring port group; and if the address does not exist, acquiring the longest mask matching result to acquire the link direction according to the manually configured IP address and the link direction.
Preferably, in the step (2), the implementation of the network topology advertisement function specifically includes the following steps:
(21) preparing network topology notice, configuring a monitoring port group-based enabled network topology sending function, and setting a network topology sending period;
(22) traversing 64 monitoring port groups in each timing period;
(23) checking whether the currently monitored port group is in an operating state and the topology advertisement function has been enabled, and if the port group is in the operating state and the topology advertisement function has been enabled, executing step (24); otherwise, returning to the step (22);
(24) checking whether the port state in the current monitoring port group is UP, whether the port is an Ethernet type port, whether the port is a local board port, if the port state is UP, the port is the Ethernet type port and the local board port, executing the step (25); otherwise, returning to the step (23);
(25) acquiring parameters of a mandatory TLV (threshold value limit) of a data unit specified by an assembly LLDP protocol standard, wherein the parameters comprise a Chassis ID, a PortID, a TTL (transistor-transistor logic) and an end mark;
(26) acquiring the IP address of the current equipment management port and the link ID and the link direction parameter added by the invention; the link ID is the ID of the current monitoring port group and ranges from 0 to 63; in the uplink and downlink directions of the current port in the link direction, the first port of the monitoring port group is an uplink port (denoted by 01), and the second port is a downlink port (denoted by 00);
(27) checking if the user has configuration optional parameters, and acquiring TLV parameters required by configuration specification, wherein the TLV parameters comprise equipment names, port descriptions, system descriptions and system functions;
(28) assembling messages in the LLDP message format of the parameters obtained in the steps (25), (26) and (27), wherein DMAC is a fixed multicast MAC address 01-80-C2-00-00-0E; SMAC is the MAC address of the current equipment; protocol Type 0x88CC with Type being LLDP; the LLDP data unit filling is filled with specific types, lengths and values according to different TLV types;
(29) and sending the assembled message out through a packet sending module.
Preferably, in the step (3), if the packet carries the link ID and the link direction, the packet is acquired; otherwise, according to the port name of the input port, traversing and inquiring whether the port exists in the monitoring port group, if so, acquiring the link ID and the link direction of the port in the monitoring port group; if the address does not exist, according to the manually configured IP address and the link direction, the step of obtaining the longest mask matching result and the link direction specifically comprises the following steps:
(31) setting IP address/mask of neighbor router and corresponding direction;
(32) a port enabling an LLDP protocol on the equipment receives an LLDP message, analyzes the content of the message, and extracts effective information such as a port name, a management IP address, TTL, a link ID, a link direction and the like;
(33) judging whether the message is in the direction of the self-carrying link according to the analysis result of the step (32), and executing a step (36) if the message is in the direction of the self-carrying link (such as the message from the shunting equipment); if the message does not carry the link direction, executing the step (34);
(34) acquiring a link direction from the monitoring port group according to the ingress port of the message;
(35) searching whether the configuration exists, if the monitoring port group does not have the port and the message has the management IP address, inquiring the corresponding relation between the IP address and the direction configured in the step (31) according to the IP address; if a plurality of same IPs exist, executing step (36), and obtaining the link direction according to the longest mask matching IP address;
(36) acquiring a link ID and a link direction carried by a message;
(37) storing the obtained link ID and link direction into a storage structure of LLDP data;
(38) the detailed contents of the link layer discovery protocol packet, including the link ID and the link direction, can be viewed through the show bad entry command.
The invention has the beneficial effects that: the invention utilizes the characteristic that the data unit of the LLDP protocol is extensible, encapsulates the link ID and the link direction of the equipment to the extended data unit of the LLDP according to the configuration information of the monitoring port group on the equipment, and regularly sends an LLDP message to the outside, thereby realizing the intelligent external notification of the existing link and the link direction of the equipment.
Drawings
Fig. 1 is an illustration of the added link ID and link direction TLV format of the present invention.
Fig. 2 is a schematic flow chart of the device serving as a sender for externally notifying the network topology of the device.
Fig. 3 is a schematic flow chart of acquiring a neighbor network topology by using the device of the present invention as a receiving party.
Detailed Description
An implementation method for intelligent notification of topological relation between devices comprises the following steps:
(1) adding two TLVs in an extension field of an LLDP data unit, wherein one TLV represents a link ID and the other TLV represents a link direction;
(2) setting a timing notice period by using a network topology notice function, inquiring available monitoring port group information stored by equipment in each period, acquiring a link ID and a link direction, setting the ID of the monitoring port group as the link ID, setting the direction corresponding to an uplink port of the monitoring port group as the link direction, assembling the acquired link information into an LLDP data unit, and sending the link information out in an LLDP message mode;
(3) if the message carries the link ID and the link direction, acquiring the message; otherwise, according to the port name of the input port, traversing and inquiring whether the port exists in the monitoring port group, if so, acquiring the link ID and the link direction of the port in the monitoring port group; and if the address does not exist, acquiring the longest mask matching result to acquire the link direction according to the manually configured IP address and the link direction.
As shown in fig. 1, the TLV type value of the link ID is fixed to 9, occupying 7 bits; then, for the TLV length indication bit, the TLV length indication bit occupies 9 bits; TLV information occupies 1 byte, has a range of 00-3F (corresponding to link ID numbers of 0-63), and is used for recording the link ID number of the port.
The TLV type value of the link direction is fixed to 10, and also occupies 7 bits; then, for the TLV length indication bit, the TLV length indication bit occupies 9 bits; the TLV information, which takes 1 byte and ranges from 00 (downstream) or 01 (upstream), is used to record the link direction of the port.
As shown in fig. 2, the implementation of the network topology advertisement function specifically includes the following steps:
(21) preparing network topology notice, configuring a monitoring port group-based enabled network topology sending function, and setting a network topology sending period;
(22) traversing 64 monitoring port groups in each timing period;
(23) checking whether the currently monitored port group is in an operating state and the topology advertisement function has been enabled, and if the port group is in the operating state and the topology advertisement function has been enabled, executing step (24); otherwise, returning to the step (22);
(24) checking whether the port state in the current monitoring port group is UP, whether the port is an Ethernet type port, whether the port is a local board port, if the port state is UP, the port is the Ethernet type port and the local board port, executing the step (25); otherwise, returning to the step (23);
(25) acquiring parameters of a mandatory TLV (threshold value limit) of a data unit specified by an assembly LLDP protocol standard, wherein the parameters comprise a Chassis ID, a PortID, a TTL (transistor-transistor logic) and an end mark;
(26) acquiring the IP address of the current equipment management port and the link ID and the link direction parameter added by the invention; the link ID is the ID of the current monitoring port group and ranges from 0 to 63; in the uplink and downlink directions of the current port in the link direction, the first port of the monitoring port group is an uplink port (denoted by 01), and the second port is a downlink port (denoted by 00);
(27) checking if the user has configuration optional parameters, and acquiring TLV parameters required by configuration specification, wherein the TLV parameters comprise equipment names, port descriptions, system descriptions and system functions;
(28) assembling messages in the LLDP message format of the parameters obtained in the steps (25), (26) and (27), wherein DMAC is a fixed multicast MAC address 01-80-C2-00-00-0E; SMAC is the MAC address of the current equipment; protocol Type 0x88CC with Type being LLDP; the LLDP data unit filling is filled with specific types, lengths and values according to different TLV types;
(29) and sending the assembled message out through a packet sending module.
As shown in fig. 3, the step of receiving the LLDP packet by the device to obtain the neighbor network topology specifically includes the following steps:
step S1: setting IP address/mask of neighbor router and corresponding direction;
step S2: a port enabling an LLDP protocol on the equipment receives an LLDP message, analyzes the content of the message, and extracts effective information such as a port name, a management IP address, TTL, a link ID, a link direction and the like;
step S3: judging whether the message carries a link direction according to the analysis result of the step S2, and if the message carries a link direction (such as a message from a shunting device), executing a step S6; if the message does not carry the link direction, executing step S4;
step S4: acquiring a link direction from the monitoring port group according to the ingress port of the message;
step S5: searching whether the configuration exists, if the monitoring port group does not have the port and the message has the management IP address, inquiring the corresponding relation between the IP address and the direction configured in the step S1 according to the IP address; if a plurality of same IPs exist, executing step S6, and obtaining the link direction according to the longest mask matching IP address;
step S6: acquiring a link ID and a link direction carried by a message;
step S7: storing the obtained link ID and link direction into a storage structure of LLDP data;
step S8: the detailed contents of the link layer discovery protocol packet, including the link ID and the link direction, can be viewed through the show bad entry command.
The invention utilizes the characteristic that the data unit of the LLDP protocol is extensible, encapsulates the link ID and the link direction of the equipment to the extended data unit of the LLDP according to the configuration information of the monitoring port group on the equipment, and regularly sends an LLDP message to the outside, thereby realizing the intelligent external notification of the existing link and the link direction of the equipment.

Claims (2)

1. An intelligent notification implementation method for topological relation among devices is characterized by comprising the following steps:
(1) adding two TLVs in an extension field of an LLDP data unit, wherein one TLV represents a link ID and the other TLV represents a link direction;
(2) setting a timing notice period by using a network topology notice function, inquiring available monitoring port group information stored by equipment in each period, acquiring a link ID and a link direction, setting the ID of the monitoring port group as the link ID, setting the direction corresponding to two ports of the monitoring port group as the link direction, assembling the acquired link information into an LLDP data unit, and sending out the link information in an LLDP message mode; the implementation of the network topology advertisement function specifically includes the following steps:
(21) preparing network topology notice, configuring a monitoring port group-based enabled network topology sending function, and setting a network topology sending period;
(22) traversing 64 monitoring port groups in each timing period;
(23) checking whether the current monitoring port group is in a working state and the topology informing function is enabled, and if the port group is in the working state and the topology informing function is enabled, executing a step (24); otherwise, returning to the step (22);
(24) checking whether the port state in the current monitoring port group is UP, whether the port is an Ethernet type port, whether the port is a local board port, and if the port state is UP, the port is the Ethernet type port and is the local board port, executing the step (25); otherwise, returning to the step (23);
(25) acquiring parameters of a mandatory TLV (threshold value limit) of a data unit specified by an assembly LLDP protocol standard, wherein the parameters comprise a Chassis ID, a PortID, a TTL (transistor-transistor logic) and an end mark;
(26) acquiring the IP address of the current equipment management port and the link ID and the link direction parameter added by the invention; the link ID is the ID of the current monitoring port group and ranges from 0 to 63; in the uplink and downlink directions of the current port in the link direction, the first port of the monitoring port group is an uplink port and is represented by 01, and the second port of the monitoring port group is a downlink port and is represented by 00;
(27) checking if the user has configuration optional parameters, and acquiring TLV parameters required by configuration specification, wherein the TLV parameters comprise equipment names, port descriptions, system descriptions and system functions;
(28) assembling messages in the LLDP message format of the parameters obtained in the steps (25), (26) and (27), wherein DMAC is a fixed multicast MAC address 01-80-C2-00-00-0E; SMAC is the MAC address of the current equipment; protocol Type 0x88CC with Type being LLDP; the LLDP data unit filling is filled with specific types, lengths and values according to different TLV types;
(29) sending the assembled message out through a packet sending module;
(3) if the message carries the link ID and the link direction, acquiring the message; otherwise, according to the port name of the input port, traversing and inquiring whether the port exists in the monitoring port group, if so, acquiring the link ID and the link direction of the port in the monitoring port group; and if the address does not exist, acquiring the longest mask matching result to acquire the link direction according to the manually configured IP address and the link direction.
2. The method for implementing intelligent notification of topological relation between devices according to claim 1, wherein in step (3), if the packet carries the link ID and the link direction, the packet is obtained; otherwise, according to the port name of the input port, traversing and inquiring whether the port exists in the monitoring port group, and if so, acquiring the link ID and the link direction of the port in the monitoring port group; if the address does not exist, according to the manually configured IP address and the link direction, the step of obtaining the longest mask matching result and the link direction specifically comprises the following steps:
(31) setting IP address/mask of neighbor router and corresponding direction;
(32) a port enabling an LLDP protocol on the equipment receives an LLDP message, analyzes the content of the message, and extracts a port name, a management IP address, TTL, a link ID and effective information of a link direction;
(33) judging whether the message is in the direction of the self-carrying link according to the analysis result of the step (32), and executing a step (36) if the message is in the direction of the self-carrying link; if the message does not carry the link direction, executing the step (34);
(34) acquiring a link direction from the monitoring port group according to the ingress port of the message;
(35) searching whether the configuration exists, if the monitoring port group does not have the port and the message has the management IP address, inquiring the corresponding relation between the IP address and the direction configured in the step (31) according to the IP address; if a plurality of same IPs exist, executing step (36), and obtaining the link direction according to the longest mask matching IP address;
(36) acquiring a link ID and a link direction carried by a message;
(37) storing the obtained link ID and link direction into a storage structure of LLDP data;
(38) the detailed contents of the link layer discovery protocol packet, including the link ID and the link direction, can be viewed through the show bad entry command.
CN201911364167.5A 2019-12-26 2019-12-26 Method for realizing intelligent notification of topological relation between devices Active CN111130887B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911364167.5A CN111130887B (en) 2019-12-26 2019-12-26 Method for realizing intelligent notification of topological relation between devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911364167.5A CN111130887B (en) 2019-12-26 2019-12-26 Method for realizing intelligent notification of topological relation between devices

Publications (2)

Publication Number Publication Date
CN111130887A CN111130887A (en) 2020-05-08
CN111130887B true CN111130887B (en) 2022-05-13

Family

ID=70502860

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911364167.5A Active CN111130887B (en) 2019-12-26 2019-12-26 Method for realizing intelligent notification of topological relation between devices

Country Status (1)

Country Link
CN (1) CN111130887B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111740911B (en) * 2020-06-30 2022-05-24 国电南瑞科技股份有限公司 Method for publishing service subscription relationship of intelligent substation based on LLDP

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102377679A (en) * 2011-12-06 2012-03-14 烽火通信科技股份有限公司 Method for realizing link discovery and management in FTTX access system
WO2012155549A1 (en) * 2011-05-17 2012-11-22 中兴通讯股份有限公司 A realization method and system of enabling lldp function on non-ethernet link
CN104333475A (en) * 2014-11-25 2015-02-04 上海斐讯数据通信技术有限公司 Network topology discovery method and system based on SDN
CN104735001A (en) * 2013-12-24 2015-06-24 中兴通讯股份有限公司 Link discovery method, device and system in software-defined network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012155549A1 (en) * 2011-05-17 2012-11-22 中兴通讯股份有限公司 A realization method and system of enabling lldp function on non-ethernet link
CN102377679A (en) * 2011-12-06 2012-03-14 烽火通信科技股份有限公司 Method for realizing link discovery and management in FTTX access system
CN104735001A (en) * 2013-12-24 2015-06-24 中兴通讯股份有限公司 Link discovery method, device and system in software-defined network
CN104333475A (en) * 2014-11-25 2015-02-04 上海斐讯数据通信技术有限公司 Network topology discovery method and system based on SDN

Also Published As

Publication number Publication date
CN111130887A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
US11374857B2 (en) Network device management method and apparatus, and system for indicating a network device to perform management operation
CN102082727B (en) Packet transport network (PTN) traffic flow management method
US8743879B2 (en) Label switched routing to connect low power network domains
CN103618636B (en) The EOC equipment self-discovery self-configuration methods of Integrated Network Management based on EPON+EOC technologies
CN102857377B (en) The online topological automatic generation method of a kind of train network
US20140086099A1 (en) Realization method and system for enabling LLDP function on non-ethernet link
CN107438016A (en) Network management, equipment, system and storage medium
US12015543B2 (en) Method for configuring performance measurement indication information and related device
KR20050104364A (en) Determination of groupmembers prior of monitoring groups of network nodes
CN101414963A (en) Method and apparatus for automatic topological discover and resource management in PBB TE network
CN110351141B (en) Flexe interface management method, device and network element
US20170118105A1 (en) Connectivity fault management in a communication network
CN101094121A (en) Method, system and device for detecting Ethernet links among not direct connected devices
WO2019056909A1 (en) Centralized automatic link discover system and method for otn network
CN102984507A (en) Network assisting management device and concurrent management device in video monitoring system
US20180091518A1 (en) Method, apparatus, and system for collecting access control list
CN107465622A (en) A kind of method and system that discovering network topology is realized using LLDP
CN104283790A (en) Topology discovery method and equipment of resilient packet ring (RPR) in SDN
EP3461080B1 (en) Topology determination method, message response method, controller and switch
EP2728797A1 (en) Message processing method, device and system
CN111130887B (en) Method for realizing intelligent notification of topological relation between devices
WO2009024965A2 (en) Technique for testing peers in multicast network domain
WO2017215383A1 (en) Network element configuration method and device, and network element management method and device
CN116600330A (en) HUB hierarchical topology management method and device based on NETCONF protocol
US20190158638A1 (en) Transmission device and transmission method

Legal Events

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