ubuntu server安装ntp
来源:互联网 发布:创盈门窗软件 编辑:程序博客网 时间:2024/05/18 00:01
local NTP server not used by clients. Setup issue
I have a local net with no internet and want to keep all computers in there time synced. I do not care about the absolute time, it should just be the same for all.
I found several posts about this. The most useful ones were:
- How do I setup a local NTP server?
- Setting up a standalone NTP server on Ubuntu
server
I did setup the server with the IP 192.168.1.123 and it seems to be working ok: The deamon "ntpd" is running and I had been adding in etc/ntp.conf the lines
# this sets the source to local timeserver 127.127.1.0fudge 127.127.1.0 stratum 8# this makes the ntpd deamon to send out its time on the local net.broadcast 192.168.255.255
I verified it with the ntpq command:
ntpq -c lpeer remote refid st t when poll reach delay offset jitter==============================================================================192.168.255.255 .BCST. 16 B - 64 0 0.000 0.000 0.000
"BCST" says its in broadcast more and the IP shows its broadcasting to all computers on the local net (a B class network, thus 2x 255).
client
On client side I also installed ntp, and used the default /etc/ntp.conf and added the lines
server 192.168.1.123 iburstserver 127.127.1.0fudge 127.127.1.0 stratum 8
where 192.168.1.123 is the local IP of the server broadcasting and the other line should tell the client (a laptop) to use its own clock when the network connection is off. I restarted the service on the client and ran ntpq to check the connection
ntpq -c lpeer remote refid st t when poll reach delay offset jitter==============================================================================192.168.1.123 .INIT. 16 u 1 64 0 0.000 0.000 0.000LOCAL(0) .LOCL. 8 l 6 64 1 0.000 0.000 0.000
Repeating this command I can see the "when" column counting up both and starting with 0 again when reaching 64sec. I did expect after the 64 sec this would change to this:
ntpq -c lpeer remote refid st t when poll reach delay offset jitter==============================================================================*192.168.1.123 .INIT. 16 u 1 64 0 0.000 0.000 0.000LOCAL(0) .LOCL. 8 l 6 64 1 0.000 0.000 0.000
Note the "*" before the server IP. But it did not. What I got after about 1hr was
ntpq -c lpeer remote refid st t when poll reach delay offset jitter==============================================================================192.168.1.123 .INIT. 16 u 1 64 0 0.000 0.000 0.000*LOCAL(0) .LOCL. 8 l 63 64 377 0.000 0.000 0.000
I think this tells me, there are 2 sources for NTP configured, but as the remote source is not working/not available/whatever it is not used and the fallback case local clock is used, but I am not sure if that interpretation is correct.
what I tried
I waited more than 1hr, I restarted the ntpd
serveral times with sudo /etc/init.d/ntp restart
and I also rebooted. Further I commented out the local section clock so that the only server was server 192.168.1.123
. I could not get that "*" to appear. Also I saw a section in the ntp.conf that said
#if you want to listen to time broadcasts on you local subnet, #de-comment the next lines. Please do this only if you trust #everybody on the network!#disable auth#broadcastclient
I tried un-commenting and restarting the service but still that star did not appear. I am wondering about the last section, though, because this section did turn up in any other post or internet result that I saw on the ntp configuration. There are several ones on local setups and most seem to be find with the server address alone. Ping from client to server is fine. There is not firewall etc.
question
I am out of ideas. I think I have a server with fully working ntp server which is sending out the time. But I do have a client which is failing to receive the time information from the server.
What can I do to get the client running?
原文:https://askubuntu.com/questions/885345/local-ntp-server-not-used-by-clients-setup-issue
- ubuntu server安装ntp
- Ubuntu 配置NTP Server
- ubuntu 12.04 server ntp同步
- Ubuntu下安装NTP服务器
- ubuntu安装和使用NTP
- Ubuntu 离线安装ntp服务器
- ntp server
- ntp server
- How to build DHCP&NTP server on Linux(Ubuntu)
- How to build DHCP&NTP server on Linux(Ubuntu)
- ntp安装
- ntp安装
- Ubuntu 14.04一步一步安装Openstack Kilo版本-4(ntp)
- NTP server 构建
- ntp server的配置
- WINDOWS NTP SERVER设置
- NTP Server Setup
- ntp server 搭建
- 【算法题】全排列,字典序
- javaSSM框架初级配置详解
- css的几种移动方式
- 当使包含 applet 程序的页面最小化时
- PowerDesigner连接MySQL逆向生成物理模型
- ubuntu server安装ntp
- vim命令显示行号
- select机制
- RTTI学习及四个实现方法
- 不认识String、StringBuffer和StringBuilder这三兄弟的同学赶紧进来
- 学习笔记32-设计模式
- Django(二)--初相见
- openjudge 开餐馆(动态规划)
- 随机等概率的输出m个不重复的数