Dahua IPC-HFW1320S will not send NTP packets

oldunixguy

n3wb
Aug 8, 2017
5
0
I have 7 of these devices all at the same revision 2.600.0005.0.R, Build Date: 2016-12-19

None of them will send out an NTP request. I have configured a private network on a PC. I run wireshark and can examine all the packets to and from any camera. There are NO NTP packets requests coming from any camera.

I have the Setup configured with Synchronize with NTP Checked, server pool.ntp.org, port 123, update period 1 minute.

Other update periods dont change the result.

Anyone have any ideas?

thanks
oldunixguy
 
Just to check make, your Laptop/PC as NTP server and add your PC/Laptop ip to your cameras NTP ... if Cams are on NVR then Enable NVR with Same NTP IP..... Hopefully it will work
 
I run wireshark and can examine all the packets to and from any camera. There are NO NTP packets requests coming from any camera.
Does this mean the you have port mirroring active on the switch?
The NTP requests are not broadcasts, they are TCP connections, normally not forwarded to other non-destination nodes of a switch.

have configured a private network on a PC.
Including a DNS server destination as configured on the camera, with a name resolution for pool.ntp.org to an IP address that your PC/wireshark is able to listen to?
And that's before it even gets to using the NTP protocol.
 
dns is setup on the camera. gateway is configured for the server on the same subnet. DNS and NTP should be forwarded to the Gateway.

But I cant attest that it works! If NTP doesnt work then maybe Dahua's got bad networking code and DNS doesnt work either.

Wireshark is sniffing on the SAME subnet on the server that all traffic comes to; the switch is not an issue.

I can see "other" packets for the video coming from the camera with wireshark.... but the cameras NEVER issue a NTP request. period. NVR is Blue Iris. [I have been doing networking design and software since 1983 and have a good bit of expertise in this area.]

I havnt found a way to report this bug to Dahua but I do see others elsewhere reporting Dahua cameras not working with NTP.

I will try one other thing and that is to use a real IP address (versus a domain name) and see if that helps.

Any other suggestions?

thanks
oldunixguy
 
[I have been doing networking design and software since 1983 and have a good bit of expertise in this area.]
OK - no insult was intended, you'll probably know better than most that special measure are needed to give wireshark the ability to sniff all packets on your average switch, not just broadcasts. many users will not realise that. And your 'server in the middle' seems to qualify as such. Is it set up as a proxy?
I will try one other thing and that is to use a real IP address (versus a domain name) and see if that helps.
Does that mean you have not seen any DNS requests either from the cameras for pool.ntp.org ?
 
OK I have spent a good bit of time going back to basics. Forget NTP and DNS for the moment. I will get back to them. Note that NTP works if I use an IP instead of a domain name (thus obviating DNS not working).

In my earlier work I noticed that DHCP was not working either. So for all of my work thus far I had set static values in the Dahua configuration. Attached shows the values for the Static. Notice that the current mode indicated is DHCP but this is not working!

So, I have returned to this fundamental matter of getting DHCP working.

I have my DHCP server on the same LAN. The camera's MAC is e0:50:8b:65:f9:29
I have captured with wireshark the DHCP request from the camera and the response from the server. both of these first 2 packets are correct.

The problem is that the camera does NOT for some reason get satisfied. It continues to make the same request over and over without stopping.

Any suggestions?
thanks
oldunixguy
 

Attachments

The problem is that the camera does NOT for some reason get satisfied. It continues to make the same request over and over without stopping.

Any suggestions?
Guessing a bit here, as it's down in the detail that would need to be tested to confirm:
The camera request list exceeds the offer list, so the camera asks again.

Suggestion as an experiment - either untick 'use NTP' on the camera to see if it no longer requests a time server or NTP servers, and if not does that change the offer response, or if you have a suitably capable DHCP server, add the NTP types 4 and 42 to the offer and see if that changes the response.
 
After reporting last nite I went back and experimented with a couple of things.... I added 2 response items, netmask and default gateway, to the dhcp server config. And as you have speculated the camera was happy and stopped making repeated requests. I looked at the dhcp RFCs to find out what the server was required at a minimum to reply with and did not find that.... Nonetheless experimenting did the trick.
thanks
oldunixguy
 
And now back to DHCP problems which kick this all off.... I still have DHCP issues in that the camera does NOT issue a DHCP request upon startup. I was able to under certain conditions for the camera to make the request. I am unsure what those conditions are. Here is why. If I select the "static" IP mode and set the parameters, save and reboot this works. If I immediately go in and simply select the DHCP, save and reboot it will NOT issue DHCP requests. I can reboot or power cycle repeatedly and it will not issue a DHCP request. I have tired going to Static and changing some of the IP parameters, saving, rebooting, going back to DHCP yet the cameras will not go back to DHCP.

Back when I started all of this I couldnt get it to issue DHCP. Then attempting to tweak various parameters magically caused it to start DHCPing. Roll forward to now and they are not DHCPing. I have confirmed that the DHCP server is working and that the camera otherwise does NTP and video. This is a DHCP work/not work issue.

[Update]
I have studied the packets sent by this camera with wireshark. It does NOT do what is normally done by most networked devices. Regardless of what is currently configured for the IP parameters, such as an IP address of say 10.0.1.101 and irrespective of Static or DHCP mode, it ALWAYS first sends out ARP packets using the 192.168.1.108 IP address. This is wrong. Here is the first packet emitted:

Frame 1: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Ethernet II, Src: e0:50:8b:8d:59:c7, Dst: ff:ff:ff:ff:ff:ff
Address Resolution Protocol (request)
Hardware type: Ethernet (1)
Protocol type: IPv4 (0x0800)
Hardware size: 6
Protocol size: 4
Opcode: request (1)
Sender MAC address: e0:50:8b:8d:59:c7
Sender IP address: 192.168.1.108 (192.168.1.108)
Target MAC address: 00:00:00:00:00:00
Target IP address: 192.168.1.1 (192.168.1.1)

How do we report bugs to Dahua?

thanks
oldunixguy
 
Last edited: