28.06.2014 Views

Discussion

Discussion

Discussion

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

You should not confuse the NTP stratum with the telco concept of clocking stratum,<br />

which describes frequency accuracy.<br />

The JUNOS implementation of NTP is based on the FreeBSD ntpd utility.<br />

For more information about NTP, see http://www.ntp.org, the web site of the NTP<br />

research and development project, as well as the documentation page of the NTP<br />

Public Services Project (http://ntp.isc.org/bin/view/Main/DocumentationIndex).<br />

6.1 Setting the Date and Time on the Router<br />

Manually<br />

Problem<br />

You want to manually set the date and the local time on the router.<br />

Solution<br />

You set the date and time from operational mode:<br />

aviva@router1> set date 200503171626<br />

Thu Mar 17 16:26:00 UTC 2005<br />

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

On a relatively simple network, you can manually set the date and the local time on<br />

the routers in your network so you can keep an accurate record of all events that<br />

occur on the routers.<br />

To set the local time, use the set date command, which is an operational mode command.<br />

This example sets the year, month, date, hour, and minute. For more accuracy,<br />

you can include the seconds:<br />

aviva@router1> set date 200503151049.30<br />

After you have set the date and time, the router uses these values in any commands<br />

that include the date, in log and tracing files, and in the filesystems when marking<br />

files with the date and time. Use the show system uptime command to find out the<br />

current time. This command is similar to the Unix uptime utility.<br />

aviva@router1> show system uptime<br />

Current time: 2005-03-15 19:05:08 UTC<br />

System booted: 2005-03-15 11:09:57 UTC (07:55:11 ago)<br />

Protocols started: 2005-03-15 11:11:31 UTC (07:53:37 ago)<br />

Last configured: 2005-03-15 19:05:04 UTC (00:00:04 ago) by aviva<br />

7:05PM up 7:55, 1 user, load averages: 0.07, 0.02, 0.01<br />

This command also shows other information about the router, including when it was<br />

last booted (the first line) and how long it has been up (the last line), when the protocol<br />

software started, and when the configuration was last changed.<br />

182 | Chapter 6: NTP<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!