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

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

Scheduled Pinned Locked Moved DHCP and DNS
4 Posts 4 Posters 4.4k Views
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 Apr 16, 2015, 6:37 PM Apr 16, 2015, 6:16 PM

    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 Jul 14, 2015, 1:50 PM

      Nice feature ! Have you managed to test on pfSense ?

      Regards,
      Adrian

      1 Reply Last reply Reply Quote 0
      • J
        johnpoz LAYER 8 Global Moderator
        last edited by Jul 14, 2015, 8:23 PM

        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
        SG-4860 24.11 | Lab VMs 2.7.2, 24.11

        1 Reply Last reply Reply Quote 0
        • G
          GoldServe
          last edited by Aug 18, 2015, 5:37 AM

          I'd like to see this too!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
            [[user:consent.lead]]
            [[user:consent.not_received]]