Option 82 Logging
Keith
kwoody at citywest.ca
Wed Dec 24 20:00:47 UTC 2014
I have been trying to get option 82 logging to work for the last while off a
test dslam
I have in the lab.
Here is a tcpdump capture:
11:44:14.087093 IP (tos 0x0, ttl 128, id 1723, offset 0, flags [none], proto UDP
(17), length 399)
0.0.0.0.bootpc > 255.255.255.255.bootps: [udp sum ok] BOOTP/DHCP, Request
from 00:d0:59:3d:e7:e5 (oui Unknown), length 371, xid 0x61cbad08, secs 6912,
Flags [Broadcast] (0x8000)
Client-Ethernet-Address 00:d0:59:3d:e7:e5 (oui Unknown)
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
NOAUTO Option 116, length 1: Y
Client-ID Option 61, length 7: ether 00:d0:59:3d:e7:e5
Requested-IP Option 50, length 4: 192.168.1.16
Hostname Option 12, length 8: "CWPORT45"
Vendor-Class Option 60, length 8: "MSFT 5.0"
Parameter-Request Option 55, length 11:
Subnet-Mask, Domain-Name, Default-Gateway, Domain-Name-Server
Netbios-Name-Server, Netbios-Node, Netbios-Scope, Router-Discovery
Static-Route, Classless-Static-Route-Microsoft, Vendor-Option
Vendor-Option Option 43, length 2: 220.0
Agent-Information Option 82, length 69:
Circuit-ID SubOption 1, length 42:
Test-Dslam:1/2:0.35:VLAN=1:ifIndex=1003002
Remote-ID SubOption 2, length 23: epserial=:epvendor=TCTN
END Option 255, length 0
PAD Option 0, length 0
My DHCP config:
default-lease-time 300;
max-lease-time 300;
allow bootp;
ddns-updates off;
ddns-update-style interim;
log-facility local7;
subnet 192.168.1.0 netmask 255.255.255.248 {
}
subnet 192.168.1.192 netmask 255.255.255.240 {
if exists agent.circuit-id {
log (debug, concat("debug",option agent.circuit-id)); }
if exists agent.remote-id {
log (info, concat("option-82 info is RID: ", option agent.remote-id)); }
authoritative;
option routers 192.168.1.1;
range 192.168.1.193 192.168.1.206;
}
======
I see examples with concat, and taking just parts of the strings, but I just
can't figure out
the correct way to do this.
A discover comes in:
Dec 24 11:49:59 play dhcpd: DHCPDISCOVER from 00:d0:59:3d:e7:e5 via bge0:
network 192.168.1.0/29: no free leases
As soon as I remove the if statements the client gets a lease.
Have I got this ordered wrong? I have tried about a dozen different examples and
other variations. I just want it to log
this line:
Circuit-ID SubOption 1, length 42: Test-Dslam:1/2:0.35:VLAN=1:ifIndex=1003002
I have used DHCP for quite a number of years, but never used option 82 features
before, just a basic straight forward
config that has always worked.
Thanks,
Keith
More information about the dhcp-users
mailing list