Files
infix/dev/ptp/index.html
T

3523 lines
78 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en" class="no-js"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="description" content="Infix Documentation">
<link rel="canonical" href="https://kernelkit.github.io/infix/dev/ptp/">
<link rel="prev" href="../ntp/">
<link rel="next" href="../boot/">
<link rel="icon" href="../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.7.7">
<title>PTP (IEEE 1588/802.1AS) - User's Guide</title>
<link rel="stylesheet" href="../assets/stylesheets/main.ec1eaa64.min.css">
<link rel="stylesheet" href="../assets/stylesheets/palette.ab4e12ef.min.css">
<link rel="stylesheet" href="../extra.css">
<script>__md_scope=new URL("..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
<link href="../assets/stylesheets/glightbox.min.css" rel="stylesheet"><script src="../assets/javascripts/glightbox.min.js"></script><style id="glightbox-style">
html.glightbox-open { overflow: initial; height: 100%; }
.gslide-title { margin-top: 0px; user-select: text; }
.gslide-desc { color: #666; user-select: text; }
.gslide-image img { background: black; }
.glightbox-clean .gslide-media { -webkit-box-shadow: none; box-shadow: none; }
.gscrollbar-fixer { padding-right: 15px; }
.gdesc-inner { font-size: 0.75rem; }
body[data-md-color-scheme="slate"] .gdesc-inner { background: var(--md-default-bg-color); }
body[data-md-color-scheme="slate"] .gslide-title { color: var(--md-default-fg-color); }
body[data-md-color-scheme="slate"] .gslide-desc { color: var(--md-default-fg-color); }
</style></head>
<body dir="ltr" data-md-color-scheme="default" data-md-color-primary="orange" data-md-color-accent="orange">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" for="__drawer"></label>
<div data-md-component="skip">
<a href="#ptp-precision-time-protocol" class="md-skip">
Skip to content
</a>
</div>
<div data-md-component="announce">
</div>
<div data-md-color-scheme="default" data-md-component="outdated" hidden="">
</div>
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="https://www.kernelkit.org/" title="User's Guide" class="md-header__button md-logo" aria-label="User's Guide" data-md-component="logo">
<img src="../logo-plain.png" alt="logo">
</a>
<label class="md-header__button md-icon" for="__drawer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"></path></svg>
</label>
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
User's Guide
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
PTP (IEEE 1588/802.1AS)
</span>
</div>
</div>
</div>
<form class="md-header__option" data-md-component="palette">
<input class="md-option" data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme="default" data-md-color-primary="orange" data-md-color-accent="orange" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_0">
<label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_1" hidden="">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m17.75 4.09-2.53 1.94.91 3.06-2.63-1.81-2.63 1.81.91-3.06-2.53-1.94L12.44 4l1.06-3 1.06 3zm3.5 6.91-1.64 1.25.59 1.98-1.7-1.17-1.7 1.17.59-1.98L15.75 11l2.06-.05L18.5 9l.69 1.95zm-2.28 4.95c.83-.08 1.72 1.1 1.19 1.85-.32.45-.66.87-1.08 1.27C15.17 23 8.84 23 4.94 19.07c-3.91-3.9-3.91-10.24 0-14.14.4-.4.82-.76 1.27-1.08.75-.53 1.93.36 1.85 1.19-.27 2.86.69 5.83 2.89 8.02a9.96 9.96 0 0 0 8.02 2.89m-1.64 2.02a12.08 12.08 0 0 1-7.8-3.47c-2.17-2.19-3.33-5-3.49-7.82-2.81 3.14-2.7 7.96.31 10.98 3.02 3.01 7.84 3.12 10.98.31"></path></svg>
</label>
<input class="md-option" data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme="slate" data-md-color-primary="black" data-md-color-accent="orange" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_1">
<label class="md-header__button md-icon" title="Switch to light mode" for="__palette_0" hidden="">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 7a5 5 0 0 1 5 5 5 5 0 0 1-5 5 5 5 0 0 1-5-5 5 5 0 0 1 5-5m0 2a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3m0-7 2.39 3.42C13.65 5.15 12.84 5 12 5s-1.65.15-2.39.42zM3.34 7l4.16-.35A7.2 7.2 0 0 0 5.94 8.5c-.44.74-.69 1.5-.83 2.29zm.02 10 1.76-3.77a7.131 7.131 0 0 0 2.38 4.14zM20.65 7l-1.77 3.79a7.02 7.02 0 0 0-2.38-4.15zm-.01 10-4.14.36c.59-.51 1.12-1.14 1.54-1.86.42-.73.69-1.5.83-2.29zM12 22l-2.41-3.44c.74.27 1.55.44 2.41.44.82 0 1.63-.17 2.37-.44z"></path></svg>
</label>
</form>
<script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
<label class="md-header__button md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"></path></svg>
</label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required="">
<label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"></path></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"></path></svg>
</label>
<nav class="md-search__options" aria-label="Search">
<a href="javascript:void(0)" class="md-search__icon md-icon" title="Share" aria-label="Share" data-clipboard="" data-clipboard-text="" data-md-component="search-share" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9a3 3 0 0 0-3 3 3 3 0 0 0 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.15c-.05.21-.08.43-.08.66 0 1.61 1.31 2.91 2.92 2.91s2.92-1.3 2.92-2.91A2.92 2.92 0 0 0 18 16.08"></path></svg>
</a>
<button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path></svg>
</button>
</nav>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix="">
<div class="md-search-result" data-md-component="search-result">
<div class="md-search-result__meta">
Initializing search
</div>
<ol class="md-search-result__list" role="presentation"></ol>
</div>
</div>
</div>
</div>
</div>
<div class="md-header__source">
<a href="https://github.com/kernelkit/infix/" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M439.6 236.1 244 40.5c-5.4-5.5-12.8-8.5-20.4-8.5s-15 3-20.4 8.4L162.5 81l51.5 51.5c27.1-9.1 52.7 16.8 43.4 43.7l49.7 49.7c34.2-11.8 61.2 31 35.5 56.7-26.5 26.5-70.2-2.9-56-37.3L240.3 199v121.9c25.3 12.5 22.3 41.8 9.1 55-6.4 6.4-15.2 10.1-24.3 10.1s-17.8-3.6-24.3-10.1c-17.6-17.6-11.1-46.9 11.2-56v-123c-20.8-8.5-24.6-30.7-18.6-45L142.6 101 8.5 235.1C3 240.6 0 247.9 0 255.5s3 15 8.5 20.4l195.6 195.7c5.4 5.4 12.7 8.4 20.4 8.4s15-3 20.4-8.4l194.7-194.7c5.4-5.4 8.4-12.8 8.4-20.4s-3-15-8.4-20.4"></path></svg>
</div>
<div class="md-source__repository">
kernelkit/infix
</div>
</a>
</div>
</nav>
</header>
<div class="md-container" data-md-component="container">
<main class="md-main" data-md-component="main">
<div class="md-main__inner md-grid">
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a href="https://www.kernelkit.org/" title="User's Guide" class="md-nav__button md-logo" aria-label="User's Guide" data-md-component="logo">
<img src="../logo-plain.png" alt="logo">
</a>
User's Guide
</label>
<div class="md-nav__source">
<a href="https://github.com/kernelkit/infix/" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M439.6 236.1 244 40.5c-5.4-5.5-12.8-8.5-20.4-8.5s-15 3-20.4 8.4L162.5 81l51.5 51.5c27.1-9.1 52.7 16.8 43.4 43.7l49.7 49.7c34.2-11.8 61.2 31 35.5 56.7-26.5 26.5-70.2-2.9-56-37.3L240.3 199v121.9c25.3 12.5 22.3 41.8 9.1 55-6.4 6.4-15.2 10.1-24.3 10.1s-17.8-3.6-24.3-10.1c-17.6-17.6-11.1-46.9 11.2-56v-123c-20.8-8.5-24.6-30.7-18.6-45L142.6 101 8.5 235.1C3 240.6 0 247.9 0 255.5s3 15 8.5 20.4l195.6 195.7c5.4 5.4 12.7 8.4 20.4 8.4s15-3 20.4-8.4l194.7-194.7c5.4-5.4 8.4-12.8 8.4-20.4s-3-15-8.4-20.4"></path></svg>
</div>
<div class="md-source__repository">
kernelkit/infix
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix="">
<li class="md-nav__item">
<a href=".." class="md-nav__link">
<span class="md-ellipsis">
Introduction
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2">
<label class="md-nav__link" for="__nav_2" id="__nav_2_label" tabindex="0">
<span class="md-ellipsis">
CLI
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_2">
<span class="md-nav__icon md-icon"></span>
CLI
</label>
<ul class="md-nav__list" data-md-scrollfix="">
<li class="md-nav__item">
<a href="../cli/introduction/" class="md-nav__link">
<span class="md-ellipsis">
Introduction
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../cli/configure/" class="md-nav__link">
<span class="md-ellipsis">
Configuration
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../cli/keybindings/" class="md-nav__link">
<span class="md-ellipsis">
Keybindings
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../cli/netcalc/" class="md-nav__link">
<span class="md-ellipsis">
Network Calculator
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../cli/tcpdump/" class="md-nav__link">
<span class="md-ellipsis">
Network Monitoring
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../cli/quick/" class="md-nav__link">
<span class="md-ellipsis">
Quickstart Guide
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../cli/text-editor/" class="md-nav__link">
<span class="md-ellipsis">
Text Editor
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../cli/upgrade/" class="md-nav__link">
<span class="md-ellipsis">
Upgrading
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../container/" class="md-nav__link">
<span class="md-ellipsis">
Docker Containers
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4">
<label class="md-nav__link" for="__nav_4" id="__nav_4_label" tabindex="0">
<span class="md-ellipsis">
Networking
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4">
<span class="md-nav__icon md-icon"></span>
Networking
</label>
<ul class="md-nav__list" data-md-scrollfix="">
<li class="md-nav__item">
<a href="../networking/" class="md-nav__link">
<span class="md-ellipsis">
Overview
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../iface/" class="md-nav__link">
<span class="md-ellipsis">
Common Settings
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../bridging/" class="md-nav__link">
<span class="md-ellipsis">
Bridging
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../lag/" class="md-nav__link">
<span class="md-ellipsis">
Link Aggregation
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../ethernet/" class="md-nav__link">
<span class="md-ellipsis">
Ethernet Interfaces
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../vlan/" class="md-nav__link">
<span class="md-ellipsis">
VLAN Interfaces
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../ip/" class="md-nav__link">
<span class="md-ellipsis">
IP Addressing
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../routing/" class="md-nav__link">
<span class="md-ellipsis">
Routing
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../firewall/" class="md-nav__link">
<span class="md-ellipsis">
Firewall Configuration
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../qos/" class="md-nav__link">
<span class="md-ellipsis">
Quality of Service
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../eth-counters/" class="md-nav__link">
<span class="md-ellipsis">
RMON Counters
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../tunnels/" class="md-nav__link">
<span class="md-ellipsis">
Tunneling (L2/L3)
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_13">
<label class="md-nav__link" for="__nav_4_13" id="__nav_4_13_label" tabindex="0">
<span class="md-ellipsis">
VPN Tunnels
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_4_13_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_13">
<span class="md-nav__icon md-icon"></span>
VPN Tunnels
</label>
<ul class="md-nav__list" data-md-scrollfix="">
<li class="md-nav__item">
<a href="../vpn/" class="md-nav__link">
<span class="md-ellipsis">
Overview
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../vpn-wireguard/" class="md-nav__link">
<span class="md-ellipsis">
WireGuard
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../wifi/" class="md-nav__link">
<span class="md-ellipsis">
Wireless LAN (WiFi)
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5" checked="">
<label class="md-nav__link" for="__nav_5" id="__nav_5_label" tabindex="0">
<span class="md-ellipsis">
Services
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_5">
<span class="md-nav__icon md-icon"></span>
Services
</label>
<ul class="md-nav__list" data-md-scrollfix="">
<li class="md-nav__item">
<a href="../discovery/" class="md-nav__link">
<span class="md-ellipsis">
Device Discovery
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../dhcp/" class="md-nav__link">
<span class="md-ellipsis">
DHCP Server
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../ntp/" class="md-nav__link">
<span class="md-ellipsis">
NTP Server
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--active">
<input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
<label class="md-nav__link md-nav__link--active" for="__toc">
<span class="md-ellipsis">
PTP (IEEE 1588/802.1AS)
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<a href="./" class="md-nav__link md-nav__link--active">
<span class="md-ellipsis">
PTP (IEEE 1588/802.1AS)
</span>
</a>
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix="">
<li class="md-nav__item">
<a href="#clock-roles" class="md-nav__link">
<span class="md-ellipsis">
Clock roles
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#ptp-profiles" class="md-nav__link">
<span class="md-ellipsis">
PTP profiles
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#delay-mechanisms" class="md-nav__link">
<span class="md-ellipsis">
Delay mechanisms
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#data-sets" class="md-nav__link">
<span class="md-ellipsis">
Data Sets
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#domains" class="md-nav__link">
<span class="md-ellipsis">
Domains
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#ordinary-clock-time-receiver" class="md-nav__link">
<span class="md-ellipsis">
Ordinary Clock (time-receiver)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#ordinary-clock-time-transmitter-grandmaster" class="md-nav__link">
<span class="md-ellipsis">
Ordinary Clock (time-transmitter / grandmaster)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#boundary-clock" class="md-nav__link">
<span class="md-ellipsis">
Boundary Clock
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#transparent-clock" class="md-nav__link">
<span class="md-ellipsis">
Transparent Clock
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#gptp-ieee-8021as" class="md-nav__link">
<span class="md-ellipsis">
gPTP / IEEE 802.1AS
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#multiple-instances" class="md-nav__link">
<span class="md-ellipsis">
Multiple Instances
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#port-states" class="md-nav__link">
<span class="md-ellipsis">
Port states
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#monitoring" class="md-nav__link">
<span class="md-ellipsis">
Monitoring
</span>
</a>
<nav class="md-nav" aria-label="Monitoring">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#show-all-ptp-instances" class="md-nav__link">
<span class="md-ellipsis">
Show all PTP instances
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#show-a-specific-instance" class="md-nav__link">
<span class="md-ellipsis">
Show a specific instance
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#tuning-port-intervals" class="md-nav__link">
<span class="md-ellipsis">
Tuning port intervals
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#message-exchange" class="md-nav__link">
<span class="md-ellipsis">
Message exchange
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#message-format" class="md-nav__link">
<span class="md-ellipsis">
Message format
</span>
</a>
<nav class="md-nav" aria-label="Message format">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#decoding-with-wireshark" class="md-nav__link">
<span class="md-ellipsis">
Decoding with Wireshark
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#glossary" class="md-nav__link">
<span class="md-ellipsis">
Glossary
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6">
<label class="md-nav__link" for="__nav_6" id="__nav_6_label" tabindex="0">
<span class="md-ellipsis">
System
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_6_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_6">
<span class="md-nav__icon md-icon"></span>
System
</label>
<ul class="md-nav__list" data-md-scrollfix="">
<li class="md-nav__item">
<a href="../boot/" class="md-nav__link">
<span class="md-ellipsis">
Boot Procedure
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../system/" class="md-nav__link">
<span class="md-ellipsis">
Configuration
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../nacm/" class="md-nav__link">
<span class="md-ellipsis">
Access Control (NACM)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../hardware/" class="md-nav__link">
<span class="md-ellipsis">
Hardware Info &amp; Status
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../management/" class="md-nav__link">
<span class="md-ellipsis">
Management
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../keystore/" class="md-nav__link">
<span class="md-ellipsis">
Keystore
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../syslog/" class="md-nav__link">
<span class="md-ellipsis">
Syslog Support
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../support/" class="md-nav__link">
<span class="md-ellipsis">
Support Data
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../upgrade/" class="md-nav__link">
<span class="md-ellipsis">
Upgrade
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_7">
<label class="md-nav__link" for="__nav_7" id="__nav_7_label" tabindex="0">
<span class="md-ellipsis">
Scripting
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_7_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_7">
<span class="md-nav__icon md-icon"></span>
Scripting
</label>
<ul class="md-nav__list" data-md-scrollfix="">
<li class="md-nav__item">
<a href="../scripting/" class="md-nav__link">
<span class="md-ellipsis">
Introduction
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../scripting-sysrepocfg/" class="md-nav__link">
<span class="md-ellipsis">
Legacy Scripting
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../scripting-netconf/" class="md-nav__link">
<span class="md-ellipsis">
NETCONF Scripting
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../scripting-restconf/" class="md-nav__link">
<span class="md-ellipsis">
RESTCONF Scripting
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../scripting-prod/" class="md-nav__link">
<span class="md-ellipsis">
Production Testing
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8">
<label class="md-nav__link" for="__nav_8" id="__nav_8_label" tabindex="0">
<span class="md-ellipsis">
Developer's Corner
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_8_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_8">
<span class="md-nav__icon md-icon"></span>
Developer's Corner
</label>
<ul class="md-nav__list" data-md-scrollfix="">
<li class="md-nav__item">
<a href="../branding/" class="md-nav__link">
<span class="md-ellipsis">
Branding &amp; Releases
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../developers-guide/" class="md-nav__link">
<span class="md-ellipsis">
Developer's Guide
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../override-package/" class="md-nav__link">
<span class="md-ellipsis">
Developing with Buildroot
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../netboot/" class="md-nav__link">
<span class="md-ellipsis">
Netboot HowTo
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../testing/" class="md-nav__link">
<span class="md-ellipsis">
Regression Testing
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../test-arch/" class="md-nav__link">
<span class="md-ellipsis">
Test System Architecture
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../virtual/" class="md-nav__link">
<span class="md-ellipsis">
Virtual Environments
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../vpd/" class="md-nav__link">
<span class="md-ellipsis">
Vital Product Data (VPD)
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../license/" class="md-nav__link">
<span class="md-ellipsis">
Origin &amp; Licensing
</span>
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix="">
<li class="md-nav__item">
<a href="#clock-roles" class="md-nav__link">
<span class="md-ellipsis">
Clock roles
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#ptp-profiles" class="md-nav__link">
<span class="md-ellipsis">
PTP profiles
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#delay-mechanisms" class="md-nav__link">
<span class="md-ellipsis">
Delay mechanisms
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#data-sets" class="md-nav__link">
<span class="md-ellipsis">
Data Sets
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#domains" class="md-nav__link">
<span class="md-ellipsis">
Domains
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#ordinary-clock-time-receiver" class="md-nav__link">
<span class="md-ellipsis">
Ordinary Clock (time-receiver)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#ordinary-clock-time-transmitter-grandmaster" class="md-nav__link">
<span class="md-ellipsis">
Ordinary Clock (time-transmitter / grandmaster)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#boundary-clock" class="md-nav__link">
<span class="md-ellipsis">
Boundary Clock
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#transparent-clock" class="md-nav__link">
<span class="md-ellipsis">
Transparent Clock
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#gptp-ieee-8021as" class="md-nav__link">
<span class="md-ellipsis">
gPTP / IEEE 802.1AS
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#multiple-instances" class="md-nav__link">
<span class="md-ellipsis">
Multiple Instances
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#port-states" class="md-nav__link">
<span class="md-ellipsis">
Port states
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#monitoring" class="md-nav__link">
<span class="md-ellipsis">
Monitoring
</span>
</a>
<nav class="md-nav" aria-label="Monitoring">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#show-all-ptp-instances" class="md-nav__link">
<span class="md-ellipsis">
Show all PTP instances
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#show-a-specific-instance" class="md-nav__link">
<span class="md-ellipsis">
Show a specific instance
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#tuning-port-intervals" class="md-nav__link">
<span class="md-ellipsis">
Tuning port intervals
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#message-exchange" class="md-nav__link">
<span class="md-ellipsis">
Message exchange
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#message-format" class="md-nav__link">
<span class="md-ellipsis">
Message format
</span>
</a>
<nav class="md-nav" aria-label="Message format">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#decoding-with-wireshark" class="md-nav__link">
<span class="md-ellipsis">
Decoding with Wireshark
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#glossary" class="md-nav__link">
<span class="md-ellipsis">
Glossary
</span>
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content" data-md-component="content">
<nav class="md-path" aria-label="Navigation">
<ol class="md-path__list">
<li class="md-path__item">
<a href=".." class="md-path__link">
<span class="md-ellipsis">
Introduction
</span>
</a>
</li>
<li class="md-path__item">
<a href="../discovery/" class="md-path__link">
<span class="md-ellipsis">
Services
</span>
</a>
</li>
</ol>
</nav>
<article class="md-content__inner md-typeset">
<h1 id="ptp-precision-time-protocol">PTP — Precision Time Protocol<a class="headerlink" href="#ptp-precision-time-protocol" title="Permanent link"></a></h1>
<p>The Precision Time Protocol (PTP), defined in IEEE 1588-2019, synchronises
clocks across a network to sub-microsecond accuracy. Where NTP (Network Time
Protocol) aims at millisecond accuracy over wide-area networks, PTP is
designed for local-area networks and relies on hardware timestamping in the
network interface to eliminate software-induced jitter.</p>
<p>PTP works by exchanging timestamped messages between devices. A <em>grandmaster
clock</em> — elected by the <strong>Best TimeTransmitter Clock Algorithm (BTCA)</strong> based
on priority, clock class, and accuracy — distributes time to the rest of the
network. Each synchronising device measures the one-way message delay to its
time-transmitter and continuously adjusts its local clock to compensate.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The IEEE 1588g-2022 amendment to IEEE 1588-2019 introduced the terms
<em>timeTransmitter</em> and <em>timeReceiver</em> as replacements for the former
<em>master</em> and <em>slave</em> terminology, and <em>Best TimeTransmitter Clock
Algorithm (BTCA)</em> in place of <em>BMCA</em>. This document uses the updated
terms throughout. You may even see the short forms transmitter and
receiver here and in online documentation.</p>
</div>
<h2 id="clock-roles">Clock roles<a class="headerlink" href="#clock-roles" title="Permanent link"></a></h2>
<p>Every device in a PTP network takes one of the following roles:</p>
<table>
<thead>
<tr>
<th>Role</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Grandmaster (GM)</strong></td>
<td>Network-wide time source; elected by BTCA</td>
</tr>
<tr>
<td><strong>Time-transmitter</strong></td>
<td>Sends Sync messages downstream on a port</td>
</tr>
<tr>
<td><strong>Time-receiver</strong></td>
<td>Synchronises to a time-transmitter on a port</td>
</tr>
<tr>
<td><strong>Boundary Clock (BC)</strong></td>
<td>Terminates PTP on each port; acts as time-receiver upstream and time-transmitter downstream</td>
</tr>
<tr>
<td><strong>Transparent Clock (TC)</strong></td>
<td>Passes PTP messages while correcting the residence-time delay accumulated in the device</td>
</tr>
</tbody>
</table>
<p>An <strong>Ordinary Clock (OC)</strong> has a single PTP port and is either a
time-transmitter (acting as a grandmaster candidate) or a time-receiver
(a leaf node synchronising to the network).</p>
<h2 id="ptp-profiles">PTP profiles<a class="headerlink" href="#ptp-profiles" title="Permanent link"></a></h2>
<p>A <strong>PTP profile</strong> (as defined in IEEE 1588-2019 §3.1) is a document that
specifies a consistent set of required, permitted, and prohibited PTP
options for a particular application domain — much like a dialect of the
protocol. Examples from the standards world include profiles for power
utilities (IEC/IEEE C37.238), telecom (ITU-T G.8265.1), and
Time-Sensitive Networks.</p>
<p>Each profile sets a unique value in the <code>majorSdoId</code> field of PTP message
headers — a 4-bit identifier that lets devices distinguish traffic belonging
to different profiles on the same link. Profile also determines the network
transport (UDP or Ethernet) and the delay measurement mechanism.</p>
<p>Currently, two profiles are supported via the <code>profile</code> leaf in <code>default-ds</code>:</p>
<table>
<thead>
<tr>
<th><code>profile</code></th>
<th>Standard</th>
<th style="text-align: center;">majorSdoId</th>
<th>Transport</th>
<th>Delay</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>ieee1588</code> (default)</td>
<td>IEEE 1588-2019</td>
<td style="text-align: center;"><code>0x0</code></td>
<td>UDP/IPv4</td>
<td><code>e2e</code> or <code>p2p</code></td>
</tr>
<tr>
<td><code>ieee802-dot1as</code></td>
<td>IEEE 802.1AS-2020</td>
<td style="text-align: center;"><code>0x1</code></td>
<td>L2</td>
<td><code>p2p</code></td>
</tr>
</tbody>
</table>
<p>The <strong>gPTP</strong> (generalized Precision Time Protocol) profile from IEEE 802.1AS-2020
is used in <strong>TSN</strong> (Time-Sensitive Networking) and <strong>AVB</strong> (Audio/Video Bridging)
applications. Setting <code>profile ieee802-dot1as</code> applies all protocol-mandatory
settings automatically — Layer 2 transport, P2P delay measurement, 802.1AS
multicast addressing, path trace, follow-up information, and neighbour propagation
delay thresholds. The user still configures <code>priority1</code>, <code>priority2</code>,
<code>domain-number</code>, <code>time-receiver-only</code>, and timer interval leaves.</p>
<p>The <code>ieee1588</code> profile leaves transport and delay mechanism user-configurable
per port.</p>
<h2 id="delay-mechanisms">Delay mechanisms<a class="headerlink" href="#delay-mechanisms" title="Permanent link"></a></h2>
<p>PTP measures the link delay between neighbours using one of two mechanisms:</p>
<ul>
<li><strong>End-to-End (E2E)</strong>: Each time-receiver measures the delay to the
grandmaster by sending a <code>DELAY_REQ</code> message upstream. Simple to
configure; works with any network topology.</li>
<li><strong>Peer-to-Peer (P2P)</strong>: Each port measures its delay to its <em>immediate
neighbour</em> independently using <code>PDELAY_REQ</code> messages. Enables faster
path-delay updates and is required by the gPTP profile.</li>
</ul>
<h2 id="data-sets">Data Sets<a class="headerlink" href="#data-sets" title="Permanent link"></a></h2>
<p>IEEE 1588 organises protocol state into named <strong>Data Sets (DS)</strong> — each a
collection of related attributes for one aspect of a PTP instance. You
will encounter these directly in the CLI and in the <code>show ptp</code> output:</p>
<table>
<thead>
<tr>
<th>Data Set</th>
<th>CLI node</th>
<th>Contents</th>
</tr>
</thead>
<tbody>
<tr>
<td>Default DS</td>
<td><code>default-ds</code></td>
<td>Instance identity, clock class, priority, domain number</td>
</tr>
<tr>
<td>Current DS</td>
<td><code>current-ds</code></td>
<td>Live offset-from-GM, mean path delay, steps-removed</td>
</tr>
<tr>
<td>Parent DS</td>
<td><code>parent-ds</code></td>
<td>Grandmaster identity and quality attributes</td>
</tr>
<tr>
<td>Time Properties DS</td>
<td><code>time-properties-ds</code></td>
<td>UTC offset, leap-second flags, time source</td>
</tr>
<tr>
<td>Port DS</td>
<td><code>port-ds</code></td>
<td>Per-port state, delay mechanism, message intervals</td>
</tr>
</tbody>
</table>
<h2 id="domains">Domains<a class="headerlink" href="#domains" title="Permanent link"></a></h2>
<p>A <strong>PTP domain</strong> (0255) is a logical partition of the network. Devices
only synchronise with others in the same domain. Running multiple
instances on the same device — one per domain, or one per profile — is
fully supported; each instance is independent.</p>
<p>Each PTP instance is identified on the network by its
<code>(domain-number, profile)</code> pair, which must be unique across all instances
on a device.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The <code>show ptp</code> offset values reflect <strong>PHC</strong> (PTP Hardware Clock)
synchronisation only. A PHC is the hardware clock exposed by the network
interface; it tracks the PTP grandmaster but is independent of the Linux
system clock, which currently is <strong>not</strong> automatically adjusted.</p>
</div>
<h2 id="ordinary-clock-time-receiver">Ordinary Clock (time-receiver)<a class="headerlink" href="#ordinary-clock-time-receiver" title="Permanent link"></a></h2>
<p>A typical time-receiver Ordinary Clock, synchronising on interface
<code>eth0</code> using the default IEEE 1588 profile:</p>
<pre class="cli"><code>admin@example:/&gt; <b>configure</b>
admin@example:/config/&gt; <b>edit ptp instance 0</b>
admin@example:/config/ptp/instance/0/&gt; <b>set default-ds domain-number 0</b>
admin@example:/config/ptp/instance/0/&gt; <b>set default-ds time-receiver-only true</b>
admin@example:/config/ptp/instance/0/&gt; <b>edit port 1</b>
admin@example:/config/ptp/…/0/port/1/&gt; <b>set underlying-interface eth0</b>
admin@example:/config/ptp/…/0/port/1/&gt; <b>leave</b>
</code></pre>
<h2 id="ordinary-clock-time-transmitter-grandmaster">Ordinary Clock (time-transmitter / grandmaster)<a class="headerlink" href="#ordinary-clock-time-transmitter-grandmaster" title="Permanent link"></a></h2>
<p>A grandmaster clock with high priority, domain 0:</p>
<pre class="cli"><code>admin@example:/config/&gt; <b>edit ptp instance 0</b>
admin@example:/config/ptp/instance/0/&gt; <b>set default-ds domain-number 0</b>
admin@example:/config/ptp/instance/0/&gt; <b>set default-ds priority1 1</b>
admin@example:/config/ptp/instance/0/&gt; <b>set default-ds priority2 1</b>
admin@example:/config/ptp/instance/0/&gt; <b>edit port 1</b>
admin@example:/config/ptp/…/0/port/1/&gt; <b>set underlying-interface eth0</b>
admin@example:/config/ptp/…/0/port/1/&gt; <b>leave</b>
</code></pre>
<p>Lower <code>priority1</code> values win in the BTCA. A clock with <code>priority1 1</code> will
be preferred over the default <code>128</code> in any compliant network.</p>
<h2 id="boundary-clock">Boundary Clock<a class="headerlink" href="#boundary-clock" title="Permanent link"></a></h2>
<p>A Boundary Clock terminates PTP on each port and re-originates it. Add one
port per interface:</p>
<pre class="cli"><code>admin@example:/config/&gt; <b>edit ptp instance 0</b>
admin@example:/config/ptp/instance/0/&gt; <b>set default-ds instance-type bc</b>
admin@example:/config/ptp/instance/0/&gt; <b>set default-ds domain-number 0</b>
admin@example:/config/ptp/instance/0/&gt; <b>edit port 1</b>
admin@example:/config/ptp/…/0/port/1/&gt; <b>set underlying-interface eth0</b>
admin@example:/config/ptp/…/0/port/1/&gt; <b>end</b>
admin@example:/config/ptp/instance/0/&gt; <b>edit port 2</b>
admin@example:/config/ptp/…/0/port/2/&gt; <b>set underlying-interface eth1</b>
admin@example:/config/ptp/…/0/port/2/&gt; <b>leave</b>
</code></pre>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>PTP port numbers are assigned sorted by <code>port-index</code>, so <code>port-index 1</code>
becomes PTP port 1, <code>port-index 2</code> becomes PTP port 2, and so on.</p>
</div>
<h2 id="transparent-clock">Transparent Clock<a class="headerlink" href="#transparent-clock" title="Permanent link"></a></h2>
<p>Transparent Clocks correct timestamps end-to-end without terminating PTP.
Use <code>instance-type p2p-tc</code> for a P2P TC (preferred in TSN networks) or
<code>instance-type e2e-tc</code> for an E2E TC:</p>
<pre class="cli"><code>admin@example:/config/&gt; <b>edit ptp instance 0</b>
admin@example:/config/ptp/instance/0/&gt; <b>set default-ds instance-type p2p-tc</b>
admin@example:/config/ptp/instance/0/&gt; <b>set default-ds domain-number 0</b>
admin@example:/config/ptp/instance/0/&gt; <b>edit port 1</b>
admin@example:/config/ptp/…/0/port/1/&gt; <b>set underlying-interface eth0</b>
admin@example:/config/ptp/…/0/port/1/&gt; <b>end</b>
admin@example:/config/ptp/instance/0/&gt; <b>edit port 2</b>
admin@example:/config/ptp/…/0/port/2/&gt; <b>set underlying-interface eth1</b>
admin@example:/config/ptp/…/0/port/2/&gt; <b>leave</b>
</code></pre>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>For Transparent Clocks the delay mechanism is determined globally by the
<code>instance-type</code> (<code>p2p-tc</code> → P2P, <code>e2e-tc</code> → E2E). Per-port
<code>delay-mechanism</code> settings have no effect for TC instances.</p>
</div>
<h2 id="gptp-ieee-8021as">gPTP / IEEE 802.1AS<a class="headerlink" href="#gptp-ieee-8021as" title="Permanent link"></a></h2>
<p>The gPTP profile is used in TSN and AVB applications. Setting
<code>profile ieee802-dot1as</code> applies all protocol-mandatory options from
IEEE 802.1AS-2020 automatically — Layer 2 transport, P2P delay
measurement, 802.1AS multicast addressing, and related protocol features.</p>
<pre class="cli"><code>admin@example:/config/&gt; <b>edit ptp instance 0</b>
admin@example:/config/ptp/instance/0/&gt; <b>set default-ds profile ieee802-dot1as</b>
admin@example:/config/ptp/instance/0/&gt; <b>set default-ds domain-number 0</b>
admin@example:/config/ptp/instance/0/&gt; <b>set default-ds time-receiver-only true</b>
admin@example:/config/ptp/instance/0/&gt; <b>edit port 1</b>
admin@example:/config/ptp/…/0/port/1/&gt; <b>set underlying-interface eth0</b>
admin@example:/config/ptp/…/0/port/1/&gt; <b>leave</b>
</code></pre>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The <code>ieee802-dot1as</code> profile enforces Layer 2 transport and P2P delay
measurement globally, as required by IEEE 802.1AS-2020. Per-port
<code>delay-mechanism</code> settings have no effect for 802.1AS instances.</p>
</div>
<h2 id="multiple-instances">Multiple Instances<a class="headerlink" href="#multiple-instances" title="Permanent link"></a></h2>
<p>Multiple PTP instances can run simultaneously, one per domain or profile
combination. Each instance must have a unique <code>(domain-number, profile)</code>
pair and an independent set of ports:</p>
<pre class="cli"><code>admin@example:/config/&gt; <b>edit ptp instance 0</b>
admin@example:/config/ptp/instance/0/&gt; <b>set default-ds domain-number 0</b>
admin@example:/config/ptp/instance/0/&gt; <b>set default-ds profile ieee1588</b>
admin@example:/config/ptp/instance/0/&gt; <b>edit port 1</b>
admin@example:/config/ptp/…/0/port/1/&gt; <b>set underlying-interface eth0</b>
admin@example:/config/ptp/…/0/port/1/&gt; <b>end</b>
admin@example:/config/ptp/instance/0/&gt; <b>end</b>
admin@example:/config/ptp/&gt; <b>edit instance 1</b>
admin@example:/config/ptp/instance/1/&gt; <b>set default-ds domain-number 0</b>
admin@example:/config/ptp/instance/1/&gt; <b>set default-ds profile ieee802-dot1as</b>
admin@example:/config/ptp/instance/1/&gt; <b>edit port 1</b>
admin@example:/config/ptp/…/1/port/1/&gt; <b>set underlying-interface eth1</b>
admin@example:/config/ptp/…/1/port/1/&gt; <b>leave</b>
</code></pre>
<h2 id="port-states">Port states<a class="headerlink" href="#port-states" title="Permanent link"></a></h2>
<p>Each PTP port progresses through a state machine. The current state is
shown in the <code>show ptp</code> port table:</p>
<table>
<thead>
<tr>
<th>State</th>
<th>Meaning</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>initializing</code></td>
<td>Port is starting up, not yet ready to exchange messages</td>
</tr>
<tr>
<td><code>faulty</code></td>
<td>A fault condition has been detected on this port</td>
</tr>
<tr>
<td><code>disabled</code></td>
<td>Port is administratively disabled</td>
</tr>
<tr>
<td><code>listening</code></td>
<td>Awaiting <code>ANNOUNCE</code> messages; BTCA has not yet resolved</td>
</tr>
<tr>
<td><code>pre-time-transmitter</code></td>
<td>Transitioning towards time-transmitter state</td>
</tr>
<tr>
<td><code>time-transmitter</code></td>
<td>Port is acting as time-transmitter on this link</td>
</tr>
<tr>
<td><code>passive</code></td>
<td>Another port on this device is already time-transmitter</td>
</tr>
<tr>
<td><code>uncalibrated</code></td>
<td>Receiving sync; local clock not yet locked to time-transmitter</td>
</tr>
<tr>
<td><code>time-receiver</code></td>
<td>Port is locked and tracking its time-transmitter</td>
</tr>
</tbody>
</table>
<p>A port in <code>uncalibrated</code> will typically transition to <code>time-receiver</code>
within a few seconds once the clock servo has converged.</p>
<h2 id="monitoring">Monitoring<a class="headerlink" href="#monitoring" title="Permanent link"></a></h2>
<div class="admonition tip">
<p class="admonition-title">Use the <span class="keys"><kbd class="key-question">?</kbd></span> key in the CLI</p>
<p>The <code>show ptp</code> command has sub-commands — tap <span class="keys"><kbd class="key-question">?</kbd></span> after
<code>show ptp</code> to see them, or use <span class="keys"><kbd class="key-tab">Tab</kbd></span> to complete.</p>
</div>
<h3 id="show-all-ptp-instances">Show all PTP instances<a class="headerlink" href="#show-all-ptp-instances" title="Permanent link"></a></h3>
<pre class="cli"><code>admin@example:/&gt; <b>show ptp</b>
<b>PTP Instance 0</b> Ordinary Clock · domain 0
────────────────────────────────────────────────────────────────────
Clock identity : AA-BB-CC-FF-FE-00-11-22
Grandmaster : DD-EE-FF-FF-FE-33-44-55
Priority1/Priority2 : 128 / 128
GM Priority1/Priority2 : 1 / 1
Clock class : cc-time-receiver-only
GM clock class : cc-primary-sync
Time source : gnss
PTP timescale : yes
UTC offset : 37 s
Time traceable : yes
Freq. traceable : yes
Offset from GM : -42 ns
Mean path delay : 1250 ns
Steps removed : 1
────────────────────────────────────────────────────────────────────
Ports
<span class="header">PORT INTERFACE STATE DELAY LINK DELAY (ns)</span>
1 eth0 <span class="ok">time-receiver</span> E2E 0
────────────────────────────────────────────────────────────────────
Message Statistics (▼ rx ▲ tx)
<span class="header">PORT INTERFACE SYNC ▼ SYNC ▲ ANN ▼ ANN ▲ PD ▼ PD ▲</span>
1 eth0 42 0 15 0 0 0
</code></pre>
<p>Port state is colour-coded: green for <code>time-transmitter</code> and <code>time-receiver</code>
(actively synchronising), yellow for transient states (<code>listening</code>,
<code>uncalibrated</code>, <code>pre-time-transmitter</code>), and red for fault states (<code>faulty</code>,
<code>disabled</code>). The <em>Message Statistics</em> section is omitted when no counts are
available.</p>
<h3 id="show-a-specific-instance">Show a specific instance<a class="headerlink" href="#show-a-specific-instance" title="Permanent link"></a></h3>
<pre class="cli"><code>admin@example:/&gt; <b>show ptp 0</b>
</code></pre>
<h2 id="tuning-port-intervals">Tuning port intervals<a class="headerlink" href="#tuning-port-intervals" title="Permanent link"></a></h2>
<p>Adjust announcement, sync, and delay-request intervals per port. Values
are expressed as log₂ of the interval in seconds (e.g. <code>-3</code> = 125 ms,
<code>0</code> = 1 s, <code>1</code> = 2 s):</p>
<pre class="cli"><code>admin@example:/config/ptp/…/0/port/1/&gt; <b>set port-ds log-announce-interval 0</b>
admin@example:/config/ptp/…/0/port/1/&gt; <b>set port-ds log-sync-interval -3</b>
admin@example:/config/ptp/…/0/port/1/&gt; <b>set port-ds log-min-delay-req-interval 0</b>
admin@example:/config/ptp/…/0/port/1/&gt; <b>set announce-receipt-timeout 3</b>
</code></pre>
<p><code>announce-receipt-timeout</code> is a count of announce intervals, not a duration
in seconds. With <code>log-announce-interval 0</code> (1 s) and
<code>announce-receipt-timeout 3</code>, a port waits 3 s without receiving an
<code>ANNOUNCE</code> before declaring the time-transmitter lost and returning to
<code>listening</code>.</p>
<h2 id="message-exchange">Message exchange<a class="headerlink" href="#message-exchange" title="Permanent link"></a></h2>
<p>PTP distributes time using a small set of messages, all of which carry
hardware timestamps at the network interface:</p>
<table>
<thead>
<tr>
<th>Message</th>
<th style="text-align: center;">Timestamped</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>ANNOUNCE</code></td>
<td style="text-align: center;">No</td>
<td>Advertises clock quality for BTCA election</td>
</tr>
<tr>
<td><code>SYNC</code></td>
<td style="text-align: center;">Yes</td>
<td>Carries transmitter timestamp to receivers</td>
</tr>
<tr>
<td><code>FOLLOW_UP</code></td>
<td style="text-align: center;">No</td>
<td>Carries precise <code>t1</code> in two-step mode</td>
</tr>
<tr>
<td><code>DELAY_REQ</code></td>
<td style="text-align: center;">Yes</td>
<td>Receiver-initiated E2E delay measurement</td>
</tr>
<tr>
<td><code>DELAY_RESP</code></td>
<td style="text-align: center;">No</td>
<td>Time-transmitter reply to <code>DELAY_REQ</code></td>
</tr>
<tr>
<td><code>PDELAY_REQ</code></td>
<td style="text-align: center;">Yes</td>
<td>Initiates P2P neighbour-delay measurement</td>
</tr>
<tr>
<td><code>PDELAY_RESP</code></td>
<td style="text-align: center;">Yes</td>
<td>Neighbour reply to <code>PDELAY_REQ</code></td>
</tr>
<tr>
<td><code>PDELAY_RESP_FOLLOW_UP</code></td>
<td style="text-align: center;">No</td>
<td>Carries precise <code>PDELAY_RESP</code> <code>t3</code> in two-step mode</td>
</tr>
</tbody>
</table>
<p>In <strong>one-step</strong> mode the timestamp is embedded directly into each <code>SYNC</code>
message as it leaves the wire, eliminating the need for <code>FOLLOW_UP</code>.
In <strong>two-step</strong> mode the <code>SYNC</code> carries a placeholder and the precise
transmit timestamp arrives in a subsequent <code>FOLLOW_UP</code>. Hardware
timestamping gives high accuracy in both modes; one-step reduces message
overhead at the cost of more demanding hardware support.</p>
<h2 id="message-format">Message format<a class="headerlink" href="#message-format" title="Permanent link"></a></h2>
<p>Every PTP message begins with a common 34-octet header, regardless of type.
The structure below follows the traditional IETF bit-field layout: each row
is four octets wide, bit 7 (MSB) is on the left and bit 0 (LSB) on the
right within each octet.</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a> 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
<a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
<a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a> 0-3 |trSpec |msgType| rsv | ver | messageLength |
<a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
<a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a> 4-7 | domainNumber | minorSdoId | flags |
<a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
<a id="__codelineno-0-7" name="__codelineno-0-7" href="#__codelineno-0-7"></a> 8-15 | |
<a id="__codelineno-0-8" name="__codelineno-0-8" href="#__codelineno-0-8"></a> + correctionField +
<a id="__codelineno-0-9" name="__codelineno-0-9" href="#__codelineno-0-9"></a> | |
<a id="__codelineno-0-10" name="__codelineno-0-10" href="#__codelineno-0-10"></a> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
<a id="__codelineno-0-11" name="__codelineno-0-11" href="#__codelineno-0-11"></a>16-19 | messageTypeSpecific |
<a id="__codelineno-0-12" name="__codelineno-0-12" href="#__codelineno-0-12"></a> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
<a id="__codelineno-0-13" name="__codelineno-0-13" href="#__codelineno-0-13"></a>20-27 | |
<a id="__codelineno-0-14" name="__codelineno-0-14" href="#__codelineno-0-14"></a> + clockIdentity +
<a id="__codelineno-0-15" name="__codelineno-0-15" href="#__codelineno-0-15"></a> | |
<a id="__codelineno-0-16" name="__codelineno-0-16" href="#__codelineno-0-16"></a> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
<a id="__codelineno-0-17" name="__codelineno-0-17" href="#__codelineno-0-17"></a>28-31 | portNumber | sequenceId |
<a id="__codelineno-0-18" name="__codelineno-0-18" href="#__codelineno-0-18"></a> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
<a id="__codelineno-0-19" name="__codelineno-0-19" href="#__codelineno-0-19"></a>32-33 | controlField | logMsgIntvl |
<a id="__codelineno-0-20" name="__codelineno-0-20" href="#__codelineno-0-20"></a> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</code></pre></div>
<ul>
<li><strong><code>trSpec</code></strong> (<code>transportSpecific</code>, bits 74 of octet 0): 4-bit profile
identifier. <code>0x0</code> = IEEE 1588, <code>0x1</code> = gPTP (802.1AS). Set implicitly
by the <code>profile</code> configuration leaf.</li>
<li><strong><code>msgType</code></strong> (<code>messageType</code>, bits 30 of octet 0): <code>0x0</code> SYNC ·
<code>0x1</code> DELAY_REQ · <code>0x2</code> PDELAY_REQ · <code>0x3</code> PDELAY_RESP ·
<code>0x8</code> FOLLOW_UP · <code>0x9</code> DELAY_RESP · <code>0xA</code> PDELAY_RESP_FOLLOW_UP ·
<code>0xB</code> ANNOUNCE.</li>
<li><strong><code>rsv</code></strong> (reserved, bits 74 of octet 1): Set to zero; ignored on
receipt.</li>
<li><strong><code>ver</code></strong> (<code>versionPTP</code>, bits 30 of octet 1): PTP version; <code>2</code> for
IEEE 1588-2008 and IEEE 1588-2019.</li>
<li><strong><code>messageLength</code></strong> (octets 23): Total message length in octets,
including the header.</li>
<li><strong><code>domainNumber</code></strong> (octet 4): PTP domain; receivers silently discard
messages that do not match their configured domain.</li>
<li><strong><code>minorSdoId</code></strong> (octet 5): Reserved in IEEE 1588-2008; carries a
profile sub-identifier in IEEE 1588-2019.</li>
<li><strong><code>flags</code></strong> (octets 67): Per-message flags — includes the two-step
flag (set when a FOLLOW_UP will follow a SYNC), UTC offset valid, and
leap-second indicators.</li>
<li><strong><code>correctionField</code></strong> (octets 815): Accumulated path correction in
nanoseconds × 2¹⁶. Transparent Clocks add their measured residence
time and link delay here as they forward each message, so the final
time-receiver can subtract the total accumulated delay.</li>
<li><strong><code>messageTypeSpecific</code></strong> (octets 1619): Reserved in IEEE 1588-2008;
carries message-type-specific data in IEEE 1588-2019.</li>
<li><strong><code>clockIdentity</code></strong> (octets 2027): EUI-64 identity of the sending
clock — the value shown as "Clock identity" in <code>show ptp</code>.</li>
<li><strong><code>portNumber</code></strong> (octets 2829): Port number of the sender within its
clock; together with <code>clockIdentity</code> it forms the unique
<code>sourcePortIdentity</code>.</li>
<li><strong><code>sequenceId</code></strong> (octets 3031): Increments with each message; used to
match a DELAY_REQ to its DELAY_RESP.</li>
<li><strong><code>controlField</code></strong> (octet 32): Deprecated in PTPv2; set to fixed
values per message type for backward compatibility with PTPv1.</li>
<li><strong><code>logMsgIntvl</code></strong> (<code>logMessageInterval</code>, octet 33): Log₂ of the
expected interval between messages of this type; <code>0x7F</code> means not
applicable.</li>
</ul>
<p>The <code>transportSpecific</code> and <code>domainNumber</code> fields are the quickest way to
verify on the wire that a device is using the profile and domain you
configured.</p>
<h3 id="decoding-with-wireshark">Decoding with Wireshark<a class="headerlink" href="#decoding-with-wireshark" title="Permanent link"></a></h3>
<p>Wireshark decodes PTP messages automatically, expanding every header field
and message-type-specific payload in the packet tree. PTP travels over
two UDP ports — 319 for event messages (SYNC, DELAY_REQ, PDELAY_REQ and
their responses) and 320 for general messages (ANNOUNCE, FOLLOW_UP) — as
well as directly over Ethernet (EtherType <code>0x88F7</code>) when layer-2 transport
is in use.</p>
<p>Use the display filter <code>ptp</code> to isolate PTP traffic:</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a>ptp
</code></pre></div>
<p>To narrow down to a specific domain or profile (exact field names can be
verified in Wireshark via <strong>View → Internals → Supported Protocols</strong>,
filtering for <code>ptp</code>):</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-2-1" name="__codelineno-2-1" href="#__codelineno-2-1"></a>ptp.v2.domainnumber == 0
<a id="__codelineno-2-2" name="__codelineno-2-2" href="#__codelineno-2-2"></a>ptp.v2.transportspecific == 1
</code></pre></div>
<p>This makes it straightforward to confirm which grandmaster a port is
tracking, verify that <code>correctionField</code> is being updated by a Transparent
Clock, or diagnose why the BTCA is not electing the expected grandmaster.</p>
<h2 id="glossary">Glossary<a class="headerlink" href="#glossary" title="Permanent link"></a></h2>
<table>
<thead>
<tr>
<th>Abbreviation</th>
<th>Expansion</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>AVB</td>
<td>Audio/Video Bridging</td>
<td>IEEE 802.1 precursor to TSN; real-time AV over Ethernet</td>
</tr>
<tr>
<td>IETF</td>
<td>Internet Engineering Task Force</td>
<td>Standards body; defines RFC for layer-3 and up</td>
</tr>
<tr>
<td>UDP</td>
<td>User Datagram Protocol</td>
<td>IP transport used by PTP; port 319 (event) and 320 (general)</td>
</tr>
<tr>
<td>EUI-64</td>
<td>Extended Unique Identifier (64-bit)</td>
<td>IEEE identifier format used as <code>clockIdentity</code> in PTP</td>
</tr>
<tr>
<td>EtherType</td>
<td>Ethernet frame type field</td>
<td><code>0x88F7</code> identifies PTP over layer-2 Ethernet</td>
</tr>
<tr>
<td>BC</td>
<td>Boundary Clock</td>
<td>Terminates and re-originates PTP on each port</td>
</tr>
<tr>
<td>BTCA</td>
<td>Best TimeTransmitter Clock Algorithm</td>
<td>Elects the GM; replaces BMCA from IEEE 1588-2008</td>
</tr>
<tr>
<td>CMLDS</td>
<td>Common Mean Link Delay Service</td>
<td>IEEE 1588-2019 §16.6; shared delay service for multiple instances</td>
</tr>
<tr>
<td>DS</td>
<td>Data Set</td>
<td>Named attribute collection in IEEE 1588 (default-ds, port-ds, …)</td>
</tr>
<tr>
<td>E2E</td>
<td>End-to-End</td>
<td>Delay mechanism: measures path from GM to time-receiver</td>
</tr>
<tr>
<td>GM</td>
<td>Grandmaster</td>
<td>PTP network-wide time source, elected by BTCA</td>
</tr>
<tr>
<td>gPTP</td>
<td>generalized Precision Time Protocol</td>
<td>IEEE 802.1AS profile; used in TSN and AVB</td>
</tr>
<tr>
<td>NTP</td>
<td>Network Time Protocol</td>
<td>Millisecond-accuracy time protocol for wide-area use</td>
</tr>
<tr>
<td>OC</td>
<td>Ordinary Clock</td>
<td>Single-port PTP clock; time-transmitter or time-receiver</td>
</tr>
<tr>
<td>P2P</td>
<td>Peer-to-Peer</td>
<td>Delay mechanism: measures delay to immediate neighbour</td>
</tr>
<tr>
<td>PHC</td>
<td>PTP Hardware Clock</td>
<td>Hardware clock in the NIC used for PTP timestamping</td>
</tr>
<tr>
<td>PTP</td>
<td>Precision Time Protocol</td>
<td>IEEE 1588 sub-microsecond clock synchronisation protocol</td>
</tr>
<tr>
<td>SDO</td>
<td>Standards Development Organization</td>
<td>Body that defines a PTP profile; encoded in <code>sdo-id</code></td>
</tr>
<tr>
<td>TC</td>
<td>Transparent Clock</td>
<td>Forwards PTP messages, correcting for residence-time delay</td>
</tr>
<tr>
<td>TSN</td>
<td>Time-Sensitive Networking</td>
<td>IEEE 802.1 standard set for deterministic Ethernet</td>
</tr>
</tbody>
</table>
</article>
</div>
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
</div>
</main>
<footer class="md-footer">
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-copyright">
<div class="md-copyright__highlight">
Copyright © 2022-2026 The KernelKit Team
</div>
</div>
</div>
</div>
</footer>
</div>
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<div class="md-progress" data-md-component="progress" role="progressbar"></div>
<script id="__config" type="application/json">{"annotate": null, "base": "..", "features": ["toc.follow", "navigation.path", "navigation.instant", "navigation.instant.progress", "navigation.tracking", "navigation.indexes", "search.highlight", "search.share", "content.code.copy", "content.code.annotate", "content.footnote.tooltips"], "search": "../assets/javascripts/workers/search.2c215733.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"provider": "mike"}}</script>
<script src="../assets/javascripts/bundle.d7400e89.min.js"></script>
<script id="init-glightbox">const lightbox = GLightbox({"touchNavigation": true, "loop": false, "zoomable": true, "draggable": true, "openEffect": "zoom", "closeEffect": "zoom", "slideEffect": "slide"});
document$.subscribe(()=>{ lightbox.reload(); });
</script></body></html>