Method and apparatus for determining clock, and storage medium
A method and an apparatus are provided for determining a network device receiving a first signal and at least one second signal, wherein the first signal carries data to be sent through a first flexible Ethernet interface. A first physical layer clock is determined based on the first signal. A second physical layer clock is determined based on the at least one second signal or the first physical layer clock and the at least one second signal. The first physical layer clock or the second physical layer clock is used as a sending clock of a non-flexible Ethernet interface. The network device includes the first flexible Ethernet interface and the non-flexible Ethernet interface.
1 . A method for determining a clock, the method comprising:
receiving, by a first network device, a first signal and at least one second signal, wherein the first signal carries data to be sent through a first flexible Ethernet interface;
determining, by the first network device, a first physical layer clock based on the first signal;
determining, by the first network device, a second physical layer clock based on the at least one second signal or the first physical layer clock and the at least one second signal; and
adopting, by the first network device, the first physical layer clock or the second physical layer clock as a sending clock of a non-flexible Ethernet interface,
wherein the first network device comprises the first flexible Ethernet interface and the non-flexible Ethernet interface.
2 . The method according to claim 1 , wherein determining, by the first network device, the second physical layer clock based on the at least one second signal comprises:
determining, by the first network device, the second physical layer clock based on a physical layer clock quality level associated with the at least one second signal; and/or
determining, by the first network device, the second physical layer clock based on a physical layer clock priority associated with the at least one second signal.
3 . The method according to claim 1 , wherein determining, by the first network device, the second physical layer clock based on the first physical layer clock and the at least one second signal comprises:
determining, by the first network device, the second physical layer clock based on a physical layer clock quality level associated with the first physical layer clock and a physical layer clock quality level associated with the at least one second signal; and/or
determining, by the first network device, the second physical layer clock based on a physical layer clock priority associated with the first physical layer clock and a physical layer clock priority associated with the at least one second signal.
4 . The method according to claim 1 , wherein adopting, by the first network device, the first physical layer clock or the second physical layer clock as the sending clock of the non-flexible Ethernet interface comprises:
adopting, by the first network device, the first physical layer clock or the second physical layer clock as the sending clock of the non-flexible Ethernet interface according to a configuration command.
5 . The method according to claim 1 , wherein adopting, by the first network device, the first physical layer clock or the second physical layer clock as the sending clock of the non-flexible Ethernet interface comprises:
adopting, by the first network device, the first physical layer clock or the second physical layer clock as the sending clock of the non-flexible Ethernet interface based on a physical layer clock quality level of the first physical layer clock and a physical layer clock quality level of the second physical layer clock; and/or
adopting, by the first network device, the first physical layer clock or the second physical layer clock as the sending clock of the non-flexible Ethernet interface based on a physical layer clock priority of the first physical layer clock and a physical layer clock priority of the second physical layer clock.
6 . The method according to claim 1 , further comprising:
adopting, by the first network device, the first physical layer clock as a sending clock of the first flexible Ethernet interface.
7 . The method according to claim 1 , wherein the first network device is an edge device of an optical transport network, and the first signal comes from the optical transport network.
8 . The method according to claim 1 , wherein a type of the first flexible Ethernet interface comprises a flexible Ethernet (FlexE), a slicing packet network (SPN), or a metro transport network (MTN).
9 . The method according to claim 1 , wherein a type of the non-flexible Ethernet interface comprises an Ethernet interface, a synchronous digital hierarchy (SDH), a synchronous optical network (SONET), an optical supervisory channel (OSC), or an optical transport unit (OUT).
10 . The method according to claim 1 , wherein the first signal carries flexible Ethernet data received through a first optical transport unit (OUT) interface of the first network device.
11 . The method according to claim 1 , wherein any one of the at least one second signal carries overhead data received through a first optical transport unit (OUT) interface of the first network device;
any one of the at least one second signal carries data received through an optical supervisory channel (OSC) interface of the first network device; or
any one of the at least one second signal carries data received through an Ethernet interface of the first network device.
12 . An apparatus for determining a clock, the apparatus comprising:
a processor;
a memory coupled to the processor and storing program instructions that, upon execution by the processor, cause the apparatus to:
receive a first signal and at least one second signal, wherein the first signal carries data to be sent through a first flexible Ethernet interface;
determine a first physical layer clock based on the first signal; and
determine a second physical layer clock based on the at least one second signal or the first physical layer clock and the at least one second signal,
wherein the first physical layer clock or the second physical layer clock is used adopted as a sending clock of a non-flexible Ethernet interface, and
wherein the apparatus comprises the first flexible Ethernet interface and the non-flexible Ethernet interface.
13 . The apparatus according to claim 12 , wherein the program instructions, upon execution by the processor, further cause the apparatus to:
determine the second physical layer clock based on a physical layer clock quality level associated with the at least one second signal; and/or
determine the second physical layer clock based on a physical layer clock priority associated with the at least one second signal.
14 . The apparatus according to claim 12 , wherein the program instructions, upon execution by the processor, further cause the apparatus to:
determine the second physical layer clock based on a physical layer clock quality level associated with the first physical layer clock and a physical layer clock quality level associated with the at least one second signal; and/or
determine the second physical layer clock based on a physical layer clock priority associated with the first physical layer clock and a physical layer clock priority associated with the at least one second signal.
15 . The apparatus according to claim 12 , wherein the program instructions, upon execution by the processor, further cause the apparatus to:
adopt the first physical layer clock or the second physical layer clock as the sending clock of the non-flexible Ethernet interface according to a configuration command.
16 . The apparatus according to claim 12 , wherein the program instructions, upon execution by the processor, further cause the apparatus to:
adopt the first physical layer clock or the second physical layer clock as the sending clock of the non-flexible Ethernet interface based on a physical layer clock quality level of the first physical layer clock and a physical layer clock quality level of the second physical layer clock; and/or
adopt the first physical layer clock or the second physical layer clock as the sending clock of the non-flexible Ethernet interface based on a physical layer clock priority of the first physical layer clock and a physical layer clock priority of the second physical layer clock.
17 . The apparatus according to claim 12 , wherein the program instructions, upon execution by the processor, further cause the apparatus to:
adopt the first physical layer clock as a sending clock of the first flexible Ethernet interface.
18 . The apparatus according to claim 12 , wherein the apparatus is an edge device of an optical transport network, and the first signal comes from the optical transport network.
19 . The apparatus according to claim 12 , wherein a type of the first flexible Ethernet interface comprises a flexible Ethernet (FlexE), a slicing packet network (SPN), or a metro transport network (MTN).
20 . A non-transitory computer-readable storage medium storing a computer program, wherein upon the computer program being executed by a computer, a method for determining a clock is implemented, the method comprising:
receiving, a first signal and at least one second signal, wherein the first signal carries data to be sent through a first flexible Ethernet interface;
determining, a first physical layer clock based on the first signal;
determining, a second physical layer clock based on the at least one second signal or the first physical layer clock and the at least one second signal; and
adopting, the first physical layer clock or the second physical layer clock as a sending clock of a non-flexible Ethernet interface,
wherein a first network device comprises the first flexible Ethernet interface and the non-flexible Ethernet interface.