Debug outgoing DHCP

Hey folks!

Recently my internet connection became very unstable - it was not working for days.
I spoke with my provider ( and they told me that there might be a problem on my side:

I was also able to determine that your router successfully sent a Discover on 15.09. at 15:15 and again obtained an IPv4 address, unfortunately I also had to determine that the router has since sent out more Discovers. Therefore I still believe that something is wrong with the router.

A Discover is sent out as soon as the router reboots or has no IPv4 address for a longer time.

Normally it should send a Discover 1 time and then only send requests to extend the lease.

I’m wondering how I can check what DHCP requests does my router sends to provider. In logs I can see DHCP events related to local network only…

And youre DNS settings (reForis - Network Setings - DNS) is - forward YES or NO ?

Yes, I have forwarding enabled (Cloudflare (TLS)). But I’m not sure how DNS is related to DHCP.

1 Like

I understand this correctly: does your server not have an assigned IP address from an IP provider (will it lose it indefinitely)? Did you verify the WAN settings?

The client communicates on UDP port 68, the server listens on UDP port 67. After connecting to the network, the client sends a DHCPDISCOVER broadcast packet. The DHCP server responds with a DHCPOFFER packet with an IP address offer. The client chooses one IP address from (theoretically several) menus and requests it with a DHCPREQUEST packet. The server immediately confirms it with a DHCPACK response. Once the client receives the DHCPACK, it can use the IP address and the remaining settings. The client must renew its IP address before the DHCPACK lease expires. If the time expires without receiving a new confirmation, the client must stop using the IP address.

The protocol also defines the role of the so-called DHCP relay agent. Used when there are two or more networks separated by a router and only one network contains a DHCP server. In this case, the administrator turns on the relay agent on the router and sets it to forward DHCP queries from networks without a DHCP server to the DHCP server. The agent adds the network number and netmask to which the client heard the forwarded query so that the DHCP server knows from which address range to assign the address to the client.

For checking (initial) DHCP communication use this command
ifup wan && sleep 2 && tcpdump -i eth2 -pvn port 67 and port 68 # elaborate whit sleep time, tcpdump must stay active.

Install tcpdump
opkg update
opkg install tcpdump

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.