Статья ISC-DHCP
Добавлено: 2011-04-25 21:33:25
Если проблема не решается сама, значит она неразрешима
https://forum.lissyara.su/
Код: Выделить всё
# RFC 3046 DHCP Relay Agent Information Option logging
# author: pol
if exists agent.remote-id and exists agent.circuit-id {
log(info,concat("DHCPCIRCUIT for lease of ",binary-to-ascii(10,8,".",leased-address),
" is connected to interface ",binary-to-ascii(10,8,"/",suffix(option agent.circuit-id,2)),
", VLAN ",binary-to-ascii(10,16,"",substring(option agent.circuit-id,2,2)),
" on switch ",binary-to-ascii(16,8,":",substring(option agent.remote-id,2,6))
));
log(info,concat("DHCPOPT82 for lease of ",binary-to-ascii(10,8,".",leased-address),
" raw option-82 info is CID: ",binary-to-ascii(10,8,".",option agent.circuit-id),
" AID: ",binary-to-ascii(16,8,".",option agent.remote-id)
));
} elsif exists agent.remote-id {
log(info,concat("DHCPAGENT for lease of ",binary-to-ascii(10,8,".",leased-address),
" on agent ",binary-to-ascii(16,8,":",substring(option agent.remote-id, 2, 6))
));
} elsif exists agent.circuit-id {
log(info,concat("DHCPCIRCUITID on ",
suffix(concat("0",binary-to-ascii(16,8,"",substring(hardware,1,1))),2),":",
suffix(concat("0",binary-to-ascii(16,8,"",substring(hardware,2,1))),2),":",
suffix(concat("0",binary-to-ascii(16,8,"",substring(hardware,3,1))),2),":",
suffix(concat("0",binary-to-ascii(16,8,"",substring(hardware,4,1))),2),":",
suffix(concat("0",binary-to-ascii(16,8,"",substring(hardware,5,1))),2),":",
suffix(concat("0",binary-to-ascii(16,8,"",substring(hardware,6,1))),2),
" to ",binary-to-ascii(10,8,".",leased-address),
" via ",option agent.circuit-id
));
}