We help IT Professionals succeed at work.
Troubleshooting Question

Cisco 3560 CG as an NTP server for lab.

Dave Smith
Dave Smith asked
on
39 Views
Last Modified: 2020-11-08
Cisco 3560 CG as an NTP server for lab.

Can someone please provide the cmds needed to make a switch an NTP master (will sync ESXi hosts and Windows PDC to it).

thanks
Comment
Watch Question

Mohammad RummanehSr.Network & Security Engineer
CERTIFIED EXPERT

Commented:
Would you please to share the output for below command

SW(config)#ntp ?

Author

Commented:
Hi Mohammad,

Running NTP after running en and then conf t comes back with


Switch>
Switch>
Switch>
Switch>
Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#ntp
% Incomplete command.

Switch(config)#

Author

Commented:
sh run


Switch#sh run
Building configuration...

Current configuration : 893 bytes
!
! Last configuration change at 01:33:46 UTC Wed Mar 30 2011
!
version 15.0
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Switch
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
system mtu routing 1500
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
!
!
!
!
!
!
!
!
vlan internal allocation policy ascending
!
!
!
!
!
!
!
!
!
!
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface GigabitEthernet0/3
!
interface GigabitEthernet0/4
!
interface GigabitEthernet0/5
!
interface GigabitEthernet0/6
!
interface GigabitEthernet0/7
!
interface GigabitEthernet0/8
!
interface GigabitEthernet0/9
!
interface GigabitEthernet0/10
!
interface Vlan1
 ip address 192.168.xxx.xxx 255.255.255.0
!
ip http server
ip http secure-server
!
!
!
!
!
line con 0
line vty 5 15
!
end

Switch#
Mohammad RummanehSr.Network & Security Engineer
CERTIFIED EXPERT

Commented:
Yes try to add ? After ntp

Switch(config)#ntp  ? 
Pete LongTechnical Architect
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Hi Dave,
Remember not all Cisco devices can be an NTP server(time source) you have for set them to a particular stratum, if the stratum command fails then your device cannot be a reliable time source.
Here's me setting one up;
Sync Microsoft Domain Time To A Cisco NTP Device
</P>

Author

Commented:
Both,

Switch(config)#ntp ?
  access-group        Control NTP access
  allow               Allow processing of packets
  authenticate        Authenticate time sources
  authentication-key  Authentication key for trusted time sources
  broadcastdelay      Estimated round-trip delay
  clock-period        Length of hardware clock tick
  logging             Enable NTP message logging
  master              Act as NTP master clock
  max-associations    Set maximum number of associations
  maxdistance         Maximum Distance for synchronization
  panic               Reject time updates > panic threshold
  passive             NTP passive mode
  peer                Configure NTP peer
  server              Configure NTP server
  source              Configure interface for source address
  trusted-key         Key numbers for trusted time sources


Looks like the switch can be set up as a NTP master then as the cmd did not fail?
Mohammad RummanehSr.Network & Security Engineer
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Pete LongTechnical Architect
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Remember be patient, NTP can take a while to sort itself out, and synchronise :)

</P>

Author

Commented:
Fantastic, thanks for your guidence.


What do I use as the NTP server name when setting NTP on ESXI servers and Windows VMs?


Switch#clock set 12:30:00 nov 05 2020
Switch#
.Nov  5 12:30:00.000: %SYS-6-CLOCKUPDATE: System clock has been updated from 05:26:24 UTC Wed Mar 30 2011 to 12:30:00 UTC Thu Nov 5 2020, configured from console by console.
Switch#
Switch#
Switch#
Switch#sh clock
.12:30:09.379 UTC Thu Nov 5 2020
Switch#

Author

Commented:
Sh run -


Switch>
Switch>
Switch>
Switch>
Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#ntp
% Incomplete command.

Switch(config)#sh run
                  ^
% Invalid input detected at '^' marker.

Switch(config)#exit
Switch#nt
Mar 30 01:33:46.768: %SYS-5-CONFIG_I: Configured from console by consolep
Translating "ntp"...domain server (255.255.255.255)
% Unknown command or computer name, or unable to find computer address
Switch#ntp
% Unknown command or computer name, or unable to find computer address
Switch#
Switch#
Switch#
Switch#
Switch#
Switch#
Switch#
Switch#
Switch#ntp
Translating "ntp"...domain server (255.255.255.255) [OK]
Trying ntp (10.10.10.10)...
% Connection timed out; remote host not responding

Switch#
Switch#
Switch#
Switch#
Switch#
Switch#
Switch#
Switch#
Switch#
Switch#
Switch#
Switch#
Switch#
Switch#sh run
Building configuration...

Current configuration : 893 bytes
!
! Last configuration change at 01:33:46 UTC Wed Mar 30 2011
!
version 15.0
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Switch
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
system mtu routing 1500
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
!
!
!
!
!
!
!
!
vlan internal allocation policy ascending
!
!
!
!
!
!
!
!
!
!
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface GigabitEthernet0/3
!
interface GigabitEthernet0/4
!
interface GigabitEthernet0/5
!
interface GigabitEthernet0/6
!
interface GigabitEthernet0/7
!
interface GigabitEthernet0/8
!
interface GigabitEthernet0/9
!
interface GigabitEthernet0/10
!
interface Vlan1
 ip address 192.168.0.66 255.255.255.0
!
ip http server
ip http secure-server
!
!
!
!
!
line con 0
line vty 5 15
!
end

Switch#

































Switch con0 is now available





Press RETURN to get started.












Mar 30 02:40:51.968: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to down
Mar 30 02:40:52.975: %LINK-3-UPDOWN: Interface GigabitEthernet0/2, changed state to down
Mar 30 02:40:56.571: %LINK-3-UPDOWN: Interface GigabitEthernet0/2, changed state to up
Mar 30 02:40:57.573: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to up
Switch>
Switch>
Switch>
Switch>
Switch>conf t
          ^
% Invalid input detected at '^' marker.

Switch>ntp ?
% Unrecognized command
Switch>conf t=
          ^
% Invalid input detected at '^' marker.

Switch>
Switch>
Switch>en
Switch#
Switch#
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#
Switch(config)#
Switch(config)#ntp ?
  access-group        Control NTP access
  allow               Allow processing of packets
  authenticate        Authenticate time sources
  authentication-key  Authentication key for trusted time sources
  broadcastdelay      Estimated round-trip delay
  clock-period        Length of hardware clock tick
  logging             Enable NTP message logging
  master              Act as NTP master clock
  max-associations    Set maximum number of associations
  maxdistance         Maximum Distance for synchronization
  panic               Reject time updates > panic threshold
  passive             NTP passive mode
  peer                Configure NTP peer
  server              Configure NTP server
  source              Configure interface for source address
  trusted-key         Key numbers for trusted time sources

Switch(config)#ntp > access-group        Control NTP access
                   ^
% Invalid input detected at '^' marker.

Switch(config)#  allow               Allow processing of packets
                   ^
% Invalid input detected at '^' marker.

Switch(config)#  authenticate        Authenticate time sources
                            ^
% Invalid input detected at '^' marker.

Switch(config)#$ation-key  Authentication key for trusted time sources
  authentication-key  Authentication key for trusted time sources
                ^
% Invalid input detected at '^' marker.

Switch(config)#  broadcastdelay      Estimated round-trip delay
                  ^
% Invalid input detected at '^' marker.

Switch(config)#  clock-period        Length of hardware clock tick
                      ^
% Invalid input detected at '^' marker.

Switch(config)#  logging             Enable NTP message logging
                                      ^
% Invalid input detected at '^' marker.

Switch(config)#  master              Act as NTP master clock
                   ^
% Invalid input detected at '^' marker.

Switch(config)#  max-associations    Set maximum number of associations
                   ^
% Invalid input detected at '^' marker.

Switch(config)#  maxdistance         Maximum Distance for synchronization
                   ^
% Invalid input detected at '^' marker.

Switch(config)#  panic               Reject time updates > panic threshold
                   ^
% Invalid input detected at '^' marker.

Switch(config)#  passive             NTP passive mode
                     ^
% Invalid input detected at '^' marker.

Switch(config)#  peer                Configure NTP peer
                  ^
% Invalid input detected at '^' marker.

Switch(config)#  server              Configure NTP server
                     ^
% Invalid input detected at '^' marker.

Switch(config)#  source              Configure interface for source address
                  ^
% Invalid input detected at '^' marker.

Switch(config)#  trusted-key         Key numbers for trusted time sources
                   ^
% Invalid input detected at '^' marker.

Switch(config)#  trusted-key         Key numbers for trusted time sources
                   ^
% Invalid input detected at '^' marker.

Switch(config)#
Switch(config)#
Switch(config)#exit
Switch#
Switch#
Switch#
Switch#
Switch#
Mar 30 02:41:46.515: %SYS-5-CONFIG_I: Configured from console by consolecl
% Ambiguous command:  "cl"
Switch#
Switch#
Switch#cls
Translating "cls"...domain server (255.255.255.255) [OK]
Trying cls (10.10.10.10)...
% Connection timed out; remote host not responding

Switch#
Switch#
Switch#
Switch#
Switch#
Switch#
Switch#
Switch#
Switch#
Switch#
Switch#ntp ?
% Unrecognized command
Switch#ntp
Translating "ntp"...domain server (255.255.255.255) [OK]
Trying ntp (10.10.10.10)...
% Connection timed out; remote host not responding

Switch#
Switch#
Switch#
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#
Switch(config)#ntp ?
  access-group        Control NTP access
  allow               Allow processing of packets
  authenticate        Authenticate time sources
  authentication-key  Authentication key for trusted time sources
  broadcastdelay      Estimated round-trip delay
  clock-period        Length of hardware clock tick
  logging             Enable NTP message logging
  master              Act as NTP master clock
  max-associations    Set maximum number of associations
  maxdistance         Maximum Distance for synchronization
  panic               Reject time updates > panic threshold
  passive             NTP passive mode
  peer                Configure NTP peer
  server              Configure NTP server
  source              Configure interface for source address
  trusted-key         Key numbers for trusted time sources

Switch(config)#ntp
% Incomplete command.

Switch(config)#

































Switch con0 is now available





Press RETURN to get started.









Mar 30 02:52:58.914: %SYS-5-CONFIG_I: Configured from console by console
Mar 30 05:20:38.632: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to down
Mar 30 05:20:39.638: %LINK-3-UPDOWN: Interface GigabitEthernet0/2, changed state to down
Mar 30 05:20:43.156: %LINK-3-UPDOWN: Interface GigabitEthernet0/2, changed state to up
Mar 30 05:20:44.158: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to up
Switch>
Switch>
Switch>
Switch>
Switch>
Switch>
Switch>en
Switch#
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#ntp master
Switch(config)#exit
Switch#sh clock
05:23:06.596 UTC Wed Mar 30 2011
Switch#
Mar 30 05:23:04.929: %SYS-5-CONFIG_I: Configured from console by console
Switch#
Switch#
Switch#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#
Switch(config)#
Switch(config)#conf t
                ^
% Invalid input detected at '^' marker.

Switch(config)#
Switch(config)#
Switch(config)#clock set 12:28:00 nov 05 2020
                      ^
% Invalid input detected at '^' marker.

Switch(config)#exit
Switch#
Mar 30 05:26:11.125: %SYS-5-CONFIG_I: Configured from console by console
Switch#
Switch#
Switch#clock set 12:30:00 nov 05 2020
Switch#
.Nov  5 12:30:00.000: %SYS-6-CLOCKUPDATE: System clock has been updated from 05:26:24 UTC Wed Mar 30 2011 to 12:30:00 UTC Thu Nov 5 2020, configured from console by console.
Switch#
Switch#
Switch#
Switch#sh clock
.12:30:09.379 UTC Thu Nov 5 2020
Switch#sh rub
            ^
% Invalid input detected at '^' marker.

Switch#sh run
Building configuration...

Current configuration : 904 bytes
!
! Last configuration change at 05:26:11 UTC Wed Mar 30 2011
!
version 15.0
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Switch
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
system mtu routing 1500
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
!
!
!
!
!
!
!
!
vlan internal allocation policy ascending
!
!
!
!
!
!
!
!
!
!
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface GigabitEthernet0/3
!
interface GigabitEthernet0/4
!
interface GigabitEthernet0/5
!
interface GigabitEthernet0/6
!
interface GigabitEthernet0/7
!
interface GigabitEthernet0/8
!
interface GigabitEthernet0/9
!
interface GigabitEthernet0/10
!
interface Vlan1
 ip address 192.168.0.66 255.255.255.0
!
ip http server
ip http secure-server
!
!
!
!
!
line con 0
line vty 5 15
!
ntp master
end

Switch#wr
Building configuration...
[OK]
Switch#
Switch#
Switch#
Switch#
Nov  5 12:37:32.570: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/5, changed state to down
Nov  5 12:37:33.126: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/4, changed state to down
Nov  5 12:37:33.577: %LINK-3-UPDOWN: Interface GigabitEthernet0/5, changed state to down
Nov  5 12:37:34.133: %LINK-3-UPDOWN: Interface GigabitEthernet0/4, changed state to down
Nov  5 12:37:37.530: %LINK-3-UPDOWN: Interface GigabitEthernet0/5, changed state to up
Nov  5 12:37:38.531: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/5, changed state to up
Nov  5 12:37:40.927: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/5, changed state to down
Nov  5 12:37:41.934: %LINK-3-UPDOWN: Interface GigabitEthernet0/5, changed state to down
Nov  5 12:37:42.170: %LINK-3-UPDOWN: Interface GigabitEthernet0/4, changed state to up
Nov  5 12:37:43.171: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/4, changed state to up
Nov  5 12:37:44.891: %LINK-3-UPDOWN: Interface GigabitEthernet0/5, changed state to up
Nov  5 12:37:45.892: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/5, changed state to up
Nov  5 12:37:50.008: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/4, changed state to down
Nov  5 12:37:51.015: %LINK-3-UPDOWN: Interface GigabitEthernet0/4, changed state to down
Nov  5 12:37:52.289: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/5, changed state to down
Nov  5 12:37:53.295: %LINK-3-UPDOWN: Interface GigabitEthernet0/5, changed state to down
Nov  5 12:37:54.050: %LINK-3-UPDOWN: Interface GigabitEthernet0/4, changed state to up
Nov  5 12:37:55.052: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/4, changed state to up
Nov  5 12:37:56.289: %LINK-3-UPDOWN: Interface GigabitEthernet0/5, changed state to up
Nov  5 12:37:57.290: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/5, changed state to up
Nov  5 12:38:04.683: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/4, changed state to down
Nov  5 12:38:05.689: %LINK-3-UPDOWN: Interface GigabitEthernet0/4, changed state to down
Nov  5 12:38:07.084: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/5, changed state to down
Nov  5 12:38:08.091: %LINK-3-UPDOWN: Interface GigabitEthernet0/5, changed state to down
Nov  5 12:38:09.485: %LINK-3-UPDOWN: Interface GigabitEthernet0/4, changed state to up
Nov  5 12:38:10.487: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/4, changed state to up
Nov  5 12:38:11.766: %LINK-3-UPDOWN: Interface GigabitEthernet0/5, changed state to up
Nov  5 12:38:12.767: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/5, changed state to up

































Switch con0 is now available





Press RETURN to get started.






Switch>
Switch>
Switch>en
Switch#sh run
Building configuration...

Current configuration : 963 bytes
!
! Last configuration change at 05:26:11 UTC Wed Mar 30 2011
! NVRAM config last updated at 12:36:41 UTC Thu Nov 5 2020
!
version 15.0
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Switch
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
system mtu routing 1500
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
!
!
!
!
!
!
!
!
vlan internal allocation policy ascending
!
!
!
!
!
!
!
!
!
!
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface GigabitEthernet0/3
!
interface GigabitEthernet0/4
!
interface GigabitEthernet0/5
!
interface GigabitEthernet0/6
!
interface GigabitEthernet0/7
!
interface GigabitEthernet0/8
!
interface GigabitEthernet0/9
!
interface GigabitEthernet0/10
!
interface Vlan1
 ip address 192.168.0.66 255.255.255.0
!
ip http server
ip http secure-server
!
!
!
!
!
line con 0
line vty 5 15
!
ntp master
end

Switch#
Les MooreSystems Architect
CERTIFIED EXPERT
Top Expert 2008

Commented:
Once you set the switch as ntp master, you can use the ip address as ntp source for esx.
Switch(conf)# ntp mast 3
      #  Ntp server 192.5.41.41 pref
.      #End
        #wri mem
This will sync your swich to a master stratum 1 source, and you will become a ntp master stratum 2 source for local devices.
This is assuming you have internet access from that switch

Author

Commented:
Hi Les,

I wont always have internet access in my home lab so I want to use the Switch as the Stratum master.  

Would I use:

NTP mast 1
Ntp server (IP address of switch) pref

Thanks!
Les MooreSystems Architect
CERTIFIED EXPERT
Top Expert 2008

Commented:
No, you can leave it just like i posted.
The server commands are where your switch will get authorative time. If you only want to be a master you dont put in a server.
Just use the switch ip as ntp server on other devices like esx

Author

Commented:
Les, just about there but one quick question!

Can you confirm the following syntax on the switch?
Switch(conf)# ntp mast 3
      #  Ntp server x.x.x.x pref  - is this the Switch IP?
.      #End
        #wri mem

And then input the switch IP into ESXI hosts.
Systems Architect
CERTIFIED EXPERT
Top Expert 2008
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

Commented:
Thanks all -

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions