- 论坛徽章:
- 0
|
1.How to act as a ntp client
hosta# cd /etc/inet
hosta# cp ntp.client ntp.conf
- Edit the ntp.conf as follows:
bash-3.00# more ntp.conf
# xntpd configuration file for a system operating in client mode
#
driftfile /var/ntp/ntp.drift
statsdir /var/ntp/ntpstats
server 192.168.103.200
- start the ntp clinet
for solaris 8/9
hosta# /etc/init.d/xntpd start
for solaris 10
bash-3.00# svcs|grep ntp
online Jan_03 svc:/network/ntp:default
bash-3.00# svcadm enable ntp
2.How to as a ntp server:
- Configure hostb as a NTP server
hostb# cd /etc/inet
hostb# cp ntp.server ntp.conf
hostb# vi ntp.conf
...
server 127.127.1.0 prefer
#fudge 127.127.XType. 0 stratum 0
...
hostb# touch /var/ntp/ntp.drift
- Verify NTP start, and hostb will broadcast as the NTP server automatically.
hostb# /etc/init.d/xntpd start
hostb# ps -ef |grep ntp
root 353 1 0 10: 39: 41 ? 0: 00 /usr/lib/inet/xntpd
3.- You can see interaction between NTP server and client:
hosta# /usr/sbin/snoop |grep -i ntp
Using device /dev/hme (promiscuous mode)
hostb ->; 224. 0.1. 1 NTP broadcast (Fri Jan 3 10: 43: 59 2003)
hostb ->; 224. 0.1. 1 NTP broadcast (Fri Jan 3 10: 45: 03 2003)
hostb ->; 224. 0.1. 1 NTP broadcast (Fri Jan 3 10: 46: 07 2003)
hostb ->; 224. 0.1. 1 NTP broadcast (Fri Jan 3 10: 47: 11 2003)
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/832/showart_270051.html |
|