Tuesday, August 03, 2021

How to troubleshoot DHCP issues?

Hi all,

Me again on some DHCP-related issues...

So I started using OpenBSD as my home router around two weeks ago,
running openBSD 6.9. It obtains its IP address from the ISP via
DHCP. The setup is pretty simple, just the following two lines in
my hostname.if file:

lladdr random
inet autoconf

The router works fine most of the time -- except that it stops
working every one and a half day, and I have to reset the modem
for it to work again.

After doing what is in my knowledge to troubleshoot this issue,
I'm still clueless as to what might be causing the problem, thus
hoping to seek some help here.

Can anyone offer some suggestions on what I can do to nail down
the issue?

Below are some of the observations I've made so far:

- Doesn't matter whether I'm using dhclient of dhcpleased, same
issue.

- When it stops working, tcpdump still shows outgoing packets,
checksums all OK, but no incoming packets.

- `dhcpleasectl show interface <if>` shows that there is still
one day before the lease expires.

- When this first happens, `arp -a` shows that the link layer
address of the gateway is still in the ARP table. But of course
it will expire after some time, and the router won't be able to
obtain the link layer address of the gateway again after that.

- The `netstat -R` still shows the IP address of the gateway.

- My ISP would offer a few short leases at first, and then offer a
two day lease. This issue seems always to occur around half way
of the two day lease period.

- I tried several interface cards with drivers including axen, ure,
axe, bse. axen dies every 10-20 min, outputing some watchdog
timeout error; ure has the same issue described here, but throws
some rx/tx error to dmesg in addition; bse and axe doesn't seem
to output any errors, but both have the issue described here.

- The issue doesn't occur when the IP address is statically
assigned.

- Didn't experience this problem when I was running Linux on the
same machine (raspberry pi 4B).

Best Regards

No comments:

Post a Comment