Setting the Date and Time


Manually setting the time requires three main steps:

  • Setting the date and time

  • Setting the time zone

  • Setting whether to use daylight saving time (DST)

The clock set Command

The clock set command is used to manually set the date and time. Use of the clock set command is as follows :

 pixfirewall(config)# clock set <hh:mm:ss> {<day> <month>                 <month> <day>} <year> 
Table 7.1. clock set Command Options

Option

Function

hh:mm:ss

The hour, minute, and second expressed in 24- hour format. For example, 13:10:11 is used for 1:10 p.m.

name_of_month

Using the first three characters of the month. For example, you'd use aug for August.

day

The number of the day of the month. For example, 31 would be used for the 31st day.

year

The year expressed with four characters. For example, 2003 would be used.

The following example sets the clock:

 pixfirewall(config)# clock set 13:01:11 31 aug 2003 pixfirewall(config)# pixfirewall(config)# show clock 13:01:16.920 UTC Sun Aug 31 2003 pixfirewall(config)# 

The clock timezone Command

The clock timezone command sets the time zone of your PIX firewall. The command syntax is as follows:

 pixfirewall(config)# [no] clock timezone <zone> <hours> [<minutes>] 
Table 7.2. clock timezone Command Options

Option

Function

zone

The name of the time zone, such as PST or EST. The default time zone, UTC, is also know as Greenwich Mean Time (GMT).

hours

This allows you to manually offset the hours from UTC.

minutes

This allows you to manually offset the minutes from UTC.

The following example sets the clock time zone:

 pixfirewall(config)# clock timezone PST -8 0 pixfirewall(config)# pixfirewall(config)# show clock 05:15:16.107 PST Sun Aug 31 2003 pixfirewall(config)# 

The previous example sets the time zone name to PST , with a 8 hours and 0 minutes offset from UTC time. The timezone command is used for display purposes only; the actual time in the PIX firewall is UTC time.

The clock summer-time Command

The clock timezone command set supports the DST feature, which is turned off by default. The following is the command syntax:

 pixfirewall(config)# [no] clock summer-time <zone> recurring                [<week> <weekday> <month> <hh:mm>                <week> <weekday> <month> <hh:mm>] [<offset>] pixfirewall(config)# [no] clock summer-time <zone> date {<day>                <month>  <month> <day>} <year>                <hh:mm> {<day> <month>  <month> <day>}                <year> <hh:mm> [<offset>] 

The summer-time command enables you to offset the time once by using the clock summer-time date command or to perform the offset every year with the clock summer-time recurring command.

The show clock Command

The show clock command displays the current date and time on the firewall. By using the detail option, you can display the method used to set the clock, like so:

 pixfirewall(config)# show clock [detail] 
Table 7.3. show clock Command Option

Option

Function

detail

This option displays the source of the time, either user configured or NTP.

Listing 7.1 sets the clock and then displays the clock details:

Listing 7.1 Using the clock set Command
 pixfirewall(config)# clock set 13:01:11 31 aug 2003 pixfirewall(config)# pixfirewall(config)# clock timezone PST -8 0 pixfirewall(config)# pixfirewall(config)# show clock 05:01:53.671 PST Sun Aug 31 2003 pixfirewall(config)# pixfirewall(config)# show clock detail 05:01:59.941 PST Sun Aug 31 2003 Time source is user configuration pixfirewall(config)# 

The clear clock Command

The clear clock command removes user configuration from the clock to set the display time back to UTC time zone, and it also removes any DST settings.



CSPFA Exam Cram 2 (Exam 642-521)
CCSP CSPFA Exam Cram 2 (Exam Cram 642-521)
ISBN: 0789730235
EAN: 2147483647
Year: 2003
Pages: 218

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