IEEE 1588 PTP phase and time synchronization
Frequency and phase sync can both be done with PTP, usually the frequency is locked first then the phase is slipped (by slightly tweaking the frequency for a moment) to align the edges.

Often hardware in the PHY will deal with the frequency side of the problem, while you need to write some code to programmatically send commands to align the edges. 

Some of the TI app notes around the DP83640 for example go into the gory details.