Re: Unsure of linelog configuration

David Lake via Freeradius-Users <[email protected]>
Newsgroups gmane.comp.freeradius.user
Message-ID <PAXPR06MB788757776206A884BBD8035CB527A@PAXPR06MB7887.eurprd06.prod.outlook.com>
From radiusd -X.

For a new allocation following Discover I see this in the log:

(4) dhcp_sqlippool: EXPAND DHCP: Allocated IP: %{reply:DHCP-Your-IP-Address} from %{control:Pool-Name} (cid %{DHCP-Client-Identifier} chaddr %{DHCP-Client-Hardware-Address} giaddr %{DHCP-Gateway-IP-Address})
(4) dhcp_sqlippool:    --> DHCP: Allocated IP: 192.168.2.101 from ipoe (cid 0x010c3311bf0000 chaddr 0c:33:11:bf:00:00 giaddr 192.168.2.1)
(4)     [dhcp_sqlippool] = ok
(4) linelog_dhcp: EXPAND %t %{control:Module-Success-Message}
(4) linelog_dhcp:    --> Thu Jul 31 12:32:31 2025 DHCP: Allocated IP: 192.168.2.101 from ipoe (cid 0x010c3311bf0000 chaddr 0c:33:11:bf:00:00 giaddr 192.168.2.1)
(4) linelog_dhcp: EXPAND /usr/local/var/log/radius/dhcp.log
(4) linelog_dhcp:    --> /usr/local/var/log/radius/dhcp.log
(4)     [linelog_dhcp] = ok
(4)     update reply {
(4)       DHCP-Message-Type = DHCP-Offer
(4)       Packet-Dst-Port = 68
(4)     } # update reply = noop
(4)   } # dhcp DHCP-Discover = ok

After an ACK I see this:

(5) dhcp_sqlippool: EXPAND %{control:DHCP-SQL-Option-Identifier}
(5) dhcp_sqlippool:    -->
(5) dhcp_sqlippool: SQL-User-Name set to ''
(5) dhcp_sqlippool: EXPAND UPDATE dhcpippool SET expiry_time = NOW() + INTERVAL 7200 SECOND, counter = counter + 1 WHERE pool_name = '%{control:Pool-Name}' AND pool_key = '%{%{DHCP-Client-Identifier}:-%{DHCP-Client-Hardware-Address}}' AND framedipaddress = '%{%{DHCP-Requested-IP-Address}:-%{DHCP-Client-IP-Address}}'
(5) dhcp_sqlippool:    --> UPDATE dhcpippool SET expiry_time = NOW() + INTERVAL 7200 SECOND, counter = counter + 1 WHERE pool_name = 'ipoe' AND pool_key = '0x010c3311bf0000' AND framedipaddress = '192.168.2.101'
(5) dhcp_sqlippool: Executing query: UPDATE dhcpippool SET expiry_time = NOW() + INTERVAL 7200 SECOND, counter = counter + 1 WHERE pool_name = 'ipoe' AND pool_key = '0x010c3311bf0000' AND framedipaddress = '192.168.2.101'
rlm_sql_mysql: Rows matched: 1  Changed: 1  Warnings: 0
rlm_sql (dhcp_sql): Released connection (8)
(5)       [dhcp_sqlippool.accounting] = ok
(5)       update reply {
(5)         EXPAND %{%{DHCP-Requested-IP-Address}:-%{DHCP-Client-IP-Address}}
(5)            --> 192.168.2.101
(5)         &DHCP-Your-IP-Address := 192.168.2.101
(5)       } # update reply = noop
(5)     } # policy dhcp_sqlippool_request = ok
(5) linelog_dhcp: EXPAND %t %{control:Module-Success-Message}
(5) linelog_dhcp:    --> Thu Jul 31 12:32:32 2025
(5) linelog_dhcp: EXPAND /usr/local/var/log/radius/dhcp.log
(5) linelog_dhcp:    --> /usr/local/var/log/radius/dhcp.log
(5)     [linelog_dhcp] = ok
(5)   } # dhcp DHCP-Request = ok


In /usr/local/var/log/radius/dhcp.log I simply see the time/date printed, no DHCP information.

David

From: Matthew Newton <[email protected]>
Date: Thursday, 31 July 2025 at 12:28
To: Lake, David Dr (FEPS Faculty Admin) <[email protected]>, FreeRadius users mailing list <[email protected]>
Subject: Re: Unsure of linelog configuration

On 31/07/2025 12:25, David Lake wrote:
> I thought I had put it in the  Request section (section below) -

The top part of your email didn't show it in that section, but looking
again it's truncated.

As always, what does the FreeRADIUS debug log show?

--
Matthew
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.