44
PTP and Packet Timing for Dummies v1.5, Dec/2019 © Fibrolan 2019, All Rights Reserved 800-883-8839 https://www.go2mhz.com/brand/fibrolan/ www.go2mhz.com

PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

PTP and Packet Timing for Dummiesv1.5, Dec/2019

© Fibrolan 2019, All Rights Reserved

800-883-8839

https://www.go2mhz.com/brand/fibrolan/

www.go2mhz.com

Page 2: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

AGENDA

• Background

• The PTP Analogy

• PTP Tech Talk

• The Evil Network

• Practical Guidelines

Page 3: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

BACKGROUND

Page 4: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

BA

SIC

TE

RM

INO

LO

GY Frequency

The number of repeated events (e.g. electrical pulses) per second; measured in units of Hertz [Hz] (how often?)

PhaseThe exact point within a single frequency cycle OR time difference between two events; measured in seconds(how long before/after?)

Time of Day (ToD)The actual date and time – year, month, day, hour, minute, second, etc.; measured in seconds (e.g. 2018-09-07, 08:20:15.387) (when?)

Page 5: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

THE PACKET ERA

• Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network

• Started as pure LAN technology, leaving WAN to legacy (TDM)

• Has taken over the transport, with legacy being pushed away

• Practically, all new major core networks are based on packet already

• Initially, Ethernet had very basic features, which were not suitable for high availability transport networks

• Over time, complementary standards allowed packet networks to catch up with legacy

• Services/Circuits

• Ring operation

• OAM facilities

• Synchronization

Page 6: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

WHY IS THE TIMING CHALLENGE BIGGER NOW?

• SDH/SONET and PDH, being synchronous by design, had no problem to deliver frequency to client equipment and applications

• Ethernet was originally designed as asynchronous and unable to deliver frequency

• To top this, more and more applications require also phase and ToD

• How do we get the time now…?!

• This is the nanosecond question…

• PTP comes to the rescue!

Page 7: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

TYPICAL APPLICATIONS

• Mobile (LTE, 5G)• Private LTE/5G• CBRS• Power (IT, Telecom, Grid)• Financial (HFT)• Air Traffic Control• Broadcasting• And more…

Page 8: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

A WORD ON GNSS

• Global Navigation Satellite System (GNSS) is the generic name for satellite based positioning systems. Most commonly used systems are:

• GPS: US owned

• GLONASS: Russian

• Beidou: Chinese

• Galileo: European

• Other systems also exist

• Besides position, can also be used to extracthighly accurate Time of Day

• A typical receiver will provide very good timing on a long term basis

• Used as primary source for practically alltiming systems

Page 9: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

KEYWORDS

Timing

Synchronization

Clocking / clock

PTP / 1588

Master / grand-master

GNSS, GPS, GLONASS

SyncE

Stratum 1 / PRS

Rubidium / holdover

Frequency

Phase

1PPS

Time of Day (ToD)

Antenna

Page 10: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

THE PTP ANALOGY

Page 11: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

• Location: The town of Syncville

• Mission: Synchronize the school’s clock to the town clock• To be done several times a day

• Time source (GM): Town hall Clock Tower

• Delivery method (PTP packets): The time messenger – Mr. T

• Intermediate nodes (switches/routers): Traffic lights

• Time client (slave): A School’s Clock (the kids would

appreciate proper time sync!)

SYNCVILLE AND MR. T

Page 12: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

DIRECT TIME DELIVERY

• Assuming: Mr. T is walking at a constant, known speed• Equivalent to packets traveling down a wire

• The time it takes to get from town clock to school is known, e.g. 5 minutes• Mr. T is checking this time by clocking his walk to school

and back and dividing by 2

• Mr. T records the time he leaves the tower on a piece of paper (timestamping)

• He walks down to the school and hands out the timestamped paper to the secretary (Mrs. S.)• Adding the known walk time (latency) to the school

• Mrs. S. adjusts the local school clock as necessary

Page 13: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

DIRECT TIME DELIVERY

06:00:00

06:10:00

One-way walk time: 00:05:00

Round trip time: 00:10:00

What Happens If The Way To School Is Downhill…?

Page 14: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

DIRECT TIME DELIVERY

+00:05:00

10:13:54

Page 15: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

INTERMEDIATE NODE(Unaware)

• The town is growing and the mayor decided to build a new junction, with a traffic light, right on Mr. T’s way to school!• This is equivalent to a switch/router• Mr. T says: “I pity the fool!”

• This traffic light is smart and operates based on traffic conditions• Difficult to tell how long you’ll need to stand in queue…

• Now, when Mr. T arrives at the school, the actual time it took him to reach there is longer; the known walk time is not enough

• The result is Mrs. S. adjusting the school’s clock to the wrong time!• A few minutes behind the real time

Page 16: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

INDIRECT TIME DELIVERY

+00:05:00

10:??:??

+??:??:??

Time in traffic light is unknown…

Time of arrival at school is inaccurate…

Page 17: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

INTERMEDIATE NODE WITH QOS(Unaware)

• Mr. T is mad, goes to the mayor and says: “fool! I need a prioritypass!”

• The mayor calls his director of traffic and instructs him to take good care of Mr. T

• When reaching the light, Mr. T now doesn’t have to wait in line with others coming from the same direction

• However, the light is still Red, for people coming from other directions (ports)

• Result: shorter wait, but its still there, and unpredictable

• Mr T. decides to take things into his own hands

• Picks up a stopwatch at the shop for tomorrow’s walk

Page 18: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

TRANSPARENT CLOCK

• Now, when Mr. T stops at the light, he starts his new shiny stopwatch

• When he has a Green light, he stops the watch

• The time shown on the stopwatch is the actual waiting time at the light (the residence time)

• When reaching the schools, he adds the stopwatch reading (the residence time) to the walk time and notes them on the piece of paper

• Now the secretary’s clock adjustment is good!

• Mr. T realizes he can actually go through several lights, resuming the stopwatch during the wait

• The priority pass (high QoS level) has lower importance now

• The stopwatch’s accuracy is becoming more important with each node

Page 19: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

TRANSPARENT CLOCK

+00:05:00

10:15:19

+00:01:25

Time in traffic light is accurately measured

Time of arrival at school can be calculated!

Page 20: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

BOUNDARY CLOCK

• Our industrious mayor decided to build another school• Now both needs to be served by Time messengers to keep

synchronized

• Being intimidated by Mr. T, he promotes him and makes him head of the town’s Time Department• He gets two more civil servants to his department (Mr. B and Mr. C)

• Mr. T is also a smart guy, so he re-organizes the process:• He prepares two pieces of paper with the origin timestamp• The two new messengers are waiting for him the light• When he arrives at the light, he still records the residence time for

each one, and adds the walk time to the light• Hands them the papers: for them the origin time is the time at the

light• Mr. B continues to the old school, while Mr. C heads to the new one• The secretary, although being surprised to see someone else than

Mr. T, is still happy to get the correct time

Page 21: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

BOUNDARY CLOCK

+00:03:00

10:15:19

+00:01:25

Time in traffic light is recovered and wait is accurately measured

Time of arrival at both schools can be calculated!

+00:04:00

10:16:29

+00:01:35

+00:02:00

Page 22: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

PTP TECH TALK

Page 23: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

ARCHITECTURE

• Master – Slave model

• Built in point to point delay calculation and compensation

• Originally, the idea was having a core master that can drive slaves at the edge of the network, with existing nodes

• Reality showed that this is not practical and there are several key options:• Ensure the entire network is PTP aware• Build a dedicated timing network (or channels)• Place smaller Grandmasters at the edges of the network

Page 24: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

A SAMPLE NETWORK

Grandmaster

GNSS

Boundary Clock Transparent ClockMacro eNodeB

PTP + SyncE

M S M S

S

LTE/5G Small Cell

Page 25: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

PRINCIPLE OF OPERATION

• The diagram shows the transfer of time information using the different protocol messages

• The slave can calculate the delay and the time using these 4 timestamps

• The offset from master is calculated using:• ((T2 - T1) - (T4 - T3)) / 2• If all is good – this offset should be 0

• The slave adjusts its time and frequency based on this offset

Page 26: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

ELEMENTS/ROLES

Provides the time for slaves

Recovers the time from master

A master that is connected to a time traceable source,

mostly GNSS (GPS)

Comprised of a slave and a master

Only corrects residence time

Refers to either a master or a slave

Page 27: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

• Ethernet (L2): simpler, lower overhead

• IP/UDP (L3): can cross routed networks

• Unicast (IP): greater flexibility

• Multicast (Ethernet or IP): lower traffic load

• End to End (E2E): from master to slave

• Peer to Peer (P2P): every link calculated separately

• 1-Step:The common and recommended approach

• 2-Step:Includes follow up messages; legacy equipment

OPERATING MODES

Page 28: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

PROTOCOL MESSAGES

• Sync

• Delay Request

• Delay Response

• Announce

• Follow up

• Management & Signaling

Page 29: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

OPERATING PARAMETERS

• Packet rates:• Sync• Delay request• Announce

• Announce timeout

• PTP Domain number

• Clock quality:• Class• Accuracy• Scaled Log Variance

Page 30: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

BEST MASTER CLOCK ALGORITHM

• The standard provides a protection mechanism, where a slave can work with more than a single master

• This is known as BMCA

• Different profiles can have different algorithms

• Decision is typically based on:• Clock quality (class)• Configured priorities (2 values)• Number of hops (steps removed)• Clock identity (related to MAC address)

• Main benefit of BMCA is the ability to have master redundancy

• Key drawback is that most decision parameters are synthetic and do not necessarily represent the clock quality at the decision point (i.e. the slave)

GM1 GM2

Slave

Page 31: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

WHAT IS A PTP PROFILE?

• A PTP profile is a set of predefined operating modes and parameters that simplifies design and implementation• Provides info on what is mandatory, optional and

forbidden

• Typically defines:• Clock types• Transport mode• Packet rates• Domain and quality parameters• BMC algorithm• Optional TLVs

• Defined in a set of standards

Page 32: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

WHY DO WE NEED PROFILES?

• Provides a common language and baseline

• We can always deviate from the profile definitions

• Application oriented – easier to find suitable implementation

• Limit the number of options allowed in the base standard

• Easier interoperability

• Clearer performance objectives (not always)

Page 33: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

PROFILE EXAMPLE: TELECOM PHASE

PARAMETER OPTIONS

Standard G.8275.1 (Telecom phase, full on path support)

Allowed clock types GM, OC, BC

Prohibited clock types TC*

Transport Ethernet, Multicast, no VLAN tagging

Delay mechanism End to End

BMCA Alternate (modified default)

Messages used Announce, Sync, Follow-up, Del. Req, Del. Resp.

1 and 2 step Both allowed

Sync rate 16 PPS

Del. Req/Resp rate 16 PPS

Announce rate 8 PPS

Domain # 24-43; default is 24

Page 34: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

THE EVIL NETWORK

Page 35: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

CHALLENGES

• Accuracy• Typical requirements for some

wireless technologies is <1.5usec

• Stability (jitter and wander)

• Network delay variation (PDV)

• Network asymmetry: the #1 killer of accuracy

• Convergence/lock time

• Resiliency

Page 36: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

PERFORMANCE

• PTP’s ultimate goal is high accuracy timing at the slave node

• In an ideal world, we’d like all nodes to be perfectly synchronized, within 0nsec of each other and off the Grandmaster

• In the real world however, this is impossible and the remaining question is how accurate can we get…

• The performance objective is determined by the application• For example, in LTE networks, sites need to be synchronized within

1.5usec off the master• Some scenarios in 5G fronthaul require as low as 20nsec (inter RRH

offset)

• Our enemy here is the Time Error between an ideal source and the slave

Page 37: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

TIME ERROR CONTRIBUTORS

SOURCE OF TE MITIGATION (AT THE SLAVE)

Timestamping accuracy (master and slave) Better timestampers; filtering and averaging (servo)

Inadequate filtering and servo algorithm (slave) Improved algorithms

Stability of local oscillator (slave) Higher quality oscillator (e.g. OCXO)

Network delay variation (PDV) Filtering and longer averaging

Network Asymmetry None… (must have network support TC/BC)

There are multiple factors contributing to a recovered Time Error (TE) on the slave side, most can be mitigated at the slave

Page 38: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

PTP AWARE VS UNAWARE TRANSPORT

GM Slave

t

TE

PDV t

TE

PDVAsymmetry

TC/BCGM TC/BC TC/BC Slave

t

TE

PDVAsymmetry

t

TE

PDV

PTP Unaware Network

PTP Aware Network

Page 39: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

PRACTICAL GUIDELINES

Page 40: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

KEY QUESTIONS

• Is the network Greenfield or Brownfield?

• Does client equipment require frequency or phase?

• What are the accuracy targets?

• Required level of resiliency

• Availability of GNSS

• Type of network Ethernet cabling (Copper, fiber)

• Required interface speeds (100M, 1G, 10G)

• What are the holdover requirements?

Page 41: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

CHOOSING A GM

REQUIREMENT MUST DESIRABLE

Port configurationGigabit Ethernet, Electrical

Minimum 2 ports

FE/GE electrical and optical,

10GE optical,

Minimum 6 ports

Transport layer IP/UDP IP/UDP and Ethernet

Forwarding mode Unicast Unicast and Multicast

Steps supported 1-step 1 and 2-step

Minimum supported packet rate (Sync

and Del. Req/Resp)64PPS 128PPS

Slave capacity (@full packet rate) >32 >128

Timestamp mechanism Hardware -

Timestamp accuracy <10nsec <5nsec

Overall accuracy <100nsec <50nsec

Sources supported GPS/GNSS GPS/GNSS, PTP, SyncE

Redundancy Power Power, timing reference sources

Holdover Application dependent Application dependent

Page 42: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

CHOOSING INTERMEDIATE NODES

REQUIREMENT MUST DESIRABLE

Node type TC or BC Both

Transport layer IP/UDP IP/UDP and Ethernet

Forwarding mode Unicast Unicast and Multicast

Steps supported 1-step 1 and 2-step

Minimum supported packet rate (Sync

and Del. Req/Resp)32PPS (aware)

64PPS (unaware)128PPS

Timestamp mechanism Hardware -

Timestamp accuracy <15nsec <8nsec

cTE introduced <20nsec (class B) <10nsec (class C)

Page 43: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

• Its not enough to say PTP is supported… check which modes and performance levels

• Verify timing performance is valid for all interface speeds, such as 100Mbps

• You may need intermediate GMs to compensate for TE in brownfield deployments

• Going through DWDM transport systems will not necessarily affect performance, but it still might (especially with 100G links)

• PTP should get high priority in the network through QoS configuration

• Connectivity between master and slave is just the first step… ping is not enough!

• Build reasonable margins into your design – it’s a packet world, but its not digital…K

EE

P I

N M

IND

Page 44: PTP and Packet Timing for Dummies · THE PACKET ERA • Ethernet and packet based networks (i.e. IP) have grown to be the leading technologies of choice for any modern network •

800-883-8839https://www.go2mhz.com/brand/fibrolan/

www.go2mhz.com