-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cisco-NTP-Configuration-Examples.config
52 lines (52 loc) · 1.59 KB
/
Cisco-NTP-Configuration-Examples.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
!-----------------------------------------------------------------
! Cisco NTP Configuration Examples
!-----------------------------------------------------------------
! For Daylight Savings Time Adjustments
! https://en.wikipedia.org/wiki/Daylight_saving_time_by_country
! https://fastreroute.com/cisco-clock-timezone-configuration/
!-----------------------------------------------------------------
! Cisco NXOS
!-----------------------------------------------------------------
!
!--turn on ntp feature
configuration terminal
feature ntp
exit
copy running-config startup-config
!
!--configure ntp sources
ntp server [[ntp-server-1]] prefer use-vrf [[vrf-name]]
ntp server [[ntp-server-2]] use-vrf [[vrf-name]]
!
!--configure a layer 3 interface
ntp source-interface vlan[[vlan-id]]
!
!
clock timezone [[timezone-code]] [[tz-hrs]] [[tz-mins]]
!
!--US Standard Daylight Savings Time Change
clock summer-time [[dst-timezone-code]] 1 Sunday March 02:00 1 Sunday November 02:00 [[shift-minutes]]
!
!--European Daylight Savings Time Change
clock summer-time [[dst-timezone-code]] 5 Sunday March 02:00 5 Sunday October 02:00 [[shift-minutes]]
!
!--
copy running-config startup-config
!
!--
show ntp peers
show ntp peer-status
show ntp source-interface
!
!-----------------------------------------------------------------
! Cisco IOS/IOS-XE
!-----------------------------------------------------------------
!
!--configure ntp sources
ntp server [[ntp-server-1]] prefer
ntp server [[ntp-server-2]]
!
!--
clock timezone [[timezone-code]] 0 0
clock summer-time [[dst-timezone-code]] recurring last Sun Mar 1:00 last Sun Oct 1:00
!