The NTP server----operation of the Linux real-World Deployment series explains how to deploy a load-balanced and highly available NTP server under a simple architecture. Next, we need to understand the maintenance of the technology, so as to better escort the company's business AH.
NTP server maintenance is divided in
NTP client, if successful, prove to be a firewall problem and need to change the iptables settings.OrBecause the NTP service needs to use UDP port number 123, UDP port number 123 must be open when the system's Firewall (Iptables) is started. (Open 123 port) [[email protected] ~]#/sbin/iptables-i input-p UDP--dport 123-j ACCEPTCheck that the
system time vs. BIOS difference
View NTPD process Status Press Ctrl + C to stopWatch ' Ntpq-p '
Every 2.0s:ntpq-p Wed Mar 1 17:50:18 2017Remote refID St T when poll reach delay offset jitter==============================================================================+marla.ludost.ne 131.188.3.220 2 U 872 1024 177 214.437 24.742 6.540*85.199.214.101. Gps. 1 u 11 64 377 216.950 0.123 5.755+188-39-37-91.st. Gps. 1 u 15 64 355 231.056-0.961 19.068-BIISONI.MIUKU.N 207.224.49.2
This experiment uses 2 Rhel 6.3, of which 192.168.1.131 is the service side; 192.168.1.132 is the client. Server-side configuration allows only 192.168.1.0 network segments to connect to servers for time synchronization1. Install the NTP service (client and server side)# yum-y Install ntp# Rpm-qa | grep ntpfontpackages
restrict127.0.0.1The bottom two is the default value, releasing the native source restrict-6::1Restrict192.168.100.0Mask255.255.255.0Nomodify release local Area network user sources, or list individual ip#2. Set the host source, please first the original [0|1|2].centos.pool.ntp.org Settings commented out: Server220.130.158.71Prefer take this host as the top priority Serverserver59.124.196.83Server59.124.196.84# 3The default internal clock data is used to serve LAN users when there is no externa
, but does not allow the client to modify, log on to my NTP server allow time synchronization for any IP (this item cannot be duplicated with its default option)Restrict default nomodify Add an intranet address# Hosts on local network is less restricted.#restrict 192.168.1.0 Mask 255.255.255.0 nomodify notrapRestrict 192.168.10.0 mask 255.255.255.0 nomodify notrap3. Set up sync Update local HwclockIn
3. View the status of NTP server and upper NTP
# ntpq-p
remote refid St T when poll reach delay offset jitter
============================= =================================================
news.neu.edu.cn. INIT. U - 0 0.000 0.000 0.000
x202.118.1.130 202.118.1.47 2 U 7 377 153.659 9.605 19.941
*time4.aliyun.co 10.137.38.86 2 U 377 39.666- 47.661 15.944
Remote
次. Set to 0 is the top level, if you want to update the time to another NTP server, do not set it to 0; #参数说明: #ignore: Turn off all NTP Online Services ; #nomodify: The client cannot change the time parameters on the service side. However, the client can perform network; through the server.#notrust : Unless authentica
Linux distributions provide a default configuration pointing to the time server they maintain. For example, the following is a Fedora Configuration:
[Time]# NTP =# FallbackNTP = 0.fedora.pool.ntp.org 1.fedora.pool.ntp.org
You can enter other time servers you want to use, such as your local NTP serverNTP=Enter a list of servers separated by spaces on the line. (D
1, start--> run input gpedit.msc
2, Computer Configuration--> Management Template--> system-->windows Time service--> time provider--> Right click Configure window NTP client to select Properties. A, select Enabled B, and enter the time synchronization server's address in the NTP server corresponding field. C, Tpye field selection
) Modify the/etc/sysconfig/ntpd file with the following contents:#允许BIOS与系统时间同步, you can also use the HWCLOCK-W commandSync_hwclock=yes4) After the configuration has completed and restarted the service, you can use the Ntpstat command to display the local synchronization time with the upper NTP server, or to view the native and upper NTP server communication situation using NTPQ-P2.4 Graphical Interface Con
Ntp server in Linux 1. what is ntp? NetworkTimeProtocol (Network Time Protocol) is a protocol used to synchronize the computer's time. it can synchronize the computer's server or clock source, it provides high-precision time correction. 2. Introduction to the ntp configuration file 1. main configuration files of/etc/
========================================================== ==============================================210.72.145.44. INIT. 16 u-64 0 0.000 0.000218.21.130.42. INIT. 16 u-64 0 0.000 0.000 0.000125.62.193.121. INIT. 16 u-64 0 0.000 0.000 0.00082.200.209.194. INIT. 16 u-64 0 0.000 0.000 0.000218.189.210.4. INIT. 16 u-64 0 0.000 0.000 0.000
Ntptrace # It can be used to track the time correspondence between a Time ServerNtpdate IP # The client must sync
The Linux Combat Deployment series of NTP server----theory to introduce the concept of time and the principles of NTP, this blog will bring you to deploy a production environment to achieve simple load balancing and highly available NTP server.
Simple architecture Diagram:
Environment:
CentOS6.4 x86_64
Ntp server in Linux
1. What is ntp?
Network Time Protocol (NTP) is a Protocol used to synchronize the computer's Time. It can synchronize the computer's server or clock source, it provides high-precision time correction.
2. Introduction to the ntp configuration file
1./etc/
11Time correct to within 7948 MSPolling server every SBecause it is the intranet, the general Ntpstat can be synchronized quickly.OK, after the native Client configuration is complete, use the SCP copy/etc/ntp.conf to other client machines that need to be synchronized, and start the NTPD service.The operation configuration on other client machines is as follows:
In Centos6.3, the ntp time server-linux Enterprise Application-Linux server application information is implemented. For more information, see the following section. Network Time Protocol (NTP) is a standard Internet Protocol used for Time synchronization on the Internet. NTP
218.21.130.42 server 0.asia.pool.ntp.org server 1.asia.pool.ntp.org server 2. asia.pool.ntp.orgThe time spent #记录上次的NTP server joins the upper NTP serverDriftfile/etc/ntp/drift#设置默认策略为允许任何主机进行时间同步Restrict default Ignore#设置允许访问此时间服务器的时间服务的IP地址#根据自己实际情况配置Restrict 127.0.0.1 Restrict 192.168.10.2# Specifies a machine time synchronization restrict 192.168.0.0 mask 25
The/etc/linux ntp.conf system-config-date network Time Protocol (Linux NTP, web-hour protocol) is used to synchronize all of its client clock services. The Linux NTP server synchronizes the clock of the local system with a common
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.