Unix Technical Forum

SEO

vBulletin Search Engine Optimization


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > Sun Solaris Administration

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-16-2008, 08:38 AM
ohaya
 
Posts: n/a
Default Need help setting up NTP in simple network

Hi,

I have a very small network consisting of 4 Solaris servers (Solaris1,
...., Solaris4) and want to configure NTP so that Solaris2, Solaris3, and
Solaris4 synch their time to Solaris1.

This is an isolated network (no outside connection available), so from
what I've read, I think that Solaris1 should be synched to itself?

We tried to set this up yesterday, and got the xnptd running on all 4
machines, but when we tested, it didn't seem that anything was happening
(we ran snoops on port 123 on several of the machines).

We tested by first using ntpdate on Solaris2, 3, and 4 to get them
synched to Solaris1, then starting the xnptd on those machines, then
setting the system clock on Solaris1 back about 10 minutes, and then
watching the snoop output for awhile.

Can someone provide what the basic ntp.conf file should look like for
Solaris1 and for the other Solaris machines (Solaris2, 3, and 4)?

Thanks,
Jim
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-16-2008, 08:38 AM
Thomas Maier-Komor
 
Posts: n/a
Default Re: Need help setting up NTP in simple network

ohaya wrote:
> Hi,
>
> I have a very small network consisting of 4 Solaris servers (Solaris1,
> ..., Solaris4) and want to configure NTP so that Solaris2, Solaris3, and
> Solaris4 synch their time to Solaris1.
>
> This is an isolated network (no outside connection available), so from
> what I've read, I think that Solaris1 should be synched to itself?
>
> We tried to set this up yesterday, and got the xnptd running on all 4
> machines, but when we tested, it didn't seem that anything was happening
> (we ran snoops on port 123 on several of the machines).
>
> We tested by first using ntpdate on Solaris2, 3, and 4 to get them
> synched to Solaris1, then starting the xnptd on those machines, then
> setting the system clock on Solaris1 back about 10 minutes, and then
> watching the snoop output for awhile.
>
> Can someone provide what the basic ntp.conf file should look like for
> Solaris1 and for the other Solaris machines (Solaris2, 3, and 4)?
>
> Thanks,
> Jim


did you see the files
/etc/inet/ntp.client
/etc/inet/ntp.server
that can be used as a starting point for setting up such a
configuration?

Tom
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-16-2008, 08:38 AM
ohaya
 
Posts: n/a
Default Re: Need help setting up NTP in simple network



Thomas Maier-Komor wrote:
>
> ohaya wrote:
> > Hi,
> >
> > I have a very small network consisting of 4 Solaris servers (Solaris1,
> > ..., Solaris4) and want to configure NTP so that Solaris2, Solaris3, and
> > Solaris4 synch their time to Solaris1.
> >
> > This is an isolated network (no outside connection available), so from
> > what I've read, I think that Solaris1 should be synched to itself?
> >
> > We tried to set this up yesterday, and got the xnptd running on all 4
> > machines, but when we tested, it didn't seem that anything was happening
> > (we ran snoops on port 123 on several of the machines).
> >
> > We tested by first using ntpdate on Solaris2, 3, and 4 to get them
> > synched to Solaris1, then starting the xnptd on those machines, then
> > setting the system clock on Solaris1 back about 10 minutes, and then
> > watching the snoop output for awhile.
> >
> > Can someone provide what the basic ntp.conf file should look like for
> > Solaris1 and for the other Solaris machines (Solaris2, 3, and 4)?
> >
> > Thanks,
> > Jim

>
> did you see the files
> /etc/inet/ntp.client
> /etc/inet/ntp.server
> that can be used as a starting point for setting up such a
> configuration?
>
> Tom



Tom,

The sample files were on a couple of the systems that I installed from
the Sun media, but several of the systems, including Solaris1, were
jumpstarted a long time ago by someone else who I haven't been able to
identify. Those latter systems didn't have the sample files, plus, I
guess that I thought that we wanted something simple and wasn't sure we
wanted to configure the server to multicast/broadcast as I think was in
the ntp.server sample file, so we tried to strip things down to the
barest minimum just to try to get things working.

Jim
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-16-2008, 08:38 AM
John Howells
 
Posts: n/a
Default Re: Need help setting up NTP in simple network



ohaya wrote:
>
> Hi,
>
> I have a very small network consisting of 4 Solaris servers (Solaris1,
> ..., Solaris4) and want to configure NTP so that Solaris2, Solaris3, and
> Solaris4 synch their time to Solaris1.
>
> This is an isolated network (no outside connection available), so from
> what I've read, I think that Solaris1 should be synched to itself?
>
> We tried to set this up yesterday, and got the xnptd running on all 4
> machines, but when we tested, it didn't seem that anything was happening
> (we ran snoops on port 123 on several of the machines).
>
> We tested by first using ntpdate on Solaris2, 3, and 4 to get them
> synched to Solaris1, then starting the xnptd on those machines, then
> setting the system clock on Solaris1 back about 10 minutes, and then
> watching the snoop output for awhile.


You don't say which version of Solaris, but the config files should be the same.
However, NTP is *NOT* designed to be tested like that. It does *NOT* expect that
the clock will be pulled hither and thither, but only to follow small changes.
If you start jerking the clock about the results are at best unpredictable.

> Can someone provide what the basic ntp.conf file should look like for
> Solaris1 ..


server 127.127.1.0
fudge 127.127.1.0 stratum 10
driftfile /etc/inet/ntp.driftfile

> .. and for the other Solaris machines (Solaris2, 3, and 4)?


server Solaris1
driftfile /etc/inet/ntp.driftfile

If you want to add "restrict" statements you can do that later.

The startup (whether using /etc/init.d/xntpd on earlier versions or smf on 10)
should run ntpdate automatically, so you don't have to, and on the clients the
ntp daemon itself will not be started start until ntpdate completes, which
requires the server has locally synchronized so that ntpdate on the client can
get the time from it, which takes about 5 or 6 minutes. Use "ps -ef | grep ntp"
to check what is running on each system, and "ntpq -p" (see "man ntpq" under the
"peers" entry for the detail) to check things are working, and trust the output.

John Howells
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-16-2008, 08:38 AM
ohaya
 
Posts: n/a
Default Re: Need help setting up NTP in simple network



> You don't say which version of Solaris, but the config files should

be the same.
> However, NTP is *NOT* designed to be tested like that. It does *NOT*

expect that
> the clock will be pulled hither and thither, but only to follow small

changes.
> If you start jerking the clock about the results are at best

unpredictable.
>
> > Can someone provide what the basic ntp.conf file should look like

for
> > Solaris1 ..

>
> server 127.127.1.0
> fudge 127.127.1.0 stratum 10
> driftfile /etc/inet/ntp.driftfile
>
> > .. and for the other Solaris machines (Solaris2, 3, and 4)?

>
> server Solaris1
> driftfile /etc/inet/ntp.driftfile
>
> If you want to add "restrict" statements you can do that later.
>
> The startup (whether using /etc/init.d/xntpd on earlier versions or

smf on 10)
> should run ntpdate automatically, so you don't have to, and on the

clients the
> ntp daemon itself will not be started start until ntpdate completes,

which
> requires the server has locally synchronized so that ntpdate on the

client can
> get the time from it, which takes about 5 or 6 minutes. Use "ps -ef |

grep ntp"
> to check what is running on each system, and "ntpq -p" (see "man

ntpq" under the
> "peers" entry for the detail) to check things are working, and trust

the output.

John,

Thanks.

All machines are Solaris 9 SPARC.

I tried exactly those config files you described above, but if I:

- Start xntpd on Solaris1, then
- Run: ntpdate solaris1 from one of the other Solaris systems

I am getting an error:

"No suitable server for synchronization found"

All machines are on the same network, and there are no firewalls, so I
don't know what the problem is.

Thanks,
Jim

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-16-2008, 08:38 AM
ohaya
 
Posts: n/a
Default Re: Need help setting up NTP in simple network

John,

Followup to my earlier post about "no server to synchronize..." error.


After going back to the lab, I did another ntpdate, and was surprised
that this time it worked, even tho no changes.

Does xntpd take awhile (maybe a couple of minutes) to get to the point
that it will respond to requests from other systems??? Seems like it
(xntpd) doesn't "talk" for awhile after it starts?

Jim

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-16-2008, 08:38 AM
Tim Bradshaw
 
Posts: n/a
Default Re: Need help setting up NTP in simple network

* ohaya wrote:

> We tried to set this up yesterday, and got the xnptd running on all 4
> machines, but when we tested, it didn't seem that anything was happening
> (we ran snoops on port 123 on several of the machines).


If you're not seeing any traffic on port 123 then I think ntp isn't
running (or isn't doing anything)

> We tested by first using ntpdate on Solaris2, 3, and 4 to get them
> synched to Solaris1, then starting the xnptd on those machines, then
> setting the system clock on Solaris1 back about 10 minutes, and then
> watching the snoop output for awhile.


But you shouldn't do this! ntp is for dealing with clock drift, it's
not designed to deal with massive changes in time. I can't remember
what happens in cases like this but in at least some cases the clients
will just log something to the effect of `I'm not going to try to fix
that because it's too large an offset' and do nothing.

--tim
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-16-2008, 08:38 AM
ohaya
 
Posts: n/a
Default Re: Need help setting up NTP in simple network

Tim,

Comments interspersed below...

Tim Bradshaw wrote:
>
> * ohaya wrote:
>
> > We tried to set this up yesterday, and got the xnptd running on all 4
> > machines, but when we tested, it didn't seem that anything was happening
> > (we ran snoops on port 123 on several of the machines).

>
> If you're not seeing any traffic on port 123 then I think ntp isn't
> running (or isn't doing anything)


With the new, simpler configurations that John Howells described earlier
in this thread, I am now seeing traffic regularly when I do snoop. It
looks like the 'client' end is sending out something every minute or so.



> > We tested by first using ntpdate on Solaris2, 3, and 4 to get them
> > synched to Solaris1, then starting the xnptd on those machines, then
> > setting the system clock on Solaris1 back about 10 minutes, and then
> > watching the snoop output for awhile.

>
> But you shouldn't do this! ntp is for dealing with clock drift, it's
> not designed to deal with massive changes in time. I can't remember
> what happens in cases like this but in at least some cases the clients
> will just log something to the effect of `I'm not going to try to fix
> that because it's too large an offset' and do nothing.



Thanks. I am now aware of that (no big changes). What I've done now on
the client end is to do a ntpdate to synch the client to solaris1, and
then starting xntpd. It now seems to be working as expected.

Thanks again,
Jim
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-16-2008, 08:38 AM
John Howells
 
Posts: n/a
Default Re: Need help setting up NTP in simple network


"ohaya" <ohaya@yahoo.com> wrote in message
news:1116608567.353501.319280@g47g2000cwa.googlegr oups.com...
> John,
>
> Followup to my earlier post about "no server to synchronize..." error.
>
>
> After going back to the lab, I did another ntpdate, and was surprised
> that this time it worked, even tho no changes.
>
> Does xntpd take awhile (maybe a couple of minutes) to get to the point
> that it will respond to requests from other systems??? Seems like it
> (xntpd) doesn't "talk" for awhile after it starts?


Well, I may not have expressed it too clearly, but I did note that
>>

on the clients the
ntp daemon itself will not be started start until ntpdate completes, which
requires the server has locally synchronized so that ntpdate on the client
can
get the time from it, which takes about 5 or 6 minutes.
<<

Basically, the standard Solaris NTP software goes through a two-stage
sequence if you use the standard /etc/rc* scripts to start it:

1 use ntpdate to quickly get the clock within the 128ms ntp expects
2 use the ntp daemon to really get things going properly

It must complete step 1 before moving on to step 2, so if the system
providing the source of time for ntpdate is not yet itself synchronized
ntpdate will wait, and the daemon will only start when it completes.

Once ntpdate has completed it takes about five or six minutes for the daemon
to synchronize, whether that be to its own hardware in the case of your
"server" (Solaris1) or to that system for your other three "client" systems.

The default minimum polling interval always starts at 64 seconds (it can go
up to a default maximum of 1024 seconds in powers of 2 as it thinks things
are stable enough to allow it), and it takes five or six samples at 64
second intervals before the daemon is confident it knows what is going on.
During this time it works out the difference in frequency and stability
between its local clock and that of the source of time data.

If you stop and start the ntp software on Solaris1 and use "ntpq -p" to
monitor it you will have to wait about six minutes before the '*' appears to
show it is in sync. Only then will the other servers see the time as valid
and start their synchronization, which will itself take at least a further
six minutes, and possibly up to five minutes longer depending on exactly
where in the ntp startup sequence the client has reached when the server
finally offers it time data.

With NTP you have to be patient. It's about long term stability and
accuracy, not instant gratification!

Each hour the ntp software will update the "ntp.drift" file (in the example
files) with the clock error, so that next time the daemon runs it has a clue
as to where things should start.

John Howells


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 01-16-2008, 08:38 AM
ohaya
 
Posts: n/a
Default Re: Need help setting up NTP in simple network


> Basically, the standard Solaris NTP software goes through a two-stage
> sequence if you use the standard /etc/rc* scripts to start it:
>
> 1 use ntpdate to quickly get the clock within the 128ms ntp expects
> 2 use the ntp daemon to really get things going properly
>
> It must complete step 1 before moving on to step 2, so if the system
> providing the source of time for ntpdate is not yet itself synchronized
> ntpdate will wait, and the daemon will only start when it completes.
>
> Once ntpdate has completed it takes about five or six minutes for the daemon
> to synchronize, whether that be to its own hardware in the case of your
> "server" (Solaris1) or to that system for your other three "client" systems.
>
> The default minimum polling interval always starts at 64 seconds (it can go
> up to a default maximum of 1024 seconds in powers of 2 as it thinks things
> are stable enough to allow it), and it takes five or six samples at 64
> second intervals before the daemon is confident it knows what is going on.
> During this time it works out the difference in frequency and stability
> between its local clock and that of the source of time data.
>
> If you stop and start the ntp software on Solaris1 and use "ntpq -p" to
> monitor it you will have to wait about six minutes before the '*' appears to
> show it is in sync. Only then will the other servers see the time as valid
> and start their synchronization, which will itself take at least a further
> six minutes, and possibly up to five minutes longer depending on exactly
> where in the ntp startup sequence the client has reached when the server
> finally offers it time data.
>
> With NTP you have to be patient. It's about long term stability and
> accuracy, not instant gratification!
>
> Each hour the ntp software will update the "ntp.drift" file (in the example
> files) with the clock error, so that next time the daemon runs it has a clue
> as to where things should start.



John,

Ahhh. That explains a lot, including that when I was doing a snoop on
port 123, I was seeing traffic about every 60+ seconds (it was close to
64 actually, as you suggest).

Thanks,
Jim
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:15 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
UnixAdminTalk.com

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