<div dir="ltr"><div style="font-family:arial,sans-serif;font-size:13px">Hello,</div><div style="font-family:arial,sans-serif;font-size:13px">I am introducing the Freeradius as DHCP server at my ISP and am experiencing problems with some vendors specifically routers TP-Link.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">The FreeRadius allocates the IP Router but unable to associate the IP offered by freeradius, what intrigues me is that the problem does not occur with the ISC-DHCP.</div>
<div style="font-family:arial,sans-serif;font-size:13px">FreeRADIUS Version 2.2.4 (git #14e1ee7)</div><div style="font-family:arial,sans-serif;font-size:13px">Follow my configuration and Debug.</div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px"><div>server dhcp {</div><div> listen {</div><div> type = dhcp</div><div> ipaddr = XXX.XXX.0.26</div><div> port = 67</div>
<div> interface = eth0</div><div> broadcast = no</div><div> }</div><div> dhcp DHCP-Discover {</div><div> update reply {</div><div> DHCP-Message-Type = DHCP-Offer</div>
<div> }</div><div><br></div><div> update reply {</div><div> DHCP-Domain-Name-Server = XXX.XXX.0.6</div><div> DHCP-Domain-Name-Server = XXX.XXX.0.250</div><div> DHCP-IP-Address-Lease-Time = 120</div>
<div> DHCP-DHCP-Server-Identifier = XXX.XXX.0.26</div><div> }</div><div><br></div><div> sql.authorize</div><div> dhcp_sqlippool</div><div> sql.post-auth</div><div>
ok</div><div> }</div><div><br></div><div> dhcp DHCP-Request {</div><div> update reply {</div><div> DHCP-Message-Type = DHCP-Ack</div><div> }</div><div><br></div>
<div> update reply {</div><div> DHCP-Domain-Name-Server = XXX.XXX.0.6</div><div> DHCP-Domain-Name-Server = XXX.XXX.0.250</div><div> DHCP-IP-Address-Lease-Time = 120</div>
<div> DHCP-DHCP-Server-Identifier = XXX.XXX.0.26</div><div> }</div><div><br></div><div> sql.authorize</div><div> dhcp_sqlippool</div><div> sql.post-auth</div><div>
ok</div><div> }</div><div><br></div><div> dhcp {</div><div> reject</div><div> }</div><div> }</div></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
<div>Ready to process requests.</div><div>Received DHCP-Discover of id 7f519348 from <a href="http://179.127.59.1:67/" target="_blank">179.127.59.1:67</a> to <a href="http://187.85.0.26:67/" target="_blank">187.85.0.26:67</a></div>
<div> DHCP-Opcode = Client-Message</div><div> DHCP-Hardware-Type = Ethernet</div><div> DHCP-Hardware-Address-Length = 6</div><div> DHCP-Hop-Count = 1</div><div> DHCP-Transaction-Id = 2136052552</div>
<div> DHCP-Number-of-Seconds = 4</div><div> DHCP-Flags = Broadcast</div><div> DHCP-Client-IP-Address = 0.0.0.0</div><div> DHCP-Your-IP-Address = 0.0.0.0</div><div> DHCP-Server-IP-Address = 0.0.0.0</div>
<div> DHCP-Gateway-IP-Address = 179.127.59.1</div><div> DHCP-Client-Hardware-Address = a0:f3:c1:f3:78:6a</div><div> DHCP-Message-Type += DHCP-Discover</div><div> DHCP-Client-Identifier += a0:f3:c1:f3:78:6a</div>
<div> DHCP-DHCP-Maximum-Msg-Size += 576</div><div> DHCP-Parameter-Request-List += DHCP-Subnet-Mask</div><div> DHCP-Parameter-Request-List += DHCP-Router-Address</div><div> DHCP-Parameter-Request-List += DHCP-Domain-Name-Server</div>
<div> DHCP-Parameter-Request-List += DHCP-Static-Routes</div><div> DHCP-Parameter-Request-List += DHCP-Vendor</div><div> DHCP-Parameter-Request-List += DHCP-NETBIOS-Name-Servers</div><div> DHCP-Parameter-Request-List += DHCP-NETBIOS-Node-Type</div>
<div> DHCP-Parameter-Request-List += DHCP-NETBIOS</div><div> DHCP-Parameter-Request-List += DHCP-Classless-Static-Route</div><div> DHCP-Parameter-Request-List += 249</div><div> DHCP-Relay-Circuit-Id = "1/1/FHTT-0027b63b"</div>
<div> DHCP-Relay-Remote-Id = ""</div><div>server dhcp {</div><div>Trying sub-section dhcp DHCP-Discover {...}</div><div>+group DHCP-Discover {</div><div>++update reply {</div><div>++} # update reply = noop</div>
<div>++update reply {</div><div>++} # update reply = noop</div><div>[sql] expand: %{DHCP-Relay-Circuit-Id} -> 1/1/FHTT-0027b63b</div><div>[sql] sql_set_user escaped user --> '1/1/FHTT-0027b63b'</div><div>rlm_sql (sql): Reserving sql socket id: 2</div>
<div>[sql] expand: SELECT id, username, attribute, value, op FROM radcheck WHERE username = '%{SQL-User-Name}' ORDER BY id -> SELECT id, username, attribute, value, op FROM radcheck WHERE username = '1/1/FHTT-0027b63b' ORDER BY id</div>
<div>[sql] User found in radcheck table</div><div>[sql] expand: SELECT id, username, attribute, value, op FROM radreply WHERE username = '%{SQL-User-Name}' ORDER BY id -> SELECT id, username, attribute, value, op FROM radreply WHERE username = '1/1/FHTT-0027b63b' ORDER BY id</div>
<div>[sql] expand: SELECT groupname FROM radusergroup WHERE username = '%{SQL-User-Name}' ORDER BY priority -> SELECT groupname FROM radusergroup WHERE username = '1/1/FHTT-0027b63b' ORDER BY priority</div>
<div>rlm_sql (sql): Released sql socket id: 2</div><div>++[sql.authorize] = ok</div><div>++policy dhcp_sqlippool.post-auth {</div><div>+++update request {</div><div> expand: %{DHCP-Relay-Circuit-Id} -> 1/1/FHTT-0027b63b</div>
<div> expand: %{DHCP-Relay-Circuit-Id} -> 1/1/FHTT-0027b63b</div><div> expand: %{DHCP-Gateway-IP-Address} -> 179.127.59.1</div><div> expand: %{%{DHCP-Gateway-IP-Address}:-127.0.0.1} -> 179.127.59.1</div>
<div>+++} # update request = noop</div><div>[dhcp_sqlippool] No Pool-Name defined.</div><div>[dhcp_sqlippool] expand: DHCP: No Pool-Name defined (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name}) -> DHCP: No Pool-Name defined (did cli 1/1/FHTT-0027b63b port user 1/1/FHTT-0027b63b)</div>
<div>DHCP: No Pool-Name defined (did cli 1/1/FHTT-0027b63b port user 1/1/FHTT-0027b63b)</div><div>+++[dhcp_sqlippool] = noop</div><div>+++? if (ok)</div><div>? Evaluating (ok) -> FALSE</div><div>+++? if (ok) -> FALSE</div>
<div>++} # policy dhcp_sqlippool.post-auth = noop</div><div>[sql] expand: %{DHCP-Relay-Circuit-Id} -> 1/1/FHTT-0027b63b</div><div>[sql] sql_set_user escaped user --> '1/1/FHTT-0027b63b'</div><div>[sql] expand: %{User-Password} -></div>
<div>[sql] ... expanding second conditional</div><div>[sql] expand: %{Chap-Password} -></div><div>[sql] expand: INSERT INTO radpostauth (username, pass, reply, authdate) VALUES ( '%{User-Name}', '%{%{User-Password}:-%{Chap-Password}}', '%{reply:Packet-Type}', '%S') -> INSERT INTO radpostauth (username, pass, reply, authdate) VALUES ( '1/1/FHTT-0027b63b', '', '0', '2014-01-12 18:02:18')</div>
<div>rlm_sql (sql) in sql_postauth: query is INSERT INTO radpostauth (username, pass, reply, authdate) VALUES ( '1/1/FHTT-0027b63b', '', '0', '2014-01-12 18:02:18')</div>
<div>rlm_sql (sql): Reserving sql socket id: 1</div><div>rlm_sql (sql): Released sql socket id: 1</div><div>++[sql.post-auth] = ok</div><div>++[ok] = ok</div><div>+} # group DHCP-Discover = ok</div><div>DHCP: Reply will be unicast to giaddr from original packet</div>
<div>} # server dhcp</div><div>Encoding DHCP-Offer of id 7f519348 to <a href="http://179.127.59.1:67/" target="_blank">179.127.59.1:67</a></div><div> DHCP-Opcode = Server-Message</div><div> DHCP-Hardware-Type = Ethernet</div>
<div> DHCP-Hardware-Address-Length = 6</div><div> DHCP-Hop-Count = 1</div><div> DHCP-Transaction-Id = 2136052552</div><div> DHCP-Number-of-Seconds = 0</div><div> DHCP-Flags = Broadcast</div>
<div> DHCP-Client-IP-Address = 0.0.0.0</div><div> DHCP-Your-IP-Address = 179.127.59.2</div><div> DHCP-Server-IP-Address = 187.85.0.26</div><div> DHCP-Gateway-IP-Address = 179.127.59.1</div><div>
DHCP-Client-Hardware-Address = a0:f3:c1:f3:78:6a</div><div> DHCP-Server-Host-Name = ""</div><div> DHCP-Boot-Filename = ""</div><div> DHCP-Domain-Name-Server = 187.85.0.6</div>
<div> DHCP-Domain-Name-Server = 187.85.0.250</div><div> DHCP-IP-Address-Lease-Time = 120</div><div> DHCP-DHCP-Server-Identifier = 187.85.0.26</div><div> DHCP-DHCP-Maximum-Msg-Size = 576</div><div>
Sending DHCP-Offer of id 7f519348 to <a href="http://179.127.59.1:67/" target="_blank">179.127.59.1:67</a></div><div>Finished request 1.</div></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
Thanks.</div></div>