Freeradius DHCP - strange behavior
I try to migrate from isc-dhcp and I have strange behaviour: --8<---------------cut here---------------start------------->8--- Debug: Server core libs: Debug: freeradius-server : 3.0.12 Debug: talloc : 2.0.* Debug: ssl : 1.1.0c release Debug: pcre : 8.39 2016-06-14 --8<---------------cut here---------------end--------------->8--- (packaged by dabian) /etc/freeradius/3.0/sites-available/dhcp (excerpt) --8<---------------cut here---------------start------------->8--- listen { type = dhcp ipaddr = 0.0.0.0 src_ipaddr = 192.168.200.200 port = 6700 interface = lan broadcast = yes } --8<---------------cut here---------------end--------------->8--- with this configuration --8<---------------cut here---------------start------------->8--- sudo /sbin/dhclient -p 6701 -d -v wlan0 --8<---------------cut here---------------end--------------->8--- works as expected. but when I try to change port to 67 it stop respond to broadcast queries :( ie. --8<---------------cut here---------------start------------->8--- sudo /sbin/dhclient -d -s 192.168.200.200 -v wlan0 --8<---------------cut here---------------end--------------->8--- works, while: --8<---------------cut here---------------start------------->8--- sudo /sbin/dhclient -d -v wlan0 --8<---------------cut here---------------end--------------->8--- not. dhclient and freeradius were run on different boxes with router between them. i tried with different "ipaddr" option (0.0.0.0 , 255.255.255.255 , 192.168.200.200) but without success. I realize, that it is not neccessarily freeradius fault, but I have no idea what should I check. KJ -- http://wolnelektury.pl/wesprzyj/teraz/ To find a friend one must close one eye; to keep him -- two. -- Norman Douglas
On Nov 12, 2016, at 6:36 AM, Kamil Jońca <kjonca@o2.pl> wrote:
works as expected.
but when I try to change port to 67 it stop respond to broadcast queries :(
What OS are you using? If the server is running as root, it should be able to bind to the port and receive broadcast packets. You also need to set "broadcast = yes" in the DHCP configuration. As always, reading it carefully is a good idea. Alan DeKok.
After a "some" time (I have to go to sleep ) and setting --8<---------------cut here---------------start------------->8--- "ipaddr = *" --8<---------------cut here---------------end--------------->8--- [1] radius starts received and reply to broadcasts. Now I have another problem: some older androids don't like server messages, they 'waits for IP' infinitely. dhcpdump shows that only difference between isc-dhcp and freeradius dhcp is presence --8<---------------cut here---------------start------------->8--- OPTION: 57 ( 2) Maximum DHCP message size 1500 --8<---------------cut here---------------end--------------->8--- in radius reply. How can I turn it off to test my suspicions? kjonca@o2.pl (Kamil Jońca) writes: [...] [1] - I'm pretty sure, i have test it also previously. -- http://wolnelektury.pl/wesprzyj/teraz/ Q: Why do WASPs play golf ? A: So they can dress like pimps.
Finally all my devices works, but it is *against* warning from logs. I have had: --8<---------------cut here---------------start------------->8--- listen { type = dhcp ipaddr = * src_ipaddr = 192.168.200.200 port = 67 interface = lan broadcast = yes } --8<---------------cut here---------------end--------------->8--- I commented out "interface = " line, and now everything works, regardless of --8<---------------cut here---------------start------------->8--- Sat Nov 12 20:28:28 2016 : Warning: You MUST set "interface" if you have "broadcast = yes" Sat Nov 12 20:28:28 2016 : Debug: (7) DHCP: Reply will be broadcast as no interface was defined --8<---------------cut here---------------end--------------->8--- in logs. With "interface = lan" there were no "DHCP-ACK" for some devices (and it was my fault when sending previous mail) I am still not sure if it is freeradius issue or my routing, arp or sth. Alan asks about system: --8<---------------cut here---------------start------------->8--- uname -a Linux alfa 4.4.0-1-amd64 #1 SMP Debian 4.4.6-1 (2016-03-17) x86_64 GNU/Linux sudo getcap -v /usr/sbin/freeradius /usr/sbin/freeradius = cap_net_bind_service,cap_net_admin,cap_net_raw+ei --8<---------------cut here---------------end--------------->8--- " cap_net_bind_service" and "cap_net_raw" is probably unneccessary. KJ kjonca@o2.pl (Kamil Jońca) writes:
After a "some" time (I have to go to sleep ) and setting "ipaddr = *" [1] radius starts received and reply to broadcasts.
Now I have another problem:
some older androids don't like server messages, they 'waits for IP' infinitely.
dhcpdump shows that only difference between isc-dhcp and freeradius dhcp is presence
OPTION: 57 ( 2) Maximum DHCP message size 1500 in radius reply.
How can I turn it off to test my suspicions?
kjonca@o2.pl (Kamil Jońca) writes:
[...]
[1] - I'm pretty sure, i have test it also previously.
-- http://stopstopnop.pl/stop_stopnop.pl_o_nas.html A guy has to get fresh once in a while so a girl doesn't lose her confidence.
Hi,
port = 6700
non privileged port
but when I try to change port to 67 it stop respond to broadcast queries :(
what permissions is server running as? server running as freerad user or such, rather than root? try changing that...and if that works, then look at all the other bits needed in the system to allow that user to access the required resources as non root user. alan
participants (3)
-
A.L.M.Buxey@lboro.ac.uk -
Alan DeKok -
kjonca@o2.pl