Sir John Tenniel; Alice’s Adventures in Wonderland,Lewis Carroll Interleaved Synchronization Protocols for LANs and Space Data Links David L. Mills University.

Slides:



Advertisements
Similar presentations
Time in Distributed Systems
Advertisements

Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
HIERARCHY REFERENCING TIME SYNCHRONIZATION PROTOCOL Prepared by : Sunny Kr. Lohani, Roll – 16 Sem – 7, Dept. of Comp. Sc. & Engg.
William Stallings Data and Computer Communications 7th Edition
Dale E. Gary Professor, Physics, Center for Solar-Terrestrial Research New Jersey Institute of Technology 1 3/15/2012OVSA Preliminary Design Review Meeting.
Page # Advanced Telecommunications/Information Distribution Research Program (ATIRP) Authentication Scheme for Distributed, Ubiquitous, Real-Time Protocols.
Internet Control Message Protocol (ICMP)
Distributed Systems Fall 2010 Time and synchronization.
1 Fall 2005 Hardware Addressing and Frame Identification Qutaibah Malluhi CSE Department Qatar University.
Teaching material based on Distributed Systems: Concepts and Design, Edition 3, Addison-Wesley Copyright © George Coulouris, Jean Dollimore, Tim.
1 Version 3 Module 8 Ethernet Switching. 2 Version 3 Ethernet Switching Ethernet is a shared media –One node can transmit data at a time More nodes increases.
Time and Global States Chapter 11. Why time? Time is an Important and interesting issue in distributes systems. One we can measure accurately. Can use.
Sir John Tenniel; Alice’s Adventures in Wonderland,Lewis Carroll Chap_16 David L. Mills University of Delaware
EE 4272Spring, 2003 Chapter 14 LAN Systems Ethernet (CSMA/CD)  ALOHA  Slotted ALOHA  CSMA  CSMA/CD Token Ring /FDDI Fiber Channel  Fiber Channel Protocol.
Sir John Tenniel; Alice’s Adventures in Wonderland,Lewis Carroll 7-Aug-151 NTP Architecture, Protocol and Algorithms David L. Mills University of Delaware.
Lecture 9: Time & Clocks CDK4: Sections 11.1 – 11.4 CDK5: Sections 14.1 – 14.4 TVS: Sections 6.1 – 6.2 Topics: Synchronization Logical time (Lamport) Vector.
Gursharan Singh Tatla Transport Layer 16-May
Lecture slides prepared for “Business Data Communications”, 7/e, by William Stallings and Tom Case, Chapter 8 “TCP/IP”.
Enhanced NTP IETF – TicToc BOF Greg Dowd – Jeremy Bennington –
A Security Analysis of the Network Time Protocol (NTP) Presentation by Tianen Liu.
Mobile IP: Introduction Reference: “Mobile networking through Mobile IP”; Perkins, C.E.; IEEE Internet Computing, Volume: 2 Issue: 1, Jan.- Feb. 1998;
CSC 311 IEEE STANDARD ETHERNET Common Bus topology Uses CSMA/CD Named after “ether”, the imaginary substance many once believed occupied all of space.
Computer Networking From LANs to WANs: Hardware, Software, and Security Chapter 12 Electronic Mail.
Lecture 2 TCP/IP Protocol Suite Reference: TCP/IP Protocol Suite, 4 th Edition (chapter 2) 1.
1.1 What is the Internet What is the Internet? The Internet is a shared media (coaxial cable, copper wire, fiber optics, and radio spectrum) communication.
Data Link Control Protocols Dr. Muazzam A. Khan. Flow Control Ensuring the sending entity does not overwhelm the receiving entity —Preventing buffer overflow.
Aegis School of Telecommunication Chapter 7 Data Link Control Protocols Telecom Systems I by Dr. M. G. Sharma, Phd.
A Security Analysis of Network Time Protocol Andy Hospodor COEN /03/03 Paper by Matt Bishop, 1991.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Network Services Networking for Home and Small Businesses – Chapter 6.
1. Insert the Resource CD into your CD-ROM drive, click Start and choose Run. In the field that appears, enter F:\XXX\Setup.exe (if “F” is the letter of.
1 The Internet and Networked Multimedia. 2 Layering  Internet protocols are designed to work in layers, with each layer building on the facilities provided.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
CS3505: DATA LINK LAYER. data link layer  phys. layer subject to errors; not reliable; and only moves information as bits, which alone are not meaningful.
Sir John Tenniel; Alice’s Adventures in Wonderland,Lewis Carroll 11-Nov-151 The Nanokernel David L. Mills University of Delaware
1 CS4550: Computer Networks II Review Data Link Layer.
Chapter 9 Hardware Addressing and Frame Type Identification 1.Delivering and sending packets 2.Hardware addressing: specifying a destination 3. Broadcasting.
Lecture 4 Overview. Ethernet Data Link Layer protocol Ethernet (IEEE 802.3) is widely used Supported by a variety of physical layer implementations Multi-access.
Data Link and Flow Control Networks and Protocols Prepared by: TGK First Prepared on: Last Modified on: Quality checked by: Copyright 2009 Asia Pacific.
Time This powerpoint presentation has been adapted from: 1) sApr20.ppt.
CSC 600 Internetworking with TCP/IP Unit 5: IP, IP Routing, and ICMP (ch. 7, ch. 8, ch. 9, ch. 10) Dr. Cheer-Sun Yang Spring 2001.
Copyright Kenneth M. Chipps Ph.D. Ethernet Frame Format Last Update
HTTP evolution - TCP/IP issues Lecture 4 CM David De Roure
Time and global states Chapter 11. Outline Introduction Clocks, events and process states Synchronizing physical clocks Logical time and logical clocks.
1 Layer 2 Technologies Honolulu Community College Cisco Academy Training Center Semester 1 Version
Chapter 7 OSI Data Link Layer.
Precise measurement of physical link delay 802.1as, IEEE 802 plenary Lu Huang
Instrument Control System Seminar, 20 th -24 th October 2014 Time Synchronisation via Ethernet An introduction to IEEE 1588 Andreas Jost.
Chi-Cheng Lin, Winona State University CS412 Introduction to Computer Networking & Telecommunication Data Link Layer Part II – Sliding Window Protocols.
+ Lecture#2: Ethernet Asma ALOsaimi. + Objectives In this chapter, you will learn to: Describe the operation of the Ethernet sublayers. Identify the major.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Distributed Systems Lecture 5 Time and synchronization 1.
Page 1 Clock Synchronization: Physical Clocks Minqi Zhou Distributed Systems Except as otherwise noted, the content of this presentation.
Lecture 5 Time and synchronization
NTP Performance Analysis
Net 323: NETWORK Protocols
DCnet Research Network
Dept. of Computer Science
CIS 321 Data Communications & Networking
NTP Clock Discipline Modelling and Analysis
Data Link Issues Relates to Lab 2.
NTP Security Protocol David L. Mills University of Delaware
NTP Clock Discipline Principles
NTP Cryptographic Authentication (Autokey)
Net 323 D: Networks Protocols
Interleaved Synchronization Protocols for LANs and Space Data Links
NTP Architecture, Protocol and Algorithms
NTP Security Protocol David L. Mills University of Delaware
NTP Research Opportunities
Logical time (Lamport)
Introduction Communication Modes Transmission Modes
Presentation transcript:

Sir John Tenniel; Alice’s Adventures in Wonderland,Lewis Carroll Interleaved Synchronization Protocols for LANs and Space Data Links David L. Mills University of Delaware 12-Sep-151

Introduction o This presentation suggests modifications for three time synchronization protocols used on various LANs and space data links. Network Time Protocol (NTP) used for Internet synchronization with potential accuracies in the low microseconds range. IEEE 1588 Precision Time Protocol (PTP) used for hardware synchronization with potential accuracies in the low nanoseconds range. Consultive Committee on Space Data Systems (CCSDS) Proximity-1 Time Services Protocol used for Mars space data links with potential accuracies in the tens of nanoseconds range. o The modifications provide improved performance and reduced complexity using an interleaved design where the transmit timestamp is transmitted in the following packet. o The presentation covers each of these protocols in turn. o This briefing is based on the white paper Analysis and Simulation of the NTP On-Wire Protcol.Analysis and Simulation of the NTP On-Wire Protcol 12-Sep-152

NTP interleaved symmetric and broadcast protocol o In principle, NTP can deliver submicrosecond accuracy if timestamps can be captured precisely. o Current performance of a primary server with GPS reference clock and PPS signal is typically 2-5  s. o Current performance of a secondary server relative to a primary server is  s on a fast LAN with 16-s poll interval. o We would like to improve the performance for a secondary server to the level of the PPS signal. Capture the timestamps closer to the transmission media. These timestamps might not be available to include in the packet, as in current NTP. o Modify the NTP on-wire protocol to accommodate late timestamps while preserving backwards compatibility and without changing the NTP packet format. 12-Sep-153

Software timestamps (NTP) o Software timestamps as used by NTP. Transmit timestamps are captured shortly before the beginning of the packet; receive timestamps are captured shortly after the end of the packet. Assume d is the packet tranmission time. offset  = ½{[(T 2 + d)  T 1 )] + [T 3  (T 4 + d)]} so d cancels out. delay  = [(T 4 + d)  T 1 ]  [T 3  (T 2 + d)] so d cancels out. o Conclusion: If the delays are reciprocal and the packet lengths the same, software timestamps are equivalent to hardware timestamps. o Any other combination has errors depending on d. o Further information is at Timestamping Principles.Timestamping Principles T4T4 T3T3 T2T2 T1T1 T 2 + d T 4 + d A B 12-Sep-154

5 NTP Protocol Header Format (32 bits) NTP protocol header and timestamp formats StratPollLIModeVN NTP v3 and v4 Root Delay Root Dispersion Reference Identifier Reference Timestamp (64) Origin Timestamp (64) Receive Timestamp (64) Transmit Timestamp (64) Message Hash (64 or 128) LIleap warning indicator VNversion number (4) Stratstratum (0-15) Pollpoll interval (log2) Precprecision (log2) Seconds (32)Fraction (32) NTP Timestamp Format (64 bits) Value is in seconds and fraction since 0 h 1 January 1900 Authenticator uses DES-CBC or MD5 cryptosum of NTP header plus extension fields (NTPv4) Key/Algorithm Identifier Cryptosum Authenticator (Optional) Extension Field 1 (optional) Extension Field 2… (optional) NTP v4 only Prec Extension Field (padded to 32-bit boundary) Field LengthField Type NTPv4 Extension Field Last field padded to 64-bit boundary authentication only

NTP interleaved on-wire protocol o The primary purpose of the interleaved on-wire protocol is to improve accuracy using driver timestamps (drivetstamps) or hardware timestamps (hardstamps). o Another purpose is when the message digest is computed by a separate secure process, as in Microsoft Active Directory. o It is an extension of the current NTP on-wire protocol and is backwards compatible with it, including resistance to lost, duplicate or bogus packets. o It operates in basic, interleaved symmetric and interleaved broadcast modes and automatically adapts to normal or interleaved operation. o As in the current design, the protocol accumulates four timestamps in each round. Symmetric peers use these timesatmps to determine offset and delay of each relative to the other. Broadcast clients determine delay in the first round and then revert to listen- only. 12-Sep-156

Basic and interleaved protocol state variables o State variables xmttransmit timestamp recreceive timestamp dstdestination timestamp aorgalternate origin timestamp borgalternate origin timestamp xtoggle switch (+1, 0, -1) fsynch bit (0 or 1) bbroadcast bit (0 or 1) o Packet header variables t org origin timestamp t rec receive timestamp t xmt transmit timestamp 12-Sep-157

Transmit and receive protocol state machines o The following slides show the flow charts of the state machihes that implement the basic and interleaved variant of the various modes. Slide 1: transmit process used in all modes Slide 2: receive process for basic and interleaved broadcast modes Slide 3. receive process for basic symmetric mode Slide 4. receive process for interleaved symmetric mode Slide 5. receive process for timestamp checking

Transmit process if (mode != BCST) { /* broadcast */ t org = rec t rec = dst if (x == 0) { /* basic */ aorg = clock t xmt = aorg } else { /* interleaved */ if (x > 0) { aorg = clock t xmt = borg } else { borg = clock t xmt = aorg } x = -x } } else { t org = aorg aorg = clock t rec = 0 t xmt = aorg }

Receive process – broadcast modes 12-Sep-1510 err = OK if (t xmt != 0 && t xmt == xmt) { err = DUPE } else if (mode == BCST) { /* broadcast */ xmt = t xmt if (t org == 0) { /* basic */ dst = clock T 3 = t xmt T 4 = dst } else { /* interleaved */ T 3 = t org T 4 = borg; if (T 4 == 0) err = SYNC /* unsynchronized */ else if (t org – aorg > MAX) err = DELY /* delay error */ aorg = t xmt dst = clock borg = dst } (continued)

Receive process – basic symmetric mode mode 12-Sep-1511 } else if (x == 0) { /* basic symmetric */ xmt = t xmt rec = t xmt dst = clock T 1 = t org T 2 = t rec T 3 = t xmt T 4 = dst if (T 1 == 0 && T 2 == 0 && T 3 != 0) err = SYNC /* unsynchronized */ else if (T 1 == 0 || T 2 == 0 || T 3 == 0) err = ERRR /* protocol error */ else if (T 1 != aorg) err = BOGUS /* bogus */ (continued)

Receive process – interleaved symmetric mode 12-Sep-1512 } else { /* interleaved symmetric */ xmt = t xmt if (x > 0) T 1 = aorg else T 1 = borg T 2 = rec T 3 = t xmt T 4 = dst rec = t rec dst = clock if ((t org == 0 && t rec == 0 && t xmt == 0) || (t org == 0 && t rec != && t xmt != 0)) { f = 1; err = SYNC /* unsynchronized */ } else if (f == 0) { reset(); err = HOLD /* hold off */ } else if (t rec == 0 || t xmt == 0) reset(); err = ERRR /* protocol error */ } else if (T 2 == 0) { err = SYNC /* unsynchronized */ } else if (t org != T 4 ) reset(); err = BOGUS /* bogus */ } (continued)

Receive process – timestamp checking 12-Sep-1513 if (err == OK) { d = (T 4 – T 1 ) – (T 3 – T 2 ) if (T 3 > T 2 || T 1 > T 4 ) err = INVL/* invalid timestamp */ else if (d 1) err = DELY/* delay error */ else if {abs(T 2 – T 1 ) > MAX || abs(T 3 – T 4 ) > MAX) err = OFST;/* offset error */ }

NTP basic on-wire protocol o The following figure shows two rounds of the protocol. The transmit timestamps carry odd subscripts while the receive timestamps carry even subscripts. Packets are transmitted along the direction of the arrows. Timestamps are captured from the clock in the blue boxes. They are copied from there to other state variables and packet headers. o At T 4 the first A round is complete and the timestamps T 1, T 2, T 3 and T 4 are available to compute offset and delay of B relative to A as described in the architecture briefing. o At T 6 the first B round is complete and the timestamps T 3, T 4, T 5 and T 6 are available to compute the offset and delay of A relative to B. o Operation continues in subsequent rounds. 12-Sep-1514

Basic symmetric mode 12-Sep T2T2 T5*T5* T6T6 T7*T7* rec dst T3*T3* T4T4 T7*T7* T5*T5* T6T6 T5*T5* rec dst T1*T1* T2T2 T1*T1* T4T4 T3*T3* 0 0T1*T1* T2T2 T3*T3* T3*T3* T4T4 T3T3 T2T2 T1T1 T5T5 T6T6 T8T8 T7T7 T6T6 T1*T1*T5*T5* T4T4 T8T8 T3*T3*T7*T7* B A T3*T3* aorg 0 t1*t1* T5*T5* T5*T5*T1*T1* t org t rec t xmt Sync Valid

Timestamping principles o Accuracy is diminished in the basic protocol because the elapsed time between the transmit softstamp and the drivestamp determined by the interrupt routinecan be significant. o A more accurate transmit drivestamp could be captured by the NIC driver or better yet a hardstamp captured by the hardware PHY. o However, doing that means the transmit timestamp is not available to include in the packet. o The solution is to include the transmit timestamp in the following packet. o The trick is to do this using the same NTP packet header format and to automatically detect whether basic or interleaved mode is in use to support past protocol version. 12-Sep-1516

Interleaved on-wire protocol o The interleaved protocol uses five state variables, rec, dst, aorg, borg and xmt for each peer. The xmt variable is used only to detect duplicate packets and is not shown in the figures. o The protocol requires two basic rounds to produce the timestamps that determine offset and delay; however, the rounds are interleaved so that one set of timestamps is produced for each basic round. o A new transmit softstamp and hardstamp is produced for each transmitted packet, but the softstamp is overwritten by the hardstamp before being sent. o Each transmitted packet contains the previous transmit hardstamp. o Once synchronized, the first set of timestamps t 1, t 2, t 3 and t 4, are available at t 6 and the next set at t 3, t 4, t 5 and t 6 at t 8 and so forth. 12-Sep-1517

Interleaved symmetric mode 12-Sep T1T1 T9T9 0 borg dst 0 T2T2 T2T2 T4T4 T5T5 T6T6 rec T2T2 T6T6 0 T4T4 T1T1 T4T4 T2T T1T1 T5T5 T4T4 T8T8 0 T1T1 0 T6T6 T8T8 T 10 T8T8 T7T7 T5T5 T9T9 T8T8 T6T6 T 12 T5T5 T4T4 T3T3 T2T2 T1T1 T5T5 T6T6 T8T8 T7T7 T 11 T 10 T9T9 t org T3T3 Round 1 Round 2 Round 3 T9T9 T 12 T 10 T 12 T9T9 T 13 T 14 T 13 aorg t rec t xmt T 14 borg dst T4T4 0 rec 0T4T4 0 T6T6 T3T3 T3T3 T2T2 0 T3T3 0T8T8 T7T7 T8T8 T 10 T7T7 T 11 T 12 T 11 aorg 0 T7T7 T2T2 T6T6 T 10 Valid SyncValid SyncValid T3T3 T7T7 T1T1 T5T5 B A

Interleaved on-wire broadcast protocol o Interleaved broadcast is similar to IEEE 1588 two-step multicast, but does not require a follow-up message. o The basic principle is that the transmit drivestamp for one broadcast packet is sent in the next broadcast packet. The roundtrip delay is determined in client-server mode, but with the opposite offset sign. o The variant shown on the next slide is backwards compatible with current NTP. The timestamps with asterisks are captured before transmitting the packet, but are not used. o The actual offset and delay is calculated as each broadcast packet arrives. The delay is saved for intervals when the stateless exchange is not used. o In this figure softstamps and timestamps derived from them are shown with asterisk (*). 12-Sep-1519

Interleaved broadcast mode 12-Sep-1520 T1T1 aorg dst T3*T3* 0 T4T4 T5T5 rec 0 T4T4 0 0 T3*T3* T5T5 T4T4 T8T8 T5*T5*T1*T1* T4T4 T3T3 T5T5 T6T6 T8T8 T7T7 t org T7*T7* t rec t xmt borg T1T1 T1*T1* T3T3 T3T3 T3T3 aorg T2T2 Valid BroadcastStateless T2T2 T1T1 0 T 12 T3T3 T 11 * T 12 T 11 T3T3 T 11 * T1T1 T1T1 Broadcast T1T1 T3*T3*T3*T3*T 11 * T3*T3* T6T6 T5*T5* borg T 12 T1*T1* T2T2 T4T4 T4T4 T4T4 T6T6 B A Valid 0 T 14 T 11 T 13 * T 14 T 13 t 11 T 13 T 13 * Broadcast T 13 * T 14

Automatic protocol detection o The next slide shows how the protocol can detect whether the interleaved protocol is supported and, if not, how it can revert to basic mode. o Peer B starts in interleaved mode; peer A client starts in basic mode and cannot switch to interleaved mode. o Both client and server bungle on until the B detects an error at T 10 and switches to basic mode. After synchronizing, operation continues in basic mode for both B and A. o A simulator program to generate and test the protocol is available See Appendix B of Analysis and Simulation of the NTP On-Wire Protocol.Analysis and Simulation of the NTP On-Wire Protocol 12-Sep-1521

Automatic protocol detection example 12-Sep-1522 T1*T1*T9*T9* 0 borg dst 0 T2T2 0 T4T4 0 T6T6 rec 0T3T3 0 T4T4 0 T5*T5* T4T T3T3 0 T4T4 t 5* t1*t1* T8T8 0 T 5* T 1* T3T3 T8T8 0 T 10 T 11 * T8T8 0 T9*T9* T8T8 T3T3 T 12 T9*T9* T4T4 T3T3 T2T2 T1T1 T5T5 T6T6 T8T8 T7T7 T 11 T 10 T9T9 t org T3T3 Bogus T 13 * T 12 T 11 * T 12 T 13 * 0 T 14 T 13 aorg t rec t xmt T 14 borg dst T4T4 0 rec 0T4T4 0 T6T6 T3T3 T3T3 T2T2 0 T3T3 0T8T8 T7T7 T8T8 T 10 T7T7 T7T7 T 11 * T 13 * t 11 * aorg 0 T7T7 T2T2 T6T6 T 10 T 13 * T 16 T 15 * T 13 * T 14 T 15 * 0 T 14 T7T7 T 15 * T 13 * T 16 T 15 Bogus Sync Bogus Valid Sync B A Basic t 5* T5*T5*T1*T1* Basic Xleave

Proximity-1 original time service protocol o Proximity-1 protocol is used for Mars orbiter and rover data links. o On command, the orbiter and rover time-tag the ASM for a number of transmitted and received frames and collect them and the associated FSNs in a buffer.. o The contents of the buffers are sent, perhaps via relay, to Earth. o On Earth the transmit time-tags are matched with the respective receive time-tags and the spacecraft clock data to determine the offset of one spacecraft relative to the other. o If necessary, the respective times are uploaded to the orbiter for relay to the rover. ASMHeaderDataCRC Time Tag Proximity-1 Frame FSN Time Tag Buffer ASM Attached Sequence Marker FSN Frame Sequence Number CRC Cyclic Redundancy Check 12-Sep-1523

Proximity-1 Interleaved Time Service (PITS) o We propose a new Timestamp SPDU at each end of the space data link. It carries three 64-bit timestamps as in the NTP packet header. o This requires a minor modification of the Proximity-1 radio to capture time-tags for the transmit and receive SPDUs. These will later be converted to logical times. o The logical timescale for one or more space vehicles is coordinated direcly or indirectly from Earth. o Other vehicles coordinate with these vehicles using the interleaved symmetric protcol over the Proximity-1 space data link. o PITS uses the same state variables as NTP and has the same error detection and recovery mechanisms. 12-Sep-1524

IEEE 1588 Precision Time Protocol (PTP) 12-Sep-1525 T4T4 T3T3 T2T2 T1T1 Master Slave Sync Follow_Up (T 1 ) Delay_Req Delay_Resp(T 4 ) o Ethernet NIC hardware captures a timestamp after the preamble and before the data separately for transmit and receive. o In each round master sends Sync message at T 1 ; slave receives at T 2. o In one-step variant T 1 is inserted just before the data in the Sync message; in two-step variant T 1 is sent later in a Follow_Up message. o Slave sends Delay_Req message at T 3 ; master sends Delay_Resp message with T 4. Compute master offset  and roundtrip delay  offset  = ½[(T 2  T 1 ) + (T 3  T 4 )], delay  = (T 4  T 1 )  (T 3  T 2 )] o Note that IEEE 1588 packets have room for only one timestamp.

PTP interleaved mode o The interleaved technique used in NTP could be used in PTP to send T 1 in the next Sync message. o This avoids the need for the Follow_up message. o As the delay is measured separately by each slave, a lost Sync message is easily found and discarded. 12-Sep-1526

12-Sep-1527 Further information o NTP home page Current NTP Version 3 and 4 software and documentation FAQ and links to other sources and interesting places o David L. Mills home page Papers, reports and memoranda in PostScript and PDF formats Briefings in HTML, PostScript, PowerPoint and PDF formats Collaboration resources hardware, software and documentation Songs, photo galleries and after-dinner speech scripts o Udel FTP server: ftp://ftp.udel.edu/pub/ntp Current NTP Version software, documentation and support Collaboration resources and junkbox o Related projects Current research project descriptions and briefings