Unsure of linelog configuration
David Lake via Freeradius-Users <[email protected]>
| Newsgroups | gmane.comp.freeradius.user |
|---|---|
| Message-ID | <PAXPR06MB7887E26EC048FCC2FFEEE8C9B527A@PAXPR06MB7887.eurprd06.prod.outlook.com> |
Hi
I am trying to see all DHCP interactions (allocated, ack, remove, etc) and I have configured linelog.
Radiusd -X shows all DHCP (lease time set to 7200 so I see an ACK every 2 hours).
But my line log is only showing the first successful allocate. I have obviously mis-understood the syntax and positioning of linelog because it is basically working but not as I expected. Would welcome a pointer or two?
I have this (and nothing else) in my linelog file:
linelog linelog_dhcp{
filename = ${logdir}/dhcp.log
escape_filenames = no
permissions = 0600
format = "%t %{control:Module-Success-Message}"
}
… and this in my dhcp file:
server dhcp {
listen {
# This is a dhcp socket.
type = dhcp
ipaddr = 192.168.1.1
src_ipaddr = 192.168.1.1
reply:DHCP-DHCP-Server-Identifier
port = 67
interface = eth0
broadcast = no
performance {
skip_duplicate_checks = no
}
}
dhcp DHCP-Discover {
# The DHCP Server Identifier is set here since is returned in OFFERs
update control {
&DHCP-DHCP-Server-Identifier = 192.168.1.1
}
dhcp_network
dhcp_sqlippool
linelog_dhcp
update reply {
DHCP-Message-Type = DHCP-Offer
Packet-Dst-Port = 68
}
}
dhcp DHCP-Request {
update control {
&DHCP-DHCP-Server-Identifier = 192.168.1.1
}
if (&request:DHCP-DHCP-Server-Identifier && \
&request:DHCP-DHCP-Server-Identifier != &control:DHCP-DHCP-Server-Identifier) {
do_not_respond
}
update reply {
&DHCP-Message-Type = DHCP-Ack
Packet-Dst-Port = 68
}
root@FreeRadius:/usr/local/etc/raddb/sites-enabled# cat dhcp
# -*- text -*-
server dhcp {
listen {
# This is a dhcp socket.
type = dhcp
ipaddr = 192.168.1.1
src_ipaddr = 192.168.1.1
reply:DHCP-DHCP-Server-Identifier
port = 67
interface = eth0
broadcast = no
performance {
skip_duplicate_checks = no
}
}
dhcp DHCP-Discover {
# The DHCP Server Identifier is set here since is returned in OFFERs
update control {
&DHCP-DHCP-Server-Identifier = 192.168.1.1
}
dhcp_network
dhcp_sqlippool
linelog_dhcp
update reply {
DHCP-Message-Type = DHCP-Offer
Packet-Dst-Port = 68
}
}
dhcp DHCP-Request {
update control {
&DHCP-DHCP-Server-Identifier = 192.168.1.1
}
if (&request:DHCP-DHCP-Server-Identifier && \
&request:DHCP-DHCP-Server-Identifier != &control:DHCP-DHCP-Server-Identifier) {
do_not_respond
}
update reply {
&DHCP-Message-Type = DHCP-Ack
Packet-Dst-Port = 68
}
dhcp_network
dhcp_sqlippool_request
linelog_dhcp
}
dhcp DHCP-Decline {
dhcp_network
update reply {
&DHCP-Message-Type = DHCP-Do-Not-Respond
}
reject
linelog_dhcp
}
dhcp DHCP-Inform {
dhcp_network
linelog_dhcp
ok
}
#
# For Windows 7 boxes
#
dhcp DHCP-Inform {
update reply {
Packet-Dst-Port = 68
DHCP-Message-Type = DHCP-ACK
DHCP-DHCP-Server-Identifier = "%{Packet-Dst-IP-Address}"
DHCP-Site-specific-28 = 0x0a00
}
linelog_dhcp
ok
}
dhcp DHCP-Release {
dhcp_network
update reply {
&DHCP-Message-Type = DHCP-Do-Not-Respond
}
reject
linelog_dhcp
}
dhcp DHCP-Lease-Query {
if (&DHCP-Client-Hardware-Address) {
}
elsif (&DHCP-Your-IP-Address) {
}
elsif (&DHCP-Client-Identifier) {
}
else {
update reply {
&DHCP-Message-Type = DHCP-Lease-Unknown
}
ok
return
}
if (notfound) {
update reply {
&DHCP-Message-Type = DHCP-Lease-Unknown
}
ok
return
}
update reply {
&DHCP-Message-Type = DHCP-Lease-Unassigned
}
linelog_dhcp
}
}
Thank you
David
David Lake
Visiting Professor
5G Innovation Centre (5GIC and 6GIC)
Tel: +44 (0)7711 736784
Email: [email protected]<mailto:%[email protected]>
Web: surrey.ac.uk<http://www.surrey.ac.uk/?utm_medium=internal&utm_source=emailsignature&utm_campaign=reputation+50th+brand>
[A blue text on a black background Description automatically generated]<http://www.surrey.ac.uk/?utm_source=emailsignature&utm_medium=internal&utm_campaign=emailsignature_1819&utm_content=emailsignature_homepage>
James Clerk Maxwell Building, University of Surrey, Guildford, Surrey, GU2 7XH, UK
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
image001.png
(image/png, 8.3 KB) - not displayed