Windows server의 환경(workgroup / domain)에 따른 NTP 서버 설정 및 모니터링 방법
Windows Time Service 관리 어플리케이션과 많은 Windows 서비스가 정상적으로 동작하기 위해서 시간 동기화는 매우 중요합니다. 도메인 안에 모든 도메인 컨트롤러와 클라이언트가 시간 동기화를 통해 정확히 동일한 시간을 유지해야만 Kerberos 인증 및 복제가 정상적으로 이루어질 수 있습니다. Domain Hierarchy–Based Synchronization http://technet.microsoft.com/en-us/library/cc773013(WS.10).aspx
각 서버의 환경(Winodws server 2003/ 2008 , workgroup, domain member, DCs, PDC Emulator)에 따라 NTP 서버를 설정 및 모니터링 하는 방법을 정리 합니다.
참고 하시기 바랍니다.
Windows server들의 NTP 서버 설정 및 모니터링 방법
[Windows 2003]
1. Workgroup
A. 현재 설정 된 NTP 서버확인 방법
w32tm /dumpreg /subkey:parameters 혹은 아래 명령어
reg query HKLM\system\currentcontrolset\services\w32time\parameters
NTPServer와 Type을 확인
B. NTP 서버구성 방법
시간서버와 클라이언트간의 시간차 확인
w32tm /stripchart /computer:시간서버네임 or IP /samples:1 /dataonly
클라이언트의 시간 원본을 변경
w32tm /config /syncfromflags:manual /manualpeerlist:NTP서버네임 or IP
구성 변경
w32tm /config /update
타임 서비스 중지 & 시작
net stop w32time
net start w32time
C. NTP 서버 구성 후 모니터링 방법
w32tm /monitor /computers:NTP서버네임 or IP
[다중 NTP 서버 설정 방법 예]
C:\>w32tm /config /syncfromflags:manual /manualpeerlist:"time.windows.com,0x1 time1.windows.com,0x8"
[참고 - time serverer flags]
0x01 SpecialInterval
0x02 UseAsFallbackOnly
0x04 SymmatricActive
0x08 Client
By making the primary NTP server flag 0x9, we made it “Client 0x08 + SpecialInterval 0x01” and as for the second NTP time server.
By making the secondary NTP peer flag 0xa, we made it “0x08 Client + 0x02 UseAsFallbackOnly”.
[Event log 확인]
이벤트 형식: 정보
이벤트 원본: W32Time
이벤트 범주: 없음
이벤트 ID: 37
설명:시간 공급자 NtpClient는 현재 time.windows.com (ntp.m|0x0|100.100.100.100:123->207.46.250.85:123)(으)로부터 시간 데이터를 받고 있습니다.
2. Member of domain + DCs
A. 현재 설정 된 NTP 서버확인 방법
w32tm /dumpreg /subkey:parameters 혹은 아래 명령어
reg query HKLM\system\currentcontrolset\services\w32time\parameters
B. NTP 서버구성 방법
w32tm /config /syncfromflags:domhier /update
net stop w32time
net start w32time
C. NTP 서버 구성 후 모니터링 방법
W32tm /monitor /domain:도메인 네임
[이벤트 로그 확인]
이벤트 형식: 정보
이벤트 원본: W32Time
이벤트 범주: 없음
이벤트 ID: 37
설명:
시간 공급자 NtpClient는 현재 W2K8R2KOR.ryuchan.kr (ntp.d|192.168.1.10:123->192.168.1.1:123)(으)로부터 시간 데이터를받고 있습니다.
3. DC(PDC Emulator)
A. 현재 설정 된 NTP 서버확인 방법
w32tm /dumpreg /subkey:parameters 혹은 아래 명령어
reg query HKLM\system\currentcontrolset\services\w32time\parameters
B. NTP 서버구성 방법
w32tm /config / manualpeerlist:NTP서버네임 or IP /syncfromflags:manual /reliable:yes /update
w32tm /config /update
C.NTP 서버 구성 후 모니터링 방법
w32tm /monitor /computers:NTP서버네임 or IP
[Windows 2008]
1. Workgroup
A. 현재 설정 된 NTP 서버확인 방법
w32tm /dumpreg /subkey:parameters 혹은 아래 명령어
reg query HKLM\system\currentcontrolset\services\w32time\parameters
B. NTP 서버구성 방법
w32tm /stripchart /computer:NTP서버네임 or IP /samples:1 /dataonly
w32tm /config /syncfromflags:manual /manualpeerlist:NTP서버네임 or IP
w32tm /config /update
net stop w32time
net start w32time
C.NTP 서버 구성 후 모니터링 방법
w32tm /monitor /computers:NTP서버네임 or IP
[다중 NTP 서버 설정 방법 예]
C:\>w32tm /config /syncfromflags:manual /manualpeerlist:"time.windows.com,0x9 time1.windows.com,0xa"
2. member of domain + DCs
A. 현재 설정 된 NTP 서버확인 방법
w32tm /dumpreg /subkey:parameters 혹은 아래 명령어
reg query HKLM\system\currentcontrolset\services\w32time\parameters
B. NTP 서버구성 방법
w32tm /config /syncfromflags:domhier /update
net stop w32time
net start w32time
C. NTP 서버 구성 후 모니터링 방법
W32tm /monitor /domain:도메인 네임
3. PDC Emulator
A. 현재 설정 된 NTP 서버확인 방법
w32tm /dumpreg /subkey:parameters 혹은 아래 명령어
reg query HKLM\system\currentcontrolset\services\w32time\parameters
B. NTP 서버구성 방법
w32tm /config / manualpeerlist:NTP서버네임 or IP /syncfromflags:manual /reliable:yes /update
w32tm /config /update
C.NTP 서버 구성 후 모니터링 방법
w32tm /monitor /computers:NTP서버네임 or IP
위 구성을 완료하고 나면 아래 KB를 참고하여 각 서버 환경별로 큰 시간 오프셋을 방지 하도록 레지스트리 값을 변경 하시기 바랍니다.
큰 시간 오프셋을 방지하도록 Windows 시간 서비스 구성
http://support.microsoft.com/kb/884776/ko
[MaxPosPhaseCorrection, MaxNegPhaseCorrection 기본 값]
서버 종류 |
Workgroup |
Member of DC |
Domain controller |
2003 server |
5400초(15시간) |
0xffffffff |
0xffffffff |
2008 server |
5400초(15시간) |
0xffffffff |
172800(48시간) |
레지스트리 항목 |
MaxPosPhaseCorrection |
|
경로 |
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config |
|
참고 |
이 항목은 시간 서비스에서 수행하는 최대 양의 시간 수정 값(초)을 지정합니다. 서비스에서 이 값보다 큰 값으로 변경해야 한다고 결정하면 이벤트를 기록합니다. 특별한 경우: 0xFFFFFFFF는 항상 시간을 수정하는 것을 의미합니다. 도메인 구성원에 대한 기본값은 0xFFFFFFFF이고 독립 실행형 클라이언트와 서버에 대한 기본값은 54,000(15시간)입니다. |
|
레지스트리 항목 |
MaxNegPhaseCorrection |
|
경로 |
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config |
|
참고 |
이 항목은 시간 서비스에서 수행하는 최대 음의 시간 수정 값(초)을 지정합니다. 서비스에서 이 값보다 큰 값으로 변경해야 한다고 결정하면 시간을 수정하는 대신 이벤트를 기록합니다. 특별한 경우: -1은 항상 시간을 수정하는 것을 의미합니다. 도메인 구성원에 대한 기본값은 0xFFFFFFFF이고 독립 실행형 클라이언트와 서버에 대한 기본값은 54,000(15시간)입니다. |
[참고 사이트]
Domain Hierarchy Time Source Acquisition
http://technet.microsoft.com/en-us/library/cc756572(v=ws.10).aspx
Domain Hierarchy?Based Synchronization
http://technet.microsoft.com/en-us/library/cc773013(WS.10).aspx
How Windows Time Service Works
http://technet.microsoft.com/fr-fr/library/cc773013(WS.10).aspx
Keeping the Domain On Time
http://blogs.msdn.com/b/w32time/archive/2007/09/04/keeping-the-domain-on-time.aspx
W32tm
http://technet.microsoft.com/en-us/library/bb491016.aspx
Windows Server 2008의 Windows 시간 서비스 및 결과 인터넷 통신
http://technet.microsoft.com/ko-kr/library/cc731790(WS.10).aspx
Windows Server 2003에서 Windows를 실행하지 않는 NTP 서버와 동기화하려고 하면 시간 동기화가 성공하지 못할 수 있다 http://support.microsoft.com/kb/875424/ko
인터넷에서 사용할 수 있는 SNTP(단일 네트워크 기간 프로토콜) 시간 서버 목록
http://support.microsoft.com/kb/262680/ko
HOWTO: Windows XP에서 시간을 Windows 시간 서비스와 동기화
http://support.microsoft.com/kb/307897/ko
How to turn on debug logging in the Windows Time Service
http://support.microsoft.com/kb/816043/en-us
Windows Time Service Registry Entries
http://technet.microsoft.com/en-us/library/cc773263(WS.10).aspx#w2k3tr_times_tools_uhlp
감사합니다^^