Build an NTP server in Ubuntu

Source: Internet
Author: User
Preface a time error occurred on a self-managed Ubuntu server, which caused a problem in the display time of mail sending, here, we will take the time to record the process of building an ntp server. The Network Time Protocol (NetworkTimeProcotol) aims to transmit unified and standard time on the Internet. The specific implementation scheme is to specify several clock source websites on the network to provide time service for users, and these websites should be able to compare with each other to improve accuracy. NTP is

Preface

A time error occurred on a self-managed Ubuntu server, which caused a problem in the display time of email sending. Therefore, it is difficult to think about how to set up an ntp server.

Introduction

Network Time Procotol (NTP) is used to transmit unified and standard Time on the Internet. The specific implementation scheme is to specify several clock source websites on the network to provide time service for users, and these websites should be able to compare with each other to improve accuracy.

NTP is a complex synchronization time protocol that spans a wide area network or a LAN. It generally provides millisecond-level precision. RFC2030 describes SNTP (Simple Network Time Protocol) for hosts that do not require complete NTP for complexity. It is a subset of NTP. Generally, several hosts on the LAN synchronize the clock with other NTP hosts over the Internet, and then provide the time synchronization service to other clients in the LAN.

The NTP protocol is a high-level protocol of the OSI reference model. It complies with the UDP transmission protocol format and has a dedicated port of 123.

Over time, computer clock tends to drift. Network Time Protocol (NTP) is a way to ensure that your clock remains accurate. It provides a time synchronization mechanism between routers, switches, workstation and servers. NTP Server is often used in IT system environments with time synchronization requirements.

Server Configuration

Install

Sudo apt-get install ntp

Configuration

Configuration File Location

Sudo/etc/ntp. conf

Configuration method

The upper-layer NTP server is set using the server. The upper-layer NTP server is set as follows:

Server [ip or hostname] [PREFER]

Parameter description:

Ip or hostname: ip address or domain name of the ntp server

Prefer: indicates the host with priority.

Driftfile: record time difference. Because the preset NTP Server's Time calculation is based on the BIOS chip fluctuation cycle frequency, but this value is different from the upper-layer Time Server. So the NTP daemon will automatically calculate the frequency of our host and the upper-layer Time Server, and record the error of the two frequencies, the recorded file is the complete file name followed by driftfile.

Common time servers

Http://www.pool.ntp.org/zone/cn

Configuration File example

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.