SMALL
Windows 서버에서 시간 동기화(NTP, Network Time Protocol) 설정 및 상태 확인 방법을 정리합니다.
1. NTP 서버 수동 설정
외부 NTP 서버(time.windows.com)를 참조하도록 설정하는 경우:
w32tm /config /syncfromflags:manual /manualpeerlist:time.windows.com
w32tm /config /syncfromflags:domhier /update
net stop w32time
net start w32time
w32tm /config /syncfromflags:domhier /update
net stop w32time
net start w32time
명령어 설명
- w32tm /config /syncfromflags:manual /manualpeerlist:time.windows.com
→ time.windows.com을 참조하여 시간 동기화 설정 - w32tm /config /syncfromflags:domhier /update
→ 도메인 계층 구조에서 시간 동기화 - net stop w32time / net start w32time
→ Windows 시간 서비스(W32Time) 재시작
2. 현재 시간 공급자 확인
현재 서버의 시간 동기화 설정을 확인할 수 있습니다.
w32tm /query /configuration
출력 예시
Type: NT5DS
동기화 대상 피어: DC1.jgshin.local
동기화 대상 피어: DC1.jgshin.local
설명
- Type: NT5DS → 도메인 컨트롤러에서 시간 동기화
- 동기화 대상 피어: DC1.jgshin.local → 현재 참조 중인 NTP 서버
3. 현재 동기화된 피어 확인
현재 사용 중인 NTP 서버(피어)를 확인하는 명령어:
w32tm /query /peers
출력 예시
피어: DC1.jgshin.local
상태: 활성
상태: 활성
- 피어: 현재 동기화 대상 NTP 서버
- 상태: 활성 여부 확인
4. 강제 동기화
시간 동기화 문제 발생 시 강제 동기화를 실행할 수 있습니다.
w32tm /resync
- 즉시 시간 동기화를 수행하여 NTP 서버와 시간 차이를 조정합니다.
5. 추가적인 NTP 서버 설정 (선택)
여러 개의 NTP 서버를 설정하고 싶다면 다음과 같이 설정할 수 있습니다.
w32tm /config /manualpeerlist:"time.windows.com,0.pool.ntp.org,1.pool.ntp.org" /syncfromflags:manual /update
- NTP 서버 목록:
- time.windows.com
- 0.pool.ntp.org
- 1.pool.ntp.org
6. Windows 클라이언트가 도메인 컨트롤러(NTP)와 동기화하도록 설정
Windows 클라이언트에서 도메인 컨트롤러와 시간 동기화를 하려면:
w32tm /config /syncfromflags:domhier /update
net stop w32time && net start w32time
net stop w32time && net start w32time
- syncfromflags:domhier → Active Directory 도메인 컨트롤러에서 시간 동기화
7. 시간 확인 및 디버깅
현재 시스템 시간 확인
w32tm /query /status
NTP 서버와 시간 차이 확인
w32tm /stripchart /computer:time.windows.com /samples:5 /dataonly
- 5번의 샘플을 통해 NTP 서버와의 시간 차이를 측정
8. 정리
- Windows 서버의 시간 동기화는 도메인 컨트롤러 또는 외부 NTP 서버를 통해 관리됩니다.
- w32tm 명령어를 사용하면 현재 동기화 상태 확인 및 강제 동기화가 가능합니다.
- 도메인 환경에서는 syncfromflags:domhier을 사용하여 도메인 컨트롤러(NTP 서버) 와 동기화하도록 설정합니다.
LIST
'IT > 윈도우' 카테고리의 다른 글
윈도우 2016서버 MSCS 클러스터 - 1 (0) | 2025.02.17 |
---|---|
윈도우 실무 WMIC 명령 (0) | 2025.02.17 |
윈도우 네트워크 티밍(NetSwitchTeam) 설정 방법 (0) | 2025.02.17 |
윈도우 WWN 확인 (0) | 2025.02.16 |
윈도우 DSR 루프백 이더넷 설정 (0) | 2025.02.16 |