1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557
|
<pre>Network Working Group J. Crowcroft
Request for Comments: 1165 UCL
J. Onions
Nottingham University
June 1990
<span class="h1">Network Time Protocol (NTP) over the OSI</span>
<span class="h1">Remote Operations Service</span>
Status of this Memo
This memo suggests an Experimental Protocol for the OSI and Internet
communities. Hosts in either community, and in particular those on
both are encouraged to experiment with this mechanism. Please refer
to the current edition of the "IAB Official Protocol Standards" for
the standardization state and status of this protocol. Distribution
of this memo is unlimited.
Table of Contents
<a href="#section-1">1</a>. Introduction........................................... <a href="#page-1">1</a>
<a href="#section-1.1">1.1</a> Motivation............................................ <a href="#page-1">1</a>
<a href="#section-2">2</a>. Protocol Overview...................................... <a href="#page-2">2</a>
<a href="#section-3">3</a>. Operation of the Protocol.............................. <a href="#page-3">3</a>
<a href="#section-4">4</a>. Network Considerations................................. <a href="#page-4">4</a>
<a href="#section-5">5</a>. Implementation Model................................... <a href="#page-4">4</a>
<a href="#section-6">6</a>. Constructing NTP Data Fields........................... <a href="#page-4">4</a>
<a href="#section-7">7</a>. Discussion............................................. <a href="#page-4">4</a>
<a href="#section-8">8</a>. Prototype Experience................................... <a href="#page-5">5</a>
<a href="#section-9">9</a>. References............................................. <a href="#page-5">5</a>
<a href="#section-10">10</a>. Acknowledgements...................................... <a href="#page-6">6</a>
<a href="#appendix-A">Appendix A</a>. NTP Remote Operations Service Specification... <a href="#page-6">6</a>
<a href="#section-11">11</a>. Security Considerations............................... <a href="#page-9">9</a>
<a href="#section-12">12</a>. Authors' Addresses.................................... <a href="#page-9">9</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
This document describes the Remote Operations and Abstract Syntax for
the operation of the Network Time Protocol (NTP) over an ISO OSI
stack.
NTP itself is documented in great detail in <a href="./rfc1119">RFC 1119</a>.
<span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a> Motivation</span>
The motivation behind the implementation of a Remote Operations
<span class="grey">Crowcroft & Onions [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc1165">RFC 1165</a> NTP over OSI June 1990</span>
Service implementation of NTP is fourfold.
1. The inclusion of a useful service to an OSI
environment.
2. The feasibility of automatically checking a ROS/ASN.1
specification, and automatically generating code to
implement the protocol.
3. The feasibility of running NTP on connection oriented
network services (CONS or X.25), and consequentially,
the ability to use connection success or failure to
optimise reachability discovery.
4. The generalisation of the last point: the use of ROS
makes NTP independent of the underlying communications
architecture.
The need for time synchronisation is clear, and <a href="./rfc1119">RFC 1119</a> indicates a
few of the necessary uses of this service. However, it is becoming
clear that OSI applications are very much in need of this service
too. Not just in the local context but across the wide area. For
example much of the strong authentication outlined in X.511 is based
on encrypted packets with time stamps to indicate how long the packet
is valid for. If two hosts have clocks that are not closely
synchronised, the host with the faster clock will be more prone to
cryptographic attacks from the slower, and the slower host will
possibly find it is unauthentable.
A similar problem occurs with the X.500 directory and the service
control limiting the time allowed for the search.
Authentication between NTP peers and between clients and servers is
not addressed here, as the choice of mechanism is still the subject
of some debate.
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Protocol Overview</span>
The NTP application functions exactly as in <a href="./rfc1119">RFC 1119</a>. The use of
remote operations and the underlying Application support means that
for NTP daemons to peer with one another, they send an A-
ASSOCIATE.REQUEST, and receive an A-ASSOCIATE.INDICATION.
On successful association, they subsequently periodically invoke the
appropriate Remote Operation with the appropriate parameters at the
appropriate frequency.
On failure, they mark the peer as unreachable.
<span class="grey">Crowcroft & Onions [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc1165">RFC 1165</a> NTP over OSI June 1990</span>
The states that an ntp daemon records for each peer are enhanced from
<a href="./rfc1119">RFC 1119</a> to include:
Connected: this indicates the host is connected with its peer and
synchronisation data is being exchanged.
Connecting: this state indicates that a connection is in progress.
Hosts at large distances may take several seconds to connect, and
such blocking can perturb the exchange of data with other hosts.
Therefore, the connection is made asynchronously.
Accepting: this state indicates that a connection is being
accepted from another host, but the necessary negotiation of
transport session etc has not been fulfilled yet. This is another
asynchronous part.
Disconnected: this state is reached if the remote host cannot be
contacted.
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Operation of the Protocol</span>
The use of a connection oriented service means that the operation of
the NTP algorithm is slightly different. This stems firstly from
some necessary adjustments made to the protocol and secondly from
some optimisations that are possible through the use of connections.
Firstly, the reachability of the host can be directly determined.
The NTP protocol maintains a shift register to determine if it is
likely that a peer is still responding and exchanging data. This
works by recording over the last eight transfers how many responses
have been received. If there have been no responses to the last
eight packets, then the host is deemed unreachable.
Naturally, with a connection to the remote host, the reachability is
immediately determinable. Either a connection is established or the
connection is broken or not yet made. For this reason it is not
necessary to rely on the shift register to determine reachability.
Secondly, there are a large number of optimisations that can be made
by use of the connection oriented mode. The NTP packet format can be
broken into several categories.
a) Synchronisation data
b) Authentication data
c) Protocol data
<span class="grey">Crowcroft & Onions [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc1165">RFC 1165</a> NTP over OSI June 1990</span>
Of these classes of data, only the first (a) is necessary to maintain
the synchronisation between hosts. Information such as protocol
version and the precision of the local clock are not likely to vary
over the lifetime of the connection. Likewise the authentication if
in use need only be done at connection establishment and is not
necessarily required for every packet.
For these reason, the NTP protocol can be simplified slightly to
remove this information. This can be seen in the specification for
the Packet in <a href="#appendix-A">Appendix A</a>.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Network Considerations</span>
Although on first inspection it might be thought that a high speed
network is necessary for accurate synchronisation, this is not the
case. What is more important is the dispersion of the packet
traversal times. It is normally the case that a low speed network
with little variance in packet transit times will give better results
than a high speed network with large differences in individual packet
transit times. This would lead us to think that connection oriented
networks with resource allocation done at connection time might lead
to higher accuracies than connectionless networks which can suffer
large swings in packet transit time under high loading. (This is
heresy!)
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Implementation Model</span>
Ideally, the implementor will provide interoperability between the
existing UDP based NTP service, and a ROS based service.
To this end, the internal records that hold NTP state information,
can be kept the same as existing implementations, and for
optimisation reasons, the internal representations of NTP packets can
be the same. Translation between these and appropriate ROS/ASN
concrete encodings can be provided by automatic translators such as
Rosy [ISODE].
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Constructing NTP Data Fields</span>
The way in which the data fields in the Packet described in <a href="#appendix-A">Appendix</a>
<a href="#appendix-A">A</a> is unchanged from <a href="./rfc1119">RFC 1119</a>. This simplifies implementations based
on existing ones, and encourages interworking.
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Discussion</span>
From the limited testing of this model so far done, the results would
seem to indicate that the ROS based model running over an X.25
service is of similar reliability as the UDP model. Until further
<span class="grey">Crowcroft & Onions [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc1165">RFC 1165</a> NTP over OSI June 1990</span>
experimentation can be performed, specific data can not be given.
However, in the UK where the most common method of time
synchronisation is the system administrators watch and typing in the
time to the nearest minute, this method is clearly far superior.
Connection management is transparent to NTP since it is implemented
beneath the Remote Operations Service. However, an NTP
implementation must have access to the status of connections, and
uses this not only for reachability information but also to find the
information gleaned at connect time and no longer exchanged in NTP
operations.
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Prototype Experience</span>
There are a number of UK sites running NTP over ROS over X.25 with an
earlier ROS specification, with at least one site peering both over
ROS with UK sites on X.25, and over UDP with US Internet sites.
Initial experience is promising. The table below shows the
reachabilities, delays, offsets and dispersions for the central UK
site peering with 2 JANET sites (IP addresses not meaningful, but
shown as 126.0.0.1), and three US sites.
Address Strat Poll Reach Delay Offset Disp
=============================================================
+126.0.0.1 3 64 377 718.0 0.0 3.0
+umd1.umd.edu 1 1024 177 535.0 13.0 13.0
*128.4.0.5 1 64 167 545.0 10.0 524.0
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. References</span>
1. Mills, D., "Network Time Protocol (Version 2) Specification and
Implementation", <a href="./rfc1119">RFC-1119</a>, UDEL, September 1989.
2. Mills, D., "Algorithms for Synchronizing Network Clocks", <a href="./rfc956">RFC-</a>
<a href="./rfc956">956</a>, M/A-COM Linkabit, September 1985.
3. Postel, J. "User Datagram Protocol", <a href="./rfc768">RFC-768</a>, USC Information
Sciences Institute, August 1980.
4. ISO TC97, "Specification of Abstract Syntax Notation One
(ASN.1)", Draft International Standard ISO/DIS 8824, 6 June 1985.
5. CCITT, "Remote Operations: Model, Notation and Service
Definition", CCITT X.ros0 or ISO/DP 9072/1, Geneva, October 1986.
6. Mills, D., "Internet Time Synchronization: The Network Time
<span class="grey">Crowcroft & Onions [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc1165">RFC 1165</a> NTP over OSI June 1990</span>
Protocol (NTP)", <a href="./rfc1129">RFC 1129</a>, UDEL, October 1989.
7. Mills, D., "Measured Performance of the Network Time Protocol in
the Internet System", <a href="./rfc1128">RFC 1128</a>, October 1989.
8. Rose M., et al, "The ISO Development Environment: User's Manual".
<span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. Acknowledgements</span>
The Authors would like to thank Dave Mills for his valuable
comments on an earlier version of this document.
<span class="h2"><a class="selflink" id="appendix-A" href="#appendix-A">Appendix A</a>. ROS "Header" Format</span>
-- NTP definitions for ROS specification
--
-- Julian Onions, Nottingham University, UK.
--
-- Mon Jun 5 10:07:07 1989
--
NTP DEFINITIONS ::=
BEGIN
update OPERATION
ARGUMENT Packet
::= 0
query OPERATION
ARGUMENT NULL
RESULT ClockInfoList
::= 1
-- Data Structures
BindArgument ::=
fullbind SEQUENCE {
psap[0] IA5String OPTIONAL,
version[1] BITSTRING {
version-0(0),
version-1(1),
version-2(2)
} DEFAULT version-2,
authentication[2] Authentication OPTIONAL,
mode[3] BindMode
}
<span class="grey">Crowcroft & Onions [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc1165">RFC 1165</a> NTP over OSI June 1990</span>
Authentication ::= ANY
BindMode ::= ENUMERATED {
normal(0), -- standard NTP
query(1) -- queries only
}
BindResult ::=
SEQUENCE {
version[1] INTEGER DEFAULT 2,
authentication[2] Authentication OPTIONAL,
mode[3] BindMode
}
BindError ::=
SEQUENCE {
reason[0] INTEGER {
refused(0),
validation(1),
version(2), -- version not supported
badarg(3), -- bad bind argument
congested(4) -- catch all!
},
supplementary[1] IA5String OPTIONAL
}
-- basic exchange packet
Packet ::= SEQUENCE {
leap Leap,
mode Mode,
stratum[1] INTEGER,
pollInterval[2] INTEGER,
precision[3] INTEGER,
synchDistance SmallFixed,
synchDispersion SmallFixed,
referenceClockIdentifier ClockIdentifier,
referenceTimestamp TimeStamp,
originateTimestamp TimeStamp,
receiveTimestamp TimeStamp,
transmitTimestamp TimeStamp
}
ClockInfoList ::= SET OF ClockInfo
ClockInfo ::= SEQUENCE {
remoteAddress Address,
<span class="grey">Crowcroft & Onions [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc1165">RFC 1165</a> NTP over OSI June 1990</span>
localAddress Address,
flags[0] BIT STRING {
configured(0),
authentable(1),
sane(2),
candidate(3),
sync(4),
broadcast(5),
referenceClock(6),
selected(7),
inactive(8)
},
packetsSent[1] INTEGER,
packetsReceived[2] INTEGER,
packetsDropped[3] INTEGER,
timer[4] INTEGER,
leap Leap,
stratum[5] INTEGER,
ppoll[6] INTEGER,
hpoll[7] INTEGER,
precision[8] INTEGER,
reachability[9] INTEGER,
estdisp[10] INTEGER,
estdelay[11] INTEGER,
estoffset[12] INTEGER,
reference[13] ClockIdentifier OPTIONAL,
reftime TimeStamp,
filters SEQUENCE OF Filter
}
Leap ::= [APPLICATION 0] ENUMERATED {
nowarning(0),
plussecond(1),
minussecond(2),
alarm(3)
}
SmallFixed ::= [APPLICATION 1] IMPLICIT SEQUENCE {
integer INTEGER,
fraction INTEGER
}
ClockIdentifier ::= CHOICE {
referenceClock[0] PrintableString,
inetaddr[1] OCTET STRING,
psapaddr[2] OCTET STRING
}
<span class="grey">Crowcroft & Onions [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc1165">RFC 1165</a> NTP over OSI June 1990</span>
TimeStamp ::= [APPLICATION 2] IMPLICIT SEQUENCE {
integer INTEGER,
fraction INTEGER
}
KeyId ::= [APPLICATION 4] INTEGER
Mode ::= [APPLICATION 4] ENUMERATED {
unspecified (0),
symmetricActive (1),
symmetricPassive (2),
client (3),
server (4),
broadcast (5),
reservered (6),
private (7)
}
Filter ::= SEQUENCE {
offset INTEGER,
delay INTEGER
}
Address ::= OCTET STRING -- for now
END
<span class="h2"><a class="selflink" id="section-11" href="#section-11">11</a>. Security Considerations</span>
Security issues are not discussed in this memo.
<span class="h2"><a class="selflink" id="section-12" href="#section-12">12</a>. Authors' Addresses</span>
Jon Crowcroft
Computer Science Department
University College London
Gower Street
London WC1E 6BT UK
EMail: JON@CS.UCL.AC.UK
Julian P. Onions
Computer Science Department
Nottingham University
University Park
Nottingham, NG7 2RD UK
EMail: JPO@CS.NOTT.AC.UK
<span class="grey">Crowcroft & Onions [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc1165">RFC 1165</a> NTP over OSI June 1990</span>
Crowcroft & Onions [Page 10]
</pre>
|