Настройка
Убедитесь, что ваш компьютер, либо другое устройство, поддерживает протокол NTP версии 3 или 4. Для базовой настройки синхронизации времени, обычно, достаточно просто задать адрес NTP-сервера.
Ниже представлены краткие руководства по настройке синхронизации времени с NTP для различных операционных систем.
- Настройка для Windows 10/11
- Настройка для Windows Vista/7/8/8.1
- Настройка для Windows XP
- Настройка для Windows 2000/2003
- Настройка для Linux
- Настройка для FreeBSD
Для быстрой настройки синхронизации в ОС Windows, можно также воспользоваться сценарием, который позволяет задать адрес сервера и периодичность обновления времени по NTP.
- Скачать сценарий
Примечание: Перед осуществлением настройки операционной системы, пожалуйста, ознакомьтесь с информацией о переходе на зимнее время.
howto:ntp_server_activation
по материалам сайта http://windowsnotes.ru
Операционные системы семейства Windows содержат службу времени W32Time. Эта служба предназначена для синхронизации времени в пределах организации. W32Time отвечает за работу как клиентской, так и серверной части службы времени, причем один и тот же компьютер может быть одновременно и клиентом и сервером NTP (NTP — Network Time Protocol).
По умолчанию служба времени в Windows сконфигурирована следующим образом:
-
При установке операционной системы Windows запускает клиента NTP, который синхронизируется с внешним источником времени;
-
При добавлении компьютера в домен тип синхронизации меняется. Все клиентские компьютеры и рядовые сервера в домене используют для синхронизации времени контроллер домена, проверяющий их подлинность;
-
При повышении рядового сервера до контроллера домена на нем запускается NTP-сервер, который в качестве источника времени использует контроллер с ролью PDC-эмулятор;
-
PDC-эмулятор, расположенный в корневом домене леса, является основным сервером времени для всей организации. При этом сам он также синхронизируется с внешним источником времени.
Такая схема работает в большинстве случаев и не требует вмешательства. Однако структура сервиса времени в Windows может и не следовать доменной иерархии и надежным источником времени можно назначить любой компьютер.
В качестве примера приведем настройку NTP-сервера в Windows Server 2008 R2, по аналогии можно настроить NTP сервер и в Windows 7.
Запуск NTP сервера
Служба времени в Windows Server не имеет графического интерфейса и настраивается либо из командной строки, либо путем прямой правки системного реестра. Рассмотрим второй способ:
Необходимо запустить сервер NTP. Открываем ветку реестра:
HKLM\System\CurrentControlSet\services\W32Time\TimeProviders\NtpServer.
Для включения сервера NTP параметру Enabled надо установить значение 1. Затем перезапускаем службу времени командой net stop w32time && net start w32time.
После перезапуска службы NTP, сервер уже активен и может обслуживать клиентов. Убедиться в этом можно с помощью команды w32tm /query /configuration. Эта команда выводит полный список параметров службы. Если раздел NtpServer содержит строку Enabled :1 , то все в порядке, сервер времени работает.
Для того, чтобы NTP-сервер мог обслуживать клиентов, в брандмауэре необходимо открыть UDP порт 123 для входящего и исходящего трафика.
Основные настройки NTP сервера
Открываем ветку реестра:
HKLM\System\CurrentControlSet\services\W32Time\Parameters
.
Здесь в первую очередь нас интересует параметр Type, который задает тип синхронизации. Он может принимать следующие значения:
-
NoSync — NTP-сервер не синхронизируется с каким либо внешним источником времени. Используются системные часы, встроенные в микросхему CMOS самого сервера (в свою очередь эти часы могут синхронизироваться от источника NMEA по RS-232 например);
-
NTP — NTP-сервер синхронизируется с внешними серверами времени, которые указаны в параметре реестра NtpServer;
-
NT5DS — NTP-сервер производит синхронизацию согласно доменной иерархии;
-
AllSync — NTP-сервер использует для синхронизации все доступные источники.
Значение по умолчанию для компьютера, входящего в домен — NT5DS, для отдельно стоящего компьютера — NTP.
В параметре NtpServer указываются NTP-сервера, с которыми будет синхронизировать время данный сервер. По умолчанию в этом параметре прописан NTP-сервер Microsoft (time.windows.com, 0×1), при необходимости можно добавить еще несколько NTP-серверов, введя их DNS имена или IP адреса через пробел. В конце каждого имени можно добавлять флаг (напр. ,0×1) который определяет режим для синхронизации с сервером времени.
Допускаются следующие значения режима:
-
0×1 – SpecialInterval, использование временного интервала опроса;
-
0×2 – режим UseAsFallbackOnly;
-
0×4 – SymmetricActive, симметричный активный режим;
-
0×8 – Client, отправка запроса в клиентском режиме.
Еще один важный параметр AnnounceFlags находится в разделе реестра:
HKLM\System\CurrentControlSet\services\W32Time\Config
.
Он отвечает за то, как о себе заявляет NTP-сервер. Чтобы заявить рядовой сервер (не домен-контроллер) как надежный источник времени, нужен флаг 5.
Если настраиваемый сервер в свою очередь является клиентом NTP (получает время от GPS-приемника по NTP, например), можно настроить интервал между обновлениями. Этот параметр может быть актуальным и для клиентских РС. За время обновления отвечает ключ SpecialPollInterval
, находящийся в ветке реестра:
HKLM\System\CurrentControlSet\services\W32Time\TimeProviders\NtpClient
.
Он задается в секундах и по умолчанию его значение равно 604800, что составляет 1 неделю. Это очень много, поэтому стоит уменьшить значение SpecialPollInterval до разумного значения — 1 часа (3600).
После настройки необходимо обновить конфигурацию сервиса. Сделать это можно командой w32tm /config /update
.
И еще несколько команд для настройки, мониторинга и диагностики службы времени:
-
w32tm /monitor
– при помощи этой опции можно узнать, насколько системное время данного компьютера отличается от времени на контроллере домена или других компьютерах. Например:w32tm /monitor /computers:time.nist.gov
-
w32tm /resync
– при помощи этой команды можно заставить компьютер синхронизироваться с используемым им сервером времени. -
w32tm /stripchart
– показывает разницу во времени между текущим и удаленным компьютером. Команда w32tm /stripchart /computer:time.nist.gov /samples:5 /dataonly произведет 5 сравнений с указанным источником и выдаст результат в текстовом виде. -
w32tm /config
– это основная команда, используемая для настройки службы NTP. С ее помощью можно задать список используемых серверов времени, тип синхронизации и многое другое. Например, переопределить значения по умолчанию и настроить синхронизацию времени с внешним источником, можно командойw32tm /config /syncfromflags:manual /manualpeerlist:time.nist.gov /update
-
w32tm /query
— показывает текущие настройки службы. Например команда w32tm /query /source покажет текущий источник времени, а w32tm /query /configuration выведет все параметры службы. -
net stop w32time
— останавливает службу времени, если запущена. -
w32tm /unregister
— удаляет службу времени с компьютера. -
w32tm /register
– регистрирует службу времени на компьютере. При этом создается заново вся ветка параметров в реестре. -
net start w32time
— запускает службу.
Особенности, замеченные в Windows 7 — служба времени не запускается автоматически при старте Windows. Исправлено в SP1 для Windows 7.
· Последнее изменение: 2022/02/24 17:39 —
Dmitriy Sazhin
The Windows NTP server can be found in the Control Panel. To access it, go to the Start menu and search for “Control Panel.” In the Control Panel, select “Network and Internet” and then click on “Network and Sharing Center.” From here, select “Change adapter settings” on the left-hand side. Right-click on your active network connection and select “Properties.” In the Properties window, select the “Internet Protocol Version 4 (TCP/IPv4)” option and click on the “Properties” button. Finally, in the TCP/IP Properties window, you will see your Windows NTP server listed under the “General” tab.
Who is my NTP server?
Where are NTP servers located?
NTP servers are located around the world. There are many public NTP servers available, and most ISPs will have at least one NTP server. Many organizations also run their own NTP servers.
Does Windows 10 have NTP server?
Windows 10 does not have an NTP server by default. You can, however, install a third-party NTP server such as Meinberg Win32 Time Server.
What is Microsoft NTP server?
The Microsoft NTP server is a time synchronization service that allows computers to synchronize their clocks with a central server. This service is useful for ensuring that all computers on a network have accurate time.
How do I know if my NTP server is syncing?
If you are unsure if your NTP server is syncing, you can check the status of the NTP service with the following command:
sudo systemctl status ntp
If the service is running, it will say “active (running).” If it is not running, it will say “inactive (dead).”
Another way to check if your NTP server is syncing is to use the ntpq command. This will show you a list of all the servers that your computer is configured to sync with, as well as their current offset. An offset of 0 means that the server is in sync.
ntpq -p
How do I manually sync time with NTP server?
Assuming you are using a Windows Server, you can follow these steps:
1. Open the Control Panel.
2. Click on System and Security > Administrative Tools > Services.
3. Locate the service called “Windows Time.” Right-click on it and select Properties.
4. Change the Startup type to Automatic and click Start if the service is not already running.
5. Click OK to save your changes and close the window.
6. Open a Command Prompt as an administrator (right-click on Command Prompt and select Run as Administrator).
7. Type w32tm /resync at the command prompt and press Enter
How do I connect to NTP server?
There are a few things you need to do in order to connect to an NTP server.
1. Find out the address of the NTP server you want to connect to. This can be done by contacting your network administrator or looking up the server’s address online.
2. Once you have the address, open up a command prompt and type in “telnet [server address].” This will open up a connection to the NTP server.
3. Now that you’re connected, type in “ntpdate” followed by the server’s address. This will synchronize your computer’s clock with the NTP server’s clock.
If you are using a Windows Server, you can use the w32tm command to sync your NTP server. The following is an example:
w32tm /config /manualpeerlist:”0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org” /syncfromflags:manual /update
The above command will sync your NTP server with the 0.pool, 1.pool, and 2.pool NTP servers from the pool of NTP servers (http://www.pool.ntp.org).
How do I fix my time sync on Windows 10?
If your time is inaccurate on Windows 10, you can try the following steps:
1. Right-click on the clock in your taskbar and select “Adjust date/time”.
2. Under the “Date & time” tab, toggle off the “Set time automatically” option and then toggle it back on.
3. If that doesn’t work, you can try changing your time zone. To do this, go to the “Additional date, time & regional settings” link under the Date & time tab.
4. In the new window that opens up, go to the “Region” tab and click on the “Change location…” button.
5. Select your correct location from the list and then click “OK”.
6. Once you’ve made sure everything is set correctly, restart your computer for the changes to take effect.
How do I start NTP on Windows 10?
To start NTP on Windows 10, first open the Control Panel. In the search box, type “Date and Time”. Then, click on the “Change date and time” link. Next, click on the “change time zone” link. Finally, select your current time zone from the drop-down menu and click on the “OK” button.
How do I sync my computer with NTP server?
Assuming you are using Windows, you can sync your computer with an NTP server by following these steps:
1. Open the Start menu and search for “Date and Time”.
2. Click on “Change date and time settings”.
3. Under the “Internet Time” tab, check the box next to “Synchronize with an Internet time server”.
4. In the dropdown box below, select an NTP server (e.g. time.windows.com).
5. Click on the “Update Now” button.
How do I sync my local NTP server?
If you have a local NTP server, you can sync it by running the following command:
sudo ntpdate -s time.nist.gov
How do I force NTP to sync windows 10?
There are a few things you can do to force NTP to sync on Windows 10:
1. Change the server that your computer is pointing to for time synchronization. You can do this by going into the Date and Time settings in the Control Panel, and then clicking on the “Internet Time” tab. From here, you can change the server to something else and then click on “Update Now”.
2. If that doesn’t work, you can try resetting the Windows Time service. To do this, open up a Command Prompt as Administrator and type in the following command:
net stop w32time && net start w32time
3. Finally, if neither of those options work, you can try changing your computer’s clock manually and then letting NTP sync from there. To do this, go into the Date and Time settings in the Control Panel and click on “Change date and time”. Enter in the correct date/time values and then click on “OK”. After doing this, try running an NTP sync again.
How do I force NTP to sync Windows 10?
First, you need to check your current time zone and make sure it is set correctly. You can do this by going to the Date and Time settings in the Control Panel. Next, open an elevated Command Prompt window and run the following command:
w32tm /config /manualpeerlist:”0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org” /syncfromflags:MANUAL
This will configure Windows to sync with the specified NTP servers. Finally, run the following command to force an immediate sync:
w32tm /resync
{“@context”:”https://schema.org”,”@type”:”FAQPage”,”mainEntity”:[{“@type”:”Question”,”name”:”Where are NTP servers located?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”nnNTP servers are located around the world. There are many public NTP servers available, and most ISPs will have at least one NTP server. Many organizations also run their own NTP servers.”}},{“@type”:”Question”,”name”:”Does Windows 10 have NTP server?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”nnWindows 10 does not have an NTP server by default. You can, however, install a third-party NTP server such as Meinberg Win32 Time Server.”}},{“@type”:”Question”,”name”:”What is Microsoft NTP server?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”nnThe Microsoft NTP server is a time synchronization service that allows computers to synchronize their clocks with a central server. This service is useful for ensuring that all computers on a network have accurate time.”}},{“@type”:”Question”,”name”:”How do I know if my NTP server is syncing?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”nnIf you are unsure if your NTP server is syncing, you can check the status of the NTP service with the following command: nsudo systemctl status ntpnnIf the service is running, it will say “active (running).” If it is not running, it will say “inactive (dead).” nnAnother way to check if your NTP server is syncing is to use the ntpq command. This will show you a list of all the servers that your computer is configured to sync with, as well as their current offset. An offset of 0 means that the server is in sync. nnntpq -p”}},{“@type”:”Question”,”name”:”How do I manually sync time with NTP server?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”nnAssuming you are using a Windows Server, you can follow these steps: n1. Open the Control Panel. n2. Click on System and Security > Administrative Tools > Services. n3. Locate the service called “Windows Time.” Right-click on it and select Properties. n4. Change the Startup type to Automatic and click Start if the service is not already running. n5. Click OK to save your changes and close the window. n6. Open a Command Prompt as an administrator (right-click on Command Prompt and select Run as Administrator). n7. Type w32tm /resync at the command prompt and press Enter”}},{“@type”:”Question”,”name”:”How do I connect to NTP server?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”nnThere are a few things you need to do in order to connect to an NTP server. nn1. Find out the address of the NTP server you want to connect to. This can be done by contacting your network administrator or looking up the server’s address online.n2. Once you have the address, open up a command prompt and type in “telnet [server address].” This will open up a connection to the NTP server.n3. Now that you’re connected, type in “ntpdate” followed by the server’s address. This will synchronize your computer’s clock with the NTP server’s clock.”}},{“@type”:”Question”,”name”:”How do I sync my NTP server?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”nnIf you are using a Windows Server, you can use the w32tm command to sync your NTP server. The following is an example:nnw32tm /config /manualpeerlist:”0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org” /syncfromflags:manual /update nnThe above command will sync your NTP server with the 0.pool, 1.pool, and 2.pool NTP servers from the pool of NTP servers (http://www.pool.ntp.org).”}},{“@type”:”Question”,”name”:”How do I fix my time sync on Windows 10?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”nnIf your time is inaccurate on Windows 10, you can try the following steps:nn1. Right-click on the clock in your taskbar and select “Adjust date/time”.n2. Under the “Date & time” tab, toggle off the “Set time automatically” option and then toggle it back on.n3. If that doesn’t work, you can try changing your time zone. To do this, go to the “Additional date, time & regional settings” link under the Date & time tab.n4. In the new window that opens up, go to the “Region” tab and click on the “Change location…” button.n5. Select your correct location from the list and then click “OK”. n6. Once you’ve made sure everything is set correctly, restart your computer for the changes to take effect.”}},{“@type”:”Question”,”name”:”How do I start NTP on Windows 10?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”nnTo start NTP on Windows 10, first open the Control Panel. In the search box, type “Date and Time”. Then, click on the “Change date and time” link. Next, click on the “change time zone” link. Finally, select your current time zone from the drop-down menu and click on the “OK” button.”}},{“@type”:”Question”,”name”:”How do I sync my computer with NTP server?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”nnAssuming you are using Windows, you can sync your computer with an NTP server by following these steps:nn1. Open the Start menu and search for “Date and Time”.n2. Click on “Change date and time settings”.n3. Under the “Internet Time” tab, check the box next to “Synchronize with an Internet time server”.n4. In the dropdown box below, select an NTP server (e.g. time.windows.com).n5. Click on the “Update Now” button.”}},{“@type”:”Question”,”name”:”How do I sync my local NTP server?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”nnIf you have a local NTP server, you can sync it by running the following command:nnsudo ntpdate -s time.nist.gov”}},{“@type”:”Question”,”name”:”How do I force NTP to sync windows 10?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”nnThere are a few things you can do to force NTP to sync on Windows 10: nn1. Change the server that your computer is pointing to for time synchronization. You can do this by going into the Date and Time settings in the Control Panel, and then clicking on the “Internet Time” tab. From here, you can change the server to something else and then click on “Update Now”.nn2. If that doesn’t work, you can try resetting the Windows Time service. To do this, open up a Command Prompt as Administrator and type in the following command: nnet stop w32time && net start w32timenn3. Finally, if neither of those options work, you can try changing your computer’s clock manually and then letting NTP sync from there. To do this, go into the Date and Time settings in the Control Panel and click on “Change date and time”. Enter in the correct date/time values and then click on “OK”. After doing this, try running an NTP sync again.”}},{“@type”:”Question”,”name”:”How do I force NTP to sync Windows 10?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”nnFirst, you need to check your current time zone and make sure it is set correctly. You can do this by going to the Date and Time settings in the Control Panel. Next, open an elevated Command Prompt window and run the following command:nnw32tm /config /manualpeerlist:”0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org” /syncfromflags:MANUALnnThis will configure Windows to sync with the specified NTP servers. Finally, run the following command to force an immediate sync:nnw32tm /resync”}}]}
Network Time Protocol, или NTP – это протокол сетевого времени, который используется для синхронизации времени на компьютерах и других устройствах в сети. Он позволяет устройствам получать точное время от так называемых временных серверов и синхронизироваться с ними.
NTP особенно важен в компьютерных сетях и серверах, где точность времени имеет большое значение.
- Как работает NTP
- Задачи синхронизации
- Чем отличается SNTP от NTP
- Инструкция по настройке NTP-сервера Linux (Ubuntu)
- Установка NTP-сервера
- Настройка NTP-сервера в Ubuntu
- Настройка синхронизации клиентов с NTP-сервером
- Дополнительные настройки
- Настройка NTP-сервера Windows Server
Как работает NTP
Протокол NTP работает на основе иерархии временных серверов, где более высокоуровневые серверы синхронизируются с точными источниками времени (например, атомными часами). Они предоставляют эту информацию более низкоуровневым устройствам в сети. А уже эти устройства, в свою очередь, могут предоставлять свои временные данные другим.
Задачи синхронизации
Для чего применяется NTP? Протокол NTP играет ключевую роль в обеспечении согласованности времени в сети, обеспечивая точность синхронизации до наносекунд. Он позволяет устанавливать единое время для начала и завершения процессов в сети, что имеет ряд важных применений:
- Синхронизация позволяет устройствам и приложениям оперировать данными в режиме реального времени с единым временным референсом.
- Синхронизация времени необходима для правильного проведения транзакций, работы с сертификатами и подписью электронных документов. В таких ситуациях она обеспечивает точность и последовательность операций.
- Синхронизация позволяет более эффективно расследовать внутренние инциденты и контролировать нарушения безопасности в компьютерной сети.
- Благодаря синхронизации гарантируется точность информации о времени в системных логах. Она обеспечивает правильную хронологию событий для анализа и мониторинга ошибок.
- Протокол NTP позволяет сохранять сверхточные временные метки.
Чем отличается SNTP от NTP
SNTP (Simple Network Time Protocol) и NTP (Network Time Protocol) действительно имеют схожий формат сетевых пакетов, а потому представляют собой два взаимодействующих протокола для синхронизации времени в компьютерных сетях.
Но все-таки у них есть некоторые отличия:
NTP |
SNTP |
---|---|
Это более полная и точная версия протокола. Она предоставляет различные механизмы для повышения точности синхронизации времени: например, использование более сложных алгоритмов оценки времени и учета задержек в сети. |
Это упрощенная версия NTP, и ее цель – предоставить базовую функциональность синхронизации времени без использования сложных алгоритмов. В результате SNTP может быть менее точным, но при этом более простым в использовании и реализации. |
Более сложный протокол, который предоставляет множество возможностей для уточнения времени и обеспечения надежной синхронизации.
Обычно используется в средах, где критически важна точность синхронизации времени: финансовые транзакции, телекоммуникации и другие области. |
Его реализация и использование менее сложны. Он подходит для сред, где высокая точность синхронизации времени не играет большой роли. |
Инструкция по настройке NTP-сервера Linux (Ubuntu)
Установка NTP-сервера
- Обновите пакеты репозитория:
sudo apt-get update
Важно! Перед выполнением следующей команды удостоверьтесь, что вы авторизованы в системе для выполнения команд с sudo.
- Установите NTP-сервер с помощью команды:
sudo apt-get install ntp
Если вас попросят подтвердить установку, нажмите «y».
- Убедитесь, что NTP корректно установился. Для этого пропишите:
systemctl status ntp
Вывод должен содержать номер версии и информацию о времени установки:
Если установка прошла успешно, переходите к следующим шагам.
Настройка NTP-сервера в Ubuntu
- Откройте файл конфигурации NTP:
sudo nano /etc/ntp.conf
Как правило, сервер будет указывать корректное время, но мы все равно рекомендуем вам переключиться на ближайший пул серверов. Так вы сможете избежать возможных ошибок.
- Внесите необходимые изменения в файл конфигурации, указав российские сервера времени. По умолчанию у вас на экране будут отображаться такая информация:
Перед выделенными серверами поставьте символ «#», а в конце добавьте четыре российских сервера. Например:
server 0.ru.pool.ntp.org
server 1.ru.pool.ntp.org
server 2.ru.pool.ntp.org
server 3.ru.pool.ntp.org
Пример того, как должен выглядеть файл перед сохранением:
# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
# server 0.ubuntu.pool.ntp.org
# server 1.ubuntu.pool.ntp.org
# server 2.ubuntu.pool.ntp.org
# server 3.ubuntu.pool.ntp.org
server 0.ru.pool.ntp.org
server 1.ru.pool.ntp.org
server 2.ru.pool.ntp.org
server 3.ru.pool.ntp.org
- Сохраните изменения, зажав Ctrl+O, затем нажмите Enter.
- Затем закройте редактор с помощью сочетания клавиш Ctrl+X.
- Перезапустите NTP-сервер:
sudo service ntp restart
- Теперь проверьте, успешно ли применились настройки. Для этого пропишите:
sudo service ntp status
В выводе вы должны увидеть надпись «Active (running)».
- Далее необходимо открыть доступ через UFW и порт 123. Введите:
sudo ufw allow from any to any port 123 proto udp
Теперь ваш NTP-сервер установлен и сконфигурирован на сервере Ubuntu. Вы можете продолжить настройку, добавляя или изменяя сервера времени в файле конфигурации по мере необходимости.
Настройка синхронизации клиентов с NTP-сервером
- Установите инструмент для проверки сетевой конфигурации NTP:
sudo apt-get install ntpdate
- Для внесения дальнейших изменений потребуется отредактировать файл «hosts»:
sudo nano /etc/hosts
- Добавьте соответствующую строку с IP-адресом вашего NTP-сервера и хостом:
<IP-адрес> ntp-server
- Сохраните изменения, нажав Ctrl+X, а затем – Y.
- Теперь необходимо проверить синхронизацию клиента с сервером. Для этого пропишите:
sudo ntpdate ntp-server
Это позволит вам убедиться в наличии синхронизации между системой сервера и клиента. Обратите внимание на вывод, который будет отображать смещение времени.
- Отключите службу timesyncd. Хотя она и синхронизирует время локальной сети, вам она не потребуется:
sudo timedatectl set-ntp off
- Затем введите:
sudo apt-get install ntp
Этой командой вы установите NTP на системе клиента.
- Откройте файл конфигурации «ntp.conf»:
sudo nano /etc/ntp.conf
- Добавьте строку, которая укажет на предпочтение сервера. Кроме того, опция iburst в ней повысит точность синхронизации:
server NTP-server-host prefer iburst
- Сохраните изменения, нажав Ctrl+X, а затем – Y.
- Перезапустите сервер, чтобы применить все изменения:
sudo service ntp restart
- Проверьте очередь синхронизации:
ntpq -ps
Эта команда позволит вам убедиться, что ваш NTP-сервер указан как источник в очереди синхронизации времени.
Дополнительные настройки
С основными настройками мы закончили. Теперь продолжим знакомиться уже с продвинутыми настройками в файле конфигурации «ntp.conf».
В данном случае мы рассмотрим использование предпочитаемого сервера и настройки безопасности с использованием директив «restrict».
Как настроить предпочитаемый сервер
Для того чтобы задать предпочитаемый сервер в конфигурационном файле NTP, нужно воспользоваться директивой «prefer». Она указывает на то, что выбранный сервер должен в первую очередь использоваться для синхронизации.
Например, вы можете использовать ее с одним из ранее заданных серверов:
server 1.ru.pool.ntp.org prefer
Кроме того, указывать можно не только отдельные серверы, но и целые пулы. Разница будет лишь в синтаксисе – вместо опции «server» нужно указать «pool».
Как указать настройки безопасности
С помощью утилиты restrict вы можете управлять доступом к NTP-серверу и обеспечивать безопасность синхронизации времени.
Рассмотрим пример таких настроек:
restrict default kod notrap nomodify nopeer noquery
Здесь:
- «default» указывает, что эти ограничения по умолчанию применяются ко всем серверам и клиентам.
- «kod» используется для отправки протокола безопасности «kiss of death». Он отправляется серверам, которые отправляют слишком много запросов.
- «notrap» запрещает принимать управляющие команды.
- «nomodify» запрещает команды, которые могут повлиять на состояние сервера.
- «nopeer» запрещает синхронизацию с хостами.
- «noquery» запрещает выполнение запросов.
Обязательно перезапустите NTP-сервер после внесения изменений в конфигурационный файл:
sudo service ntp restart
Настройка NTP-сервера Windows Server
Важно! Не забудьте на всякий случай создать резервную копию реестра перед внесением изменений.
Компания SpaceWeb не предоставляет услугу Windows Server, информация по настройке предоставляется как справочная.
- Прежде чем приступить к настройке, убедитесь, что служба W32Time уже запущена. Мы можем сделать это, изменив запись в реестре:
HKLM\System\CurrentControlSet\services\W32Time\TimeProviders\NtpServer
- Далее найдите параметр «Enabled» и установите ему значение 1:
0x00000001 (1)
- Затем в командной строке выполните следующую команду для перезапуска службы:
net stop w32time && net start w32time
- Убедитесь, что служба W32Time включена:
w32tm /query /configuration
В выводе обратите внимание на блок «NtpServer <Local>». Значение «Enabled» должно быть равно 1, как мы и указали ранее.
- Проверьте, что UDP-порт 123 открыт в файерволе для корректного обслуживания клиентов.
Вы знаете, какой порт NTP по умолчанию? 123/UDP. Именно поэтому мы проверяем, открыт ли он.
- Вновь откройте реестр и найдите:
HKLM\System\CurrentControlSet\services\W32Time\Parameters
В этой ветке нас интересует параметр «Type». Установите ему одно из следующих значений в зависимости от требуемого режима синхронизации:
- «NoSync» – синхронизация не требуется.
- «NTP» – нужна синхронизация с внешними серверами NTP, определенными в реестре.
- «NT5DS» – требуется синхронизация в соответствии с иерархией доменов.
- «AllSync» – необходима синхронизация со всеми доступными серверами.
- Вернитесь в реестр и настройте значения в ветке «NtpServer». Добавьте сервера, обратив внимание на параметр в конце:
- «0x1», SpecialInterval. Это стандартный режим, мы рекомендуем вам выбрать именно его.
- «0x2», UseAsFallbackOnly. Позволяет использовать сервер в качестве резервного.
- «0x4», SymmetricActive. Это основной режим для NTP-серверов.
- «0x8», Client. Используется, если есть проблемы с синхронизацией.
- Наконец, в ветке «W32Time\TimeProviders\NtpClient» найдите параметр «SpecialPollInterval» и установите требуемое значение (в секундах).
- После внесения изменений перезапустите службу W32Time:
net stop w32time && net start w32time
Теперь у вас должен есть настроенный NTP-сервер на Windows Server.
Заключение
В этой статье мы рассмотрели, как настроить NTP на сервере Ubuntu и Windows.
NTP servers are used to provide accurate time and date information in networked devices, such as computers. This article will show you how to find your local NTP server address and use it for setting the system clock on macOS or Windows.
The “how to find ntp server ip address in windows” is a question that has been asked many times before. The answer is not always easy to find, but there are some steps that can be followed to get the right information.
In the command prompt, type “Net Time /querysntp” and hit the “Enter” key. This shows the settings for your NTP server. The server’s name is shown, but the IP (Internet Protocol) Address may now be obtained with the “ping” command.
In light of this, what is the NTP server address?
Name | IP (Internet Protocol) Address | Status |
---|---|---|
ntp-b.nist.gov | 132.163.96.5 | Service that has been verified |
ntp-wwv.nist.gov | 132.163.97.5 | Service that has been verified |
ntp-c.colorado.edu | 128.138.141.177 | Service that has been verified |
ntp-d.nist.gov | 129.6.15.32 | Service that has been verified |
Subsequently, question is, what is Google’s NTP server IP (Internet Protocol) Address? Google’s turned on a set of public network time protocol (NTP) servers. You’ll find the servers at time.google.com – which resolves to 216.239. 35.0, a rather less pretty IP (Internet Protocol) Address than the 8.8. 8.8 and 8.8.
On this case, how can I locate my NTP server in Windows 10?
On Windows 10, how can I change the time server?
- Activate the Control Panel.
- Select Clock, Language, and Region from the drop-down menus.
- Select Date and Time from the drop-down menu.
- Select the Internet Time tab from the drop-down menu.
- Change the settings by clicking the Change settings button.
- Make sure the option to synchronize with an internet time server is chosen.
- Select a different server from the drop-down option.
What’s the best way to keep my NTP server up to date?
A different way to synchronize your computer’s clock with IU’s time server.
- Go to a command prompt with elevated privileges.
- Enter w32TM /config /syncfromflags:manual /manualpeerlist:ntp.indiana.edu at the command prompt.
- w32tm /config /update is the command to use.
- w32tm /resync is the command to use.
- To return to Windows, type exit at the command prompt.
Answers to Related Questions
What is the location of the NTP port?
The Network Time Protocol (NTP) is a networking protocol that allows computer systems to synchronize their clocks across packet-switched, variable-latency data networks. Implementations use the User Datagram Protocol (UDP) on port 123 to transmit and receive timestamps.
What’s the difference between NTP and SNTP?
NTP protocol packets and SNTP protocol packets are completely interchangeable. A NTP server, in reality, has no means of knowing whether a time request came from an NTP or SNTP client. The advanced methods required to implement the protocols are the distinction between the NTP and SNTP protocols.
What is the meaning of NTP configuration?
Overview of the NTP
When you receive system logs and other time-specific data from different network devices, the Network Time Protocol (NTP) synchronizes the time of day across a collection of dispersed time servers and clients so that you can correlate events. The User Datagram Protocol (UDP) is the transport protocol used by NTP.
What is the purpose of NTP?
To keep everything in order, a system is needed to distribute correct time over a network to computers and network devices. To offer exactly such a framework, the Network Time Protocol (NTP) was created. It had complicated algorithms for keeping computers on a network in sync with one another.
What is the total number of NTP servers?
According to conventional thinking, utilizing at least five upstream time servers is a good idea, and you may want more. It’s worth noting that ntpd will only utilize 10 upstream time servers at a time, but it will continue to monitor as many as you specify.
What is the best way to set up a local NTP server?
Start the Windows NTP Time Service on your local computer.
- Navigate to Control PanelSystem and SecurityAdministrative Tools in File Explorer.
- Services should be double-clicked.
- Right-click Windows Time in the Services list and make the following changes: Automatic start-up type. Start of the service. OK.
What is NTP and how does it function?
NTP is a protocol for synchronizing clocks on computers and networks across the Internet or LANs (LANs). NTP examines the timestamp values, looking for mistakes and their frequency. A NTP server will keep track on the quality of its reference clocks as well as its own.
What exactly is an SNTP server?
For servers and clients utilizing NTP, SNTP is a streamlined access technique. The SNTP protocol synchronizes the system time of a computer with a server that has previously been synced via a source such as a radio, satellite receiver, or modem.
How can I tell whether my NTP is up to date?
Run the following commands to ensure that your NTP setting is correct:
- To check the status of the NTP service on the instance, use the ntpstat command. [ec2-user] [ec2-user] [ec2-user] [ec2-user $ ntpstat ntpstat ntpstat ntpstat
- (Optional) The ntpq -p command displays a list of known peers and a summary of their status to the NTP server.
What Windows version do I have?
right-click on Computer, enter Computer in the search box, and then choose Properties. You can view the version and edition of Windows that your device is running under Windows edition.
What is the procedure for enabling the NTP server?
What is the best way to set up a Network Time Protocol (NTP) server?
- Open up a registry editor (e.g., regedit.exe).
- Go to the registry subkey HKEY LOCAL MACHINESYSTEMCurrentControlSetServicesW32TimeParameters.
- Select New, DWORD Value from the Edit menu.
- Press Enter after entering the name LocalNTP.
- Double-click the new value, change the value to 1 to enable it or 0 to deactivate it, and then click OK.
What exactly is the W32Time service?
The Windows Time service (W32Time) is used to keep date and time synchronized on machines running Microsoft Windows client and server editions.
What does pool NTP org stand for?
The pool.ntp.org project is a large virtual cluster of timeservers that provides millions of customers with a dependable, easy-to-use NTP service. Hundreds of millions of systems utilize the pool all across the globe. The system’s source code is accessible.
What is the NTP pool and how does it work?
The NTP pool is a constantly changing group of networked computers that volunteer to give very accurate time to clients all around the globe using the Network Time Protocol. As of December 2019, the pool has 2,619 active time IPv4 servers and 1,360 active time IPv6 servers.
How do you set up NTP on Linux?
In a few easy steps, you can install and setup NTP on Linux:
- Install the NTP (Network Time Protocol) service.
- ‘/etc/ntp’ is the NTP configuration file.
- In the configuration file, add reference clock peers.
- Add the path of the drift file to the configuration file.
- In the configuration file, add an optional statistics directory.
Is it true that domain controllers operate as NTP servers?
No, Domain Controller can only operate as an NTP Server for domain-joined PCs running the Windows operating system. Set up and setup an NTP Server and instruct your DC/DCs to sync their time with it if you want other devices to sync their times. Setting up a domain controller does not make it an automated NTP server.
What does it mean to have an NTP server?
The Network Time Protocol (NTP) is a protocol for synchronizing the time of a computer client or server with the time of another server or reference time source, such as a radio or satellite receiver or modem.
The “ntp server ip address google” is a tool that can be used to find your NTP server address. The best way to do this, is by using the Google search engine.