Set the NTP Server Address on the Cisco Ethernet Switch

To set the NTP server on the Cisco Ethernet switch:

  1. Open a connection to the Ethernet switch using SSH, and log in as admin. If SSH is not configured, then use Telnet.
  2. Change to enable mode.
    Switch> enable
    
  3. Review the current configuration:
    Switch# show running-config
    
  4. 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 ]
    
  5. 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 ]
    
  6. Verify the changes:
    Switch# show running-config
    
    Building configuration...
    ...
    ntp server 192.168.10.10 prefer
    ...
    
  7. Save the configuration:
    Switch# copy running-config startup-config
    Destination filename [startup-config]? 
    Building configuration...
    Compressed configuration from 14343 bytes to 3986 bytes[OK]
    
  8. Exit from the session:
    Switch# exit