思科:ntp

要求:把R1作为ntp server,R2、R3同步R1的时间

1、前提条件:实现R1、R2、R3互通
R1:
interface Loopback1
 ip address 1.1.1.1 255.255.255.255

interface FastEthernet0/0
 ip address 12.1.1.1 255.255.255.0

router ospf 1
 router-id 1.1.1.1
 log-adjacency-changes
 network 1.1.1.1 0.0.0.0 area 0
 network 12.1.1.0 0.0.0.255 area 0
R2:
interface Loopback1
 ip address 2.2.2.2 255.255.255.255

interface FastEthernet0/0
 ip address 12.1.1.2 255.255.255.0

router ospf 1
 router-id 2.2.2.2
 log-adjacency-changes
 network 2.2.2.2 0.0.0.0 area 0
 network 12.1.1.0 0.0.0.255 area 0
 network 23.1.1.0 0.0.0.255 area 0
R3:
interface Loopback1
 ip address 3.3.3.3 255.255.255.255

interface FastEthernet0/1
 ip address 23.1.1.3 255.255.255.0

router ospf 1
 router-id 3.3.3.3
 log-adjacency-changes
 network 3.3.3.3 0.0.0.0 area 0
 network 23.1.1.0 0.0.0.255 area 0
2、对于R1:做ntp server基本配置:
R1#clock set 14:55:00 21  May  2024
R1(config)#clock timezone GMT +8

R1(config)#ntp server 1.1.1.1
R1(config)#ntp master 1
R1(config)#ntp source lo1

 有两个时区:UTC和GMT,因此要更改为中国的时区GMT,默认为UTC

master:值越小则时间匹配的越精确

ntp source 来指定ntp发送的源地址

3、对R2、R3:做ntp client基本配置:
R2(config)#clock timezone GMT +8
R2(config)#ntp server 1.1.1.1
R2(config)#ntp source lo1

检测:

show ntp status

 synchronized为同步成功

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值