Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagetext
vyatta@R1# set system domain-search domain mydomain.com
vyatta@R1# set system domain-search domain mydomain.net
vyatta@R1# set system domain-search domain mydomain.org
vyatta@R1# compare
[edit system]
+domain-search {
+       domain mydomain.com
+       domain mydomain.net
+       domain mydomain.org
+}
vyatta@R1# commit comment "setting DNS domain-search"
vyatta@R1# exit

Configuring date and time

Date and time can be either set manually or obtained by manually or automatically synchronizing the system with one or more Network Time Protocol (NTP) servers. The time zone must be manually set and may be specified as an offset from Universal Coordinated Time (UTC) or as one of a number of supported literal time zones.

In this section, sample configurations are presented for maintaining date and time information. The following figure shows the sample date and time information.

Image Added

Setting the date

The following table shows how to manually set the date to 1:15 PM exactly on April 24, 2007. The format is MMDDhhmmCCYY. Alternate formats are MMDDhhmm, MMDDhhmmYY, and MMDDhhmmCCYY.ss.

To manually set the date, perform the following steps in operational mode.

vyatta@R1:~$ set date 042413152007

Manually synchronizing with an NTP server

The following example shows how to manually synchronize the system clock with the NTP server at 172.16.0.42.

Note that this action performs just a one-time synchronization. It does not set up an ongoing association with the NTP server. For information about setting up automatic synchronization see below.

To perform a one-time synchronization with an NTP server, perform the following steps in operational mode.

vyatta@R1:~$ set date ntp 172.16.0.42

Setting the time zone

The time zone must be set by using the system time-zone command. To set the time zone, you specify the region and location (specified as Region/Location) that best defines your time zone. For example, specifying US/Pacific sets the time zone to US Pacific time. Command completion (that is, the <Tab> key) can be used to list available time zones. The adjustment for daylight time takes place automatically based on the time of year.

The following example shows how to set the time zone to Pacific time.

To set the time zone, perform the following steps in configuration mode.

vyatta@R1# set system time-zone US/Pacific

Using NTP for automatic synchronization

To use NTP for automatic synchronization, you must create associations with the NTP servers. To create an association with an NTP server, use the system ntp server command and specify the IP address of the server.

The following example shows how to configure two NTP servers: one at 172.16.0.42 and one at 10.10.40.42. To specify NTP servers, perform the following steps in configuration mode.

vyatta@R1# set system ntp server 172.16.0.42
vyatta@R1# set system ntp server 10.10.40.42