Option 82 Logging
Frank Bulk
frnkblk at iname.com
Mon Dec 29 19:49:32 UTC 2014
Perhaps because previously your IP was coming out of the 192.168.1.0/29, and
you have the logging statement just in 192.168.1.192/28?
Frank
-----Original Message-----
From: dhcp-users-bounces at lists.isc.org
[mailto:dhcp-users-bounces at lists.isc.org] On Behalf Of Keith
Sent: Monday, December 29, 2014 12:47 PM
To: 'Users of ISC DHCP'
Subject: RE: Option 82 Logging
Hi.
So a quick update to this, I was wondering if because I was using everything
in
the
same /24, 192.168.1.0/24, the leases were not working correctly. Turns out
that
was the case.
I changed the dslam to use 192.168.2.0/24 instead and added that subnet to
dhcp.
Dhcpd.conf file:
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.2.0 netmask 255.255.255.0 {
if exists agent.circuit-id
{
log ( error, concat( "Lease for ", binary-to-ascii (10, 8, ".",
leased-address), " is connected to ", option agent.circuit-id)); }
option routers 192.168.2.1;
range 192.168.2.193 192.168.2.206;
}
===
As soon as I changed the subnet for the dslam to 192.168.2.0/24 it works.
Lease for 192.168.2.193 is connected to
Test-Dslam:1/2:0.35:VLAN=1:ifIndex=1003002
Dec 29 10:34:53 play dhcpd: DHCPDISCOVER from 00:d0:59:3d:e7:e5 via xl0
Dec 29 10:34:54 play dhcpd: DHCPOFFER on 192.168.2.193 to 00:d0:59:3d:e7:e5
(CWPORT45) via xl0
Dec 29 10:34:54 play dhcpd: Lease for 192.168.2.193 is connected to
Test-Dslam:1/2:0.35:VLAN=1:ifIndex=1003002
Dec 29 10:34:54 play dhcpd: DHCPREQUEST for 192.168.2.193 (192.168.2.1) from
00:d0:59:3d:e7:e5 (CWPORT45) via xl0
Dec 29 10:34:54 play dhcpd: DHCPACK on 192.168.2.193 to 00:d0:59:3d:e7:e5
(CWPORT45) via xl0
So changing the subnet the dslam is on makes option 82 logging work.
Anyone have a take on why using a small /28 from 192.168.1.0/24 would not
make
option 82
logging work? But changing it to its own /24 does?
Thanks,
Keith
Patrick wrote:
-> I'm not much help. The only instance of "if exists" I see in our config
is
->
-> if exists agent.circuit-id
-> {
-> log ( error, concat( "Lease for ", binary-to-ascii (10, 8, ".",
leased-address), "
-> is connected to ", option agent.circuit-id)); }
->
-> which looks pretty similar to yours. Does it continue to fail if only one
of
the "if"
-> statements is present? Does it fail if you try to use something like what
I've
-> posted here? This one has been working for us here for years, long enough
ago
-> that I'm not the one that created it. We use option 82 quite heavily on
our
-> network, though, without issue as long as I don't blunder.
Keith Wrote:
-> 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;
_______________________________________________
dhcp-users mailing list
dhcp-users at lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users
More information about the dhcp-users
mailing list