[go: up one dir, main page]

WO2024114329A1 - Link discovery method, apparatus, and system - Google Patents

Link discovery method, apparatus, and system Download PDF

Info

Publication number
WO2024114329A1
WO2024114329A1 PCT/CN2023/130562 CN2023130562W WO2024114329A1 WO 2024114329 A1 WO2024114329 A1 WO 2024114329A1 CN 2023130562 W CN2023130562 W CN 2023130562W WO 2024114329 A1 WO2024114329 A1 WO 2024114329A1
Authority
WO
WIPO (PCT)
Prior art keywords
network
port
controller
domain
network device
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.)
Ceased
Application number
PCT/CN2023/130562
Other languages
French (fr)
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of WO2024114329A1 publication Critical patent/WO2024114329A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
    • 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

Definitions

  • the present application relates to the field of network technology, and in particular to a link discovery method, device and system.
  • Cross-domain links refer to communication links between different network domains. In the process of network maintenance, fault handling, network cutover, etc., it is often necessary to obtain the network topology of the communication network, which requires the discovery of cross-domain links in the communication network.
  • LLDP link layer discovery protocol
  • the present application provides a link discovery method, device and system.
  • the technical solution of the present application is as follows.
  • a link discovery method comprising: a controller obtains first discovery information and second discovery information, the first discovery information is discovery information of a first link obtained by a first network device based on a clock protocol message, the second discovery information is discovery information of the first link obtained by a second network device based on the clock protocol message, the first network device is in a first network domain, the second network device is in a second network domain, the network type of the first network domain is different from the network type of the second network domain, and the first link is a cross-domain link between a first port of the first network device and a second port of the second network device; the controller determines the first link based on the first discovery information and the second discovery information.
  • cross-domain links are usually discovered through LLDP, which requires that network devices in different network domains support LLDP, resulting in limited application scenarios of the solution and poor universality.
  • IP Internet Protocol
  • the single board of the optical network device or wavelength division device
  • IP Internet Protocol
  • the single board of the optical network device needs to support LLDP, but currently only a few single boards of wavelength division devices support LLDP, which results in that in most scenarios, LLDP cannot be used to discover cross-domain links between the optical network domain and the IP network domain.
  • the present application discovers cross-domain links between different network domains based on clock protocol messages.
  • the cross-domain link between the optical network domain and the IP network domain is discovered based on the clock protocol message. Since most network devices support the clock protocol, the cross-domain link discovery solution of the present application can be applied to most network scenarios.
  • the cross-domain link discovery solution of the present application has a wide range of application scenarios and strong universality.
  • the first discovery information includes indication information of the first port
  • the second discovery information includes indication information of the second port
  • at least one of the first discovery information and the second discovery information includes a correspondence between the first port and the second port
  • the controller determines the first link according to the first discovery information and the second discovery information, including: the controller determines the first port of the first network device according to the indication information of the first port; the controller determines the second port of the second network device according to the indication information of the second port; the controller determines that the first port corresponds to the second port according to the correspondence.
  • the controller determines that the first port corresponds to the second port, that is, the controller discovers the first link between the first port and the second port.
  • the first discovery information also includes indication information of the first network device
  • the second discovery information also includes indication information of the second network device
  • the controller determines the first link according to the first discovery information and the second discovery information, and further includes: the controller determines the first network device according to the indication information of the first network device; the controller determines the second network device according to the indication information of the second network device.
  • the controller can determine that the first port belongs to the first network device according to the first discovery information; since the second discovery information includes the indication information of the second network device and the indication information of the second port, the controller can determine that the second port belongs to the second network device according to the second discovery information; thereby facilitating the controller to determine the first link between the first port and the second port.
  • the method further includes: the controller sends a target policy to the first network device and the second network device, the target policy being used to instruct the first network device and the second network device to discover a cross-domain link between the first network domain and the second network domain based on the first clock protocol, wherein the clock protocol message is a message based on the first clock protocol.
  • the target policy is a link discovery policy based on the first clock protocol.
  • the technical solution provided by the present application is that the controller sends a target policy to the first network device and the second network device, so that the first network device can obtain the first discovery information based on the clock protocol message, and the second network device can obtain the second discovery information based on the clock protocol message, so that the controller determines the first link according to the first discovery information and the second discovery information.
  • the method before the controller sends the target policy to the first network device and the second network device, the method also includes: the controller obtains first capability information and second capability information, the first capability information is used to indicate that the first port supports the first clock protocol (that is, the first port supports the link discovery capability based on the first clock protocol), and the second capability information is used to indicate that the second port supports the first clock protocol (that is, the second port supports the link discovery capability based on the first clock protocol); the controller determines the target policy based on the first capability information and the second capability information.
  • the technical solution provided by the present application is that since the target policy is determined by the controller based on the first capability information and the second capability information, the target policy can adapt to the link discovery capability of the first port of the first network device and the link discovery capability of the second port of the second network device, thereby facilitating the first network device and the second network device to execute the target policy to obtain link discovery information.
  • the controller is a cross-domain controller, and the controller obtains first discovery information and second discovery information, including: the controller receives first discovery information sent by a first controller, and the first controller is a controller of a first network domain; the controller receives second discovery information sent by a second controller, and the second controller is a controller of a second network domain.
  • the cross-domain controller, the first controller, and the second controller are three different controllers.
  • the first controller is in the first network domain
  • the second controller is in the second network domain
  • the cross-domain controller is outside the first network domain
  • the cross-domain controller is outside the second network domain.
  • the cross-domain controller is one controller, and the first controller and the second controller are the same controller; or, the cross-domain controller, the first controller, and the second controller are one controller.
  • one of the first network domain and the second network domain is an optical network domain
  • the other network domain is an IP network domain
  • the first network domain is an IP network domain
  • the second network domain is an optical network domain
  • the optical network domain is an optical transmission network (OTN).
  • one of the first network domain and the second network domain is a wireless network domain, and the other network domain is a wired network domain.
  • the first network domain is a wireless network domain
  • the second network domain is a wired network domain.
  • a link discovery method comprising: a controller acquires first capability information and second capability information, the first capability information being used to indicate a link discovery capability supported by a first port of a first network device, the second capability information being used to indicate a link discovery capability supported by a second port of a second network device, the first network device being in a first network domain, the second network device being in a second network domain, and a network type of the first network domain being different from a network type of the second network domain; the controller sends a target policy to the first network device and the second network device, the target policy being used to instruct the first network device and the second network device to discover a cross-domain link between the first network domain and the second network domain based on the target policy, the target policy being determined based on the first capability information and the second capability information.
  • the staff determines the discovery strategy of the cross-domain link according to the network situation, which requires the staff to be familiar with the network situation and has high requirements for the staff.
  • the technical solution provided by the present application is that the controller determines the target strategy according to the first capability information and the second capability information, that is, the controller determines the discovery strategy of the cross-domain link according to the link discovery capability supported by the network port.
  • the process of determining the discovery strategy of the cross-domain link does not require manual participation, and the requirements for the staff are relatively low.
  • the target strategy includes at least one of the following: a link discovery strategy based on a first clock protocol; a link discovery strategy based on a first discovery protocol; a link discovery strategy based on port traffic statistics; a link discovery strategy based on port alarms.
  • the first discovery protocol is LLDP or other link discovery protocols.
  • the first clock protocol is the Institute of Electrical and Electronics Engineers (IEEE) 1588 protocol, the International Telecommunication Union Telecommunication Standardization Sector (ITU-T for ITU Telecommunication Standardization Sector, ITU-T) G.8275.1 protocol or other clock protocols.
  • the first clock protocol is IEEE 1588 version 2 (version 2, V2).
  • the IEEE 1588 protocol is also called the 1588 protocol or the precision time protocol (PTP).
  • the full name of the 1588 protocol is: Precision Clock Synchronization Protocol Standard for Network Measurement and Control Systems.
  • the ITU-TG.8275.1 protocol is also called the G.8275.1 protocol.
  • the ITU-TG.8275.1 protocol defines a telecommunication-grade precision time protocol telecom profile for phase/time synchronization with full timing support from the network.
  • the method further includes: the controller according to The first capability information and the second capability information determine the target policy.
  • the technical solution provided by the present application is that the controller determines the target strategy based on the first capability information and the second capability information, that is, the controller determines the cross-domain link discovery strategy based on the link discovery capability supported by the network port. Therefore, the process of determining the cross-domain link discovery strategy does not require human participation and has low requirements for staff.
  • the controller determines the target policy according to the first capability information and the second capability information, including:
  • the controller determines that the target strategy includes a link discovery strategy based on the first clock protocol; and/or,
  • the controller determines that the target policy includes a link discovery policy based on the first discovery protocol;
  • the controller determines that the target strategy includes a link discovery strategy based on port traffic statistics; and/or,
  • the controller determines that the target policy includes a link discovery policy based on port alarms.
  • the method also includes: the controller obtains first discovery information and second discovery information, the first discovery information is the discovery information of the cross-domain link between the first network domain and the second network domain (for example, the cross-domain link between the first port of the first network device and the second port of the second network device) obtained by the first network device based on the target policy, and the second discovery information is the discovery information of the cross-domain link between the first network domain and the second network domain obtained by the second network device based on the target policy; the controller determines the cross-domain link between the first network domain and the second network domain based on the first discovery information and the second discovery information.
  • the first discovery information is the discovery information of the cross-domain link between the first network domain and the second network domain (for example, the cross-domain link between the first port of the first network device and the second port of the second network device) obtained by the first network device based on the target policy
  • the second discovery information is the discovery information of the cross-domain link between the first network domain and the second network domain obtained by the second network device based on the
  • the technical solution provided by the present application is that the controller determines the target strategy according to the link discovery capability supported by the first port of the first network device and the link discovery capability supported by the second port of the second network device, that is, determines the discovery strategy of the cross-domain link between the first network domain and the second network domain, and the first network device and the second network device respectively obtain the discovery information of the cross-domain link based on the target strategy. Therefore, the process of discovering the cross-domain link does not require human participation and has low requirements for staff.
  • the target strategy includes a link discovery strategy based on a first clock protocol
  • the first discovery information includes indication information of the first port
  • the second discovery information includes indication information of the second port
  • at least one of the first discovery information and the second discovery information includes a correspondence between the first port and the second port
  • the controller determines the cross-domain link between the first network domain and the second network domain according to the first discovery information and the second discovery information, including: the controller determines the first port of the first network device according to the indication information of the first port; the controller determines the second port of the second network device according to the indication information of the second port; the controller determines that the first port corresponds to the second port according to the correspondence.
  • the controller determines that the first port of the first network device corresponds to the second port of the second network device, that is, the controller discovers the cross-domain link between the first port and the second port (that is, the cross-domain link between the first network domain and the second network domain).
  • the target strategy includes a link discovery strategy based on a first discovery protocol
  • the first discovery information includes indication information of the first port
  • the second discovery information includes indication information of the second port
  • at least one of the first discovery information and the second discovery information includes a correspondence between the first port and the second port
  • the controller determines the cross-domain link between the first network domain and the second network domain according to the first discovery information and the second discovery information, including: the controller determines the first port of the first network device according to the indication information of the first port; the controller determines the second port of the second network device according to the indication information of the second port; the controller determines that the first port corresponds to the second port according to the correspondence.
  • the controller determines that the first port of the first network device corresponds to the second port of the second network device, that is, the controller discovers the cross-domain link between the first port and the second port (that is, the cross-domain link between the first network domain and the second network domain).
  • the target strategy includes a link discovery strategy based on port traffic statistics
  • the first discovery information includes indication information of the first port and a traffic distribution curve of the first port in a first time period
  • the second discovery information includes indication information of the second port and a traffic distribution curve of the second port in the first time period
  • the controller determines the cross-domain link between the first network domain and the second network domain according to the first discovery information and the second discovery information, including: the controller determines the first port of the first network device according to the indication information of the first port; the controller determines the second port of the second network device according to the indication information of the second port; the controller determines that the first port corresponds to the second port according to the traffic distribution curve of the first port in the first time period and the traffic distribution curve of the second port in the first time period.
  • the controller determines that the first port of the first network device corresponds to the second port of the second network device, that is, the controller discovers the cross-domain link between the first port and the second port (that is, the cross-domain link between the first network domain and the second network domain).
  • the target strategy includes a link discovery strategy based on port alarms
  • the first discovery information includes indication information and disconnection time information of the first port
  • the disconnection time information is used to indicate that the first port is disconnected within the second time period
  • the second discovery information includes indication information and alarm time information of the second port
  • the alarm time information is used to indicate that the second port has an alarm within the second time period
  • the controller determines the cross-domain link between the first network domain and the second network domain according to the first discovery information and the second discovery information, including: the controller determines the first port of the first network device according to the indication information of the first port; the controller determines the second port of the second network device according to the indication information of the second port; the controller determines that the first port corresponds to the second port according to the disconnection time information and the alarm time information.
  • the controller determines that the first port of the first network device corresponds to the second port of the second network device, that is, the controller discovers the cross-domain link between the first port and the second port (that is, the cross-domain link between the first network domain and the second network domain).
  • the first discovery information also includes indication information of the first network device
  • the second discovery information also includes indication information of the second network device
  • the controller determines the cross-domain link between the first network domain and the second network domain based on the first discovery information and the second discovery information, and further includes: the controller determines the first network device based on the indication information of the first network device; the controller determines the second network device based on the indication information of the second network device.
  • the controller is a cross-domain controller, and the controller obtains first capability information and second capability information, including: the controller receives first capability information sent by a first controller, and the first controller is a controller of a first network domain; the controller receives second capability information sent by a second controller, and the second controller is a controller of a second network domain.
  • the cross-domain controller, the first controller and the second controller are three different controllers.
  • the cross-domain controller is one controller, and the first controller and the second controller are one controller; or, the cross-domain controller, the first controller, and the second controller are one controller.
  • one of the first network domain and the second network domain is an optical network domain, and the other network domain is an IP network domain.
  • one of the first network domain and the second network domain is a wireless network domain, and the other network domain is a wired network domain.
  • a link discovery device is provided, which is applied to a controller and includes modules for executing the link discovery method provided in the first aspect or any optional manner of the first aspect.
  • a link discovery device is provided, which is applied to a controller and includes modules for executing the link discovery method provided in the second aspect or any optional manner of the second aspect.
  • modules of the third and fourth aspects mentioned above may be implemented based on software, hardware or a combination of software and hardware, and the modules may be arbitrarily combined or divided based on specific implementations.
  • a link discovery device comprising a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory so that the link discovery device performs a link discovery method provided in the first aspect or any optional method of the first aspect.
  • a link discovery device comprising a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory so that the link discovery device performs a link discovery method provided in the second aspect or any optional method of the second aspect.
  • a link discovery system including a controller, a first network device and a second network device, the first network device is in a first network domain, the second network device is in a second network domain, the network type of the first network domain is different from the network type of the second network domain, and the controller includes a link discovery device as provided in any one of the third to sixth aspects above.
  • the controller is a cross-domain controller, and the system further includes a first controller and a second controller, the first controller is a controller of a first network domain, and the second controller is a controller of a second network domain.
  • the cross-domain controller, the first controller and the second controller are three different controllers.
  • the cross-domain controller is one controller, and the first controller and the second controller are one controller; or, the cross-domain controller, the first controller, and the second controller are one controller.
  • one of the first network domain and the second network domain is an optical network domain, and the other network domain is an IP network domain.
  • one of the first network domain and the second network domain is a wireless network domain, and the other network domain is a wired network domain.
  • a computer-readable storage medium stores a computer program.
  • the program When the program is executed, the link discovery method provided by the first aspect or any optional method of the first aspect is implemented; or, the link discovery method provided by the second aspect or any optional method of the second aspect is implemented.
  • a computer program product which includes a program or code, and when the program or code is executed, it implements the link discovery method provided by the first aspect or any optional method of the first aspect; or, it implements the link discovery method provided by the second aspect or any optional method of the second aspect.
  • a chip which includes a programmable logic circuit and/or program instructions, and when the chip is running, it is used to implement the link discovery method provided by the first aspect or any optional method of the first aspect; or, to implement the link discovery method provided by the second aspect or any optional method of the second aspect.
  • FIG1 is a schematic diagram of a communication network provided in an embodiment of the present application.
  • FIG2 is a schematic diagram of another communication network provided in an embodiment of the present application.
  • FIG3 is a flow chart of a link discovery method provided by an embodiment of the present application.
  • FIG4 is a schematic diagram of a PTP header provided in an embodiment of the present application.
  • FIG5 is a flow chart of another link discovery method provided in an embodiment of the present application.
  • FIG6 is an interaction diagram of a link discovery method provided in an embodiment of the present application.
  • FIG8 is a flowchart of another link discovery method provided in an embodiment of the present application.
  • FIG9 is an interaction diagram of another link discovery method provided in an embodiment of the present application.
  • FIG10 is a schematic diagram of a link discovery device provided in an embodiment of the present application.
  • FIG. 11 is a schematic diagram of another link discovery device provided in an embodiment of the present application.
  • FIG. 12 is a schematic diagram of another link discovery device provided in an embodiment of the present application.
  • a cross-domain link refers to a communication link between different network domains.
  • the communication link between the optical network domain and the Internet Protocol (IP) network domain is a cross-domain link, which is also called a pigtail.
  • IP Internet Protocol
  • link discovery solutions that can be used to discover cross-domain links, including LLDP-based link discovery solutions, port traffic statistics-based link discovery solutions, and port alarm-based link discovery solutions, which are introduced below.
  • LLDP-based link discovery scheme cross-domain links are discovered through LLDP.
  • this link discovery scheme requires that network devices in different network domains support LLDP, which limits the application scenarios of the link discovery scheme and has poor universality. For example, if the cross-domain link between the optical network domain and the IP network domain is discovered through LLDP, the client-side board of the optical network device (that is, the board in the optical network device used to connect to the IP network domain) needs to support LLDP.
  • cross-domain links are discovered based on the network traffic distribution of different network ports in different network domains (that is, the network ports of network devices in different network domains) in the same time period.
  • network traffic distribution of multiple different network ports in the same time period is consistent or slightly different, it will be difficult to discover cross-domain links, requiring manual assistance in judgment, or even making it impossible to discover cross-domain links.
  • the cross-domain link is discovered by disconnecting the communication link corresponding to a certain network port and determining the network port that generates an alarm after disconnecting the communication link.
  • the network port of the optical network device and the network port of the IP network device are both provided with Laser, by turning off the laser of a certain network port of the optical network device, and determining the IP network port (that is, the network port of the IP network device) where an alarm occurs after the laser of the certain network port is turned off, it is determined that there is a cross-domain link between the certain network port and the IP network port where the alarm occurs.
  • disconnecting the communication link corresponding to the network port is likely to affect the operation of the business carried by the communication link. For example, if a certain communication link has no protection link (or called a standby link or backup link), disconnecting the communication link will cause the business carried by the communication link to be interrupted. Therefore, this link discovery solution is only applicable to scenarios where there is a protection link in the communication link.
  • the above three link discovery schemes are all scenario-limited and have poor universality. It is usually necessary to select different link discovery schemes from the above three link discovery schemes in combination with the actual network conditions to discover cross-domain links.
  • the staff selects the link discovery scheme from the above three link discovery schemes according to the network conditions of the communication network to discover the cross-domain links in the communication network. This requires the staff to be familiar with the network conditions of the communication network, which places high demands on the staff. For example, if the link discovery scheme based on LLDP discovers the cross-domain link between the optical network domain and the IP network domain, the staff needs to be familiar with which network devices in the optical network domain support LLDP.
  • the staff needs to be familiar with the network conditions to assist in judgment. If the link discovery scheme based on port alarms discovers the cross-domain link between the optical network domain and the IP network domain, the staff needs to be familiar with which communication links have protection links.
  • the present application provides a link discovery solution that can discover cross-domain links based on a clock protocol. Since most network devices support the clock protocol, the link discovery solution can be applied to most network scenarios.
  • the link discovery solution has a wide range of application scenarios, strong universality, and high accuracy.
  • the controller determines the discovery strategy of the cross-domain link based on the link discovery capability supported by the network port, and the network device executes the discovery strategy to discover the cross-domain link.
  • the process of determining the discovery strategy of the cross-domain link and the process of discovering the cross-domain link do not require human participation, and there is no requirement for the operating skills of the staff.
  • the application scenario of the present application provides a communication network, which includes at least two network domains, and the at least two network domains are communicatively connected.
  • a communication link is deployed between the at least two network domains, so that the at least two network domains are communicatively connected.
  • each of the at least two network domains includes at least one network device, and the at least two network domains are communicatively connected, that is, the network devices in the at least two network domains are communicatively connected, and the communication link between the at least two network domains is also the communication link between the network devices in the at least two network domains, and the communication link between the at least two network domains is called a cross-domain link.
  • the network types of the at least two network domains are different, and the network type of each network domain is used to indicate the type of network device in the network domain, and/or, to indicate the type of communication link in the network domain.
  • the at least two network domains include an optical network domain and an IP network domain
  • the optical network domain and the IP network domain respectively include a plurality of network devices
  • the network devices in the optical network domain are communicatively connected
  • the network devices in the IP network domain are communicatively connected
  • the network devices in the optical network domain are communicatively connected with the network devices in the IP network domain.
  • the network type of the optical network domain is an optical network type
  • the optical network type is used to indicate that the network devices in the optical network domain are optical network devices
  • the optical network type is used for the communication link in the optical network domain to be an optical fiber link.
  • the network type of the IP network domain is an IP network type, and the IP network type is used to indicate that the network devices in the IP network domain are IP network devices, and/or, the IP network type is used to indicate that the communication link in the IP network domain is an IP link.
  • the optical network domain is an OTN, a synchronous digital herarchy (SDH) network, etc.
  • Optical network equipment refers to network equipment that supports optical communication protocols, and optical fiber links refer to communication links that support optical communication protocols.
  • Optical network equipment is also called optical communication equipment, wavelength division equipment, OTN equipment, SDH equipment, etc.
  • optical network equipment is OTN equipment.
  • IP network equipment refers to network equipment that supports IP communication protocols, and IP links refer to communication links that support IP communication protocols.
  • IP network equipment is also called IP communication equipment, data communication equipment, data communication equipment, etc.
  • IP network equipment is switches and routers that support IP communication protocols.
  • the at least two network domains include a wireless network domain and a wired network domain
  • the wireless network domain and the wired network domain respectively include multiple network devices
  • the network devices in the wireless network domain are communicatively connected
  • the network devices in the wired network domain are communicatively connected
  • the network devices in the wireless network domain are communicatively connected to the network devices in the wired network domain.
  • the network type of the wireless network domain is a wireless network type, and the wireless network type is used to indicate that the network equipment in the wireless network domain is a wireless network equipment, and/or, the wireless network type is used for the communication link in the wireless network domain is a wireless link.
  • the network type of the wired network domain is a wired network type, and the wired network type is used to indicate that the network equipment in the wired network domain is a wired network equipment, and/or, the wired network type is used to indicate that the communication link in the wired network domain is a wired link.
  • the wireless network domain is a base station subsystem, which includes a wireless base station and a wireless communication device connected to the wireless base station, the wireless network device refers to a network device that supports a wireless communication protocol, and the wireless link refers to a communication link that supports a wireless communication protocol, for example, the wireless network device is a wireless base station, a wireless gateway, etc.
  • the wired network domain can be a bearer network, the wired network device refers to a network device that supports a wired communication protocol, and the wired link refers to a network device that supports a wired communication protocol.
  • the communication link of the protocol, wired network equipment is also called fixed network equipment, and wired network equipment can be switches, routers, etc.
  • the communication network also includes at least one controller, each controller is connected in communication with at least one network device in the communication network to control the at least one network device.
  • the at least one controller includes a cross-domain controller and at least two intra-domain controllers; each intra-domain controller can be located in a network domain and connected in communication with the network devices in the network domain to control the network devices in the network domain; the cross-domain controller can be located outside the at least two network domains and connected in communication with the at least two intra-domain controllers to control the at least two intra-domain controllers, thereby performing collaborative control between the at least two network domains.
  • the at least one controller can work in collaboration with the network devices in the at least two network domains to discover the cross-domain links between the at least two network domains.
  • Figure 1 is a schematic diagram of a communication network provided in an embodiment of the present application.
  • Figure 1 takes the communication network including network domain 1 and network domain 2 as an example.
  • Network domain 1 includes a controller 100 and network devices 101-102, and the controller 100 is communicatively connected to the network devices 101-102, and the controller 100 is used to control the network devices 101-102.
  • Network domain 2 includes a controller 200 and network devices 201-202, and the controller 200 is communicatively connected to the network devices 201-202, and the controller 200 is used to control the network devices 201-202.
  • the communication network also includes a controller 300, and the controller 300 is communicatively connected to the controllers 100-200 respectively, and the controller 300 is used to control the controllers 100-200, so as to control the network devices 101-102, 201-202 through the controllers 100-200.
  • network device P1-101 i.e., network port P1 of network device 101
  • network device P2-201 i.e., network port P2 of network device 201
  • network port P3-201 i.e., network port P3 of network device 201
  • network port P4-202 i.e., network port P4 of network device 202
  • network port P5-202 i.e., network port P5 of network device 202
  • network port P6-102 i.e., network port P6 of network device 102
  • a communication link L1 is deployed between network device 101 and network device 201, one end of the communication link L1 is network port P1-101, and the other end is network port P2-201.
  • a communication link L2 is deployed between network device 102 and network device 202, one end of the communication link L2 is network port P5-202, and the other end is network port P6-102. Both the communication link L1 and the communication link L2 are cross-domain links between the network domain 1 and the network domain 2.
  • the controllers 100-300 and the network devices 101-102, 201-202 work together to discover the cross-domain link L1 and the cross-domain link L2.
  • the controller and the network device work together to discover cross-domain links between different network domains based on the clock protocol.
  • the communication network also includes a clock source, which can be located in a certain network device or can be deployed separately and communicated with at least one network device.
  • the clock source can trigger a clock protocol message based on a clock, and the clock protocol message can be transmitted in the communication network.
  • Network devices in different network domains can obtain link discovery information based on the clock protocol message, and send the link discovery information to the controller.
  • the controller analyzes the link discovery information obtained by network devices in different network domains to determine the cross-domain links between the different network domains.
  • the embodiment of the present application is illustrated by the separate deployment of the clock source.
  • Figure 2 is a schematic diagram of another communication network provided in an embodiment of the present application.
  • the communication network shown in Figure 2 also includes a clock source 400, which is connected to the network device 101, and the clock source 400 can generate a clock protocol message based on the clock triggering network device 101.
  • the network device 101 After the network device 101 generates the clock protocol message, it sends the clock protocol message to the network device 201.
  • the network device 201 After receiving the clock protocol message, the network device 201 sends the clock protocol message to the network device 202.
  • the network device 202 sends the clock protocol message to the network device 102.
  • the network devices 101, 201, 202 and 102 respectively obtain link discovery information based on the clock protocol message, and send the obtained link discovery information to the controller 300 through the controller 100 or the controller 200.
  • the controller 300 determines the cross-domain link L1 and the cross-domain link L2 according to the link discovery information obtained by the network devices 101, 201, 202 and 102.
  • the clock source 400 is connected to the network port P0-101 (that is, the network port P0 of the network device 101), and the clock source 400 triggers the clock protocol message A based on the first clock protocol, and the transmission path of the clock protocol message A includes 101->201->202->102.
  • each network device encapsulates the indication information of the network port of each network device sending the clock protocol message A in the clock protocol message A, and each network device obtains the link discovery information according to the clock protocol message A.
  • the network device 101 receives a clock protocol message A sent by the clock source 400 through the network port P0-101.
  • the network device 101 encapsulates the indication information "P1-101" of the network port P1-101 in the clock protocol message A and then sends the clock protocol message A to the network device 201 through the network port P1-101.
  • the network device 101 obtains link discovery information 1 based on the clock protocol message A.
  • the link discovery information 1 includes the indication information "P1-101" of the network port P1-101 from which the network device 101 sends the clock protocol message A.
  • the network device 201 receives the clock protocol message A sent by the network device 101 through the network port P2-201, and the network device 201 encapsulates the indication information "P3-201" of the network port P3-201 in the clock protocol message A, and then sends the clock protocol message A to the network device 202 through the network port P3-201, and the network device 201 obtains the link discovery information 2 according to the clock protocol message A, and the link discovery information 2 includes the indication information of the network port P2-201 at which the network device 201 receives the clock protocol message A "P2-101” and the correspondence between network port P1-101 and network port P2-201 "P1-101 ⁇ —>P2-201" (network device 201 determines the correspondence based on network port P2-201 at which network device 201 receives clock protocol message A and indication information "P1-101" of network port P1-101 carried in the clock protocol message A received by network device 201).
  • Network device 202 receives the clock protocol message A sent by network device 201 through network port P4-202. After encapsulating the indication information "P5-202" of network port P5-202 in the clock protocol message A, network device 202 sends the clock protocol message A to network device 102 through network port P5-202. Network device 202 obtains link discovery information 3 based on the clock protocol message A.
  • the link discovery information 3 includes the indication information "P5-202" of network port P5-202 from which network device 202 sends the clock protocol message A.
  • the network device 102 receives the clock protocol message A sent by the network device 202 through the network port P6-102.
  • the network device 102 obtains the link discovery information 4 according to the clock protocol message A.
  • the link discovery information 4 includes the indication information "P6-102" of the network port P6-102 through which the network device 102 receives the clock protocol message A and the correspondence between the network port P5-202 and the network port P6-102 "P5-202 ⁇ —>P6-102" (the network device 102 determines the correspondence according to the network port P6-102 through which the network device 102 receives the clock protocol message A and the indication information "P5-202" of the network port P5-202 carried in the clock protocol message A received by the network device 102).
  • the controller 300 can determine the network port P1-101 according to the indication information "P1-101" of the network port P1-101 included in the link discovery information 1, determine the network port P2-201 according to the indication information "P2-101” of the network port P2-201 included in the link discovery information 2, and determine that the network port P1-101 corresponds to the network port P2-201 according to the corresponding relationship "P1-101 ⁇ —>P2-201" included in the link discovery information 2, thereby determining the cross-domain link L1.
  • the controller 300 can determine the network port P5-202 according to the indication information "P5-202" of the network port P5-202 included in the link discovery information 3, determine the network port P6-102 according to the indication information "P6-102” of the network port P6-102 included in the link discovery information 4, and determine that the network port P5-202 corresponds to the network port P6-102 according to the corresponding relationship "P5-202 ⁇ —>P6-102" included in the link discovery information 4, thereby determining the cross-domain link L2.
  • the technical solution provided by the present application can not only discover cross-domain links, but also discover intra-domain links.
  • the above-mentioned link discovery information 2 may also include the indication information "P3-101" of the network port P3-201 of the network device 201 sending the clock protocol message A.
  • the above-mentioned link discovery information 3 may also include the indication information "P4-202" of the network port P4-202 of the network device 202 receiving the clock protocol message A and the corresponding relationship between the network port P3-201 and the network port P4-202 "P3-201 ⁇ —>P4-202".
  • the controller 300 can determine the network port P3-201 according to the indication information "P3-101" of the network port P3-201 included in the link discovery information 2, determine the network port P4-202 according to the indication information "P4-202" of the network port P4-202 included in the link discovery information 3, and determine that the network port P3-201 corresponds to the network port P4-202 according to the corresponding relationship "P3-201 ⁇ —>P4-202" included in the link discovery information 3, thereby determining the communication link between the network device 201 and the network device 202, which is an intra-domain link in the network domain 2.
  • network device 101 and network device 201 belong to the same geographical domain
  • network device 102 and network device 202 belong to the same geographical domain
  • network device 201 and network device 202 may belong to different geographical domains.
  • the geographical domain described here may be a site, such as a computer room, etc.
  • one of network domains 1 and 2 is an IP network domain
  • the other network domain is an optical network domain
  • cross-domain link L1 and cross-domain link L2 are both optical fiber links.
  • network domain 1 is an IP network domain
  • network domain 2 is an optical network domain
  • cross-domain link L1, cross-domain link L2 are all optical fiber links.
  • Network device 101 and network device 201 can be deployed in computer room 1, and network device 102 and network device 202 can be deployed in computer room 2.
  • Network device 201 in computer room 1 and network device 202 in computer room 2 are connected by optical fiber link communication, so that network device 201 and network device 202 can communicate, and thus network device 101 in computer room 1 and network device 102 in computer room 2 can communicate.
  • one of network domains 1 and 2 is a wireless network domain, and the other network domain is a wired network domain, and cross-domain link L1 and cross-domain link L2 are both wired links.
  • network domain 1 is a wireless network domain
  • network device 101 is a wireless base station
  • network domain 2 is a wired network domain
  • network device 201 is a fixed network device.
  • each controller in the controllers 100-300 may be a functional module deployed in a server, or a server, or a server cluster consisting of several servers, or a cloud computing service center.
  • the controllers 100-300 may be three different controllers, or at least two of the controllers 100-300 may be one controller, for example, the controller 100 and the controller 200 may be the same controller, and the controller 300 may be another controller; or, the controller 100, the controller 200 and the controller 300 may be the same controller.
  • controllers 100-300 may be functional modules deployed in one server; for example, the controllers 100-300 may be three functional modules deployed in the same server, or, the controllers 100-200 may be two functional modules deployed in the same server, and the controller 300 may be a functional module deployed in another server.
  • part or all of the controllers 100-300 are servers; for example, the controllers 100-300 are servers, or the controllers 100-200 are servers, and the controller 300 is a functional module deployed in another server.
  • part or all of the controllers 100-300 are server clusters, for example, the controllers 100-300 are servers, or the controllers 100-200 are servers. Belongs to one server cluster, and the controller 300 belongs to another server cluster.
  • the controller is also called a manager, a network manager, a network controller, etc.
  • the clock source 400 supports at least one clock protocol.
  • the clock source 400 supports at least one of the Institute of Electrical and Electronics Engineers (IEEE) 1588 protocol and the International Telecommunication Union Telecommunication Standardization Sector (ITU-T for ITU Telecommunication Standardization Sector, ITU-T) G.8275.1 protocol.
  • IEEE 1588 protocol is a protocol defined by IEEE 1588 that can achieve high-precision clock synchronization in measurement and control systems.
  • the IEEE 1588 protocol is also called the 1588 protocol or the precision time protocol (PTP).
  • PTP precision time protocol
  • the full name of the 1588 protocol is: Precision Clock Synchronization Protocol Standard for Network Measurement and Control Systems.
  • the ITU-TG.8275.1 protocol is also called the G.8275.1 protocol.
  • the ITU-TG.8275.1 protocol defines a telecom profile for phase/time synchronization with full timing support from the network.
  • the clock source 400 can trigger the clock protocol message A based on a first clock protocol supported by the clock source 400.
  • the first clock protocol is the IEEE1588 V2 protocol or the ITU-TG.8275.1 protocol.
  • the clock source 400 is a building integrated timing supply (BITS) device.
  • FIG. 1 and FIG. 2 show two network domains 1 and two controllers 100, and the two network domains 1 are actually the same network domain, and the two controllers 100 are actually the same controller.
  • the communication network shown in FIG. 1 and FIG. 2 is only used for example, and is not used to limit the technical solution of the embodiment of the present application.
  • the number of network devices, the number of controllers, the number of network domains, the number of clock sources, and the connection relationship between different devices in the communication network can be configured as needed, and the embodiment of the present application does not limit this.
  • the message based on the first clock protocol is referred to as the first clock protocol message
  • the message based on the first discovery protocol is referred to as the first discovery protocol message.
  • FIG 3 shows a flow chart of a link discovery method provided by an embodiment of the present application.
  • the link discovery method is applied to a communication network including a controller, a first network domain and a second network domain, the network type of the first network domain is different from the network type of the second network domain, and the link discovery method is executed by the controller.
  • the communication network is shown in Figure 1 or Figure 2, one of the first network domain and the second network domain is network domain 1, the other network domain is network domain 2, and the controller is controller 300.
  • the link discovery method includes the following steps S301 to S302.
  • the controller obtains first discovery information and second discovery information, the first discovery information is the discovery information of the first link obtained by the first network device based on the clock protocol message B, and the second discovery information is the discovery information of the first link obtained by the second network device based on the clock protocol message B.
  • the first network device is in the first network domain, and the second network device is in the second network domain.
  • the network type of the first network domain is different from the network type of the second network domain, and the first link is a cross-domain link between the first port of the first network device and the second port of the second network device.
  • the controller receives the first discovery information and the second discovery information, or the controller actively collects the first discovery information and the second discovery information.
  • the controller is a cross-domain controller
  • the cross-domain controller receives the first discovery information sent by the first controller
  • the cross-domain controller receives the second discovery information sent by the second controller
  • the first controller is a controller of the first network domain
  • the second controller is a controller of the second network domain.
  • the first controller is located in the first network domain
  • the second controller is located in the second network domain.
  • the cross-domain controller, the first controller, and the second controller can be three different controllers (that is, three independent controllers). Or, at least two of the cross-domain controller, the first controller, and the second controller are one controller.
  • the network type of the first network domain is different from the network type of the second network domain; in one example, one of the first network domain and the second network domain is an optical network domain, and the other network domain is an IP network domain; in another example, one of the first network domain and the second network domain is a wireless network domain, and the other network domain is a wired network domain.
  • Different network devices in a communication network can synchronize their clocks by transmitting clock protocol message B.
  • the first network device and the second network device are two network devices in the communication network, so the first network device and the second network device can transmit the clock protocol message B.
  • the first network device can obtain first discovery information based on the clock protocol message B during the process of transmitting (e.g., sending or receiving) the clock protocol message B.
  • the second network device can obtain second discovery information based on the clock protocol message B during the process of transmitting (e.g., sending or receiving) the clock protocol message B.
  • the first network device after the first network device obtains the first discovery information, it sends the first discovery information to the first controller, and the first controller sends the first discovery information to the cross-domain controller; after the second network device obtains the second discovery information, it sends the second discovery information to the second controller, and the second controller sends the second discovery information to the cross-domain controller.
  • the first controller periodically collects link discovery information (e.g., first discovery information) from the first network device, and sends the first discovery information to the cross-domain controller; the second controller periodically collects link discovery information (e.g., second discovery information) from the second network device, and sends the second discovery information to the cross-domain controller.
  • the first controller and the second network device can periodically collect link discovery information (e.g., second discovery information) from the second network device, and send the second discovery information to the cross-domain controller.
  • the period for the second controller to collect link discovery information can be equal to the period for sending clock protocol messages.
  • the first network device sends the first discovery information to the first controller via the border gateway protocol (BGP), the network configuration protocol (NETCONF), the path computation element communication protocol (PCEP), the telemetry protocol, the Qx protocol (a protocol for communication between the host software and the network management device), or other private protocols; and/or, the second network device sends the second discovery information to the second controller via BGP, NETCONF, PCEP, the telemetry protocol, the Qx protocol, or other private protocols, which is not limited in the embodiments of the present application.
  • BGP border gateway protocol
  • NETCONF network configuration protocol
  • PCEP path computation element communication protocol
  • the telemetry protocol the Qx protocol
  • the Qx protocol a protocol for communication between the host software and the network management device
  • the second network device sends the second discovery information to the second controller via BGP, NETCONF, PCEP, the telemetry protocol, the Qx protocol, or other private protocols, which is not limited in the embodiments of the present application.
  • the first discovery information includes indication information of a first port of a first network device
  • the second discovery information includes indication information of a second port of a second network device
  • at least one of the first discovery information and the second discovery information includes a correspondence between the first port and the second port.
  • the correspondence between the first port and the second port is a correspondence between the indication information of the first port and the indication information of the second port.
  • the indication information of the first port is a port identifier of the first port
  • the indication information of the second port is a port identifier of the second port.
  • the first discovery information may also include indication information of the first network device to indicate the first network device, so that the first discovery information indicates that the first port belongs to the first network device
  • the second discovery information may also include indication information of the second network device to indicate the second network device, so that the second discovery information indicates that the second port belongs to the second network device.
  • the first network device is network device 101
  • the first port is network port P1
  • the second network device is network device 201
  • the second port is network port P2
  • the first discovery information includes the indication information "P1" of the first port and the indication information "101" of the first network device
  • the second discovery information includes the indication information "P2" of the second port and the indication information "201" of the second network device.
  • the indication information of the first port includes the indication information of the first network device and the port identifier of the first port (for example, the indication information of the first port is composed of the indication information of the first network device and the port identifier of the first port), and the indication information of the first port is used to indicate the first port and to indicate that the first port belongs to the first network device;
  • the indication information of the second port includes the indication information of the second network device and the port identifier of the second port (for example, the indication information of the second port is composed of the indication information of the second network device and the port identifier of the second port), and the indication information of the second port is used to indicate the second port and to indicate that the second port belongs to the second network device.
  • the indication information of the second port includes the indication information of the second network device and the port identifier of the second port (for example, the indication information of the second port is composed of the indication information of the second network device and the port identifier of the second port), and the indication information of the second port is used to indicate the second port
  • the first network device is network device 101
  • the first port is network port P1
  • the second network device is network device 201
  • the second port is network port P2
  • the first discovery information includes the indication information "P1-101" of the first port
  • the second discovery information includes the indication information "P2-201” of the second port.
  • the indication information of the first port is composed of the indication information "101" of the first network device and the port identifier "P1" of the first port
  • the indication information of the second port is composed of the indication information "201" of the second network device and the port identifier "P2" of the second port.
  • the port indication information can be any identification information that can be used to indicate the port, such as the port number, the media access control (MAC) address of the port.
  • the device indication information can be a device identification, such as the address of the device, the serial number of the device, and any identification information that can be used to indicate the network device.
  • the first network device and the second network device are two network devices on the transmission path of the clock protocol message B, and the second network device is the next hop device of the first network device.
  • the first network device sends the clock protocol message B to the second network device through the first port, and the second network device receives the clock protocol message B through the second port.
  • the first port is the network port through which the first network device sends the clock protocol message B
  • the second port is the network port through which the second network device receives the clock protocol message B.
  • the clock protocol message B sent by the first network device to the second network device carries the indication information of the first port.
  • the first network device generates the first discovery information according to the network port (that is, the first port) through which the first network device sends the clock protocol message B
  • the second network device generates the second discovery information according to the network port (that is, the second port) through which the second network device receives the clock protocol message B and the indication information of the first port carried by the clock protocol message B.
  • the first discovery information includes the indication information of the first port
  • the second discovery information includes the indication information of the second port and the corresponding relationship between the first port and the second port.
  • the indication information of the first port includes the indication information of the first network device and the port identifier of the first port
  • the indication information of the second port includes the indication information of the second network device and the port identifier of the second port.
  • the first network device is the network device 101
  • the first port is the network port P1
  • the second network device is the network device 201
  • the second port is the network port P2
  • the first discovery information includes the indication information "P1-101” of the first port
  • the second discovery information includes the indication information "P2-201” of the second port
  • the first network device and the second network device are two network devices on the transmission path of the clock protocol message B, and the first network device is the next-hop device of the second network device.
  • the second network device sends the clock protocol message B to the first network device through the second port, and the first network device receives the clock protocol message B through the first port.
  • the second port is the network port through which the second network device sends the clock protocol message B
  • the first port is the network port through which the first network device receives the clock protocol message B.
  • the clock protocol message B sent by the second network device to the first network device carries the indication information of the second port.
  • the second network device generates the second discovery information according to the network port (i.e., the second port) through which the second network device sends the clock protocol message B
  • the first network device generates the second discovery information according to the network port (i.e., the second port) through which the first network device receives the clock protocol message B.
  • the first discovery information is generated based on the network port (i.e., the first port) of the clock protocol message B and the indication information of the second port carried by the clock protocol message B.
  • the first discovery information includes the indication information of the first port and the corresponding relationship between the first port and the second port
  • the second discovery information includes the indication information of the second port.
  • the indication information of the first port includes the indication information of the first network device and the port identifier of the first port
  • the indication information of the second port includes the indication information of the second network device and the port identifier of the second port.
  • the first network device is the network device 101
  • the first port is the network port P1
  • the second network device is the network device 201
  • the second port is the network port P2.
  • the first discovery information includes the indication information "P1-101" of the first port and the corresponding relationship "P1-101 ⁇ —>P2-201" between the indication information "P1-101" of the first port and the indication information "P2-201” of the second port
  • the second discovery information includes the indication information "P2-201” of the second port.
  • the clock protocol message B in the present application is a message based on the first clock protocol (i.e., the first clock protocol message), and the first clock protocol is any possible clock protocol such as the IEEE1588 protocol, the ITU-TG.8275.1 protocol, etc.
  • the source end (or constructor) of the clock protocol message B can be a clock source or a network device (e.g., a first network device or a second network device).
  • the first clock protocol is the IEEE1588 protocol
  • the clock protocol message B is also called a PTP message
  • the message header of the clock protocol message B is also called a PTP header
  • the PTP header includes a source port identification (source port identity) field.
  • each network device adds the indication information of the network port of each network device sending the clock protocol message B, the indication information of each network device, etc. in the source port identification field, for example, the information carried in the source port identification field is replaced with the indication information of the network port of each network device sending the clock protocol message B, the indication information of each network device, etc.
  • the second network device is a next-hop device of the first network device
  • the indication information of the first port is located in the source port identification field.
  • the indication information of the second port is located in the source port identification field.
  • the structure of the PTP header is shown in FIG4.
  • the PTP header includes the following fields: transport specific, message type, reserved, PTP version, message length, domain number, flag field, correction field, source port identity, sequence ID, control field, log message interval.
  • the length value corresponding to each line in the PTP header represents the length of each line of fields, and the unit of the length value is octets;
  • the offset value corresponding to each line in the PTP header represents the offset of the starting position of each line of fields from the first byte of the clock protocol message where the PTP header is located, and the unit of the offset value is byte.
  • the length of the source port identification field is 10 bytes, and the source port identification field is used to carry the relevant attributes of the sending port of the clock protocol message.
  • the first network device sends a clock protocol message B to the second network device through the first port, and the source port identification field in the clock protocol message B sent by the first network device carries the indication information of the first port.
  • S302 The controller determines a first link according to the first discovery information and the second discovery information.
  • the first discovery information includes indication information of the first port of the first network device
  • the second discovery information includes indication information of the second port of the second network device
  • at least one of the first discovery information and the second discovery information includes the correspondence between the first port and the second port.
  • the controller determines the first port of the first network device based on the indication information of the first port
  • the controller determines the second port of the second network device based on the indication information of the second port
  • the controller determines that the first port corresponds to the second port based on the correspondence between the first port and the second port.
  • the controller determines that the first port corresponds to the second port, that is, the controller determines that there is a communication link between the first port and the second port, and the communication link is the first link.
  • the first link is a cross-domain link between the first network domain and the second network domain.
  • the indication information of the first port is the port identifier of the first port
  • the indication information of the second port is the port identifier of the second port
  • the first discovery information also includes the indication information of the first network device
  • the second discovery information also includes the indication information of the second network device.
  • the controller determines the first network device according to the indication information of the first network device included in the first discovery information, and the controller determines the first port according to the indication information of the first port included in the first discovery information, so that the controller determines that the first port belongs to the first network device according to the first discovery information (that is, the controller determines the first port of the first network device according to the first discovery information).
  • the controller determines the second network device according to the indication information of the second network device included in the second discovery information, and the controller determines the second port according to the indication information of the second port included in the second discovery information, so that the controller determines that the second port belongs to the second network device according to the second discovery information (that is, the controller determines the second port of the second network device according to the second discovery information). And, the controller determines that the first port of the first network device corresponds to the second port of the second network device according to the correspondence between the first port and the second port included in the first discovery information and/or the second discovery information, so that the controller determines that there is a cross-domain link (that is, the first link) between the first port of the first network device and the second port of the second network device.
  • a cross-domain link that is, the first link
  • the first network device is the network device 101
  • the first port is the network port P1
  • the second network device is the network device 201
  • the second port is the network port P2
  • the first discovery information includes the indication information "P1" of the first port and the indication information "101" of the first network device
  • the second discovery information includes the indication information "P2" of the second port and the indication information "201" of the second network device
  • the second discovery information includes the corresponding relationship "P1 ⁇ —>P2" between the indication information "P1" of the first port and the indication information "P2" of the second port.
  • the controller determines the first network device 101 according to the indication information "101" of the first network device included in the first discovery information, and the controller determines the first port P1 according to the indication information "P1" of the first port included in the first discovery information, so that the controller determines that the first port P1 belongs to the first network device 101 according to the first discovery information.
  • the controller determines the second network device 201 according to the indication information "201" of the second network device included in the second discovery information, and the controller determines the second port P2 according to the indication information "P2" of the second port included in the second discovery information, so that the controller determines that the second port P2 belongs to the second network device 201 according to the second discovery information.
  • the controller determines that the first port P1 of the first network device corresponds to the second port P2 of the second network device according to the correspondence relationship “P1 ⁇ —>P2” between the indication information “P1” of the first port and the indication information “P2” of the second port included in the second discovery information.
  • the indication information of the first port includes the indication information of the first network device and the port identifier of the first port
  • the indication information of the second port includes the indication information of the second network device and the port identifier of the second port.
  • the controller determines the first port according to the indication information of the first port included in the first discovery information and determines that the first port belongs to the first network device.
  • the controller determines the second port according to the indication information of the second port included in the second discovery information and determines that the second port belongs to the second network device.
  • the controller determines that the first port of the first network device corresponds to the second port of the second network device according to the correspondence between the first port and the second port included in the first discovery information and/or the second discovery information, so that the controller determines that there is a cross-domain link (i.e., the first link) between the first port of the first network device and the second port of the second network device.
  • a cross-domain link i.e., the first link
  • the first network device is network device 101
  • the first port is network port P1
  • the second network device is network device 201
  • the second port is network port P2
  • the first discovery information includes the indication information "P1-101” of the first port
  • the second discovery information includes the indication information "P2-201” of the second port
  • the correspondence "P1-101 ⁇ —>P2-201” between the indication information "P1-101" of the first port and the indication information "P2-201" of the second port is network device 101
  • the first port is network port P1
  • the second network device is network device 201
  • the second port is network port P2
  • the first discovery information includes the indication information "P1-101" of the first port
  • the second discovery information includes the indication information "P2-201” of the second port
  • the correspondence "P1-101 ⁇ —>P2-201" between the indication information "P1-101" of the first port and the indication information "P2-201” of the second port is
  • the controller determines the first port P1 of the first network device 101 according to the indication information "P1-101" of the first port included in the first discovery information; the controller determines the second port P2 of the second network device 201 according to the indication information "P2-201" of the second port included in the second discovery information; and, the controller determines that the first port P1 of the first network device (i.e., network device 101) corresponds to the second port P2 of the second network device (i.e., network device 201) according to the correspondence relationship "P1-101 ⁇ —>P2-201" between the indication information "P1-101" of the first port and the indication information "P2-201” of the second port included in the second discovery information.
  • the first network device in the first network domain and the second network device in the second network domain obtain link discovery information based on the clock protocol message
  • the controller determines the cross-domain link between the first port of the first network device and the second port of the second network device based on the link discovery information obtained by the first network device and the second network device. That is, in the embodiment of the present application, the controller and the network device work together to discover cross-domain links based on the clock protocol.
  • the link discovery solution provided by the embodiment of the present application can be applied to most network scenarios, the link discovery solution has a wide range of application scenarios, strong universality, and the link discovery solution has a high accuracy in discovering cross-domain links.
  • Figure 5 shows a flow chart of another link discovery method provided in an embodiment of the present application. As shown in Figure 5, before S301, the method further includes the following step S303.
  • the controller sends a target policy to the first network device and the second network device, where the target policy is used to instruct the first network device and the second network device to discover a cross-domain link between the first network domain and the second network domain based on the first clock protocol.
  • the target policy is used to instruct the first network device and the second network device to discover the cross-domain link between the first network domain and the second network domain based on the first clock protocol
  • the target policy is also called a link discovery policy based on the first clock protocol.
  • the clock protocol message B described in S301 is a message based on the first clock protocol (i.e., the first clock protocol message).
  • the controller is a cross-domain controller, and the cross-domain controller, the first controller, and the second controller are three independent controllers.
  • the cross-domain controller controls the first network domain through the first controller, and the cross-domain controller controls the second network domain through the second controller.
  • the cross-domain controller sends the target policy to the first network device through the first controller, and the cross-domain controller sends the target policy to the second network device through the second controller.
  • the cross-domain controller sends the target policy to the first controller and the second controller respectively, and after receiving the target policy, the first controller sends the target policy to the first network device, and after receiving the target policy, the second controller sends the target policy to the second network device.
  • the controller is a cross-domain controller, the cross-domain controller, the first controller and the second controller are the same controller, the cross-domain controller directly controls the first network domain and the second network domain, the cross-domain controller directly sends the target policy to the first network device, and the cross-domain controller directly sends the target policy to the second network device.
  • the controller sends indication information for indicating a target policy to the first network device and the second network device (the application refers to the indication information for indicating a target policy as target policy information).
  • the target policy information may include indication information of the first clock protocol (e.g., protocol number), indication information of the first port of the first network device, indication information of the second port of the second network device, etc.
  • the first network device determines the first port according to the indication information of the first port of the first network device included in the target policy information, determines the first clock protocol according to the indication information of the first clock protocol included in the target policy information, and the first network device obtains link discovery information based on the first clock protocol message in the process of transmitting (e.g., sending or receiving) the first clock protocol message through the first port.
  • the second network device determines the second port according to the indication information of the second port of the second network device included in the target policy information, determines the first clock protocol according to the indication information of the first clock protocol included in the target policy information, and the second network device obtains link discovery information based on the first clock protocol message in the process of transmitting (e.g., sending or receiving) the first clock protocol message through the second port.
  • the controller before the controller sends the target policy to the first network device and the second network device, the controller determines the target policy according to the link discovery capability supported by the first port of the first network device and the link discovery capability supported by the second port of the second network device. Please continue to refer to Figure 5. Before S303, the method also includes the following steps S304 to S305.
  • the controller obtains first capability information and second capability information, the first capability information is used to indicate that the first port of the first network device supports the first clock protocol, and the second capability information is used to indicate that the second port of the second network device supports the first clock protocol.
  • the first capability information includes capability information of the first port, and the capability information of the first port is used to indicate that the first port supports the first clock protocol (that is, the link discovery capability supported by the first port includes the link discovery capability based on the first clock protocol).
  • the second capability information includes capability information of the second port, and the capability information of the second port is used to indicate that the second port supports the first clock protocol (that is, the link discovery capability supported by the second port includes the link discovery capability based on the first clock protocol).
  • the first capability information and the second capability information respectively include indication information of the first clock protocol.
  • the controller may receive the first capability information and the second capability information, or the controller actively collects the first capability information and the second capability information.
  • the controller is a cross-domain controller
  • the cross-domain controller receives the first capability information sent by the first controller
  • the cross-domain controller receives the second capability information sent by the second controller.
  • the first network device sends the port capability information (e.g., the first capability information) of the first network device to the first controller in real time, periodically, or based on event triggering (e.g., the link discovery capability of the first port changes, the network topology of the first network domain and/or the second network domain changes), and the first controller sends the port capability information to the cross-domain controller after receiving the port capability information of the first network device.
  • event triggering e.g., the link discovery capability of the first port changes, the network topology of the first network domain and/or the second network domain changes
  • the second network device sends the port capability information (e.g., the second capability information) of the second network device to the second controller in real time, periodically, or based on event triggering (e.g., the link discovery capability of the second port changes, the network topology of the first network domain and/or the second network domain changes), and the second controller sends the port capability information to the cross-domain controller after receiving the port capability information of the second network device.
  • event triggering e.g., the link discovery capability of the second port changes, the network topology of the first network domain and/or the second network domain changes
  • the second controller sends the port capability information to the cross-domain controller after receiving the port capability information of the second network device.
  • the first network device sends the first capability information to the first controller through BGP, NETCONF, PCEP, telemetry protocol or other private protocols
  • the second network device sends the first capability information to the second controller through BGP, NETCONF, PCEP, telemetry protocol, Qx protocol or other private protocols.
  • the port capability information of the first network device includes the capability information of the first port, and may also include the capability information of other network ports of the first network device; in this embodiment, the port capability information of the first network device may include at least one set of correspondences, and each set of correspondences in the at least one set of correspondences includes the indication information of a network port of the first network device and the capability information of the one network port.
  • the port capability information of the second network device includes the capability information of the second port, and may also include the capability information of other network ports of the second network device; in this embodiment, the port capability information of the second network device may include at least one set of correspondences, and each set of correspondences in the at least one set of correspondences includes the indication information of a network port of the second network device and the capability information of the one network port.
  • S305 The controller determines a target strategy according to the first capability information and the second capability information.
  • the controller determines that the first port of the first network device supports the first clock protocol based on the first capability information, and the controller determines that the second port of the second network device supports the first clock protocol based on the second capability information.
  • the controller determines a target policy based on that both the first port and the second port support the first clock protocol, and the target policy is a link discovery policy based on the first clock protocol.
  • the controller determines that the first network device and the second network device are at the same site (for example, the same computer room), and the controller determines that the target strategy is a link discovery strategy based on the first clock protocol based on the fact that the first network device and the second network device are at the same site and that both the first port and the second port support the first clock protocol.
  • a network port may support multiple link discovery capabilities. If the controller is a cross-domain link in the same site, The two network ports at the end determine different link discovery strategies, which may result in the inability to discover the cross-domain link in the end. Therefore, when the controller determines the target strategy, the controller first determines that the first network device and the second network device are in the same site, and then the controller determines the target strategy based on the first port of the first network device and the second port of the second network device. In this way, the controller determines the same link discovery strategy for the two network ports at both ends of the same cross-domain link in the same site, and the network devices where the two network ports are located can discover the cross-domain link according to the link discovery strategy.
  • Figure 6 shows an interaction diagram of a link discovery method provided by an embodiment of the present application. As shown in Figure 6, the method includes the following steps S601 to S617.
  • a first network device sends first capability information to a first controller, where the first capability information is used to indicate that a first port of the first network device supports a first clock protocol.
  • the first network device is in the first network domain
  • the first controller is the controller of the first network domain.
  • the first controller sends first capability information to the cross-domain controller.
  • the second network device sends second capability information to the second controller, where the second capability information is used to indicate that the second port of the second network device supports the first clock protocol.
  • the second network device is in the second network domain, and the second controller is a controller of the second network domain.
  • the network type of the first network domain is different from the network type of the second network domain.
  • one of the first network domain and the second network domain is an optical network domain, and the other network domain is an IP network domain.
  • the second controller sends second capability information to the cross-domain controller.
  • the cross-domain controller determines a target policy according to the first capability information and the second capability information, where the target policy is used to instruct to discover a cross-domain link between the first network domain and the second network domain based on the first clock protocol.
  • the cross-domain controller sends the target policy to the first controller and the second controller respectively.
  • the first controller sends the target policy to the first network device.
  • the second controller sends the target policy to the second network device.
  • the first network device sends a clock protocol message B to the second network device through the first port, where the clock protocol message B carries indication information of the first port.
  • the clock protocol message B is a message based on the first clock protocol, that is, the first clock protocol message.
  • the source end (or constructor) of the clock protocol message B is a first network device, the first network device generates the clock protocol message B, and sends the clock protocol message B to the second network device through the first port.
  • the source end of the clock protocol message B is a clock source or a network device before the first network device.
  • the first network device receives the clock protocol message B from the previous-hop device of the first network device. After the first network device encapsulates the indication information of the first port in the clock protocol message B, it sends the clock protocol message B to the second network device through the first port.
  • the first network device obtains first discovery information based on the clock protocol message B, where the first discovery information includes indication information of the first port.
  • the first network device acquires the first discovery information according to the network port (ie, the first port) through which the first network device sends the clock protocol message B.
  • the first discovery information includes indication information of the first port and may also include indication information of the first network device.
  • the first network device sends first discovery information to the first controller.
  • the first controller sends first discovery information to the cross-domain controller.
  • the second network device receives clock protocol message B through the second port.
  • the second network device obtains second discovery information based on the clock protocol message B, where the second discovery information includes indication information of the second port and a correspondence between the first port and the second port.
  • the second network device can obtain the second discovery information based on the network port (i.e., the second port) at which the second network device receives the clock protocol message B and the indication information of the first port carried by the clock protocol message B received by the second network device.
  • the second discovery information includes the indication information of the second port and the correspondence between the first port and the second port, and may also include the indication information of the second network device.
  • the correspondence between the first port and the second port may be the correspondence between the indication information of the first port and the indication information of the second port.
  • the second network device obtains the indication information of the second port based on the second port at which the second network device receives the clock protocol message B; the second network device obtains the correspondence between the first port and the second port based on the indication information of the second port and the indication information of the first port carried by the clock protocol message B.
  • the second network device sends second discovery information to the second controller.
  • the second controller sends second discovery information to the cross-domain controller.
  • the cross-domain controller determines a first link according to the first discovery information and the second discovery information, where the first link is a cross-domain link between the first port and the second port.
  • FIG 7 shows a flowchart of another link discovery method provided by an embodiment of the present application.
  • the link discovery method is applied to a communication network including a controller, a first network domain and a second network domain.
  • the network type of the first network domain is different from the network type of the second network domain, and the link discovery method is executed by the controller.
  • the communication network is shown in Figure 1 or Figure 2, one of the first network domain and the second network domain is network domain 1, the other network domain is network domain 2, and the controller is controller 300.
  • the link discovery method includes the following steps S701 to S703.
  • the controller obtains first capability information and second capability information, the first capability information is used to indicate the link discovery capability supported by the first port of the first network device, and the second capability information is used to indicate the link discovery capability supported by the second port of the second network device, the first network device is in the first network domain, the second network device is in the second network domain, and the network type of the first network domain is different from the network type of the second network domain.
  • the first capability information includes the capability information of the first port, and the capability information of the first port is used to indicate the link discovery capability supported by the first port.
  • the second capability information includes the capability information of the second port, and the capability information of the second port is used to indicate the link discovery capability supported by the second port.
  • the link discovery capability supported by the first port and the link discovery capability supported by the second port respectively include at least one of the following: a link discovery capability based on the first clock protocol, a link discovery capability based on the first discovery protocol, a link discovery capability based on port traffic statistics, and a link discovery capability based on port alarms.
  • a certain network port supporting a link discovery capability based on the first clock protocol can also be called that the certain network port supports the first clock protocol; a certain network port supporting a link discovery capability based on the first discovery protocol can also be called that the certain network port supports the first discovery protocol; a certain network port supporting a link discovery capability based on port traffic statistics can also be called that the certain network port supports port traffic statistics; a certain network port supporting a link discovery capability based on port alarms can also be called that the certain network port supports port alarms; therefore, the first port and the second port respectively support at least one of the first clock protocol, the first discovery protocol, port traffic statistics, and port alarms.
  • the first clock protocol is the IEEE1588 protocol, the ITU-T G.8275.1 protocol or other clock protocols.
  • the first discovery protocol is LLDP or other link discovery protocols.
  • a certain network port supports port traffic statistics, which means that the certain network port can support network traffic statistics on the certain network port, including but not limited to the network device where the certain network port is located counting the network traffic of the certain network port, the monitoring device connected to the certain network port counting the network traffic of the certain network port, etc.
  • a certain network port supports port alarm, which means that the certain network port can generate an alarm after the certain network port goes offline (down). The down of the certain network port can be the down of the communication link with the certain network port as the endpoint.
  • the network port at the other end of the certain communication link can generate an alarm.
  • the first port and the second port respectively support the first clock protocol, the first discovery protocol, port traffic statistics and port alarms
  • the capability information of the first port includes indication information of the first clock protocol, indication information of the first discovery protocol, port traffic statistics indication information (the port traffic statistics indication information is used to indicate that the first port supports port traffic statistics) and port alarm indication information (the port alarm indication information is used to indicate that the first port supports port alarms)
  • the capability information of the second port includes indication information of the first clock protocol, indication information of the first discovery protocol, port traffic statistics indication information and port alarm indication information.
  • the controller may receive the first capability information and the second capability information, or the controller actively collects the first capability information and the second capability information.
  • the controller is a cross-domain controller
  • the cross-domain controller receives the first capability information sent by the first controller
  • the cross-domain controller receives the second capability information sent by the second controller
  • the first controller is a controller of the first network domain
  • the second controller is a controller of the second network domain.
  • the first controller is located in the first network domain
  • the second controller is located in the second network domain.
  • the first network device sends the port capability information (e.g., the first capability information) of the first network device to the first controller in real time, periodically, or based on event triggering, and the first controller sends the port capability information of the first network device to the cross-domain controller after receiving the port capability information of the first network device.
  • the second network device sends the port capability information (e.g., the second capability information) of the second network device to the second controller in real time, periodically, or based on event triggering, and the second controller sends the port capability information of the second network device to the cross-domain controller after receiving the port capability information of the second network device.
  • the first network device sends the first capability information to the first controller via BGP, NETCONF, PCEP, telemetry protocol, Qx protocol or other private protocols; and/or, the second network device sends the first capability information to the second controller via BGP, NETCONF, PCEP, telemetry protocol or other private protocols.
  • the port capability information of the first network device includes the capability information of the first port, and may also include the capability information of other network ports of the first network device; in this embodiment, the port capability information of the first network device may include at least one set of correspondences, and each set of correspondences in the at least one set of correspondences includes indication information of a network port of the first network device and the capability information of the one network port.
  • the port capability information of the second network device includes the capability information of the second port, and may also include the capability information of other network ports of the first network device. May include capability information of other network ports of the second network device; in this embodiment, the port capability information of the second network device may include at least one set of correspondences, each set of correspondences in the at least one set of correspondences includes indication information of a network port of the second network device and capability information of the one network port.
  • the cross-domain controller, the first controller, and the second controller are three different controllers. Alternatively, at least two of the cross-domain controller, the first controller, and the second controller are one controller.
  • the network type of the first network domain is different from the network type of the second network domain; for example, one of the first network domain and the second network domain is an optical network domain, and the other network domain is an IP network domain; or, one of the first network domain and the second network domain is a wireless network domain, and the other network domain is a wired network domain.
  • S702 The controller determines a target policy according to the first capability information and the second capability information.
  • the controller determines the link discovery capability supported by the first port of the first network device according to the first capability information, determines the link discovery capability supported by the second port of the second network device according to the second capability information, and determines the target policy according to the link discovery capability supported by the first port and the link discovery capability supported by the second port.
  • the controller determines that the first network device and the second network device are at the same site, and determines the target policy according to the first network device and the second network device being at the same site, the link discovery capability supported by the first port, and the link discovery capability supported by the second port.
  • the target strategy includes at least one of the following: a link discovery strategy based on a first clock protocol, a link discovery strategy based on a first discovery protocol, a link discovery strategy based on port traffic statistics, and a link discovery strategy based on port alarms.
  • S702 includes at least one of the following four implementations.
  • the first implementation manner when the first capability information is used to indicate that the first port supports the link discovery capability based on the first clock protocol and the second capability information is used to indicate that the second port supports the link discovery capability based on the first clock protocol, the controller determines that the target policy includes the link discovery policy based on the first clock protocol. That is, when the controller determines that both the first port and the second port support the first clock protocol, the controller determines that the target policy includes the link discovery policy based on the first clock protocol.
  • the controller determines that the target policy includes the link discovery policy based on the first discovery protocol. That is, when the controller determines that both the first port and the second port support the first discovery protocol, the controller determines that the target policy includes the link discovery policy based on the first discovery protocol.
  • a third implementation manner when the first capability information is used to indicate that the first port supports a link discovery capability based on port traffic statistics and the second capability information is used to indicate that the second port supports a link discovery capability based on port traffic statistics, the controller determines that the target policy includes a link discovery policy based on port traffic statistics. That is, when the controller determines that both the first port and the second port support port traffic statistics, the controller determines that the target policy includes a link discovery policy based on port traffic statistics.
  • the controller determines that the target policy includes the link discovery policy based on the port alarm. That is, when the controller determines that both the first port and the second port support the port alarm, the controller determines that the target policy includes the link discovery policy based on the port alarm.
  • the first port and the second port both support the first clock protocol, the first discovery protocol, port traffic statistics and port alarms
  • the controller determines the target strategy to be one of the link discovery strategy based on the first clock protocol, the link discovery strategy based on the first discovery protocol, the link discovery strategy based on port traffic statistics and the link discovery strategy based on port alarms.
  • the controller determines the target strategy to be any one of the link discovery strategy based on the first clock protocol, the link discovery strategy based on the first discovery protocol, the link discovery strategy based on port traffic statistics and the link discovery strategy based on port alarms.
  • the controller determines the target strategy to be one of the link discovery strategy based on the first clock protocol, the link discovery strategy based on the first discovery protocol, the link discovery strategy based on port traffic statistics and the link discovery strategy based on port alarms in order (e.g., priority); for example, the priorities of the link discovery strategy based on the first clock protocol, the link discovery strategy based on the first discovery protocol, the link discovery strategy based on port traffic statistics and the link discovery strategy based on port alarms are reduced in sequence, and the controller determines the target strategy to be the link discovery strategy based on the first clock protocol.
  • the first port and the second port both support the first clock protocol, the first discovery protocol, port traffic statistics, and port alarms
  • the controller determines that the target strategy includes at least two of a link discovery strategy based on the first clock protocol, a link discovery strategy based on the first discovery protocol, a link discovery strategy based on port traffic statistics, and a link discovery strategy based on port alarms.
  • the controller determines that the target strategy includes at least two of a link discovery strategy based on the first clock protocol, a link discovery strategy based on the first discovery protocol, a link discovery strategy based on port traffic statistics, and a link discovery strategy based on port alarms.
  • the controller determines the target strategy in order (e.g., priority) to include a link discovery strategy based on the first clock protocol, a link discovery strategy based on the first discovery protocol, a link discovery strategy based on port traffic statistics, and a link discovery strategy based on port alarms.
  • the target strategy in order (e.g., priority) to include a link discovery strategy based on the first clock protocol, a link discovery strategy based on the first discovery protocol, a link discovery strategy based on port traffic statistics, and a link discovery strategy based on port alarms.
  • At least two of the following strategies a link discovery strategy based on a first clock protocol, a link discovery strategy based on a first discovery protocol, a link discovery strategy based on port traffic statistics, and a link discovery strategy based on port alarms; for example, the priorities of a link discovery strategy based on a first clock protocol, a link discovery strategy based on a first discovery protocol, a link discovery strategy based on port traffic statistics, and a link discovery strategy based on port alarms are reduced in sequence, and the controller determines that the target strategy includes a link discovery strategy based on a first clock protocol and a link discovery strategy based on port traffic statistics.
  • the network device and the controller work together to discover cross-domain links based on at least two link discovery strategies during each link discovery process, which helps to improve the accuracy of discovering cross-domain links.
  • the controller sends a target policy to the first network device and the second network device, where the target policy is used to instruct the first network device and the second network device to discover a cross-domain link between the first network domain and the second network domain based on the target policy.
  • the controller may send the target policy to the first network device and the second network device via NETCON or other private protocols.
  • the controller is a cross-domain controller, the cross-domain controller, the first controller, and the second controller are three independent controllers, the cross-domain controller sends the target policy to the first network device via the first controller, and the cross-domain controller sends the target policy to the second network device via the second controller.
  • the controller is a cross-domain controller, the cross-domain controller, the first controller, and the second controller are the same controller, the cross-domain controller directly sends the target policy to the first network device, and the cross-domain controller directly sends the target policy to the second network device.
  • the controller sends indication information indicating a target policy to the first network device and the second network device (the indication information indicating a target policy is referred to as target policy information in this application).
  • the target policy information includes at least one of the following four implementations.
  • the target policy includes a link discovery policy based on a first clock protocol
  • the target policy information includes first policy information
  • the first policy information is used to indicate the link discovery policy based on the first clock protocol.
  • the first policy information includes indication information of the first clock protocol, indication information of the first port of the first network device, and indication information of the second port of the second network device, and the first policy information is used to indicate the first network device to obtain link discovery information at the first port based on the first clock protocol, and to indicate the second network device to obtain link discovery information at the second port based on the first clock protocol.
  • the target policy includes a link discovery policy based on the first discovery protocol
  • the target policy information includes second policy information
  • the second policy information is used to indicate the link discovery policy based on the first discovery protocol.
  • the second policy information includes indication information of the first discovery protocol, indication information of the first port of the first network device, and indication information of the second port of the second network device, and the second policy information is used to indicate the first network device to obtain link discovery information at the first port based on the first discovery protocol, and to indicate the second network device to obtain link discovery information at the second port based on the first discovery protocol.
  • the target policy includes a link discovery policy based on port traffic statistics
  • the target policy information includes third policy information
  • the third policy information is used to indicate the link discovery policy based on port traffic statistics.
  • the third policy information includes port traffic statistics indication information, indication information of the first port of the first network device, and indication information of the second port of the second network device, and the port traffic statistics indication information is used to indicate that port traffic statistics are performed, and the third policy information is used to instruct the first network device to count the network traffic of the first port, and to instruct the second network device to count the network traffic of the second port.
  • the third policy information also includes indication information of the first time period to instruct the first network device and the second network device to count the network traffic of the corresponding network port within the first time period.
  • the target policy includes a link discovery policy based on port alarms
  • the target policy information includes fourth policy information
  • the fourth policy information is used to indicate the link discovery policy based on port alarms.
  • the fourth policy information includes indication information of the first port of the first network device, indication information of the second port of the second network device, and disconnection indication information corresponding to the indication information of the first port, and the disconnection indication information is used to instruct the first network device to disconnect the first port (for example, disconnect the communication link corresponding to the first port), and the fourth policy information is used to instruct the first network device to disconnect the first port.
  • the fourth policy information also includes alarm monitoring indication information corresponding to the indication information of the second port, and the alarm monitoring indication information is used to instruct the second network device to monitor the alarm condition of the second port.
  • the fourth policy information can also include indication information of the second time period to instruct the first network device to disconnect the first port within the second time period, and to instruct the second network device to monitor the alarm condition of the second port within the second time period.
  • first time period and the second time period may be the same or different.
  • the first time period and the second time period may overlap or not overlap, which is not limited in the embodiment of the present application.
  • the controller determines the target strategy (that is, the cross-domain link discovery strategy) based on the link discovery capability supported by the first port of the first network device in the first network domain and the link discovery capability supported by the second port of the second network device in the second network domain. Therefore, the process of determining the cross-domain link discovery strategy does not require human participation, does not require the staff to be familiar with the network situation, and has no additional requirements for the staff's skills.
  • FIG8 shows a flowchart of another link discovery method provided by an embodiment of the present application. As shown, after S703, the method further includes the following steps S704 to S705.
  • the controller obtains first discovery information and second discovery information, the first discovery information is the discovery information of the cross-domain link between the first network domain and the second network domain obtained by the first network device based on the target policy, and the second discovery information is the discovery information of the cross-domain link obtained by the second network device based on the target policy.
  • the first network device After the controller sends the target policy to the first network device and the second network device, the first network device obtains the discovery information of the cross-domain link between the first network domain and the second network domain based on the target policy (that is, the first discovery information), and the second network device obtains the discovery information of the cross-domain link between the first network domain and the second network domain based on the target policy (that is, the second discovery information), and the controller can obtain the first discovery information and the second discovery information.
  • the controller receives the first discovery information and the second discovery information, or the controller actively collects the first discovery information and the second discovery information.
  • the controller is a cross-domain controller, and the first network device sends the first discovery information to the first controller after obtaining the first discovery information, and the first controller sends the first discovery information to the cross-domain controller after receiving the first discovery information, and the cross-domain controller receives the first discovery information sent by the first controller; similarly, the second network device sends the second discovery information to the second controller after obtaining the second discovery information, and the second controller sends the second discovery information to the cross-domain controller after receiving the second discovery information, and the cross-domain controller receives the second discovery information sent by the second controller.
  • the controller is a cross-domain controller.
  • the first controller collects the first discovery information from the first network device and sends the first discovery information to the cross-domain controller, and the cross-domain controller receives the first discovery information sent by the first controller.
  • the second controller collects the second discovery information from the second network device and sends the second discovery information to the cross-domain controller, and the cross-domain controller receives the second discovery information sent by the second controller.
  • the first network device sends the first discovery information to the first controller via BGP, NETCONF, PCEP, telemetry protocol, Qx protocol or other private protocols; and/or the second network device sends the second discovery information to the second controller via BGP, NETCONF, PCEP, telemetry protocol, Qx protocol or other private protocols, which is not limited in this application.
  • the controller sends target policy information to the first network device and the second network device.
  • the first network device determines the target policy according to the target policy information, and then the first network device obtains the discovery information of the cross-domain link between the first network domain and the second network domain based on the target policy.
  • the second network device determines the target policy according to the target policy information, and then the second network device obtains the discovery information of the cross-domain link between the first network domain and the second network domain based on the target policy.
  • the implementation method of the first network device and the second network device obtaining the link discovery information is different.
  • the first network device and the second network device obtain the link discovery information including at least one of the following four implementation methods.
  • the target policy information includes first policy information
  • the first policy information is used to indicate a link discovery strategy based on a first clock protocol
  • the target policy includes a link discovery strategy based on the first clock protocol
  • the first network device and the second network device respectively obtain link discovery information based on the link discovery strategy of the first clock protocol.
  • the first network device and the second network device respectively determine that the target policy includes a link discovery policy based on the first clock protocol according to the first policy information included in the target policy information.
  • the first network device obtains the first discovery information based on the first clock protocol message during the transmission (e.g., sending or receiving) of the first clock protocol message.
  • the second network device obtains the second discovery information based on the first clock protocol message during the transmission (e.g., sending or receiving) of the first clock protocol message.
  • the first policy information includes indication information of the first clock protocol, indication information of the first port of the first network device, and indication information of the second port of the second network device.
  • the first network device determines the first clock protocol according to the indication information of the first clock protocol, the first network device determines the first port of the first network device according to the indication information of the first port, and the first network device obtains the first discovery information based on the first clock protocol message during the process of transmitting (e.g., sending or receiving) the first clock protocol message through the first port.
  • the second network device determines the first clock protocol according to the indication information of the first clock protocol, the second network device determines the second port of the second network device according to the indication information of the second port, and the second network device obtains the second discovery information based on the first clock protocol message during the process of transmitting (e.g., sending or receiving) the first clock protocol message through the second port.
  • the first discovery information includes the indication information of the first port
  • the second discovery information includes the indication information of the second port
  • at least one of the first discovery information and the second discovery information includes the corresponding relationship between the first port and the second port.
  • the second network device is the next-hop device of the first network device.
  • the first network device sends a first clock protocol message to the second network device through a first port.
  • the first clock protocol message carries indication information of the first port.
  • the second network device receives the first clock protocol message through a second port.
  • the second network device obtains the correspondence between the first port and the second port based on the network port (i.e., the second port) at which the second network device receives the first clock protocol message and the indication information of the first port carried by the first clock protocol message.
  • the second discovery information includes the correspondence between the first port and the second port.
  • the first network device is the next-hop device of the second network device.
  • the second network device sends a first clock protocol message to the first network device through a second port.
  • the first clock protocol message carries indication information of the second port.
  • the first network device receives the first clock protocol message through the first port.
  • the network device obtains the correspondence between the first port and the second port according to the network port (i.e., the first port) through which the first network device receives the first clock protocol message and the indication information of the second port carried by the first clock protocol message, and the first discovery information includes the correspondence between the first port and the second port.
  • the target policy information includes second policy information
  • the second policy information is used to indicate a link discovery strategy based on the first discovery protocol
  • the target policy includes a link discovery strategy based on the first discovery protocol
  • the first network device and the second network device respectively obtain link discovery information based on the link discovery strategy of the first discovery protocol.
  • the first network device and the second network device respectively determine that the target policy includes a link discovery policy based on the first discovery protocol according to the second policy information included in the target policy information.
  • the first network device obtains the first discovery information based on the first discovery protocol message during the process of transmitting (e.g., sending or receiving) the first discovery protocol message.
  • the second network device obtains the second discovery information based on the first discovery protocol message during the process of transmitting (e.g., sending or receiving) the first discovery protocol message.
  • the second policy information includes indication information of the first discovery protocol, indication information of the first port of the first network device, and indication information of the second port of the second network device.
  • the first network device determines the first discovery protocol according to the indication information of the first discovery protocol, the first network device determines the first port of the first network device according to the indication information of the first port, and the first network device obtains the first discovery information based on the first discovery protocol message during the process of transmitting (e.g., sending or receiving) the first discovery protocol message through the first port.
  • the second network device determines the first discovery protocol according to the indication information of the first discovery protocol, the second network device determines the second port of the second network device according to the indication information of the second port, and the second network device obtains the second discovery information based on the first discovery protocol message during the process of transmitting (e.g., sending or receiving) the first discovery protocol message through the second port.
  • the first discovery information includes the indication information of the first port
  • the second discovery information includes the indication information of the second port
  • at least one of the first discovery information and the second discovery information includes the corresponding relationship between the first port and the second port.
  • the second network device is the next hop device of the first network device
  • the first network device sends a first discovery protocol message to the second network device through the first port
  • the first discovery protocol message carries the indication information of the first port
  • the second network device receives the first discovery protocol message through the second port
  • the second network device obtains the correspondence between the first port and the second port according to the network port (i.e., the second port) at which the second network device receives the first discovery protocol message and the indication information of the first port carried by the first discovery protocol message
  • the second discovery information includes the correspondence between the first port and the second port.
  • the first network device is the next hop device of the second network device
  • the second network device sends a first discovery protocol message to the first network device through the second port
  • the first discovery protocol message carries the indication information of the second port
  • the first network device receives the first discovery protocol message through the first port
  • the first network device obtains the correspondence between the first port and the second port according to the network port (i.e., the first port) at which the first network device receives the first discovery protocol message and the indication information of the second port carried by the first discovery protocol message
  • the first discovery information includes the correspondence between the first port and the second port.
  • the target policy information includes third policy information
  • the third policy information is used to indicate a link discovery strategy based on port traffic statistics
  • the target policy includes a link discovery strategy based on port traffic statistics
  • the first network device and the second network device respectively obtain link discovery information based on the link discovery strategy based on port traffic statistics.
  • the third policy information includes port traffic statistics indication information, indication information of the first port of the first network device, indication information of the second port of the second network device, and indication information of the first time period.
  • the first network device determines that port traffic statistics need to be performed according to the port traffic statistics indication information, the first network device determines the first port of the first network device according to the indication information of the first port, and the first network device determines the first time period according to the indication information of the first time period, and then the first network device determines that the network traffic of the first port in the first time period needs to be counted.
  • the first network device starts counting the network traffic of the first port from the start time of the first time period, and ends counting the network traffic of the first port at the end time of the first time period, and the first network device obtains the first discovery information based on the statistical result.
  • the first discovery information includes the indication information of the first port and the traffic distribution curve of the first port in the first time period, and the traffic distribution curve of the first port in the first time period is used to characterize the traffic distribution of the first port in the first time period.
  • the second network device determines that the network traffic of the second port in the first time period needs to be counted according to the third policy information, the second network device starts counting the network traffic of the second port from the start time of the first time period, and ends counting the network traffic of the second port at the end time of the first time period, and the second network device obtains the second discovery information based on the statistical result.
  • the second discovery information includes indication information of the second port and a traffic distribution curve of the second port in the first time period, and the traffic distribution curve of the second port in the first time period is used to characterize traffic distribution of the second port in the first time period.
  • the target policy information includes fourth policy information
  • the fourth policy information is used to indicate a link discovery strategy based on port alarms
  • the target policy includes a link discovery strategy based on port alarms
  • the first network device and the second network device respectively obtain link discovery information based on the link discovery strategy based on port alarms.
  • the fourth policy information includes the indication information of the first port of the first network device and the indication information of the second port of the second network device.
  • the first network device determines the first port of the first network device according to the indication information of the first port, the first network device determines to disconnect the first port according to the disconnection indication information corresponding to the indication information of the first port, and the first network device determines the second time period according to the indication information of the second time period, and then the first network device determines that the first port needs to be disconnected within the second time period; the first network device controls the first port to be disconnected within the second time period (for example, the first network device turns off the laser of the first port at the start time of the second time period, and turns on the laser of the first port at the end time of the second time period, thereby controlling the first port to be in a disconnected state within the second time period), and the first network device obtains the first discovery information at the end of the second time period.
  • the first discovery information includes the indication information of the first port and the disconnection time information
  • the disconnection time information is used to indicate that the first port is disconnected within the second time period
  • the disconnection time information is used to indicate that the first port is disconnected within the second time period and the duration of the first port being in a disconnected state is equal to the duration of the second time period.
  • the second network device determines the second port of the second network device according to the indication information of the second port, the second network device determines the alarm situation of the second port that needs to be monitored according to the alarm monitoring indication information corresponding to the indication information of the second port, and the second network device determines the second time period according to the indication information of the second time period, and then the second network device determines the alarm situation of the second port in the second time period that needs to be monitored.
  • the second network device starts to monitor the alarm situation of the second port from the start time of the second time period, and stops monitoring the alarm situation of the second port at the end time of the second time period, and the second network device obtains the second discovery information according to the monitoring result.
  • the second discovery information includes the indication information and alarm time information of the second port, and the alarm time information is used to indicate the time period when the second port generates an alarm.
  • the time period when the second port generates an alarm may be the second time period or may not be the second time period.
  • This application takes the time period when the second port generates an alarm as the second time period as an example, then the alarm time information is used to indicate that the second port generates an alarm in the second time period, for example, the alarm time information is used to indicate that the second port generates an alarm in the second time period and the duration of the alarm generation of the second port is equal to the duration of the second time period.
  • the controller determines a cross-domain link between the first network domain and the second network domain according to the first discovery information and the second discovery information.
  • the controller may determine a communication link between a first port of the first network device and a second port of the second network device according to the first discovery information and the second discovery information, and the communication link is a cross-domain link between the first network domain and the second network domain.
  • the content of the first discovery information is different
  • the content of the second discovery information is different
  • the controller determines the implementation method of the cross-domain link between the first network domain and the second network domain according to the first discovery information and the second discovery information in different ways.
  • S705 includes at least one of the following four implementation methods.
  • the first implementation method includes a link discovery strategy based on the first clock protocol, the first discovery information includes indication information of the first port, the second discovery information includes indication information of the second port, and at least one of the first discovery information and the second discovery information includes a correspondence between the first port and the second port.
  • the controller determines the first port of the first network device according to the indication information of the first port included in the first discovery information, the controller determines the second port of the second network device according to the indication information of the second port included in the second discovery information, and the controller determines that the first port corresponds to the second port according to the correspondence between the first port and the second port included in the first discovery information and/or the second discovery information.
  • the controller determines that the first port corresponds to the second port, that is, the controller determines that there is a cross-domain link between the first port and the second port.
  • the second implementation method includes a link discovery strategy based on the first discovery protocol, the first discovery information includes indication information of the first port, the second discovery information includes indication information of the second port, and at least one of the first discovery information and the second discovery information includes a correspondence between the first port and the second port.
  • the controller determines the first port of the first network device according to the indication information of the first port included in the first discovery information, the controller determines the second port of the second network device according to the indication information of the second port included in the second discovery information, and the controller determines that the first port corresponds to the second port according to the correspondence between the first port and the second port included in the first discovery information and/or the second discovery information.
  • the controller determines that the first port corresponds to the second port, that is, the controller determines that there is a cross-domain link between the first port and the second port.
  • the target strategy includes a link discovery strategy based on port traffic statistics
  • the first discovery information includes indication information of the first port and a traffic distribution curve of the first port in a first time period
  • the second discovery information includes indication information of the second port and a traffic distribution curve of the second port in the first time period.
  • the controller determines the first port of the first network device according to the indication information of the first port included in the first discovery information, determines the second port of the second network device according to the indication information of the second port included in the second discovery information, and determines that the first port corresponds to the second port according to the traffic distribution curve of the first port in the first time period included in the first discovery information and the traffic distribution curve of the second port in the first time period included in the second discovery information, so that the controller determines that there is a cross-domain link between the first port and the second port.
  • the controller determines that the traffic distribution curve of the first port in the first time period matches the traffic distribution curve of the second port in the first time period, for example, the traffic distribution curve of the first port in the first time period is the same as the traffic distribution curve of the second port in the first time period and the two overlap in the same coordinate system, so that the controller determines that the first port corresponds to the second port.
  • the target strategy includes a link discovery strategy based on port alarms
  • the first discovery information includes indication information and disconnection time information of the first port
  • the disconnection time information is used to indicate that the first port is disconnected within the second time period
  • the second discovery information includes indication information and alarm time information of the second port
  • the alarm time information is used to indicate that the second port has an alarm within the second time period.
  • the controller determines the first port of the first network device according to the indication information of the first port included in the first discovery information, the controller determines the second port of the second network device according to the indication information of the second port included in the second discovery information, and the controller determines that the first port of the first network device corresponds to the second port of the second network device according to the disconnection time information included in the first discovery information and the alarm time information included in the second discovery information, so that the controller determines that there is a cross-domain link between the first port and the second port.
  • the controller determines that the first port is disconnected within the second time period and the duration of the first port being in the disconnected state is equal to the duration of the second time period according to the disconnection time information, and the controller determines that the second port has an alarm within the second time period and the duration of the second port having an alarm is equal to the duration of the second time period according to the alarm time information, so that the controller determines that the first port corresponds to the second port.
  • the first discovery information also includes indication information of the first network device
  • the second discovery information also includes indication information of the second network device.
  • the controller also determines the first network device based on the indication information of the first network device, and the controller also determines the second network device based on the indication information of the second network device. The controller determines that the first port belongs to the first network device based on the first discovery information, and determines that the second port belongs to the second network device based on the second discovery information, so that the controller determines that there is a cross-domain link between the first port of the first network device and the second port of the second network device.
  • the controller determines the target strategy (i.e., the discovery strategy of the cross-domain link) according to the link discovery capability supported by the first port of the first network device in the first network domain and the link discovery capability supported by the second port of the second network device in the second network domain, and the first network device and the second network device obtain link discovery information according to the target strategy, and then the controller determines the cross-domain link according to the link discovery information obtained by the first network device and the second network device.
  • the target strategy i.e., the discovery strategy of the cross-domain link
  • the controller determines the discovery strategy of the cross-domain link according to the link discovery capability supported by the network ports of network devices in different network domains, the network device obtains link discovery information according to the discovery strategy of the cross-domain link determined by the controller, and the controller determines the cross-domain link according to the link discovery information obtained by the network device, thereby, the process of determining the discovery strategy of the cross-domain link and the process of discovering the cross-domain link based on the discovery strategy do not require manual participation, the staff does not need to be familiar with the network situation, there is no additional requirement for the skills of the staff, and the accuracy of the determined cross-domain link is high.
  • the technical solution provided by the embodiment of the present application is that the controller flexibly selects the link discovery strategy to discover the cross-domain link according to the link discovery capability supported by the network port.
  • the link discovery strategy that the controller can select includes a link discovery strategy based on the first clock protocol.
  • the network device can obtain link discovery information according to the first clock protocol deployed in the existing network, and can discover the cross-domain link without additional configuration.
  • the operation process is simple and the accuracy of discovering the cross-domain link is high, and the application scenarios are wide. For example, 90% of the network devices in the existing network support the clock protocol. Therefore, the link discovery solution provided by this application can be applied to most network scenarios.
  • the application scenarios of this link discovery solution are wide and the universality is strong.
  • the link discovery strategy that the controller can select also includes a link discovery strategy based on the first discovery protocol, a link discovery strategy based on port traffic statistics, and a link discovery strategy based on port alarms. These three link discovery strategies can be used at least for the remaining 10% of network devices to discover cross-domain links. In this way, the technical solution of this application can support various network scenarios.
  • Figure 9 shows an interaction diagram of another link discovery method provided by an embodiment of the present application. As shown in Figure 9, the method includes the following steps S901 to S915.
  • a first network device sends first capability information to a first controller, where the first capability information is used to indicate a link discovery capability supported by a first port of the first network device.
  • the first network device is in the first network domain, and the first controller is the controller of the first network domain.
  • the link discovery capability supported by the first port includes at least one of the following: a first clock protocol, a first discovery protocol, port traffic statistics, and a port alarm.
  • the first controller sends first capability information to the cross-domain controller.
  • the second network device sends second capability information to the second controller, where the second capability information is used to indicate a link discovery capability supported by a second port of the second network device.
  • the second network device is in the second network domain, and the second controller is a controller of the second network domain.
  • the network type of the first network domain is different from the network type of the second network domain.
  • one of the first network domain and the second network domain is an optical network domain, and the other network domain is an IP network domain.
  • the link discovery capability supported by the second port includes at least one of the following: a first clock protocol, a first discovery protocol, port traffic statistics, and a port alarm.
  • the second controller sends second capability information to the cross-domain controller.
  • the cross-domain controller determines a target policy based on the first capability information and the second capability information, where the target policy is used to indicate A cross-domain link between a first network domain and a second network domain is discovered.
  • the cross-domain controller sends the target policy to the first controller and the second controller respectively.
  • the first controller sends the target policy to the first network device.
  • the second controller sends the target policy to the second network device.
  • the first network device obtains first discovery information based on the target policy.
  • the first discovery information is discovery information of a cross-domain link between the first network domain and the second network domain.
  • the first network device sends first discovery information to the first controller.
  • the first controller sends first discovery information to the cross-domain controller.
  • the second network device obtains second discovery information based on the target policy.
  • the second discovery information is discovery information of a cross-domain link between the first network domain and the second network domain.
  • the second network device sends second discovery information to the second controller.
  • the second controller sends second discovery information to the cross-domain controller.
  • the cross-domain controller determines a cross-domain link between the first port and the second port according to the first discovery information and the second discovery information.
  • a certain network port supports a certain link discovery capability, which means that the certain network port supports the certain link discovery capability from the hardware, and the certain network port enables the certain link discovery capability before executing the link discovery scheme of the present application.
  • the first port supports the link discovery capability based on the first clock protocol, which means that the first port supports the first clock protocol from the hardware, and the first port enables the link discovery capability based on the first clock protocol before executing the link discovery scheme of the present application.
  • the present application also supports the controller controlling a certain network port to enable the certain link discovery capability.
  • the controller sends an enabling information to the network device where the certain network port is located, and the network device enables the certain link discovery capability of the certain network port according to the enabling information.
  • the controller is a cross-domain controller, the network device where the certain network port is located is located in the first network domain, and the cross-domain controller sends enabling information to the network device where the certain network port is located through the first controller.
  • the present application also supports the cross-domain controller, the first controller and the second controller to collaboratively perform network configuration.
  • the first controller collects information about the first network domain and sends the information about the first network domain to the cross-domain controller.
  • the cross-domain controller sends a configuration command to the first controller based on the information about the first network domain, and the first controller configures the first network domain according to the configuration command sent by the cross-domain controller.
  • the second controller collects information about the second network domain and sends the information about the second network domain to the cross-domain controller.
  • the cross-domain controller sends a configuration command to the second controller based on the information about the second network domain, and the second controller configures the second network domain according to the configuration command sent by the cross-domain controller.
  • FIG. 10 shows a schematic diagram of a link discovery device 1000 provided in an embodiment of the present application.
  • the link discovery device 1000 is applied to a controller.
  • the link discovery device 1000 is a controller or a functional component in the controller.
  • the link discovery device 1000 includes an acquisition module 1010 and a determination module 1020 .
  • the acquisition module 1010 is used to acquire first discovery information and second discovery information, wherein the first discovery information is discovery information of a first link acquired by a first network device based on a clock protocol message, and the second discovery information is discovery information of a first link acquired by a second network device based on the clock protocol message, wherein the first network device is in a first network domain, and the second network device is in a second network domain, and the network type of the first network domain is different from the network type of the second network domain, and the first link is a cross-domain link between a first port of the first network device and a second port of the second network device.
  • the functional implementation of the acquisition module 1010 may refer to the relevant description in the above S301.
  • the determination module 1020 is configured to determine the first link according to the first discovery information and the second discovery information.
  • the implementation of the function of the determination module 1020 may refer to the relevant description in the above S302.
  • the first discovery information includes indication information of the first port
  • the second discovery information includes indication information of the second port
  • at least one of the first discovery information and the second discovery information includes a correspondence between the first port and the second port.
  • the determination module 1020 is used to: determine the first port of the first network device according to the indication information of the first port; determine the second port of the second network device according to the indication information of the second port; and determine that the first port corresponds to the second port according to the correspondence.
  • the first discovery information further includes indication information of the first network device
  • the second discovery information further includes indication information of the second network device.
  • the determining module 1020 is further configured to: determine the first network device according to the indication information of the first network device;
  • the second network device is determined according to the indication information of the second network device.
  • the link discovery device 1000 also includes: a sending module 1030, which is used to send a target policy to the first network device and the second network device before the acquisition module 1010 acquires the first discovery information and the second discovery information, and the target policy is used to instruct the first network device and the second network device to discover the cross-domain link between the first network domain and the second network domain based on the first clock protocol, and the above-mentioned clock protocol message is a message based on the first clock protocol.
  • the functional implementation of the sending module 1030 can refer to the relevant description in the above S303.
  • the acquisition module 1010 is further used to acquire first capability information and second capability information before the sending module 1030 sends the target policy to the first network device and the second network device, the first capability information being used to indicate that the first port supports the first clock protocol, and the second capability information being used to indicate that the second port supports the first clock protocol.
  • the functional implementation of the acquisition module 1010 may refer to the relevant description in the above S304.
  • the determination module 1020 is further configured to determine a target policy according to the first capability information and the second capability information.
  • the implementation of the function of the determination module 1020 may refer to the relevant description in the above S305.
  • the controller is a cross-domain controller
  • the acquisition module 1010 is used to: receive first discovery information sent by a first controller, where the first controller is a controller of a first network domain; and receive second discovery information sent by a second controller, where the second controller is a controller of a second network domain.
  • the cross-domain controller, the first controller and the second controller are three different controllers.
  • the cross-domain controller is one controller, and the first controller and the second controller are the same controller; or, the cross-domain controller, the first controller, and the second controller are one controller.
  • one of the first network domain and the second network domain is an optical network domain, and the other network domain is an IP network domain.
  • one of the first network domain and the second network domain is a wireless network domain, and the other network domain is a wired network domain.
  • the technical solution provided by the embodiment of the present application is that the first network device in the first network domain and the second network device in the second network domain obtain link discovery information based on the clock protocol message, and the controller determines the cross-domain link between the first port of the first network device and the second port of the second network device according to the link discovery information obtained by the first network device and the second network device. That is, in the embodiment of the present application, the controller and the network device work together to discover the cross-domain link based on the clock protocol message. Since most network devices support the clock protocol, the link discovery solution provided by the embodiment of the present application can be applied to most network scenarios, and the link discovery solution has a wide range of application scenarios and strong universality.
  • FIG. 11 shows a schematic diagram of another link discovery device 1100 provided in an embodiment of the present application.
  • the link discovery device 1100 is applied to a controller.
  • the link discovery device 1100 is a controller or a functional component in the controller.
  • the link discovery device 1100 includes an acquisition module 1110 and a sending module 1120.
  • the acquisition module 1110 is used to acquire first capability information and second capability information, wherein the first capability information is used to indicate a link discovery capability supported by a first port of a first network device, and the second capability information is used to indicate a link discovery capability supported by a second port of a second network device, wherein the first network device is in a first network domain, and the second network device is in a second network domain, and a network type of the first network domain is different from a network type of the second network domain.
  • the functional implementation of the acquisition module 1110 may refer to the relevant description in the above S701.
  • the sending module 1120 is used to send a target policy to the first network device and the second network device, where the target policy is used to instruct the first network device and the second network device to discover a cross-domain link between the first network domain and the second network domain based on the target policy, where the target policy is determined according to the first capability information and the second capability information.
  • the functional implementation of the sending module 1120 can refer to the relevant description in S703 above.
  • the target strategy includes at least one of the following: a link discovery strategy based on a first clock protocol; a link discovery strategy based on a first discovery protocol; a link discovery strategy based on port traffic statistics; a link discovery strategy based on port alarms.
  • the link discovery device 1100 also includes: a determination module 1130, which is used to determine the target policy according to the first capability information and the second capability information before the sending module 1120 sends the target policy to the first network device and the second network device.
  • the functional implementation of the determination module 1130 can refer to the relevant description in the above S702.
  • the determination module 1130 is configured to:
  • the first capability information is used to indicate that the first port supports a link discovery capability based on a first clock protocol and the second capability information is used to indicate that the second port supports a link discovery capability based on the first clock protocol, determining that the target strategy includes a link discovery strategy based on the first clock protocol; and/or,
  • the first capability information is used to indicate that the first port supports a link discovery capability based on a first discovery protocol and the second capability information is used to indicate that the second port supports a link discovery capability based on the first discovery protocol, determining that the target policy includes a link discovery policy based on the first discovery protocol; and / or,
  • the device determines that the target strategy includes a link discovery strategy based on port traffic statistics; and/or,
  • the target policy includes a link discovery policy based on port alarms.
  • the acquisition module 1110 is further used to acquire first discovery information and second discovery information after the sending module 1120 sends the target policy to the first network device and the second network device, the first discovery information being the discovery information of the cross-domain link between the first network domain and the second network domain acquired by the first network device based on the target policy, and the second discovery information being the discovery information of the cross-domain link acquired by the second network device based on the target policy.
  • the functional implementation of the acquisition module 1110 may refer to the relevant description in S704 above.
  • the determination module 1130 is further configured to determine the cross-domain link according to the first discovery information and the second discovery information.
  • the implementation of the function of the determination module 1130 may refer to the relevant description in the above S705.
  • the target strategy includes a link discovery strategy based on a first clock protocol
  • the first discovery information includes indication information of the first port
  • the second discovery information includes indication information of the second port
  • at least one of the first discovery information and the second discovery information includes a correspondence between the first port and the second port
  • the determination module 1130 is used to: determine the first port of the first network device according to the indication information of the first port; determine the second port of the second network device according to the indication information of the second port; and determine that the first port corresponds to the second port according to the correspondence.
  • the target strategy includes a link discovery strategy based on a first discovery protocol
  • the first discovery information includes indication information of the first port
  • the second discovery information includes indication information of the second port
  • at least one of the first discovery information and the second discovery information includes a correspondence between the first port and the second port
  • the determination module 1130 is used to: determine the first port of the first network device according to the indication information of the first port; determine the second port of the second network device according to the indication information of the second port; and determine that the first port corresponds to the second port according to the correspondence.
  • the target strategy includes a link discovery strategy based on port traffic statistics
  • the first discovery information includes indication information of the first port and a traffic distribution curve of the first port in a first time period
  • the second discovery information includes indication information of the second port and a traffic distribution curve of the second port in the first time period
  • the determination module 1130 is used to: determine the first port of the first network device according to the indication information of the first port; determine the second port of the second network device according to the indication information of the second port; determine the correspondence between the first port and the second port according to the traffic distribution curve of the first port in the first time period and the traffic distribution curve of the second port in the first time period.
  • the target strategy includes a link discovery strategy based on port alarms
  • the first discovery information includes indication information and disconnection time information of the first port
  • the disconnection time information is used to indicate that the first port is disconnected within a second time period
  • the second discovery information includes indication information and alarm time information of the second port
  • the alarm time information is used to indicate that an alarm occurs on the second port within the second time period
  • the determination module 1130 is used to: determine the first port of the first network device according to the indication information of the first port; determine the second port of the second network device according to the indication information of the second port; and determine that the first port corresponds to the second port according to the disconnection time information and the alarm time information.
  • the first discovery information further includes indication information of the first network device
  • the second discovery information further includes indication information of the second network device.
  • the determination module 1130 is further configured to: determine the first network device according to the indication information of the first network device;
  • the second network device is determined according to the indication information of the second network device.
  • the controller is a cross-domain controller, and the acquisition module 1110 is used to:
  • Second capability information sent by a second controller is received, where the second controller is a controller of a second network domain.
  • the cross-domain controller, the first controller and the second controller are three different controllers.
  • the cross-domain controller is one controller, and the first controller and the second controller are the same controller; or, the cross-domain controller, the first controller, and the second controller are one controller.
  • one of the first network domain and the second network domain is an optical network domain, and the other network domain is an IP network domain.
  • one of the first network domain and the second network domain is a wireless network domain, and the other network domain is a wired network domain.
  • the controller determines the target strategy (i.e., the cross-domain link discovery strategy) according to the link discovery capabilities supported by the network ports of network devices in different network domains.
  • the process of determining the cross-domain link discovery strategy does not require manual participation, does not require the staff to be familiar with the network situation, and does not require additional skills for the staff.
  • the network device obtains the link discovery strategy according to the target strategy determined by the controller.
  • the controller determines the cross-domain link based on the link discovery information obtained by the network device.
  • the process of determining the cross-domain link does not require manual participation and has no additional requirements on the skills of the staff.
  • the link discovery device provided in the embodiment of the present application can also be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD).
  • ASIC application-specific integrated circuit
  • PLD programmable logic device
  • the above-mentioned PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.
  • CPLD complex programmable logical device
  • FPGA field-programmable gate array
  • GAL generic array logic
  • the method provided in the above-mentioned method embodiment can also be implemented by software.
  • each module in the above-mentioned link discovery device can also be a software module.
  • An embodiment of the present application provides a link discovery device, including a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory so that the link discovery device performs all or part of the steps of the link discovery method provided by the above method embodiment.
  • FIG 12 shows a schematic diagram of a link discovery device 1200 provided in an embodiment of the present application.
  • the link discovery device 1200 is a controller or a functional component in the controller.
  • the link discovery device 1200 includes a processor 1201, a memory 1202, a bus 1203, a network interface 1204, and an input-output device 1205.
  • the processor 1201, the memory 1202, the network interface 1204, and the input-output device 1205 are connected via the bus 1203.
  • Figure 12 illustrates that the processor 1201 and the memory 1202 are independent of each other.
  • the processor 1201 and the memory 1202 can also be integrated together.
  • the memory 1202 is used to store computer programs, which include operating systems and program codes.
  • the memory 1202 is a storage medium of various types, such as random access memory (RAM), read-only memory (ROM), non-volatile random access memory (NVRAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), flash memory, register, optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), disk or other magnetic storage device.
  • RAM random access memory
  • ROM read-only memory
  • NVRAM non-volatile random access memory
  • PROM programmable read-only memory
  • EPROM erasable programmable read-only memory
  • EEPROM electrically erasable programmable read-only memory
  • CD-ROM compact disc read-only memory
  • flash memory register, optical disc storage, optical disc storage (including
  • Processor 1201 is a general-purpose processor or a special-purpose processor.
  • a general-purpose processor is a processor that performs specific steps and/or operations by reading and executing a computer program stored in a memory.
  • the general-purpose processor may use a computer program stored in a memory in the process of performing the above steps and/or operations.
  • the computer program is executed, for example, to implement the related functions of the aforementioned acquisition module and determination module.
  • a general-purpose processor is, for example, but not limited to, a central processing unit (CPU).
  • a special-purpose processor is a processor specially designed to perform specific steps and/or operations.
  • a special-purpose processor is, for example, but not limited to, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.
  • DSP digital signal processor
  • ASIC application-specific integrated circuit
  • CPLD complex programmable logical device
  • FPGA field-programmable gate array
  • GAL generic array logic
  • Processor 1201 may be a single-CPU processor or a multi-CPU processor.
  • the processor 1201 includes at least one circuit to execute all or part of the steps of the link discovery method provided in the above embodiment.
  • the network interface 1204 is used for the link discovery device 1200 to communicate with other devices.
  • the network interface 1204 includes a physical interface and a logical interface.
  • the physical interface may be a gigabit Ethernet interface (GE), which is used to interconnect the link discovery device 1200 with other devices
  • the logical interface may be an interface inside the link discovery device 1200, which is used to interconnect the devices inside the link discovery device 1200.
  • GE gigabit Ethernet interface
  • the network interface 1204 can be used for the link discovery device 1200 to communicate with other devices, for example, the network interface 1204 is used to send and receive information between the link discovery device 1200 and other devices, and the network interface 1204 can implement the related functions of the aforementioned sending module.
  • the input/output device 1205 includes an input/output (I/O) interface, devices such as a keyboard, a mouse, and a display connected to the link discovery device 1200 through the I/O interface, and devices such as a display connected to the processor 1201 through a bus.
  • the processor 1201 can receive input commands or data through the input/output device 1205 and output processed data.
  • the input/output device 1205 includes a display, which can be used to display intermediate results and/or final results generated by the processor 1201 executing the above-mentioned link discovery method.
  • the bus 1203 is any type of communication bus used to interconnect the internal components of the link discovery device 1200.
  • the embodiment of the present application takes the above-mentioned devices in the link discovery device 1200 being interconnected through the bus 1203 as an example, and the above-mentioned devices in the link discovery device 1200 are connected to each other using other connection methods, for example, the above-mentioned devices in the link discovery device 1200 are interconnected through a logical interface inside the link discovery device 1200.
  • the above devices may be arranged on independent chips, or at least partially or completely on the same chip. Whether to arrange each device independently on different chips or to integrate them on one or more chips often depends on the needs of product design.
  • the embodiments of the present application do not limit the specific implementation form of the above devices.
  • the link discovery device 1200 shown in FIG12 is merely exemplary, and the link discovery device 1200 may also include other components, which are not listed here.
  • the link discovery device 1200 shown in FIG12 can discover cross-domain links between different types of network domains by executing all or part of the steps of the link discovery method provided in the above embodiment.
  • the embodiment of the present application provides a link discovery system, including a controller, a first network device, and a second network device.
  • the first network device is in a first network domain
  • the second network device is in a second network domain
  • the network type of the first network domain is different from the network type of the second network domain.
  • the controller includes a link discovery device as shown in any one of Figures 10 to 12.
  • the controller is a cross-domain controller
  • the link discovery system further includes a first controller and a second controller
  • the first controller is a controller of a first network domain
  • the second controller is a controller of a second network domain.
  • the cross-domain controller, the first controller and the second controller may be three different controllers.
  • the cross-domain controller is one controller, and the first controller and the second controller are the same controller; or, the cross-domain controller, the first controller, and the second controller are one controller.
  • one of the first network domain and the second network domain is an optical network domain, and the other is an IP network domain.
  • one of the first network domain and the second network domain is a wireless network domain, and the other is a wired network domain.
  • the link discovery system is a communication network as shown in FIG. 1 or FIG. 2 .
  • An embodiment of the present application provides a computer-readable storage medium, which stores a computer program.
  • the computer program is executed (for example, executed by a controller, one or more processors, etc.), all or part of the steps of the link discovery method provided in the above method embodiment are implemented.
  • An embodiment of the present application provides a computer program product, which includes a program or code.
  • the program or code When executed (for example, executed by a controller, one or more processors, etc.), it implements all or part of the steps of the link discovery method provided in the above method embodiment.
  • An embodiment of the present application provides a chip, which includes a programmable logic circuit and/or program instructions, and when the chip is running, it is used to implement all or part of the steps of the link discovery method provided in the above method embodiment.
  • the above embodiments it can be implemented in whole or in part by software, hardware, firmware or any combination thereof.
  • software it can be implemented in whole or in part in the form of a computer program product, and the computer program product includes one or more computer instructions.
  • the computer program instructions When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part.
  • the computer may be a general-purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center.
  • the computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integrated.
  • the available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium, or a semiconductor medium (e.g., a solid-state hard disk), etc.
  • the disclosed devices and the like can be implemented by other configuration methods.
  • the device embodiments described above are only illustrative, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, for example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed.
  • modules described as separate components may or may not be physically separated, and the components described as modules may or may not be physical modules, and may be located in one place or distributed on multiple devices. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

Landscapes

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

Abstract

The present invention relates to the technical field of networks, and provides a link discovery method, apparatus, and system. The method comprises: a controller acquires first discovery information and second discovery information, the first discovery information being discovery information of a first link acquired by a first network device on the basis of a clock protocol packet, the second discovery information being discovery information of the first link acquired by a second network device on the basis of the clock protocol packet, the first network device being in a first network domain, the second network device being in a second network domain, the network type of the first network domain being different from that of the second network domain, and the first link being a cross-domain link between a first port of the first network device and a second port of the second network device; and the controller determines the first link on the basis of the first discovery information and the second discovery information. According to the link discovery solution provided in the present application, a cross-domain link can be discovered, and the link discovery solution has a wide range of application scenarios and strong universality.

Description

链路发现方法、装置及系统Link discovery method, device and system

本申请要求申请日为2022年11月29日,申请号为202211511422.6,申请名称为“一种信息处理的方法及装置”的中国专利申请的优先权,以及,要求申请日为2023年01月18日,申请号为202310086087.8,申请名称为“链路发现方法、装置及系统”的中国专利申请的优先权,这两件专利申请的全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed on November 29, 2022, with application number 202211511422.6, and application name “A method and device for information processing”, as well as the priority of a Chinese patent application filed on January 18, 2023, with application number 202310086087.8, and application name “Link discovery method, device and system”. The entire contents of these two patent applications are incorporated into this application by reference.

技术领域Technical Field

本申请涉及网络技术领域,特别涉及一种链路发现方法、装置及系统。The present application relates to the field of network technology, and in particular to a link discovery method, device and system.

背景技术Background technique

跨域链路指不同网络域之间的通信链路。在网络维护、故障处理、网络割接等过程中,往往需要获取通信网络的网络拓扑,这就需要发现该通信网络中的跨域链路。Cross-domain links refer to communication links between different network domains. In the process of network maintenance, fault handling, network cutover, etc., it is often necessary to obtain the network topology of the communication network, which requires the discovery of cross-domain links in the communication network.

目前,网络设备通过链路层发现协议(link layer discovery protocol,LLDP)获取跨域链路的发现信息,并向控制器上报跨域链路的发现信息,使得控制器能够发现跨域链路。Currently, network devices obtain discovery information of cross-domain links through the link layer discovery protocol (LLDP) and report the discovery information of cross-domain links to the controller, so that the controller can discover the cross-domain links.

但是,通过LLDP发现跨域链路需要不同网络域中的网络设备都支持LLDP,导致通过LLDP发现跨域链路的应用场景受限,该跨域链路发现方案的普适性较差。However, discovering cross-domain links through LLDP requires that network devices in different network domains all support LLDP, which limits the application scenarios of discovering cross-domain links through LLDP, and the universality of this cross-domain link discovery solution is poor.

发明内容Summary of the invention

本申请提供了一种链路发现方法、装置及系统。本申请的技术方案如下。The present application provides a link discovery method, device and system. The technical solution of the present application is as follows.

第一方面,提供了一种链路发现方法,该方法包括:控制器获取第一发现信息和第二发现信息,第一发现信息是第一网络设备基于时钟协议报文获取的第一链路的发现信息,第二发现信息是第二网络设备基于该时钟协议报文获取的第一链路的发现信息,第一网络设备在第一网络域中,第二网络设备在第二网络域中,第一网络域的网络类型与第二网络域的网络类型不同,第一链路是第一网络设备的第一端口与第二网络设备的第二端口之间的跨域链路;该控制器根据第一发现信息和第二发现信息确定第一链路。In a first aspect, a link discovery method is provided, the method comprising: a controller obtains first discovery information and second discovery information, the first discovery information is discovery information of a first link obtained by a first network device based on a clock protocol message, the second discovery information is discovery information of the first link obtained by a second network device based on the clock protocol message, the first network device is in a first network domain, the second network device is in a second network domain, the network type of the first network domain is different from the network type of the second network domain, and the first link is a cross-domain link between a first port of the first network device and a second port of the second network device; the controller determines the first link based on the first discovery information and the second discovery information.

目前,通常通过LLDP发现跨域链路,这需要不同网络域中的网络设备都支持LLDP,导致该方案的应用场景受限,普适性较差。例如,在采用LLDP发现光网络域与互联网协议(internet protocol,IP)网络域之间的跨域链路的场景中,需要光网络设备(或称为波分设备)的单板支持LLDP,但是目前仅少数波分设备的单板支持LLDP,这导致在大部分场景中,无法采用LLDP发现光网络域与IP网络域之间的跨域链路。本申请基于时钟协议报文发现不同网络域之间的跨域链路,例如,基于时钟协议报文发现光网络域与IP网络域之间的跨域链路,由于大部分网络设备都支持时钟协议,因此本申请的跨域链路发现方案可以应用于大部分网络场景,本申请的跨域链路发现方案的应用场景广泛,普适性较强。At present, cross-domain links are usually discovered through LLDP, which requires that network devices in different network domains support LLDP, resulting in limited application scenarios of the solution and poor universality. For example, in the scenario where LLDP is used to discover cross-domain links between the optical network domain and the Internet Protocol (IP) network domain, the single board of the optical network device (or wavelength division device) needs to support LLDP, but currently only a few single boards of wavelength division devices support LLDP, which results in that in most scenarios, LLDP cannot be used to discover cross-domain links between the optical network domain and the IP network domain. The present application discovers cross-domain links between different network domains based on clock protocol messages. For example, the cross-domain link between the optical network domain and the IP network domain is discovered based on the clock protocol message. Since most network devices support the clock protocol, the cross-domain link discovery solution of the present application can be applied to most network scenarios. The cross-domain link discovery solution of the present application has a wide range of application scenarios and strong universality.

可选的,第一发现信息包括第一端口的指示信息,第二发现信息包括第二端口的指示信息,第一发现信息和第二发现信息中的至少一个发现信息包括第一端口与第二端口的对应关系,控制器根据第一发现信息和第二发现信息确定第一链路,包括:控制器根据该第一端口的指示信息确定第一网络设备的第一端口;控制器根据该第二端口的指示信息确定第二网络设备的第二端口;控制器根据该对应关系确定该第一端口与该第二端口对应。控制器确定第一端口与第二端口对应,也即该控制器发现了该第一端口与该第二端口之间的第一链路。Optionally, the first discovery information includes indication information of the first port, the second discovery information includes indication information of the second port, at least one of the first discovery information and the second discovery information includes a correspondence between the first port and the second port, and the controller determines the first link according to the first discovery information and the second discovery information, including: the controller determines the first port of the first network device according to the indication information of the first port; the controller determines the second port of the second network device according to the indication information of the second port; the controller determines that the first port corresponds to the second port according to the correspondence. The controller determines that the first port corresponds to the second port, that is, the controller discovers the first link between the first port and the second port.

可选的,第一发现信息还包括第一网络设备的指示信息,第二发现信息还包括第二网络设备的指示信息,控制器根据第一发现信息和第二发现信息确定第一链路,还包括:控制器根据该第一网络设备的指示信息确定该第一网络设备;控制器根据该第二网络设备的指示信息确定该第二网络设备。由于第一发现信息包括第一网络设备的指示信息和第一端口的指示信息,因此控制器根据第一发现信息可以确定第一端口属于第一网络设备;由于第二发现信息包括第二网络设备的指示信息和第二端口的指示信息,因此控制器根据第二发现信息可以确定第二端口属于第二网络设备;从而便于控制器确定第一端口与第二端口之间的第一链路。 Optionally, the first discovery information also includes indication information of the first network device, the second discovery information also includes indication information of the second network device, and the controller determines the first link according to the first discovery information and the second discovery information, and further includes: the controller determines the first network device according to the indication information of the first network device; the controller determines the second network device according to the indication information of the second network device. Since the first discovery information includes the indication information of the first network device and the indication information of the first port, the controller can determine that the first port belongs to the first network device according to the first discovery information; since the second discovery information includes the indication information of the second network device and the indication information of the second port, the controller can determine that the second port belongs to the second network device according to the second discovery information; thereby facilitating the controller to determine the first link between the first port and the second port.

可选的,在控制器获取第一发现信息和第二发现信息之前,该方法还包括:该控制器向第一网络设备和第二网络设备发送目标策略,该目标策略用于指示第一网络设备和第二网络设备基于第一时钟协议发现第一网络域与第二网络域之间的跨域链路,所述时钟协议报文是基于第一时钟协议的报文。其中,目标策略是基于第一时钟协议的链路发现策略。Optionally, before the controller obtains the first discovery information and the second discovery information, the method further includes: the controller sends a target policy to the first network device and the second network device, the target policy being used to instruct the first network device and the second network device to discover a cross-domain link between the first network domain and the second network domain based on the first clock protocol, wherein the clock protocol message is a message based on the first clock protocol. The target policy is a link discovery policy based on the first clock protocol.

本申请提供的技术方案,控制器向第一网络设备和第二网络设备发送目标策略,便于第一网络设备基于时钟协议报文获取第一发现信息,以及,便于第二网络设备基于时钟协议报文获取第二发现信息,从而控制器根据第一发现信息和第二发现信息确定第一链路。The technical solution provided by the present application is that the controller sends a target policy to the first network device and the second network device, so that the first network device can obtain the first discovery information based on the clock protocol message, and the second network device can obtain the second discovery information based on the clock protocol message, so that the controller determines the first link according to the first discovery information and the second discovery information.

可选的,在控制器向第一网络设备和第二网络设备发送目标策略之前,该方法还包括:该控制器获取第一能力信息和第二能力信息,第一能力信息用于指示第一端口支持第一时钟协议(也即第一端口支持基于第一时钟协议的链路发现能力),第二能力信息用于指示第二端口支持第一时钟协议(也即第二端口支持基于第一时钟协议的链路发现能力);该控制器根据第一能力信息和第二能力信息确定目标策略。Optionally, before the controller sends the target policy to the first network device and the second network device, the method also includes: the controller obtains first capability information and second capability information, the first capability information is used to indicate that the first port supports the first clock protocol (that is, the first port supports the link discovery capability based on the first clock protocol), and the second capability information is used to indicate that the second port supports the first clock protocol (that is, the second port supports the link discovery capability based on the first clock protocol); the controller determines the target policy based on the first capability information and the second capability information.

本申请提供的技术方案,由于目标策略是控制器根据第一能力信息和第二能力信息确定的,因此目标策略能够适配第一网络设备的第一端口的链路发现能力和第二网络设备的第二端口的链路发现能力,便于第一网络设备和第二网络设备执行目标策略以获取链路发现信息。The technical solution provided by the present application is that since the target policy is determined by the controller based on the first capability information and the second capability information, the target policy can adapt to the link discovery capability of the first port of the first network device and the link discovery capability of the second port of the second network device, thereby facilitating the first network device and the second network device to execute the target policy to obtain link discovery information.

可选的,所述控制器是跨域控制器,控制器获取第一发现信息和第二发现信息,包括:该控制器接收第一控制器发送的第一发现信息,第一控制器是第一网络域的控制器;该控制器接收第二控制器发送的第二发现信息,第二控制器是第二网络域的控制器。Optionally, the controller is a cross-domain controller, and the controller obtains first discovery information and second discovery information, including: the controller receives first discovery information sent by a first controller, and the first controller is a controller of a first network domain; the controller receives second discovery information sent by a second controller, and the second controller is a controller of a second network domain.

可选的,跨域控制器、第一控制器和第二控制器是三个不同的控制器。例如,第一控制器在第一网络域内,第二控制器在第二网络域内,跨域控制器在第一网络域外,且跨域控制器在第二网络域外。Optionally, the cross-domain controller, the first controller, and the second controller are three different controllers. For example, the first controller is in the first network domain, the second controller is in the second network domain, the cross-domain controller is outside the first network domain, and the cross-domain controller is outside the second network domain.

可选的,跨域控制器、第一控制器和第二控制器中的至少两个是一台控制器。例如,跨域控制器是一台控制器,第一控制器和第二控制器是同一台控制器;或者,跨域控制器、第一控制器和第二控制器是一台控制器。Optionally, at least two of the cross-domain controller, the first controller, and the second controller are one controller. For example, the cross-domain controller is one controller, and the first controller and the second controller are the same controller; or, the cross-domain controller, the first controller, and the second controller are one controller.

可选的,第一网络域和第二网络域中的一个网络域是光网络域,另一个网络域是IP网络域。例如,第一网络域是IP网络域,第二网络域是光网络域。示例的,该光网络域是光传输网(optical transmission network,OTN)。Optionally, one of the first network domain and the second network domain is an optical network domain, and the other network domain is an IP network domain. For example, the first network domain is an IP network domain, and the second network domain is an optical network domain. For example, the optical network domain is an optical transmission network (OTN).

可选的,第一网络域和第二网络域中的一个网络域是无线网络域,另一个网络域是有线网络域。例如,第一网络域是无线网络域,第二网络域是有线网络域。Optionally, one of the first network domain and the second network domain is a wireless network domain, and the other network domain is a wired network domain. For example, the first network domain is a wireless network domain, and the second network domain is a wired network domain.

第二方面,提供了一种链路发现方法,该方法包括:控制器获取第一能力信息和第二能力信息,第一能力信息用于指示第一网络设备的第一端口支持的链路发现能力,第二能力信息用于指示第二网络设备的第二端口支持的链路发现能力,第一网络设备在第一网络域中,第二网络设备在第二网络域中,第一网络域的网络类型与第二网络域的网络类型不同;该控制器向第一网络设备和第二网络设备发送目标策略,该目标策略用于指示第一网络设备和第二网络设备基于目标策略发现第一网络域与第二网络域之间的跨域链路,该目标策略根据第一能力信息和第二能力信息确定。In a second aspect, a link discovery method is provided, the method comprising: a controller acquires first capability information and second capability information, the first capability information being used to indicate a link discovery capability supported by a first port of a first network device, the second capability information being used to indicate a link discovery capability supported by a second port of a second network device, the first network device being in a first network domain, the second network device being in a second network domain, and a network type of the first network domain being different from a network type of the second network domain; the controller sends a target policy to the first network device and the second network device, the target policy being used to instruct the first network device and the second network device to discover a cross-domain link between the first network domain and the second network domain based on the target policy, the target policy being determined based on the first capability information and the second capability information.

目前,由工作人员根据网络情况确定跨域链路的发现策略,这需要工作人员熟悉掌握网络情况,对工作人员的要求较高。本申请提供的技术方案,控制器根据第一能力信息和第二能力信息确定目标策略,即,控制器根据网络端口支持的链路发现能力确定跨域链路的发现策略,确定跨域链路的发现策略的过程无需人工参与,对工作人员的要求较低。At present, the staff determines the discovery strategy of the cross-domain link according to the network situation, which requires the staff to be familiar with the network situation and has high requirements for the staff. The technical solution provided by the present application is that the controller determines the target strategy according to the first capability information and the second capability information, that is, the controller determines the discovery strategy of the cross-domain link according to the link discovery capability supported by the network port. The process of determining the discovery strategy of the cross-domain link does not require manual participation, and the requirements for the staff are relatively low.

可选的,目标策略包括以下至少一种:基于第一时钟协议的链路发现策略;基于第一发现协议的链路发现策略;基于端口流量统计的链路发现策略;基于端口告警的链路发现策略。示例的,第一发现协议是LLDP或其他的链路发现协议。第一时钟协议是电气与电子工程师协会(Institute of Electrical and Electronics Engineers,IEEE)1588协议、国际电信联盟电信标准化部门(ITU-T for ITU Telecommunication Standardization Sector,ITU-T)G.8275.1协议或其他的时钟协议。例如,第一时钟协议是IEEE1588版本2(version2,V2)。IEEE1588协议也称为1588协议或精确时间协议(precision time protocol,PTP),1588协议的全称为:网络测量和控制系统的精密时钟同步协议标准。ITU-TG.8275.1协议也称为G.8275.1协议,ITU-TG.8275.1协议定义了电信级全网精确时间同步协议(precision time protocol telecom profile for phase/time synchronization with full timing support from the network)。Optionally, the target strategy includes at least one of the following: a link discovery strategy based on a first clock protocol; a link discovery strategy based on a first discovery protocol; a link discovery strategy based on port traffic statistics; a link discovery strategy based on port alarms. For example, the first discovery protocol is LLDP or other link discovery protocols. The first clock protocol is the Institute of Electrical and Electronics Engineers (IEEE) 1588 protocol, the International Telecommunication Union Telecommunication Standardization Sector (ITU-T for ITU Telecommunication Standardization Sector, ITU-T) G.8275.1 protocol or other clock protocols. For example, the first clock protocol is IEEE 1588 version 2 (version 2, V2). The IEEE 1588 protocol is also called the 1588 protocol or the precision time protocol (PTP). The full name of the 1588 protocol is: Precision Clock Synchronization Protocol Standard for Network Measurement and Control Systems. The ITU-TG.8275.1 protocol is also called the G.8275.1 protocol. The ITU-TG.8275.1 protocol defines a telecommunication-grade precision time protocol telecom profile for phase/time synchronization with full timing support from the network.

可选的,在控制器向第一网络设备和第二网络设备发送目标策略之前,该方法还包括:该控制器根据 第一能力信息和第二能力信息确定该目标策略。Optionally, before the controller sends the target policy to the first network device and the second network device, the method further includes: the controller according to The first capability information and the second capability information determine the target policy.

本申请提供的技术方案,由于控制器根据第一能力信息和第二能力信息确定目标策略,即,控制器根据网络端口支持的链路发现能力确定跨域链路的发现策略,因此确定跨域链路的发现策略的过程无需人工参与,对工作人员的要求较低。The technical solution provided by the present application is that the controller determines the target strategy based on the first capability information and the second capability information, that is, the controller determines the cross-domain link discovery strategy based on the link discovery capability supported by the network port. Therefore, the process of determining the cross-domain link discovery strategy does not require human participation and has low requirements for staff.

可选的,控制器根据第一能力信息和第二能力信息确定目标策略,包括:Optionally, the controller determines the target policy according to the first capability information and the second capability information, including:

当第一能力信息用于指示第一端口支持基于第一时钟协议的链路发现能力且第二能力信息用于指示第二端口支持基于第一时钟协议的链路发现能力时,控制器确定目标策略包括基于第一时钟协议的链路发现策略;和/或,When the first capability information is used to indicate that the first port supports a link discovery capability based on a first clock protocol and the second capability information is used to indicate that the second port supports a link discovery capability based on the first clock protocol, the controller determines that the target strategy includes a link discovery strategy based on the first clock protocol; and/or,

当第一能力信息用于指示第一端口支持基于第一发现协议的链路发现能力且第二能力信息用于指示第二端口支持基于第一发现协议的链路发现能力时,控制器确定目标策略包括基于第一发现协议的链路发现策略;和/或,When the first capability information is used to indicate that the first port supports a link discovery capability based on a first discovery protocol and the second capability information is used to indicate that the second port supports a link discovery capability based on the first discovery protocol, the controller determines that the target policy includes a link discovery policy based on the first discovery protocol; and/or,

当第一能力信息用于指示第一端口支持基于端口流量统计的链路发现能力且第二能力信息用于指示第二端口支持基于端口流量统计的链路发现能力时,控制器确定目标策略包括基于端口流量统计的链路发现策略;和/或,When the first capability information is used to indicate that the first port supports a link discovery capability based on port traffic statistics and the second capability information is used to indicate that the second port supports a link discovery capability based on port traffic statistics, the controller determines that the target strategy includes a link discovery strategy based on port traffic statistics; and/or,

当第一能力信息用于指示第一端口支持基于端口告警的链路发现能力且第二能力信息用于指示第二端口支持基于端口告警的链路发现能力时,控制器确定目标策略包括基于端口告警的链路发现策略。When the first capability information is used to indicate that the first port supports a link discovery capability based on port alarms and the second capability information is used to indicate that the second port supports a link discovery capability based on port alarms, the controller determines that the target policy includes a link discovery policy based on port alarms.

可选的,在控制器向第一网络设备和第二网络设备发送目标策略之后,该方法还包括:控制器获取第一发现信息和第二发现信息,第一发现信息是第一网络设备基于目标策略获取的第一网络域与第二网络域之间的跨域链路(例如第一网络设备的第一端口与第二网络设备的第二端口之间的跨域链路)的发现信息,第二发现信息是第二网络设备基于目标策略获取的第一网络域与第二网络域之间的跨域链路的发现信息;该控制器根据第一发现信息和第二发现信息确定第一网络域与第二网络域之间的跨域链路。Optionally, after the controller sends the target policy to the first network device and the second network device, the method also includes: the controller obtains first discovery information and second discovery information, the first discovery information is the discovery information of the cross-domain link between the first network domain and the second network domain (for example, the cross-domain link between the first port of the first network device and the second port of the second network device) obtained by the first network device based on the target policy, and the second discovery information is the discovery information of the cross-domain link between the first network domain and the second network domain obtained by the second network device based on the target policy; the controller determines the cross-domain link between the first network domain and the second network domain based on the first discovery information and the second discovery information.

本申请提供的技术方案,由于控制器根据第一网络设备的第一端口支持的链路发现能力和第二网络设备的第二端口支持的链路发现能力确定目标策略,即确定第一网络域与第二网络域之间的跨域链路的发现策略,第一网络设备和第二网络设备分别基于目标策略获取该跨域链路的发现信息,因此发现该跨域链路的过程无需人工参与,对工作人员的要求较低。The technical solution provided by the present application is that the controller determines the target strategy according to the link discovery capability supported by the first port of the first network device and the link discovery capability supported by the second port of the second network device, that is, determines the discovery strategy of the cross-domain link between the first network domain and the second network domain, and the first network device and the second network device respectively obtain the discovery information of the cross-domain link based on the target strategy. Therefore, the process of discovering the cross-domain link does not require human participation and has low requirements for staff.

可选的,目标策略包括基于第一时钟协议的链路发现策略,第一发现信息包括第一端口的指示信息,第二发现信息包括第二端口的指示信息,第一发现信息和第二发现信息中的至少一个发现信息包括第一端口与第二端口的对应关系,控制器根据第一发现信息和第二发现信息确定第一网络域与第二网络域之间的跨域链路,包括:该控制器根据该第一端口的指示信息确定第一网络设备的该第一端口;该控制器根据该第二端口的指示信息确定第二网络设备的该第二端口;该控制器根据该对应关系确定该第一端口与该第二端口对应。控制器确定第一网络设备的第一端口与第二网络设备的第二端口对应也即该控制器发现了该第一端口与该第二端口之间的跨域链路(也即第一网络域与第二网络域之间的跨域链路)。Optionally, the target strategy includes a link discovery strategy based on a first clock protocol, the first discovery information includes indication information of the first port, the second discovery information includes indication information of the second port, at least one of the first discovery information and the second discovery information includes a correspondence between the first port and the second port, and the controller determines the cross-domain link between the first network domain and the second network domain according to the first discovery information and the second discovery information, including: the controller determines the first port of the first network device according to the indication information of the first port; the controller determines the second port of the second network device according to the indication information of the second port; the controller determines that the first port corresponds to the second port according to the correspondence. The controller determines that the first port of the first network device corresponds to the second port of the second network device, that is, the controller discovers the cross-domain link between the first port and the second port (that is, the cross-domain link between the first network domain and the second network domain).

可选的,目标策略包括基于第一发现协议的链路发现策略,第一发现信息包括第一端口的指示信息,第二发现信息包括第二端口的指示信息,第一发现信息和第二发现信息中的至少一个发现信息包括第一端口与第二端口的对应关系,控制器根据第一发现信息和第二发现信息确定第一网络域与第二网络域之间的跨域链路,包括:该控制器根据该第一端口的指示信息确定第一网络设备的该第一端口;该控制器根据该第二端口的指示信息确定第二网络设备的该第二端口;该控制器根据该对应关系确定该第一端口与该第二端口对应。控制器确定第一网络设备的第一端口与第二网络设备的第二端口对应也即该控制器发现了该第一端口与该第二端口之间的跨域链路(也即第一网络域与第二网络域之间的跨域链路)。Optionally, the target strategy includes a link discovery strategy based on a first discovery protocol, the first discovery information includes indication information of the first port, the second discovery information includes indication information of the second port, at least one of the first discovery information and the second discovery information includes a correspondence between the first port and the second port, and the controller determines the cross-domain link between the first network domain and the second network domain according to the first discovery information and the second discovery information, including: the controller determines the first port of the first network device according to the indication information of the first port; the controller determines the second port of the second network device according to the indication information of the second port; the controller determines that the first port corresponds to the second port according to the correspondence. The controller determines that the first port of the first network device corresponds to the second port of the second network device, that is, the controller discovers the cross-domain link between the first port and the second port (that is, the cross-domain link between the first network domain and the second network domain).

可选的,目标策略包括基于端口流量统计的链路发现策略,第一发现信息包括第一端口的指示信息和第一端口在第一时间段内的流量分布曲线,第二发现信息包括第二端口的指示信息和第二端口在第一时间段内的流量分布曲线,控制器根据第一发现信息和第二发现信息确定第一网络域与第二网络域之间的跨域链路,包括:该控制器根据该第一端口的指示信息确定第一网络设备的该第一端口;该控制器根据该第二端口的指示信息确定第二网络设备的该第二端口;该控制器根据该第一端口在第一时间段内的流量分布曲线与该第二端口在第一时间段内的流量分布曲线确定该第一端口与该第二端口对应。控制器确定第一网络设备的第一端口与第二网络设备的第二端口对应也即该控制器发现了该第一端口与该第二端口之间的跨域链路(也即第一网络域与第二网络域之间的跨域链路)。 Optionally, the target strategy includes a link discovery strategy based on port traffic statistics, the first discovery information includes indication information of the first port and a traffic distribution curve of the first port in a first time period, the second discovery information includes indication information of the second port and a traffic distribution curve of the second port in the first time period, and the controller determines the cross-domain link between the first network domain and the second network domain according to the first discovery information and the second discovery information, including: the controller determines the first port of the first network device according to the indication information of the first port; the controller determines the second port of the second network device according to the indication information of the second port; the controller determines that the first port corresponds to the second port according to the traffic distribution curve of the first port in the first time period and the traffic distribution curve of the second port in the first time period. The controller determines that the first port of the first network device corresponds to the second port of the second network device, that is, the controller discovers the cross-domain link between the first port and the second port (that is, the cross-domain link between the first network domain and the second network domain).

可选的,目标策略包括基于端口告警的链路发现策略,第一发现信息包括第一端口的指示信息和断开时间信息,该断开时间信息用于指示第一端口在第二时间段内断开,第二发现信息包括第二端口的指示信息和告警时间信息,该告警时间信息用于指示第二端口在第二时间段内发生告警,控制器根据第一发现信息和第二发现信息确定第一网络域与第二网络域之间的跨域链路,包括:该控制器根据该第一端口的指示信息确定第一网络设备的该第一端口;该控制器根据该第二端口的指示信息确定第二网络设备的该第二端口;该控制器根据该断开时间信息和该告警时间信息确定该第一端口与该第二端口对应。控制器确定第一网络设备的第一端口与第二网络设备的第二端口对应也即该控制器发现了该第一端口与该第二端口之间的跨域链路(也即第一网络域与第二网络域之间的跨域链路)。Optionally, the target strategy includes a link discovery strategy based on port alarms, the first discovery information includes indication information and disconnection time information of the first port, the disconnection time information is used to indicate that the first port is disconnected within the second time period, the second discovery information includes indication information and alarm time information of the second port, the alarm time information is used to indicate that the second port has an alarm within the second time period, and the controller determines the cross-domain link between the first network domain and the second network domain according to the first discovery information and the second discovery information, including: the controller determines the first port of the first network device according to the indication information of the first port; the controller determines the second port of the second network device according to the indication information of the second port; the controller determines that the first port corresponds to the second port according to the disconnection time information and the alarm time information. The controller determines that the first port of the first network device corresponds to the second port of the second network device, that is, the controller discovers the cross-domain link between the first port and the second port (that is, the cross-domain link between the first network domain and the second network domain).

可选的,第一发现信息还包括第一网络设备的指示信息,第二发现信息还包括第二网络设备的指示信息,控制器根据第一发现信息和第二发现信息确定第一网络域与第二网络域之间的跨域链路,还包括:该控制器根据该第一网络设备的指示信息确定该第一网络设备;该控制器根据该第二网络设备的指示信息确定该第二网络设备。由于第一发现信息包括第一网络设备的指示信息和第一端口的指示信息,因此控制器根据第一发现信息可以确定第一端口属于第一网络设备;由于第二发现信息包括第二网络设备的指示信息和第二端口的指示信息,因此控制器根据第二发现信息可以确定第二端口属于第二网络设备。Optionally, the first discovery information also includes indication information of the first network device, the second discovery information also includes indication information of the second network device, and the controller determines the cross-domain link between the first network domain and the second network domain based on the first discovery information and the second discovery information, and further includes: the controller determines the first network device based on the indication information of the first network device; the controller determines the second network device based on the indication information of the second network device. Since the first discovery information includes the indication information of the first network device and the indication information of the first port, the controller can determine that the first port belongs to the first network device based on the first discovery information; since the second discovery information includes the indication information of the second network device and the indication information of the second port, the controller can determine that the second port belongs to the second network device based on the second discovery information.

可选的,所述控制器是跨域控制器,控制器获取第一能力信息和第二能力信息,包括:该控制器接收第一控制器发送的第一能力信息,第一控制器是第一网络域的控制器;该控制器接收第二控制器发送的第二能力信息,第二控制器是第二网络域的控制器。Optionally, the controller is a cross-domain controller, and the controller obtains first capability information and second capability information, including: the controller receives first capability information sent by a first controller, and the first controller is a controller of a first network domain; the controller receives second capability information sent by a second controller, and the second controller is a controller of a second network domain.

可选的,跨域控制器、第一控制器和第二控制器是三个不同的控制器。Optionally, the cross-domain controller, the first controller and the second controller are three different controllers.

可选的,跨域控制器、第一控制器和第二控制器中的至少两个是一台控制器。例如,跨域控制器是一台控制器,第一控制器和第二控制器是一台控制器;或者,跨域控制器、第一控制器和第二控制器是一台控制器。Optionally, at least two of the cross-domain controller, the first controller, and the second controller are one controller. For example, the cross-domain controller is one controller, and the first controller and the second controller are one controller; or, the cross-domain controller, the first controller, and the second controller are one controller.

可选的,第一网络域和第二网络域中的一个网络域是光网络域,另一个网络域是IP网络域。Optionally, one of the first network domain and the second network domain is an optical network domain, and the other network domain is an IP network domain.

可选的,第一网络域和第二网络域中的一个网络域是无线网络域,另一个网络域是有线网络域。Optionally, one of the first network domain and the second network domain is a wireless network domain, and the other network domain is a wired network domain.

第三方面,提供了一种链路发现装置,应用于控制器,包括用于执行如上述第一方面或第一方面的任一可选方式所提供的链路发现方法的各个模块。In a third aspect, a link discovery device is provided, which is applied to a controller and includes modules for executing the link discovery method provided in the first aspect or any optional manner of the first aspect.

第四方面,提供了一种链路发现装置,应用于控制器,包括用于执行如上述第二方面或第二方面的任一可选方式所提供的链路发现方法的各个模块。In a fourth aspect, a link discovery device is provided, which is applied to a controller and includes modules for executing the link discovery method provided in the second aspect or any optional manner of the second aspect.

上述第三方面和第四方面的所述模块可以基于软件、硬件或软件和硬件的结合实现,且所述模块可以基于具体实现进行任意组合或分割。The modules of the third and fourth aspects mentioned above may be implemented based on software, hardware or a combination of software and hardware, and the modules may be arbitrarily combined or divided based on specific implementations.

第五方面,提供了一种链路发现装置,包括存储器和处理器;该存储器用于存储计算机程序;该处理器用于执行该存储器中存储的计算机程序以使得该链路发现装置执行如上述第一方面或第一方面的任一可选方式所提供的链路发现方法。In the fifth aspect, a link discovery device is provided, comprising a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory so that the link discovery device performs a link discovery method provided in the first aspect or any optional method of the first aspect.

第六方面,提供了一种链路发现装置,包括存储器和处理器;该存储器用于存储计算机程序;该处理器用于执行该存储器中存储的计算机程序以使得该链路发现装置执行如上述第二方面或第二方面的任一可选方式所提供的链路发现方法。In the sixth aspect, a link discovery device is provided, comprising a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory so that the link discovery device performs a link discovery method provided in the second aspect or any optional method of the second aspect.

第七方面,提供了一种链路发现系统,包括控制器、第一网络设备和第二网络设备,第一网络设备在第一网络域中,第二网络设备在第二网络域中,第一网络域的网络类型与第二网络域的网络类型不同,该控制器包括如上述第三至第六方面任一所提供的链路发现装置。In the seventh aspect, a link discovery system is provided, including a controller, a first network device and a second network device, the first network device is in a first network domain, the second network device is in a second network domain, the network type of the first network domain is different from the network type of the second network domain, and the controller includes a link discovery device as provided in any one of the third to sixth aspects above.

可选的,该控制器是跨域控制器,该系统还包括第一控制器和第二控制器,第一控制器是第一网络域的控制器,第二控制器是第二网络域的控制器。Optionally, the controller is a cross-domain controller, and the system further includes a first controller and a second controller, the first controller is a controller of a first network domain, and the second controller is a controller of a second network domain.

可选的,跨域控制器、第一控制器和第二控制器是三个不同的控制器。Optionally, the cross-domain controller, the first controller and the second controller are three different controllers.

可选的,跨域控制器、第一控制器和第二控制器中的至少两个是一台控制器。例如,跨域控制器是一台控制器,第一控制器和第二控制器是一台控制器;或者,跨域控制器、第一控制器和第二控制器是一台控制器。Optionally, at least two of the cross-domain controller, the first controller, and the second controller are one controller. For example, the cross-domain controller is one controller, and the first controller and the second controller are one controller; or, the cross-domain controller, the first controller, and the second controller are one controller.

可选的,第一网络域和第二网络域中的一个网络域是光网络域,另一个网络域是IP网络域。Optionally, one of the first network domain and the second network domain is an optical network domain, and the other network domain is an IP network domain.

可选的,第一网络域和第二网络域中的一个网络域是无线网络域,另一个网络域是有线网络域。Optionally, one of the first network domain and the second network domain is a wireless network domain, and the other network domain is a wired network domain.

第八方面,提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,该计算机 程序被执行时实现如上述第一方面或第一方面的任一可选方式所提供的链路发现方法;或者,实现如上述第二方面或第二方面的任一可选方式所提供的链路发现方法。In an eighth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program. When the program is executed, the link discovery method provided by the first aspect or any optional method of the first aspect is implemented; or, the link discovery method provided by the second aspect or any optional method of the second aspect is implemented.

第九方面,提供了一种计算机程序产品,该计算机程序产品包括程序或代码,该程序或代码被执行时实现如上述第一方面或第一方面的任一可选方式所提供的链路发现方法;或者,实现如上述第二方面或第二方面的任一可选方式所提供的链路发现方法。In the ninth aspect, a computer program product is provided, which includes a program or code, and when the program or code is executed, it implements the link discovery method provided by the first aspect or any optional method of the first aspect; or, it implements the link discovery method provided by the second aspect or any optional method of the second aspect.

第十方面,提供了一种芯片,该芯片包括可编程逻辑电路和/或程序指令,该芯片运行时用于实现如上述第一方面或第一方面的任一可选方式所提供的链路发现方法;或者,实现如上述第二方面或第二方面的任一可选方式所提供的链路发现方法。In the tenth aspect, a chip is provided, which includes a programmable logic circuit and/or program instructions, and when the chip is running, it is used to implement the link discovery method provided by the first aspect or any optional method of the first aspect; or, to implement the link discovery method provided by the second aspect or any optional method of the second aspect.

上述第三至第十方面的技术效果请参考第一至第二方面的技术效果,这里不做赘述。For the technical effects of the third to tenth aspects mentioned above, please refer to the technical effects of the first to second aspects and will not be elaborated here.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是本申请实施例提供的一种通信网络的示意图;FIG1 is a schematic diagram of a communication network provided in an embodiment of the present application;

图2是本申请实施例提供的另一种通信网络的示意图;FIG2 is a schematic diagram of another communication network provided in an embodiment of the present application;

图3是本申请实施例提供的一种链路发现方法的流程图;FIG3 is a flow chart of a link discovery method provided by an embodiment of the present application;

图4是本申请实施例提供的一种PTP报头的示意图;FIG4 is a schematic diagram of a PTP header provided in an embodiment of the present application;

图5是本申请实施例提供的另一种链路发现方法的流程图;FIG5 is a flow chart of another link discovery method provided in an embodiment of the present application;

图6是本申请实施例提供的一种链路发现方法的交互图;FIG6 is an interaction diagram of a link discovery method provided in an embodiment of the present application;

图7是本申请实施例提供的再一种链路发现方法的流程图;7 is a flowchart of another link discovery method provided in an embodiment of the present application;

图8是本申请实施例提供的又一种链路发现方法的流程图;FIG8 is a flowchart of another link discovery method provided in an embodiment of the present application;

图9是本申请实施例提供的另一种链路发现方法的交互图;FIG9 is an interaction diagram of another link discovery method provided in an embodiment of the present application;

图10是本申请实施例提供的一种链路发现装置的示意图;FIG10 is a schematic diagram of a link discovery device provided in an embodiment of the present application;

图11是本申请实施例提供的另一种链路发现装置的示意图;11 is a schematic diagram of another link discovery device provided in an embodiment of the present application;

图12是本申请实施例提供的再一种链路发现装置的示意图。FIG. 12 is a schematic diagram of another link discovery device provided in an embodiment of the present application.

具体实施方式Detailed ways

下面将结合附图对本申请实施方式作进一步地描述。The implementation methods of the present application will be further described below in conjunction with the accompanying drawings.

跨域链路指的是不同网络域之间的通信链路。例如,光网络域与互联网协议(internet protocol,IP)网络域之间的通信链路就是一种跨域链路,该跨域链路也称为尾纤。A cross-domain link refers to a communication link between different network domains. For example, the communication link between the optical network domain and the Internet Protocol (IP) network domain is a cross-domain link, which is also called a pigtail.

在通信网络的网络维护、故障处理、网络割接等过程中,往往需要获取该通信网络的网络拓扑,这就需要控制器发现该通信网络中的跨域链路。在传统的网络维护中,往往在通信网络的建网初期,由工作人员使用文档记录该通信网络中的跨域链路。但是,工作人员记录的误差较大,例如容易出现记录错误、遗漏记录一些跨域链路等,导致在后续网络维护、故障处理、网络割接等阶段需要花费很多时间确认跨域链路。并且若网络规模较大,工作人员记录跨域链路的工作量较大导致该文档维护难度较大,甚至无法维护。In the process of network maintenance, troubleshooting, network cutover, etc. of the communication network, it is often necessary to obtain the network topology of the communication network, which requires the controller to discover the cross-domain links in the communication network. In traditional network maintenance, staff often use documents to record the cross-domain links in the communication network in the early stage of network construction. However, the errors recorded by the staff are large, such as recording errors and omissions in recording some cross-domain links, which results in a lot of time required to confirm cross-domain links in subsequent network maintenance, troubleshooting, network cutover and other stages. And if the network scale is large, the workload of the staff to record cross-domain links is large, which makes the document maintenance difficult or even impossible to maintain.

目前,存在多种能够用于发现跨域链路的链路发现方案,包括基于LLDP的链路发现方案、基于端口流量统计的链路发现方案和基于端口告警的链路发现方案等。下面分别介绍。Currently, there are a variety of link discovery solutions that can be used to discover cross-domain links, including LLDP-based link discovery solutions, port traffic statistics-based link discovery solutions, and port alarm-based link discovery solutions, which are introduced below.

在基于LLDP的链路发现方案中,通过LLDP发现跨域链路。但是,该链路发现方案需要不同网络域中的网络设备都支持LLDP,导致该链路发现方案的应用场景受限,普适性较差。例如,若通过LLDP发现光网络域与IP网络域之间的跨域链路,则需要光网络设备的客户侧单板(也即光网络设备中用于连接IP网络域的单板)支持LLDP,目前仅少数光网络设备的客户侧单板支持LLDP,大部分光网络设备的客户侧单板不支持LLDP,导致基于LLDP的链路发现方案在大部分场景中不能用于发现光网络域与IP网络域之间的跨域链路。In the LLDP-based link discovery scheme, cross-domain links are discovered through LLDP. However, this link discovery scheme requires that network devices in different network domains support LLDP, which limits the application scenarios of the link discovery scheme and has poor universality. For example, if the cross-domain link between the optical network domain and the IP network domain is discovered through LLDP, the client-side board of the optical network device (that is, the board in the optical network device used to connect to the IP network domain) needs to support LLDP. Currently, only a few client-side boards of optical network devices support LLDP, and most client-side boards of optical network devices do not support LLDP, resulting in that the LLDP-based link discovery scheme cannot be used to discover the cross-domain link between the optical network domain and the IP network domain in most scenarios.

在基于端口流量统计的链路发现方案中,根据不同网络域中的不同网络端口(也即不同网络域中的网络设备的网络端口)在同一时间段内的网络流量分布发现跨域链路。但是,若多个不同网络端口在同一时间段内的网络流量分布一致或差异较小,则会导致发现跨域链路的难度较大,需要人工辅助判断,甚至导致无法跨域链路。In the link discovery solution based on port traffic statistics, cross-domain links are discovered based on the network traffic distribution of different network ports in different network domains (that is, the network ports of network devices in different network domains) in the same time period. However, if the network traffic distribution of multiple different network ports in the same time period is consistent or slightly different, it will be difficult to discover cross-domain links, requiring manual assistance in judgment, or even making it impossible to discover cross-domain links.

在基于端口告警的链路发现方案中,通过断开某一网络端口对应的通信链路并确定断开该通信链路之后发生告警的网络端口来发现跨域链路。例如,光网络设备的网络端口和IP网络设备的网络端口都设置有 激光器,通过关闭光网络设备的某一网络端口的激光器,并确定关闭该某一网络端口的激光器之后发生告警的IP网络端口(也即IP网络设备的网络端口),确定该某一网络端口与该发生告警的IP网络端口之间存在跨域链路。但是,断开网络端口对应的通信链路(例如关闭某一网络端口的激光器)容易影响该通信链路承载的业务的运行,例如,某一通信链路无保护链路(或称为备用链路、备份链路),断开该通信链路会导致该通信链路承载的业务中断。因此,该链路发现方案仅适用于通信链路存在保护链路的场景。In the link discovery scheme based on port alarm, the cross-domain link is discovered by disconnecting the communication link corresponding to a certain network port and determining the network port that generates an alarm after disconnecting the communication link. For example, the network port of the optical network device and the network port of the IP network device are both provided with Laser, by turning off the laser of a certain network port of the optical network device, and determining the IP network port (that is, the network port of the IP network device) where an alarm occurs after the laser of the certain network port is turned off, it is determined that there is a cross-domain link between the certain network port and the IP network port where the alarm occurs. However, disconnecting the communication link corresponding to the network port (for example, turning off the laser of a certain network port) is likely to affect the operation of the business carried by the communication link. For example, if a certain communication link has no protection link (or called a standby link or backup link), disconnecting the communication link will cause the business carried by the communication link to be interrupted. Therefore, this link discovery solution is only applicable to scenarios where there is a protection link in the communication link.

上述三种链路发现方案都有场景限制,普适性较差,通常需要结合实际网络情况选择上述三种链路发现方案中的不同链路发现方案来发现跨域链路。目前,由工作人员根据通信网络的网络情况在上述三种链路发现方案中选择链路发现方案来发现该通信网络中的跨域链路,这需要工作人员熟悉掌握该通信网络的网络情况,对工作人员的要求较高。例如,若基于LLDP的链路发现方案发现光网络域与IP网络域之间的跨域链路,需要工作人员熟知光网络域中的哪些网络设备支持LLDP。若基于端口流量统计的链路发现方案发现光网络域与IP网络域之间的跨域链路,需要工作人员熟知网络状况以辅助判断。若基于端口告警的链路发现方案发现光网络域与IP网络域之间的跨域链路,需要工作人员熟知哪些通信链路具备保护链路。The above three link discovery schemes are all scenario-limited and have poor universality. It is usually necessary to select different link discovery schemes from the above three link discovery schemes in combination with the actual network conditions to discover cross-domain links. At present, the staff selects the link discovery scheme from the above three link discovery schemes according to the network conditions of the communication network to discover the cross-domain links in the communication network. This requires the staff to be familiar with the network conditions of the communication network, which places high demands on the staff. For example, if the link discovery scheme based on LLDP discovers the cross-domain link between the optical network domain and the IP network domain, the staff needs to be familiar with which network devices in the optical network domain support LLDP. If the link discovery scheme based on port traffic statistics discovers the cross-domain link between the optical network domain and the IP network domain, the staff needs to be familiar with the network conditions to assist in judgment. If the link discovery scheme based on port alarms discovers the cross-domain link between the optical network domain and the IP network domain, the staff needs to be familiar with which communication links have protection links.

本申请提供了一种链路发现方案,可以基于时钟协议发现跨域链路,由于大部分网络设备都支持时钟协议,因此该链路发现方案可以应用于大部分网络场景,该链路发现方案的应用场景广泛,普适性较强,准确性较高。此外,在本申请中,由控制器根据网络端口支持的链路发现能力确定跨域链路的发现策略,并由网络设备执行该发现策略以发现跨域链路,确定跨域链路的发现策略的过程以及发现跨域链路的过程均无需人工参与,对工作人员的操作技能无要求。The present application provides a link discovery solution that can discover cross-domain links based on a clock protocol. Since most network devices support the clock protocol, the link discovery solution can be applied to most network scenarios. The link discovery solution has a wide range of application scenarios, strong universality, and high accuracy. In addition, in the present application, the controller determines the discovery strategy of the cross-domain link based on the link discovery capability supported by the network port, and the network device executes the discovery strategy to discover the cross-domain link. The process of determining the discovery strategy of the cross-domain link and the process of discovering the cross-domain link do not require human participation, and there is no requirement for the operating skills of the staff.

下面介绍本申请的技术方案,首先介绍本申请的应用场景。The technical solution of the present application is introduced below, and the application scenario of the present application is first introduced.

本申请的应用场景提供一种通信网络,该通信网络中包括至少两个网络域,该至少两个网络域通信连接。例如,该至少两个网络域之间部署有通信链路,使得该至少两个网络域通信连接。其中,该至少两个网络域中的每个网络域包括至少一个网络设备,该至少两个网络域通信连接也即是该至少两个网络域中的网络设备通信连接,该至少两个网络域之间的通信链路也即是该至少两个网络域中的网络设备之间的通信链路,该至少两个网络域之间的通信链路称为跨域链路。在本申请中,该至少两个网络域的网络类型不同,每个网络域的网络类型用于指示该网络域中的网络设备的类型,和/或,用于指示该网络域中的通信链路的类型。The application scenario of the present application provides a communication network, which includes at least two network domains, and the at least two network domains are communicatively connected. For example, a communication link is deployed between the at least two network domains, so that the at least two network domains are communicatively connected. Among them, each of the at least two network domains includes at least one network device, and the at least two network domains are communicatively connected, that is, the network devices in the at least two network domains are communicatively connected, and the communication link between the at least two network domains is also the communication link between the network devices in the at least two network domains, and the communication link between the at least two network domains is called a cross-domain link. In the present application, the network types of the at least two network domains are different, and the network type of each network domain is used to indicate the type of network device in the network domain, and/or, to indicate the type of communication link in the network domain.

一个示例中,该至少两个网络域包括光网络域和IP网络域,该光网络域和该IP网络域中分别包括多个网络设备,该光网络域中的网络设备通信连接,该IP网络域中的网络设备通信连接,该光网络域中的网络设备与该IP网络域中的网络设备通信连接。其中,该光网络域的网络类型是光网络类型,该光网络类型用于指示该光网络域中的网络设备是光网络设备,和/或,该光网络类型用于该光网络域中的通信链路是光纤链路。该IP网络域的网络类型为IP网络类型,该IP网络类型用于指示该IP网络域中的网络设备是IP网络设备,和/或,该IP网络类型用于指示该IP网络域中的通信链路是IP链路。示例的,该光网络域是OTN、同步数字体系(synchronous digital herarchy,SDH)网络等。光网络设备指的是支持光通信协议的网络设备,光纤链路指的是支持光通信协议的通信链路,光网络设备也称为光通信设备、波分设备、OTN设备、SDH设备等,例如光网络设备是OTN设备。IP网络设备指的是支持IP通信协议的网络设备,IP链路指的是支持IP通信协议的通信链路,IP网络设备也称为IP通信设备、数据通信设备、数通设备等,例如IP网络设备是支持IP通信协议的交换机、路由器等。In one example, the at least two network domains include an optical network domain and an IP network domain, and the optical network domain and the IP network domain respectively include a plurality of network devices, the network devices in the optical network domain are communicatively connected, the network devices in the IP network domain are communicatively connected, and the network devices in the optical network domain are communicatively connected with the network devices in the IP network domain. Among them, the network type of the optical network domain is an optical network type, and the optical network type is used to indicate that the network devices in the optical network domain are optical network devices, and/or, the optical network type is used for the communication link in the optical network domain to be an optical fiber link. The network type of the IP network domain is an IP network type, and the IP network type is used to indicate that the network devices in the IP network domain are IP network devices, and/or, the IP network type is used to indicate that the communication link in the IP network domain is an IP link. For example, the optical network domain is an OTN, a synchronous digital herarchy (SDH) network, etc. Optical network equipment refers to network equipment that supports optical communication protocols, and optical fiber links refer to communication links that support optical communication protocols. Optical network equipment is also called optical communication equipment, wavelength division equipment, OTN equipment, SDH equipment, etc. For example, optical network equipment is OTN equipment. IP network equipment refers to network equipment that supports IP communication protocols, and IP links refer to communication links that support IP communication protocols. IP network equipment is also called IP communication equipment, data communication equipment, data communication equipment, etc. For example, IP network equipment is switches and routers that support IP communication protocols.

另一个示例中,该至少两个网络域包括无线网络域和有线网络域,该无线网络域和该有线网络域中分别包括多个网络设备,该无线网络域中的网络设备通信连接,该有线网络域中的网络设备通信连接,该无线网络域中的网络设备与该有线网络域中的网络设备通信连接。In another example, the at least two network domains include a wireless network domain and a wired network domain, the wireless network domain and the wired network domain respectively include multiple network devices, the network devices in the wireless network domain are communicatively connected, the network devices in the wired network domain are communicatively connected, and the network devices in the wireless network domain are communicatively connected to the network devices in the wired network domain.

其中,该无线网络域的网络类型是无线网络类型,该无线网络类型用于指示该无线网络域中的网络设备是无线网络设备,和/或,该无线网络类型用于该无线网络域中的通信链路是无线链路。该有线网络域的网络类型为有线网络类型,该有线网络类型用于指示该有线网络域中的网络设备是有线网络设备,和/或,该有线网络类型用于指示该有线网络域中的通信链路是有线链路。示例的,该无线网络域是基站子系统,其中包括无线基站以及接入该无线基站的无线通信设备,无线网络设备指的是支持无线通信协议的网络设备,无线链路指的是支持无线通信协议的通信链路,例如无线网络设备是无线基站、无线网关等。该有线网络域可以是承载网,有线网络设备指的是支持有线通信协议的网络设备,有线链路指的是支持有线通信 协议的通信链路,有线网络设备也称为固网设备,有线网络设备可以是交换机、路由器等。Among them, the network type of the wireless network domain is a wireless network type, and the wireless network type is used to indicate that the network equipment in the wireless network domain is a wireless network equipment, and/or, the wireless network type is used for the communication link in the wireless network domain is a wireless link. The network type of the wired network domain is a wired network type, and the wired network type is used to indicate that the network equipment in the wired network domain is a wired network equipment, and/or, the wired network type is used to indicate that the communication link in the wired network domain is a wired link. For example, the wireless network domain is a base station subsystem, which includes a wireless base station and a wireless communication device connected to the wireless base station, the wireless network device refers to a network device that supports a wireless communication protocol, and the wireless link refers to a communication link that supports a wireless communication protocol, for example, the wireless network device is a wireless base station, a wireless gateway, etc. The wired network domain can be a bearer network, the wired network device refers to a network device that supports a wired communication protocol, and the wired link refers to a network device that supports a wired communication protocol. The communication link of the protocol, wired network equipment is also called fixed network equipment, and wired network equipment can be switches, routers, etc.

在本申请实施例中,该通信网络中还包括至少一个控制器,每个控制器与该通信网络中的至少一个网络设备通信连接,以对该至少一个网络设备进行控制。可选的,该至少一个控制器包括跨域控制器和至少两个域内控制器;每个域内控制器可以位于一个网络域内并与该网络域内的网络设备通信连接,以对该网络域内的网络设备进行控制;跨域控制器可以位于该至少两个网络域外,并与该至少两个域内控制器通信连接,以对该至少两个域内控制器进行控制,进而在该至少两个网络域之间进行协同控制。在本申请中,可以由该至少一个控制器与该至少两个网络域中的网络设备协同工作来发现该至少两个网络域之间的跨域链路。In an embodiment of the present application, the communication network also includes at least one controller, each controller is connected in communication with at least one network device in the communication network to control the at least one network device. Optionally, the at least one controller includes a cross-domain controller and at least two intra-domain controllers; each intra-domain controller can be located in a network domain and connected in communication with the network devices in the network domain to control the network devices in the network domain; the cross-domain controller can be located outside the at least two network domains and connected in communication with the at least two intra-domain controllers to control the at least two intra-domain controllers, thereby performing collaborative control between the at least two network domains. In the present application, the at least one controller can work in collaboration with the network devices in the at least two network domains to discover the cross-domain links between the at least two network domains.

示例的,图1是本申请实施例提供的一种通信网络的示意图。图1以该通信网络中包括网络域1和网络域2为例说明。网络域1中包括控制器100和网络设备101~102,控制器100与网络设备101~102通信连接,控制器100用于对网络设备101~102进行控制。网络域2中包括控制器200和网络设备201~202,控制器200与网络设备201~202通信连接,控制器200用于对网络设备201~202进行控制。该通信网络中还包括控制器300,控制器300与控制器100~200分别通信连接,控制器300用于对控制器100~200进行控制,以通过控制器100~200对网络设备101~102、201~202进行控制。如图1所示,网络设备P1-101(也即网络设备101的网络端口P1)与网络设备P2-201(也即网络设备201的网络端口P2)连接,网络端口P3-201(也即网络设备201的网络端口P3)与网络端口P4-202(也即网络设备202的网络端口P4)连接,网络端口P5-202(也即网络设备202的网络端口P5)与网络端口P6-102(也即网络设备102的网络端口P6)连接。网络设备101与网络设备201之间部署有通信链路L1,通信链路L1的一端为网络端口P1-101,另一端为网络端口P2-201。网络设备102与网络设备202之间部署有通信链路L2,通信链路L2的一端为网络端口P5-202,另一端为网络端口P6-102。通信链路L1和通信链路L2均是网络域1与网络域2之间的跨域链路。本申请中,由控制器100~300以及网络设备101~102、201~202协同工作来发现跨域链路L1和跨域链路L2。For example, Figure 1 is a schematic diagram of a communication network provided in an embodiment of the present application. Figure 1 takes the communication network including network domain 1 and network domain 2 as an example. Network domain 1 includes a controller 100 and network devices 101-102, and the controller 100 is communicatively connected to the network devices 101-102, and the controller 100 is used to control the network devices 101-102. Network domain 2 includes a controller 200 and network devices 201-202, and the controller 200 is communicatively connected to the network devices 201-202, and the controller 200 is used to control the network devices 201-202. The communication network also includes a controller 300, and the controller 300 is communicatively connected to the controllers 100-200 respectively, and the controller 300 is used to control the controllers 100-200, so as to control the network devices 101-102, 201-202 through the controllers 100-200. As shown in Figure 1, network device P1-101 (i.e., network port P1 of network device 101) is connected to network device P2-201 (i.e., network port P2 of network device 201), network port P3-201 (i.e., network port P3 of network device 201) is connected to network port P4-202 (i.e., network port P4 of network device 202), and network port P5-202 (i.e., network port P5 of network device 202) is connected to network port P6-102 (i.e., network port P6 of network device 102). A communication link L1 is deployed between network device 101 and network device 201, one end of the communication link L1 is network port P1-101, and the other end is network port P2-201. A communication link L2 is deployed between network device 102 and network device 202, one end of the communication link L2 is network port P5-202, and the other end is network port P6-102. Both the communication link L1 and the communication link L2 are cross-domain links between the network domain 1 and the network domain 2. In the present application, the controllers 100-300 and the network devices 101-102, 201-202 work together to discover the cross-domain link L1 and the cross-domain link L2.

可选的实施例中,控制器和网络设备协同工作基于时钟协议发现不同网络域之间的跨域链路,该通信网络中还包括时钟源,该时钟源可以位于某个网络设备中,也可以是单独部署并与至少一个网络设备通信连接。该时钟源可以基于时钟触发时钟协议报文,该时钟协议报文可以在该通信网络中传输,不同网络域中的网络设备可以基于该时钟协议报文获取链路发现信息,并将链路发现信息发送给控制器,控制器对不同网络域中的网络设备获取的链路发现信息进行分析以确定该不同网络域之间的跨域链路。本申请实施例以该时钟源单独部署为例说明。示例的,图2是本申请实施例提供的另一种通信网络的示意图。在图1的基础上,图2所示的通信网络中还包括时钟源400,时钟源400与网络设备101连接,时钟源400可以基于时钟触发网络设备101生成时钟协议报文。网络设备101生成该时钟协议报文之后向网络设备201发送该时钟协议报文,网络设备201接收到该时钟协议报文之后向网络设备202发送该时钟协议报文,网络设备202接收到该时钟协议报文之后向网络设备102发送该时钟协议报文。在该时钟协议报文传输的过程中,网络设备101、网络设备201、网络设备202和网络设备102分别基于该时钟协议报文获取链路发现信息,并通过控制器100或控制器200将获取的链路发现信息发送给控制器300,控制器300根据网络设备101、网络设备201、网络设备202和网络设备102获取的链路发现信息确定跨域链路L1和跨域链路L2。In an optional embodiment, the controller and the network device work together to discover cross-domain links between different network domains based on the clock protocol. The communication network also includes a clock source, which can be located in a certain network device or can be deployed separately and communicated with at least one network device. The clock source can trigger a clock protocol message based on a clock, and the clock protocol message can be transmitted in the communication network. Network devices in different network domains can obtain link discovery information based on the clock protocol message, and send the link discovery information to the controller. The controller analyzes the link discovery information obtained by network devices in different network domains to determine the cross-domain links between the different network domains. The embodiment of the present application is illustrated by the separate deployment of the clock source. For example, Figure 2 is a schematic diagram of another communication network provided in an embodiment of the present application. On the basis of Figure 1, the communication network shown in Figure 2 also includes a clock source 400, which is connected to the network device 101, and the clock source 400 can generate a clock protocol message based on the clock triggering network device 101. After the network device 101 generates the clock protocol message, it sends the clock protocol message to the network device 201. After receiving the clock protocol message, the network device 201 sends the clock protocol message to the network device 202. After receiving the clock protocol message, the network device 202 sends the clock protocol message to the network device 102. During the transmission of the clock protocol message, the network devices 101, 201, 202 and 102 respectively obtain link discovery information based on the clock protocol message, and send the obtained link discovery information to the controller 300 through the controller 100 or the controller 200. The controller 300 determines the cross-domain link L1 and the cross-domain link L2 according to the link discovery information obtained by the network devices 101, 201, 202 and 102.

示例的,时钟源400与网络端口P0-101(也即网络设备101的网络端口P0)连接,时钟源400基于第一时钟协议触发时钟协议报文A,时钟协议报文A的传输路径包括101->201->202->102。该传输路径上的每个网络设备在向该每个网络设备的下一跳设备发送该时钟协议报文A的过程中,该每个网络设备在该时钟协议报文A中封装该每个网络设备的发送该时钟协议报文A的网络端口的指示信息等,且该每个网络设备根据该时钟协议报文A获取链路发现信息。示例的,网络设备101通过网络端口P0-101接收时钟源400发送的时钟协议报文A,网络设备101在该时钟协议报文A中封装网络端口P1-101的指示信息“P1-101”之后通过网络端口P1-101向网络设备201发送该时钟协议报文A,并且网络设备101根据该时钟协议报文A获取链路发现信息1,该链路发现信息1包括网络设备101发送该时钟协议报文A的网络端口P1-101的指示信息“P1-101”。网络设备201通过网络端口P2-201接收网络设备101发送的该时钟协议报文A,网络设备201在该时钟协议报文A中封装网络端口P3-201的指示信息“P3-201”之后通过网络端口P3-201向网络设备202发送该时钟协议报文A,并且网络设备201根据该时钟协议报文A获取链路发现信息2,该链路发现信息2包括网络设备201接收该时钟协议报文A的网络端口P2-201的指示信息 “P2-101”以及网络端口P1-101与网络端口P2-201的对应关系“P1-101<—>P2-201”(网络设备201根据网络设备201接收时钟协议报文A的网络端口P2-201和网络设备201接收到的该时钟协议报文A中携带的网络端口P1-101的指示信息“P1-101”确定该对应关系)。网络设备202通过网络端口P4-202接收网络设备201发送的该时钟协议报文A,网络设备202在该时钟协议报文A中封装网络端口P5-202的指示信息“P5-202”之后通过网络端口P5-202向网络设备102发送该时钟协议报文A,并且网络设备202根据该时钟协议报文A获取链路发现信息3,该链路发现信息3包括网络设备202发送该时钟协议报文A的网络端口P5-202的指示信息“P5-202”。网络设备102通过网络端口P6-102接收网络设备202发送的该时钟协议报文A,网络设备102根据该时钟协议报文A获取链路发现信息4,该链路发现信息4包括网络设备102接收该时钟协议报文A的网络端口P6-102的指示信息“P6-102”以及网络端口P5-202与网络端口P6-102的对应关系“P5-202<—>P6-102”(网络设备102根据网络设备102接收该时钟协议报文A的网络端口P6-102和网络设备102接收到的该时钟协议报文A中携带的网络端口P5-202的指示信息“P5-202”确定该对应关系)。控制器300可以根据链路发现信息1包括的网络端口P1-101的指示信息“P1-101”确定网络端口P1-101,根据链路发现信息2包括的网络端口P2-201的指示信息“P2-101”确定网络端口P2-201,并根据链路发现信息2包括的对应关系“P1-101<—>P2-201”确定网络端口P1-101与网络端口P2-201对应,从而确定跨域链路L1。同理,控制器300可以根据链路发现信息3包括的网络端口P5-202的指示信息“P5-202”确定网络端口P5-202,根据链路发现信息4包括的网络端口P6-102的指示信息“P6-102”确定网络端口P6-102,并根据链路发现信息4包括的对应关系“P5-202<—>P6-102”确定网络端口P5-202与网络端口P6-102对应,从而确定跨域链路L2。For example, the clock source 400 is connected to the network port P0-101 (that is, the network port P0 of the network device 101), and the clock source 400 triggers the clock protocol message A based on the first clock protocol, and the transmission path of the clock protocol message A includes 101->201->202->102. In the process of each network device on the transmission path sending the clock protocol message A to the next hop device of each network device, each network device encapsulates the indication information of the network port of each network device sending the clock protocol message A in the clock protocol message A, and each network device obtains the link discovery information according to the clock protocol message A. For example, the network device 101 receives a clock protocol message A sent by the clock source 400 through the network port P0-101. The network device 101 encapsulates the indication information "P1-101" of the network port P1-101 in the clock protocol message A and then sends the clock protocol message A to the network device 201 through the network port P1-101. The network device 101 obtains link discovery information 1 based on the clock protocol message A. The link discovery information 1 includes the indication information "P1-101" of the network port P1-101 from which the network device 101 sends the clock protocol message A. The network device 201 receives the clock protocol message A sent by the network device 101 through the network port P2-201, and the network device 201 encapsulates the indication information "P3-201" of the network port P3-201 in the clock protocol message A, and then sends the clock protocol message A to the network device 202 through the network port P3-201, and the network device 201 obtains the link discovery information 2 according to the clock protocol message A, and the link discovery information 2 includes the indication information of the network port P2-201 at which the network device 201 receives the clock protocol message A "P2-101" and the correspondence between network port P1-101 and network port P2-201 "P1-101<—>P2-201" (network device 201 determines the correspondence based on network port P2-201 at which network device 201 receives clock protocol message A and indication information "P1-101" of network port P1-101 carried in the clock protocol message A received by network device 201). Network device 202 receives the clock protocol message A sent by network device 201 through network port P4-202. After encapsulating the indication information "P5-202" of network port P5-202 in the clock protocol message A, network device 202 sends the clock protocol message A to network device 102 through network port P5-202. Network device 202 obtains link discovery information 3 based on the clock protocol message A. The link discovery information 3 includes the indication information "P5-202" of network port P5-202 from which network device 202 sends the clock protocol message A. The network device 102 receives the clock protocol message A sent by the network device 202 through the network port P6-102. The network device 102 obtains the link discovery information 4 according to the clock protocol message A. The link discovery information 4 includes the indication information "P6-102" of the network port P6-102 through which the network device 102 receives the clock protocol message A and the correspondence between the network port P5-202 and the network port P6-102 "P5-202<—>P6-102" (the network device 102 determines the correspondence according to the network port P6-102 through which the network device 102 receives the clock protocol message A and the indication information "P5-202" of the network port P5-202 carried in the clock protocol message A received by the network device 102). The controller 300 can determine the network port P1-101 according to the indication information "P1-101" of the network port P1-101 included in the link discovery information 1, determine the network port P2-201 according to the indication information "P2-101" of the network port P2-201 included in the link discovery information 2, and determine that the network port P1-101 corresponds to the network port P2-201 according to the corresponding relationship "P1-101<—>P2-201" included in the link discovery information 2, thereby determining the cross-domain link L1. Similarly, the controller 300 can determine the network port P5-202 according to the indication information "P5-202" of the network port P5-202 included in the link discovery information 3, determine the network port P6-102 according to the indication information "P6-102" of the network port P6-102 included in the link discovery information 4, and determine that the network port P5-202 corresponds to the network port P6-102 according to the corresponding relationship "P5-202<—>P6-102" included in the link discovery information 4, thereby determining the cross-domain link L2.

需要说明的是,本申请提供的技术方案不仅可以发现跨域链路,还可以发现域内链路。例如,上述链路发现信息2还可以包括网络设备201发送该时钟协议报文A的网络端口P3-201的指示信息“P3-101”。上述链路发现信息3还可以包括网络设备202接收该时钟协议报文A的网络端口P4-202的指示信息“P4-202”以及网络端口P3-201与网络端口P4-202的对应关系“P3-201<—>P4-202”。控制器300可以根据链路发现信息2包括的网络端口P3-201的指示信息“P3-101”确定网络端口P3-201,根据链路发现信息3包括的网络端口P4-202的指示信息“P4-202”确定网络端口P4-202,并根据链路发现信息3包括的对应关系“P3-201<—>P4-202”确定网络端口P3-201与网络端口P4-202对应,从而确定网络设备201与网络设备202之间的通信链路,该通信链路为网络域2中的域内链路。It should be noted that the technical solution provided by the present application can not only discover cross-domain links, but also discover intra-domain links. For example, the above-mentioned link discovery information 2 may also include the indication information "P3-101" of the network port P3-201 of the network device 201 sending the clock protocol message A. The above-mentioned link discovery information 3 may also include the indication information "P4-202" of the network port P4-202 of the network device 202 receiving the clock protocol message A and the corresponding relationship between the network port P3-201 and the network port P4-202 "P3-201<—>P4-202". The controller 300 can determine the network port P3-201 according to the indication information "P3-101" of the network port P3-201 included in the link discovery information 2, determine the network port P4-202 according to the indication information "P4-202" of the network port P4-202 included in the link discovery information 3, and determine that the network port P3-201 corresponds to the network port P4-202 according to the corresponding relationship "P3-201<—>P4-202" included in the link discovery information 3, thereby determining the communication link between the network device 201 and the network device 202, which is an intra-domain link in the network domain 2.

可选的实施例中,在图1和图2所示的通信网络中,网络设备101和网络设备201属于同一个地理域,网络设备102和网络设备202属于同一个地理域,网络设备201与网络设备202可以属于不同地理域。这里所述的地理域可以是站点,例如是机房等。一个实施例中,网络域1和网络域2中的一个网络域是IP网络域,另一个网络域是光网络域,跨域链路L1和跨域链路L2均是光纤链路。例如,网络域1是IP网络域,网络域2是光网络域,跨域链路L1、跨域链路L2以及网络设备201与网络设备202之间的通信链路均是光纤链路。网络设备101和网络设备201可以部署在机房1中,网络设备102和网络设备202可以部署在机房2中,机房1中的网络设备201与机房2中的网络设备202通过光纤链路通信连接,使得网络设备201与网络设备202能够通信,从而机房1中的网络设备101与机房2的网络设备102能够通信。另一个实施例中,网络域1和网络域2中的一个网络域是无线网络域,另一个网络域是有线网络域,跨域链路L1和跨域链路L2均是有线链路。例如,网络域1是无线网络域,网络设备101是无线基站,网络域2是有线网络域,网络设备201是固网设备。In an optional embodiment, in the communication network shown in Figures 1 and 2, network device 101 and network device 201 belong to the same geographical domain, network device 102 and network device 202 belong to the same geographical domain, and network device 201 and network device 202 may belong to different geographical domains. The geographical domain described here may be a site, such as a computer room, etc. In one embodiment, one of network domains 1 and 2 is an IP network domain, and the other network domain is an optical network domain, and cross-domain link L1 and cross-domain link L2 are both optical fiber links. For example, network domain 1 is an IP network domain, network domain 2 is an optical network domain, and cross-domain link L1, cross-domain link L2, and the communication link between network device 201 and network device 202 are all optical fiber links. Network device 101 and network device 201 can be deployed in computer room 1, and network device 102 and network device 202 can be deployed in computer room 2. Network device 201 in computer room 1 and network device 202 in computer room 2 are connected by optical fiber link communication, so that network device 201 and network device 202 can communicate, and thus network device 101 in computer room 1 and network device 102 in computer room 2 can communicate. In another embodiment, one of network domains 1 and 2 is a wireless network domain, and the other network domain is a wired network domain, and cross-domain link L1 and cross-domain link L2 are both wired links. For example, network domain 1 is a wireless network domain, network device 101 is a wireless base station, network domain 2 is a wired network domain, and network device 201 is a fixed network device.

在本申请实施例中,控制器100~300中的每个控制器可以是部署在服务器中的功能模块,或者是一台服务器,或者由若干台服务器组成的服务器集群,或者是一个云计算服务中心。控制器100~300可以是三个不同的控制器,或者,控制器100~300中的至少两个是一台控制器,例如,控制器100和控制器200是同一台控制器,控制器300是另一台控制器;或者,控制器100、控制器200和控制器300是同一台控制器。一种实现方式中,控制器100~300中的部分或全部是部署在一台服务器中的功能模块;例如,控制器100~300是部署在同一台服务器中的三个功能模块,或者,控制器100~200是部署在同一台服务器中的两个功能模块,控制器300是部署在另一台服务器中的一个功能模块。另一种实现方式中,控制器100~300中的部分或全部分别是一台服务器;例如,控制器100~300分别是一台服务器,或者,控制器100~200分别是一台服务器,控制器300是部署在另一台服务器中的功能模块。再一种实现方式中,控制器100~300中的部分或全部分别是服务器集群,例如,控制器100~300分别是一个服务器集群,或者,控制器100~200 属于一个服务器集群,控制器300属于另一个服务器集群。在一些实施例中,控制器也称为管理器、网络管理器、网络控制器等。In an embodiment of the present application, each controller in the controllers 100-300 may be a functional module deployed in a server, or a server, or a server cluster consisting of several servers, or a cloud computing service center. The controllers 100-300 may be three different controllers, or at least two of the controllers 100-300 may be one controller, for example, the controller 100 and the controller 200 may be the same controller, and the controller 300 may be another controller; or, the controller 100, the controller 200 and the controller 300 may be the same controller. In one implementation, some or all of the controllers 100-300 may be functional modules deployed in one server; for example, the controllers 100-300 may be three functional modules deployed in the same server, or, the controllers 100-200 may be two functional modules deployed in the same server, and the controller 300 may be a functional module deployed in another server. In another implementation, part or all of the controllers 100-300 are servers; for example, the controllers 100-300 are servers, or the controllers 100-200 are servers, and the controller 300 is a functional module deployed in another server. In another implementation, part or all of the controllers 100-300 are server clusters, for example, the controllers 100-300 are servers, or the controllers 100-200 are servers. Belongs to one server cluster, and the controller 300 belongs to another server cluster. In some embodiments, the controller is also called a manager, a network manager, a network controller, etc.

在本申请实施例中,时钟源400支持至少一种时钟协议。例如,时钟源400支持电气与电子工程师协会(Institute of Electrical and Electronics Engineers,IEEE)1588协议和国际电信联盟电信标准化部门(ITU-T for ITU Telecommunication Standardization Sector,ITU-T)G.8275.1协议中的至少一种。IEEE1588协议是IEEE1588定义的一个能够在测量和控制系统中实现高精度时钟同步的协议。IEEE1588协议也称为1588协议或精确时间协议(precision time protocol,PTP),1588协议的全称为:网络测量和控制系统的精密时钟同步协议标准。ITU-TG.8275.1协议也称为G.8275.1协议,ITU-TG.8275.1协议定义了电信级全网精确时间同步协议(precision time protocol telecom profile for phase/time synchronization with full timing support from the network)。时钟源400可以基于该时钟源400支持的第一时钟协议触发上述时钟协议报文A,例如,第一时钟协议是IEEE1588 V2协议或ITU-TG.8275.1协议。可选的,时钟源400是大楼综合定时供给(building integrated timing supply,BITS)设备。In the embodiment of the present application, the clock source 400 supports at least one clock protocol. For example, the clock source 400 supports at least one of the Institute of Electrical and Electronics Engineers (IEEE) 1588 protocol and the International Telecommunication Union Telecommunication Standardization Sector (ITU-T for ITU Telecommunication Standardization Sector, ITU-T) G.8275.1 protocol. The IEEE 1588 protocol is a protocol defined by IEEE 1588 that can achieve high-precision clock synchronization in measurement and control systems. The IEEE 1588 protocol is also called the 1588 protocol or the precision time protocol (PTP). The full name of the 1588 protocol is: Precision Clock Synchronization Protocol Standard for Network Measurement and Control Systems. The ITU-TG.8275.1 protocol is also called the G.8275.1 protocol. The ITU-TG.8275.1 protocol defines a telecom profile for phase/time synchronization with full timing support from the network. The clock source 400 can trigger the clock protocol message A based on a first clock protocol supported by the clock source 400. For example, the first clock protocol is the IEEE1588 V2 protocol or the ITU-TG.8275.1 protocol. Optionally, the clock source 400 is a building integrated timing supply (BITS) device.

需要说明的是,图1和图2为了便于表示,示出了两个网络域1和两个控制器100,该两个网络域1实际是同一个网络域,该两个控制器100实际是同一个控制器。此外,图1和图2所示通信网络仅用于举例,并非用于限制本申请实施例的技术方案,在实际实现过程中,可以根据需要配置该通信网络中的网络设备的数量、控制器的数量、网络域的数量、时钟源的数量以及不同设备之间的连接关系,本申请实施例对此不做限定。It should be noted that, for the sake of convenience, FIG. 1 and FIG. 2 show two network domains 1 and two controllers 100, and the two network domains 1 are actually the same network domain, and the two controllers 100 are actually the same controller. In addition, the communication network shown in FIG. 1 and FIG. 2 is only used for example, and is not used to limit the technical solution of the embodiment of the present application. In the actual implementation process, the number of network devices, the number of controllers, the number of network domains, the number of clock sources, and the connection relationship between different devices in the communication network can be configured as needed, and the embodiment of the present application does not limit this.

以上是对本申请应用场景的介绍,下面介绍本申请的链路发现方法的实施例。为了便于描述,在下文的一些描述中将基于第一时钟协议的报文称为第一时钟协议报文,将基于第一发现协议的报文称为第一发现协议报文。The above is an introduction to the application scenario of the present application. The following is an embodiment of the link discovery method of the present application. For ease of description, in some of the following descriptions, the message based on the first clock protocol is referred to as the first clock protocol message, and the message based on the first discovery protocol is referred to as the first discovery protocol message.

请参考图3,其示出了本申请实施例提供的一种链路发现方法的流程图。该链路发现方法应用于包括控制器、第一网络域和第二网络域的通信网络,第一网络域的网络类型与第二网络域的网络类型不同,该链路发现方法由该控制器执行。例如,该通信网络如图1或图2所示,第一网络域和第二网络域中的一个网络域是网络域1,另一个网络域是网络域2,该控制器是控制器300。参见图3,该链路发现方法包括如下步骤S301至S302。Please refer to Figure 3, which shows a flow chart of a link discovery method provided by an embodiment of the present application. The link discovery method is applied to a communication network including a controller, a first network domain and a second network domain, the network type of the first network domain is different from the network type of the second network domain, and the link discovery method is executed by the controller. For example, the communication network is shown in Figure 1 or Figure 2, one of the first network domain and the second network domain is network domain 1, the other network domain is network domain 2, and the controller is controller 300. Referring to Figure 3, the link discovery method includes the following steps S301 to S302.

S301.控制器获取第一发现信息和第二发现信息,第一发现信息是第一网络设备基于时钟协议报文B获取的第一链路的发现信息,第二发现信息是第二网络设备基于该时钟协议报文B获取的第一链路的发现信息,第一网络设备在第一网络域中,第二网络设备在第二网络域中,第一网络域的网络类型与第二网络域的网络类型不同,第一链路是第一网络设备的第一端口与第二网络设备的第二端口之间的跨域链路。S301. The controller obtains first discovery information and second discovery information, the first discovery information is the discovery information of the first link obtained by the first network device based on the clock protocol message B, and the second discovery information is the discovery information of the first link obtained by the second network device based on the clock protocol message B. The first network device is in the first network domain, and the second network device is in the second network domain. The network type of the first network domain is different from the network type of the second network domain, and the first link is a cross-domain link between the first port of the first network device and the second port of the second network device.

控制器接收第一发现信息和第二发现信息,或者,控制器主动收集第一发现信息和第二发现信息。示例的,该控制器是跨域控制器,该跨域控制器接收第一控制器发送的第一发现信息,以及,该跨域控制器接收第二控制器发送的第二发现信息,第一控制器是第一网络域的控制器,第二控制器是第二网络域的控制器。例如,第一控制器位于第一网络域中,第二控制器位于第二网络域中。该跨域控制器、第一控制器和第二控制器可以是三个不同的控制器(也即三个各自独立的控制器)。或者,该跨域控制器、第一控制器和第二控制器中的至少两个是一台控制器。第一网络域的网络类型与第二网络域的网络类型不同;一个示例中,第一网络域和第二网络域中的一个网络域是光网络域,另一个网络域是IP网络域;另一个示例中,第一网络域和第二网络域中的一个网络域是无线网络域,另一个网络域是有线网络域。The controller receives the first discovery information and the second discovery information, or the controller actively collects the first discovery information and the second discovery information. For example, the controller is a cross-domain controller, the cross-domain controller receives the first discovery information sent by the first controller, and the cross-domain controller receives the second discovery information sent by the second controller, the first controller is a controller of the first network domain, and the second controller is a controller of the second network domain. For example, the first controller is located in the first network domain, and the second controller is located in the second network domain. The cross-domain controller, the first controller, and the second controller can be three different controllers (that is, three independent controllers). Or, at least two of the cross-domain controller, the first controller, and the second controller are one controller. The network type of the first network domain is different from the network type of the second network domain; in one example, one of the first network domain and the second network domain is an optical network domain, and the other network domain is an IP network domain; in another example, one of the first network domain and the second network domain is a wireless network domain, and the other network domain is a wired network domain.

通信网络中的不同网络设备可以通过传输时钟协议报文B进行时钟同步。第一网络设备和第二网络设备是该通信网络中的两个网络设备,因此第一网络设备和第二网络设备可以传输该时钟协议报文B。第一网络设备在传输(例如发送或接收)时钟协议报文B的过程中可以基于该时钟协议报文B获取第一发现信息。第二网络设备在传输(例如发送或接收)时钟协议报文B的过程中可以基于该时钟协议报文B获取第二发现信息。一个实施例中,第一网络设备获取第一发现信息之后向第一控制器发送第一发现信息,第一控制器向跨域控制器发送第一发现信息;第二网络设备获取第二发现信息之后向第二控制器发送第二发现信息,第二控制器向跨域控制器发送第二发现信息。另一个实施例中,第一控制器周期性从第一网络设备收集链路发现信息(例如第一发现信息),并向跨域控制器发送第一发现信息;第二控制器周期性从第二网络设备收集链路发现信息(例如第二发现信息),并向跨域控制器发送第二发现信息。第一控制器和第 二控制器收集链路发现信息的周期可以等于时钟协议报文的发送周期。可选的,第一网络设备通过边界网关协议(border gateway protocol,BGP)、网络配置协议(network configuration protocol,NETCONF)、路径计算单元通信协议(path computation element communication protocol,PCEP)、遥测(telemetry)协议、Qx协议(主机软件与网管设备之间通信的协议)或其他私有协议向第一控制器发送第一发现信息;和/或,第二网络设备通过BGP、NETCONF、PCEP、telemetry协议、Qx协议或其他私有协议向第二控制器发送第二发现信息,本申请实施例对此不做限定。Different network devices in a communication network can synchronize their clocks by transmitting clock protocol message B. The first network device and the second network device are two network devices in the communication network, so the first network device and the second network device can transmit the clock protocol message B. The first network device can obtain first discovery information based on the clock protocol message B during the process of transmitting (e.g., sending or receiving) the clock protocol message B. The second network device can obtain second discovery information based on the clock protocol message B during the process of transmitting (e.g., sending or receiving) the clock protocol message B. In one embodiment, after the first network device obtains the first discovery information, it sends the first discovery information to the first controller, and the first controller sends the first discovery information to the cross-domain controller; after the second network device obtains the second discovery information, it sends the second discovery information to the second controller, and the second controller sends the second discovery information to the cross-domain controller. In another embodiment, the first controller periodically collects link discovery information (e.g., first discovery information) from the first network device, and sends the first discovery information to the cross-domain controller; the second controller periodically collects link discovery information (e.g., second discovery information) from the second network device, and sends the second discovery information to the cross-domain controller. The first controller and the second network device can periodically collect link discovery information (e.g., second discovery information) from the second network device, and send the second discovery information to the cross-domain controller. The period for the second controller to collect link discovery information can be equal to the period for sending clock protocol messages. Optionally, the first network device sends the first discovery information to the first controller via the border gateway protocol (BGP), the network configuration protocol (NETCONF), the path computation element communication protocol (PCEP), the telemetry protocol, the Qx protocol (a protocol for communication between the host software and the network management device), or other private protocols; and/or, the second network device sends the second discovery information to the second controller via BGP, NETCONF, PCEP, the telemetry protocol, the Qx protocol, or other private protocols, which is not limited in the embodiments of the present application.

在本申请实施例中,第一发现信息包括第一网络设备的第一端口的指示信息,第二发现信息包括第二网络设备的第二端口的指示信息,第一发现信息和第二发现信息中的至少一个发现信息包括第一端口与第二端口的对应关系。例如,第一端口与第二端口的对应关系是第一端口的指示信息与第二端口的指示信息的对应关系。一个实施例中,第一端口的指示信息是第一端口的端口标识,第二端口的指示信息是第二端口的端口标识,第一发现信息还可以包括第一网络设备的指示信息以指示第一网络设备,从而第一发现信息指示第一端口属于第一网络设备,第二发现信息还可以包括第二网络设备的指示信息以指示第二网络设备,从而第二发现信息指示第二端口属于第二网络设备。例如图1或图2所示,第一网络设备是网络设备101,第一端口是网络端口P1,第二网络设备是网络设备201,第二端口是网络端口P2,则第一发现信息包括第一端口的指示信息“P1”和第一网络设备的指示信息“101”,第二发现信息包括第二端口的指示信息“P2”和第二网络设备的指示信息“201”。另一个实施例中,第一端口的指示信息中包括第一网络设备的指示信息和第一端口的端口标识(例如第一端口的指示信息由第一网络设备的指示信息和第一端口的端口标识组成),第一端口的指示信息既用于指示第一端口,又用于指示第一端口属于第一网络设备;第二端口的指示信息中包括第二网络设备的指示信息和第二端口的端口标识(例如第二端口的指示信息由第二网络设备的指示信息和第二端口的端口标识组成),第二端口的指示信息既用于指示第二端口,又用于指示第二端口属于第二网络设备。例如图1或图2所示,第一网络设备是网络设备101,第一端口是网络端口P1,第二网络设备是网络设备201,第二端口是网络端口P2,则第一发现信息包括第一端口的指示信息“P1-101”,第二发现信息包括第二端口的指示信息“P2-201”,第一端口的指示信息由第一网络设备的指示信息“101”和第一端口的端口标识“P1”构成,第二端口的指示信息由第二网络设备的指示信息“201”和第二端口的端口标识“P2”构成。以上关于端口指示信息(例如第一端口的指示信息)和设备指示信息(例如第一网络设备的指示信息)的描述仅作为示例,端口指示信息可以是端口号、端口的媒体访问控制(media access control,MAC)地址等任何能够用于指示端口的标识信息。设备指示信息可以是设备标识,例如是设备的地址、设备的序列号等任何能够用于指示网络设备的标识信息。In an embodiment of the present application, the first discovery information includes indication information of a first port of a first network device, the second discovery information includes indication information of a second port of a second network device, and at least one of the first discovery information and the second discovery information includes a correspondence between the first port and the second port. For example, the correspondence between the first port and the second port is a correspondence between the indication information of the first port and the indication information of the second port. In one embodiment, the indication information of the first port is a port identifier of the first port, and the indication information of the second port is a port identifier of the second port. The first discovery information may also include indication information of the first network device to indicate the first network device, so that the first discovery information indicates that the first port belongs to the first network device, and the second discovery information may also include indication information of the second network device to indicate the second network device, so that the second discovery information indicates that the second port belongs to the second network device. For example, as shown in FIG. 1 or FIG. 2, the first network device is network device 101, the first port is network port P1, the second network device is network device 201, and the second port is network port P2, then the first discovery information includes the indication information "P1" of the first port and the indication information "101" of the first network device, and the second discovery information includes the indication information "P2" of the second port and the indication information "201" of the second network device. In another embodiment, the indication information of the first port includes the indication information of the first network device and the port identifier of the first port (for example, the indication information of the first port is composed of the indication information of the first network device and the port identifier of the first port), and the indication information of the first port is used to indicate the first port and to indicate that the first port belongs to the first network device; the indication information of the second port includes the indication information of the second network device and the port identifier of the second port (for example, the indication information of the second port is composed of the indication information of the second network device and the port identifier of the second port), and the indication information of the second port is used to indicate the second port and to indicate that the second port belongs to the second network device. For example, as shown in FIG. 1 or FIG. 2, the first network device is network device 101, the first port is network port P1, the second network device is network device 201, and the second port is network port P2, then the first discovery information includes the indication information "P1-101" of the first port, and the second discovery information includes the indication information "P2-201" of the second port. The indication information of the first port is composed of the indication information "101" of the first network device and the port identifier "P1" of the first port, and the indication information of the second port is composed of the indication information "201" of the second network device and the port identifier "P2" of the second port. The above description of the port indication information (such as the indication information of the first port) and the device indication information (such as the indication information of the first network device) is only for example, and the port indication information can be any identification information that can be used to indicate the port, such as the port number, the media access control (MAC) address of the port. The device indication information can be a device identification, such as the address of the device, the serial number of the device, and any identification information that can be used to indicate the network device.

一个实施例中,第一网络设备和第二网络设备是时钟协议报文B的传输路径上的两个网络设备,且第二网络设备是第一网络设备的下一跳设备。第一网络设备通过第一端口向第二网络设备发送时钟协议报文B,第二网络设备通过第二端口接收该时钟协议报文B,则第一端口是第一网络设备发送该时钟协议报文B的网络端口,第二端口是第二网络设备接收该时钟协议报文B的网络端口,第一网络设备向第二网络设备发送的该时钟协议报文B中携带第一端口的指示信息。第一网络设备根据第一网络设备发送该时钟协议报文B的网络端口(也即第一端口)生成第一发现信息,第二网络设备根据第二网络设备接收该时钟协议报文B的网络端口(也即第二端口)以及该时钟协议报文B携带的第一端口的指示信息生成第二发现信息,第一发现信息包括第一端口的指示信息,第二发现信息包括第二端口的指示信息以及第一端口与第二端口的对应关系。以第一端口的指示信息包括第一网络设备的指示信息和第一端口的端口标识,第二端口的指示信息包括第二网络设备的指示信息和第二端口的端口标识为例说明。如图1或图2所示,第一网络设备是网络设备101,第一端口是网络端口P1,第二网络设备是网络设备201,第二端口是网络端口P2,则第一发现信息包括第一端口的指示信息“P1-101”,第二发现信息包括第二端口的指示信息“P2-201”以及第一端口的指示信息“P1-101”与第二端口的指示信息“P2-201”的对应关系“P1-101<—>P2-201”。In one embodiment, the first network device and the second network device are two network devices on the transmission path of the clock protocol message B, and the second network device is the next hop device of the first network device. The first network device sends the clock protocol message B to the second network device through the first port, and the second network device receives the clock protocol message B through the second port. Then the first port is the network port through which the first network device sends the clock protocol message B, and the second port is the network port through which the second network device receives the clock protocol message B. The clock protocol message B sent by the first network device to the second network device carries the indication information of the first port. The first network device generates the first discovery information according to the network port (that is, the first port) through which the first network device sends the clock protocol message B, and the second network device generates the second discovery information according to the network port (that is, the second port) through which the second network device receives the clock protocol message B and the indication information of the first port carried by the clock protocol message B. The first discovery information includes the indication information of the first port, and the second discovery information includes the indication information of the second port and the corresponding relationship between the first port and the second port. Take the example that the indication information of the first port includes the indication information of the first network device and the port identifier of the first port, and the indication information of the second port includes the indication information of the second network device and the port identifier of the second port. As shown in FIG1 or FIG2, the first network device is the network device 101, the first port is the network port P1, the second network device is the network device 201, and the second port is the network port P2, then the first discovery information includes the indication information "P1-101" of the first port, the second discovery information includes the indication information "P2-201" of the second port, and the corresponding relationship "P1-101<—>P2-201" between the indication information "P1-101" of the first port and the indication information "P2-201" of the second port.

另一个实施例中,第一网络设备和第二网络设备是时钟协议报文B的传输路径上的两个网络设备,且第一网络设备是第二网络设备的下一跳设备。第二网络设备通过第二端口向第一网络设备发送时钟协议报文B,第一网络设备通过第一端口接收该时钟协议报文B,则第二端口是第二网络设备发送该时钟协议报文B的网络端口,第一端口是第一网络设备接收该时钟协议报文B的网络端口,第二网络设备向第一网络设备发送的该时钟协议报文B中携带第二端口的指示信息。第二网络设备根据第二网络设备发送该时钟协议报文B的网络端口(也即第二端口)生成第二发现信息,第一网络设备根据第一网络设备接收该时钟协 议报文B的网络端口(也即第一端口)以及该时钟协议报文B携带的第二端口的指示信息生成第一发现信息,第一发现信息包括第一端口的指示信息以及第一端口与第二端口的对应关系,第二发现信息包括第二端口的指示信息。以第一端口的指示信息包括第一网络设备的指示信息和第一端口的端口标识,第二端口的指示信息包括第二网络设备的指示信息和第二端口的端口标识为例说明。如图1或图2所示,第一网络设备是网络设备101,第一端口是网络端口P1,第二网络设备是网络设备201,第二端口是网络端口P2,则第一发现信息包括第一端口的指示信息“P1-101”以及第一端口的指示信息“P1-101”与第二端口的指示信息“P2-201”的对应关系“P1-101<—>P2-201”,第二发现信息包括第二端口的指示信息“P2-201”。In another embodiment, the first network device and the second network device are two network devices on the transmission path of the clock protocol message B, and the first network device is the next-hop device of the second network device. The second network device sends the clock protocol message B to the first network device through the second port, and the first network device receives the clock protocol message B through the first port. The second port is the network port through which the second network device sends the clock protocol message B, and the first port is the network port through which the first network device receives the clock protocol message B. The clock protocol message B sent by the second network device to the first network device carries the indication information of the second port. The second network device generates the second discovery information according to the network port (i.e., the second port) through which the second network device sends the clock protocol message B, and the first network device generates the second discovery information according to the network port (i.e., the second port) through which the first network device receives the clock protocol message B. The first discovery information is generated based on the network port (i.e., the first port) of the clock protocol message B and the indication information of the second port carried by the clock protocol message B. The first discovery information includes the indication information of the first port and the corresponding relationship between the first port and the second port, and the second discovery information includes the indication information of the second port. Take the example that the indication information of the first port includes the indication information of the first network device and the port identifier of the first port, and the indication information of the second port includes the indication information of the second network device and the port identifier of the second port. As shown in FIG. 1 or FIG. 2, the first network device is the network device 101, the first port is the network port P1, the second network device is the network device 201, and the second port is the network port P2. Then, the first discovery information includes the indication information "P1-101" of the first port and the corresponding relationship "P1-101<—>P2-201" between the indication information "P1-101" of the first port and the indication information "P2-201" of the second port, and the second discovery information includes the indication information "P2-201" of the second port.

本申请中的时钟协议报文B是基于第一时钟协议的报文(也即第一时钟协议报文),第一时钟协议是IEEE1588协议、ITU-TG.8275.1协议等任何可能的时钟协议。该时钟协议报文B的源端(或称为构造者)可以是时钟源或网络设备(例如第一网络设备或第二网络设备)。示例的,第一时钟协议是IEEE1588协议,时钟协议报文B也称为PTP报文,该时钟协议报文B的报文头也称为PTP报头,该PTP报头中包括源端口标识(source port identity)字段,该时钟协议报文B沿途的每个网络设备在向该每个网络设备的下一跳设备发送该时钟协议报文B的过程中,该每个网络设备在该源端口标识字段中添加该每个网络设备的发送该时钟协议报文B的网络端口的指示信息、该每个网络设备的指示信息等,例如将该源端口标识字段中携带的信息替换为该每个网络设备的发送该时钟协议报文B的网络端口的指示信息、该每个网络设备的指示信息等。在第二网络设备是第一网络设备的下一跳设备的实施例中,第一网络设备向第二网络设备发送的时钟协议报文B中,第一端口的指示信息位于该源端口标识字段中。在第一网络设备是第二网络设备的下一跳设备的实施例中,第二网络设备向第一网络设备发送的时钟协议报文B中,第二端口的指示信息位于该源端口标识字段中。示例的,该PTP报头的结构如图4所示。该PTP报头包括如下字段:传输特性(transport specific)、消息类型(message type)、预留(reserved)、PTP版本(version PTP)、消息长度(message length)、域序列号(domain number)、标志域(flag field)、修正域(correction field)、源端口标识(source port identity)、序列标识(sequence ID)、控制域(control field)、对数报文间隔(log message interval)。在图4中:与该PTP报头中的每一行对应的长度值表示该每一行字段的长度,该长度值的单位为字节(octets);与该PTP报头中的每一行对应的偏移(offset)量表示该每一行字段的起始位置距离该PTP报头所在的时钟协议报文的首字节的偏移量,该偏移量的单位为字节。源端口标识字段的长度为10字节,源端口标识字段用于携带时钟协议报文的发送端口的相关属性,例如第一网络设备通过第一端口向第二网络设备发送时钟协议报文B,第一网络设备发送出的该时钟协议报文B中该源端口标识字段携带第一端口的指示信息。图4中传输特性、消息类型、PTP版本、消息长度、域序列号、标志域、修正域、序列标识、控制域、对数报文间隔等字段的含义请参考相关标准文档,这里不做赘述。The clock protocol message B in the present application is a message based on the first clock protocol (i.e., the first clock protocol message), and the first clock protocol is any possible clock protocol such as the IEEE1588 protocol, the ITU-TG.8275.1 protocol, etc. The source end (or constructor) of the clock protocol message B can be a clock source or a network device (e.g., a first network device or a second network device). For example, the first clock protocol is the IEEE1588 protocol, the clock protocol message B is also called a PTP message, and the message header of the clock protocol message B is also called a PTP header, and the PTP header includes a source port identification (source port identity) field. In the process of each network device along the way of the clock protocol message B sending the clock protocol message B to the next hop device of each network device, each network device adds the indication information of the network port of each network device sending the clock protocol message B, the indication information of each network device, etc. in the source port identification field, for example, the information carried in the source port identification field is replaced with the indication information of the network port of each network device sending the clock protocol message B, the indication information of each network device, etc. In an embodiment where the second network device is a next-hop device of the first network device, in the clock protocol message B sent by the first network device to the second network device, the indication information of the first port is located in the source port identification field. In an embodiment where the first network device is a next-hop device of the second network device, in the clock protocol message B sent by the second network device to the first network device, the indication information of the second port is located in the source port identification field. For example, the structure of the PTP header is shown in FIG4. The PTP header includes the following fields: transport specific, message type, reserved, PTP version, message length, domain number, flag field, correction field, source port identity, sequence ID, control field, log message interval. In Figure 4: the length value corresponding to each line in the PTP header represents the length of each line of fields, and the unit of the length value is octets; the offset value corresponding to each line in the PTP header represents the offset of the starting position of each line of fields from the first byte of the clock protocol message where the PTP header is located, and the unit of the offset value is byte. The length of the source port identification field is 10 bytes, and the source port identification field is used to carry the relevant attributes of the sending port of the clock protocol message. For example, the first network device sends a clock protocol message B to the second network device through the first port, and the source port identification field in the clock protocol message B sent by the first network device carries the indication information of the first port. For the meaning of the fields such as transmission characteristics, message type, PTP version, message length, domain sequence number, flag field, correction field, sequence identification, control field, logarithmic message interval, etc. in Figure 4, please refer to the relevant standard documents, which will not be repeated here.

S302.控制器根据第一发现信息和第二发现信息确定第一链路。S302: The controller determines a first link according to the first discovery information and the second discovery information.

可选的实施例中,第一发现信息包括第一网络设备的第一端口的指示信息,第二发现信息包括第二网络设备的第二端口的指示信息,第一发现信息和第二发现信息中的至少一个发现信息包括该第一端口与该第二端口的对应关系。控制器根据该第一端口的指示信息确定第一网络设备的该第一端口,控制器根据该第二端口的指示信息确定第二网络设备的该第二端口,以及,控制器根据该第一端口与该第二端口的对应关系确定该第一端口与该第二端口对应。控制器确定第一端口与第二端口对应也即控制器确定第一端口与第二端口之间存在通信链路,该通信链路即为第一链路,第一链路是第一网络域与第二网络域之间的跨域链路。In an optional embodiment, the first discovery information includes indication information of the first port of the first network device, the second discovery information includes indication information of the second port of the second network device, and at least one of the first discovery information and the second discovery information includes the correspondence between the first port and the second port. The controller determines the first port of the first network device based on the indication information of the first port, the controller determines the second port of the second network device based on the indication information of the second port, and the controller determines that the first port corresponds to the second port based on the correspondence between the first port and the second port. The controller determines that the first port corresponds to the second port, that is, the controller determines that there is a communication link between the first port and the second port, and the communication link is the first link. The first link is a cross-domain link between the first network domain and the second network domain.

一个实施例中,第一端口的指示信息是第一端口的端口标识,第二端口的指示信息是第二端口的端口标识,第一发现信息还包括第一网络设备的指示信息,第二发现信息还包括第二网络设备的指示信息。控制器根据第一发现信息包括的第一网络设备的指示信息确定该第一网络设备,控制器根据第一发现信息包括的该第一端口的指示信息确定该第一端口,从而控制器根据第一发现信息确定第一端口属于第一网络设备(也即控制器根据第一发现信息确定第一网络设备的第一端口)。控制器根据第二发现信息包括的第二网络设备的指示信息确定该第二网络设备,控制器根据第二发现信息包括的该第二端口的指示信息确定该第二端口,从而控制器根据第二发现信息确定第二端口属于第二网络设备(也即控制器根据第二发现信息确定第二网络设备的第二端口)。以及,控制器根据第一发现信息和/或第二发现信息包括的第一端口与第二端口的对应关系确定第一网络设备的第一端口与第二网络设备的第二端口对应,从而控制器确定第一网络设备的第一端口与第二网络设备的第二端口之间存在跨域链路(即第一链路)。例如图1或图2所示, 第一网络设备是网络设备101,第一端口是网络端口P1,第二网络设备是网络设备201,第二端口是网络端口P2,第一发现信息包括第一端口的指示信息“P1”和第一网络设备的指示信息“101”,第二发现信息包括第二端口的指示信息“P2”和第二网络设备的指示信息“201”,且第二发现信息包括第一端口的指示信息“P1”与第二端口的指示信息“P2”的对应关系“P1<—>P2”。控制器根据第一发现信息包括的第一网络设备的指示信息“101”确定第一网络设备101,控制器根据第一发现信息包括的第一端口的指示信息“P1”确定第一端口P1,从而控制器根据第一发现信息确定第一端口P1属于第一网络设备101。控制器根据第二发现信息包括的第二网络设备的指示信息“201”确定第二网络设备201,控制器根据第二发现信息包括的第二端口的指示信息“P2”确定第二端口P2,从而控制器根据第二发现信息确定第二端口P2属于第二网络设备201。以及,控制器根据第二发现信息包括的第一端口的指示信息“P1”与第二端口的指示信息“P2”的对应关系“P1<—>P2”确定第一网络设备的第一端口P1与第二网络设备的第二端口P2对应。In one embodiment, the indication information of the first port is the port identifier of the first port, the indication information of the second port is the port identifier of the second port, the first discovery information also includes the indication information of the first network device, and the second discovery information also includes the indication information of the second network device. The controller determines the first network device according to the indication information of the first network device included in the first discovery information, and the controller determines the first port according to the indication information of the first port included in the first discovery information, so that the controller determines that the first port belongs to the first network device according to the first discovery information (that is, the controller determines the first port of the first network device according to the first discovery information). The controller determines the second network device according to the indication information of the second network device included in the second discovery information, and the controller determines the second port according to the indication information of the second port included in the second discovery information, so that the controller determines that the second port belongs to the second network device according to the second discovery information (that is, the controller determines the second port of the second network device according to the second discovery information). And, the controller determines that the first port of the first network device corresponds to the second port of the second network device according to the correspondence between the first port and the second port included in the first discovery information and/or the second discovery information, so that the controller determines that there is a cross-domain link (that is, the first link) between the first port of the first network device and the second port of the second network device. For example, as shown in Figure 1 or Figure 2, The first network device is the network device 101, the first port is the network port P1, the second network device is the network device 201, the second port is the network port P2, the first discovery information includes the indication information "P1" of the first port and the indication information "101" of the first network device, the second discovery information includes the indication information "P2" of the second port and the indication information "201" of the second network device, and the second discovery information includes the corresponding relationship "P1<—>P2" between the indication information "P1" of the first port and the indication information "P2" of the second port. The controller determines the first network device 101 according to the indication information "101" of the first network device included in the first discovery information, and the controller determines the first port P1 according to the indication information "P1" of the first port included in the first discovery information, so that the controller determines that the first port P1 belongs to the first network device 101 according to the first discovery information. The controller determines the second network device 201 according to the indication information "201" of the second network device included in the second discovery information, and the controller determines the second port P2 according to the indication information "P2" of the second port included in the second discovery information, so that the controller determines that the second port P2 belongs to the second network device 201 according to the second discovery information. And, the controller determines that the first port P1 of the first network device corresponds to the second port P2 of the second network device according to the correspondence relationship “P1<—>P2” between the indication information “P1” of the first port and the indication information “P2” of the second port included in the second discovery information.

另一个实施例中,第一端口的指示信息中包括第一网络设备的指示信息和第一端口的端口标识,第二端口的指示信息中包括第二网络设备的指示信息和第二端口的端口标识。控制器根据第一发现信息包括的该第一端口的指示信息确定第一端口且确定第一端口属于第一网络设备。控制器根据第二发现信息包括的该第二端口的指示信息确定第二端口且确定第二端口属于第二网络设备。以及,控制器根据第一发现信息和/或第二发现信息包括的第一端口与第二端口的对应关系确定第一网络设备的该第一端口与第二网络设备的该第二端口对应,从而控制器确定第一网络设备的第一端口与第二网络设备的第二端口之间存在跨域链路(即第一链路)。例如图1或图2所示,第一网络设备是网络设备101,第一端口是网络端口P1,第二网络设备是网络设备201,第二端口是网络端口P2,第一发现信息包括第一端口的指示信息“P1-101”,第二发现信息包括第二端口的指示信息“P2-201”以及第一端口的指示信息“P1-101”与第二端口的指示信息“P2-201”的对应关系“P1-101<—>P2-201”。控制器根据第一发现信息包括的该第一端口的指示信息“P1-101”确定第一网络设备101的第一端口P1;控制器根据第二发现信息包括的该第二端口的指示信息“P2-201”确定第二网络设备201的第二端口P2;以及,控制器根据第二发现信息包括的该第一端口的指示信息“P1-101”与该第二端口的指示信息“P2-201”的对应关系“P1-101<—>P2-201”确定第一网络设备(也即网络设备101)的第一端口P1与第二网络设备(也即网络设备201)的第二端口P2对应。In another embodiment, the indication information of the first port includes the indication information of the first network device and the port identifier of the first port, and the indication information of the second port includes the indication information of the second network device and the port identifier of the second port. The controller determines the first port according to the indication information of the first port included in the first discovery information and determines that the first port belongs to the first network device. The controller determines the second port according to the indication information of the second port included in the second discovery information and determines that the second port belongs to the second network device. And, the controller determines that the first port of the first network device corresponds to the second port of the second network device according to the correspondence between the first port and the second port included in the first discovery information and/or the second discovery information, so that the controller determines that there is a cross-domain link (i.e., the first link) between the first port of the first network device and the second port of the second network device. For example, as shown in Figure 1 or Figure 2, the first network device is network device 101, the first port is network port P1, the second network device is network device 201, the second port is network port P2, the first discovery information includes the indication information "P1-101" of the first port, the second discovery information includes the indication information "P2-201" of the second port, and the correspondence "P1-101<—>P2-201" between the indication information "P1-101" of the first port and the indication information "P2-201" of the second port. The controller determines the first port P1 of the first network device 101 according to the indication information "P1-101" of the first port included in the first discovery information; the controller determines the second port P2 of the second network device 201 according to the indication information "P2-201" of the second port included in the second discovery information; and, the controller determines that the first port P1 of the first network device (i.e., network device 101) corresponds to the second port P2 of the second network device (i.e., network device 201) according to the correspondence relationship "P1-101<—>P2-201" between the indication information "P1-101" of the first port and the indication information "P2-201" of the second port included in the second discovery information.

综上所述,本申请实施例提供的链路发现方法,第一网络域中的第一网络设备和第二网络域中的第二网络设备基于时钟协议报文获取链路发现信息,控制器根据第一网络设备和第二网络设备获取的链路发现信息确定第一网络设备的第一端口与第二网络设备的第二端口之间的跨域链路。也即,本申请实施例由控制器与网络设备协同工作基于时钟协议发现跨域链路。由于大部分的网络设备都支持时钟协议,例如,现网中90%的网络设备都支持时钟协议,因此本申请实施例提供的链路发现方案可以应用于大部分网络场景,该链路发现方案的应用场景广泛,普适性较强,且该链路发现方案发现跨域链路的准确性较高。In summary, in the link discovery method provided by the embodiment of the present application, the first network device in the first network domain and the second network device in the second network domain obtain link discovery information based on the clock protocol message, and the controller determines the cross-domain link between the first port of the first network device and the second port of the second network device based on the link discovery information obtained by the first network device and the second network device. That is, in the embodiment of the present application, the controller and the network device work together to discover cross-domain links based on the clock protocol. Since most network devices support the clock protocol, for example, 90% of the network devices in the existing network support the clock protocol, the link discovery solution provided by the embodiment of the present application can be applied to most network scenarios, the link discovery solution has a wide range of application scenarios, strong universality, and the link discovery solution has a high accuracy in discovering cross-domain links.

可选的实施例中,请参考图5,其示出了本申请实施例提供的另一种链路发现方法的流程图。如图5所示,在S301之前,该方法还包括如下步骤S303。In an optional embodiment, please refer to Figure 5, which shows a flow chart of another link discovery method provided in an embodiment of the present application. As shown in Figure 5, before S301, the method further includes the following step S303.

S303.控制器向第一网络设备和第二网络设备发送目标策略,该目标策略用于指示第一网络设备和第二网络设备基于第一时钟协议发现第一网络域与第二网络域之间的跨域链路。S303. The controller sends a target policy to the first network device and the second network device, where the target policy is used to instruct the first network device and the second network device to discover a cross-domain link between the first network domain and the second network domain based on the first clock protocol.

由于目标策略用于指示第一网络设备和第二网络设备基于第一时钟协议发现第一网络域与第二网络域之间的跨域链路,因此该目标策略也称为基于第一时钟协议的链路发现策略。S301中所述的时钟协议报文B是基于第一时钟协议的报文(也即第一时钟协议报文)。控制器向第一网络设备和第二网络设备发送目标策略之后,第一网络设备和第二网络设备在传输时钟协议报文B的过程中,第一网络设备和第二网络设备分别根据该目标策略,基于该时钟协议报文B获取链路发现信息,以发现第一网络域与第二网络域之间的跨域链路。Since the target policy is used to instruct the first network device and the second network device to discover the cross-domain link between the first network domain and the second network domain based on the first clock protocol, the target policy is also called a link discovery policy based on the first clock protocol. The clock protocol message B described in S301 is a message based on the first clock protocol (i.e., the first clock protocol message). After the controller sends the target policy to the first network device and the second network device, during the process of transmitting the clock protocol message B, the first network device and the second network device respectively obtain link discovery information based on the target policy and the clock protocol message B to discover the cross-domain link between the first network domain and the second network domain.

一个实施例中,该控制器是跨域控制器,该跨域控制器、第一控制器和第二控制器是三台各自独立的控制器,该跨域控制器通过第一控制器控制第一网络域,该跨域控制器通过第二控制器控制第二网络域。该跨域控制器通过第一控制器向第一网络设备发送目标策略,以及,该跨域控制器通过第二控制器向第二网络设备发送目标策略。示例的,该跨域控制器向第一控制器和第二控制器分别发送目标策略,第一控制器接收到该目标策略之后向第一网络设备发送该目标策略,第二控制器接收到目标策略之后向第二网络设备发送该目标策略。 In one embodiment, the controller is a cross-domain controller, and the cross-domain controller, the first controller, and the second controller are three independent controllers. The cross-domain controller controls the first network domain through the first controller, and the cross-domain controller controls the second network domain through the second controller. The cross-domain controller sends the target policy to the first network device through the first controller, and the cross-domain controller sends the target policy to the second network device through the second controller. For example, the cross-domain controller sends the target policy to the first controller and the second controller respectively, and after receiving the target policy, the first controller sends the target policy to the first network device, and after receiving the target policy, the second controller sends the target policy to the second network device.

另一个实施例中,该控制器是跨域控制器,该跨域控制器、第一控制器和第二控制器是同一台控制器,该跨域控制器直接控制第一网络域和第二网络域。该跨域控制器直接向第一网络设备发送目标策略,以及,该跨域控制器直接向第二网络设备发送目标策略。In another embodiment, the controller is a cross-domain controller, the cross-domain controller, the first controller and the second controller are the same controller, the cross-domain controller directly controls the first network domain and the second network domain, the cross-domain controller directly sends the target policy to the first network device, and the cross-domain controller directly sends the target policy to the second network device.

可选的实施例中,控制器向第一网络设备和第二网络设备发送用于指示目标策略的指示信息(本申请将用于指示目标策略的指示信息称为目标策略信息)。目标策略信息中可以包括第一时钟协议的指示信息(例如协议号)、第一网络设备的第一端口的指示信息、第二网络设备的第二端口的指示信息等。第一网络设备根据目标策略信息中包括的第一网络设备的第一端口的指示信息确定该第一端口,根据该目标策略信息中包括的第一时钟协议的指示信息确定第一时钟协议,第一网络设备在通过第一端口传输(例如发送或接收)第一时钟协议报文的过程中基于该第一时钟协议报文获取链路发现信息。同理,第二网络设备根据目标策略信息中包括的第二网络设备的第二端口的指示信息确定该第二端口,根据该目标策略信息中包括的第一时钟协议的指示信息确定第一时钟协议,第二网络设备在通过第二端口传输(例如发送或接收)第一时钟协议报文的过程中基于该第一时钟协议报文获取链路发现信息。In an optional embodiment, the controller sends indication information for indicating a target policy to the first network device and the second network device (the application refers to the indication information for indicating a target policy as target policy information). The target policy information may include indication information of the first clock protocol (e.g., protocol number), indication information of the first port of the first network device, indication information of the second port of the second network device, etc. The first network device determines the first port according to the indication information of the first port of the first network device included in the target policy information, determines the first clock protocol according to the indication information of the first clock protocol included in the target policy information, and the first network device obtains link discovery information based on the first clock protocol message in the process of transmitting (e.g., sending or receiving) the first clock protocol message through the first port. Similarly, the second network device determines the second port according to the indication information of the second port of the second network device included in the target policy information, determines the first clock protocol according to the indication information of the first clock protocol included in the target policy information, and the second network device obtains link discovery information based on the first clock protocol message in the process of transmitting (e.g., sending or receiving) the first clock protocol message through the second port.

可选的实施例中,控制器向第一网络设备和第二网络设备发送目标策略之前,该控制器根据第一网络设备的第一端口支持的链路发现能力和第二网络设备的第二端口支持的链路发现能力确定目标策略。请继续参考图5,在S303之前,该方法还包括如下步骤S304至S305。In an optional embodiment, before the controller sends the target policy to the first network device and the second network device, the controller determines the target policy according to the link discovery capability supported by the first port of the first network device and the link discovery capability supported by the second port of the second network device. Please continue to refer to Figure 5. Before S303, the method also includes the following steps S304 to S305.

S304.控制器获取第一能力信息和第二能力信息,第一能力信息用于指示第一网络设备的第一端口支持第一时钟协议,第二能力信息用于指示第二网络设备的第二端口支持第一时钟协议。S304. The controller obtains first capability information and second capability information, the first capability information is used to indicate that the first port of the first network device supports the first clock protocol, and the second capability information is used to indicate that the second port of the second network device supports the first clock protocol.

其中,第一能力信息中包括第一端口的能力信息,第一端口的能力信息用于指示第一端口支持第一时钟协议(也即第一端口支持的链路发现能力包括基于第一时钟协议的链路发现能力)。第二能力信息中包括第二端口的能力信息,第二端口的能力信息用于指示第二端口支持第一时钟协议(也即第二端口支持的链路发现能力包括基于第一时钟协议的链路发现能力)。例如,第一能力信息和第二能力信息中分别包括第一时钟协议的指示信息。The first capability information includes capability information of the first port, and the capability information of the first port is used to indicate that the first port supports the first clock protocol (that is, the link discovery capability supported by the first port includes the link discovery capability based on the first clock protocol). The second capability information includes capability information of the second port, and the capability information of the second port is used to indicate that the second port supports the first clock protocol (that is, the link discovery capability supported by the second port includes the link discovery capability based on the first clock protocol). For example, the first capability information and the second capability information respectively include indication information of the first clock protocol.

控制器可以接收第一能力信息和第二能力信息,或者,控制器主动收集第一能力信息和第二能力信息。例如,该控制器是跨域控制器,该跨域控制器接收第一控制器发送的第一能力信息,以及,该跨域控制器接收第二控制器发送的第二能力信息。可选的,第一网络设备实时、周期性或基于事件触发(例如第一端口的链路发现能力发生变化、第一网络域和/或第二网络域的网络拓扑发生变化)向第一控制器发送第一网络设备的端口能力信息(例如第一能力信息),第一控制器接收到第一网络设备的端口能力信息之后向该跨域控制器发送该端口能力信息。第二网络设备实时、周期性或基于事件触发(例如第二端口的链路发现能力发生变化、第一网络域和/或第二网络域的网络拓扑发生变化)向第二控制器发送第二网络设备的端口能力信息(例如第二能力信息),第二控制器接收到第二网络设备的端口能力信息之后向该跨域控制器发送该端口能力信息。示例的,第一网络设备通过BGP、NETCONF、PCEP、telemetry协议或其他私有协议向第一控制器发送第一能力信息;和/或,第二网络设备通过BGP、NETCONF、PCEP、telemetry协议、Qx协议或其他私有协议向第二控制器发送第一能力信息。其中,第一网络设备的端口能力信息中包括第一端口的能力信息,还可能包括第一网络设备的其他网络端口的能力信息;在这一实施例中,第一网络设备的端口能力信息中可以包括至少一组对应关系,该至少一组对应关系中的每组对应关系中包括第一网络设备的一个网络端口的指示信息和该一个网络端口的能力信息。同理,第二网络设备的端口能力信息中包括第二端口的能力信息,还可能包括第二网络设备的其他网络端口的能力信息;在这一实施例中,第二网络设备的端口能力信息中可以包括至少一组对应关系,该至少一组对应关系中的每组对应关系中包括第二网络设备的一个网络端口的指示信息和该一个网络端口的能力信息。The controller may receive the first capability information and the second capability information, or the controller actively collects the first capability information and the second capability information. For example, the controller is a cross-domain controller, the cross-domain controller receives the first capability information sent by the first controller, and the cross-domain controller receives the second capability information sent by the second controller. Optionally, the first network device sends the port capability information (e.g., the first capability information) of the first network device to the first controller in real time, periodically, or based on event triggering (e.g., the link discovery capability of the first port changes, the network topology of the first network domain and/or the second network domain changes), and the first controller sends the port capability information to the cross-domain controller after receiving the port capability information of the first network device. The second network device sends the port capability information (e.g., the second capability information) of the second network device to the second controller in real time, periodically, or based on event triggering (e.g., the link discovery capability of the second port changes, the network topology of the first network domain and/or the second network domain changes), and the second controller sends the port capability information to the cross-domain controller after receiving the port capability information of the second network device. For example, the first network device sends the first capability information to the first controller through BGP, NETCONF, PCEP, telemetry protocol or other private protocols; and/or, the second network device sends the first capability information to the second controller through BGP, NETCONF, PCEP, telemetry protocol, Qx protocol or other private protocols. Among them, the port capability information of the first network device includes the capability information of the first port, and may also include the capability information of other network ports of the first network device; in this embodiment, the port capability information of the first network device may include at least one set of correspondences, and each set of correspondences in the at least one set of correspondences includes the indication information of a network port of the first network device and the capability information of the one network port. Similarly, the port capability information of the second network device includes the capability information of the second port, and may also include the capability information of other network ports of the second network device; in this embodiment, the port capability information of the second network device may include at least one set of correspondences, and each set of correspondences in the at least one set of correspondences includes the indication information of a network port of the second network device and the capability information of the one network port.

S305.控制器根据第一能力信息和第二能力信息确定目标策略。S305: The controller determines a target strategy according to the first capability information and the second capability information.

控制器根据第一能力信息确定第一网络设备的第一端口支持第一时钟协议,控制器根据第二能力信息确定第二网络设备的第二端口支持第一时钟协议,控制器根据第一端口和第二端口均支持第一时钟协议确定目标策略,该目标策略为基于第一时钟协议的链路发现策略。The controller determines that the first port of the first network device supports the first clock protocol based on the first capability information, and the controller determines that the second port of the second network device supports the first clock protocol based on the second capability information. The controller determines a target policy based on that both the first port and the second port support the first clock protocol, and the target policy is a link discovery policy based on the first clock protocol.

可选的实施例中,控制器确定第一网络设备和第二网络设备处于同一站点(例如同一机房),控制器根据第一网络设备和第二网络设备处于同一站点以及第一端口和第二端口均支持第一时钟协议,确定目标策略为基于第一时钟协议的链路发现策略。In an optional embodiment, the controller determines that the first network device and the second network device are at the same site (for example, the same computer room), and the controller determines that the target strategy is a link discovery strategy based on the first clock protocol based on the fact that the first network device and the second network device are at the same site and that both the first port and the second port support the first clock protocol.

需要说明的是,一个网络端口可能支持多种链路发现能力,若控制器为同一站点中的某一跨域链路两 端的两个网络端口确定不同的链路发现策略,可能导致最终无法发现该跨域链路。因此,控制器确定目标策略时,控制器先确定第一网络设备和第二网络设备处于同一站点,进而控制器根据第一网络设备的第一端口和第二网络设备的第二端口均第一时钟协议确定目标策略。如此一来,控制器为同一站点中的同一跨域链路两端的两个网络端口确定相同的链路发现策略,该两个网络端口所在的网络设备能够根据该链路发现策略发现该跨域链路。It should be noted that a network port may support multiple link discovery capabilities. If the controller is a cross-domain link in the same site, The two network ports at the end determine different link discovery strategies, which may result in the inability to discover the cross-domain link in the end. Therefore, when the controller determines the target strategy, the controller first determines that the first network device and the second network device are in the same site, and then the controller determines the target strategy based on the first port of the first network device and the second port of the second network device. In this way, the controller determines the same link discovery strategy for the two network ports at both ends of the same cross-domain link in the same site, and the network devices where the two network ports are located can discover the cross-domain link according to the link discovery strategy.

请参考图6,其示出了本申请实施例提供的一种链路发现方法的交互图。如图6所示,该方法包括如下步骤S601至S617。Please refer to Figure 6, which shows an interaction diagram of a link discovery method provided by an embodiment of the present application. As shown in Figure 6, the method includes the following steps S601 to S617.

S601.第一网络设备向第一控制器发送第一能力信息,第一能力信息用于指示第一网络设备的第一端口支持第一时钟协议。S601. A first network device sends first capability information to a first controller, where the first capability information is used to indicate that a first port of the first network device supports a first clock protocol.

其中,第一网络设备在第一网络域中,第一控制器是第一网络域的控制器。The first network device is in the first network domain, and the first controller is the controller of the first network domain.

S602.第一控制器向跨域控制器发送第一能力信息。S602. The first controller sends first capability information to the cross-domain controller.

S603.第二网络设备向第二控制器发送第二能力信息,第二能力信息用于指示第二网络设备的第二端口支持第一时钟协议。S603. The second network device sends second capability information to the second controller, where the second capability information is used to indicate that the second port of the second network device supports the first clock protocol.

其中,第二网络设备在第二网络域中,第二控制器是第二网络域的控制器。第一网络域的网络类型与第二网络域的网络类型不同。例如,第一网络域和第二网络域中的一个网络域是光网络域,另一个网络域是IP网络域。The second network device is in the second network domain, and the second controller is a controller of the second network domain. The network type of the first network domain is different from the network type of the second network domain. For example, one of the first network domain and the second network domain is an optical network domain, and the other network domain is an IP network domain.

S604.第二控制器向跨域控制器发送第二能力信息。S604. The second controller sends second capability information to the cross-domain controller.

S605.跨域控制器根据第一能力信息和第二能力信息确定目标策略,该目标策略用于指示基于第一时钟协议发现第一网络域与第二网络域之间的跨域链路。S605. The cross-domain controller determines a target policy according to the first capability information and the second capability information, where the target policy is used to instruct to discover a cross-domain link between the first network domain and the second network domain based on the first clock protocol.

S606.跨域控制器向第一控制器和第二控制器分别发送目标策略。S606. The cross-domain controller sends the target policy to the first controller and the second controller respectively.

S607.第一控制器向第一网络设备发送目标策略。S607. The first controller sends the target policy to the first network device.

S608.第二控制器向第二网络设备发送目标策略。S608. The second controller sends the target policy to the second network device.

S609.第一网络设备通过第一端口向第二网络设备发送时钟协议报文B,该时钟协议报文B携带第一端口的指示信息。S609. The first network device sends a clock protocol message B to the second network device through the first port, where the clock protocol message B carries indication information of the first port.

其中,时钟协议报文B是基于第一时钟协议的报文,也即是第一时钟协议报文。The clock protocol message B is a message based on the first clock protocol, that is, the first clock protocol message.

一个实施例中,时钟协议报文B的源端(或称为构造者)是第一网络设备,第一网络设备生成时钟协议报文B,并通过第一端口向第二网络设备发送该时钟协议报文B。In one embodiment, the source end (or constructor) of the clock protocol message B is a first network device, the first network device generates the clock protocol message B, and sends the clock protocol message B to the second network device through the first port.

另一个实施例中,时钟协议报文B的源端是时钟源或第一网络设备之前的网络设备,第一网络设备从第一网络设备的上一跳设备接收时钟协议报文B,第一网络设备在时钟协议报文B中封装第一端口的指示信息后,通过第一端口向第二网络设备发送该时钟协议报文B。In another embodiment, the source end of the clock protocol message B is a clock source or a network device before the first network device. The first network device receives the clock protocol message B from the previous-hop device of the first network device. After the first network device encapsulates the indication information of the first port in the clock protocol message B, it sends the clock protocol message B to the second network device through the first port.

S610.第一网络设备基于时钟协议报文B获取第一发现信息,第一发现信息包括第一端口的指示信息。S610. The first network device obtains first discovery information based on the clock protocol message B, where the first discovery information includes indication information of the first port.

第一网络设备根据第一网络设备发送时钟协议报文B的网络端口(即第一端口)获取第一发现信息。第一发现信息包括第一端口的指示信息,还可以包括第一网络设备的指示信息。The first network device acquires the first discovery information according to the network port (ie, the first port) through which the first network device sends the clock protocol message B. The first discovery information includes indication information of the first port and may also include indication information of the first network device.

S611.第一网络设备向第一控制器发送第一发现信息。S611. The first network device sends first discovery information to the first controller.

S612.第一控制器向跨域控制器发送第一发现信息。S612. The first controller sends first discovery information to the cross-domain controller.

S613.第二网络设备通过第二端口接收时钟协议报文B。S613. The second network device receives clock protocol message B through the second port.

S614.第二网络设备基于时钟协议报文B获取第二发现信息,第二发现信息包括第二端口的指示信息以及第一端口与第二端口的对应关系。S614. The second network device obtains second discovery information based on the clock protocol message B, where the second discovery information includes indication information of the second port and a correspondence between the first port and the second port.

第二网络设备可以根据第二网络设备接收时钟协议报文B的网络端口(即第二端口)以及第二网络设备接收到的该时钟协议报文B携带的第一端口的指示信息获取第二发现信息。第二发现信息包括第二端口的指示信息以及第一端口与第二端口的对应关系,还可以包括第二网络设备的指示信息。第一端口与第二端口的对应关系可以是第一端口的指示信息与第二端口的指示信息的对应关系。示例的,第二网络设备根据第二网络设备接收该时钟协议报文B的第二端口获取该第二端口的指示信息;第二网络设备根据该第二端口的指示信息和该时钟协议报文B携带的第一端口的指示信息获取该第一端口与该第二端口的对应关系。The second network device can obtain the second discovery information based on the network port (i.e., the second port) at which the second network device receives the clock protocol message B and the indication information of the first port carried by the clock protocol message B received by the second network device. The second discovery information includes the indication information of the second port and the correspondence between the first port and the second port, and may also include the indication information of the second network device. The correspondence between the first port and the second port may be the correspondence between the indication information of the first port and the indication information of the second port. For example, the second network device obtains the indication information of the second port based on the second port at which the second network device receives the clock protocol message B; the second network device obtains the correspondence between the first port and the second port based on the indication information of the second port and the indication information of the first port carried by the clock protocol message B.

S615.第二网络设备向第二控制器发送第二发现信息。 S615. The second network device sends second discovery information to the second controller.

S616.第二控制器向跨域控制器发送第二发现信息。S616. The second controller sends second discovery information to the cross-domain controller.

S617.跨域控制器根据第一发现信息和第二发现信息确定第一链路,第一链路是第一端口与第二端口之间的跨域链路。S617. The cross-domain controller determines a first link according to the first discovery information and the second discovery information, where the first link is a cross-domain link between the first port and the second port.

上述S601至S617的详细实现过程可以参考图3和图5所示实施例,这里不做赘述。The detailed implementation process of the above S601 to S617 can refer to the embodiments shown in Figures 3 and 5, and will not be repeated here.

请参考图7,其示出了本申请实施例提供的再一种链路发现方法的流程图。该链路发现方法应用于包括控制器、第一网络域和第二网络域的通信网络,第一网络域的网络类型与第二网络域的网络类型不同,该链路发现方法由该控制器执行。例如,该通信网络如图1或图2所示,第一网络域和第二网络域中的一个网络域是网络域1,另一个网络域是网络域2,该控制器是控制器300。参见图7,该链路发现方法包括如下步骤S701至S703。Please refer to Figure 7, which shows a flowchart of another link discovery method provided by an embodiment of the present application. The link discovery method is applied to a communication network including a controller, a first network domain and a second network domain. The network type of the first network domain is different from the network type of the second network domain, and the link discovery method is executed by the controller. For example, the communication network is shown in Figure 1 or Figure 2, one of the first network domain and the second network domain is network domain 1, the other network domain is network domain 2, and the controller is controller 300. Referring to Figure 7, the link discovery method includes the following steps S701 to S703.

S701.控制器获取第一能力信息和第二能力信息,第一能力信息用于指示第一网络设备的第一端口支持的链路发现能力,第二能力信息用于指示第二网络设备的第二端口支持的链路发现能力,第一网络设备在第一网络域中,第二网络设备在第二网络域中,第一网络域的网络类型与第二网络域的网络类型不同。S701. The controller obtains first capability information and second capability information, the first capability information is used to indicate the link discovery capability supported by the first port of the first network device, and the second capability information is used to indicate the link discovery capability supported by the second port of the second network device, the first network device is in the first network domain, the second network device is in the second network domain, and the network type of the first network domain is different from the network type of the second network domain.

其中,第一能力信息中包括第一端口的能力信息,第一端口的能力信息用于指示第一端口支持的链路发现能力。第二能力信息中包括第二端口的能力信息,第二端口的能力信息用于指示第二端口支持的链路发现能力。在本申请中,第一端口支持的链路发现能力和第二端口支持的链路发现能力分别包括以下至少一种:基于第一时钟协议的链路发现能力、基于第一发现协议的链路发现能力、基于端口流量统计的链路发现能力、基于端口告警的链路发现能力。其中,某一网络端口支持基于第一时钟协议的链路发现能力也可以称为该某一网络端口支持第一时钟协议;某一网络端口支持基于第一发现协议的链路发现能力也可以称为该某一网络端口支持第一发现协议;某一网络端口支持基于端口流量统计的链路发现能力也可以称为该某一网络端口支持端口流量统计;某一网络端口支持基于端口告警的链路发现能力也可以称为该某一网络端口支持端口告警;因此,第一端口和第二端口分别支持第一时钟协议、第一发现协议、端口流量统计和端口告警中的至少一种。其中,第一时钟协议是IEEE1588协议、ITU-T G.8275.1协议或其他时钟协议。第一发现协议是LLDP或其他链路发现协议。某一网络端口支持端口流量统计指的是该某一网络端口能够支持在该某一网络端口进行网络流量统计,包括但不限于该某一网络端口所在的网络设备统计该某一网络端口的网络流量,该某一网络端口连接的监控设备统计该某一网络端口的网络流量等。某一网络端口支持端口告警指的是该某一网络端口下线(down)之后该某一网络端口能够发生告警,该某一网络端口down可以是以该某一网络端口为端点的通信链路down,例如,某一通信链路与其一端的网络端口断开之后,该某一通信链路另一端的网络端口能够发生告警。示例的,第一端口和第二端口分别支持第一时钟协议、第一发现协议、端口流量统计和端口告警,第一端口的能力信息中包括第一时钟协议的指示信息、第一发现协议的指示信息、端口流量统计指示信息(该端口流量统计指示信息用于指示第一端口支持端口流量统计)和端口告警指示信息(该端口告警指示信息用于指示第一端口支持端口告警),第二端口的能力信息中包括第一时钟协议的指示信息、第一发现协议的指示信息、端口流量统计指示信息和端口告警指示信息。Among them, the first capability information includes the capability information of the first port, and the capability information of the first port is used to indicate the link discovery capability supported by the first port. The second capability information includes the capability information of the second port, and the capability information of the second port is used to indicate the link discovery capability supported by the second port. In the present application, the link discovery capability supported by the first port and the link discovery capability supported by the second port respectively include at least one of the following: a link discovery capability based on the first clock protocol, a link discovery capability based on the first discovery protocol, a link discovery capability based on port traffic statistics, and a link discovery capability based on port alarms. Among them, a certain network port supporting a link discovery capability based on the first clock protocol can also be called that the certain network port supports the first clock protocol; a certain network port supporting a link discovery capability based on the first discovery protocol can also be called that the certain network port supports the first discovery protocol; a certain network port supporting a link discovery capability based on port traffic statistics can also be called that the certain network port supports port traffic statistics; a certain network port supporting a link discovery capability based on port alarms can also be called that the certain network port supports port alarms; therefore, the first port and the second port respectively support at least one of the first clock protocol, the first discovery protocol, port traffic statistics, and port alarms. Among them, the first clock protocol is the IEEE1588 protocol, the ITU-T G.8275.1 protocol or other clock protocols. The first discovery protocol is LLDP or other link discovery protocols. A certain network port supports port traffic statistics, which means that the certain network port can support network traffic statistics on the certain network port, including but not limited to the network device where the certain network port is located counting the network traffic of the certain network port, the monitoring device connected to the certain network port counting the network traffic of the certain network port, etc. A certain network port supports port alarm, which means that the certain network port can generate an alarm after the certain network port goes offline (down). The down of the certain network port can be the down of the communication link with the certain network port as the endpoint. For example, after a certain communication link is disconnected from the network port at one end, the network port at the other end of the certain communication link can generate an alarm. In the example, the first port and the second port respectively support the first clock protocol, the first discovery protocol, port traffic statistics and port alarms, the capability information of the first port includes indication information of the first clock protocol, indication information of the first discovery protocol, port traffic statistics indication information (the port traffic statistics indication information is used to indicate that the first port supports port traffic statistics) and port alarm indication information (the port alarm indication information is used to indicate that the first port supports port alarms), and the capability information of the second port includes indication information of the first clock protocol, indication information of the first discovery protocol, port traffic statistics indication information and port alarm indication information.

在本申请实施例中,控制器可以接收第一能力信息和第二能力信息,或者,控制器主动收集第一能力信息和第二能力信息。示例的,该控制器是跨域控制器,该跨域控制器接收第一控制器发送的第一能力信息,以及,该跨域控制器接收第二控制器发送的第二能力信息,第一控制器是第一网络域的控制器,第二控制器是第二网络域的控制器。例如,第一控制器位于第一网络域中,第二控制器位于第二网络域中。可选的,第一网络设备实时、周期性或基于事件触发向第一控制器发送第一网络设备的端口能力信息(例如第一能力信息),第一控制器接收到第一网络设备的端口能力信息之后向该跨域控制器发送该端口能力信息。第二网络设备实时、周期性或基于事件触发向第二控制器发送第二网络设备的端口能力信息(例如第二能力信息),第二控制器接收到第二网络设备的端口能力信息之后向该跨域控制器发送该端口能力信息。示例的,第一网络设备通过BGP、NETCONF、PCEP、telemetry协议、Qx协议或其他私有协议向第一控制器发送第一能力信息;和/或,第二网络设备通过BGP、NETCONF、PCEP、telemetry协议或其他私有协议向第二控制器发送第一能力信息。其中,第一网络设备的端口能力信息中包括第一端口的能力信息,还可能包括第一网络设备的其他网络端口的能力信息;在这一实施例中,第一网络设备的端口能力信息中可以包括至少一组对应关系,该至少一组对应关系中的每组对应关系中包括第一网络设备的一个网络端口的指示信息和该一个网络端口的能力信息。第二网络设备的端口能力信息中包括第二端口的能力信息,还 可能包括第二网络设备的其他网络端口的能力信息;在这一实施例中,第二网络设备的端口能力信息中可以包括至少一组对应关系,该至少一组对应关系中的每组对应关系中包括第二网络设备的一个网络端口的指示信息和该一个网络端口的能力信息。在本申请实施例中,跨域控制器、第一控制器和第二控制器是三个不同的控制器。或者,跨域控制器、第一控制器和第二控制器中的至少两个是一台控制器。第一网络域的网络类型与第二网络域的网络类型不同;例如,第一网络域和第二网络域中的一个网络域是光网络域,另一个网络域是IP网络域;或者,第一网络域和该第二网络域中的一个网络域是无线网络域,另一个网络域是有线网络域。In an embodiment of the present application, the controller may receive the first capability information and the second capability information, or the controller actively collects the first capability information and the second capability information. For example, the controller is a cross-domain controller, the cross-domain controller receives the first capability information sent by the first controller, and the cross-domain controller receives the second capability information sent by the second controller, the first controller is a controller of the first network domain, and the second controller is a controller of the second network domain. For example, the first controller is located in the first network domain, and the second controller is located in the second network domain. Optionally, the first network device sends the port capability information (e.g., the first capability information) of the first network device to the first controller in real time, periodically, or based on event triggering, and the first controller sends the port capability information of the first network device to the cross-domain controller after receiving the port capability information of the first network device. The second network device sends the port capability information (e.g., the second capability information) of the second network device to the second controller in real time, periodically, or based on event triggering, and the second controller sends the port capability information of the second network device to the cross-domain controller after receiving the port capability information of the second network device. For example, the first network device sends the first capability information to the first controller via BGP, NETCONF, PCEP, telemetry protocol, Qx protocol or other private protocols; and/or, the second network device sends the first capability information to the second controller via BGP, NETCONF, PCEP, telemetry protocol or other private protocols. The port capability information of the first network device includes the capability information of the first port, and may also include the capability information of other network ports of the first network device; in this embodiment, the port capability information of the first network device may include at least one set of correspondences, and each set of correspondences in the at least one set of correspondences includes indication information of a network port of the first network device and the capability information of the one network port. The port capability information of the second network device includes the capability information of the second port, and may also include the capability information of other network ports of the first network device. May include capability information of other network ports of the second network device; in this embodiment, the port capability information of the second network device may include at least one set of correspondences, each set of correspondences in the at least one set of correspondences includes indication information of a network port of the second network device and capability information of the one network port. In an embodiment of the present application, the cross-domain controller, the first controller, and the second controller are three different controllers. Alternatively, at least two of the cross-domain controller, the first controller, and the second controller are one controller. The network type of the first network domain is different from the network type of the second network domain; for example, one of the first network domain and the second network domain is an optical network domain, and the other network domain is an IP network domain; or, one of the first network domain and the second network domain is a wireless network domain, and the other network domain is a wired network domain.

S702.控制器根据第一能力信息和第二能力信息确定目标策略。S702: The controller determines a target policy according to the first capability information and the second capability information.

控制器根据第一能力信息确定第一网络设备的第一端口支持的链路发现能力,控制器根据第二能力信息确定第二网络设备的第二端口支持的链路发现能力,控制器根据第一端口支持的链路发现能力和第二端口支持的链路发现能力确定目标策略。可选的,控制器确定第一网络设备和第二网络设备处于同一站点,控制器根据第一网络设备和第二网络设备处于同一站点、第一端口支持的链路发现能力、第二端口支持的链路发现能力确定目标策略。The controller determines the link discovery capability supported by the first port of the first network device according to the first capability information, determines the link discovery capability supported by the second port of the second network device according to the second capability information, and determines the target policy according to the link discovery capability supported by the first port and the link discovery capability supported by the second port. Optionally, the controller determines that the first network device and the second network device are at the same site, and determines the target policy according to the first network device and the second network device being at the same site, the link discovery capability supported by the first port, and the link discovery capability supported by the second port.

在本申请实施例中,目标策略包括以下至少一种:基于第一时钟协议的链路发现策略、基于第一发现协议的链路发现策略、基于端口流量统计的链路发现策略和基于端口告警的链路发现策略。S702包括以下四种实现方式中的至少一种。In the embodiment of the present application, the target strategy includes at least one of the following: a link discovery strategy based on a first clock protocol, a link discovery strategy based on a first discovery protocol, a link discovery strategy based on port traffic statistics, and a link discovery strategy based on port alarms. S702 includes at least one of the following four implementations.

第一种实现方式:当第一能力信息用于指示第一端口支持基于第一时钟协议的链路发现能力且第二能力信息用于指示第二端口支持基于第一时钟协议的链路发现能力时,控制器确定目标策略包括基于第一时钟协议的链路发现策略。也即,当控制器确定第一端口和第二端口均支持第一时钟协议时,控制器确定目标策略包括基于第一时钟协议的链路发现策略。The first implementation manner: when the first capability information is used to indicate that the first port supports the link discovery capability based on the first clock protocol and the second capability information is used to indicate that the second port supports the link discovery capability based on the first clock protocol, the controller determines that the target policy includes the link discovery policy based on the first clock protocol. That is, when the controller determines that both the first port and the second port support the first clock protocol, the controller determines that the target policy includes the link discovery policy based on the first clock protocol.

第二种实现方式:当第一能力信息用于指示第一端口支持基于第一发现协议的链路发现能力且第二能力信息用于指示第二端口支持基于第一发现协议的链路发现能力时,控制器确定目标策略包括基于第一发现协议的链路发现策略。也即,当控制器确定第一端口和第二端口均支持第一发现协议时,控制器确定目标策略包括基于第一发现协议的链路发现策略。Second implementation: When the first capability information is used to indicate that the first port supports the link discovery capability based on the first discovery protocol and the second capability information is used to indicate that the second port supports the link discovery capability based on the first discovery protocol, the controller determines that the target policy includes the link discovery policy based on the first discovery protocol. That is, when the controller determines that both the first port and the second port support the first discovery protocol, the controller determines that the target policy includes the link discovery policy based on the first discovery protocol.

第三种实现方式:当第一能力信息用于指示第一端口支持基于端口流量统计的链路发现能力且第二能力信息用于指示第二端口支持基于端口流量统计的链路发现能力时,控制器确定目标策略包括基于端口流量统计的链路发现策略。也即,当控制器确定第一端口和第二端口均支持端口流量统计时,控制器确定目标策略包括基于端口流量统计的链路发现策略。A third implementation manner: when the first capability information is used to indicate that the first port supports a link discovery capability based on port traffic statistics and the second capability information is used to indicate that the second port supports a link discovery capability based on port traffic statistics, the controller determines that the target policy includes a link discovery policy based on port traffic statistics. That is, when the controller determines that both the first port and the second port support port traffic statistics, the controller determines that the target policy includes a link discovery policy based on port traffic statistics.

第四种实现方式:当第一能力信息用于指示第一端口支持基于端口告警的链路发现能力且第二能力信息用于指示第二端口支持基于端口告警的链路发现能力时,控制器确定目标策略包括基于端口告警的链路发现策略。也即,当控制器确定第一端口和第二端口均支持端口告警时,控制器确定目标策略包括基于端口告警的链路发现策略。Fourth implementation: When the first capability information is used to indicate that the first port supports the link discovery capability based on the port alarm and the second capability information is used to indicate that the second port supports the link discovery capability based on the port alarm, the controller determines that the target policy includes the link discovery policy based on the port alarm. That is, when the controller determines that both the first port and the second port support the port alarm, the controller determines that the target policy includes the link discovery policy based on the port alarm.

上述四种实现方式可以独立实施,也可以组合实施。一个实施例中,第一端口和第二端口均支持第一时钟协议、第一发现协议、端口流量统计和端口告警,控制器确定目标策略为基于第一时钟协议的链路发现策略、基于第一发现协议的链路发现策略、基于端口流量统计的链路发现策略和基于端口告警的链路发现策略中的一种。一个示例中,控制器确定目标策略为基于第一时钟协议的链路发现策略、基于第一发现协议的链路发现策略、基于端口流量统计的链路发现策略和基于端口告警的链路发现策略中的任意一种。另一个示例中,控制器按顺序(例如优先级)确定目标策略为基于第一时钟协议的链路发现策略、基于第一发现协议的链路发现策略、基于端口流量统计的链路发现策略和基于端口告警的链路发现策略中的一种;例如,基于第一时钟协议的链路发现策略、基于第一发现协议的链路发现策略、基于端口流量统计的链路发现策略和基于端口告警的链路发现策略的优先级依次降低,控制器确定目标策略为基于第一时钟协议的链路发现策略。另一个实施例中,第一端口和第二端口均支持第一时钟协议、第一发现协议、端口流量统计和端口告警,控制器确定目标策略包括基于第一时钟协议的链路发现策略、基于第一发现协议的链路发现策略、基于端口流量统计的链路发现策略和基于端口告警的链路发现策略中的至少两种。一个示例中,控制器确定目标策略包括基于第一时钟协议的链路发现策略、基于第一发现协议的链路发现策略、基于端口流量统计的链路发现策略和基于端口告警的链路发现策略中的任意至少两种。另一个示例中,控制器按顺序(例如优先级)确定目标策略包括基于第一时钟协议的链路发现策略、基于第一发现协议的链路发现 策略、基于端口流量统计的链路发现策略和基于端口告警的链路发现策略中的至少两种;例如,基于第一时钟协议的链路发现策略、基于第一发现协议的链路发现策略、基于端口流量统计的链路发现策略和基于端口告警的链路发现策略的优先级依次降低,控制器确定目标策略包括基于第一时钟协议的链路发现策略和基于端口流量统计的链路发现策略。上述四种实现方式组合实施时,每次链路发现过程中网络设备和控制器协同工作基于至少两种链路发现策略发现跨域链路,这有助于提高发现跨域链路的准确性。The above four implementations can be implemented independently or in combination. In one embodiment, the first port and the second port both support the first clock protocol, the first discovery protocol, port traffic statistics and port alarms, and the controller determines the target strategy to be one of the link discovery strategy based on the first clock protocol, the link discovery strategy based on the first discovery protocol, the link discovery strategy based on port traffic statistics and the link discovery strategy based on port alarms. In one example, the controller determines the target strategy to be any one of the link discovery strategy based on the first clock protocol, the link discovery strategy based on the first discovery protocol, the link discovery strategy based on port traffic statistics and the link discovery strategy based on port alarms. In another example, the controller determines the target strategy to be one of the link discovery strategy based on the first clock protocol, the link discovery strategy based on the first discovery protocol, the link discovery strategy based on port traffic statistics and the link discovery strategy based on port alarms in order (e.g., priority); for example, the priorities of the link discovery strategy based on the first clock protocol, the link discovery strategy based on the first discovery protocol, the link discovery strategy based on port traffic statistics and the link discovery strategy based on port alarms are reduced in sequence, and the controller determines the target strategy to be the link discovery strategy based on the first clock protocol. In another embodiment, the first port and the second port both support the first clock protocol, the first discovery protocol, port traffic statistics, and port alarms, and the controller determines that the target strategy includes at least two of a link discovery strategy based on the first clock protocol, a link discovery strategy based on the first discovery protocol, a link discovery strategy based on port traffic statistics, and a link discovery strategy based on port alarms. In one example, the controller determines that the target strategy includes at least two of a link discovery strategy based on the first clock protocol, a link discovery strategy based on the first discovery protocol, a link discovery strategy based on port traffic statistics, and a link discovery strategy based on port alarms. In another example, the controller determines the target strategy in order (e.g., priority) to include a link discovery strategy based on the first clock protocol, a link discovery strategy based on the first discovery protocol, a link discovery strategy based on port traffic statistics, and a link discovery strategy based on port alarms. At least two of the following strategies: a link discovery strategy based on a first clock protocol, a link discovery strategy based on a first discovery protocol, a link discovery strategy based on port traffic statistics, and a link discovery strategy based on port alarms; for example, the priorities of a link discovery strategy based on a first clock protocol, a link discovery strategy based on a first discovery protocol, a link discovery strategy based on port traffic statistics, and a link discovery strategy based on port alarms are reduced in sequence, and the controller determines that the target strategy includes a link discovery strategy based on a first clock protocol and a link discovery strategy based on port traffic statistics. When the above four implementation methods are implemented in combination, the network device and the controller work together to discover cross-domain links based on at least two link discovery strategies during each link discovery process, which helps to improve the accuracy of discovering cross-domain links.

S703.控制器向第一网络设备和第二网络设备发送目标策略,该目标策略用于指示第一网络设备和第二网络设备基于目标策略发现第一网络域与第二网络域之间的跨域链路。S703. The controller sends a target policy to the first network device and the second network device, where the target policy is used to instruct the first network device and the second network device to discover a cross-domain link between the first network domain and the second network domain based on the target policy.

控制器可以通过NETCON或其他私有协议向第一网络设备和第二网络设备发送目标策略。一个实施例中,该控制器是跨域控制器,该跨域控制器、第一控制器和第二控制器是三台各自独立的控制器,该跨域控制器通过第一控制器向第一网络设备发送目标策略,该跨域控制器通过第二控制器向第二网络设备发送目标策略。另一个实施例中,该控制器是跨域控制器,该跨域控制器、第一控制器和第二控制器是同一台控制器,该跨域控制器直接向第一网络设备发送目标策略,以及,该跨域控制器直接向第二网络设备发送目标策略。The controller may send the target policy to the first network device and the second network device via NETCON or other private protocols. In one embodiment, the controller is a cross-domain controller, the cross-domain controller, the first controller, and the second controller are three independent controllers, the cross-domain controller sends the target policy to the first network device via the first controller, and the cross-domain controller sends the target policy to the second network device via the second controller. In another embodiment, the controller is a cross-domain controller, the cross-domain controller, the first controller, and the second controller are the same controller, the cross-domain controller directly sends the target policy to the first network device, and the cross-domain controller directly sends the target policy to the second network device.

可选的实施例中,控制器向第一网络设备和第二网络设备发送用于指示目标策略的指示信息(本申请将用于指示目标策略的指示信息称为目标策略信息)。根据目标策略的不同,目标策略信息包括以下四种实现方式中的至少一种。In an optional embodiment, the controller sends indication information indicating a target policy to the first network device and the second network device (the indication information indicating a target policy is referred to as target policy information in this application). Depending on the target policy, the target policy information includes at least one of the following four implementations.

第一种实现方式:目标策略包括基于第一时钟协议的链路发现策略,目标策略信息包括第一策略信息,第一策略信息用于指示基于第一时钟协议的链路发现策略。示例的,第一策略信息中包括第一时钟协议的指示信息、第一网络设备的第一端口的指示信息和第二网络设备的第二端口的指示信息,第一策略信息用于指示第一网络设备基于第一时钟协议在第一端口获取链路发现信息,且指示第二网络设备基于第一时钟协议在第二端口获取链路发现信息。The first implementation method: the target policy includes a link discovery policy based on a first clock protocol, and the target policy information includes first policy information, and the first policy information is used to indicate the link discovery policy based on the first clock protocol. For example, the first policy information includes indication information of the first clock protocol, indication information of the first port of the first network device, and indication information of the second port of the second network device, and the first policy information is used to indicate the first network device to obtain link discovery information at the first port based on the first clock protocol, and to indicate the second network device to obtain link discovery information at the second port based on the first clock protocol.

第二种实现方式:目标策略包括基于第一发现协议的链路发现策略,目标策略信息包括第二策略信息,第二策略信息用于指示基于第一发现协议的链路发现策略。示例的,第二策略信息中包括第一发现协议的指示信息、第一网络设备的第一端口的指示信息和第二网络设备的第二端口的指示信息,第二策略信息用于指示第一网络设备基于第一发现协议在第一端口获取链路发现信息,且指示第二网络设备基于第一发现协议在第二端口获取链路发现信息。The second implementation method: the target policy includes a link discovery policy based on the first discovery protocol, and the target policy information includes second policy information, and the second policy information is used to indicate the link discovery policy based on the first discovery protocol. For example, the second policy information includes indication information of the first discovery protocol, indication information of the first port of the first network device, and indication information of the second port of the second network device, and the second policy information is used to indicate the first network device to obtain link discovery information at the first port based on the first discovery protocol, and to indicate the second network device to obtain link discovery information at the second port based on the first discovery protocol.

第三种实现方式:目标策略包括基于端口流量统计的链路发现策略,目标策略信息包括第三策略信息,第三策略信息用于指示基于端口流量统计的链路发现策略。示例的,第三策略信息中包括端口流量统计指示信息、第一网络设备的第一端口的指示信息和第二网络设备的第二端口的指示信息,该端口流量统计指示信息用于指示进行端口流量统计,第三策略信息用于指示第一网络设备统计第一端口的网络流量,且指示第二网络设备统计第二端口的网络流量。可选的,第三策略信息还包括第一时间段的指示信息,以指示第一网络设备和第二网络设备统计对应网络端口在第一时间段内的网络流量。A third implementation method: the target policy includes a link discovery policy based on port traffic statistics, and the target policy information includes third policy information, and the third policy information is used to indicate the link discovery policy based on port traffic statistics. For example, the third policy information includes port traffic statistics indication information, indication information of the first port of the first network device, and indication information of the second port of the second network device, and the port traffic statistics indication information is used to indicate that port traffic statistics are performed, and the third policy information is used to instruct the first network device to count the network traffic of the first port, and to instruct the second network device to count the network traffic of the second port. Optionally, the third policy information also includes indication information of the first time period to instruct the first network device and the second network device to count the network traffic of the corresponding network port within the first time period.

第四种实现方式:目标策略包括基于端口告警的链路发现策略,目标策略信息包括第四策略信息,第四策略信息用于指示基于端口告警的链路发现策略。示例的,第四策略信息中包括第一网络设备的第一端口的指示信息、第二网络设备的第二端口的指示信息以及与第一端口的指示信息对应的断开指示信息,该断开指示信息用于指示第一网络设备断开第一端口(例如断开第一端口对应的通信链路),第四策略信息用于指示第一网络设备断开第一端口。可选的,第四策略信息中还包括与第二端口的指示信息对应的告警监测指示信息,该告警监测指示信息用于指示第二网络设备监测第二端口的告警情况。第四策略信息中还可以包括第二时间段的指示信息以指示第一网络设备在第二时间段内断开第一端口,以及指示第二网络设备监测第二端口在第二时间段内的告警情况。The fourth implementation method: the target policy includes a link discovery policy based on port alarms, and the target policy information includes fourth policy information, and the fourth policy information is used to indicate the link discovery policy based on port alarms. For example, the fourth policy information includes indication information of the first port of the first network device, indication information of the second port of the second network device, and disconnection indication information corresponding to the indication information of the first port, and the disconnection indication information is used to instruct the first network device to disconnect the first port (for example, disconnect the communication link corresponding to the first port), and the fourth policy information is used to instruct the first network device to disconnect the first port. Optionally, the fourth policy information also includes alarm monitoring indication information corresponding to the indication information of the second port, and the alarm monitoring indication information is used to instruct the second network device to monitor the alarm condition of the second port. The fourth policy information can also include indication information of the second time period to instruct the first network device to disconnect the first port within the second time period, and to instruct the second network device to monitor the alarm condition of the second port within the second time period.

需要说明的是,上述第一时间段与第二时间段可以相同,也可以不同。上述第一时间段与第二时间段可以存在交叠,也可以不存在交叠,本申请实施例对此不做限定。It should be noted that the first time period and the second time period may be the same or different. The first time period and the second time period may overlap or not overlap, which is not limited in the embodiment of the present application.

综上所述,本申请实施例提供的技术方案,控制器根据第一网络域中的第一网络设备的第一端口支持的链路发现能力和第二网络域中的第二网络设备的第二端口支持的链路发现能力确定目标策略(也即跨域链路的发现策略),因此确定跨域链路的发现策略的过程无需人工参与,无需工作人员熟悉网络情况,对工作人员的技能无额外要求。To sum up, in the technical solution provided by the embodiment of the present application, the controller determines the target strategy (that is, the cross-domain link discovery strategy) based on the link discovery capability supported by the first port of the first network device in the first network domain and the link discovery capability supported by the second port of the second network device in the second network domain. Therefore, the process of determining the cross-domain link discovery strategy does not require human participation, does not require the staff to be familiar with the network situation, and has no additional requirements for the staff's skills.

可选的实施例中,请参考图8,其示出了本申请实施例提供的又一种链路发现方法的流程图。如图8 所示,在S703之后,该方法还包括如下步骤S704至S705。In an optional embodiment, please refer to FIG8 , which shows a flowchart of another link discovery method provided by an embodiment of the present application. As shown, after S703, the method further includes the following steps S704 to S705.

S704.控制器获取第一发现信息和第二发现信息,第一发现信息是第一网络设备基于目标策略获取的第一网络域与第二网络域之间的跨域链路的发现信息,第二发现信息是第二网络设备基于该目标策略获取的该跨域链路的发现信息。S704. The controller obtains first discovery information and second discovery information, the first discovery information is the discovery information of the cross-domain link between the first network domain and the second network domain obtained by the first network device based on the target policy, and the second discovery information is the discovery information of the cross-domain link obtained by the second network device based on the target policy.

控制器向第一网络设备和第二网络设备发送目标策略之后,第一网络设备基于该目标策略获取第一网络域与第二网络域之间的跨域链路的发现信息(也即第一发现信息),第二网络设备基于该目标策略获取第一网络域与第二网络域之间的跨域链路的发现信息(也即第二发现信息),控制器可以获取第一发现信息和第二发现信息。可选的,控制器接收第一发现信息和第二发现信息,或者,控制器主动收集第一发现信息和第二发现信息。一个示例中,该控制器是跨域控制器,第一网络设备获取第一发现信息之后向第一控制器发送第一发现信息,第一控制器接收第一发现信息之后向该跨域控制器发送第一发现信息,该跨域控制器接收第一控制器发送的第一发现信息;同理,第二网络设备获取第二发现信息之后向第二控制器发送第二发现信息,第二控制器接收第二发现信息之后向该跨域控制器发送第二发现信息,该跨域控制器接收第二控制器发送的第二发现信息。另一个示例中,该控制器是跨域控制器,第一网络设备获取第一发现信息之后第一控制器从第一网络设备收集第一发现信息,并向该跨域控制器发送第一发现信息,该跨域控制器接收第一控制器发送的第一发现信息;同理,第二网络设备获取第二发现信息之后第二控制器从第二网络设备收集第二发现信息,并向该跨域控制器发送第二发现信息,该跨域控制器接收第二控制器发送的第二发现信息。其中,第一网络设备通过BGP、NETCONF、PCEP、telemetry协议、Qx协议或其他私有协议向第一控制器发送第一发现信息;和/或,第二网络设备通过BGP、NETCONF、PCEP、telemetry协议、Qx协议或其他私有协议向第二控制器发送第二发现信息,本申请对此不做限定。After the controller sends the target policy to the first network device and the second network device, the first network device obtains the discovery information of the cross-domain link between the first network domain and the second network domain based on the target policy (that is, the first discovery information), and the second network device obtains the discovery information of the cross-domain link between the first network domain and the second network domain based on the target policy (that is, the second discovery information), and the controller can obtain the first discovery information and the second discovery information. Optionally, the controller receives the first discovery information and the second discovery information, or the controller actively collects the first discovery information and the second discovery information. In one example, the controller is a cross-domain controller, and the first network device sends the first discovery information to the first controller after obtaining the first discovery information, and the first controller sends the first discovery information to the cross-domain controller after receiving the first discovery information, and the cross-domain controller receives the first discovery information sent by the first controller; similarly, the second network device sends the second discovery information to the second controller after obtaining the second discovery information, and the second controller sends the second discovery information to the cross-domain controller after receiving the second discovery information, and the cross-domain controller receives the second discovery information sent by the second controller. In another example, the controller is a cross-domain controller. After the first network device obtains the first discovery information, the first controller collects the first discovery information from the first network device and sends the first discovery information to the cross-domain controller, and the cross-domain controller receives the first discovery information sent by the first controller. Similarly, after the second network device obtains the second discovery information, the second controller collects the second discovery information from the second network device and sends the second discovery information to the cross-domain controller, and the cross-domain controller receives the second discovery information sent by the second controller. The first network device sends the first discovery information to the first controller via BGP, NETCONF, PCEP, telemetry protocol, Qx protocol or other private protocols; and/or the second network device sends the second discovery information to the second controller via BGP, NETCONF, PCEP, telemetry protocol, Qx protocol or other private protocols, which is not limited in this application.

可选的实施例中,在S703中控制器向第一网络设备和第二网络设备发送目标策略信息。第一网络设备接收到目标策略信息之后根据目标策略信息确定目标策略,进而第一网络设备基于目标策略获取第一网络域与第二网络域之间的跨域链路的发现信息。同理,第二网络设备接收到目标策略信息之后根据目标策略信息确定目标策略,进而第二网络设备基于目标策略获取第一网络域与第二网络域之间的跨域链路的发现信息。根据目标策略不同,目标策略信息不同,第一网络设备和第二网络设备获取链路发现信息的实现方式不同。示例的,第一网络设备和第二网络设备获取链路发现信息包括以下四种实现方式中的至少一种。In an optional embodiment, in S703, the controller sends target policy information to the first network device and the second network device. After receiving the target policy information, the first network device determines the target policy according to the target policy information, and then the first network device obtains the discovery information of the cross-domain link between the first network domain and the second network domain based on the target policy. Similarly, after receiving the target policy information, the second network device determines the target policy according to the target policy information, and then the second network device obtains the discovery information of the cross-domain link between the first network domain and the second network domain based on the target policy. Depending on the target policy and the target policy information, the implementation method of the first network device and the second network device obtaining the link discovery information is different. For example, the first network device and the second network device obtain the link discovery information including at least one of the following four implementation methods.

第一种实现方式:目标策略信息包括第一策略信息,第一策略信息用于指示基于第一时钟协议的链路发现策略,目标策略包括基于第一时钟协议的链路发现策略,第一网络设备和第二网络设备分别基于第一时钟协议的链路发现策略获取链路发现信息。The first implementation method: the target policy information includes first policy information, the first policy information is used to indicate a link discovery strategy based on a first clock protocol, the target policy includes a link discovery strategy based on the first clock protocol, and the first network device and the second network device respectively obtain link discovery information based on the link discovery strategy of the first clock protocol.

第一网络设备和第二网络设备分别根据目标策略信息中包括的第一策略信息确定目标策略包括基于第一时钟协议的链路发现策略。第一网络设备在传输(例如发送或接收)第一时钟协议报文的过程中基于该第一时钟协议报文获取第一发现信息。第二网络设备在传输(例如发送或接收)第一时钟协议报文的过程中基于该第一时钟协议报文获取第二发现信息。The first network device and the second network device respectively determine that the target policy includes a link discovery policy based on the first clock protocol according to the first policy information included in the target policy information. The first network device obtains the first discovery information based on the first clock protocol message during the transmission (e.g., sending or receiving) of the first clock protocol message. The second network device obtains the second discovery information based on the first clock protocol message during the transmission (e.g., sending or receiving) of the first clock protocol message.

可选的,第一策略信息中包括第一时钟协议的指示信息、第一网络设备的第一端口的指示信息和第二网络设备的第二端口的指示信息。第一网络设备根据该第一时钟协议的指示信息确定该第一时钟协议,第一网络设备根据该第一端口的指示信息确定第一网络设备的该第一端口,第一网络设备在通过该第一端口传输(例如发送或接收)第一时钟协议报文的过程中基于该第一时钟协议报文获取第一发现信息。同理,第二网络设备根据该第一时钟协议的指示信息确定该第一时钟协议,第二网络设备根据该第二端口的指示信息确定第二网络设备的该第二端口,第二网络设备在通过该第二端口传输(例如发送或接收)第一时钟协议报文的过程中基于该第一时钟协议报文获取第二发现信息。其中,第一发现信息包括第一端口的指示信息,第二发现信息包括第二端口的指示信息,第一发现信息和第二发现信息中的至少一个发现信息包括第一端口与第二端口的对应关系。一个示例中,第二网络设备是第一网络设备的下一跳设备,第一网络设备通过第一端口向第二网络设备发送第一时钟协议报文,该第一时钟协议报文携带第一端口的指示信息,第二网络设备通过第二端口接收该第一时钟协议报文,第二网络设备根据该第二网络设备接收该第一时钟协议报文的网络端口(即第二端口)和该第一时钟协议报文携带的第一端口的指示信息获取第一端口与第二端口的对应关系,则第二发现信息包括第一端口与第二端口的对应关系。另一个示例中,第一网络设备是第二网络设备的下一跳设备,第二网络设备通过第二端口向第一网络设备发送第一时钟协议报文,该第一时钟协议报文携带第二端口的指示信息,第一网络设备通过第一端口接收该第一时钟协议报文,第一网 络设备根据该第一网络设备接收该第一时钟协议报文的网络端口(即第一端口)和该第一时钟协议报文携带的第二端口的指示信息获取第一端口与第二端口的对应关系,则第一发现信息包括第一端口与第二端口的对应关系。Optionally, the first policy information includes indication information of the first clock protocol, indication information of the first port of the first network device, and indication information of the second port of the second network device. The first network device determines the first clock protocol according to the indication information of the first clock protocol, the first network device determines the first port of the first network device according to the indication information of the first port, and the first network device obtains the first discovery information based on the first clock protocol message during the process of transmitting (e.g., sending or receiving) the first clock protocol message through the first port. Similarly, the second network device determines the first clock protocol according to the indication information of the first clock protocol, the second network device determines the second port of the second network device according to the indication information of the second port, and the second network device obtains the second discovery information based on the first clock protocol message during the process of transmitting (e.g., sending or receiving) the first clock protocol message through the second port. Among them, the first discovery information includes the indication information of the first port, the second discovery information includes the indication information of the second port, and at least one of the first discovery information and the second discovery information includes the corresponding relationship between the first port and the second port. In one example, the second network device is the next-hop device of the first network device. The first network device sends a first clock protocol message to the second network device through a first port. The first clock protocol message carries indication information of the first port. The second network device receives the first clock protocol message through a second port. The second network device obtains the correspondence between the first port and the second port based on the network port (i.e., the second port) at which the second network device receives the first clock protocol message and the indication information of the first port carried by the first clock protocol message. Then, the second discovery information includes the correspondence between the first port and the second port. In another example, the first network device is the next-hop device of the second network device. The second network device sends a first clock protocol message to the first network device through a second port. The first clock protocol message carries indication information of the second port. The first network device receives the first clock protocol message through the first port. The network device obtains the correspondence between the first port and the second port according to the network port (i.e., the first port) through which the first network device receives the first clock protocol message and the indication information of the second port carried by the first clock protocol message, and the first discovery information includes the correspondence between the first port and the second port.

第二种实现方式:目标策略信息包括第二策略信息,第二策略信息用于指示基于第一发现协议的链路发现策略,目标策略包括基于第一发现协议的链路发现策略,第一网络设备和第二网络设备分别基于第一发现协议的链路发现策略获取链路发现信息。The second implementation method: the target policy information includes second policy information, the second policy information is used to indicate a link discovery strategy based on the first discovery protocol, the target policy includes a link discovery strategy based on the first discovery protocol, and the first network device and the second network device respectively obtain link discovery information based on the link discovery strategy of the first discovery protocol.

第一网络设备和第二网络设备分别根据目标策略信息中包括的第二策略信息确定目标策略包括基于第一发现协议的链路发现策略。第一网络设备在传输(例如发送或接收)第一发现协议报文的过程中基于该第一发现协议报文获取第一发现信息。第二网络设备在传输(例如发送或接收)第一发现协议报文的过程中基于该第一发现协议报文获取第二发现信息。The first network device and the second network device respectively determine that the target policy includes a link discovery policy based on the first discovery protocol according to the second policy information included in the target policy information. The first network device obtains the first discovery information based on the first discovery protocol message during the process of transmitting (e.g., sending or receiving) the first discovery protocol message. The second network device obtains the second discovery information based on the first discovery protocol message during the process of transmitting (e.g., sending or receiving) the first discovery protocol message.

可选的,第二策略信息中包括第一发现协议的指示信息、第一网络设备的第一端口的指示信息和第二网络设备的第二端口的指示信息。第一网络设备根据该第一发现协议的指示信息确定该第一发现协议,第一网络设备根据该第一端口的指示信息确定第一网络设备的该第一端口,第一网络设备在通过该第一端口传输(例如发送或接收)第一发现协议报文的过程中基于该第一发现协议报文获取第一发现信息。同理,第二网络设备根据该第一发现协议的指示信息确定该第一发现协议,第二网络设备根据该第二端口的指示信息确定第二网络设备的该第二端口,第二网络设备在通过该第二端口传输(例如发送或接收)第一发现协议报文的过程中基于该第一发现协议报文获取第二发现信息。其中,第一发现信息包括第一端口的指示信息,第二发现信息包括第二端口的指示信息,第一发现信息和第二发现信息中的至少一个发现信息包括第一端口与第二端口的对应关系。一个示例中,第二网络设备是第一网络设备的下一跳设备,第一网络设备通过第一端口向第二网络设备发送第一发现协议报文,该第一发现协议报文携带第一端口的指示信息,第二网络设备通过第二端口接收该第一发现协议报文,第二网络设备根据该第二网络设备接收该第一发现协议报文的网络端口(即第二端口)和该第一发现协议报文携带的第一端口的指示信息获取第一端口与第二端口的对应关系,则第二发现信息包括第一端口与第二端口的对应关系。另一个示例中,第一网络设备是第二网络设备的下一跳设备,第二网络设备通过第二端口向第一网络设备发送第一发现协议报文,该第一发现协议报文携带第二端口的指示信息,第一网络设备通过第一端口接收该第一发现协议报文,第一网络设备根据该第一网络设备接收该第一发现协议报文的网络端口(即第一端口)和该第一发现协议报文携带的第二端口的指示信息获取第一端口与第二端口的对应关系,则第一发现信息包括第一端口与第二端口的对应关系。Optionally, the second policy information includes indication information of the first discovery protocol, indication information of the first port of the first network device, and indication information of the second port of the second network device. The first network device determines the first discovery protocol according to the indication information of the first discovery protocol, the first network device determines the first port of the first network device according to the indication information of the first port, and the first network device obtains the first discovery information based on the first discovery protocol message during the process of transmitting (e.g., sending or receiving) the first discovery protocol message through the first port. Similarly, the second network device determines the first discovery protocol according to the indication information of the first discovery protocol, the second network device determines the second port of the second network device according to the indication information of the second port, and the second network device obtains the second discovery information based on the first discovery protocol message during the process of transmitting (e.g., sending or receiving) the first discovery protocol message through the second port. Among them, the first discovery information includes the indication information of the first port, the second discovery information includes the indication information of the second port, and at least one of the first discovery information and the second discovery information includes the corresponding relationship between the first port and the second port. In one example, the second network device is the next hop device of the first network device, the first network device sends a first discovery protocol message to the second network device through the first port, the first discovery protocol message carries the indication information of the first port, the second network device receives the first discovery protocol message through the second port, the second network device obtains the correspondence between the first port and the second port according to the network port (i.e., the second port) at which the second network device receives the first discovery protocol message and the indication information of the first port carried by the first discovery protocol message, then the second discovery information includes the correspondence between the first port and the second port. In another example, the first network device is the next hop device of the second network device, the second network device sends a first discovery protocol message to the first network device through the second port, the first discovery protocol message carries the indication information of the second port, the first network device receives the first discovery protocol message through the first port, the first network device obtains the correspondence between the first port and the second port according to the network port (i.e., the first port) at which the first network device receives the first discovery protocol message and the indication information of the second port carried by the first discovery protocol message, then the first discovery information includes the correspondence between the first port and the second port.

第三种实现方式:目标策略信息包括第三策略信息,第三策略信息用于指示基于端口流量统计的链路发现策略,目标策略包括基于端口流量统计的链路发现策略,第一网络设备和第二网络设备分别基于端口流量统计的链路发现策略获取链路发现信息。The third implementation method: the target policy information includes third policy information, the third policy information is used to indicate a link discovery strategy based on port traffic statistics, the target policy includes a link discovery strategy based on port traffic statistics, and the first network device and the second network device respectively obtain link discovery information based on the link discovery strategy based on port traffic statistics.

可选的,第三策略信息中包括端口流量统计指示信息、第一网络设备的第一端口的指示信息、第二网络设备的第二端口的指示信息和第一时间段的指示信息。第一网络设备根据该端口流量统计指示信息确定需要进行端口流量统计,第一网络设备根据该第一端口的指示信息确定第一网络设备的该第一端口,以及,第一网络设备根据该第一时间段的指示信息确定第一时间段,进而第一网络设备确定需要统计该第一端口在第一时间段内的网络流量。第一网络设备从第一时间段的起始时刻开始统计第一端口的网络流量,并在第一时间段的结束时刻结束统计第一端口的网络流量,第一网络设备基于统计结果获取第一发现信息。其中,第一发现信息包括第一端口的指示信息和第一端口在第一时间段内的流量分布曲线,第一端口在第一时间段内的流量分布曲线用于表征第一端口在第一时间段内的流量分布。同理,第二网络设备根据第三策略信息确定需要统计第二端口在第一时间段内的网络流量,第二网络设备从第一时间段的起始时刻开始统计第二端口的网络流量,并在第一时间段的结束时刻结束统计第二端口的网络流量,第二网络设备基于统计结果获取第二发现信息。其中,第二发现信息包括第二端口的指示信息和第二端口在第一时间段内的流量分布曲线,第二端口在第一时间段内的流量分布曲线用于表征第二端口在第一时间段内的流量分布。Optionally, the third policy information includes port traffic statistics indication information, indication information of the first port of the first network device, indication information of the second port of the second network device, and indication information of the first time period. The first network device determines that port traffic statistics need to be performed according to the port traffic statistics indication information, the first network device determines the first port of the first network device according to the indication information of the first port, and the first network device determines the first time period according to the indication information of the first time period, and then the first network device determines that the network traffic of the first port in the first time period needs to be counted. The first network device starts counting the network traffic of the first port from the start time of the first time period, and ends counting the network traffic of the first port at the end time of the first time period, and the first network device obtains the first discovery information based on the statistical result. Among them, the first discovery information includes the indication information of the first port and the traffic distribution curve of the first port in the first time period, and the traffic distribution curve of the first port in the first time period is used to characterize the traffic distribution of the first port in the first time period. Similarly, the second network device determines that the network traffic of the second port in the first time period needs to be counted according to the third policy information, the second network device starts counting the network traffic of the second port from the start time of the first time period, and ends counting the network traffic of the second port at the end time of the first time period, and the second network device obtains the second discovery information based on the statistical result. The second discovery information includes indication information of the second port and a traffic distribution curve of the second port in the first time period, and the traffic distribution curve of the second port in the first time period is used to characterize traffic distribution of the second port in the first time period.

第四种实现方式:目标策略信息包括第四策略信息,第四策略信息用于指示基于端口告警的链路发现策略,目标策略包括基于端口告警的链路发现策略,第一网络设备和第二网络设备分别基于端口告警的链路发现策略获取链路发现信息。The fourth implementation method: the target policy information includes fourth policy information, the fourth policy information is used to indicate a link discovery strategy based on port alarms, the target policy includes a link discovery strategy based on port alarms, and the first network device and the second network device respectively obtain link discovery information based on the link discovery strategy based on port alarms.

可选的,第四策略信息中包括第一网络设备的第一端口的指示信息、第二网络设备的第二端口的指示 信息、与该第一端口的指示信息对应的断开指示信息、与该第二端口的指示信息对应的告警监测指示信息和第二时间段的指示信息。第一网络设备根据该第一端口的指示信息确定第一网络设备的该第一端口,第一网络设备根据与该第一端口的指示信息对应的该断开指示信息确定断开该第一端口,以及,第一网络设备根据第二时间段的指示信息确定第二时间段,进而第一网络设备确定需要在第二时间段内断开该第一端口;第一网络设备控制第一端口在第二时间段内断开(例如,第一网络设备在第二时间段的起始时刻关闭第一端口的激光器,并在第二时间段的结束时刻开启第一端口的激光器,从而控制第一端口在第二时间段内处于断开状态),第一网络设备在第二时间段结束时获取第一发现信息。其中,第一发现信息包括第一端口的指示信息和断开时间信息,该断开时间信息用于指示第一端口在第二时间段内断开,例如,该断开时间信息用于指示第一端口在第二时间段内断开且第一端口处于断开状态的持续时长等于第二时间段的时长。第二网络设备根据该第二端口的指示信息确定第二网络设备的第二端口,第二网络设备根据与该第二端口的指示信息对应的该告警监测指示信息确定需要监测第二端口的告警情况,以及,第二网络设备根据该第二时间段的指示信息确定第二时间段,进而第二网络设备确定需要监测第二端口在第二时间段内的告警情况。第二网络设备从第二时间段的起始时刻开始监测第二端口的告警情况,并在第二时间段的结束时刻停止监测第二端口的告警情况,第二网络设备根据监测结果获取第二发现信息。其中,第二发现信息包括第二端口的指示信息和告警时间信息,该告警时间信息用于指示第二端口发生告警的时间段,第二端口发生告警的时间段可以是第二时间段,也可以不是第二时间段,本申请以第二端口发生告警的时间段是第二时间段为例说明,则该告警时间信息用于指示第二端口在第二时间段内发生告警,例如,该告警时间信息用于指示第二端口在第二时间段内发生告警且第二端口发生告警的持续时长等于第二时间段的时长。Optionally, the fourth policy information includes the indication information of the first port of the first network device and the indication information of the second port of the second network device. Information, disconnection indication information corresponding to the indication information of the first port, alarm monitoring indication information corresponding to the indication information of the second port, and indication information of the second time period. The first network device determines the first port of the first network device according to the indication information of the first port, the first network device determines to disconnect the first port according to the disconnection indication information corresponding to the indication information of the first port, and the first network device determines the second time period according to the indication information of the second time period, and then the first network device determines that the first port needs to be disconnected within the second time period; the first network device controls the first port to be disconnected within the second time period (for example, the first network device turns off the laser of the first port at the start time of the second time period, and turns on the laser of the first port at the end time of the second time period, thereby controlling the first port to be in a disconnected state within the second time period), and the first network device obtains the first discovery information at the end of the second time period. Wherein, the first discovery information includes the indication information of the first port and the disconnection time information, and the disconnection time information is used to indicate that the first port is disconnected within the second time period, for example, the disconnection time information is used to indicate that the first port is disconnected within the second time period and the duration of the first port being in a disconnected state is equal to the duration of the second time period. The second network device determines the second port of the second network device according to the indication information of the second port, the second network device determines the alarm situation of the second port that needs to be monitored according to the alarm monitoring indication information corresponding to the indication information of the second port, and the second network device determines the second time period according to the indication information of the second time period, and then the second network device determines the alarm situation of the second port in the second time period that needs to be monitored. The second network device starts to monitor the alarm situation of the second port from the start time of the second time period, and stops monitoring the alarm situation of the second port at the end time of the second time period, and the second network device obtains the second discovery information according to the monitoring result. Among them, the second discovery information includes the indication information and alarm time information of the second port, and the alarm time information is used to indicate the time period when the second port generates an alarm. The time period when the second port generates an alarm may be the second time period or may not be the second time period. This application takes the time period when the second port generates an alarm as the second time period as an example, then the alarm time information is used to indicate that the second port generates an alarm in the second time period, for example, the alarm time information is used to indicate that the second port generates an alarm in the second time period and the duration of the alarm generation of the second port is equal to the duration of the second time period.

S705.控制器根据第一发现信息和第二发现信息确定第一网络域与第二网络域之间的跨域链路。S705. The controller determines a cross-domain link between the first network domain and the second network domain according to the first discovery information and the second discovery information.

控制器可以根据第一发现信息和第二发现信息确定第一网络设备的第一端口与第二网络设备的第二端口之间的通信链路,该通信链路即为第一网络域与第二网络域之间的跨域链路。The controller may determine a communication link between a first port of the first network device and a second port of the second network device according to the first discovery information and the second discovery information, and the communication link is a cross-domain link between the first network domain and the second network domain.

在本申请实施例中,根据目标发现策略的不同,第一发现信息的内容不同,第二发现信息的内容不同,控制器根据第一发现信息和第二发现信息确定第一网络域与第二网络域之间的跨域链路的实现方式不同。示例的,S705包括如下四种实现方式中的至少一种。In an embodiment of the present application, according to different target discovery strategies, the content of the first discovery information is different, the content of the second discovery information is different, and the controller determines the implementation method of the cross-domain link between the first network domain and the second network domain according to the first discovery information and the second discovery information in different ways. For example, S705 includes at least one of the following four implementation methods.

第一种实现方式:目标策略包括基于第一时钟协议的链路发现策略,第一发现信息包括第一端口的指示信息,第二发现信息包括第二端口的指示信息,第一发现信息和第二发现信息中的至少一个发现信息包括第一端口与第二端口的对应关系。控制器根据第一发现信息包括的第一端口的指示信息确定第一网络设备的第一端口,控制器根据第二发现信息包括的第二端口的指示信息确定第二网络设备的第二端口,以及,控制器根据第一发现信息和/或第二发现信息包括的第一端口与第二端口的对应关系确定该第一端口与该第二端口对应。控制器确定该第一端口与该第二端口对应也即控制器确定第一端口与第二端口之间存在跨域链路。The first implementation method: the target strategy includes a link discovery strategy based on the first clock protocol, the first discovery information includes indication information of the first port, the second discovery information includes indication information of the second port, and at least one of the first discovery information and the second discovery information includes a correspondence between the first port and the second port. The controller determines the first port of the first network device according to the indication information of the first port included in the first discovery information, the controller determines the second port of the second network device according to the indication information of the second port included in the second discovery information, and the controller determines that the first port corresponds to the second port according to the correspondence between the first port and the second port included in the first discovery information and/or the second discovery information. The controller determines that the first port corresponds to the second port, that is, the controller determines that there is a cross-domain link between the first port and the second port.

第二种实现方式:目标策略包括基于第一发现协议的链路发现策略,第一发现信息包括第一端口的指示信息,第二发现信息包括第二端口的指示信息,第一发现信息和第二发现信息中的至少一个发现信息包括第一端口与第二端口的对应关系。控制器根据第一发现信息包括的第一端口的指示信息确定第一网络设备的第一端口,控制器根据第二发现信息包括的第二端口的指示信息确定第二网络设备的第二端口,以及,控制器根据第一发现信息和/或第二发现信息包括的第一端口与第二端口的对应关系确定该第一端口与该第二端口对应。控制器确定该第一端口与该第二端口对应也即控制器确定第一端口与第二端口之间存在跨域链路。The second implementation method: the target strategy includes a link discovery strategy based on the first discovery protocol, the first discovery information includes indication information of the first port, the second discovery information includes indication information of the second port, and at least one of the first discovery information and the second discovery information includes a correspondence between the first port and the second port. The controller determines the first port of the first network device according to the indication information of the first port included in the first discovery information, the controller determines the second port of the second network device according to the indication information of the second port included in the second discovery information, and the controller determines that the first port corresponds to the second port according to the correspondence between the first port and the second port included in the first discovery information and/or the second discovery information. The controller determines that the first port corresponds to the second port, that is, the controller determines that there is a cross-domain link between the first port and the second port.

第三种实现方式:目标策略包括基于端口流量统计的链路发现策略,第一发现信息包括第一端口的指示信息和第一端口在第一时间段内的流量分布曲线,第二发现信息包括第二端口的指示信息和第二端口在第一时间段内的流量分布曲线。控制器根据第一发现信息包括的第一端口的指示信息确定第一网络设备的第一端口,根据第二发现信息包括的第二端口的指示信息确定第二网络设备的第二端口,以及根据第一发现信息包括的第一端口在第一时间段内的流量分布曲线和第二发现信息包括的第二端口在第一时间段内的流量分布曲线确定该第一端口与该第二端口对应,从而控制器确定第一端口与第二端口之间存在跨域链路。示例的,控制器确定第一端口在第一时间段内的流量分布曲线与第二端口在第一时间段内的流量分布曲线匹配,例如,第一端口在第一时间段内的流量分布曲线与二端口在第一时间段内的流量分布曲线相同且二者在同一坐标系中重合,从而控制器确定该第一端口与该第二端口对应。 A third implementation method: the target strategy includes a link discovery strategy based on port traffic statistics, the first discovery information includes indication information of the first port and a traffic distribution curve of the first port in a first time period, and the second discovery information includes indication information of the second port and a traffic distribution curve of the second port in the first time period. The controller determines the first port of the first network device according to the indication information of the first port included in the first discovery information, determines the second port of the second network device according to the indication information of the second port included in the second discovery information, and determines that the first port corresponds to the second port according to the traffic distribution curve of the first port in the first time period included in the first discovery information and the traffic distribution curve of the second port in the first time period included in the second discovery information, so that the controller determines that there is a cross-domain link between the first port and the second port. For example, the controller determines that the traffic distribution curve of the first port in the first time period matches the traffic distribution curve of the second port in the first time period, for example, the traffic distribution curve of the first port in the first time period is the same as the traffic distribution curve of the second port in the first time period and the two overlap in the same coordinate system, so that the controller determines that the first port corresponds to the second port.

第四种实现方式:目标策略包括基于端口告警的链路发现策略,第一发现信息包括第一端口的指示信息和断开时间信息,该断开时间信息用于指示第一端口在第二时间段内断开,第二发现信息包括第二端口的指示信息和告警时间信息,该告警时间信息用于指示第二端口在第二时间段内发生告警。控制器根据第一发现信息包括的第一端口的指示信息确定第一网络设备的第一端口,控制器根据第二发现信息包括的第二端口的指示信息确定第二网络设备的第二端口,以及控制器根据第一发现信息包括的该断开时间信息和第二发现信息包括的该告警时间信息确定第一网络设备的第一端口与第二网络设备的第二端口对应,从而控制器确定第一端口与第二端口之间存在跨域链路。示例的,控制器根据该断开时间信息确定第一端口在第二时间段内断开且第一端口处于断开状态的持续时长等于第二时间段的时长,以及,控制器根据该告警时间信息确定第二端口在第二时间段内发生告警且第二端口发生告警的持续时长等于第二时间段的时长,从而控制器确定该第一端口与该第二端口对应。Fourth implementation: the target strategy includes a link discovery strategy based on port alarms, the first discovery information includes indication information and disconnection time information of the first port, the disconnection time information is used to indicate that the first port is disconnected within the second time period, and the second discovery information includes indication information and alarm time information of the second port, the alarm time information is used to indicate that the second port has an alarm within the second time period. The controller determines the first port of the first network device according to the indication information of the first port included in the first discovery information, the controller determines the second port of the second network device according to the indication information of the second port included in the second discovery information, and the controller determines that the first port of the first network device corresponds to the second port of the second network device according to the disconnection time information included in the first discovery information and the alarm time information included in the second discovery information, so that the controller determines that there is a cross-domain link between the first port and the second port. For example, the controller determines that the first port is disconnected within the second time period and the duration of the first port being in the disconnected state is equal to the duration of the second time period according to the disconnection time information, and the controller determines that the second port has an alarm within the second time period and the duration of the second port having an alarm is equal to the duration of the second time period according to the alarm time information, so that the controller determines that the first port corresponds to the second port.

可选的,第一发现信息还包括第一网络设备的指示信息,第二发现信息还包括第二网络设备的指示信息,在上述四种实现方式中,控制器还根据第一网络设备的指示信息确定第一网络设备,控制器还根据第二网络设备的指示信息确定第二网络设备,控制器根据第一发现信息确定第一端口属于第一网络设备,根据第二发现信息确定第二端口属于第二网络设备,从而控制器确定第一网络设备的第一端口与第二网络设备的第二端口之间存在跨域链路。Optionally, the first discovery information also includes indication information of the first network device, and the second discovery information also includes indication information of the second network device. In the above four implementation methods, the controller also determines the first network device based on the indication information of the first network device, and the controller also determines the second network device based on the indication information of the second network device. The controller determines that the first port belongs to the first network device based on the first discovery information, and determines that the second port belongs to the second network device based on the second discovery information, so that the controller determines that there is a cross-domain link between the first port of the first network device and the second port of the second network device.

综上所述,本申请实施例提供的技术方案,控制器根据第一网络域中的第一网络设备的第一端口支持的链路发现能力和第二网络域中的第二网络设备的第二端口支持的链路发现能力确定目标策略(也即跨域链路的发现策略),第一网络设备和第二网络设备根据目标策略获取链路发现信息,进而控制器根据第一网络设备和第二网络设备获取的链路发现信息确定跨域链路。也即,控制器根据不同网络域中的网络设备的网络端口支持的链路发现能力确定跨域链路的发现策略,网络设备根据控制器确定的跨域链路的发现策略获取链路发现信息,控制器根据网络设备获取的链路发现信息确定跨域链路,由此,确定跨域链路的发现策略的过程以及基于该发现策略发现跨域链路的过程均无需人工参与,无需工作人员熟悉网络情况,对工作人员的技能无额外要求,且确定的跨域链路的准确性较高。In summary, the technical solution provided by the embodiment of the present application is that the controller determines the target strategy (i.e., the discovery strategy of the cross-domain link) according to the link discovery capability supported by the first port of the first network device in the first network domain and the link discovery capability supported by the second port of the second network device in the second network domain, and the first network device and the second network device obtain link discovery information according to the target strategy, and then the controller determines the cross-domain link according to the link discovery information obtained by the first network device and the second network device. That is, the controller determines the discovery strategy of the cross-domain link according to the link discovery capability supported by the network ports of network devices in different network domains, the network device obtains link discovery information according to the discovery strategy of the cross-domain link determined by the controller, and the controller determines the cross-domain link according to the link discovery information obtained by the network device, thereby, the process of determining the discovery strategy of the cross-domain link and the process of discovering the cross-domain link based on the discovery strategy do not require manual participation, the staff does not need to be familiar with the network situation, there is no additional requirement for the skills of the staff, and the accuracy of the determined cross-domain link is high.

本申请实施例提供的技术方案,控制器根据网络端口支持的链路发现能力灵活的选择链路发现策略来发现跨域链路。控制器可以选择的链路发现策略包括基于第一时钟协议的链路发现策略,在该链路发现策略中,网络设备可以根据现网部署的第一时钟协议获取链路发现信息,无需额外配置即可发现跨域链路,操作过程简单且发现跨域链路的准确性较高,并且应用场景广泛,例如现网中90%的网络设备都支持时钟协议,因此本申请提供的链路发现方案可以应用于大部分网络场景,该链路发现方案的应用场景广泛,普适性较强。控制器可以选择的链路发现策略还包括基于第一发现协议的链路发现策略、基于端口流量统计的链路发现策略和基于端口告警的链路发现策略,这三种链路发现策略可以至少供剩余10%的网络设备发现跨域链路,如此一来,本申请的技术方案可以支持各种网络场景。The technical solution provided by the embodiment of the present application is that the controller flexibly selects the link discovery strategy to discover the cross-domain link according to the link discovery capability supported by the network port. The link discovery strategy that the controller can select includes a link discovery strategy based on the first clock protocol. In this link discovery strategy, the network device can obtain link discovery information according to the first clock protocol deployed in the existing network, and can discover the cross-domain link without additional configuration. The operation process is simple and the accuracy of discovering the cross-domain link is high, and the application scenarios are wide. For example, 90% of the network devices in the existing network support the clock protocol. Therefore, the link discovery solution provided by this application can be applied to most network scenarios. The application scenarios of this link discovery solution are wide and the universality is strong. The link discovery strategy that the controller can select also includes a link discovery strategy based on the first discovery protocol, a link discovery strategy based on port traffic statistics, and a link discovery strategy based on port alarms. These three link discovery strategies can be used at least for the remaining 10% of network devices to discover cross-domain links. In this way, the technical solution of this application can support various network scenarios.

请参考图9,其示出了本申请实施例提供的另一种链路发现方法的交互图。如图9所示,该方法包括如下步骤S901至S915。Please refer to Figure 9, which shows an interaction diagram of another link discovery method provided by an embodiment of the present application. As shown in Figure 9, the method includes the following steps S901 to S915.

S901.第一网络设备向第一控制器发送第一能力信息,第一能力信息用于指示第一网络设备的第一端口支持的链路发现能力。S901. A first network device sends first capability information to a first controller, where the first capability information is used to indicate a link discovery capability supported by a first port of the first network device.

第一网络设备在第一网络域中,第一控制器是第一网络域的控制器。第一端口支持的链路发现能力包括以下至少一种:第一时钟协议、第一发现协议、端口流量统计和端口告警。The first network device is in the first network domain, and the first controller is the controller of the first network domain. The link discovery capability supported by the first port includes at least one of the following: a first clock protocol, a first discovery protocol, port traffic statistics, and a port alarm.

S902.第一控制器向跨域控制器发送第一能力信息。S902. The first controller sends first capability information to the cross-domain controller.

S903.第二网络设备向第二控制器发送第二能力信息,第二能力信息用于指示第二网络设备的第二端口支持的链路发现能力。S903. The second network device sends second capability information to the second controller, where the second capability information is used to indicate a link discovery capability supported by a second port of the second network device.

其中,第二网络设备在第二网络域中,第二控制器是第二网络域的控制器。第一网络域的网络类型与第二网络域的网络类型不同。例如,第一网络域和第二网络域中的一个网络域是光网络域,另一个网络域是IP网络域。第二端口支持的链路发现能力包括以下至少一种:第一时钟协议、第一发现协议、端口流量统计和端口告警。The second network device is in the second network domain, and the second controller is a controller of the second network domain. The network type of the first network domain is different from the network type of the second network domain. For example, one of the first network domain and the second network domain is an optical network domain, and the other network domain is an IP network domain. The link discovery capability supported by the second port includes at least one of the following: a first clock protocol, a first discovery protocol, port traffic statistics, and a port alarm.

S904.第二控制器向跨域控制器发送第二能力信息。S904. The second controller sends second capability information to the cross-domain controller.

S905.跨域控制器根据第一能力信息和第二能力信息确定目标策略,该目标策略用于指示基于目标策略 发现第一网络域与第二网络域之间的跨域链路。S905. The cross-domain controller determines a target policy based on the first capability information and the second capability information, where the target policy is used to indicate A cross-domain link between a first network domain and a second network domain is discovered.

S906.跨域控制器向第一控制器和第二控制器分别发送目标策略。S906. The cross-domain controller sends the target policy to the first controller and the second controller respectively.

S907.第一控制器向第一网络设备发送目标策略。S907. The first controller sends the target policy to the first network device.

S908.第二控制器向第二网络设备发送目标策略。S908. The second controller sends the target policy to the second network device.

S909.第一网络设备基于目标策略获取第一发现信息。S909. The first network device obtains first discovery information based on the target policy.

其中,第一发现信息是第一网络域与第二网络域之间的跨域链路的发现信息。The first discovery information is discovery information of a cross-domain link between the first network domain and the second network domain.

S910.第一网络设备向第一控制器发送第一发现信息。S910. The first network device sends first discovery information to the first controller.

S911.第一控制器向跨域控制器发送第一发现信息。S911. The first controller sends first discovery information to the cross-domain controller.

S912.第二网络设备基于目标策略获取第二发现信息。S912. The second network device obtains second discovery information based on the target policy.

其中,第二发现信息是第一网络域与第二网络域之间的跨域链路的发现信息。The second discovery information is discovery information of a cross-domain link between the first network domain and the second network domain.

S913.第二网络设备向第二控制器发送第二发现信息。S913. The second network device sends second discovery information to the second controller.

S914.第二控制器向跨域控制器发送第二发现信息。S914. The second controller sends second discovery information to the cross-domain controller.

S915.跨域控制器根据第一发现信息和第二发现信息确定第一端口与第二端口之间的跨域链路。S915. The cross-domain controller determines a cross-domain link between the first port and the second port according to the first discovery information and the second discovery information.

上述S901至S915的详细实现过程可以参考图7和图8所示实施例,这里不做赘述。The detailed implementation process of the above S901 to S915 can refer to the embodiments shown in Figures 7 and 8, and will not be repeated here.

需要说明的是,本申请实施例中,某一网络端口支持某一链路发现能力指的是该某一网络端口从硬件上支持该某一链路发现能力,且在执行本申请的链路发现方案之前该某一网络端口使能了该某一链路发现能力。例如,第一端口支持基于第一时钟协议的链路发现能力指的是第一端口从硬件上支持第一时钟协议,且在执行本申请的链路发现方案之前第一端口使能了基于第一时钟协议的链路发现能力。可选的,如果某一网络端口从硬件上支持某一链路发现能力,但是在执行本申请的链路发现方案之前该某一网络端口未使能该某一链路发现能力,则本申请还支持由控制器控制某一网络端口使能该某一链路发现能力。示例的,该控制器向该某一网络端口所在的网络设备发送使能信息,该网络设备根据该使能信息使能该某一网络端口的该某一链路发现能力。例如该控制器是跨域控制器,该某一网络端口所在的网络设备位于第一网络域中,该跨域控制器通过第一控制器向该某一网络端口所在的网络设备发送使能信息。此外,本申请还支持由跨域控制器、第一控制器和第二控制器协同进行网络配置。例如,第一控制器收集第一网络域的信息并向跨域控制器发送第一网络域的信息,该跨域控制器根据第一网络域的信息向第一控制器下发配置命令,第一控制器根据该跨域控制器下发的配置命令对第一网络域进行配置。同理,第二控制器收集第二网络域的信息并向跨域控制器发送第二网络域的信息,该跨域控制器根据第二网络域的信息向第二控制器下发配置命令,第二控制器根据该跨域控制器下发的配置命令对第二网络域进行配置。It should be noted that, in the embodiment of the present application, a certain network port supports a certain link discovery capability, which means that the certain network port supports the certain link discovery capability from the hardware, and the certain network port enables the certain link discovery capability before executing the link discovery scheme of the present application. For example, the first port supports the link discovery capability based on the first clock protocol, which means that the first port supports the first clock protocol from the hardware, and the first port enables the link discovery capability based on the first clock protocol before executing the link discovery scheme of the present application. Optionally, if a certain network port supports a certain link discovery capability from the hardware, but the certain network port does not enable the certain link discovery capability before executing the link discovery scheme of the present application, the present application also supports the controller controlling a certain network port to enable the certain link discovery capability. For example, the controller sends an enabling information to the network device where the certain network port is located, and the network device enables the certain link discovery capability of the certain network port according to the enabling information. For example, the controller is a cross-domain controller, the network device where the certain network port is located is located in the first network domain, and the cross-domain controller sends enabling information to the network device where the certain network port is located through the first controller. In addition, the present application also supports the cross-domain controller, the first controller and the second controller to collaboratively perform network configuration. For example, the first controller collects information about the first network domain and sends the information about the first network domain to the cross-domain controller. The cross-domain controller sends a configuration command to the first controller based on the information about the first network domain, and the first controller configures the first network domain according to the configuration command sent by the cross-domain controller. Similarly, the second controller collects information about the second network domain and sends the information about the second network domain to the cross-domain controller. The cross-domain controller sends a configuration command to the second controller based on the information about the second network domain, and the second controller configures the second network domain according to the configuration command sent by the cross-domain controller.

以上是对本申请的方法实施例的介绍。下面介绍本申请的装置实施例,本申请的装置可以用于执行本申请的方法。对于装置实施例中未披露的细节请参照方法实施例。The above is an introduction to the method embodiment of the present application. The following is an introduction to the device embodiment of the present application, which can be used to execute the method of the present application. For details not disclosed in the device embodiment, please refer to the method embodiment.

请参考图10,其示出了本申请实施例提供的一种链路发现装置1000的示意图。链路发现装置1000应用于控制器。例如链路发现装置1000是控制器或者是该控制器中的功能组件。参见图10,链路发现装置1000包括获取模块1010和确定模块1020。Please refer to FIG. 10 , which shows a schematic diagram of a link discovery device 1000 provided in an embodiment of the present application. The link discovery device 1000 is applied to a controller. For example, the link discovery device 1000 is a controller or a functional component in the controller. Referring to FIG. 10 , the link discovery device 1000 includes an acquisition module 1010 and a determination module 1020 .

获取模块1010,用于获取第一发现信息和第二发现信息,第一发现信息是第一网络设备基于时钟协议报文获取的第一链路的发现信息,第二发现信息是第二网络设备基于该时钟协议报文获取的第一链路的发现信息,第一网络设备在第一网络域中,第二网络设备在第二网络域中,第一网络域的网络类型与第二网络域的网络类型不同,第一链路是第一网络设备的第一端口与第二网络设备的第二端口之间的跨域链路。获取模块1010的功能实现可以参考上述S301中的相关描述。The acquisition module 1010 is used to acquire first discovery information and second discovery information, wherein the first discovery information is discovery information of a first link acquired by a first network device based on a clock protocol message, and the second discovery information is discovery information of a first link acquired by a second network device based on the clock protocol message, wherein the first network device is in a first network domain, and the second network device is in a second network domain, and the network type of the first network domain is different from the network type of the second network domain, and the first link is a cross-domain link between a first port of the first network device and a second port of the second network device. The functional implementation of the acquisition module 1010 may refer to the relevant description in the above S301.

确定模块1020,用于根据第一发现信息和第二发现信息确定第一链路。确定模块1020的功能实现可以参考上述S302中的相关描述。The determination module 1020 is configured to determine the first link according to the first discovery information and the second discovery information. The implementation of the function of the determination module 1020 may refer to the relevant description in the above S302.

可选的,第一发现信息包括第一端口的指示信息,第二发现信息包括第二端口的指示信息,第一发现信息和第二发现信息中的至少一个发现信息包括第一端口与第二端口的对应关系,确定模块1020,用于:根据第一端口的指示信息确定第一网络设备的第一端口;根据第二端口的指示信息确定第二网络设备的第二端口;根据该对应关系确定第一端口与第二端口对应。Optionally, the first discovery information includes indication information of the first port, the second discovery information includes indication information of the second port, and at least one of the first discovery information and the second discovery information includes a correspondence between the first port and the second port. The determination module 1020 is used to: determine the first port of the first network device according to the indication information of the first port; determine the second port of the second network device according to the indication information of the second port; and determine that the first port corresponds to the second port according to the correspondence.

可选的,第一发现信息还包括第一网络设备的指示信息,第二发现信息还包括第二网络设备的指示信 息,确定模块1020,还用于:根据第一网络设备的指示信息确定第一网络设备;Optionally, the first discovery information further includes indication information of the first network device, and the second discovery information further includes indication information of the second network device. The determining module 1020 is further configured to: determine the first network device according to the indication information of the first network device;

根据第二网络设备的指示信息确定第二网络设备。The second network device is determined according to the indication information of the second network device.

可选的,请继续参考图10,链路发现装置1000还包括:发送模块1030,用于在获取模块1010获取第一发现信息和第二发现信息之前,向第一网络设备和第二网络设备发送目标策略,该目标策略用于指示第一网络设备和第二网络设备基于第一时钟协议发现第一网络域与第二网络域之间的跨域链路,上述时钟协议报文是基于第一时钟协议的报文。发送模块1030的功能实现可以参考上述S303中的相关描述。Optionally, please continue to refer to Figure 10, the link discovery device 1000 also includes: a sending module 1030, which is used to send a target policy to the first network device and the second network device before the acquisition module 1010 acquires the first discovery information and the second discovery information, and the target policy is used to instruct the first network device and the second network device to discover the cross-domain link between the first network domain and the second network domain based on the first clock protocol, and the above-mentioned clock protocol message is a message based on the first clock protocol. The functional implementation of the sending module 1030 can refer to the relevant description in the above S303.

可选的,获取模块1010,还用于在发送模块1030向第一网络设备和第二网络设备发送目标策略之前获取第一能力信息和第二能力信息,第一能力信息用于指示第一端口支持第一时钟协议,第二能力信息用于指示第二端口支持第一时钟协议。获取模块1010的功能实现可以参考上述S304中的相关描述。Optionally, the acquisition module 1010 is further used to acquire first capability information and second capability information before the sending module 1030 sends the target policy to the first network device and the second network device, the first capability information being used to indicate that the first port supports the first clock protocol, and the second capability information being used to indicate that the second port supports the first clock protocol. The functional implementation of the acquisition module 1010 may refer to the relevant description in the above S304.

确定模块1020,还用于根据第一能力信息和第二能力信息确定目标策略。确定模块1020的功能实现可以参考上述S305中的相关描述。The determination module 1020 is further configured to determine a target policy according to the first capability information and the second capability information. The implementation of the function of the determination module 1020 may refer to the relevant description in the above S305.

可选的,所述控制器是跨域控制器,获取模块1010,用于:接收第一控制器发送的第一发现信息,第一控制器是第一网络域的控制器;接收第二控制器发送的第二发现信息,第二控制器是第二网络域的控制器。Optionally, the controller is a cross-domain controller, and the acquisition module 1010 is used to: receive first discovery information sent by a first controller, where the first controller is a controller of a first network domain; and receive second discovery information sent by a second controller, where the second controller is a controller of a second network domain.

可选的,跨域控制器、第一控制器和第二控制器是三个不同的控制器。Optionally, the cross-domain controller, the first controller and the second controller are three different controllers.

可选的,跨域控制器、第一控制器和第二控制器中的至少两个是一台控制器。例如,跨域控制器是一台控制器,第一控制器和第二控制器是同一台控制器;或者,跨域控制器、第一控制器和第二控制器是一台控制器。Optionally, at least two of the cross-domain controller, the first controller, and the second controller are one controller. For example, the cross-domain controller is one controller, and the first controller and the second controller are the same controller; or, the cross-domain controller, the first controller, and the second controller are one controller.

可选的,第一网络域和第二网络域中的一个网络域是光网络域,另一个网络域是IP网络域。Optionally, one of the first network domain and the second network domain is an optical network domain, and the other network domain is an IP network domain.

可选的,第一网络域和第二网络域中的一个网络域是无线网络域,另一个网络域是有线网络域。Optionally, one of the first network domain and the second network domain is a wireless network domain, and the other network domain is a wired network domain.

综上所述,本申请实施例提供的技术方案,第一网络域中的第一网络设备和第二网络域中的第二网络设备基于时钟协议报文获取链路发现信息,控制器根据第一网络设备和第二网络设备获取的链路发现信息确定第一网络设备的第一端口与第二网络设备的第二端口之间的跨域链路。也即,本申请实施例由控制器与网络设备协同工作基于时钟协议报文发现跨域链路。由于大部分的网络设备都支持时钟协议,因此本申请实施例提供的链路发现方案可以应用于大部分网络场景,该链路发现方案的应用场景广泛,普适性较强。In summary, the technical solution provided by the embodiment of the present application is that the first network device in the first network domain and the second network device in the second network domain obtain link discovery information based on the clock protocol message, and the controller determines the cross-domain link between the first port of the first network device and the second port of the second network device according to the link discovery information obtained by the first network device and the second network device. That is, in the embodiment of the present application, the controller and the network device work together to discover the cross-domain link based on the clock protocol message. Since most network devices support the clock protocol, the link discovery solution provided by the embodiment of the present application can be applied to most network scenarios, and the link discovery solution has a wide range of application scenarios and strong universality.

请参考图11,其示出了本申请实施例提供的另一种链路发现装置1100的示意图。链路发现装置1100应用于控制器。例如链路发现装置1100是控制器或者是该控制器中的功能组件。参见图11,链路发现装置1100包括获取模块1110和发送模块1120。Please refer to FIG. 11 , which shows a schematic diagram of another link discovery device 1100 provided in an embodiment of the present application. The link discovery device 1100 is applied to a controller. For example, the link discovery device 1100 is a controller or a functional component in the controller. Referring to FIG. 11 , the link discovery device 1100 includes an acquisition module 1110 and a sending module 1120.

获取模块1110,用于获取第一能力信息和第二能力信息,第一能力信息用于指示第一网络设备的第一端口支持的链路发现能力,第二能力信息用于指示第二网络设备的第二端口支持的链路发现能力,第一网络设备在第一网络域中,第二网络设备在第二网络域中,第一网络域的网络类型与第二网络域的网络类型不同。获取模块1110的功能实现可以参考上述S701中的相关描述。The acquisition module 1110 is used to acquire first capability information and second capability information, wherein the first capability information is used to indicate a link discovery capability supported by a first port of a first network device, and the second capability information is used to indicate a link discovery capability supported by a second port of a second network device, wherein the first network device is in a first network domain, and the second network device is in a second network domain, and a network type of the first network domain is different from a network type of the second network domain. The functional implementation of the acquisition module 1110 may refer to the relevant description in the above S701.

发送模块1120,用于向第一网络设备和第二网络设备发送目标策略,该目标策略用于指示第一网络设备和第二网络设备基于目标策略发现第一网络域与第二网络域之间的跨域链路,该目标策略根据第一能力信息和第二能力信息确定。发送模块1120的功能实现可以参考上述S703中的相关描述。The sending module 1120 is used to send a target policy to the first network device and the second network device, where the target policy is used to instruct the first network device and the second network device to discover a cross-domain link between the first network domain and the second network domain based on the target policy, where the target policy is determined according to the first capability information and the second capability information. The functional implementation of the sending module 1120 can refer to the relevant description in S703 above.

可选的,目标策略包括以下至少一种:基于第一时钟协议的链路发现策略;基于第一发现协议的链路发现策略;基于端口流量统计的链路发现策略;基于端口告警的链路发现策略。Optionally, the target strategy includes at least one of the following: a link discovery strategy based on a first clock protocol; a link discovery strategy based on a first discovery protocol; a link discovery strategy based on port traffic statistics; a link discovery strategy based on port alarms.

可选的,请继续参考图11,链路发现装置1100还包括:确定模块1130,用于在发送模块1120向第一网络设备和第二网络设备发送目标策略之前,根据第一能力信息和第二能力信息确定目标策略。确定模块1130的功能实现可以参考上述S702中的相关描述。Optionally, please continue to refer to Figure 11, the link discovery device 1100 also includes: a determination module 1130, which is used to determine the target policy according to the first capability information and the second capability information before the sending module 1120 sends the target policy to the first network device and the second network device. The functional implementation of the determination module 1130 can refer to the relevant description in the above S702.

可选的,确定模块1130,用于:Optionally, the determination module 1130 is configured to:

当第一能力信息用于指示第一端口支持基于第一时钟协议的链路发现能力且第二能力信息用于指示第二端口支持基于第一时钟协议的链路发现能力时,确定目标策略包括基于第一时钟协议的链路发现策略;和/或,When the first capability information is used to indicate that the first port supports a link discovery capability based on a first clock protocol and the second capability information is used to indicate that the second port supports a link discovery capability based on the first clock protocol, determining that the target strategy includes a link discovery strategy based on the first clock protocol; and/or,

当第一能力信息用于指示第一端口支持基于第一发现协议的链路发现能力且第二能力信息用于指示第二端口支持基于第一发现协议的链路发现能力时,确定目标策略包括基于第一发现协议的链路发现策略; 和/或,When the first capability information is used to indicate that the first port supports a link discovery capability based on a first discovery protocol and the second capability information is used to indicate that the second port supports a link discovery capability based on the first discovery protocol, determining that the target policy includes a link discovery policy based on the first discovery protocol; and / or,

当第一能力信息用于指示第一端口支持基于端口流量统计的链路发现能力且第二能力信息用于指示第二端口支持基于端口流量统计的链路发现能力时,器确定目标策略包括基于端口流量统计的链路发现策略;和/或,When the first capability information is used to indicate that the first port supports a link discovery capability based on port traffic statistics and the second capability information is used to indicate that the second port supports a link discovery capability based on port traffic statistics, the device determines that the target strategy includes a link discovery strategy based on port traffic statistics; and/or,

当第一能力信息用于指示第一端口支持基于端口告警的链路发现能力且第二能力信息用于指示第二端口支持基于端口告警的链路发现能力时,确定目标策略包括基于端口告警的链路发现策略。When the first capability information is used to indicate that the first port supports a link discovery capability based on port alarms and the second capability information is used to indicate that the second port supports a link discovery capability based on port alarms, it is determined that the target policy includes a link discovery policy based on port alarms.

可选的,获取模块1110,还用于在发送模块1120向第一网络设备和第二网络设备发送目标策略之后,获取第一发现信息和第二发现信息,第一发现信息是第一网络设备基于目标策略获取的第一网络域与第二网络域之间的跨域链路的发现信息,第二发现信息是第二网络设备基于该目标策略获取的该跨域链路的发现信息。获取模块1110的功能实现可以参考上述S704中的相关描述。Optionally, the acquisition module 1110 is further used to acquire first discovery information and second discovery information after the sending module 1120 sends the target policy to the first network device and the second network device, the first discovery information being the discovery information of the cross-domain link between the first network domain and the second network domain acquired by the first network device based on the target policy, and the second discovery information being the discovery information of the cross-domain link acquired by the second network device based on the target policy. The functional implementation of the acquisition module 1110 may refer to the relevant description in S704 above.

确定模块1130,还用于根据第一发现信息和第二发现信息确定跨域链路。确定模块1130的功能实现可以参考上述S705中的相关描述。The determination module 1130 is further configured to determine the cross-domain link according to the first discovery information and the second discovery information. The implementation of the function of the determination module 1130 may refer to the relevant description in the above S705.

可选的,目标策略包括基于第一时钟协议的链路发现策略,第一发现信息包括第一端口的指示信息,第二发现信息包括第二端口的指示信息,第一发现信息和第二发现信息中的至少一个发现信息包括第一端口与第二端口的对应关系,确定模块1130,用于:根据该第一端口的指示信息确定第一网络设备的该第一端口;根据该第二端口的指示信息确定第二网络设备的该第二端口;根据该对应关系确定该第一端口与该第二端口对应。Optionally, the target strategy includes a link discovery strategy based on a first clock protocol, the first discovery information includes indication information of the first port, the second discovery information includes indication information of the second port, at least one of the first discovery information and the second discovery information includes a correspondence between the first port and the second port, and the determination module 1130 is used to: determine the first port of the first network device according to the indication information of the first port; determine the second port of the second network device according to the indication information of the second port; and determine that the first port corresponds to the second port according to the correspondence.

可选的,目标策略包括基于第一发现协议的链路发现策略,第一发现信息包括第一端口的指示信息,第二发现信息包括第二端口的指示信息,第一发现信息和第二发现信息中的至少一个发现信息包括第一端口与第二端口的对应关系,确定模块1130,用于:根据该第一端口的指示信息确定第一网络设备的该第一端口;根据该第二端口的指示信息确定第二网络设备的该第二端口;根据该对应关系确定该第一端口与该第二端口对应。Optionally, the target strategy includes a link discovery strategy based on a first discovery protocol, the first discovery information includes indication information of the first port, the second discovery information includes indication information of the second port, at least one of the first discovery information and the second discovery information includes a correspondence between the first port and the second port, and the determination module 1130 is used to: determine the first port of the first network device according to the indication information of the first port; determine the second port of the second network device according to the indication information of the second port; and determine that the first port corresponds to the second port according to the correspondence.

可选的,目标策略包括基于端口流量统计的链路发现策略,第一发现信息包括第一端口的指示信息和第一端口在第一时间段内的流量分布曲线,第二发现信息包括第二端口的指示信息和第二端口在第一时间段内的流量分布曲线,确定模块1130,用于:根据该第一端口的指示信息确定第一网络设备的该第一端口;根据该第二端口的指示信息确定第二网络设备的该第二端口;根据该第一端口在第一时间段内的流量分布曲线与该第二端口在第一时间段内的流量分布曲线确定该第一端口与该第二端口对应。Optionally, the target strategy includes a link discovery strategy based on port traffic statistics, the first discovery information includes indication information of the first port and a traffic distribution curve of the first port in a first time period, the second discovery information includes indication information of the second port and a traffic distribution curve of the second port in the first time period, and the determination module 1130 is used to: determine the first port of the first network device according to the indication information of the first port; determine the second port of the second network device according to the indication information of the second port; determine the correspondence between the first port and the second port according to the traffic distribution curve of the first port in the first time period and the traffic distribution curve of the second port in the first time period.

可选的,目标策略包括基于端口告警的链路发现策略,第一发现信息包括第一端口的指示信息和断开时间信息,该断开时间信息用于指示第一端口在第二时间段内断开,第二发现信息包括第二端口的指示信息和告警时间信息,该告警时间信息用于指示第二端口在第二时间段内发生告警,确定模块1130,用于:根据该第一端口的指示信息确定第一网络设备的该第一端口;根据该第二端口的指示信息确定第二网络设备的该第二端口;根据该断开时间信息和该告警时间信息确定该第一端口与该第二端口对应。Optionally, the target strategy includes a link discovery strategy based on port alarms, the first discovery information includes indication information and disconnection time information of the first port, the disconnection time information is used to indicate that the first port is disconnected within a second time period, the second discovery information includes indication information and alarm time information of the second port, the alarm time information is used to indicate that an alarm occurs on the second port within the second time period, and the determination module 1130 is used to: determine the first port of the first network device according to the indication information of the first port; determine the second port of the second network device according to the indication information of the second port; and determine that the first port corresponds to the second port according to the disconnection time information and the alarm time information.

可选的,第一发现信息还包括第一网络设备的指示信息,第二发现信息还包括第二网络设备的指示信息,确定模块1130,还用于:根据第一网络设备的指示信息确定第一网络设备;Optionally, the first discovery information further includes indication information of the first network device, and the second discovery information further includes indication information of the second network device. The determination module 1130 is further configured to: determine the first network device according to the indication information of the first network device;

根据第二网络设备的指示信息确定第二网络设备。The second network device is determined according to the indication information of the second network device.

可选的,所述控制器是跨域控制器,获取模块1110,用于:Optionally, the controller is a cross-domain controller, and the acquisition module 1110 is used to:

接收第一控制器发送的第一能力信息,第一控制器是第一网络域的控制器;receiving first capability information sent by a first controller, where the first controller is a controller of a first network domain;

接收第二控制器发送的第二能力信息,第二控制器是第二网络域的控制器。Second capability information sent by a second controller is received, where the second controller is a controller of a second network domain.

可选的,跨域控制器、第一控制器和第二控制器是三个不同的控制器。Optionally, the cross-domain controller, the first controller and the second controller are three different controllers.

可选的,跨域控制器、第一控制器和第二控制器中的至少两个是一台控制器。例如,跨域控制器是一台控制器,第一控制器和第二控制器是同一台控制器;或者,跨域控制器、第一控制器和第二控制器是一台控制器。Optionally, at least two of the cross-domain controller, the first controller, and the second controller are one controller. For example, the cross-domain controller is one controller, and the first controller and the second controller are the same controller; or, the cross-domain controller, the first controller, and the second controller are one controller.

可选的,第一网络域和第二网络域中的一个网络域是光网络域,另一个网络域是IP网络域。Optionally, one of the first network domain and the second network domain is an optical network domain, and the other network domain is an IP network domain.

可选的,第一网络域和第二网络域中的一个网络域是无线网络域,另一个网络域是有线网络域。Optionally, one of the first network domain and the second network domain is a wireless network domain, and the other network domain is a wired network domain.

综上所述,本申请实施例提供的技术方案,控制器根据不同网络域中的网络设备的网络端口支持的链路发现能力确定目标策略(也即跨域链路的发现策略),确定跨域链路的发现策略的过程无需人工参与,无需工作人员熟悉网络情况,对工作人员的技能无额外要求。网络设备根据控制器确定的目标策略获取链 路发现信息,控制器根据网络设备获取的链路发现信息确定跨域链路,确定跨域链路的过程无需人工参与,对工作人员的技能无额外要求。In summary, the technical solution provided by the embodiment of the present application is that the controller determines the target strategy (i.e., the cross-domain link discovery strategy) according to the link discovery capabilities supported by the network ports of network devices in different network domains. The process of determining the cross-domain link discovery strategy does not require manual participation, does not require the staff to be familiar with the network situation, and does not require additional skills for the staff. The network device obtains the link discovery strategy according to the target strategy determined by the controller. The controller determines the cross-domain link based on the link discovery information obtained by the network device. The process of determining the cross-domain link does not require manual participation and has no additional requirements on the skills of the staff.

本申请实施例提供的链路发现装置还可以用专用集成电路(application-specific integrated circuit,ASIC)或可编程逻辑器件(programmable logic device,PLD)实现。上述PLD可以是复杂程序逻辑器件(complex programmable logical device,CPLD),现场可编程门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。也可以通过软件实现上述方法实施例提供的方法,当通过软件实现上述方法实施例提供的方法时,上述链路发现装置中的各个模块也可以为软件模块。The link discovery device provided in the embodiment of the present application can also be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The above-mentioned PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. The method provided in the above-mentioned method embodiment can also be implemented by software. When the method provided in the above-mentioned method embodiment is implemented by software, each module in the above-mentioned link discovery device can also be a software module.

本申请实施例提供了一种链路发现装置,包括存储器和处理器;该存储器用于存储计算机程序;该处理器用于执行该存储器中存储的计算机程序以使得该链路发现装置执行上述方法实施例提供的链路发现方法的全部或部分步骤。An embodiment of the present application provides a link discovery device, including a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory so that the link discovery device performs all or part of the steps of the link discovery method provided by the above method embodiment.

示例的,请参考图12,其示出了本申请实施例提供的一种链路发现装置1200的示意图。链路发现装置1200是控制器或该控制器中的功能组件。链路发现装置1200包括处理器1201、存储器1202、总线1203、网络接口1204和输入输出设备1205。处理器1201、存储器1202、网络接口1204和输入输出设备1205通过总线1203连接。图12以处理器1201和存储器1202相互独立说明。处理器1201和存储器1202也可以集成在一起。For example, please refer to Figure 12, which shows a schematic diagram of a link discovery device 1200 provided in an embodiment of the present application. The link discovery device 1200 is a controller or a functional component in the controller. The link discovery device 1200 includes a processor 1201, a memory 1202, a bus 1203, a network interface 1204, and an input-output device 1205. The processor 1201, the memory 1202, the network interface 1204, and the input-output device 1205 are connected via the bus 1203. Figure 12 illustrates that the processor 1201 and the memory 1202 are independent of each other. The processor 1201 and the memory 1202 can also be integrated together.

存储器1202用于存储计算机程序,计算机程序包括操作系统和程序代码。存储器1202是各种类型的存储介质,例如存储器1202是随机存取存储器(random access memory,RAM)、只读存储器(read-only memory,ROM)、非易失性随机存取存储器(non-volatile random access memory,NVRAM)、可编程只读存储器(programmable read-only memory,PROM)、可擦除可编程只读存储器(erasable programmable read-only memory,EPROM)、电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only Memory,CD-ROM)、闪存、寄存器、光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘或者其它磁存储设备。The memory 1202 is used to store computer programs, which include operating systems and program codes. The memory 1202 is a storage medium of various types, such as random access memory (RAM), read-only memory (ROM), non-volatile random access memory (NVRAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), flash memory, register, optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), disk or other magnetic storage device.

处理器1201是通用处理器或专用处理器。通用处理器是通过读取并执行存储器中存储的计算机程序来执行特定步骤和/或操作的处理器,通用处理器在执行上述步骤和/或操作的过程中可能用到存储在存储器中的计算机程序。计算机程序例如被执行以实现前述获取模块和确定模块的相关功能。通用处理器例如但不限于中央处理器(central processing unit,CPU)。专用处理器是专门设计的用于执行特定步骤和/或操作的处理器,专用处理器例如但不限于,数字信号处理器(digital signal processor,DSP)、专用集成电路(application-specific integrated circuit,ASIC)、复杂程序逻辑器件(complex programmable logical device,CPLD)、现场可编程门阵列(field-programmable gate array,FPGA)、通用阵列逻辑(generic array logic,GAL)或其任意组合。处理器1201可能是单核(single-CPU)处理器,也可能是多核(multi-CPU)处理器。处理器1201包括至少一个电路,以执行上述实施例提供链路发现方法的全部或部分步骤。Processor 1201 is a general-purpose processor or a special-purpose processor. A general-purpose processor is a processor that performs specific steps and/or operations by reading and executing a computer program stored in a memory. The general-purpose processor may use a computer program stored in a memory in the process of performing the above steps and/or operations. The computer program is executed, for example, to implement the related functions of the aforementioned acquisition module and determination module. A general-purpose processor is, for example, but not limited to, a central processing unit (CPU). A special-purpose processor is a processor specially designed to perform specific steps and/or operations. A special-purpose processor is, for example, but not limited to, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. Processor 1201 may be a single-CPU processor or a multi-CPU processor. The processor 1201 includes at least one circuit to execute all or part of the steps of the link discovery method provided in the above embodiment.

网络接口1204用于链路发现装置1200与其他设备通信。网络接口1204包括物理接口和逻辑接口。物理接口可以是千兆的以太接口(gigabit Ethernet,GE),其用于可以实现链路发现装置1200与其他设备互连,逻辑接口可以是链路发现装置1200内部的接口,其可以用于实现链路发现装置1200内部的器件互连。容易理解,网络接口1204可以用于链路发现装置1200与其他设备通信,例如,网络接口1204用于链路发现装置1200与其他设备之间信息的发送和接收,网络接口1204可以实现前述发送模块的相关功能。The network interface 1204 is used for the link discovery device 1200 to communicate with other devices. The network interface 1204 includes a physical interface and a logical interface. The physical interface may be a gigabit Ethernet interface (GE), which is used to interconnect the link discovery device 1200 with other devices, and the logical interface may be an interface inside the link discovery device 1200, which is used to interconnect the devices inside the link discovery device 1200. It is easy to understand that the network interface 1204 can be used for the link discovery device 1200 to communicate with other devices, for example, the network interface 1204 is used to send and receive information between the link discovery device 1200 and other devices, and the network interface 1204 can implement the related functions of the aforementioned sending module.

输入输出设备1205包括输入/输出(input/output,I/O)接口、通过I/O接口与链路发现装置1200连接的诸如键盘、鼠标、显示器等设备,以及通过总线与处理器1201连接的诸如显示器等设备,处理器1201能够通过输入输出设备1205接收输入的命令或数据,并输出处理后数据。例如,输入输出设备1205包括显示器,显示器能够用于显示处理器1201执行上述链路发现方法产生的中间结果和/或最终结果等。The input/output device 1205 includes an input/output (I/O) interface, devices such as a keyboard, a mouse, and a display connected to the link discovery device 1200 through the I/O interface, and devices such as a display connected to the processor 1201 through a bus. The processor 1201 can receive input commands or data through the input/output device 1205 and output processed data. For example, the input/output device 1205 includes a display, which can be used to display intermediate results and/or final results generated by the processor 1201 executing the above-mentioned link discovery method.

总线1203是任何类型的,用于实现链路发现装置1200的内部器件互连的通信总线。例如系统总 线。本申请实施例以链路发现装置1200内部的上述器件通过总线1203互连为例说明,链路发现装置1200内部的上述器件采用其他连接方式彼此连接,例如链路发现装置1200内部的上述器件通过链路发现装置1200内部的逻辑接口互连。The bus 1203 is any type of communication bus used to interconnect the internal components of the link discovery device 1200. The embodiment of the present application takes the above-mentioned devices in the link discovery device 1200 being interconnected through the bus 1203 as an example, and the above-mentioned devices in the link discovery device 1200 are connected to each other using other connection methods, for example, the above-mentioned devices in the link discovery device 1200 are interconnected through a logical interface inside the link discovery device 1200.

上述器件可以分别设置在彼此独立的芯片上,也可以至少部分的或者全部的设置在同一块芯片上。将各个器件独立设置在不同的芯片上,还是整合设置在一个或者多个芯片上,往往取决于产品设计的需要。本申请实施例对上述器件的具体实现形式不做限定。The above devices may be arranged on independent chips, or at least partially or completely on the same chip. Whether to arrange each device independently on different chips or to integrate them on one or more chips often depends on the needs of product design. The embodiments of the present application do not limit the specific implementation form of the above devices.

图12所示的链路发现装置1200仅仅是示例性的,链路发现装置1200还可能包括其他组件,本文不再一一列举。图12所示的链路发现装置1200可以通过执行上述实施例提供链路发现方法的全部或部分步骤来发现不同类型的网络域之间的跨域链路。The link discovery device 1200 shown in FIG12 is merely exemplary, and the link discovery device 1200 may also include other components, which are not listed here. The link discovery device 1200 shown in FIG12 can discover cross-domain links between different types of network domains by executing all or part of the steps of the link discovery method provided in the above embodiment.

本申请实施例提供了一种链路发现系统,包括控制器、第一网络设备和第二网络设备。第一网络设备在第一网络域中,第二网络设备在第二网络域中,第一网络域的网络类型与第二网络域的网络类型不同。该控制器包括如图10至图12任一所示的链路发现装置。The embodiment of the present application provides a link discovery system, including a controller, a first network device, and a second network device. The first network device is in a first network domain, the second network device is in a second network domain, and the network type of the first network domain is different from the network type of the second network domain. The controller includes a link discovery device as shown in any one of Figures 10 to 12.

可选的,该控制器是跨域控制器,该链路发现系统还包括第一控制器和第二控制器,第一控制器是第一网络域的控制器,第二控制器是第二网络域的控制器。Optionally, the controller is a cross-domain controller, and the link discovery system further includes a first controller and a second controller, the first controller is a controller of a first network domain, and the second controller is a controller of a second network domain.

可选的,跨域控制器、第一控制器和第二控制器可以是三个不同的控制器。Optionally, the cross-domain controller, the first controller and the second controller may be three different controllers.

可选的,跨域控制器、第一控制器和第二控制器中的至少两个是一台控制器。例如,跨域控制器是一台控制器,第一控制器和第二控制器是同一台控制器;或者,跨域控制器、第一控制器和第二控制器是一台控制器。Optionally, at least two of the cross-domain controller, the first controller, and the second controller are one controller. For example, the cross-domain controller is one controller, and the first controller and the second controller are the same controller; or, the cross-domain controller, the first controller, and the second controller are one controller.

可选的,第一网络域和第二网络域中的一个是光网络域,另一个是IP网络域。Optionally, one of the first network domain and the second network domain is an optical network domain, and the other is an IP network domain.

可选的,第一网络域和第二网络域中的一个是无线网络域,另一个是有线网络域。Optionally, one of the first network domain and the second network domain is a wireless network domain, and the other is a wired network domain.

示例的,该链路发现系统是如图1或图2所示的通信网络。Illustratively, the link discovery system is a communication network as shown in FIG. 1 or FIG. 2 .

本申请实施例提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,该计算机程序被执行(例如,被控制器、一个或多个处理器等执行)时,实现如上述方法实施例提供的链路发现方法的全部或部分步骤。An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed (for example, executed by a controller, one or more processors, etc.), all or part of the steps of the link discovery method provided in the above method embodiment are implemented.

本申请实施例提供了一种计算机程序产品,该计算机程序产品包括程序或代码,该程序或代码被执行(例如,被控制器、一个或多个处理器等执行)时,实现如上述方法实施例提供的链路发现方法的全部或部分步骤。An embodiment of the present application provides a computer program product, which includes a program or code. When the program or code is executed (for example, executed by a controller, one or more processors, etc.), it implements all or part of the steps of the link discovery method provided in the above method embodiment.

本申请实施例提供了一种芯片,该芯片包括可编程逻辑电路和/或程序指令,该芯片运行时用于实现如上述方法实施例提供的链路发现方法的全部或部分步骤。An embodiment of the present application provides a chip, which includes a programmable logic circuit and/or program instructions, and when the chip is running, it is used to implement all or part of the steps of the link discovery method provided in the above method embodiment.

在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现,所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机的可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者包含一个或多个可用介质集成的服务器、数据中心等数据存储装置。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质,或者半导体介质(例如固态硬盘)等。In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product, and the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium, or a semiconductor medium (e.g., a solid-state hard disk), etc.

应当理解的是,本申请中的术语“至少一个”指一个或多个,“多个”指两个或两个以上。本申请中的术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,为了便于清楚描述,在本申请中,采用了“第一”、“第二”、“第三”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”、“第三”等字样并不对数量和执 行次序进行限定。It should be understood that the term "at least one" in this application refers to one or more, and "plurality" refers to two or more. The term "and/or" in this application is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and/or B may represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, for the sake of clarity of description, in this application, words such as "first", "second", and "third" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that words such as "first", "second", and "third" do not distinguish between quantity and execution. The order of the rows is limited.

本申请实施例提供的方法实施例和装置实施例等不同类型的实施例均可以相互参考,本申请实施例对此不做限定。本申请实施例提供的方法实施例操作的先后顺序能够进行适当调整,操作也能够根据情况进行响应增减,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化的方法,都应涵盖在本申请的保护范围之内,因此不再赘述。The different types of embodiments such as the method embodiments and device embodiments provided in the embodiments of the present application can refer to each other, and the embodiments of the present application are not limited thereto. The sequence of operations of the method embodiments provided in the embodiments of the present application can be appropriately adjusted, and the operations can also be increased or decreased in response to the situation. Any technician familiar with the technical field can easily think of the changed methods within the technical scope disclosed in the present application, and they should be included in the protection scope of the present application, so they will not be repeated.

在本申请提供的相应实施例中,应该理解到,所揭露的装置等可以通过其它的构成方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块的划分仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。In the corresponding embodiments provided in the present application, it should be understood that the disclosed devices and the like can be implemented by other configuration methods. For example, the device embodiments described above are only illustrative, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, for example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed.

作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块描述的部件可以是或者也可以不是物理模块,既可以位于一个地方,或者也可以分布到多个设备上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and the components described as modules may or may not be physical modules, and may be located in one place or distributed on multiple devices. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

以上所述,仅为本申请的示例性实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。 The above is only an exemplary embodiment of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims (29)

一种链路发现方法,其特征在于,所述方法包括:A link discovery method, characterized in that the method comprises: 控制器获取第一发现信息和第二发现信息,所述第一发现信息是第一网络设备基于时钟协议报文获取的第一链路的发现信息,所述第二发现信息是第二网络设备基于所述时钟协议报文获取的所述第一链路的发现信息,所述第一网络设备在第一网络域中,所述第二网络设备在第二网络域中,所述第一网络域的网络类型与所述第二网络域的网络类型不同,所述第一链路是所述第一网络设备的第一端口与所述第二网络设备的第二端口之间的跨域链路;The controller obtains first discovery information and second discovery information, wherein the first discovery information is discovery information of a first link obtained by a first network device based on a clock protocol message, and the second discovery information is discovery information of the first link obtained by a second network device based on the clock protocol message, the first network device is in a first network domain, the second network device is in a second network domain, a network type of the first network domain is different from a network type of the second network domain, and the first link is a cross-domain link between a first port of the first network device and a second port of the second network device; 所述控制器根据所述第一发现信息和所述第二发现信息确定所述第一链路。The controller determines the first link according to the first discovery information and the second discovery information. 根据权利要求1所述的方法,其特征在于,所述第一发现信息包括所述第一端口的指示信息,所述第二发现信息包括所述第二端口的指示信息,所述第一发现信息和所述第二发现信息中的至少一个发现信息包括所述第一端口与所述第二端口的对应关系,所述控制器根据所述第一发现信息和所述第二发现信息确定所述第一链路,包括:The method according to claim 1, wherein the first discovery information includes indication information of the first port, the second discovery information includes indication information of the second port, at least one of the first discovery information and the second discovery information includes a correspondence between the first port and the second port, and the controller determines the first link according to the first discovery information and the second discovery information, comprising: 所述控制器根据所述第一端口的指示信息确定所述第一网络设备的所述第一端口;The controller determines the first port of the first network device according to the indication information of the first port; 所述控制器根据所述第二端口的指示信息确定所述第二网络设备的所述第二端口;The controller determines the second port of the second network device according to the indication information of the second port; 所述控制器根据所述对应关系确定所述第一端口与所述第二端口对应。The controller determines, according to the corresponding relationship, that the first port corresponds to the second port. 根据权利要求2所述的方法,其特征在于,所述第一发现信息还包括所述第一网络设备的指示信息,所述第二发现信息还包括所述第二网络设备的指示信息,所述控制器根据所述第一发现信息和所述第二发现信息确定所述第一链路,还包括:The method according to claim 2 is characterized in that the first discovery information further includes indication information of the first network device, the second discovery information further includes indication information of the second network device, and the controller determines the first link according to the first discovery information and the second discovery information, further comprising: 所述控制器根据所述第一网络设备的指示信息确定所述第一网络设备;The controller determines the first network device according to the indication information of the first network device; 所述控制器根据所述第二网络设备的指示信息确定所述第二网络设备。The controller determines the second network device according to the indication information of the second network device. 根据权利要求1至3任一项所述的方法,其特征在于,在所述控制器获取所述第一发现信息和所述第二发现信息之前,所述方法还包括:The method according to any one of claims 1 to 3, characterized in that before the controller obtains the first discovery information and the second discovery information, the method further comprises: 所述控制器向所述第一网络设备和所述第二网络设备发送目标策略,所述目标策略用于指示所述第一网络设备和所述第二网络设备基于第一时钟协议发现所述第一网络域与所述第二网络域之间的跨域链路,所述时钟协议报文是基于所述第一时钟协议的报文。The controller sends a target policy to the first network device and the second network device, where the target policy is used to instruct the first network device and the second network device to discover the cross-domain link between the first network domain and the second network domain based on a first clock protocol, and the clock protocol message is a message based on the first clock protocol. 根据权利要求4所述的方法,其特征在于,在所述控制器向所述第一网络设备和所述第二网络设备发送所述目标策略之前,所述方法还包括:The method according to claim 4, characterized in that before the controller sends the target policy to the first network device and the second network device, the method further comprises: 所述控制器获取第一能力信息和第二能力信息,所述第一能力信息用于指示所述第一端口支持所述第一时钟协议,所述第二能力信息用于指示所述第二端口支持所述第一时钟协议;The controller acquires first capability information and second capability information, the first capability information being used to indicate that the first port supports the first clock protocol, and the second capability information being used to indicate that the second port supports the first clock protocol; 所述控制器根据所述第一能力信息和所述第二能力信息确定所述目标策略。The controller determines the target policy according to the first capability information and the second capability information. 根据权利要求1至5任一项所述的方法,其特征在于,所述控制器是跨域控制器,所述控制器获取所述第一发现信息和所述第二发现信息,包括:The method according to any one of claims 1 to 5, characterized in that the controller is a cross-domain controller, and the controller obtains the first discovery information and the second discovery information, comprising: 所述控制器接收第一控制器发送的所述第一发现信息,所述第一控制器是所述第一网络域的控制器;The controller receives the first discovery information sent by a first controller, where the first controller is a controller of the first network domain; 所述控制器接收第二控制器发送的所述第二发现信息,所述第二控制器是所述第二网络域的控制器。The controller receives the second discovery information sent by a second controller, where the second controller is a controller of the second network domain. 根据权利要求6所述的方法,其特征在于,所述跨域控制器、所述第一控制器和所述第二控制器是三个不同的控制器。The method according to claim 6 is characterized in that the cross-domain controller, the first controller and the second controller are three different controllers. 根据权利要求6所述的方法,其特征在于,所述跨域控制器、所述第一控制器和所述第二控制器中的至少两个是一台控制器。 The method according to claim 6 is characterized in that at least two of the cross-domain controller, the first controller and the second controller are one controller. 根据权利要求1至8任一项所述的方法,其特征在于,所述第一网络域和所述第二网络域中的一个网络域是光网络域,另一个网络域是互联网协议IP网络域。The method according to any one of claims 1 to 8 is characterized in that one of the first network domain and the second network domain is an optical network domain, and the other network domain is an Internet Protocol IP network domain. 根据权利要求1至8任一项所述的方法,其特征在于,所述第一网络域和所述第二网络域中的一个网络域是无线网络域,另一个网络域是有线网络域。The method according to any one of claims 1 to 8 is characterized in that one of the first network domain and the second network domain is a wireless network domain, and the other network domain is a wired network domain. 一种链路发现装置,其特征在于,应用于控制器,所述装置包括:A link discovery device, characterized in that it is applied to a controller, and the device comprises: 获取模块,用于获取第一发现信息和第二发现信息,所述第一发现信息是第一网络设备基于时钟协议报文获取的第一链路的发现信息,所述第二发现信息是第二网络设备基于所述时钟协议报文获取的所述第一链路的发现信息,所述第一网络设备在第一网络域中,所述第二网络设备在第二网络域中,所述第一网络域的网络类型与所述第二网络域的网络类型不同,所述第一链路是所述第一网络设备的第一端口与所述第二网络设备的第二端口之间的跨域链路;an acquisition module, used to acquire first discovery information and second discovery information, wherein the first discovery information is discovery information of a first link acquired by a first network device based on a clock protocol message, and the second discovery information is discovery information of the first link acquired by a second network device based on the clock protocol message, the first network device is in a first network domain, the second network device is in a second network domain, the network type of the first network domain is different from the network type of the second network domain, and the first link is a cross-domain link between a first port of the first network device and a second port of the second network device; 确定模块,用于根据所述第一发现信息和所述第二发现信息确定所述第一链路。A determination module is used to determine the first link according to the first discovery information and the second discovery information. 根据权利要求11所述的装置,其特征在于,所述第一发现信息包括所述第一端口的指示信息,所述第二发现信息包括所述第二端口的指示信息,所述第一发现信息和所述第二发现信息中的至少一个发现信息包括所述第一端口与所述第二端口的对应关系,The device according to claim 11, characterized in that the first discovery information includes indication information of the first port, the second discovery information includes indication information of the second port, at least one of the first discovery information and the second discovery information includes a corresponding relationship between the first port and the second port, 所述确定模块,用于:The determining module is used to: 根据所述第一端口的指示信息确定所述第一网络设备的所述第一端口;Determine the first port of the first network device according to the indication information of the first port; 根据所述第二端口的指示信息确定所述第二网络设备的所述第二端口;Determine the second port of the second network device according to the indication information of the second port; 根据所述对应关系确定所述第一端口与所述第二端口对应。According to the corresponding relationship, it is determined that the first port corresponds to the second port. 根据权利要求12所述的装置,其特征在于,所述第一发现信息还包括所述第一网络设备的指示信息,所述第二发现信息还包括所述第二网络设备的指示信息,The apparatus according to claim 12, wherein the first discovery information further includes indication information of the first network device, and the second discovery information further includes indication information of the second network device. 所述确定模块,还用于:The determining module is further used for: 根据所述第一网络设备的指示信息确定所述第一网络设备;determining the first network device according to the indication information of the first network device; 根据所述第二网络设备的指示信息确定所述第二网络设备。The second network device is determined according to the indication information of the second network device. 根据权利要求11至13任一项所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 11 to 13, characterized in that the device further comprises: 发送模块,用于在所述获取模块获取所述第一发现信息和所述第二发现信息之前,向所述第一网络设备和所述第二网络设备发送目标策略,所述目标策略用于指示所述第一网络设备和所述第二网络设备基于第一时钟协议发现所述第一网络域与所述第二网络域之间的跨域链路,所述时钟协议报文是基于所述第一时钟协议的报文。A sending module is used to send a target policy to the first network device and the second network device before the acquisition module acquires the first discovery information and the second discovery information, wherein the target policy is used to instruct the first network device and the second network device to discover the cross-domain link between the first network domain and the second network domain based on a first clock protocol, and the clock protocol message is a message based on the first clock protocol. 根据权利要求14所述的装置,其特征在于,The device according to claim 14, characterized in that 所述获取模块,还用于在所述发送模块向所述第一网络设备和所述第二网络设备发送所述目标策略之前获取第一能力信息和第二能力信息,所述第一能力信息用于指示所述第一端口支持所述第一时钟协议,所述第二能力信息用于指示所述第二端口支持所述第一时钟协议;The acquisition module is further used to acquire first capability information and second capability information before the sending module sends the target policy to the first network device and the second network device, the first capability information being used to indicate that the first port supports the first clock protocol, and the second capability information being used to indicate that the second port supports the first clock protocol; 所述确定模块,还用于根据所述第一能力信息和所述第二能力信息确定所述目标策略。The determination module is further used to determine the target strategy according to the first capability information and the second capability information. 根据权利要求11至15任一项所述的装置,其特征在于,所述控制器是跨域控制器,The device according to any one of claims 11 to 15, characterized in that the controller is a cross-domain controller, 所述获取模块,用于:The acquisition module is used to: 接收第一控制器发送的所述第一发现信息,所述第一控制器是所述第一网络域的控制器;receiving the first discovery information sent by a first controller, where the first controller is a controller of the first network domain; 接收第二控制器发送的所述第二发现信息,所述第二控制器是所述第二网络域的控制器。The second discovery information sent by a second controller is received, where the second controller is a controller of the second network domain. 根据权利要求16所述的装置,其特征在于,所述跨域控制器、所述第一控制器和所述第二控制器是三个不同的控制器。 The device according to claim 16 is characterized in that the cross-domain controller, the first controller and the second controller are three different controllers. 根据权利要求16所述的装置,其特征在于,所述跨域控制器、所述第一控制器和所述第二控制器中的至少两个是一台控制器。The device according to claim 16, characterized in that at least two of the cross-domain controller, the first controller and the second controller are one controller. 根据权利要求11至18任一项所述的装置,其特征在于,所述第一网络域和所述第二网络域中的一个网络域是光网络域,另一个网络域是互联网协议IP网络域。The device according to any one of claims 11 to 18 is characterized in that one of the first network domain and the second network domain is an optical network domain, and the other network domain is an Internet Protocol IP network domain. 根据权利要求11至18任一项所述的装置,其特征在于,所述第一网络域和所述第二网络域中的一个网络域是无线网络域,另一个网络域是有线网络域。The device according to any one of claims 11 to 18 is characterized in that one of the first network domain and the second network domain is a wireless network domain, and the other network domain is a wired network domain. 一种链路发现装置,其特征在于,包括存储器和处理器;A link discovery device, characterized by comprising a memory and a processor; 所述存储器用于存储计算机程序;The memory is used to store computer programs; 所述处理器用于执行所述存储器中存储的计算机程序以使得所述链路发现装置执行权利要求1至10任一项所述的链路发现方法。The processor is used to execute the computer program stored in the memory so that the link discovery device executes the link discovery method according to any one of claims 1 to 10. 一种链路发现系统,其特征在于,包括控制器、第一网络设备和第二网络设备;A link discovery system, characterized by comprising a controller, a first network device and a second network device; 所述第一网络设备在第一网络域中,所述第二网络设备在第二网络域中,所述第一网络域的网络类型与所述第二网络域的网络类型不同;The first network device is in a first network domain, the second network device is in a second network domain, and a network type of the first network domain is different from a network type of the second network domain; 所述控制器包括如权利要求11至21任一项所述的链路发现装置。The controller comprises the link discovery device according to any one of claims 11 to 21. 根据权利要求22所述的系统,其特征在于,所述控制器是跨域控制器,所述系统还包括第一控制器和第二控制器,所述第一控制器是所述第一网络域的控制器,所述第二控制器是所述第二网络域的控制器。The system according to claim 22 is characterized in that the controller is a cross-domain controller, and the system further includes a first controller and a second controller, the first controller is a controller of the first network domain, and the second controller is a controller of the second network domain. 根据权利要求23所述的系统,其特征在于,所述跨域控制器、所述第一控制器和所述第二控制器是三个不同的控制器。The system according to claim 23 is characterized in that the cross-domain controller, the first controller and the second controller are three different controllers. 根据权利要求23所述的系统,其特征在于,所述跨域控制器、所述第一控制器和所述第二控制器中的至少两个是一台控制器。The system according to claim 23 is characterized in that at least two of the cross-domain controller, the first controller and the second controller are one controller. 根据权利要求22至25任一项所述的系统,其特征在于,所述第一网络域和所述第二网络域中的一个网络域是光网络域,另一个网络域是互联网协议IP网络域。The system according to any one of claims 22 to 25 is characterized in that one of the first network domain and the second network domain is an optical network domain, and the other network domain is an Internet Protocol IP network domain. 根据权利要求22至25任一项所述的系统,其特征在于,所述第一网络域和所述第二网络域中的一个网络域是无线网络域,另一个网络域是有线网络域。The system according to any one of claims 22 to 25 is characterized in that one of the first network domain and the second network domain is a wireless network domain, and the other network domain is a wired network domain. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,所述计算机程序被执行时实现权利要求1至10任一项所述的链路发现方法。A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, and when the computer program is executed, the link discovery method according to any one of claims 1 to 10 is implemented. 一种计算机程序产品,其特征在于,所述计算机程序产品包括程序或代码,所述程序或代码被执行时实现权利要求1至10任一项所述的链路发现方法。 A computer program product, characterized in that the computer program product comprises a program or code, and when the program or code is executed, the link discovery method according to any one of claims 1 to 10 is implemented.
PCT/CN2023/130562 2022-11-29 2023-11-08 Link discovery method, apparatus, and system Ceased WO2024114329A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202211511422.6 2022-11-29
CN202211511422 2022-11-29
CN202310086087.8 2023-01-18
CN202310086087.8A CN118118398A (en) 2022-11-29 2023-01-18 Link discovery method, device and system

Publications (1)

Publication Number Publication Date
WO2024114329A1 true WO2024114329A1 (en) 2024-06-06

Family

ID=91214500

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/130562 Ceased WO2024114329A1 (en) 2022-11-29 2023-11-08 Link discovery method, apparatus, and system

Country Status (2)

Country Link
CN (1) CN118118398A (en)
WO (1) WO2024114329A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104396189A (en) * 2012-06-21 2015-03-04 Abb研究有限公司 Determining the network topology of the communication network
US20160241684A1 (en) * 2015-02-13 2016-08-18 Electronics And Telecommunications Research Institute Method and apparatus for link discovery among domains
CN109391545A (en) * 2017-08-08 2019-02-26 中国电信股份有限公司 The discovery system and discovery method of domain-to-domain link
US20210006487A1 (en) * 2019-07-03 2021-01-07 Nokia Solutions And Networks Oy Discovering cross-domain links based on traffic flow
CN114938345A (en) * 2022-06-07 2022-08-23 中国联合网络通信集团有限公司 Link discovery method, device and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104396189A (en) * 2012-06-21 2015-03-04 Abb研究有限公司 Determining the network topology of the communication network
US20160241684A1 (en) * 2015-02-13 2016-08-18 Electronics And Telecommunications Research Institute Method and apparatus for link discovery among domains
CN109391545A (en) * 2017-08-08 2019-02-26 中国电信股份有限公司 The discovery system and discovery method of domain-to-domain link
US20210006487A1 (en) * 2019-07-03 2021-01-07 Nokia Solutions And Networks Oy Discovering cross-domain links based on traffic flow
CN114938345A (en) * 2022-06-07 2022-08-23 中国联合网络通信集团有限公司 Link discovery method, device and storage medium

Also Published As

Publication number Publication date
CN118118398A (en) 2024-05-31

Similar Documents

Publication Publication Date Title
Eidson Measurement, control, and communication using IEEE 1588
US10075370B2 (en) Network performance diagnostics system
EP3958509A1 (en) Method, apparatus and system for communication between controllers in tsn
US20130227008A1 (en) Clock synchronization based on predefined grandmaster
US10932019B1 (en) System and method for topology discovery and fiber continuity verification in network
US20230262625A1 (en) Time Synchronization Fault Processing Method, Apparatus, And System
US10567195B2 (en) Network nodes in a ring network
US20170272191A1 (en) Method, Apparatus and System for Remotely Configuring PTP Service of Optical Network Unit
CN102325163B (en) Routing updating method, device and relevant equipment
JP2022160653A (en) Packet processing methods and gateway devices
CN104641612A (en) Intelligent supervision for configuration of precision time protocol (PTP) entities
CN101621722B (en) Method and system for automatically discovering node inner resource topology
KR20230017324A (en) BIER multicast traffic statistics collection method, device and system
CN116915353B (en) Stackable Network Devices as Precision Time Protocol Boundary Clocks
JP2005507575A (en) Telecommunications network with automatic topology detection and method for this detection
CN109379239B (en) Method and device for configuring access switch in OpenStack environment
CN116346605A (en) Control method, device, intelligent terminal and storage medium of cluster service system
WO2024114329A1 (en) Link discovery method, apparatus, and system
US12309033B2 (en) Network timing topology discovery and visualization using interior gateway protocols
CN115426068B (en) TSN clock synchronization system and method, computer storage medium and chip
US11294417B2 (en) Distribution of trusted physical layer timing information using attestation
WO2023233588A1 (en) Time synchronization device, time synchronization method, and time synchronization program
CN115396299B (en) Inter-domain plug provision, acquisition method, device, network management equipment and cross-domain management equipment
EP1921804B1 (en) Method and system for transmitting connectivity fault management messages in ethernet, and a node device
US12348406B2 (en) Method and system of monitoring BGP-eVpn messages sent over a mesh between a point of presence and a datacenter

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23896481

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 23896481

Country of ref document: EP

Kind code of ref document: A1