NTP Configuration Procedure
NTP Configuration Procedure
# cp /etc/inet/ntp.server /etc/inet/ntp.conf
3 Open the /etc/inet/ntp.conf file for editing, and change the server IP address to
127.127.1.0, where the number 1 represents the undisciplined local clock.
# vi /etc/inet/ntp.conf
Change:
server 127.127.XType.0
fudge 127.127.XType.0 stratum 0
to:
server 127.127.1.0
fudge 127.127.1.0 stratum 2
#keys /etc/inet/ntp.keys
#trustedkey 0
#requestkey 0
#controlkey 0
Note: Choices for XType are listed in the comments of the /etc/inet/ntp.server file.
4- Create a drift file as specified by the driftfile /var/ntp/ntp.drift entry in the
/etc/inet/ntp.conf file.
# touch /var/ntp/ntp.drift
Note: The xntpd daemon creates the contents of the drift file dynamically.
4 Verify that the file exists.
# ls -al /var/ntp/ntp.drift
5 -rw-r–r– 1 root root 0 Aug 16 11:06 /var/ntp/ntp.drift
6 Start the NTP daemon for Solaris 9
#/etc/init.d/xntpd stop
#/etc/init.d/xntpd start
Start the NTP daemon for Solaris 10
#svcadm -v disable svc:/network/ntp
# svcadm -v enable svc:/network/ntp
7 Verify that the NTP daemon is running.
Ps –ef | grep xntpd
or
# pgrep -lf ntp
10- Use the snoop utility to view NTP server multicast advertisements.
# snoop | grep -i ntp
Using device /dev/hme (promiscuous mode)
sys11 -> 224.0.1.1 NTP broadcast [st=1] (2004-08-16 11:11:52.98017)
sys11 -> 224.0.1.1 NTP broadcast [st=1] (2004-08-16 11:12:56.98017)
sys11 -> 224.0.1.1 NTP broadcast [st=1] (2004-08-16 11:14:00.98016)
sys11 -> 224.0.1.1 NTP broadcast [st=1] (2004-08-16 11:15:04.98016)
…
By default, all NTP messages are sent to the syslog facility.
The ntpq utility is the standard NTP query program. Use the ntpq utility to identify NTP peers on
the network. For example:
# ntpq -p
remote refid st t when poll reach delay offset disp
=====================================================================
*instructor .LCL. 1 u 29 64 377 0.69 0.000 0.06
224.0.1.1 0.0.0.0 16 - - 64 0 0.00 0.000 16000.0
To view the logged information in pseudo real-time, use the tail command with the follow (-f)
option. For example:
# tail -f /var/adm/messages
Aug 16 14:25:37 sys11 xntpd[1614]: [ID 450285 daemon.error] 0 makes a poor control keyid
………..
………..
NTP Configuration on Client
8 Login as root user
# cp /etc/inet/ntp.client /etc/inet/ntp.conf
10 Open the /etc/inet/ntp.conf file for editing, and Insert server IP address (NTP
server) and comment out multicastclient 224.0.1.1 line.
# vi /etc/inet/ntp.conf
#multicastclient 224.0.1.1
server 192.168.1.82
---------
To view the logged information in pseudo real-time, use the tail command with the follow (-f)
option. For example:
# tail -f /var/adm/messages
Aug 16 14:25:37 sys11 xntpd[1614]: [ID 450285 daemon.error] 0 makes a poor control keyid
………..
………..
# cp /etc/inet/ntp.server /etc/inet/ntp.conf
15 Open the /etc/inet/ntp.conf file for editing, and Insert server IP address (NTP
server)
16
# vi /etc/inet/ntp.conf
server 192.168.1.113
#server 127.127.1.0 prefer
fudge 192.168.1.113 stratum 2
driftfile /var/ntp/ntp.drift
Note: The xntpd daemon creates the contents of the drift file dynamically.
18 Verify that the file exists.
# ls -al /var/ntp/ntp.drift
-rw-r–r– 1 root root 0 Aug 16 11:06 /var/ntp/ntp.drift
19 Start the NTP daemon for Solaris 9
#/etc/init.d/xntpd stop
#/etc/init.d/xntpd start
Start the NTP daemon for Solaris 10
#svcadm -v disable svc:/network/ntp
# svcadm -v enable svc:/network/ntp
20 Verify that the NTP daemon is running.
Ps –ef | grep xntpd
or
# pgrep -lf ntp
The ntpq utility is the standard NTP query program. Use the ntpq utility to identify NTP peers on
the network.
# ntpq -p
---------
To view the logged information in pseudo real-time, use the tail command with the follow (-f)
option. For example:
# tail -f /var/adm/messages
Aug 16 14:25:37 sys11 xntpd[1614]: [ID 450285 daemon.error] 0 makes a poor control keyid
………..