Ci dessous un extrait de config pour ISC DHCP 3 utilisable avec le dhcp-snooping de switchs ciscos:
if exists agent.circuit-id
{
log ( info, concat( "Lease for ", 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( "Lease for ", 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)));
}
Exemple de sortie
dhcpd: Lease for aaxx.yy.200 is connected to interface 1/6 VLAN 40 on switch 0:23:5d:68:ec:0
dhcpd: Lease for aa.xx.yy.200 raw option-82 info is CID: 0.4.0.40.1.6 AID: 0.6.0.23.5d.68.ec.0
# Exemple de log detaillé
Posté par -=[ silmaril ]=- (site web personnel) . En réponse au message Log des messages DHCP. Évalué à 3.
if exists agent.circuit-id
{
log ( info, concat( "Lease for ", 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( "Lease for ", 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)));
}
Exemple de sortie
dhcpd: Lease for aaxx.yy.200 is connected to interface 1/6 VLAN 40 on switch 0:23:5d:68:ec:0
dhcpd: Lease for aa.xx.yy.200 raw option-82 info is CID: 0.4.0.40.1.6 AID: 0.6.0.23.5d.68.ec.0