An Interesting Open Source PTP Grand Master for Proxmox

Introduction

I’ve been messing around with my new toy. It’s an R86S MiniPC. This arrived from China, and to be honest it’s incredible. It’s also extremely reasonably priced, and well built (steel). It runs from 12V DC which makes it an ideal candidate for temporary setups.

An Interesting Open Source PTP Grand Master for Proxmox — figure 1

It comes with Intel Copper connections, and Mellanox SFP+ modules.

The fantastic thing is that they both support PTP Hardware Timestamping.

Setup

I added a little m2 Solid state drive (I had a ½ TB one in a drawer), and installed Proxmox and OPNsense. Within a few minutes, it was functioning as a router. Proxmox being Debian based, supports ptp4l the fantastic PTP Linux library. For those somewhat concerned with command line configuration, (and only practice makes me less intimidated) I have put the installer for the ptp part on GitHub. Given that PTP is often misunderstood, a sensible user interface is needed, so I made that too. This work in progress at present allows different PTP profiles on different VLANs while maintaining hardware timestamps from the NIC.

Simply cloning the repository from my GitHub Page, sets up a directory in Proxmox, from there, make setup.sh executable chmod +x setup.sh and a short while later, ptp4l will be installed onto the Proxmox host, and an LXC will be built on the virtual environment. This allows a web page to be displayed (the install script asks you to set password, and gets an IP address from DHCP.)

An Interesting Open Source PTP Grand Master for Proxmox — figure 2

Disclaimer:

Whilst this “should” work on any Proxmox system build, a few notes:

  • This has only been tested on my R86S here, no other hardware has (yet) been tested
  • This “should” work on any proxmox build – if an interface in a profile does not have HW timestamp ability- the entire profile reverts to software timestamping
  • To address the above, create a different profile for NICs with no HW timestamping it may be necessary to use a different PTP Domain.

Naturally, this is an experiment. It has been tested on my R86S at home. As the repo states this is an MIT license. This means that it is for general interest use. The full text of the MIT license is on the repository, and it is recommended that it is read and understood properly.

The Repo is at https://github.com/kdwalsh1/Proxmox-PTP-R86S

← All articles