Configuring the System Time
Configuring the System Time
This topic describes how to configure the system time, time zone, time stamp, NTP (Network Time Protocol), and start/end time of the daylight saving time (DST) of the MA5600T/MA5603T/MA5608T to ensure that they are consistent with those in the actual condition.
Procedure
Step 1 Configure the system time.
Run the display time command to query the current system time. If the system time is consistent with the local standard time, you need not change it. If the system time is inconsistent with the local standard time, run the time command to change the system time.
Step 2 Configure the system time zone.
Run the display timezone command to query the current system time zone. If the system time zone is consistent with the local standard time zone, you need not change it. If the system time zone is inconsistent with the local standard time zone, run the timezone command to change the system time zone.
NOTE
– The system time zone include the eastern time zone and the western time zone. “GMT+” indicates the eastern time zone, that is, the local time is ahead of the Greenwich time. “GMT-” indicates the western time zone, that is, the local time is behind the Greenwich time.
– By default, the system time zone is GMT+8:00.
Step 3 Configure the system time stamp.
Run the display time time-stamp command to query the time stamp between the NMS and the
NE, namely the displayed time format of the SNMP interface. If the system time stamp is
consistent with the actual data plan, you need not change it. If the system time stamp is
inconsistent with the actual data plan, run the time time-stamp command to change the system
time stamp.
NOTE
The time type of the SNMP interface between the NMS and the NE are categorized as UTC time and NE local time. By default, the time type is the NE local time.
Step 4 Configure NTP to ensure that the clock of all devices in the network is the same.
– (Optional) Run the ntp-service refclock-master command to configure the NTP master clock.
– Run the ntp-service unicast-server command to configure the NTP unicast server mode, and specify the IP address of the remote server that functions as the local time server and the interface for transmitting and receiving NTP packets.
– The NTP protocol supports the client/server, peer, broadcast, and multicast working modes. The following uses the client/server mode as an example.
– The L3 interface and the interface IP address must be available for the client and the server to communicate with each other.
– In the client/server mode, you need to configure only the client and the NTP master clock of the server.
– In the client/server mode, the client is synchronized to the server but the server will not be synchronized to the client.
– The clock stratum of the synchronizing device must be smaller than that of the synchronized device. Otherwise, the clock synchronization fails.
– The device that runs the NTP protocol can be synchronized to other clock sources or function as the clock source for synchronizing other clocks. In addition, this device and other devices can be set to synchronized from each other. When the device works in the client mode, you need not set the system time and the device is automatically synchronized to the remote server.
Step 5 Configure the start/end time of the DST.
Run the display time dst command to query the current start/end time of the DST of the system. If the start/end time of the DST is consistent with the actual start/end time of the DST, you need not change it. If the start/end time of the DST is inconsistent with the actual start/end time of the DST, run the time dst command to change the start/end time of the DST.
Example
To set the time stamp between the NMS and the NE to use the UTC time, do as follows:
huawei#time time-stamp
{ local|utc }:utc
Command: time time-stamp utc
Assume that the current time zone of MA5600T/MA5603T/MA5608T A is GMT+7:00, the device uses the network clock to adjust the time, and VLAN interface 2 is used to sent a clock synchronization request packet to MA5600T/MA5603T/MA5608T B (the IP address is 10.20.20.20/24 and the device works at layer 4) that functions as the NTP server. The start time is 00:00:00 on May 1, the end time is 00:00:00 on September 30, and the adjust time is 1:00. That is, if the local time is 5:00, the time is adjusted to 6:00. To set the DST, do as follows:
huawei(config)A#timezone GMT+ 7:00
huawei(config)B#ntp-service refclock-master 4
huawei(config)A#ntp-service unicast-server 10.20.20.20 source-interface vlanif 2
huawei(config)A#time dst start 5-1 00:00:00 end 9-30 00:00:00 adjust 1:00
Assume that the current time zone of MA5600T/MA5603T/MA5608T A is GMT- 4:00, the local time is used, the current time is 2010-01-01 12:10:10. The start time is 00:00:00 on May 1, the end time is 00:00:00 on September 30, and the adjust time is 2:00. That is, if the local time is 5:00, the time is adjusted to 7:00. To set the DST, do as follows:
huawei(config)A#timezone GMT- 4:00
huawei(config)A#time 2010-01-01 12:10:10
huawei(config)A#time dst start 5-1 00:00:00 end 9-30 00:00:00 adjust 2:00