cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1573
Views
20
Helpful
13
Replies

Time synchronization via Broadcast

frank.ring
Level 1
Level 1

Hello
I have questions about the ntp broadcast (server) <--> ntp broadcast client.
In my scenario is:
On router R1 (NTP server on 1841 router) the ntp broadcast is active on Fa8 (trunk port).
On SW1 (Catalyst 2960) the ntp broadcast client is on Fa0/13 (trunk port).
From the switch I can "ping" the router R1
At what intervals is the time broadcast from the server and what accuracy can be expected?
Is there any way to "debug" this kind of time sysnchronization.
I don't see any time correction on the client.

1 Accepted Solution

Accepted Solutions

frank.ring
Level 1
Level 1

Ok. Problem found. not all vlans were enabled on the trunk. Alternative vlan on the server set to broadcasting (VLAN 99), now it runs - stupid error - thanks for your help!
Here are the new logs:

Jan 4 09:48:32.993: NTP recv pkt on v4 socket, pak = 0x029CA8EC.
Jan 4 09:48:33.001: NTP message received from 10.15.99.1 on interface 'Vlan99' (10.15.99.2):
Jan 4 09:48:33.001:
NTP Header:
Leap = 00, Version = 3, Mode = 4,
Stratum = 2,
Poll Interval = 6,
Precision = -18,
Root Delay = 0.850,
Root Dispersion = 0.140,
refid = 192.33.96.102,
Last update reftime = 3881814571.1858855000,
Originated time = 3881814512.4017030050,
Received time = 3881814642.536004346,
Transmit time = 3881814642.536049700.
Hexadecimal equivalent (length = 48):
0000: 1C 02 06 EE 00 00 03 52
0008: 00 00 00 8C C0 21 60 66
0010: E7 5F CA 2B 6E CB E0 58
0018: E7 5F C9 F0 EF 6F 03 A2
0020: E7 5F CA 72 1F F2 C6 FA
0028: E7 5F CA 72 1F F3 78 24
Jan 4 09:48:33.001: NTP Core(DEBUG): ntp_receive: message received
Jan 4 09:48:33.001: NTP Core(DEBUG): ntp_receive: peer is 0x01FBB5A8, next action is 1.
Jan 4 09:48:33.001: NTP Core(DEBUG): receive: packet given to process_packet
Jan 4 09:48:33.001: NTP Core(DEBUG): Peer becomes reachable, poll set to 6.
Jan 4 09:48:33.001: NTP Core(INFO): peer 10.15.99.1 event 'event_reach' (0x84) status 'unreach, 1 event, event_reach' (0x14)
Jan 4 09:48:33.001: NTP Core(INFO): synchronized to 10.15.99.1, stratum 2
Jan 4 09:48:33.001: NTP: step(0x00000081.27F01065): local_offset = 0x00000000.00000000, curtime = 0xE75FC9F1.005ED1F4
Jan 4 09:50:42.157: NTP Core(NOTICE): time reset 129.156006 s
Jan 4 09:50:42.157: NTP Core(DEBUG): bcast client cleared
Jan 4 09:51:41.448: NTP recv pkt on v4 socket, pak = 0x021F9650.
Jan 4 09:51:41.448: NTP message received from 10.15.99.1 on interface 'Vlan99' (255.255.255.255):
Jan 4 09:51:41.448:

View solution in original post

13 Replies 13

the NTP broadcast need config in server and client 
in server 
ntp broadcast 
in client 
ntp broadcast client 

frank.ring
Level 1
Level 1

Thanks for the response.
This is how I configured R1 and SW1, according to instructions from the manuals

are the time different is large ? if yes then it need long time to adjust, 
workaround is manual adjust the time to be near the value and then check again.

frank.ring
Level 1
Level 1

At the moment I have set the time manually on the client with about 3 minutes deviation from the server. This remains so and is not adjusted to the server.

3 min but which year ? is it same or many year different between both side ?

frank.ring
Level 1
Level 1

year and date are set correctly on both devices 

 

  • debug ntp packets
  • debug ntp validity
  • debug ntp sync
  • debug ntp events

    share the debug if you can, first start with ntp packets to check if both peer exchange ntp message, then try other debug.

frank.ring
Level 1
Level 1

On SW1 I have the debugging running, this is what I got. The time has not been corrected after 12 h.

sw1#debug ntp all
NTP events debugging is on
NTP core messages debugging is on
NTP clock adjustments debugging is on
NTP reference clocks debugging is on
NTP packets debugging is on

sw1#
Jan 4 08:59:59.939: NTP Core(DEBUG): drift value to save: 0.000000000
Jan 4 08:59:59.939: %NTP : Drift string saved to persistent data: NTPv4_Drift=0.0
Jan 4 08:59:59.939: NTP Core(DEBUG): drift value saved.
Jan 4 08:59:59.939: NTP Core(DEBUG): hourly stats called. Count=15

share the 
show ntp asso detail 

frank.ring
Level 1
Level 1

Ok. Problem found. not all vlans were enabled on the trunk. Alternative vlan on the server set to broadcasting (VLAN 99), now it runs - stupid error - thanks for your help!
Here are the new logs:

Jan 4 09:48:32.993: NTP recv pkt on v4 socket, pak = 0x029CA8EC.
Jan 4 09:48:33.001: NTP message received from 10.15.99.1 on interface 'Vlan99' (10.15.99.2):
Jan 4 09:48:33.001:
NTP Header:
Leap = 00, Version = 3, Mode = 4,
Stratum = 2,
Poll Interval = 6,
Precision = -18,
Root Delay = 0.850,
Root Dispersion = 0.140,
refid = 192.33.96.102,
Last update reftime = 3881814571.1858855000,
Originated time = 3881814512.4017030050,
Received time = 3881814642.536004346,
Transmit time = 3881814642.536049700.
Hexadecimal equivalent (length = 48):
0000: 1C 02 06 EE 00 00 03 52
0008: 00 00 00 8C C0 21 60 66
0010: E7 5F CA 2B 6E CB E0 58
0018: E7 5F C9 F0 EF 6F 03 A2
0020: E7 5F CA 72 1F F2 C6 FA
0028: E7 5F CA 72 1F F3 78 24
Jan 4 09:48:33.001: NTP Core(DEBUG): ntp_receive: message received
Jan 4 09:48:33.001: NTP Core(DEBUG): ntp_receive: peer is 0x01FBB5A8, next action is 1.
Jan 4 09:48:33.001: NTP Core(DEBUG): receive: packet given to process_packet
Jan 4 09:48:33.001: NTP Core(DEBUG): Peer becomes reachable, poll set to 6.
Jan 4 09:48:33.001: NTP Core(INFO): peer 10.15.99.1 event 'event_reach' (0x84) status 'unreach, 1 event, event_reach' (0x14)
Jan 4 09:48:33.001: NTP Core(INFO): synchronized to 10.15.99.1, stratum 2
Jan 4 09:48:33.001: NTP: step(0x00000081.27F01065): local_offset = 0x00000000.00000000, curtime = 0xE75FC9F1.005ED1F4
Jan 4 09:50:42.157: NTP Core(NOTICE): time reset 129.156006 s
Jan 4 09:50:42.157: NTP Core(DEBUG): bcast client cleared
Jan 4 09:51:41.448: NTP recv pkt on v4 socket, pak = 0x021F9650.
Jan 4 09:51:41.448: NTP message received from 10.15.99.1 on interface 'Vlan99' (255.255.255.255):
Jan 4 09:51:41.448:

You are so so welcome friend, 
yes debug ntp packet save us today. 
happy new year.

Hello,

can you post the full running configs (sh run) of both the 1841 and the 2960 ?

 

frank.ring
Level 1
Level 1

Here are the two outputs of the running config.
The devices are set up for test purposes only and have no security mechanisms set up!

Router:

rt1812#sho run

Building configuration...

 

Current configuration : 3051 bytes

!

! Last configuration change at 11:01:12 GMT Wed Jan 4 2023

!

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname rt1812

!

boot-start-marker

boot-end-marker

!

enable secret 5 $1$gCSE$Hd7rNDhD7b98ZBjc5S.cS1

enable password xyz

!

no aaa new-model

clock timezone GMT 1

clock summer-time EU recurring last Sun Mar 1:00 last Sun Oct 2:00

!

!

dot11 syslog

!

!

ip cef

no ip dhcp use vrf connected

ip dhcp excluded-address 10.15.25.1 10.15.25.2

ip dhcp excluded-address 10.15.99.1 10.15.99.2

ip dhcp excluded-address 10.15.10.1 10.15.10.100

ip dhcp excluded-address 10.15.10.150 10.15.10.254

!         

ip dhcp pool vPool10

   network 10.15.10.0 255.255.255.0

   default-router 10.15.10.1 

   dns-server 157.161.9.7 8.8.8.8 

!         

ip dhcp pool vPool25

   network 10.15.25.0 255.255.255.240

   default-router 10.15.25.1 

   dns-server 157.161.9.7 8.8.8.8 

!         

ip dhcp pool vPool99

   network 10.15.99.0 255.255.255.240

   default-router 10.15.99.1 

   dns-server 157.161.9.7 8.8.8.8 

!         

!         

ip name-server 157.161.9.7

ip name-server 8.8.8.8

!         

multilink bundle-name authenticated

!         

!         

!         

!         

archive   

 log config

  hidekeys

!         

!         

!         

!         

!         

interface FastEthernet0

 no ip address

 shutdown 

 duplex auto

 speed auto

!         

interface FastEthernet1

 ip address dhcp

 ip nat outside

 ip virtual-reassembly

 duplex auto

 speed auto

!         

interface BRI0

 no ip address

 encapsulation hdlc

 shutdown 

 isdn point-to-point-setup

!         

interface FastEthernet2

 switchport access vlan 10

!         

interface FastEthernet3

 switchport access vlan 10

!         

interface FastEthernet4

 switchport access vlan 10

!         

interface FastEthernet5

 switchport access vlan 10

!         

interface FastEthernet6

 switchport trunk native vlan 99

 switchport mode trunk

!         

interface FastEthernet7

 switchport mode trunk

!         

interface FastEthernet8

 switchport trunk native vlan 99

 switchport trunk allowed vlan 1,25,99,1002-1005

 switchport mode trunk

 ntp broadcast

!         

interface FastEthernet9

 shutdown 

!         

interface Vlan1

 no ip address

 shutdown 

!         

interface Vlan10

 ip address 10.15.10.1 255.255.255.0

 ip nat inside

 ip virtual-reassembly

 ntp broadcast

!         

interface Vlan25

 ip address 10.15.25.1 255.255.255.240

 ip nat inside

 ip virtual-reassembly

!         

interface Vlan99

 ip address 10.15.99.1 255.255.255.240

 ip nat inside

 ip virtual-reassembly

 ntp broadcast

!         

interface Vlan12

 no ip address

!         

ip forward-protocol nd

!         

!         

no ip http server

no ip http secure-server

ip nat inside source static udp 192.168.10.104 51820 interface FastEthernet1 51820

ip nat inside source list 10 interface FastEthernet1 overload

ip nat inside source list 25 interface FastEthernet1 overload

ip nat inside source list 99 interface FastEthernet1 overload

!         

access-list 10 permit 10.15.10.0 0.0.0.255

access-list 25 permit 10.15.25.0 0.0.0.15

access-list 99 permit 10.15.99.0 0.0.0.15

dialer-list 1 protocol ip permit

!         

!         

!         

!         

!         

!         

control-plane

!         

!         

line con 0

line aux 0

line vty 0 4

 password xyz

 login    

!         

ntp clock-period 17180072

ntp update-calendar

ntp server 192.33.96.102

end       

*******************************************************

Switch:

sw1#sho run
Building configuration...
Current configuration : 1591 bytes
!
! Last configuration change at 10:29:20 GMT Wed Jan 4 2023
!
version 15.0
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname sw1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
clock timezone GMT 1 0
clock summer-time eu recurring last Sun Mar 1:00 last Sun Oct 2:00
system mtu routing 1500
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
!
!
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
switchport trunk native vlan 99
switchport trunk allowed vlan 1,25,99,1002-1005
switchport mode trunk
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
no ip route-cache
!
interface Vlan99
ip address 10.15.99.2 255.255.255.240
no ip route-cache
ntp broadcast client
!
ip http server
ip http secure-server
!
!
line con 0
line vty 5 15
!
end