0

An extremely simple DHCP server works reliably with Windows 10 PCs and Android devices. It receives DHCP Discover from a client, replies with DHCP Offer, then receives DHCP Request from a client.

However, it does not work with a device using DHCP4. It receives DHCP Discover from it, and replies with DHCP Offer, but never receives DHCP Request from the client. This is confirmed by Wireshark analysis. It appears the DHCP4 client either noes not receive the DHCP Offer or completely ignores it.

The DHCP client works with different routers' DHCP servers without any problem, so I blame the DHCP server.

This DHCP server has one thing different from a typical DHCP server: it does not use the privileged port 67 as the source port to send messages. I thought DHCP clients would not care about the source port of the replies to their DHCP Discover. The protocol does not seem to require the messages from the server to be sent from port 67. It requires them to be sent to port 68.

Could any experts offer some clues about the issue? I have the complete control of the DHCP server, and I will be very happy to try any suggestions.

Edit:

Please note this question is not for making any particular device running DHCP4 work with the DHCP server. This question is about how to modify the DHCP server so that it will work with all DHCP4 clients.

yagmoth555
  • 16,300
  • 4
  • 26
  • 48
Hong
  • 111
  • 1
  • 5
  • dhcp-helper or HSRP involved ? – yagmoth555 May 16 '16 at 19:53
  • @yagmoth555 I have no idea what dhcp-helper or HSRP is. The client is an Axis camera. An Axis engineer told me it uses DHCP4. – Hong May 16 '16 at 20:28
  • In big, how that camera is connected to your LAN, in a switch with your dhcp server near ? the technology I told are if you use a dhcp not in your LAN in big. – yagmoth555 May 16 '16 at 20:47
  • @yagmoth555 The camera is connected to the server directly via an Ethernet cable. – Hong May 16 '16 at 20:52
  • directly, no switch? – yagmoth555 May 16 '16 at 23:22
  • @yagmoth555 Yes, no switch, just one Ethernet cable. – Hong May 16 '16 at 23:35
  • put that cam in static ip then ! – yagmoth555 May 17 '16 at 00:27
  • @yagmoth555 I can do that. What should I do next to diagnose the DHCP server? – Hong May 17 '16 at 01:21
  • Diagnose what ? you only have one cable directly in the cam. without switch, the dhcp have nothing other to serve – yagmoth555 May 17 '16 at 02:09
  • @yagmoth555 diagnose why the DHCP server does not work with the client. The server is meant to serve all Axis IP cameras that are usually set to use DHCP by default. That particular camera is used merely for testing. – Hong May 17 '16 at 02:23
  • update the firmware of that cam then, your dhcp server if what OS ? – yagmoth555 May 17 '16 at 03:28
  • @yagmoth555 I am sorry but I have just realized that my question has totally confused you. I will edit it to make is clearer. My question is not about making any particular camera work. My question is about finding out what is wrong the DHCP server and how to remedy it. – Hong May 17 '16 at 03:51
  • 1
    Why do you think the server is at fault? – Michael Hampton May 17 '16 at 04:28
  • @MichaelHampton This is because the client works with numerous routers without any problem. – Hong May 17 '16 at 10:44
  • You didnt answer my question of what dhcp server it's, and the firmware is because it can be a bug in the network stack of the client. – yagmoth555 May 17 '16 at 12:59
  • And that line **This DHCP server has one thing different from a typical DHCP server: it does not use the privileged port 67** make me wonder why you changed that. – yagmoth555 May 17 '16 at 13:03
  • @yagmoth555 Sorry for missing your question. The DHCP server is what I am implementing and this is why I stated in my question that I have complete control of the DHCP server, but the sever cannot use the privileged port 67 on Android. – Hong May 17 '16 at 13:30

1 Answers1

1

I suspect an android limitation (and I can't see a legal use to make a DHCP server app on android either). Please see RFC2131 for further reference.

DHCP uses UDP as its transport protocol. DHCP messages from a client to a server are sent to the 'DHCP server' port (67), and DHCP messages from a server to a client are sent to the 'DHCP client' port (68).

yagmoth555
  • 16,300
  • 4
  • 26
  • 48