CN112865899B - Method and device for adjusting physical layer (PHY) master-slave mode - Google Patents

Method and device for adjusting physical layer (PHY) master-slave mode Download PDF

Info

Publication number
CN112865899B
CN112865899B CN201911175282.8A CN201911175282A CN112865899B CN 112865899 B CN112865899 B CN 112865899B CN 201911175282 A CN201911175282 A CN 201911175282A CN 112865899 B CN112865899 B CN 112865899B
Authority
CN
China
Prior art keywords
interface
master
slave mode
phy
slave
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911175282.8A
Other languages
Chinese (zh)
Other versions
CN112865899A (en
Inventor
刘鹏伟
韩少文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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
Priority to CN201911175282.8A priority Critical patent/CN112865899B/en
Priority to PCT/CN2020/122614 priority patent/WO2021103860A1/en
Publication of CN112865899A publication Critical patent/CN112865899A/en
Application granted granted Critical
Publication of CN112865899B publication Critical patent/CN112865899B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/0641Change of the master or reference, e.g. take-over or failure of the master
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • 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
    • 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/02Standardisation; Integration
    • H04L41/0213Standardised network management protocols, e.g. simple network management protocol [SNMP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/29Flow control; Congestion control using a combination of thresholds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)
  • Telephonic Communication Services (AREA)
  • Communication Control (AREA)

Abstract

The embodiment of the application discloses a method for adjusting PHY master-slave mode, wherein a first interface can acquire the master-slave relation between the synchronous Ethernet clock of the first interface and the synchronous Ethernet clock of a second interface, and determine the PHY master-slave mode of the first interface. When the first interface determines that the master-slave relationship does not match with the PHY master-slave mode of the first interface, a first request may be sent to the second interface or the network management device, where the first request is used to request adjustment of the PHY master-slave mode of the first interface and the PHY master-slave mode of the second interface, so as to avoid interruption of synchronous ethernet clock transfer due to the PHY master-slave mode of the first interface. Therefore, according to the scheme provided by the embodiment of the application, when the first interface determines that the PHY master-slave relationship between the master-slave mode and the first interface is not matched, the first interface sends the first request for requesting to adjust the PHY master-slave mode of the first interface and the PHY master-slave mode of the second interface, so that the PHY master-slave mode of the interfaces can be adjusted in time, and the transmission interruption of the synchronous Ethernet clock is avoided.

Description

Method and device for adjusting physical layer (PHY) master-slave mode
Technical Field
The present application relates to the field of communications, and in particular, to a method and an apparatus for adjusting a master-slave mode of a physical layer PHY.
Background
The first device and the second device may perform physical layer clock synchronization when communicating. For example, a first device may communicate a synchronous Ethernet clock (sync) to interface B of a second device through interface a on the first device. When the interface a and the interface B for transferring the synchronous ethernet clock are interfaces of a specific type, such as 1000GBASE-T interface or 10 GBASE-T interface, the physical layer (PHY) master-slave mode of the interface a and the interface B, i.e. master mode and slave mode, is also determined. It is important to correctly determine the PHY master-slave mode of interface a and interface B, and if the PHY master-slave mode of interface a and interface B is incorrect, it may cause the synchronous ethernet clock transmission to be interrupted.
Disclosure of Invention
The embodiment of the application provides a method and a device for adjusting a PHY master-slave mode, which can solve the problem that the traditional technology cannot timely adjust the PHY master-slave mode of an interface, so that the synchronous Ethernet clock transmitted between the interfaces is interrupted.
In a first aspect, an embodiment of the present application provides a method for adjusting a PHY master-slave mode, and specifically, a first interface may obtain a master-slave relationship between a synchronous ethernet clock of the first interface and a synchronous ethernet clock of a second interface, and determine the PHY master-slave mode of the first interface. The synchronous ethernet clock passing between the first interface and the second interface is not interrupted only if the master-slave relationship matches the PHY master-slave mode of the first interface. In other words, if the master-slave relationship does not match the PHY master-slave mode of the first interface, it indicates that the PHY master-slave mode of the first interface may cause the synchronous ethernet clock transfer to be interrupted. In view of this, in the embodiment of the present application, when the first interface determines that the master-slave relationship does not match the PHY master-slave mode of the first interface, a first request for requesting to adjust the PHY master-slave modes of the first interface and the second interface may be sent to the second interface or the network management device. Accordingly, the second interface or the network management device may perform the target operation after receiving the first request, so as to avoid interruption of the synchronous ethernet clock transfer due to the PHY master-slave mode of the first interface. Therefore, according to the scheme provided by the embodiment of the application, when the first interface determines that the PHY master-slave relationship between the master-slave mode and the first interface is not matched, the first interface sends the first request for requesting to adjust the PHY master-slave modes of the first interface and the second interface.
In a possible implementation manner, in order to enable the second interface to determine how to adjust the PHY master-slave mode of the second interface according to the first request, in an implementation manner of the embodiment of the present application, the first request may further carry a PHY master-slave mode adjustment target of the second interface. And the PHY master-slave mode adjusting target of the second interface is used for indicating the second interface to adjust the PHY master-slave mode of the second interface according to the adjusting target.
In a possible implementation manner, the PHY master-slave mode adjustment target of the second interface may be determined by the first interface according to a master-slave relationship between the synchronous ethernet clock of the first interface and the synchronous ethernet clock of the second interface, and the PHY master-slave mode of the first interface. Specifically, the method comprises the following steps: when the synchronous ethernet clock of the first interface is the master clock, the synchronous ethernet clock of the second interface is the slave clock, and the PHY master-slave mode of the first interface is the slave mode, the first interface may determine that the PHY master-slave mode adjustment target of the second interface is: the slave mode is forcibly configured, or the slave mode is preferred by auto-negotiation. When the synchronous ethernet clock of the first interface is the slave clock, the synchronous ethernet clock of the second interface is the master clock, and the PHY master-slave mode of the first interface is the master mode, the first interface may determine that the PHY master-slave mode adjustment target of the second interface is: either the master mode is forcibly configured or the master mode is preferred by auto-negotiation.
In a possible implementation manner, after the first interface sends the first request to the second interface or the network management device, if the second interface or the network management device determines that the first interface can adjust the PHY master-slave mode of the second interface or the network management device, the second interface or the network management device may send first information to the first interface, where the first information is used to instruct the first interface to adjust the PHY master-slave mode of the first interface. After the first interface receives the first information, the PHY master-slave mode of the first interface can be adjusted, so that the adjusted PHY master-slave mode is matched with the master-slave relation of the synchronous Ethernet clock, and the transmission interruption of the synchronous Ethernet clock is avoided.
In a possible implementation manner, after receiving the first information, the first interface may adjust its PHY master-slave mode, so that the adjusted PHY master-slave mode of the first interface matches with the master-slave relationship of the synchronous ethernet clock. Specifically, when the synchronous ethernet clock of the first interface is a master clock, the synchronous ethernet clock of the second interface is a slave clock, and the PHY master-slave mode of the first interface is a slave mode, the first interface configures the PHY master-slave mode of the first interface as a forced master mode, or the first interface configures the PHY master-slave mode auto-negotiation preference of the first interface as a master mode. Or when the synchronous Ethernet clock of the first interface is a slave clock, the synchronous Ethernet clock of the second interface is a master clock, and the PHY master-slave mode of the first interface is a master mode, the first interface configures the PHY master-slave mode of the first interface to be a forced slave mode, or the first interface configures the PHY master-slave mode of the first interface to be a slave mode by auto-negotiation.
In a possible implementation manner, after the first interface sends the first request to the second interface or the network management device, if the second interface or the network management device determines that the first interface cannot adjust the PHY master-slave mode of the first interface, the second interface or the network management device may send second information to the first interface, where the second information is used to indicate that the first request is rejected. After the first interface receives the second information, the PHY master-slave mode of the first interface may be maintained unchanged, so as to avoid adverse effects, such as a large amount of data loss and the like, caused by an improper adjustment of the PHY master-slave mode.
In a possible implementation manner, when the first interface sends the first request to the second interface, for example, the first interface may send a slow protocol packet including the first request to the second interface. In addition, in practical application, the network management device and the managed device can interact with each other through a network configuration protocol NETCONF and a simple network protocol SNMP. Therefore, the first interface may send an SNMP message or a NETCONF message including the aforementioned first request to the network management device.
In a possible implementation manner, it is considered that in practical applications, a message used for transmitting the synchronous ethernet clock between the first interface and the second interface is an ESMC message. Therefore, the aforementioned slow protocol message may be an ESMC message. In other words, the first interface may send the ESMC message including the first request to the second interface, thereby achieving the purpose of sending the first request to the second interface.
In a second aspect, an embodiment of the present application provides a method for adjusting a PHY master-slave mode of a physical layer, and in particular, a second interface may receive a first request from a first interface, where the first request is used to request adjustment of the PHY master-slave mode of the first interface and the PHY master-slave mode of the second interface, and after receiving the first request, the second interface may perform a target operation, so as to avoid interruption of synchronous ethernet clock transfer due to the PHY master-slave mode of the first interface.
In a possible implementation manner, after receiving the first request, the second interface may determine whether the second interface meets the PHY master-slave mode adjustment condition, and when the second interface determines that the second interface meets the PHY master-slave mode adjustment condition, the second interface may send first information to the first interface, where the first information is used to instruct the first interface to adjust the PHY master-slave mode of the first interface.
In a possible implementation manner, when the second interface determines that the second interface does not meet the PHY master-slave mode adjustment condition, the second interface may send, to the first interface, second information, where the second information is used to indicate that the first request is rejected, that is, the first interface is notified that the PHY master-slave mode of the first interface is maintained, and the PHY master-slave mode of the first interface cannot be adjusted.
In a possible implementation manner, the PHY master-slave mode adjustment target of the second interface may be further included in the first request.
In one possible implementation, it is considered that in practical applications, not all interfaces need to adjust the PHY master-slave mode according to the master-slave relationship of the synchronous ethernet clock. Therefore, when determining whether the second interface meets the PHY master-slave mode adjustment condition, it can be determined whether the second interface supports the adjustment of the PHY master-slave mode according to the master-slave relationship of the synchronous ethernet clock. It is contemplated that in practical applications, other data may be transferred between the first interface and the second interface in addition to the synchronous ethernet clock. When the PHY master-slave mode of an interface, such as the first interface or the second interface, is adjusted, communication between the first interface and the second interface is interrupted. In other words, during the adjustment of the PHY master slave mode of the first interface or the second interface, data cannot be normally transferred between the first interface and the second interface. Therefore, when the PHY master-slave mode of the first interface and the second interface is adjusted, it is preferable that data transfer between the first interface and the second interface is not affected as much as possible. Therefore, when determining whether the second interface meets the PHY master-slave mode adjustment condition, it may be determined whether the data traffic to be forwarded through the second interface is less than or equal to a preset traffic threshold. Considering that in practical application, for some relatively special interfaces, the PHY master-slave mode of the interface can be configured to be the mandatory master mode or the mandatory slave mode in a manner of manual configuration by a user, and for such interfaces, the PHY master-slave mode is not allowed to be adjusted. Accordingly, in determining whether the second interface conforms to the PHY master-slave mode adjustment condition, it may be determined whether the PHY master-slave mode of the second interface is a user-configured mandatory master mode or a mandatory slave mode. In addition, the PHY master-slave mode adjustment target of the second interface may also be included in the first request. For this case, when determining whether the second interface meets the PHY master-slave mode adjustment condition, it may be determined whether the second interface supports adjusting the PHY master-slave mode of the second interface according to the adjustment target carried in the first request. In summary, when the second interface satisfies any one or more of the four conditions, it can be determined that the second interface satisfies the PHY master-slave mode adjustment condition. The four conditions are: the second interface supports the regulation of the PHY master-slave mode according to the master-slave relation of the synchronous Ethernet clock, the data flow to be forwarded through the second interface is less than or equal to a preset flow threshold, the PHY master-slave mode of the second interface is not a mandatory master mode or a mandatory slave mode configured by a user, and whether the second interface supports the regulation of the PHY master-slave mode of the second interface according to the PHY master-slave mode regulation target of the second interface.
In a possible implementation manner, since the PHY master-slave mode adjustment of the first interface is necessarily accompanied by the PHY master-slave mode adjustment of the second interface, after the second interface sends the first information to the first interface, the second interface may adjust the PHY master-slave mode of the second interface, so that the adjusted PHY master-slave mode of the second interface is also matched with the master-slave relationship of the synchronous ethernet clock. Specifically, if the first request includes the PHY master-slave mode adjustment target of the second interface, the second interface may adjust its PHY master-slave mode by using the adjustment target carried in the first request.
In a possible implementation manner, when the second interface sends the first information to the first interface, in a specific implementation, for example, the first information may be: the second interface sends a first slow protocol message to the first interface, wherein the first slow protocol message comprises first information.
In a possible implementation manner, the sending, by the second interface, the second information to the first interface may be, for example: and the second interface sends a second slow protocol message to the first interface, wherein the second slow protocol message comprises second information.
In a third aspect, an embodiment of the present application provides a method for adjusting a PHY master-slave mode of a physical layer, and specifically, a network management device may receive a first request from a first interface, where the first request is used to request adjustment of the PHY master-slave mode of the first interface and the PHY master-slave mode of a second interface, and after receiving the first request, the network management device may perform a target operation to avoid interruption of synchronous ethernet clock transfer due to the PHY master-slave mode of the first interface.
In a possible implementation manner, after receiving the first request, the network management device may determine whether the second interface meets the PHY master-slave mode adjustment condition, and when it is determined that the second interface meets the PHY master-slave mode adjustment condition, the network management device may send first information to the first interface, where the first information is used to instruct the first interface to adjust the PHY master-slave mode of the first interface. Accordingly, the network management device may send third information to the second interface, where the third information is used to instruct the second interface to adjust the PHY master-slave mode of the second interface.
In a possible implementation manner, when the second interface does not meet the PHY master-slave mode adjustment condition, the network management device may send second information to the first interface, where the second information is used to notify the first interface that the first request is rejected.
In one possible implementation, determining that the second interface conforms to a PHY master-slave mode adjustment condition is performed when the second interface conforms to any one or more of: the second interface supports adjusting a PHY master-slave mode according to a master-slave relationship of a synchronous Ethernet clock, the flow of data to be forwarded through the second interface is less than or equal to a preset flow threshold value, the PHY master-slave mode of the second interface is not a mandatory master mode or a mandatory slave mode configured by a user, and the second interface supports adjusting the PHY master-slave mode of the second interface according to a PHY master-slave mode adjustment target of the second interface.
In one possible implementation, the first request includes a PHY master-slave mode adjustment target for the second interface.
In a possible implementation manner, the third information includes a PHY master-slave mode adjustment target of the second interface.
In a possible implementation manner, the PHY master-slave mode adjustment target of the second interface is obtained according to the first request, where the first request includes the PHY master-slave mode adjustment target of the second interface.
In a possible implementation manner, the sending, by the network management device, the first information to the first interface includes: the network management equipment sends a simple network protocol (SNMP) message or a network configuration protocol (NETCONF) message to the first interface, wherein the SNMP message or the NETCONF message comprises the first information.
In a possible implementation manner, the sending, by the network management device, third information to the second interface includes: and the network management equipment sends a simple network protocol (SNMP) message or a network configuration protocol (NETCONF) message to the second interface, wherein the SNMP message or the NETCONF message comprises the third information.
In a possible implementation manner, the sending, by the network management device, the second information to the first interface includes: and the network management equipment sends an SNMP message or a NETCONF message to the first interface, wherein the SNMP message or the NETCONF message comprises the second information.
In a fourth aspect, an embodiment of the present application provides an apparatus for adjusting a master-slave mode of a physical layer PHY, applied to a first interface, and including: a first determining unit, configured to determine a master-slave relationship between a synchronous ethernet clock of the first interface and a synchronous ethernet clock of a second interface, and determine a PHY master-slave mode of the first interface; a sending unit, configured to send a first request to the second interface or a network management device if it is determined that the master-slave relationship is not matched with the PHY master-slave mode of the first interface, where the first request is used to request adjustment of the PHY master-slave mode of the first interface and the PHY master-slave mode of the second interface.
In one possible implementation, the first request includes a PHY master-slave mode adjustment target for the second interface.
In one possible implementation, the apparatus further includes: a second determining unit, configured to determine a PHY master-slave mode adjustment target of the second interface according to the master-slave relationship and the PHY master-slave mode of the first interface.
In a possible implementation manner, the second determining unit is specifically configured to: when the synchronous Ethernet clock of the first interface is a master clock, the synchronous Ethernet clock of the second interface is a slave clock, and the PHY master-slave mode of the first interface is a slave mode, determining that the PHY master-slave mode adjustment target of the second interface is as follows: forced configuration of slave mode, or auto-negotiation preference of slave mode; or when the synchronous ethernet clock of the first interface is a slave clock, the synchronous ethernet clock of the second interface is a master clock, and the PHY master-slave mode of the first interface is a master mode, determining that the PHY master-slave mode adjustment target of the second interface is: the master mode is forcibly configured or the master mode is preferred by auto-negotiation.
In one possible implementation, the apparatus further includes: a first receiving unit, configured to receive first information from the second interface or the network management device, where the first information is used to instruct the first interface to adjust a PHY master-slave mode of the first interface; and the adjusting unit is used for adjusting the PHY master-slave mode of the first interface according to the first information, and the adjusted PHY master-slave mode of the first interface is matched with the master-slave relationship.
In a possible implementation manner, the adjusting unit is specifically configured to: when the synchronous Ethernet clock of the first interface is a master clock, the synchronous Ethernet clock of the second interface is a slave clock, and the PHY master-slave mode of the first interface is a slave mode, configuring the PHY master-slave mode of the first interface as a mandatory master mode, or configuring the PHY master-slave mode auto-negotiation preference of the first interface as a master mode; or when the synchronous ethernet clock of the first interface is a slave clock, the synchronous ethernet clock of the second interface is a master clock, and the PHY master-slave mode of the first interface is a master mode, configuring the PHY master-slave mode of the first interface as a forced slave mode, or configuring the PHY master-slave mode auto-negotiation preference of the first interface as a slave mode.
In one possible implementation, the apparatus further includes: a second receiving unit, configured to receive second information from the second interface or the network management device, where the second information indicates that the first request is rejected; a maintaining unit, configured to maintain a PHY master-slave mode of the first interface according to the second information.
In a possible implementation manner, the sending unit is specifically configured to: sending a slow protocol message to the second interface, wherein the slow protocol message comprises the first request; or sending a simple network protocol (SNMP) message or a network configuration protocol (NETCONF) message to the network management equipment, wherein the SNMP message or the NETCONF message comprises the first request.
In a possible implementation manner, the slow protocol message is an ESMC message.
In a fifth aspect, an embodiment of the present application provides an apparatus for adjusting a master-slave mode of a physical layer PHY, applied to a second interface, including: a receiving unit, configured to receive a first request from a first interface, where the first request is used to request adjustment of a PHY master-slave mode of the first interface and a PHY master-slave mode of the second interface; and the execution unit is used for executing the target operation according to the first request.
In a possible implementation manner, the execution unit is specifically configured to: and when the second interface is determined to accord with the PHY master-slave mode adjusting condition, sending first information to the first interface, wherein the first information is used for indicating the first interface to adjust the PHY master-slave mode of the first interface.
In one possible implementation, the method further comprises: and when the second interface is determined not to meet the PHY master-slave mode adjustment condition, sending second information to the first interface, wherein the second information is used for informing the first interface that the first request is rejected.
In one possible implementation, the PHY master-slave mode adjustment condition is determined to be met by the second interface when the second interface meets any one or more of the following: the second interface supports adjusting a PHY master-slave mode according to a master-slave relationship of a synchronous Ethernet clock, the flow of data to be forwarded through the second interface is smaller than or equal to a preset flow threshold value, the PHY master-slave mode of the second interface is determined not to be a forced master mode or a forced slave mode configured by a user, and the second interface supports adjusting the PHY master-slave mode of the second interface according to a PHY master-slave mode adjustment target of the second interface.
In one possible implementation, the first request includes a PHY master-slave mode adjustment target for the second interface.
In one possible implementation, the first request includes a PHY master-slave mode adjustment target for the second interface, the apparatus further comprising: and the adjusting unit is used for adjusting the PHY master-slave mode of the second interface according to the PHY master-slave mode adjusting target of the second interface after the first information is sent to the first interface.
In a possible implementation manner, the sending the first information to the first interface includes: and sending a first slow protocol message to the first interface, wherein the first slow protocol message comprises the first information.
In a possible implementation manner, the sending the second information to the first interface includes: and sending a second slow protocol message to the first interface, wherein the second slow protocol message comprises the second information.
A sixth unit, an embodiment of the present application provides an apparatus for adjusting a master-slave mode of a physical layer PHY, including: a receiving unit, configured to receive a first request from a first interface, where the first request is used to request adjustment of a PHY master-slave mode of the first interface and a PHY master-slave mode of a second interface, and the second interface is an interface corresponding to the first interface and used to transfer a synchronous ethernet clock; and the execution unit is used for executing the target operation according to the first request.
In a possible implementation manner, the execution unit is specifically configured to: if the second interface meets the PHY master-slave mode adjustment condition, sending first information to the first interface, and sending third information to the second interface, wherein the first information is used for indicating the first interface to adjust the PHY master-slave mode of the first interface, and the third information is used for indicating the second interface to adjust the PHY master-slave mode of the second interface.
In a possible implementation manner, the execution unit is further configured to: and if the second interface does not meet the PHY master-slave mode adjustment condition, sending second information to the first interface, wherein the second information is used for informing the first interface that the first request is rejected.
In one possible implementation, determining that the second interface conforms to a PHY master-slave mode adjustment condition is performed when the second interface conforms to any one or more of: the second interface supports adjusting a PHY master-slave mode according to a master-slave relationship of a synchronous Ethernet clock, the flow of data to be forwarded through the second interface is less than or equal to a preset flow threshold value, the PHY master-slave mode of the second interface is not a mandatory master mode or a mandatory slave mode configured by a user, and the second interface supports adjusting the PHY master-slave mode of the second interface according to a PHY master-slave mode adjustment target of the second interface.
In one possible implementation, the first request includes a PHY master-slave mode adjustment target for the second interface.
In a possible implementation manner, the third information includes a PHY master-slave mode adjustment target of the second interface.
In a possible implementation manner, the PHY master-slave mode adjustment target of the second interface is obtained according to the first request, where the first request includes the PHY master-slave mode adjustment target of the second interface.
In a possible implementation manner, the sending the first information to the first interface includes: and sending a simple network protocol (SNMP) message or a network configuration protocol (NETCONF) message to the first interface, wherein the SNMP message or the NETCONF message comprises the first information.
In a possible implementation manner, the sending the third information to the second interface includes: and sending a simple network protocol (SNMP) message or a network configuration protocol (NETCONF) message to the second interface, wherein the SNMP message or the NETCONF message comprises the third information.
In a possible implementation manner, the sending the second information to the first interface includes: and sending a simple network protocol (SNMP) message or a network configuration protocol (NETCONF) message to the first interface, wherein the SNMP message or the NETCONF message comprises the second information.
In a seventh aspect, an embodiment of the present application provides an apparatus for adjusting a physical layer PHY master-slave mode, where the apparatus includes: a processor and a memory; the memory is used for storing programs; the processor is configured to execute the program in the memory to perform the method of any of the above first aspects, or to perform the method of any of the above second aspects, or to perform the method of any of the above third aspects.
In one possible implementation, the apparatus is located on a router, a switch, a terminal device, or a storage device.
In an eighth aspect, embodiments of the present application provide a computer-readable storage medium, which includes a program, when run on a computer, to cause the computer to perform the method of any one of the above first aspects, or to cause the computer to perform the method of any one of the above second aspects, or to cause the computer to perform the method of any one of the above third aspects.
In a ninth aspect, embodiments of the present application provide a computer program product containing information which, when run on a computer, causes the computer to perform the method of any one of the above first aspects, or causes the computer to perform the method of any one of the above second aspects, or causes the computer to perform the method of any one of the above third aspects.
In some embodiments, the first interface and the second interface are located on different devices, such as network devices.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a schematic diagram of a hierarchical master-slave clock synchronization scenario;
fig. 2 is a signaling interaction diagram of a method for adjusting a PHY master-slave mode of an interface according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an apparatus for adjusting a PHY master-slave mode according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an apparatus for adjusting a PHY master-slave mode according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an apparatus for adjusting a master-slave mode of a PHY according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an apparatus for adjusting a PHY master-slave mode according to an embodiment of the present disclosure.
Detailed Description
The embodiment of the application provides a method and a device for adjusting a PHY master-slave mode of a physical layer, which are used for solving the problem that the synchronous Ethernet clock transmitted between interfaces is interrupted because the PHY master-slave mode of the interfaces cannot be adjusted in time in the traditional technology.
To facilitate understanding of the solution of the embodiment of the present application, first, a brief description is given to physical layer clock synchronization.
Clock synchronization refers to the frequency and/or phase between signals maintaining some strict specific relationship. Clock synchronization may allow for differences in clock frequency and phase of devices in a digital communication network to be within allowable error. As digital Pulse Code Modulation (PCM) signals obtained by encoding information are transmitted in a digital communication network. If the clocks between the two devices are not synchronized, a loss or repetition of symbols may occur. In other words, if the clock synchronization cannot be achieved, errors occur in the data transmitted between the devices, which results in poor network transmission performance.
One of the physical layer clock synchronization methods is master-slave clock synchronization, which means that a master clock with high accuracy is set and each device tracks the master clock, so as to synchronize clocks among devices in the whole digital communication network. One of the master-slave clock synchronization modes is hierarchical master-slave clock synchronization. The grade master-slave clock synchronization means that a master clock is transferred to each device in the digital communication network in a step-by-step transfer mode.
Fig. 1 is a schematic diagram of a master-slave clock synchronization scenario. As shown in fig. 1, device 102 obtains a synchronous ethernet clock from clock generation device 101, device 102 further communicates the synchronous ethernet clock to device 103, device 103 further communicates the synchronous ethernet clock to device 104, and so on, to other devices in the digital communication network. In practical applications, when the synchronous ethernet clock is transferred between devices, the synchronous ethernet clock can be transferred through an interface. For example, device 102 communicates the synchronous ethernet clock to interface B (not shown in fig. 1) of device 103 using its own interface a (not shown in fig. 1), thereby achieving the purpose of communicating the synchronous ethernet clock to device 103. When the interface a and the interface B are interfaces of a specific type, such as 1000GBASE-T interface or 10 foundation-T interface, the PHY master-slave mode of the interface a and the interface B is also determined, that is, the interface a is determined to be in master mode or slave mode, and the interface B is determined to be in master mode or slave mode. It is important to correctly determine the PHY master-slave mode of the interface a and the interface B, and if the PHY master-slave mode of the interface a and the interface B is incorrect, the synchronous ethernet clock transmission may be interrupted. Since for either the 1000GBASE-T interface or the 10GEBASE-T, the PHY master slave mode also dictates the clock used when the interface is operating. Specifically, the PHY master-slave mode is an interface in which the PHY master-slave mode is master (master) and a clock used for receiving data from the interface of the slave (slave).
For example, the PHY master-slave mode of the interface a is master, and the PHY master-slave mode of the interface B is slave, when the interface a and the interface B communicate with each other, the interface a sends clock information and data to the interface B, and the interface B synchronizes the clock of the device where the interface B is located according to the received clock information. If the synchronous Ethernet clock information needs to be transmitted from the interface B to the interface A when the physical layer clock synchronization is carried out, the PHY master-slave mode of the interface B is slave, and the master-slave mode of the interface A is master, namely the PHY master-slave modes of the interface A and the interface B indicate that the interface B synchronizes the local clock of the interface B according to the clock information from the interface A. In other words, the PHY master-slave mode instructs interface a to transfer clock information to interface B, which is opposite to the transfer direction of the synchronous ethernet clock, which may result in interface B failing to transfer synchronous ethernet clock information to interface a, resulting in an interruption of the transfer of synchronous ethernet clock information.
It should be noted that the devices 102, 103, and 104 shown in fig. 1 may be network devices such as a router and a switch, and may also be other devices, such as a server, a terminal device, and a storage device.
Conventionally, the PHY master-slave mode of the interface may be configured in a manual configuration manner. For example, when performing physical layer clock synchronization, it is necessary for interface B to transmit synchronous ethernet clock information to interface a, and the PHY master-slave mode of interface B may be set as the master mode, and the PHY master-slave mode of interface a may be set as the slave mode.
However, in practical applications, the PHY master-slave mode of the interface is not the same, for example, the clock topology of the digital communication network is changed, for example, clock switching occurs, so that the PHY master-slave mode of the interface is correspondingly changed. In the conventional technology, once the PHY master-slave mode of the interface is changed, the PHY master-slave mode of the interface needs to be manually reconfigured, and this way cannot adjust the PHY master-slave mode of the interface in time. Since the PHY master-slave mode of the slave interface changes, it takes a certain time until a user such as a network manager finds that the PHY master-slave mode changes, and it also takes a certain time to manually configure the PHY master-slave mode. This results in the conventional technical solution not being able to adjust the PHY master-slave mode of the interface in time, and accordingly, the synchronous ethernet clock transmitted between the interfaces is interrupted.
In view of this, the embodiments of the present application provide a method for adjusting a PHY master-slave mode of an interface, which can automatically adjust the PHY master-slave mode of the interface in time according to a master-slave relationship of a synchronous ethernet clock, so that the PHY master-slave mode of the interface is consistent with the master-slave relationship of the synchronous ethernet clock, and an interruption of transmission of the synchronous ethernet clock is avoided. The method is described below with reference to the accompanying drawings.
Referring to fig. 2, which is a signaling interaction diagram of a method for adjusting a PHY master-slave mode of an interface according to an embodiment of the present disclosure, the method for adjusting the PHY master-slave mode of an interface shown in fig. 2 may be implemented, for example, through the following S101 to S104.
S101: the first interface determines a master-slave relationship between the synchronous ethernet clock of the first interface and the synchronous ethernet clock of the second interface.
It should be noted that, in the embodiment of the present application, the first interface and the second interface are two interfaces for transferring a synchronous ethernet clock. The master-slave relationship between the synchronous ethernet clock of the first interface and the synchronous ethernet clock of the second interface may characterize the direction of transfer of the synchronous ethernet clock between the first interface and the second interface. Specifically, if the synchronous ethernet clock of the first interface is the master clock and the synchronous ethernet clock of the second interface is the slave clock, the transmission direction of the synchronous ethernet clock is transmitted from the first interface to the second interface; if the synchronous ethernet clock of the first interface is the slave clock and the synchronous ethernet clock of the second interface is the master clock, the transmission direction of the synchronous ethernet clock is transmitted from the second interface to the first interface. The first interface and the second interface in the embodiment of the present application may be located on the device shown in fig. 1, for example.
In this embodiment, the first interface may determine a master-slave relationship between the synchronous ethernet clock of the first interface and the synchronous ethernet clock of the second interface, and specifically, the first interface may determine the master-slave relationship between the synchronous ethernet clock of the first interface and the synchronous ethernet clock of the second interface through a Synchronization Status Message (SSM) transmitted between the first interface and the second interface.
S102: the first interface determines a PHY master slave mode of the first interface.
In this embodiment, the PHY master-slave mode of the first interface may be a master mode or a slave mode. The first interface may determine its currently operating PHY master-slave mode to determine whether the PHY master-slave mode currently operating for the first interface matches the aforementioned master-slave relationship. If not, it indicates that the synchronous ethernet clock transferred between the first interface and the second interface may be interrupted.
It should be noted that, in practical applications, the execution sequence of S101 and S102 is not limited to the sequence shown in fig. 1, S101 may also be executed after S102, and S101 may even be executed simultaneously with S102, which is not specifically limited in the embodiment of the present application.
S103: if the first interface determines that the master-slave relationship is not matched with the PHY master-slave mode of the first interface, the first interface sends a first request to the second interface or the network management equipment, wherein the first request is used for requesting to adjust the PHY master-slave mode of the first interface and the PHY master-slave mode of the second interface.
The network management device in the embodiment of the present application refers to a device running a network management protocol, and the network management device may be a server or a terminal device. The network management device can control and manage the device. The network management device can acquire configuration information and operation data of the device and acquire information such as network topology and clock topology of the whole network.
In the embodiment of the present application, the foregoing master-slave relationship does not match with the PHY master-slave mode of the first interface, and two cases may be included. One of the cases is: the synchronous ethernet clock of the first interface is a master clock, the synchronous ethernet clock of the second interface is a slave clock, and the PHY master-slave mode of the first interface is a slave mode. That is, the transfer direction of the synchronous ethernet clock is that the first interface transfers to the second interface, and the PHY master-slave mode of the first interface is the slave mode. The other condition is that: the synchronous Ethernet clock of the first interface is a slave clock, the synchronous Ethernet clock of the second interface is a master clock, and the PHY master-slave mode of the first interface is a master mode. That is, the transfer direction of the synchronous ethernet clock is that the second interface transfers to the first interface, and the PHY master-slave mode of the first interface is the master mode.
As mentioned above, if the PHY master-slave mode of the first interface does not match the master-slave relationship, it indicates that the synchronous ethernet clock transmitted between the first interface and the second interface may be interrupted, and for this situation, the PHY master-slave mode of the first interface and the PHY master-slave mode of the second interface should be adjusted in time. In this embodiment, the first interface may send a first request to the second interface or the network management device, where the first request is used to request that the PHY master-slave mode of the first interface and the PHY master-slave mode of the second interface be adjusted. Specifically, in an implementation manner of the embodiment of the present application, the first interface may send a slow protocol packet including the first request to the second interface, which is not specifically limited in the embodiment of the present application, and in consideration that in practical applications, a packet used for transmitting a synchronous Ethernet clock between the first interface and the second interface is an Ethernet Synchronization Messaging Channel (ESMC) packet. In view of this, in one implementation, the slow protocol message may be an ESMC message. Specifically, the ESMC message may be extended, and the first request is carried in an extension field of the ESMC message, for example, the first request is carried in an extension type-length-value (TLV) field of the ESMC message, or the first request may also be carried in a reserved field of the ESMC message, and so on. In addition, it is considered that in practical applications, the Network management device and the managed device may interact with each other through a Network configuration Protocol (NETCONF) or a Simple Network Management Protocol (SNMP). Therefore, the first interface may send an SNMP message or a NETCONF message including the aforementioned first request to the network management device.
When the first interface sends an SNMP message including the first request to the network management device, in this embodiment of the present application, a Management Information Base (MIB) node corresponding to the first request may be newly added, and the MIB node is encapsulated in the SNMP message, so as to achieve a purpose of sending the SNMP message including the first request to the network management device. In particular, a type (type) field may be included in the MIB node to indicate that the first request is to request an adjustment of a PHY master-slave mode of a second interface of the first interface. When the first interface sends the network management device a NETCONF message including the first request, in this embodiment of the present application, an architecture (schema) node corresponding to the first request may be newly added, and the schema node is encapsulated in the NETCONF message, so as to achieve a purpose of sending the NETCONF message including the first request to the network management device. The specific structure of the schema node is not described in detail here.
As described above, the first request is used to request to adjust the PHY master-slave mode of the first interface and the PHY master-slave mode of the second interface, and the first interface may determine how to adjust its PHY master-slave mode according to the PHY master-slave mode of the first interface determined in S102 and the master-slave relationship determined in S101. In order to enable the second interface to determine how to adjust the PHY master-slave mode of the second interface according to the first request, in an implementation manner of the embodiment of the present application, the first request may further carry a PHY master-slave mode adjustment target of the second interface. And the PHY master-slave mode adjustment target of the second interface is used for indicating the second interface to adjust the PHY master-slave mode of the second interface according to the adjustment target. When the first interface sends a slow protocol message including the first request, for example, an ESMC message, to the second interface, the PHY master-slave mode adjustment target of the second interface may be carried in the value of the extended TLV field. When the first interface sends an SNMP message including the first request to the network management device, a value field may be further included in the MIB node, where the value is used to carry a PHY master-slave mode adjustment target of the second interface. Correspondingly, when the first interface sends a NETCONF message including the first request to the network management device, the schema node corresponding to the first request may further include a PHY master-slave mode adjustment target of the second interface.
In this embodiment, the PHY master-slave mode adjustment target of the second interface may be determined by the first interface according to the master-slave relationship determined in S101 and the PHY master-slave mode of the first interface determined in S102. Specifically, the method comprises the following steps:
when the synchronous ethernet clock of the first interface is the master clock, the synchronous ethernet clock of the second interface is the slave clock, and the PHY master-slave mode of the first interface is the slave mode, the first interface may determine that the PHY master-slave mode adjustment target of the second interface is: the slave mode is forcibly configured, or the slave mode is preferred by auto-negotiation. When the synchronous ethernet clock of the first interface is the slave clock, the synchronous ethernet clock of the second interface is the master clock, and the PHY master-slave mode of the first interface is the master mode, the first interface may determine that the PHY master-slave mode adjustment target of the second interface is: either the master mode is forcibly configured or the master mode is preferred by auto-negotiation.
Regarding the mandatory configuration slave mode and the mandatory configuration master mode, it should be noted that the mandatory configuration is a configuration mode, and if the second interface is configured to be the mandatory configuration slave mode, the second interface must operate in the slave mode, and similarly, if the second interface is configured to be the mandatory configuration master mode, the second interface must operate in the master mode. Regarding the auto-negotiation preference slave mode and the auto-negotiation preference master mode, it should be noted that the first interface and the second interface may determine the respective PHY master-slave modes by means of auto-negotiation. An auto-negotiation preference of a PHY master slave mode of the first interface or the second interface may be set before auto-negotiation of the first interface and the second interface. If the auto-negotiation preference of the PHY master-slave mode of the second interface is set to the slave mode, when the first interface and the second interface perform auto-negotiation of the PHY master-slave mode, the second interface will preferentially negotiate the PHY master-slave mode of the second interface into the slave mode. Similarly, if the auto-negotiation preference of the PHY master-slave mode of the second interface is set as the master mode, when the first interface and the second interface perform auto-negotiation of the PHY master-slave mode, the second interface may preferentially negotiate the PHY master-slave mode of the second interface into the master mode.
S104: the second interface or the network management device performs the target operation according to the received first request.
After the second device or the network management device receives the first request, the target operation may be performed according to the first request. The target operation refers to a response operation made after the second interface or the network management device receives the first request. Specific implementations of the second interface and the network management device to perform the target operation are described below.
First, a specific implementation in which the second interface performs the target operation will be described.
As before, the first request is for requesting an adjustment of the PHY master-slave mode of the first interface and the PHY master-slave mode of the second interface. After receiving the first request, the second interface may determine whether the second interface meets the PHY master-slave mode adjustment condition, and when the second interface determines that the second interface meets the PHY master-slave mode adjustment condition, the second interface may send first information to the first interface, where the first information is used to instruct the first interface to adjust the PHY master-slave mode of the first interface. Correspondingly, after the second interface sends the first information to the first interface, the PHY master-slave mode of the second interface itself may also be adjusted. When the second interface determines that the second interface does not meet the PHY master-slave mode adjustment condition, the second interface may not respond, or may send second information to the first interface, where the second information is used to notify the first interface that the first request is rejected.
In an implementation manner of the embodiment of the present application, the second interface may send, to the first interface, a first slow protocol packet including the first information and second slow protocol packet information including the second information, where both the first slow protocol packet and the second slow protocol packet may be the aforementioned ESMC packets. Specifically, the ESMC message may be extended, and the first information or the second information is carried in an extension field of the ESMC message, or the first information or the second information is carried in a reserved field of the ESMC message, and so on. When the first information is carried in the extension field of the EMSC message, for example, the first identifier may be carried in the value, and the first identifier may identify the EMSC message as the first information indicating that the first request is rejected.
In the embodiment of the present application, there may be multiple implementations for the second interface to determine whether the second interface meets the PHY master-slave mode adjustment condition, and several possible implementations are described below.
The first implementation mode comprises the following steps: it is considered that in practical applications, not all interfaces need to adjust the PHY master-slave mode according to the master-slave relationship of the synchronous ethernet clock. Specifically, in practical applications, the PHY master-slave mode adjustment attribute of the device may be configured, for example, the attribute may be configured to support the PHY master-slave mode adjustment according to the master-slave relationship of the synchronous ethernet clock, or configured to support the PHY master-slave mode adjustment according to the master-slave relationship of the synchronous ethernet clock. If the second interface does not support the adjustment of the PHY master-slave mode according to the master-slave relationship of the synchronous ethernet clock, the PHY master-slave mode of the second interface cannot be adjusted after the second interface receives the first request. For this case, the second interface may determine whether the second interface meets the PHY master slave mode adjustment condition, and when the second interface is implemented, may adjust the PHY master slave mode according to the master slave relationship of the synchronous ethernet clock. Specifically, when the second interface supports the PHY master-slave mode adjustment according to the master-slave relationship of the synchronous ethernet clock, the second interface may meet the PHY master-slave mode adjustment condition, and if the second interface does not support the PHY master-slave mode adjustment according to the master-slave relationship of the synchronous ethernet clock, it may be determined that the second interface does not meet the PHY master-slave mode adjustment condition.
The second implementation mode comprises the following steps: it is contemplated that in practical applications, other data may be transferred between the first interface and the second interface in addition to the synchronous ethernet clock. When the PHY master-slave mode of an interface, such as the first interface or the second interface, is adjusted, communication between the first interface and the second interface is interrupted. In other words, during the adjustment of the PHY master slave mode of the first interface or the second interface, data cannot be normally transferred between the first interface and the second interface. Therefore, when the PHY master-slave mode of the first interface and the second interface is adjusted, it is preferable that data transfer between the first interface and the second interface is not affected as much as possible. If the data traffic to be forwarded via the second interface is relatively large, part of the data to be forwarded may be lost when the PHY master-slave mode of the first interface is adjusted or the PHY master-slave mode of the second interface is adjusted. Therefore, in an implementation manner of the embodiment of the present application, when the second interface determines whether the second interface meets the PHY master-slave mode adjustment condition, in a specific implementation, it may be determined whether a traffic of data to be forwarded through the second interface is smaller than or equal to a preset traffic threshold for the second interface. Specifically, when the data traffic to be forwarded through the second interface is less than or equal to the preset traffic threshold, it indicates that the data traffic to be forwarded through the second interface is relatively small, so that the second interface may meet the PHY master-slave mode adjustment condition. When the data flow to be forwarded through the second interface is greater than the preset flow threshold, it indicates that the data flow to be forwarded through the second interface is relatively large, and it can be determined that the second interface does not meet the PHY master-slave mode adjustment condition. The specific value of the preset flow threshold is not specifically limited, and can be determined according to actual conditions.
The third implementation mode comprises the following steps: considering that in practical application, for some relatively special interfaces, the PHY master-slave mode of the interface can be configured to be the mandatory master mode or the mandatory slave mode in a manner of manual configuration by a user, and for such interfaces, the PHY master-slave mode is not allowed to be adjusted. Therefore, in one implementation manner of the embodiment of the present application, when the second interface determines whether the second interface meets the PHY master-slave mode adjustment condition, in a specific implementation, it may be determined whether the PHY master-slave mode of the second interface is a mandatory master mode or a mandatory slave mode configured by a user. If the PHY master-slave mode of the second interface is the mandatory master mode or the mandatory slave mode configured by the user, it may be determined that the second interface does not meet the PHY master-slave mode adjustment condition, otherwise, the second interface may meet the PHY master-slave mode adjustment condition.
As before, the PHY master slave mode adjustment target for the second interface may also be carried in the first request. And the PHY master-slave mode adjusting target of the second interface is used for instructing the second interface to adjust the PHY master-slave mode of the second interface according to the adjusting target. For this case, when the second interface determines whether the second interface meets the PHY master-slave mode adjustment condition, in a specific implementation, the fourth implementation may further include: and judging whether the second interface supports the PHY master-slave mode of the second interface to be adjusted according to the adjustment target carried in the first request. Specifically, if the second interface supports the PHY master-slave mode adjustment of the second interface according to the adjustment target carried in the first request, the second interface may meet the PHY master-slave mode adjustment condition; if the second interface does not support the PHY master-slave mode adjustment of the second interface according to the adjustment target carried in the first request, it may be determined that the second interface does not meet the PHY master-slave mode adjustment condition. In this embodiment, the adjusting, by the second interface, the PHY master-slave mode of the second interface according to the adjustment target carried in the first request may include at least the following two cases. One of the cases is: the second interface does not support the mandatory configuration PHY master slave mode, and the PHY master slave mode adjustment target of the second interface is either the mandatory configuration slave mode or the mandatory configuration master mode. Another case is: the second interface does not support auto-negotiation preferences to configure the PHY master-slave mode, while the PHY master-slave mode adjustment target of the second interface is either the auto-negotiation preferences slave mode or the auto-negotiation preferences master mode.
In this embodiment, when the second interface satisfies any one or more of the four conditions, it may be determined that the second interface meets the PHY master-slave mode adjustment condition. The four conditions are respectively: the second interface supports the regulation of the PHY master-slave mode according to the master-slave relation of the synchronous Ethernet clock, the data flow to be forwarded through the second interface is less than or equal to a preset flow threshold, the PHY master-slave mode of the second interface is not a mandatory master mode or a mandatory slave mode configured by a user, and whether the second interface supports the regulation of the PHY master-slave mode of the second interface according to the PHY master-slave mode regulation target of the second interface. As described above, when the second interface determines that the second interface meets the PHY master-slave mode adjustment condition, the second interface may send, to the first interface, first information for instructing the first interface to adjust the PHY master-slave mode of the first interface. Correspondingly, the second interface itself may also adjust its PHY master-slave mode after sending the first information to the first interface.
In this embodiment of the application, after receiving the first information, the first interface may adjust its PHY master-slave mode, so that the adjusted PHY master-slave mode of the first interface matches the master-slave relationship determined in S101. Specifically, when the synchronous ethernet clock of the first interface is a master clock, the synchronous ethernet clock of the second interface is a slave clock, and the PHY master-slave mode of the first interface is a slave mode, the first interface configures the PHY master-slave mode of the first interface as a forced master mode, or the first interface configures the PHY master-slave mode of the first interface as a master mode. Specifically, the first interface may adjust the PHY master-slave mode of the first interface according to a PHY master-slave mode configuration mode supported by the first interface. For example, if the first interface supports the mandatory configuration PHY master-slave mode, the first interface may configure the PHY master-slave mode of the first interface as the mandatory master mode; for another example, if the first interface supports auto-negotiation preferences to configure the PHY master mode, the first interface may configure the PHY master mode auto-negotiation preferences of the first interface as master mode. Or,
when the synchronous Ethernet clock of the first interface is a slave clock, the synchronous Ethernet clock of the second interface is a master clock, and the PHY master-slave mode of the first interface is a master mode, the first interface configures the PHY master-slave mode of the first interface to be a forced slave mode, or the first interface configures the PHY master-slave mode of the first interface to be a slave mode through auto-negotiation. Specifically, the first interface may adjust the PHY master-slave mode of the first interface according to a PHY master-slave mode configuration mode supported by the first interface. For example, if the first interface supports a forced configuration PHY master-slave mode, the first interface may configure the PHY master-slave mode of the first interface as a forced slave mode; for another example, if the first interface supports auto-negotiation preferences to configure the PHY master-slave mode, the first interface may configure the PHY master-slave mode auto-negotiation preferences of the first interface as the slave mode.
In this embodiment of the present application, when the second interface adjusts the PHY master-slave mode, there may be multiple implementation manners, and two possible implementation manners are described below.
In an implementation manner, the second interface may obtain a master-slave relationship between the synchronous ethernet clock of the first interface and the synchronous ethernet clock of the second interface, and determine its PHY master-slave mode, and then the second interface may adjust its PHY master-slave mode according to the determined master-slave relationship between the synchronous ethernet clocks and its PHY master-slave mode. For example, when the synchronous ethernet clock of the first interface is a master clock, the synchronous ethernet clock of the second interface is a slave clock, and the PHY master-slave mode of the second interface is a master mode, the second interface configures the PHY master-slave mode of the second interface as a forced slave mode, or the interface configures the PHY master-slave mode auto-negotiation preference of the second interface as a slave mode. Specifically, the second interface may adjust the PHY master-slave mode of the second interface according to a PHY master-slave mode configuration mode supported by the second interface. For example, if the second interface supports a forced configuration PHY master-slave mode, the second interface may configure the PHY master-slave mode of the second interface as a forced slave mode; for another example, if the second interface supports auto-negotiation preferences to configure the PHY master-slave mode, the second interface may configure the PHY master-slave mode auto-negotiation preferences of the second interface as the slave mode. Or when the synchronous Ethernet clock of the first interface is a slave clock, the synchronous Ethernet clock of the second interface is a master clock, and the PHY master-slave mode of the second interface is a slave mode, the second interface configures the PHY master-slave mode of the second interface as a mandatory master mode, or the second interface configures the PHY master-slave mode of the second interface as a master mode through auto-negotiation. Specifically, the second interface may adjust the PHY master-slave mode of the second interface according to a PHY master-slave mode configuration mode supported by the second interface. For example, if the second interface supports the mandatory configuration PHY master-slave mode, the second interface may configure the PHY master-slave mode of the second interface as the mandatory master mode; for another example, if the second interface supports auto-negotiation preferences to configure the PHY master mode, the second interface may configure the PHY master mode auto-negotiation preferences of the second interface as master mode.
In another implementation, if the PHY master-slave mode adjustment target of the second interface is carried in the first request, the second interface may adjust the PHY master-slave mode of the second interface according to the adjustment target. For example, if the adjustment target is to force the slave mode to be configured, then the second interface configures the PHY master-slave mode of the second interface to be the forced slave mode. As another example, if the adjustment target is to auto-negotiate a preference slave mode, then the second interface configures the PHY master-slave mode auto-negotiation preference of the second interface as the slave mode.
As described above, when the second interface determines that the second interface does not comply with the PHY master-slave mode adjustment condition, it may not respond, or may send second information to the first interface, where the second information is used to notify the first interface that the first request is rejected. When the first interface receives the second information, the PHY master-slave mode of the first interface may be maintained. In addition, the first interface may also periodically send the first request again to the second interface or the network management device, for requesting to adjust the PHY master-slave mode of the first interface and the second interface. Or, the first interface may periodically perform the foregoing S101-S103, that is, the first interface may periodically detect whether the master-slave relationship between the synchronous ethernet clock of the first interface and the synchronous ethernet clock of the second interface matches with the PHY master-slave mode of the first interface, and once the master-slave relationship does not match with the PHY master-slave mode of the first interface, the first interface may send a first request to the second interface or the network management device, so that the PHY master-slave mode may be adjusted in time, and a problem of transmission interruption of the synchronous ethernet clock is avoided.
Next, a specific implementation in which the network management apparatus performs the target operation will be described.
It should be noted that the network management device performs the target operation similarly to the second interface. Specifically, after receiving the first request, the network management device may first determine a second interface corresponding to the first interface according to the clock topology. For example, if the transmission direction of the synchronous ethernet clock is that the first interface transmits to the second interface, the network management device may determine, according to the clock topology, the second interface that tracks the synchronous ethernet clock transmitted by the first interface; for another example, if the transfer direction of the synchronous ethernet clock is that the second interface is transferred to the first interface, the network management device may determine, according to the clock topology, the upstream interface tracked by the first interface, that is, the second interface. After the network management device determines the second interface, it may obtain configuration information of the second interface related to the PHY master-slave mode, and determine whether the second interface meets the PHY master-slave mode adjustment condition according to the configuration information, and when the network management device determines that the second interface meets the PHY master-slave mode adjustment condition, the network management device may send first information to the first interface, where the first information is used to instruct the first interface to adjust the PHY master-slave mode of the first interface. Correspondingly, the network management device may further send third information to the second interface, where the third information is used to instruct the second interface to adjust the PHY master-slave mode of the second interface. When the network management device determines that the second interface does not meet the PHY master-slave mode adjustment condition, the network management device may not respond, or may send second information to the first interface, where the second information is used to notify the first interface that the first request is rejected.
In an implementation manner of the embodiment of the present application, the network management device may send an SNMP message or a NETCONF message including the first information to the first interface. And (4) information. Specifically, the SNMP message or the NETCONF message may be expanded, and the first information may be carried in the expanded SNMP message or the expanded NETCONF message. Similarly, the network management device may send an SNMP message or a NETCONF message including the second information to the first interface. Specifically, the SNMP message or the NETCONF message may be expanded, and the second information may be carried in the expanded SNMP message or the expanded NETCONF message. The network management device may further send SNMP message or NETCONF message information including the third information to the second interface. Specifically, the SNMP message or the NETCONF message may be expanded, and the third information may be carried in the expanded SNMP message or the expanded NETCONF message.
In this embodiment, when the network management device sends SNMP message information including the first information or the second information to the first interface, an MIB node corresponding to the first information may be added and encapsulated in an SNMP message, so as to achieve the purpose of sending the SNMP message information including the first information to the first interface. Specifically, a type field may be included in the MIB node to indicate that the first information is used to indicate that the first interface adjusts the PHY master-slave mode of the first interface. In addition, the structure of the MIB node corresponding to the second information may be the same as that of the MIB node corresponding to the first information, and the MIB nodes are distinguished by specific values of the type field. In other words, the first information and the second information may correspond to one MIB node. In addition, when the network management device sends the SNMP message including the third information to the second interface, the third information may also have a corresponding MIB node, and the MIB node corresponding to the third information may be encapsulated in the SNMP message, thereby achieving the purpose of sending the SNMP message information carrying the third information to the second interface. Specifically, the structure of the MIB node corresponding to the third information may be the same as that of the MIB node corresponding to the first information, that is, the MIB node corresponding to the third information may include a type field, which is used to indicate that the third information is used to indicate the second interface to adjust the PHY master-slave mode of the second interface. When the network management device sends the NETCONF message information including the first information or the second information to the first interface, a schema node corresponding to the first information may be newly added, and the schema node is encapsulated in the NETCONF message, so as to achieve the purpose of sending the first information to the first interface through the NETCONF message. In addition, the structure of the schema node corresponding to the second information may be the same as that of the schema node corresponding to the first information, and the schema node corresponding to the second information is distinguished by a specific value of a certain field. Correspondingly, when the network management device sends the NETCONF message including the third information to the second interface, the third information may also have a corresponding schema node, and the schema node is encapsulated in the NETCONF message, so as to achieve the purpose of sending the NETCONF message information carrying the third information to the second interface.
In an implementation manner of the embodiment of the present application, if the first request carries a PHY master-slave mode adjustment target of the second interface, the third information sent by the network management device to the second interface may also carry the adjustment target, so as to instruct the second interface to adjust the PHY master-slave mode of the second interface according to the adjustment target. For this situation, the MIB node corresponding to the third information may further include a value field, where the value field is used to carry a PHY master-slave mode adjustment target of the second interface, and is used to instruct the second interface to adjust its PHY master-slave mode according to the adjustment target. Correspondingly, the schema node corresponding to the third information may further carry a PHY master-slave mode adjustment target of the second interface, and is configured to instruct the second interface to adjust the PHY master-slave mode of the second interface according to the adjustment target.
In the embodiment of the present application, the specific implementation manner of determining whether the second interface meets the PHY master-slave mode adjustment condition by the network management device is the same as the specific implementation manner of determining whether the second interface meets the PHY master-slave mode adjustment condition by the second interface. Specifically, it may be determined that the second interface meets the PHY master-slave mode adjustment condition when the second interface meets one or more of the following four conditions.
The first condition is that: the second interface supports adjusting the PHY master slave mode according to the master slave relationship of the synchronous ethernet clock.
The second condition is that: and the flow of the data to be forwarded through the second interface is less than or equal to a preset flow threshold value.
The third condition is that: the PHY master-slave mode of the second interface is not a user-configured mandatory master mode or mandatory slave mode.
The fourth condition is that: whether the second interface supports adjusting the PHY master-slave mode of the second interface according to the PHY master-slave mode adjusting target of the second interface or not, wherein the first request received by the network management equipment comprises the adjusting target.
With respect to a specific implementation manner of the network management device determining whether the second interface meets the PHY master-slave mode adjustment condition, reference may be made to the foregoing specific description portion of the specific implementation manner of the second interface determining whether the second interface meets the PHY master-slave mode adjustment condition, and a description thereof is not repeated here.
In addition, the steps performed after the first interface receives the first information from the network management device are the same as the steps performed when the first interface receives the first information from the second interface, and therefore, the description is not repeated here. The steps performed after the first interface receives the second information from the network management device are the same as the steps performed after the first interface receives the second information from the second interface, and therefore, the description is not repeated here. After the second interface receives the third information from the network management device, the PHY master-slave mode of the second interface may be adjusted, and the specific adjustment manner may refer to the above related description, which is not repeated here.
Based on the method for adjusting the PHY master-slave mode provided in the foregoing embodiment, the embodiment of the present application further provides a corresponding device for adjusting the PHY master-slave mode, and the device is described below with reference to the accompanying drawings.
Referring to fig. 3, this figure is a schematic structural diagram of an apparatus for adjusting a PHY master-slave mode according to an embodiment of the present disclosure. The apparatus 300 for adjusting PHY master-slave mode shown in fig. 3 can be applied to the aforementioned first interface for performing the steps performed by the first interface in the aforementioned embodiment.
Specifically, the apparatus 300 for adjusting the PHY master-slave mode shown in fig. 3 may include, for example, a first determining unit 301 and a transmitting unit 302.
A first determining unit 301, configured to determine a master-slave relationship between a synchronous ethernet clock of the first interface and a synchronous ethernet clock of the second interface, and determine a PHY master-slave mode of the first interface.
A sending unit 302, configured to send a first request to the second interface or a network management device if it is determined that the master-slave relationship is not matched with the PHY master-slave mode of the first interface, where the first request is used to request to adjust the PHY master-slave mode of the first interface and the PHY master-slave mode of the second interface.
In one possible implementation, the first request includes a PHY master-slave mode adjustment target for the second interface.
In a possible implementation manner, the apparatus 300 for adjusting a PHY master-slave mode shown in fig. 3 further includes a second determining unit, configured to determine a PHY master-slave mode adjustment target of the second interface according to the master-slave relationship and the PHY master-slave mode of the first interface.
In a possible implementation manner, the second determining unit is specifically configured to: when the synchronous Ethernet clock of the first interface is a master clock, the synchronous Ethernet clock of the second interface is a slave clock, and the PHY master-slave mode of the first interface is a slave mode, determining that the PHY master-slave mode adjustment target of the second interface is as follows: forced configuration of slave mode, or auto-negotiation preference of slave mode; or,
when the synchronous Ethernet clock of the first interface is a slave clock, the synchronous Ethernet clock of the second interface is a master clock, and the PHY master-slave mode of the first interface is a master mode, determining that the PHY master-slave mode adjustment target of the second interface is: the master mode is forcibly configured or the master mode is preferred by auto-negotiation.
In one possible implementation manner, the apparatus 300 for adjusting a PHY master-slave mode shown in fig. 3 further includes: a first receiving unit, configured to receive first information from the second interface or the network management device, where the first information is used to instruct the first interface to adjust a PHY master-slave mode of the first interface; and the adjusting unit is used for adjusting the PHY master-slave mode of the first interface according to the first information, and the adjusted PHY master-slave mode of the first interface is matched with the master-slave relationship.
In a possible implementation manner, the adjusting unit is specifically configured to: when the synchronous Ethernet clock of the first interface is a master clock, the synchronous Ethernet clock of the second interface is a slave clock, and the PHY master-slave mode of the first interface is a slave mode, configuring the PHY master-slave mode of the first interface as a mandatory master mode, or configuring the PHY master-slave mode auto-negotiation preference of the first interface as a master mode; or,
when the synchronous Ethernet clock of the first interface is a slave clock, the synchronous Ethernet clock of the second interface is a master clock, and the PHY master-slave mode of the first interface is a master mode, the PHY master-slave mode of the first interface is configured to be a forced slave mode, or the PHY master-slave mode auto-negotiation preference of the first interface is configured to be the slave mode.
In one possible implementation manner, the apparatus 300 for adjusting the PHY master-slave mode shown in fig. 3 further includes: a second receiving unit, configured to receive second information from the second interface or the network management device, where the second information indicates that the first request is rejected; a maintaining unit, configured to maintain a PHY master-slave mode of the first interface according to the second information.
In a possible implementation manner, the sending unit 302 is specifically configured to: sending a slow protocol message to the second interface, wherein the slow protocol message comprises the first request; or sending a simple network protocol (SNMP) message or a network configuration protocol (NETCONF) message to the network management equipment, wherein the SNMP message or the NETCONF message comprises the first request.
In a possible implementation manner, the slow protocol message is an ESMC message.
Since the apparatus 300 is an apparatus corresponding to the method executed by the first interface provided in the above method embodiment, and the specific implementation of each unit of the apparatus 300 is the same as that of the above method embodiment, for the specific implementation of each unit of the apparatus 300, reference may be made to the description part of the method executed by the first interface in the above method embodiment, and details are not described here again.
Referring to fig. 4, this figure is a schematic structural diagram of an apparatus for adjusting a PHY master-slave mode according to an embodiment of the present disclosure. The apparatus 400 for adjusting PHY master-slave mode shown in fig. 4 can be applied to the aforementioned second interface for performing the steps performed by the second interface in the aforementioned embodiments.
Specifically, the apparatus 400 for adjusting the PHY master-slave mode shown in fig. 4 may include, for example, a receiving unit 401 and an executing unit 402.
A receiving unit 401, configured to receive a first request from a first interface, where the first request is used to request to adjust a PHY master-slave mode of the first interface and a PHY master-slave mode of the second interface.
An executing unit 402, configured to execute the target operation according to the first request.
In a possible implementation manner, the execution unit 402 is specifically configured to: and when the second interface is determined to accord with the PHY master-slave mode adjusting condition, sending first information to the first interface, wherein the first information is used for indicating the first interface to adjust the PHY master-slave mode of the first interface.
In a possible implementation manner, the execution unit 402 is further configured to: and when the second interface is determined not to meet the PHY master-slave mode adjustment condition, sending second information to the first interface, wherein the second information is used for informing the first interface that the first request is rejected.
In one possible implementation, the PHY master-slave mode adjustment condition is determined to be met by the second interface when the second interface meets any one or more of the following: the second interface supports adjusting a PHY master-slave mode according to the master-slave relation of a synchronous Ethernet clock, the flow of data to be forwarded through the second interface is smaller than or equal to a preset flow threshold, the PHY master-slave mode of the second interface is determined not to be a forced master mode or a forced slave mode configured by a user, and the second interface supports adjusting the PHY master-slave mode of the second interface according to the PHY master-slave mode adjustment target of the second interface.
In one possible implementation, the PHY master-slave mode adjustment target of the second interface is included in the first request.
In a possible implementation manner, the first request includes a PHY master-slave mode adjustment target of the second interface, and the apparatus 400 for adjusting a PHY master-slave mode shown in fig. 4 further includes: and the adjusting unit is used for adjusting the PHY master-slave mode of the second interface according to the PHY master-slave mode adjusting target of the second interface after the first information is sent to the first interface.
In a possible implementation manner, the sending the first information to the first interface includes: and sending a first slow protocol message to the first interface, wherein the first slow protocol message comprises the first information.
In a possible implementation manner, the sending the second information to the first interface includes: and sending a second slow protocol message to the first interface, wherein the second slow protocol message comprises the second information.
Since the apparatus 400 is an apparatus corresponding to the method executed by the second interface provided in the above method embodiment, and the specific implementation of each unit of the apparatus 400 is the same as that of the above method embodiment, for the specific implementation of each unit of the apparatus 400, reference may be made to the description part of the method executed by the second interface in the above method embodiment, and details are not described here again.
Referring to fig. 5, this figure is a schematic structural diagram of an apparatus for adjusting a PHY master-slave mode according to an embodiment of the present application. The apparatus 500 for adjusting PHY master-slave mode shown in fig. 5 may be applied to the aforementioned network management device, and is configured to perform the steps performed by the network management device according to the aforementioned embodiment.
Specifically, the apparatus 500 for adjusting the PHY master-slave mode shown in fig. 5 may include, for example, a receiving unit 501 and an executing unit 502.
A receiving unit 501, configured to receive a first request from a first interface, where the first request is used to request adjustment of a PHY master-slave mode of the first interface and a PHY master-slave mode of a second interface, and the second interface is an interface corresponding to the first interface and used for transmitting a synchronous ethernet clock;
an execution unit 502, configured to execute the target operation according to the first request.
In a possible implementation manner, the execution unit 502 is specifically configured to: if the second interface meets the PHY master-slave mode adjustment condition, sending first information to the first interface and sending third information to the second interface, wherein the first information is used for indicating the first interface to adjust the PHY master-slave mode of the first interface, and the third information is used for indicating the second interface to adjust the PHY master-slave mode of the second interface.
In a possible implementation manner, the execution unit 502 is further configured to: and if the second interface does not meet the PHY master-slave mode adjustment condition, sending second information to the first interface, wherein the second information is used for informing the first interface that the first request is rejected.
In one possible implementation, determining that the second interface conforms to a PHY master-slave mode adjustment condition is performed when the second interface conforms to any one or more of: the second interface supports adjusting a PHY master-slave mode according to a master-slave relationship of a synchronous Ethernet clock, the flow of data to be forwarded through the second interface is less than or equal to a preset flow threshold value, the PHY master-slave mode of the second interface is not a mandatory master mode or a mandatory slave mode configured by a user, and the second interface supports adjusting the PHY master-slave mode of the second interface according to a PHY master-slave mode adjustment target of the second interface.
In one possible implementation, the PHY master-slave mode adjustment target of the second interface is included in the first request.
In a possible implementation manner, the third information includes a PHY master-slave mode adjustment target of the second interface.
In a possible implementation manner, the PHY master-slave mode adjustment target of the second interface is obtained according to the first request, where the first request includes the PHY master-slave mode adjustment target of the second interface.
In a possible implementation manner, the sending the first information to the first interface includes: and sending a simple network protocol (SNMP) message or a network configuration protocol (NETCONF) message to the first interface, wherein the SNMP message or the NETCONF message comprises the first information.
In a possible implementation manner, the sending the third information to the second interface includes: and sending a simple network protocol (SNMP) message or a network configuration protocol (NETCONF) message to the second interface, wherein the SNMP message or the NETCONF message comprises the third information.
In a possible implementation manner, the sending the second information to the first interface includes: and sending a simple network protocol (SNMP) message or a network configuration protocol (NETCONF) message to the first interface, wherein the SNMP message or the NETCONF message comprises the second information.
Since the apparatus 500 is a device corresponding to the method executed by the network management device according to the foregoing method embodiment, and the specific implementation of each unit of the apparatus 500 is the same as that of the foregoing method embodiment, for the specific implementation of each unit of the apparatus 500, reference may be made to the description part of the method executed by the network management device according to the foregoing method embodiment, and details are not described here again.
It should be noted that the hardware structure of the aforementioned apparatus 300, 400, and 500 for adjusting the PHY master-slave mode may be as shown in fig. 6, and fig. 6 is a schematic structural diagram of an apparatus for adjusting the PHY master-slave mode according to an embodiment of the present disclosure.
Referring to fig. 6, an apparatus 600 for adjusting PHY master-slave mode includes: a processor 610, a communication interface 620, and a memory 630. The number of processors 610 in the apparatus 600 for adjusting the PHY master-slave mode may be one or more, and one processor is taken as an example in fig. 6. In the embodiment of the present application, the processor 610, the communication interface 620, and the memory 630 may be connected by a bus system or other means, wherein fig. 6 is taken as an example of the connection by the bus system 640.
The processor 610 may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of a CPU and an NP. The processor 610 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
The memory 630 may include a volatile memory (english: volatile memory), such as a random-access memory (RAM); the memory 630 may also include a non-volatile memory (e.g., flash memory), a hard disk (HDD) or a solid-state drive (SSD); the memory 630 may also comprise a combination of memories of the kind described above. The memory 630 may store, for example, configuration information related to the PHY master slave mode.
Optionally, memory 630 stores an operating system and programs, executable modules or data structures, or subsets thereof, or expanded sets thereof, which programs may include various operational information for performing various operations. The operating system may include various system programs for implementing various basic services and for handling hardware-based tasks. The processor 610 may read a program in the memory 630 to implement the method for adjusting the PHY master-slave mode according to the embodiment of the present application.
The bus system 640 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus system 640 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 6, but that does not indicate only one bus or one type of bus.
Embodiments of the present application also provide a computer-readable storage medium, which includes a program that, when executed on a computer, causes the computer to perform the method for adjusting the PHY master-slave mode performed by the first interface provided in the above embodiments.
Embodiments of the present application further provide a computer-readable storage medium, which includes a program, when it runs on a computer, to make the computer execute the method for adjusting the PHY master-slave mode performed by the second interface provided in the above embodiments.
Embodiments of the present application also provide a computer-readable storage medium, which includes a program that, when executed on a computer, causes the computer to execute the method for adjusting the PHY master-slave mode performed by the network management device provided in the above embodiments.
Embodiments of the present application also provide a computer program product containing a program, which when run on a computer, causes the computer to execute the method for adjusting PHY master-slave mode performed by the first interface provided in the above embodiments.
Embodiments of the present application also provide a computer program product containing a program, which when run on a computer, causes the computer to execute the method for adjusting PHY master-slave mode performed by the second interface provided in the above embodiments.
Embodiments of the present application further provide a computer program product containing a program, which when run on a computer, causes the computer to execute the method for adjusting a PHY master-slave mode performed by a network management device provided in the above embodiments.
The terms "first," "second," "third," "fourth," and the like in the description and claims of this application and in the above-described drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. The data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be implemented in other sequences than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is only a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, each service unit in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may be implemented in the form of a software service unit.
The integrated unit, if implemented as a software business unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially or partially implemented in the form of a software product stored in a storage medium, and includes several programs to enable a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, and various media capable of storing program codes.
Those skilled in the art will recognize that the services described in this disclosure may be implemented in hardware, software, firmware, or any combination thereof, in one or more of the examples described above. When implemented in software, the services may be stored on or transmitted over as one or more programs or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The above embodiments are only specific embodiments of the present invention, and the purpose, technical solution and advantageous effects of the present invention are further described in detail.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, modifications may be made to the technical solutions described in the foregoing embodiments, or some technical features may be replaced with equivalents; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (28)

1. A method of adjusting a physical layer PHY master-slave mode, comprising:
the first interface determines the master-slave relation between the synchronous Ethernet clock of the first interface and the synchronous Ethernet clock of the second interface; the first interface determines a PHY master-slave mode of the first interface;
if the first interface determines that the master-slave relationship is not matched with the PHY master-slave mode of the first interface, the first interface sends a first request to the second interface or the network management equipment, wherein the first request is used for requesting to adjust the PHY master-slave mode of the first interface and the PHY master-slave mode of the second interface.
2. The method of claim 1, wherein the first request comprises a PHY master slave mode adjustment target for the second interface.
3. The method of claim 1 or 2, further comprising:
and the first interface determines a PHY master-slave mode adjustment target of the second interface according to the master-slave relationship and the PHY master-slave mode of the first interface.
4. The method of claim 3, wherein the first interface determining a PHY master-slave mode adjustment target for the second interface based on the master-slave relationship and a PHY master-slave mode of the first interface comprises:
when the synchronous Ethernet clock of the first interface is a master clock, the synchronous Ethernet clock of the second interface is a slave clock, and the PHY master-slave mode of the first interface is a slave mode, the first interface determines that the PHY master-slave mode adjustment target of the second interface is: forced configuration of slave mode, or auto-negotiation of preferred slave mode;
or,
when the synchronous ethernet clock of the first interface is a slave clock, the synchronous ethernet clock of the second interface is a master clock, and the PHY master-slave mode of the first interface is a master mode, the first interface determines that the PHY master-slave mode adjustment target of the second interface is: the master mode is forcibly configured or the master mode is preferred by auto-negotiation.
5. The method of claim 1, 2 or 4, further comprising:
the first interface receives first information from the second interface or the network management device, wherein the first information is used for instructing the first interface to adjust a PHY master-slave mode of the first interface;
and the first interface adjusts the PHY master-slave mode of the first interface according to the first information, and the adjusted PHY master-slave mode of the first interface is matched with the master-slave relationship.
6. The method of claim 5, wherein the first interface adjusting the PHY master-slave mode of the first interface according to the first information comprises:
when the synchronous Ethernet clock of the first interface is a master clock, the synchronous Ethernet clock of the second interface is a slave clock, and the PHY master-slave mode of the first interface is a slave mode, the first interface configures the PHY master-slave mode of the first interface as a mandatory master mode, or the first interface configures the PHY master-slave mode auto-negotiation preference of the first interface as a master mode;
or,
when the synchronous Ethernet clock of the first interface is a slave clock, the synchronous Ethernet clock of the second interface is a master clock, and the PHY master-slave mode of the first interface is a master mode, the first interface configures the PHY master-slave mode of the first interface to be a forced slave mode, or the first interface configures the PHY master-slave mode of the first interface to be a slave mode.
7. The method of claim 1, 2 or 4, further comprising:
the first interface receives second information from the second interface or the network management device, the second information indicating that the first request is denied;
the first interface maintains a PHY master-slave mode of the first interface according to the second information.
8. The method of claim 1, 2, 4 or 6, wherein the first interface sending a first request to the second interface or a network management device comprises:
the first interface sends a slow protocol message to the second interface, wherein the slow protocol message comprises the first request; or,
the first interface sends a simple network protocol (SNMP) message or a network configuration protocol (NETCONF) message to the network management equipment, wherein the SNMP message or the NETCONF message comprises the first request.
9. The method of claim 8, wherein the slow protocol message is an Ethernet Synchronous Message Channel (ESMC) message.
10. A method of adjusting a physical layer PHY master-slave mode, comprising:
the second interface receives a first request from the first interface, wherein the first request is used for requesting to adjust the PHY master-slave mode of the first interface and the PHY master-slave mode of the second interface;
the second interface executes a target operation according to the first request;
the second interface performs a target operation according to the first request, including:
when the second interface is determined to meet the PHY master-slave mode adjustment condition, the second interface sends first information to the first interface, and the first information is used for indicating the first interface to adjust the PHY master-slave mode of the first interface.
11. The method of claim 10, further comprising:
when the second interface is determined not to meet the PHY master-slave mode adjustment condition, the second interface sends second information to the first interface, and the second information is used for informing the first interface that the first request is rejected.
12. The method of claim 10 or 11, wherein the second interface is determined to comply with a PHY master slave mode adjustment condition when the second interface complies with any one or more of:
the second interface supports adjusting PHY master-slave mode according to master-slave relation of synchronous Ethernet clock,
The flow of the data to be forwarded through the second interface is less than or equal to a preset flow threshold value,
Deciding that a PHY master slave mode of the second interface is not a user-configured mandatory master mode or mandatory slave mode, and,
the second interface supports adjusting the PHY master-slave mode of the second interface according to the PHY master-slave mode adjustment target of the second interface.
13. The method of any of claims 10 to 11, wherein a PHY master slave mode adjustment target for the second interface is included in the first request.
14. The method of claim 11, wherein the first request comprises a PHY master slave mode adjustment target for the second interface, and wherein after the second interface sends the first information to the first interface, the method further comprises:
and the second interface adjusts the PHY master-slave mode of the second interface according to the PHY master-slave mode adjustment target of the second interface.
15. The method of claim 10, wherein the second interface sends first information to the first interface, comprising:
and the second interface sends a first slow protocol message to the first interface, wherein the first slow protocol message comprises the first information.
16. The method of claim 11, wherein the second interface sends second information to the first interface, comprising:
and the second interface sends a second slow protocol message to the first interface, wherein the second slow protocol message comprises the second information.
17. A method of adjusting a physical layer PHY master-slave mode, comprising:
the method comprises the steps that a network management device receives a first request from a first interface, wherein the first request is used for requesting to adjust a PHY master-slave mode of the first interface and a PHY master-slave mode of a second interface, and the second interface is an interface which corresponds to the first interface and is used for transmitting a synchronous Ethernet clock;
the network management equipment executes target operation according to the first request;
the network management device executes a target operation according to the first request, including:
if the second interface meets the PHY master-slave mode adjustment condition, the network management equipment sends first information to the first interface and sends third information to the second interface, wherein the first information is used for indicating the first interface to adjust the PHY master-slave mode of the first interface, and the third information is used for indicating the second interface to adjust the PHY master-slave mode of the second interface.
18. The method of claim 17, further comprising:
if the second interface does not meet the PHY master-slave mode adjustment condition, the network management device sends second information to the first interface, and the second information is used for informing the first interface that the first request is rejected.
19. The method of claim 17 or 18, wherein the second interface is determined to comply with a PHY master slave mode adjustment condition when the second interface complies with any one or more of:
the second interface supports adjusting PHY master-slave mode according to master-slave relation of synchronous Ethernet clock,
The flow of the data to be forwarded through the second interface is less than or equal to a preset flow threshold value,
The PHY master-slave mode of the second interface is not a user-configured mandatory master mode or mandatory slave mode, and,
the second interface supports adjusting the PHY master-slave mode of the second interface according to the PHY master-slave mode adjustment target of the second interface.
20. A method as claimed in any one of claims 17 to 18, wherein the first request includes a PHY master slave mode adjustment target for the second interface.
21. The method of claim 17, wherein the third information comprises a PHY master slave mode adjustment target for the second interface.
22. The method of claim 21, wherein the PHY master-slave mode adjustment target for the second interface is derived from the first request, and wherein the first request includes the PHY master-slave mode adjustment target for the second interface.
23. The method of claim 17, wherein the network management device sends first information to the first interface, comprising:
the network management equipment sends a simple network protocol (SNMP) message or a network configuration protocol (NETCONF) message to the first interface, wherein the SNMP message or the NETCONF message comprises the first information.
24. The method of claim 17, wherein the network management device sends third information to the second interface, the third information comprising:
and the network management equipment sends a simple network protocol (SNMP) message or a network configuration protocol (NETCONF) message to the second interface, wherein the SNMP message or the NETCONF message comprises the third information.
25. The method of claim 18, wherein the network management device sends second information to the first interface, comprising:
and the network management equipment sends a simple network protocol (SNMP) message or a network configuration protocol (NETCONF) message to the first interface, wherein the SNMP message or the NETCONF message comprises the second information.
26. An apparatus for adjusting a physical layer (PHY) master-slave mode, the apparatus comprising: a processor and a memory;
the memory is used for storing programs;
the processor, executing the program in the memory, performing the method of any of claims 1-25.
27. A network device, characterized in that it comprises the apparatus of claim 26.
28. A computer-readable storage medium, characterized in that a program is stored which, when run on a computer, causes the computer to perform the method of any of the preceding claims 1-25.
CN201911175282.8A 2019-11-26 2019-11-26 Method and device for adjusting physical layer (PHY) master-slave mode Active CN112865899B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911175282.8A CN112865899B (en) 2019-11-26 2019-11-26 Method and device for adjusting physical layer (PHY) master-slave mode
PCT/CN2020/122614 WO2021103860A1 (en) 2019-11-26 2020-10-22 Method and apparatus for adjusting physical layer (phy) master-slave mode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911175282.8A CN112865899B (en) 2019-11-26 2019-11-26 Method and device for adjusting physical layer (PHY) master-slave mode

Publications (2)

Publication Number Publication Date
CN112865899A CN112865899A (en) 2021-05-28
CN112865899B true CN112865899B (en) 2022-07-22

Family

ID=75984929

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911175282.8A Active CN112865899B (en) 2019-11-26 2019-11-26 Method and device for adjusting physical layer (PHY) master-slave mode

Country Status (2)

Country Link
CN (1) CN112865899B (en)
WO (1) WO2021103860A1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101494560A (en) * 2009-02-20 2009-07-29 华为技术有限公司 Method, apparatus and system for configuring master-salve network device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE3173313D1 (en) * 1980-09-25 1986-02-06 Toshiba Kk Clock synchronization signal generating circuit
CN1866803B (en) * 2005-09-13 2012-05-30 华为技术有限公司 Method for solving clock synchronization in total Ethernet
CN101547085A (en) * 2009-04-29 2009-09-30 华为技术有限公司 Physical layer port master-slave configuration method, device and communication system
US8879586B2 (en) * 2012-12-20 2014-11-04 Broadcom Corporation Inband timestamping
CN103401728B (en) * 2013-07-29 2016-08-10 华为技术有限公司 A kind of for detecting the method and apparatus that equipment room interface connects
US9270395B2 (en) * 2014-05-05 2016-02-23 Telefonaktiebolaget L M Ericsson (Publ) Method for robust PTP synchronization with default 1588V2 profile
CN105450384A (en) * 2015-12-10 2016-03-30 中国能源建设集团广东省电力设计研究院有限公司 Synchronous clock time synchronization apparatus for communication module

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101494560A (en) * 2009-02-20 2009-07-29 华为技术有限公司 Method, apparatus and system for configuring master-salve network device

Also Published As

Publication number Publication date
CN112865899A (en) 2021-05-28
WO2021103860A1 (en) 2021-06-03

Similar Documents

Publication Publication Date Title
EP2985952B1 (en) Method and device for protecting service reliability, and network virtualization system
EP3140932B1 (en) A method for robust ptp synchronization with default 1588v2 profile
US9331870B2 (en) Switch, information processing apparatus, and information processing system
US10868754B2 (en) High availability input/output management nodes
US9288075B2 (en) Method and system for auto-configuration, and network node
CN110275680B (en) Double-control double-active storage system
US9019959B2 (en) Node, switch, and system
US20180123868A1 (en) Indicating a master network controller in a virtual router redundancy protocol
CN103001759B (en) A kind of network method for synchronizing time, system and device
WO2019076046A1 (en) Transmission path configuration method, apparatus, and device
CN107852682B (en) Method and apparatus for determining synchronization reference
EP4024987B1 (en) Timeslot negotiation method and device
US10097297B2 (en) Apparatus and method for two-way timestamp exchange
CN112865899B (en) Method and device for adjusting physical layer (PHY) master-slave mode
US9705823B2 (en) Port status synchronization method, related device, and system
US9990226B2 (en) Apparatus and method for implementing common public radio interface negotiation state machine
CN114006910B (en) Information synchronization method and device
EP2953299A1 (en) Protection switching method, system and node
WO2022037654A1 (en) Time synchronization failure processing method, apparatus and system, and storage medium
EP4203568A1 (en) Time synchronization failure processing method, device and system
Machnikowski et al. Challenges with linuxptp on Telco RAN deployments
CN117220814A (en) Clock device synchronization method, nonvolatile storage medium, and electronic device
WO2023071249A1 (en) Time slot negotiation method and apparatus
WO2024114048A1 (en) Clock quality level setting method, device and system
CN115022181A (en) Information synchronization method, device, equipment and medium based on ROCE-SAN

Legal Events

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