|
|
拓扑图:
R1配置:
- Router>en
- Router#conf t
- Enter configuration commands, one per line. End with CNTL/Z.
- Router(config)#ho R1
- R1(config)#do clock set 10:00:00 14 jun 2023
- R1(config)#int g0/0
- R1(config-if)#ip add 172.16.1.1 255.255.255.0
- R1(config-if)#no sh
- R1(config-if)#
- %LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up
- %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up
- R1(config-if)#ex
- R1(config)#ntp master
- R1(config)#ntp authentication-key 1 md5 cisco 123
- R1(config)#ntp trusted-key 1
- R1(config)#ntp authenticate
复制代码
S1配置:
- Switch>en
- Switch#conf t
- Enter configuration commands, one per line. End with CNTL/Z.
- Switch(config)#ho S1
- S1(config)#int vlan 1
- S1(config-if)#ip add 172.16.1.100 255.255.255.0
- S1(config-if)#no sh
- S1(config-if)#
- %LINK-5-CHANGED: Interface Vlan1, changed state to up
- %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
- S1(config-if)#ex
- S1(config)#end
- S1#ping 172.16.1.1
- Type escape sequence to abort.
- Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
- .!!!!
- Success rate is 80 percent (4/5), round-trip min/avg/max = 0/0/0 ms
- S1#en
- S1#conf t
- Enter configuration commands, one per line. End with CNTL/Z.
- S1(config)#ntp server 172.16.1.1 key 1
- S1(config)#ntp authentication-key 1 md5 cisco123
- S1(config)#ntp authenticate
- S1(config)#ntp trusted-key 1
复制代码
S1验证:
- S1#show clock
- *0:53:36.585 UTC Mon Mar 1 1993
- S1#show ntp status
- Clock is synchronized, stratum 4, reference is 172.16.1.1
- nominal freq is 250.0000 Hz, actual freq is 249.9990 Hz, precision is 2**24
- reference time is E80B38FA.0000036D (10:39:54.877 UTC Wed Jun 14 2023)
- clock offset is 0.00 msec, root delay is 0.00 msec
- root dispersion is 10.35 msec, peer dispersion is 0.12 msec.
- loopfilter state is 'CTRL' (Normal Controlled Loop), drift is - 0.000001193 s/s system poll interval is 4, last update was 1 sec ago.
- S1#show clock
- 10:39:49.935 UTC Wed Jun 14 2023
复制代码
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
×
|