Setting the Date and Time on the Router Manually

Problem

You want to manually set the date and the local time on the router.

Solution

You set the date and time from operational mode:

	aviva@router1> set date  200503171626 
	Thu Mar 17 16:26:00 UTC 2005

 

Discussion

On a relatively simple network, you can manually set the date and the local time on the routers in your network so you can keep an accurate record of all events that occur on the routers.

To set the local time, use the set date command, which is an operational mode command. This example sets the year, month, date, hour, and minute. For more accuracy, you can include the seconds:

	aviva@router1> set date  200503151049.30 

After you have set the date and time, the router uses these values in any commands that include the date, in log and tracing files, and in the filesystems when marking files with the date and time. Use the show system uptime command to find out the current time. This command is similar to the Unix uptime utility.

	aviva@router1> show system uptime
	Current time: 2005-03-15 19:05:08 UTC
	System booted: 2005-03-15 11:09:57 UTC (07:55:11 ago)
	Protocols started: 2005-03-15 11:11:31 UTC (07:53:37 ago)
	Last configured: 2005-03-15 19:05:04 UTC (00:00:04 ago) by aviva
	 7:05PM up 7:55, 1 user, load averages: 0.07, 0.02, 0.01

This command also shows other information about the router, including when it was last booted (the first line) and how long it has been up (the last line), when the protocol software started, and when the configuration was last changed.


Router Configuration and File Management

Basic Router Security and Access Control

IPSec

SNMP

Logging

NTP

Router Interfaces

IP Routing

Routing Policy and Firewall Filters

RIP

IS-IS

OSPF

BGP

MPLS

VPNs

IP Multicast



JUNOS Cookbook
Junos Cookbook (Cookbooks (OReilly))
ISBN: 0596100140
EAN: 2147483647
Year: 2007
Pages: 290
Authors: Aviva Garrett

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net