OPNsense Forum

English Forums => General Discussion => Topic started by: marius_siuram on October 03, 2021, 10:27:36 am

Title: Missing circuit id data when DHCP Relay is configured
Post by: marius_siuram on October 03, 2021, 10:27:36 am
Maybe I am missing something very obvious, but I cannot get the DHCP target to receive the circuit information from OPNSense.

My setup consists basically on a few VLAN and I was trying to setup an authoritative DHCP server (outside the OPNSense appliance). I activated the Append circuit ID and agent ID to requests flag but I was not getting information in the dnsmasq box.

At first I believed that ther was some limitation on dnsmasq and now was trying with the ISC kea DHCP server. However, I get the following:

Code: [Select]
DEBUG DHCP4_PACKET_RECEIVED ...
DEBUG DHCP4_QUERY_DATA (...)
options:
    (...)
   type=082, len=016:,
options:
     type=001, len=014: ...

All options (client identifier, hostname, relay information, etc.) is received correctly on the ISC kea server. However the circuit id field (option 82) receives something buggy. dnsmasq was missing that information too, so... am I missing something obvious on DHCP server configuration? There are not a lot of options to tweak on the OPNsense side.
Title: Re: Missing circuit id data when DHCP Relay is configured
Post by: marius_siuram on October 03, 2021, 01:33:05 pm
A colleague suggested to bring the big guns and use Wireshark. The right tool for the job I guess.

OPNSense is properly sending the Device (The real device name of this interface. ). For some reason, dnsmasq doesn't log it. For some reason, kea ISC DHCP server logging refuses to print it. But the packet is correctly formatted, so OPNSense relay mechanism is working as intended.

The documentation for Append circuit ID and agent ID to requests was misleading for an ignorant such as myself. It says something about the "interface number" which is a concept that doesn't appear anywhere else on OPNSense documentation. I was chasing some ghosts trying to find that "number" but... yeah, now I understand.

Leaving this post as proof of my idiocy and maaaaybe it will help someone in the future.