Option 82 to DHCP logs? add config to dhcpd.conf via shell without reset?


  • Hello!

    I manage a network with Cisco-switches where each the Cisco-switch inserts a DHCP Option 82 with the switch name + port number + VLAN to every DHCP Request made a client.
    The purpose is to keep track where users connect. I have, with success, used this solution together with a standalone ISC DHCP server.
    I'd like to do the same thing in pfSense.

    In the standalone ISC DHCP-server I have this configured:

    if exists agent.circuit-id
    {
    log ( info, concat( "Lease for ", binary-to-ascii (10, 8, ".", leased-address), " is connected to switch ",
    substring( option agent.remote-id, 2, 9999), " port ",
    binary-to-ascii (10, 8, "/", suffix ( option agent.circuit-id, 2)), " via VLAN ",
    binary-to-ascii (10, 16, "", substring( option agent.circuit-id, 2, 2))));
    }
    
    

    Which results in these logs:

    Apr 16 20:01:41 dhcp-1 dhcpd: Lease for 10.1.109.85 is connected to switch CISCO-SWITCH-1 port 1/38 via VLAN 7
    Apr 16 20:01:41 dhcp-1 dhcpd: DHCPREQUEST for 10.1.109.85 from 00:6c:8f:00:6b:31 via 10.1.109.2
    Apr 16 20:01:41 dhcp-1 dhcpd: DHCPACK on 10.1.109.85 to 00:6c:8f:00:6b:31 via 10.1.109.2
    
    

    My questions:

    1. Is it possible to do the same in pfSense DHCP-server via GUI (in the DHCP Option menu)?
    2. If not - can I add configuration via shell, to /var/dhcpd/etc/dhcpd.conf, without it being flushed/reset by pfSense once DHCPD is started again?

    Regards,
    J.


  • Nice feature ! Have you managed to test on pfSense ?

    Regards,
    Adrian

  • LAYER 8 Global Moderator

    That is pretty slick.. Have to look to see if that can be implemented.. But there is currently no place you could put that in the gui in pfsense, it would have to be done on the .conf file which I would think would just get over written if not on restart at min on update to pfsense.


  • I'd like to see this too!