DHCP reply with opt82
Alex
admin at u-tele.com
Mon Jul 19 23:12:58 CEST 2010
Hello.
FreeRADIUS Version 2.1.10 (from git sources).
I'm using dhcp feature of freeradius to assign static ips to computers
dynamically.
Sometimes its needed to reply to dhcp packets with same opt82 as in
request. For example, cisco uses opt82 from replied packet to know from
which port request has arrived (IP source guard, "ip verify source
port-security" interface command).
For this scenario, I added following to dhcp update sections:
DHCP-Agent-Circuit-Id := "%{request:DHCP-Agent-Circuit-Id}"
DHCP-Agent-Remote-Id := "%{request:DHCP-Agent-Remote-Id}"
In this case, radius debug output shows correct assignment of options:
Sending DHCP-Offer of id 7c0f40cd from 0.0.0.0:67 to x.x.x.1:67
DHCP-Subnet-Mask = 255.255.255.0
DHCP-Router-Address = x.x.x.1
DHCP-Domain-Name-Server = y.y.y.y
DHCP-IP-Address-Lease-Time = 86400
DHCP-DHCP-Server-Identifier = z.z.z.z
DHCP-Agent-Circuit-Id = 0x000401e30420
DHCP-Agent-Remote-Id = 0x000600FFFFFFFF00
Finished request 10.
but both this two values (0x000401e30420 and 0x000600FFFFFFFF00) are
assigned to DHCP-Relay-Agent-Information.
tcpdump shows both as opt82 suboption 0:
5206000401e30420
5208000600FFFFFFFF00
Need help in setting this options correctly.
More information about the Freeradius-Users
mailing list