CentOS Stream release 8(
10.40.2.123)
使用chrony做时间服务器
cat /etc/chrony.conf
# Use public servers from the ***.*** project.
# Please consider joining the pool (http://www.***.***/join.html).
# pool 2.centos.***.*** iburst
server ***.*** iburst
server cn.***.*** iburst
# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift
# Allow the system clock to be stepped in the first three updates
# if its offset is larger than 1 second. makestep 1.0 3 # Enable kernel synchronization of the real-time clock (RTC). rtcsync # Enable hardware timestamping on all interfaces that support it. #hwtimestamp * # Increase the minimum number of selectable sources required to adjust # the system clock. #minsources 2 # Allow NTP client access from local network.
#allow 192.168.0.0/16
allow 10.170.7.0/24
# Serve time even if not synchronized to a time source.
#local stratum 10
# Specify file containing keys for NTP authentication. keyfile /etc/chrony.keys
# Get TAI-UTC offset and leap seconds from the system tz database. leapsectz right/UTC
# Specify directory for log files. logdir /var/log/chrony
bindaddress 10.40.2.123
port 123
# Select which information is logged.
#log measurements statistics tracking
server ***.*** iburst
server 10.40.2.123 iburst
交换机配置
clock protocol ntp
ntp-service enable
ntp-service authentication enable
ntp-service source Vlan-interface990
ntp-service unicast-server 10.40.2.123 source Vlan-interface402
dis ntp st
Clock status: unsynchronized
Clock stratum: 16
Reference clock ID: none
Clock jitter: 0.000000 s
Stability: 0.000 pps
Clock precision: 2^-19
Root delay: 0.00000 ms
Root dispersion: 140.85388 ms
Reference time: 00000000.00000000 Thu, Feb 7 2036 14:28:16.000
System poll interval: 8 s
配置不成功
(0)
您好,请知:
NTP无法同步,以下是排查要点,请参考:
1、检查交换机到NTP服务器的路由是否可达。
2、如果不涉及到NTP认证,可以在交换机上将NTP认证给undo掉。
3、检查NTP服务器上的系统防火墙出入站规则关闭看下是否能同步到,可以关闭iptables功能,以下是参考命令:
service iptables stop
(0)
在交换要是可以ping通服务器的,
ntp服务器上也是开放了端口
public (active)
target: default
icmp-block-inversion: no
interfaces: ens192
sources:
services: cockpit dhcpv6-client ntp ssh
ports: 123/udp
protocols:
forward: no
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
(0)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论