Hello,

I am somewhat new to OpenBSD, but have been using various *nix systems
for many years.  I recently wanted to use OpenBSD for a DHCP server with
static IP assignments based on a MAC address.  The problem is the MAC I
want to use for the static assignment is in the ethernet headers, not
the MAC which is sent as part of the DHCP protocol.  This is because an
end-user device is sending it's MAC address in the DHCP packet, but I
want the assignment to use the MAC from my equipment which forwards the
packet.  The best option would be if my equipment supported something
like DHCP option 82, or another way to modify the packet, but that is
not available.

I can think of two possible solutions:
1. Modify dhcpd to allow this ability
2. Create a pf rule to rewrite the packet
3. Create a DHCP proxy similar to tftp-proxy

With option 1, I would have to make changes to dhcpd.  That could cause
problems with maintaining a fork or when upgrading.  I have not found a
way to do option 2 from reading about pf.  I believe it would be
possible with iptables in Linux through the mangle rules, but I have
not looked into that yet.  Option 3 seems like the cleanest way, but I
don't know if the proxy would have access to the ethernet headers.

It is also possible that there is another way to do this, which I have
overlooked.  If that is the case, please let me know.  Otherwise, any
input or insights into these options would be greatly appreciated.

-- 
Rob Campbell

Reply via email to