Set the NTP Server Address on the Cisco Ethernet Switch
Set the NTP Server Address on the Cisco Ethernet Switch
To set the NTP server on the Cisco Ethernet switch:
Open a connection to the Ethernet switch using SSH, and log in as admin. If SSH is not configured, then use Telnet.
Change to enable mode.
Switch> enable
Review the current configuration:
Switch# show running-config
Erase the current chrony/NTP server configuration and any invalid NTP addresses. In the following example, the current IP addresses are 10.10.10.1 and 10.8.8.1.
Switch# configure terminal
Enter configuration commands,one per line. End with CNTL/Z.
Switch(config)# no ntp server 10.10.10.1
Switch(config)# no ntp server 10.8.8.1
Switch(config)# end
Switch# write memory
Building configuration...
Compressed configuration from 2603 bytes to 1158 bytes [OK ]
Configure up to two NTP servers. The following example uses 10.7.7.1 and 10.9.9.1 as the new IP addresses:
Switch# configure terminal
Enter configuration commands,one per line. End with CNTL/Z.
Switch(config)# ntp server 10.7.7.1 prefer
Switch(config)# ntp server 10.9.9.1
Switch(config)# end
Switch# write memory
Building configuration...
Compressed configuration from 2603 bytes to 1158 bytes [OK ]
Verify the changes:
Switch# show running-config
Building configuration...
...
ntp server 192.168.10.10 prefer
...
Save the configuration:
Switch# copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
Compressed configuration from 14343 bytes to 3986 bytes[OK]