28.06.2014 Views

Discussion

Discussion

Discussion

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Engine boots, the ntpdate utility runs early in the boot process, before chassisd and<br />

rpd are up. The only thing that is up and configured at that point is fxp0.<br />

With this method of setting up NTP, the router gets the time once, when it boots,<br />

and sets its clock based on the time it receives from the server. While you could<br />

choose this as the only method for getting accurate time on the router, the clock time<br />

can drift over long periods, so it is a better idea to get the time when the router boots<br />

and to also synchronize the time periodically with time servers to slowly correct any<br />

drifting.<br />

If the NTP boot server is another router, you cannot boot both routers at once, for<br />

instance, if you are power-cycling all the routers in your POP. You must start the<br />

boot server first.<br />

See Also<br />

Recipe 6.4<br />

6.4 Synchronizing Time Periodically<br />

Problem<br />

You want to periodically resynchronize the time on the router to limit the effects of<br />

clock drift.<br />

Solution<br />

Configure the router to periodically get time updates from an NTP server:<br />

[edit system]<br />

aviva@router1# set ntp server 192.168.27.46<br />

aviva@router1# show<br />

system {<br />

ntp {<br />

server 192.168.27.46;<br />

}<br />

}<br />

<strong>Discussion</strong><br />

Setting the router’s time by configuring a boot server provides a one-time method for<br />

the router to get time when it boots. However, once a router is up and stable, you<br />

will almost never have to reboot it, so if its time starts to drift from the time on your<br />

other network devices, you have to go into the router and manually reconfigure the<br />

time. To automatically keep the router in sync with the rest of the network, you can<br />

have it periodically get time updates from an NTP server. To do this, place the<br />

JUNOS NTP software into NTP server mode with the set ntp server command,<br />

specifying the IP address of the NTP server. The NTP server will then periodically<br />

send the correct time to the router, which then adjusts its system clock.<br />

Synchronizing Time Periodically | 185<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!