NTP服务器和客户端的设置及使用(EN版)
# broadcast/multicast address named in the command # # key Indicates that all packets sent to the # address are to include authentication fields, # encrypted using the specified key number. The # range of this number is that of an unsigned # 32 bit integer. By default, an encryption
# field is not included. # version Specifies the version number to be used for # outgoing NTP packets. Versions 1, 2, and 3 # are the choices; version 3 is the default. # prefer Marks the host as a preferred host. This # host will be preferred for synchronization # over other comparable hosts. # for complete listing see man page on xntpd
Sample ntp.conf file for an NTP primary stratum 1 server:
server 127.127.5.0 fudge 127.127.5.0 stratum 1
Sample ntp.conf file for an NTP server in peer mode:
peer ntppeerserver
Sample ntp.conf file for an NTP server in server mode: (Note: its
recommended
to have a minimum of 3 server entries, even more preferable is 5)
server sometimeserver
server sometimeserver server sometimeserver server sometimeserver
server sometimeserver
We can always fall back to the local clock:
server 127.127.1.0 fudge 127.127.1.0 stratum 9
Once you have created your ntp.conf file, save it and start the
xntpd daemon.
# /usr/lib/inet/xntpd &
you can specify different options for the daemon to run as:
-a Run in "authenticate" mode
-b Listen for broadcast NTP and sync to this if available |