Re: DHCP reply with opt82
Thanks Alan, but git pull said that local sources are up to date. I've even downloaded them again to another server (no previous versions of freeradius at it) according to http://git.freeradius.org/ $ git clone git://git.freeradius.org/freeradius-server.git $ cd freeradius-server $ git fetch origin v2.1.x:v2.1.x $ git checkout v2.1.x dhcp.c has this changes: http://github.com/alandekok/freeradius-server/commit/7d44b0a545a50012aaa60ba996cc976d15745d08 dictionary.dhcp is from 2.1.10 but result is the same (tcpdump): Agent-Information Option 82, length 6: Unknown SubOption 0, length 4: 0x: 01e3 0420 Agent-Information Option 82, length 8: Unknown SubOption 0, length 6: 0x: 001f cab0 ef00 What am I doing wrong? - Original Message - From: Alan DeKok al...@deployingradius.com To: FreeRadius users mailing list freeradius-users@lists.freeradius.org Sent: Tuesday, July 20, 2010 01:54 Subject: Re: DHCP reply with opt82 Alex wrote: FreeRADIUS Version 2.1.10 (from git sources). I'm using dhcp feature of freeradius to assign static ips to computers dynamically. $ git pull $ (cd src/lib;make) (cd src/main;make) but both this two values (0x000401e30420 and 0x00060000) are assigned to DHCP-Relay-Agent-Information. tcpdump shows both as opt82 suboption 0: 5206000401e30420 520800060000 Need help in setting this options correctly. Double-check that you're using the dictionary.dhcp file that comes with 2.1.10. *Don't* use the file that comes with 2.1.9. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: DHCP reply with opt82
Alex wrote: Thanks Alan, but git pull said that local sources are up to date. Or... git pull origin v2.1.x:v2.1.x dhcp.c has this changes: http://github.com/alandekok/freeradius-server/commit/7d44b0a545a50012aaa60ba996cc976d15745d08 Yes, that should be it. dictionary.dhcp is from 2.1.10 Are you *sure*? The version in the source is from 2.1.10. What about the installed version? (/usr/local/share/freeradius/...) Go *check*. but result is the same (tcpdump): Agent-Information Option 82, length 6: Unknown SubOption 0, length 4: 0x: 01e3 0420 Agent-Information Option 82, length 8: Unknown SubOption 0, length 6: 0x: 001f cab0 ef00 What am I doing wrong? Probably not using the right dictionary, or the right version of the server. When I perform the test that's in the git commit message, I get the correct sub-option format. Please try that. If you don't get the correct suboptions, then you need to use the right dictionary and/or the right source code. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: DHCP reply with opt82
Sources, server version and dictionary was ok. The problem was in using old attributes: DHCP-Agent-Circuit-Id := %{request:DHCP-Agent-Circuit-Id} DHCP-Agent-Remote-Id := %{request:DHCP-Agent-Remote-Id} Changed them to: DHCP-Relay-Circuit-Id := %{request:DHCP-Relay-Circuit-Id} DHCP-Relay-Remote-Id := %{request:DHCP-Relay-Remote-Id} and now it works without any problem. Debug still shows old attibute DHCP-Agent-Circuit-Id and doesn't show remote id at all: Received DHCP-Discover of id 4a76b25e from 1.1.1.1:67 to 0.0.0.0:67 DHCP-Opcode = Client-Message DHCP-Hardware-Type = Ethernet DHCP-Hardware-Address-Length = 6 DHCP-Hop-Count = 1 DHCP-Transaction-Id = 1249292894 DHCP-Number-of-Seconds = 0 DHCP-Flags = 0 DHCP-Client-IP-Address = 0.0.0.0 DHCP-Your-IP-Address = 0.0.0.0 DHCP-Server-IP-Address = 0.0.0.0 DHCP-Gateway-IP-Address = 1.1.1.1 DHCP-Client-Hardware-Address = 00:11:22:33:44:55 DHCP-Message-Type = DHCP-Discover DHCP-Client-Identifier = 00:11:22:33:44:55 DHCP-Hostname = test DHCP-Parameter-Request-List = DHCP-Subnet-Mask DHCP-Parameter-Request-List = DHCP-Broadcast-Address DHCP-Parameter-Request-List = DHCP-Time-Offset DHCP-Parameter-Request-List = DHCP-Classless-Static-Route DHCP-Parameter-Request-List = DHCP-Router-Address DHCP-Parameter-Request-List = DHCP-Domain-Name DHCP-Parameter-Request-List = DHCP-Domain-Name-Server DHCP-Parameter-Request-List = DHCP-Hostname DHCP-Agent-Circuit-Id = 0x000401e30420 - Original Message - From: Alan DeKok al...@deployingradius.com To: FreeRadius users mailing list freeradius-users@lists.freeradius.org Sent: Tuesday, July 20, 2010 16:01 Subject: Re: DHCP reply with opt82 Alex wrote: Thanks Alan, but git pull said that local sources are up to date. Or... git pull origin v2.1.x:v2.1.x dhcp.c has this changes: http://github.com/alandekok/freeradius-server/commit/7d44b0a545a50012aaa60ba996cc976d15745d08 Yes, that should be it. dictionary.dhcp is from 2.1.10 Are you *sure*? The version in the source is from 2.1.10. What about the installed version? (/usr/local/share/freeradius/...) Go *check*. but result is the same (tcpdump): Agent-Information Option 82, length 6: Unknown SubOption 0, length 4: 0x: 01e3 0420 Agent-Information Option 82, length 8: Unknown SubOption 0, length 6: 0x: 001f cab0 ef00 What am I doing wrong? Probably not using the right dictionary, or the right version of the server. When I perform the test that's in the git commit message, I get the correct sub-option format. Please try that. If you don't get the correct suboptions, then you need to use the right dictionary and/or the right source code. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: DHCP reply with opt82
Alex Jaliashvili wrote: The problem was in using old attributes: DHCP-Agent-Circuit-Id := %{request:DHCP-Agent-Circuit-Id} DHCP-Agent-Remote-Id := %{request:DHCP-Agent-Remote-Id} Uh... no. The dictionary.dhcp that is included with 2.1.10 has the *same* definition for those attributes. ATTRIBUTE DHCP-Agent-Circuit-Id 1 octets ATTRIBUTE DHCP-Agent-Remote-Id2 octets ATTRIBUTE DHCP-Relay-Circuit-Id 1 octets ATTRIBUTE DHCP-Relay-Remote-Id2 octets They are in the DHCP-Relay-Agent-Information TLV. If you have ANYTHING ELSE for these attributes, then you are not using the correct dictionary. Changed them to: DHCP-Relay-Circuit-Id := %{request:DHCP-Relay-Circuit-Id} DHCP-Relay-Remote-Id := %{request:DHCP-Relay-Remote-Id} and now it works without any problem. Which indicates that you're not using the correct dictionary.dhcp file. Debug still shows old attibute DHCP-Agent-Circuit-Id and doesn't show remote id at all: If the debug log shows DHCP-Agent-Circuit-Id, it's because you are using the OLD dictionary.dhcp file. Go fix that. The OLD file had DHCP-Agent-* listed LAST, which over-rode any previous definitions. The only issue left in the version you have is that it looks like the *first* attribute inside of option 82 is printed in debug mode, and the others aren't printed. But a tcpdump shows that all of them are in the packet. I'll put a fix for the debug output for 2.1.10. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: DHCP reply with opt82
Alex wrote: FreeRADIUS Version 2.1.10 (from git sources). I'm using dhcp feature of freeradius to assign static ips to computers dynamically. $ git pull $ (cd src/lib;make) (cd src/main;make) but both this two values (0x000401e30420 and 0x00060000) are assigned to DHCP-Relay-Agent-Information. tcpdump shows both as opt82 suboption 0: 5206000401e30420 520800060000 Need help in setting this options correctly. Double-check that you're using the dictionary.dhcp file that comes with 2.1.10. *Don't* use the file that comes with 2.1.9. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html