Sign inSign up

telosalliance/ptp4l

By telosalliance

•Updated over 6 years ago

Precision Time Protocol (PTP) daemon for Linux

Image
1

3.9K

telosalliance/ptp4l repository overview

⁠ptp4l: IEEE 1588 Precision Time Protocol (PTP) Daemon for Linux

⁠Prerequisites

You will need Docker and Docker Compose installed, and a Docker network capable of receiving multicast traffic.

⁠Create a Multicast Network

By default, the network interfaces Docker creates are not capable of receiving IP multicast from your local network. The sample docker-compose.yml file expects that you set up Docker network named multicast that supports IP multicast traffic. Use this command to set one up, replacing the Ethernet interface and addresses with your local ones:

docker network create -d macvlan \
  --subnet=172.16.0.0/16 \
  --gateway=172.16.0.1 \
  --ip-range=172.16.37.0/24 \
  -o parent=eth0 \
  multicast

For more details on this type of networking, see the official documentation at https://docs.docker.com/network/macvlan/⁠

⁠Environment Variables

  • IGMP_VERSION: Force a specific IGMP version. Can be 2 or 3.

⁠Running

⁠Using Docker

It's recommended to use Docker Compose, but if you just want to do a quick test...

docker run -it --rm --network=host --privileged telosalliance/ptp4l [args...]

[args...] in this context are ptp4l arguments. See here for details: https://linux.die.net/man/8/ptp4l⁠

⁠Using Docker Compose
⁠Create a Docker Compose File

Create an empty directory and save the following file as docker-compose.yml in it:

version: '3'
services:
  ptp:
    image: telosalliance/ptp4l:latest
    privileged: true
    networks:
      - multicast
#   volumes: [ <path-to-your-config>:/etc/ptp4l.conf ]
#   command: args...
networks:
  multicast:
    external:
      name: multicast
⁠Configuration (optional)

If you want to run ptp4l with a custom configuration, you can uncomment volumes to mount your own config file or command to specify command line arguments

⁠Start the Service

Type this command from the directory containing docker-compose.yml:

docker-compose up

Tag summary

Content type

Image

Digest

Size

25.6 MB

Last updated

over 6 years ago

docker pull telosalliance/ptp4l