# DHCP + TFTP on dnsmasq

dnsmasq config is very simple. Just check it here <https://yulistic.gitlab.io/2018/03/configuring-dnsmasq-only-for-dhcp-server-in-ubuntu-pc/> or here <https://wiki.archlinux.org/title/dnsmasq>

Here's my example:

```
#Disable DNS Server
port=0
server=192.168.0.1

#Enable DHCP logging
log-dhcp

#Respond to PXE request for the specified network;
#Run as DHCP proxy
dhcp-range=192.168.0.0,proxy,255.255.255.0

dhcp-boot=pxelinux.0

#Flag forces "simple and safe" behaviour
dhcp-no-override

#Provide network boot option called "Network Boot"
pxe-service=x86PC,"Network Boot",pxelinux

enable-tftp
tftp-root=/srv/tftpboot
```

It can support both BIOS and UEFI clients by serving them specific files depending on their architecture.

But proxy DHCP and TFTP worked fine till the known bug in Grub 2.06, but with DHCP and TFTP enabled in dnsmasq you can get

```
pxe e16 error no offer were received
```

{% content-ref url="/pages/oRTKV1EnOxhB8HDzHH8y" %}
[PXE-E16: No offer received](/pxe-boot/troubleshooting/pxe-e16-no-offer-received.md)
{% endcontent-ref %}

To debug this situation I started collecting TCP packets on Raspberry Pi with

```
sudo tcpdump -i eth0 udp port 67 and port 68 -e -n -vv
```

So really, less packet, no offer.

{% file src="/files/-Mgj\_ySLnwCZQkhso6UW" %}
proxy DHCP and TFTP
{% endfile %}

{% file src="/files/-Mgja-TRYAYuz30zSU6W" %}
DHCP and TFTP
{% endfile %}

I assume there is bug in dnsmasq. And because I already disabled DHCP server on my router nothing can stop me to test another standalone DHCP and TFTP server.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://neupokoev-n.gitbook.io/pxe-boot/dhcp-+-tftp-on-dnsmasq.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
