ESXi时间同步测试与Windows搭建的NTPserver无法同步的原因.docx

上传人:b****6 文档编号:16143335 上传时间:2023-07-10 格式:DOCX 页数:15 大小:1.10MB
下载 相关 举报
ESXi时间同步测试与Windows搭建的NTPserver无法同步的原因.docx_第1页
第1页 / 共15页
ESXi时间同步测试与Windows搭建的NTPserver无法同步的原因.docx_第2页
第2页 / 共15页
ESXi时间同步测试与Windows搭建的NTPserver无法同步的原因.docx_第3页
第3页 / 共15页
ESXi时间同步测试与Windows搭建的NTPserver无法同步的原因.docx_第4页
第4页 / 共15页
ESXi时间同步测试与Windows搭建的NTPserver无法同步的原因.docx_第5页
第5页 / 共15页
ESXi时间同步测试与Windows搭建的NTPserver无法同步的原因.docx_第6页
第6页 / 共15页
ESXi时间同步测试与Windows搭建的NTPserver无法同步的原因.docx_第7页
第7页 / 共15页
ESXi时间同步测试与Windows搭建的NTPserver无法同步的原因.docx_第8页
第8页 / 共15页
ESXi时间同步测试与Windows搭建的NTPserver无法同步的原因.docx_第9页
第9页 / 共15页
ESXi时间同步测试与Windows搭建的NTPserver无法同步的原因.docx_第10页
第10页 / 共15页
ESXi时间同步测试与Windows搭建的NTPserver无法同步的原因.docx_第11页
第11页 / 共15页
ESXi时间同步测试与Windows搭建的NTPserver无法同步的原因.docx_第12页
第12页 / 共15页
ESXi时间同步测试与Windows搭建的NTPserver无法同步的原因.docx_第13页
第13页 / 共15页
ESXi时间同步测试与Windows搭建的NTPserver无法同步的原因.docx_第14页
第14页 / 共15页
ESXi时间同步测试与Windows搭建的NTPserver无法同步的原因.docx_第15页
第15页 / 共15页
亲,该文档总共15页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

ESXi时间同步测试与Windows搭建的NTPserver无法同步的原因.docx

《ESXi时间同步测试与Windows搭建的NTPserver无法同步的原因.docx》由会员分享,可在线阅读,更多相关《ESXi时间同步测试与Windows搭建的NTPserver无法同步的原因.docx(15页珍藏版)》请在冰点文库上搜索。

ESXi时间同步测试与Windows搭建的NTPserver无法同步的原因.docx

ESXi时间同步测试与Windows搭建的NTPserver无法同步的原因

ESXi与NTP服务器同步的抓包测试

问题:

ESXi配置NTP时间同步时,当指向由Windows系统搭建的NTP服务器时,无法实现同步,而指向由Linux系统搭建的NTP服务器时,则可以实现同步。

为查找问题根源,专门搭建了测试环境,进行抓包分析,研究其中发生的过程。

测试环境:

序号

名称

IPAddress

系统版本

作用

1

ESXiServer

192.168.131.222

ESXi5.0

ESXi服务器,作为NTP客户端

2

Router

192.168.131.119

192.168.130.119

Windows2003

配置了路由功能,并安装抓包工具

3

NTPServer1

192.168.130.3

Windows2003

搭建NTP服务器

4

NTPServer2

192.168.130.4

Rhel5.5

搭建NTP服务器

拓扑图:

测试ESXi使用Windows2003搭建NTP的服务器

按照VMware提供KB的建议,0970354356

1.配置Windows2003,搭建NTP客户端

修改注册表,步骤如下:

1.EnableNTPmode:

LocateHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters

SettheTypevaluetoNTP.

2.EnabletheNTPClient:

LocateHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config

SettheAnnounceFlagsvalueto5.

3.SpecifytheupstreamNTPserverstosyncfrom:

LocateHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders

SettheNtpServervaluetoalistofatleast3NTPservers.

Example:

Youmightsetthevalueto:

pool.ntp.org,0x12.pool.ntp.org,0x13.pool.ntp.org,0x1

Note:

OnaWindows2008DomainController,NtpServerislocatedinHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters.

4.Specifya15-minuteupdateinterval:

LocateHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient

SettheSpecialPollIntervalvalueto900.

5.RestarttheW32timeserviceforthechangestotakeeffect.

2.配置ESXiServer,将其NTP服务器指向由Windows搭建的NTP服务器

1.Openthe/etc/ntp.conffileinatexteditor.Formoreinformation,seeEditingconfigurationfilesinVMwareESXiandESX(1017022).

2.Addthetosmaxdistcommandonitsownline:

tosmaxdist30

3.Saveandclosetheconfigurationfile.

4.Makethe/etc/likewise/lsassd.conffilewritablebyrunningthecommand:

chmod+w/etc/likewise/lsassd.conf

5.Openthe/etc/likewise/lsassd.conffileinatexteditor.Formoreinformation,seeEditingconfigurationfilesinVMwareESXiandESX(1017022).

6.Locatethesync-system-timeoption,uncommentit,andsetthevaluetono:

sync-system-time=no

7.Saveandclosetheconfigurationfile.

8.OnESXi,savetheconfigurationchangestothebootbanksotheypersistacrossrebootsbyrunningthecommand:

/sbin/auto-backup.sh

9.Restartthentpdandlsassdservicesfortheconfigurationchangestotakeeffectbyrunningthecommands:

servicelsassdrestart

servicentpdrestart

Note:

TorestartthentpdandlsassdservicesonanESXihost,runthesecommands:

./etc/init.d/lsassdrestart

./etc/init.d/ntpdrestart

3.配置ESXi的NTP服务器地址

4.监控数据包

只有从ESXi发出的NTP包,NTPserver没有回复。

5.在KB的基础上做调整,修改注册表,启动NTP服务

修改注册表的键值:

Run->regeditHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer内的Enabled为1,打开NTP服务器功能(默认是不开启NTPServer服务

重启W23Time服务

6.启动NTP服务后,抓包显示NTP服务器有了回复

7.NTP数据包

ESXi发出的NTP请求包是NTP版本4.

Windows搭建的NTPServer的响应包是NTP版本3

ESXi未完成时间同步,NTP服务器发回的响应包并未被接受。

测试ESXi使用Linux搭建NTP的服务器

1.配置Linux作为NTP服务器

1.编辑ntp.conf

2.Ntp.conf配置示例:

#Permittimesynchronizationwithourtimesource,butdonot

#permitthesourcetoqueryormodifytheserviceonthissystem.

restrictdefaultnomodify

#Permitallaccessovertheloopbackinterface.Thiscould

#betightenedaswell,buttodosowouldeffectsomeof

#theadministrativefunctions.

restrict127.0.0.1

#--CLIENTNETWORK-------

#Permitsystemsonthisnetworktosynchronizewiththis

#timeservice.Donotpermitthosesystemstomodifythe

#configurationofthisservice.Also,donotusethose

#systemsaspeersforsynchronization.

#restrict192.168.1.0mask255.255.255.0nomodifynotrap

 

#---OURTIMESERVERS-----

server0.pool.ntp.org

server1.pool.ntp.org

server2.pool.ntp.org

 

#---NTPMULTICASTCLIENT---

#multicastclient#listenondefault224.0.1.1

#restrict224.0.1.1mask255.255.255.255nomodifynotrap

#restrict192.168.1.0mask255.255.255.0nomodifynotrap

 

#---GENERALCONFIGURATION---

#

#UndisciplinedLocalClock.Thisisafakedriverintendedforbackup

#andwhennooutsidesourceofsynchronizedtimeisavailable.The

#defaultstratumisusually3,butinthiscaseweelecttousestratum

#0.Sincetheserverlinedoesnothavethepreferkeyword,thisdriver

#isneverusedforsynchronization,unlessnootherother

#synchronizationsourceisavailable.Incasethelocalhostis

#controlledbysomeexternalsource,suchasanexternaloscillatoror

#anotherprotocol,thepreferkeywordwouldcausethelocalhostto

#disregardallothersynchronizationsources,unlessthekernel

#modificationsareinuseanddeclareanunsynchronizedcondition.

#

server127.127.1.0#localclock

fudge127.127.1.0stratum10

#

#Driftfile.Putthisinadirectorywhichthedaemoncanwriteto.

#Nosymboliclinksallowed,either,sincethedaemonupdatesthefile

#bycreatingatemporaryinthesamedirectoryandthenrename()'ing

#ittothefile.

#

driftfile/var/lib/ntp/drift

broadcastdelay0.008

#

#Keysfile.Ifyouwanttodiddleyourserveratruntime,makea

#keysfile(mode600forsure)anddefinethekeynumbertobe

#usedformakingrequests.

#

#PLEASEDONOTUSETHEDEFAULTVALUESHERE.Pickyourown,orremote

#systemsmightbeabletoresetyourclockatwill.Notealsothat

#ntpdisstartedwitha-Aflag,disablingauthentication,that

#willhavetoberemovedaswell.

#

keys/etc/ntp/keys

3.Linux防火墙启动123端口

2.更改ESXi的NTP服务器,将其指向Linux服务器的IP:

192.168.130.4

3.NTP数据包内容

1.总共发了20个ntp请求包,才实现同步

2.客户端请求包是NTP版本4

3.服务器端响应包是NTP版本4

总结

测试结果表明,按照VMware提供的KB,使用Windows2003搭建的NTPServer,ESXi5.0无法实现与其同步。

使用Linux搭建的NTPServer,ESXi5.0可以实现与其同步。

从NTP数据包内容分析,ESXi5.0发出的NTP同步请求包是NTP版本4,Windows系统搭建的NTPServer回复的数据包是NTP版本3。

Linux系统搭建的NTPServer回复的数据包是NTP版本4。

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > IT计算机 > 电脑基础知识

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2