免费注册 查看新帖 |

Chinaunix

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

time server and client config(大家参考下) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-03-13 12:45 |只看该作者 |倒序浏览
大家参考下~~我想知道跨越平台的时间怎么做~~以nt做server  sun为客户端!!下面是sun自己的timesercer and client


a. Configuring NTP Client

- Example: NTP client is s8a
- NTP Client synchronize with an NTP Server

- Verify s8a IP address:
s8a# ifconfig -a
lo0: flags= 1000849< UP, LOOPBACK, RUNNING, MULTICAST, IPv4>; mtu 8232 index 1
        inet 127.0. 0.1 netmask ff000000
hme0: flags= 1000843< UP, BROADCAST, RUNNING, MULTICAST, IPv4>; mtu 1500 index 2
        inet 10.1.1.8 netmask ffffff00 broadcast 10.1.1.255
        ether 8: 0: 20: 82: 45: 34

- Configure s8a as NTP client:
s8a# cd /etc/inet
s8a# cp ntp.client ntp.conf
s8a# /etc/init.d/xntpd start

- Verify NTP start, and s8a will broadcast to find the NTP server automatically.
s8a# pgrep -lf ntp
398 /usr/sbin/ntpdate -s -w -m 224. 0.1. 1
397 /sbin/sh/etc/init.d/xntpd start

b.  If you like, you can configure a NTP server to test ntp client
- Example, NTP server s9a

- Verify s9a IP address:
s9a# ifconfig -a lo0: flags= 1000849< UP, LOOPBACK, RUNNING, MULTICAST, IPv4>;
mtu 8232 index 1
inet 127.0. 0.1 netmask ff000000
hme0: flags= 1000843< UP, BROADCAST, RUNNING, MULTICAST, IPv4>; mtu 1500 index 2
inet 10.1.1.9 netmask ffffff00 broadcast 10.1.1.255
ether 8: 0: 20: 92: 30: ef

- Configure s9a as a NTP server
s9a# cd /etc/inet
s9a# cp ntp.server ntp.conf
s9a# vi ntp.conf
...
server 127.127.1.0 prefer
#fudge 127.127.XType. 0 stratum 0
...
s9a# touch /var/ntp/ntp.drift

- Verify NTP start, and s9a will broadcast as the NTP server automatically.
s9a# /etc/init.d/xntpd start
s9a# ps -ef |grep ntp
   root 353 1 0 10: 39: 41 ? 0: 00 /usr/lib/inet/xntpd

c. You can see interaction between NTP server and client:
s8a# /usr/sbin/snoop |grep -i ntp
Using device /dev/hme (promiscuous mode)
s9a ->; 224. 0.1. 1 NTP broadcast (Fri Jan 3 10: 43: 59 2003)
s9a ->; 224. 0.1. 1 NTP broadcast (Fri Jan 3 10: 45: 03 2003)
s9a ->; 224. 0.1. 1 NTP broadcast (Fri Jan 3 10: 46: 07 2003)
s9a ->; 224. 0.1. 1 NTP broadcast (Fri Jan 3 10: 47: 11 2003)
s8a ->; 224. 0.1. 1 NTP client (Fri Jan 3 10: 45: 25 2003)
s8a ->; 224. 0.1. 1 NTP client (Fri Jan 3 10: 45: 26 2003)
s8a ->; 224. 0.1. 1 NTP client (Fri Jan 3 10: 45: 27 2003)
s8a ->; 224. 0.1. 1 NTP client (Fri Jan 3 10: 45: 28 2003)
s9a ->; 224. 0.1. 1 NTP broadcast (Fri Jan 3 10: 48: 15 2003)
s8a ->; s9a NTP client (Fri Jan 3 10: 46: 26 2003)
s9a ->; s8a NTP server (Fri Jan 3 10: 48: 15 2003)
s8a ->; s9a NTP client (Fri Jan 3 10: 46: 26 2003)
s9a ->; s8a NTP server (Fri Jan 3 10: 48: 15 2003)
s8a ->; s9a NTP client (Fri Jan 3 10: 46: 26 2003)
s9a ->; s8a NTP server (Fri Jan 3 10: 48: 15 2003)
s8a ->; s9a NTP client (Fri Jan 3 10: 46: 26 2003)
s9a ->; s8a NTP server (Fri Jan 3 10: 48: 15 2003)
s9a ->; 224. 0.1. 1 NTP broadcast (Fri Jan 3 10: 49: 19 2003)
s8a ->; s9a NTP client (Fri Jan 3 10: 49: 50 2003)
s9a ->; s8a NTP server (Fri Jan 3 10: 49: 50 2003)
s9a ->; 224. 0.1. 1 NTP broadcast (Fri Jan 3 10: 50: 23 2003)
s8a ->; s9a NTP client (Fri Jan 3 10: 50: 54 2003)
s9a ->; s8a NTP server (Fri Jan 3 10: 50: 54 2003)

论坛徽章:
0
2 [报告]
发表于 2003-03-13 14:55 |只看该作者

time server and client config(大家参考下)

在google上面搜到的,不知道管不管用,管用就说一声
http://www.winguides.com/registry/display.php/1117/


Enable NTP Time Server (Windows 2000/XP)

This tweak can be easily applied using WinGuides Tweak Manager. Download Now!
This setting is used to enable the local machine to act as a Network Time Protocol (NTP) server. When enabled other machines can synchronise their clocks with this machine.

Open your registry and find or create the key below.

Create a new DWORD value, or modify the existing value, called "LocalNTP" and set it according to the value data below.

Exit your registry, you may need to restart or log out of Windows for the change to take effect.





     
  (Default) REG_SZ (value not set)  
  LocalNTP REG_DWORD 0x00000001 (1)  

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time...  



Registry Settings
System Key: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters]
Value Name: LocalNTP
Data Type: REG_DWORD (DWORD Value)
Value Data: (0 = disabled, 1 = enabled)


Disclaimer: Modifying the registry can cause serious problems that may require you to reinstall your operating system. We cannot guarantee that problems resulting from modifications to the registry can be solved. Use the information provided at your own risk.


Last Modified: July 19, 2002

论坛徽章:
0
3 [报告]
发表于 2003-03-13 15:04 |只看该作者

time server and client config(大家参考下)

另外,Windows NT/2k/XP做时间客户端也相当简单
net time /setsntp.x.x.x
net stop w32time
net start w32time

论坛徽章:
0
4 [报告]
发表于 2003-03-13 15:27 |只看该作者

time server and client config(大家参考下)

windowsnt   你理解错了~~我的意思是说~~我要以nt做server不是以nt做client~~

论坛徽章:
0
5 [报告]
发表于 2003-03-13 15:27 |只看该作者

time server and client config(大家参考下)

windowsnt   你理解错了~~我的意思是说~~我要以nt做server不是以nt做client~~

论坛徽章:
0
6 [报告]
发表于 2003-03-13 15:30 |只看该作者

time server and client config(大家参考下)

windowsnt   你理解错了~~我的意思是说~~我要以nt做server不是以nt做client~~

论坛徽章:
0
7 [报告]
发表于 2003-03-13 18:02 |只看该作者

time server and client config(大家参考下)

上面一篇是说用NT作Server,下面一篇是用NT作client

论坛徽章:
0
8 [报告]
发表于 2003-03-13 18:03 |只看该作者

time server and client config(大家参考下)

不知道你是真没看懂还是假没看懂

论坛徽章:
0
9 [报告]
发表于 2003-03-13 19:00 |只看该作者

time server and client config(大家参考下)

?路过
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP