Navigation

    Netgate Discussion Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search

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

    DHCP and DNS
    4
    4
    3859
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • 2
      21hertz last edited by

      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.

      pfSense user for 8+ years on network with 5k+ active users.

      1 Reply Last reply Reply Quote 0
      • A
        AMizil last edited by

        Nice feature ! Have you managed to test on pfSense ?

        Regards,
        Adrian

        1 Reply Last reply Reply Quote 0
        • johnpoz
          johnpoz LAYER 8 Global Moderator last edited by

          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.

          An intelligent man is sometimes forced to be drunk to spend time with his fools
          If you get confused: Listen to the Music Play
          Please don't Chat/PM me for help, unless mod related
          2440 2.4.5p1 | 2x 3100 2.4.4p3 | 2x 3100 22.01 | 4860 22.05

          1 Reply Last reply Reply Quote 0
          • G
            GoldServe last edited by

            I'd like to see this too!

            1 Reply Last reply Reply Quote 0
            • First post
              Last post