# No response from the server after sending a DHCP request

**URL:** <https://forums.freertos.org/t/no-response-from-the-server-after-sending-a-dhcp-request/6347>\
**Category:** Kernel\
**Created:** [January 12, 2017, 9:12am UTC](https://forums.freertos.org/t/no-response-from-the-server-after-sending-a-dhcp-request/6347 "2017-01-12T09:12:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [January 12, 2017, 9:12am UTC](https://forums.freertos.org/t/no-response-from-the-server-after-sending-a-dhcp-request/6347/1 "2017-01-12T09:12:58Z")

</div>

**[orifai01](https://sourceforge.net/u/orifai01/)** wrote on [Thursday, January 12, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/761c9608/#f41a):

Hello,  
I have a working FreeRTOS + TCP/IP application which manages to receive and send responses to pings.  
In WireShark can see that FreeRTOS sends DHCP discover messages as both unicast and broadcast, yet there is no response received from the server (I suppose I should look for a packet directed to my MAC address, shall enter the first query in eConsiderFrameForProcessing function). What could be the reason for that?  
Attached are shapshot of FreeRTOS discover request and a DHCP discover of some service (which I couldn’t turn off) for comparison.

[https://s29.postimg.org/49b73hwxj/Discover\_Packet\_Free\_RTOS.png](https://s29.postimg.org/49b73hwxj/Discover_Packet_Free_RTOS.png)  
[https://s24.postimg.org/5b788fbv9/Discover\_Packet\_Not\_Free\_RTOS.png](https://s24.postimg.org/5b788fbv9/Discover_Packet_Not_Free_RTOS.png)

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [January 12, 2017, 10:14am UTC](https://forums.freertos.org/t/no-response-from-the-server-after-sending-a-dhcp-request/6347/2 "2017-01-12T10:14:01Z")

</div>

**[orifai01](https://sourceforge.net/u/orifai01/)** wrote on [Thursday, January 12, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/761c9608/#4451):

For some reason, setting ipconfigDRIVER\_INCLUDED\_TX\_IP\_CHECKSUM and ipconfigDRIVER\_INCLUDED\_RX\_IP\_CHECKSUM to 0 has solved the problem.

---

<div class="post-metadata">

**Author:** ![htibosch](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/htibosch/32/62_2.png) [@htibosch](https://forums.freertos.org/u/htibosch)\
**Post date:** [January 12, 2017, 10:19am UTC](https://forums.freertos.org/t/no-response-from-the-server-after-sending-a-dhcp-request/6347/3 "2017-01-12T10:19:36Z")

</div>

**[heinbali01](https://sourceforge.net/u/heinbali01/)** wrote on [Thursday, January 12, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/761c9608/#45ed):

Hi Orit,

When developing DHCP it can be handy to install a temporary DHCP-server on your own laptop. In that way you make sure to see all messages in WireShark.

Here is an example of a DHCP server: [https://sourceforge.net/projects/dhcp-dns-server](https://sourceforge.net/projects/dhcp-dns-server) I chose the option “Run stand alone”, it runs from a command-prompt.

The DHCP client will use both ‘unicast’ and ‘broadcast’, it starts with a unicast (`dhcpBROADCAST` flag cleared).

When the answer comes in, it is directed to UDP port 68, and `xPortHasUDPSocket()` should return pdTRUE for that port.

Make sure that your EMAC accepts the Ethernet broadcast address of all 1’s.

---

<div class="post-metadata">

**Author:** ![htibosch](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/htibosch/32/62_2.png) [@htibosch](https://forums.freertos.org/u/htibosch)\
**Post date:** [January 12, 2017, 10:26am UTC](https://forums.freertos.org/t/no-response-from-the-server-after-sending-a-dhcp-request/6347/4 "2017-01-12T10:26:28Z")

</div>

**[heinbali01](https://sourceforge.net/u/heinbali01/)** wrote on [Thursday, January 12, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/761c9608/#86be):

Our posts were crossing each other.

> enabling LLMNR and setting ipconfigDHCP\_REGISTER\_HOSTNAME to 1 have solved the problem.

Good to hear. I’m not sure why changing those features would make DHCP working.

I tested the DHCP client with LLMNR, with NBNS, and also without any name service at all.

Does LLMNR cause different settings in your NetworkInterface.c ?

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [January 12, 2017, 12:00pm UTC](https://forums.freertos.org/t/no-response-from-the-server-after-sending-a-dhcp-request/6347/5 "2017-01-12T12:00:48Z")

</div>

**[orifai01](https://sourceforge.net/u/orifai01/)** wrote on [Thursday, January 12, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/761c9608/#fc58):

Hi Hein, thank you for your answer.  
As mentioned above, apparently setting ipconfigDRIVER\_INCLUDED\_TX\_IP\_CHECKSUM and ipconfigDRIVER\_INCLUDED\_RX\_IP\_CHECKSUM to 0 has solved the problem. I’ll enable the Checksum Offload Engine in the ethernet controller (LAN9220) in order to set them again to 1.

---

<div class="post-metadata">

**Author:** ![htibosch](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/htibosch/32/62_2.png) [@htibosch](https://forums.freertos.org/u/htibosch)\
**Post date:** [January 12, 2017, 3:13pm UTC](https://forums.freertos.org/t/no-response-from-the-server-after-sending-a-dhcp-request/6347/6 "2017-01-12T15:13:21Z")

</div>

**[heinbali01](https://sourceforge.net/u/heinbali01/)** wrote on [Thursday, January 12, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/761c9608/#8002):

All good, you’re getting closer and closer.

Note that the “Checksum Offload Engine” must be studie well: test it with TCP, UDP, and ICMP messages. Some EMAC’s want you to set the checksum field(s) to zero first, others don’t care about the value.

Please feel free to publish you NetworkInterface.c or send it to us directly, so I can have a look.

Thanks, Hein
