How To Configure A Basic NTP Server - Client Using NTPD
How To Configure A Basic NTP Server - Client Using NTPD
com/solutions/412843
Products & Services Knowledgebase How to configure a basic NTP server/client using ntpd
Environment
• Red Hat Enterprise Linux (RHEL) 4
• Red Hat Enterprise Linux 5
• Red Hat Enterprise Linux 6
• Red Hat Enterprise Linux 7
• ntp
Issue
• Need to implement basic NTP (Network Time Protocol) timekeeping on my network.
Resolution
1 of 6 5/5/23, 14:01
How to configure a basic NTP server/client using ntpd -... https://access.redhat.com/solutions/412843
driftfile /var/lib/ntp/drift
includefile /etc/ntp/crypto/pw
# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography.
keys /etc/ntp/keys
2 of 6 5/5/23, 14:01
How to configure a basic NTP server/client using ntpd -... https://access.redhat.com/solutions/412843
*Note: [0-3].rhel.pool.ntp.org are public NTP servers from the NTP Pool Project.
• Start the ntpd service and enable ntpd at system start (RHEL 4, 5, and 6):
• Start the ntpd service and enable ntpd at system start (RHEL 7):
Disclaimer: Links contained herein to external website(s) are provided for convenience only.
Red Hat has not reviewed the links and is not responsible for the content or its availability. The
inclusion of any link to an external website does not imply endorsement by Red Hat of the
website or their entities, products or services. You agree that Red Hat is not responsible or
liable for any loss or expenses that may result due to your use of (or reliance on) the external
site or content.
3 of 6 5/5/23, 14:01
How to configure a basic NTP server/client using ntpd -... https://access.redhat.com/solutions/412843
• Start the ntpd service and enable ntpd at system start (RHEL 4, 5, and 6):
• Start the ntpd service and enable ntpd at system start(RHEL 7):
• For more details about ntpd, please see Chapter 19, Configuring NTP using ntpd
Root Cause
• Accurate time keeping is important for a number of reasons in IT.
• In networking for example, accurate time stamps in packets and logs are required. Logs
are used to investigate service and security issues and so time stamps made on
different systems must be made by synchronized clocks to be of real value.
• As systems and networks become increasingly faster, there is a corresponding need for
clocks with greater accuracy and resolution.
• In some countries there are legal obligations to keep accurately synchronized clocks.
• NTP (Network Time Protocol) is implemented by a daemon running in user space.
• The default NTP user space daemon in Red Hat Enterprise Linux 7 is chronyd. It must
be disabled if you want to use the ntpd daemon.
• See Chapter 18, Configuring NTP using the chrony suite for information on chrony.
Diagnostic Steps
4 of 6 5/5/23, 14:01
How to configure a basic NTP server/client using ntpd -... https://access.redhat.com/solutions/412843
ntpq> as
ntpq> rv 28126
associd=28126 status=963a conf, reach, sel_sys.peer, 3 events, sys_peer,
srcadr=myntp.server.com, srcport=123, dstadr=192.168.122.34, dstport=123,
leap=00, stratum=1, precision=-24, rootdelay=0.000, rootdisp=0.992,
refid=pool.ntp.org, reftime=e4e9fb1c.2cad2882 Mon, Sep 13 2021 13:30:20.174,
rec=e4e9fb1d.2dbcd83a Mon, Sep 13 2021 13:30:21.178, reach=377,
unreach=0, hmode=3, pmode=4, hpoll=7, ppoll=7, headway=0, flash=00 ok,
keyid=0, offset=9.491, delay=36.960, dispersion=6.009, jitter=4.053,
xleave=0.029,
filtdelay= 42.57 37.37 38.49 41.87 37.46 59.08 36.96 38.93,
filtoffset= 12.22 10.28 10.09 9.19 10.07 19.67 9.49 11.11,
filtdisp= 0.00 2.06 4.11 5.15 6.15 7.14 8.15 9.17
ntpq> quit
This solution is part of Red Hat’s fast-track publication program, providing a huge library of
solutions that Red Hat engineers have created while supporting our customers. To give you
the knowledge you need the instant it becomes available, these articles may be presented in
a raw and unedited form.
5 of 6 5/5/23, 14:01
How to configure a basic NTP server/client using ntpd -... https://access.redhat.com/solutions/412843
Daniel Sichel
≤ Reply
6 of 6 5/5/23, 14:01