Parsing opt82 attributes
Anton
warm at mtele.pro
Thu Jul 9 11:43:56 CEST 2015
Good day.
I'm using freeradius-2.2.5 as customized dhcp-server (2.2.5 because debian backports has no newer version and I don't
like to build deb by hands). There is problem of logging remote-id and circuit-id.
I have modified default loggin and it looks like this:
sqlippool_log_success = "DHCP: Allocated IP: %{reply:Framed-IP-Address} from %{control:Pool-Name} \
(did %{Called-Station-Id} \
cli %{Calling-Station-Id} \
port %{NAS-Port} user %{User-Name} \
remote-id %{request:DHCP-Relay-Remote-Id} \
circuit-id %{request:DHCP-Relay-Circuit-Id}"
It produces log entries like this:
Thu Jul 9 15:27:50 2015 : Info: DHCP: Allocated IP: 172.31.251.244 from <Pool name here> (did cli 00:1f:c6:e9:0c:92
port user DHCP-00:1f:c6:e9:0c:92 remote-id 0x00060012cfa7f180 circuit-id 0x000407d00105
0012cfa7f180 - this is mac-address of the switch, 07d0 - hex vlan number (2000 in dec), 05 - is a hex port nubmer.
I would like to log this entries in more human readable form:
- mac-addres should be "0012.cfa7.f180" in cisco style or "00:12:cf:a7:f1:80"
- vlan number should be "2000"
- port number should also be decimal number "05" (wrong example with 5 :-))
How can I modify logging configuration to get human values in log file ?
More information about the Freeradius-Users
mailing list