Priority-based designated interface selection in a link aggregation group
In some examples, a first electronic device includes a plurality of interfaces to network links that are part of a link aggregation group. A first time clock selects, from the plurality of interfaces based on priorities associated with the plurality of interfaces, a designated interface to use for a time synchronization process, where the priorities include a first priority assigned to a first interface, a second priority assigned to a second interface, and a third priority assigned to a third interface. The first time clock sends, using the designated interface, a timing message of the time synchronization process to a second electronic device that includes a second time clock to which the first time clock of the first electronic device is to be synchronized according to the time synchronization process.
1 . A first electronic device comprising:
a plurality of interfaces to network links that are part of a link aggregation group; and
a first time clock to provide time information, the first time clock to:
select, from the plurality of interfaces based on priorities associated with the plurality of interfaces, a designated interface to use for a time synchronization process, wherein the priorities comprise a first priority assigned to a first interface, a second priority assigned to a second interface, and a third priority assigned to a third interface; and
send, using the designated interface, a timing message of the time synchronization process to a second electronic device that includes a second time clock to which the first time clock of the first electronic device is to be synchronized according to the time synchronization process, wherein the timing message comprises an announce message containing information to select which of the first time clock and the second time clock is a clock source and which other one of the first time clock and the second time clock is a clock sink.
2 . The first electronic device of claim 1 , wherein the priorities comprise static priorities.
3 . The first electronic device of claim 2 , wherein the first electronic device is to receive the static priorities through a remote command interface.
4 . The first electronic device of claim 1 , wherein the priorities are based on interface indexes assigned to the plurality of interfaces.
5 . The first electronic device of claim 1 , wherein the first time clock is to:
determine, based on the announce message, that the first time clock is the clock sink;
based on determining that the first time clock is the clock sink, detect that a synchronization message for the time synchronization process is received at a further interface of the plurality of interfaces, the further interface being different from the designated interface.
6 . The first electronic device of claim 5 , wherein the first time clock is to:
based on detecting that the synchronization message is received at the further interface, change a designated interface selection by selecting the further interface as a new designated interface.
7 . The first electronic device of claim 6 , wherein the first time clock is to:
send, using the new designated interface, a further timing message of the time synchronization process to the second electronic device.
8 . The first electronic device of claim 7 , wherein the further timing message is a delay message for calculating a delay in a network link between the first and second electronic devices.
9 . The first electronic device of claim 1 , wherein the plurality of interfaces comprise the designated interface and remaining interfaces that are non-designated interfaces, and wherein the first time clock is to:
receive a timing message of the time synchronization process at a non-designated interface of the non-designated interfaces.
10 . The first electronic device of claim 9 , wherein the non-designated interfaces are in a standby mode capable of receiving timing messages of the time synchronization process, but the non-designated interfaces are blocked from transmitting any timing message of the time synchronization process.
11 . The first electronic device of claim 9 , wherein the first time clock is to:
detect that the designated interface has become unavailable;
in response to detecting that the designated interface has become unavailable, select, based on the priorities assigned the non-designated interfaces, a further interface from among the non-designated interfaces as a new designated interface; and
send, using the new designated interface, a timing message of the time synchronization process to the second electronic device.
12 . The first electronic device of claim 1 , wherein the first electronic device comprises a network switch, and the first time clock is part of the network switch.
13 . The first electronic device of claim 1 , wherein the first time clock is a boundary time clock.
14 . A non-transitory machine-readable storage medium comprising instructions that upon execution cause a first time clock to:
select, from a plurality of interfaces based on priorities associated with the plurality of interfaces, an initial designated interface to use for a time synchronization process;
send, using the initial designated interface, a first timing message of the time synchronization process to a second time clock to which the first time clock is to be synchronized according to the time synchronization process;
based on receiving, from the second time clock, a second timing message at a non-designated interface of the first time clock wherein the non-designated interface is different from the initial designated interface, change a designated interface selection by selecting the non-designated interface as a new designated interface; and
determine, based on the first timing message, that the first time clock is a clock sink and the second time clock is a clock source on the initial designated interface,
wherein the changing of the designated interface selection is responsive to the determination that the first time clock is the clock sink.
15 . The non-transitory machine-readable storage medium of claim 14 , wherein the first timing message is an announce message, and the second timing message is a synchronization message.
16 . The non-transitory machine-readable storage medium of claim 14 , wherein the priorities associated with the plurality of interfaces are based on interface indexes of the plurality of interfaces.
17 . A method comprising:
selecting, by a first time clock from a plurality of logical aggregation group (LAG) interfaces of a first electronic device based on priorities associated with the plurality of LAG interfaces, an initial designated LAG interface to use for a time synchronization process between the first time clock and a second time clock in a second electronic device;
sending, using the initial designated LAG interface, a first announce message of the time synchronization process from the first time clock to the second time clock;
receiving, at the first time clock from the second time clock, a second announce message of the time synchronization process;
determining, based on the first and second announce messages, whether the first time clock is a clock sink on the initial designated LAG interface; and
based on a determination that the first time clock is the clock sink on the initial designated LAG interface:
determining, by the first time clock, whether a synchronization message from the second time clock is received at the initial designated LAG interface,
based on a determination that the synchronization message from the second time clock is received at a non-designated LAG interface different from the initial designated LAG interface, changing, by the first time clock, a designated LAG interface selection by selecting the non-designated LAG interface as a new designated LAG interface, and
performing, by the first time clock, a remainder of the time synchronization process using the new designated LAG interface.
18 . The method of claim 17 , wherein the time synchronization process is a Precision Time Protocol (PTP) process.