Protocol Package:
The main fields are interpreted as follows:
L LI (Leap indicator): The length is 2 bits, the value is "11" when the alarm state, the clock is not synchronized. NTP itself does not process for other values.
L VN (version number): 3 bits in length, the version of NTP, the current version is 3.
L Mode: Length is 3 bits, indicating the mode of operation of
Modify/etc/ntp. conf file content: add a line: serverasia. pool. ntp. orgprefer comment out this line: server127.127.1.0 start the ntp service: servicentpdstart modify the/etc/sysconfig/ntpd file, and change SYNC_HWCLOCKno to SYNC_H... modify/etc/ntp. conf file content:
Add a row:
Run the following command as an administrator in PowerShell W32tm/config/manualpeerlist:pool.ntp.org/syncfromflags:manualstop-service W32timestart-service W32Time
W32TM is the command to use. Sure, there is articles out there mentioning "net time", but you should not use that. Some other also mentions editing the registry directly, but as Microsoft mentions in the article: It's recommended th At directly edit the registry unless there are no
Tags: 1.0 technical Pictures Add Firewall boot start ODA watch tarPre-configuration: Turn off the firewall, configure the HOSTS,SSH password-free login1. Select the standard for synchronization, I am using hadoop002 (set to the current time) as the synchronization standard, hadoop003 (Time is March 2018 21, set with Date-s) and hadoop004 (March 2018 21) with which to keep in syncSee if
public static DateTime Getnetworktime (){Default Windows time ServerConst string ntpServer = "1.cn.pool.ntp.org";NTP message size-16 bytes of the digest (RFC 2030)var ntpdata = new byte[48];Setting the Leap Indicator, Version number and Mode valuesNtpdata[0] = 0x1B; LI = 0 (no warning), VN = 3 (IPv4 only), mode = 3 (Client mode)var addresses = Dns.gethostentry (ntpServer). AddressList;The UDP port number as
socket.Receive(ntpData);33 socket.Close();34 35 //Offset to get to the "Transmit Timestamp" field (time at which the reply 36 //departed the server for the client, in 64-bit timestamp format."37 const byte serverReplyTime = 40;38 39 //Get the seconds part40 ulong intPart = BitConverter.ToUInt32(ntpData, serverReplyTime);41
One. Time Synchronization serverYou can use the database server as a synchronization serverNtp.conf remains unchangedStart the serviceService NTPD StartSet NTPD service self-bootChkconfig ntpd onCheckChkconfig--list ntpdTwo. Client Configuration1. Modify the server configuration entry for the ntp.conf.Comment out any pre-defined
use the UTC clock configuration file/etc/localtime the time profile on the local side, the timezone specified in the clock will be/usr/share/zoneinfo/Copy the time profile in the/etc/localtimeCommon directives:/bin/date for the modification and display of Linux software time/sbin/hwclock is used to modify and display the BIOS
sudo nano/etc/ntp.confAnd then find
# pool.ntp.org maps to about low-stratum NTP servers. Your Server would# Pick a different set every time it starts up. Please consider joining the# Pool: Server 0.debain.pool.ntp.org IburstServer 1.debain.pool.ntp.org IburstServer 2.debain.pool.ntp.org IburstServer 3.debain.poo
A. Environment Preparationxuegod63.cn Service Sidexuegod64.cn Clienttwo. Server-side configuration:1. Installing the NTP service[[email protected] ~]# Yum install-y NTP2. turn on the NTPD service and set the boot up[[Email protected] ~]# service NTPD startStarting ntpd: [OK][Email protected] ~]# chkconfig ntpd on3. To see if the port is started[Email protected] ~]# netstat-anput| grep 123UDP 0 0
Configuration of the CentOS6.5 NTP service
The first requirements are as follows:
There are three servers, respectively: hadoop01.shiluo.com 192.168.239.133
Hadoop02.shiluo.com 192.168.239.134
Hadoop03.shiluo.com 192.168.239.135
Now to synchronize the time of the other two machines with the time of hadoop01.shiluo.com this machine, all of the following steps are
Experimental environment:
Linux CentOS 5.5 Two units
IP Address:
ntpserver:192.168.186.129
ntpclient:192.168.186.152
Test requirements:
Install the NTP server and deploy the implementation to allow the client to synchronize its practices normally. and analysis of the fault handling encountered during the implementation of the project.
Implementation process:
NtpServer-side deployments.
1, first che
There are tow pen source software related to the NTP in Linux, the first is ntpdate, the second is ntpd. you can install them as following:
Apt-Get installl NTP; Apt-Get install openntpd;
Or emerge NTP; emerge openntpd.
NtpdateCan be run manually as necessary to set the host clock, or it can be run from the host STARTUP script to set the clock at boot
NTP1. Function: Synchronization Time.2. Principle: Layered Structure.3. Software: EL6:NTP el7:chrony4.EL6 Master configuration file/etc/ntp.confrestrict 172.25.0.0 Mask 255.255.255.0--allow anyone to sync with meServer 172.25.0.10--I'm looking for someone to do synchronous special expressions127.127.1.0 represents the local system time. Synchronizes with local
Configure NTP Automatic Update timeInstalling the Ntpdate Program
shell># yum–y Install Ntpdate
Use Crontab to set the system to synchronize time with the NTP server 0:00 per dayshell># crontab–e
0 0 * * * ntpdate your_ntp_server_domain_name or YOUR_NTP_SERVER_IP_ADDR
--date= "06/18/14 14:55" (Month/day/year: minutes: seconds)The hardware clock is synchronized with the system clock:# Hwclock--hctosys or # clock--hctosys? HC represents the hardware time, SYS represents the system time, i.e. the system clock is synchronized with the hardware clocksystem clock and Hardware clock synchronization:# Hwclock--SYSTOHC or # clock--SYSTOHC? Synchronize the hardware clock with the
You need to set up a time synchronization server in the LAN to unify the system time of each client and server. On the Internet, most of the NTP servers are indeed based on Linux. search, experiment, and summary: Write an article using the w32time service that comes with win
In an Oracle 10G environment, if you want to build a cluster, you need to synchronize the clock, which requires an NTP server.1, on the timing system machine, edit/etc/ntp.confRetrict default NomodifyRestrict 127.0.0.1Server 127.127.1.0Fudge 127.127.1.0 Stratum 8Driftfile/var/lib/ntp/driftBroadcastdelay 0.008Then restart the NTPD serviceService NTPD Restart2, on
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.