免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2292 | 回复: 0
打印 上一主题 下一主题

Configure a ntp client or ntp server [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-04-03 10:52 |只看该作者 |倒序浏览

                                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
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP