IP lease time mysql IP pool
Tevfik Ceydeliler
tevfik.ceydeliler at astron.yasar.com.tr
Wed Apr 20 13:10:50 CEST 2016
Hi,
I have an IP pool (near 30 IP) and some client comes over GSM APN
But altough clients disconnect and reconnect often, same client gets
always different IP address.
As show debug log below, altough same NAS IP and Calling station ID,
User gebzewm19 connected 2 times and got 2 diffrent IP addresses in shot
time It occurs till IP pool is full. Then I get error thatIP
ALLOCATION FAILED.
I check sqlippool.conf the lease duration is :
lease-duration = 7200
and
pool-key= "%{NAS-IP-Address}-%{Calling-Station-Id}"
Have you any suggestion to pass this problem?
regards...
### DEBUG LOG:
User-Name = "gebzewm19"
expand: %{User-Name} -> gebzewm19
sql_set_user escaped user --> 'gebzewm19'
[suffix] No '@' in User-Name = "gebzewm19", looking up realm NULL
[sql] expand: %{User-Name} -> gebzewm19
[sql] sql_set_user escaped user --> 'gebzewm19'
[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 = 'gebzewm19' ORDER BY id
[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 = 'gebzewm19' ORDER BY id
[sql] expand: SELECT groupname FROM radusergroup
WHERE username = '%{SQL-User-Name}' ORDER BY priority ->
SELECT groupname FROM radusergroup WHERE username =
'gebzewm19' ORDER BY priority
[sqlippool] expand: %{User-Name} -> gebzewm19
[sqlippool] sql_set_user escaped user --> 'gebzewm19'
[sqlippool] expand: SELECT framedipaddress FROM radippool WHERE
pool_name = '%{control:Pool-Name}' AND (expiry_time < NOW() OR
expiry_time IS NULL) ORDER BY (username <> '%{User-Name}'),
(callingstationid <> '%{Calling-Station-Id}'), expiry_time LIMIT 1
FOR UPDATE -> SELECT framedipaddress FROM radippool WHERE pool_name =
'IP_TCELL_YSS' AND (expiry_time < NOW() OR expiry_time IS NULL) ORDER
BY (username <> 'gebzewm19'), (callingstationid <> '905366292079'),
expiry_time LIMIT 1 FOR UPDATE
[sqlippool] expand: UPDATE radippool SET nasipaddress =
'%{NAS-IP-Address}', pool_key =
'%{NAS-IP-Address}-%{Calling-Station-Id}', callingstationid =
'%{Calling-Station-Id}', username = '%{User-Name}', expiry_time = NOW()
+ INTERVAL 7200 SECOND WHERE framedipaddress = '172.30.73.7' AND
expiry_time IS NULL -> UPDATE radippool SET nasipaddress =
'172.30.80.1', pool_key = '172.30.80.1-905366292079', callingstationid
= '905366292079', username = 'gebzewm19', expiry_time = NOW() +
INTERVAL 7200 SECOND WHERE framedipaddress = '172.30.73.7' AND
expiry_time IS NULL
[sqlippool] expand: Allocated IP: %{reply:Framed-IP-Address} from
%{control:Pool-Name} (did %{Called-Station-Id} cli
%{Calling-Station-Id} port %{NAS-Port} user %{User-Name}) -> Allocated
IP: 172.30.73.7 from IP_TCELL_YSS (did yasarapn cli 905366292079 port
26602633 user gebzewm19)
Allocated IP: 172.30.73.7 from IP_TCELL_YSS (did yasarapn cli
905366292079 port 26602633 user gebzewm19)
User-Name = "gebzewm19"
expand: %{User-Name} -> gebzewm19
sql_set_user escaped user --> 'gebzewm19'
[suffix] No '@' in User-Name = "gebzewm19", looking up realm NULL
[sql] expand: %{User-Name} -> gebzewm19
[sql] sql_set_user escaped user --> 'gebzewm19'
[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 = 'gebzewm19' ORDER BY id
[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 = 'gebzewm19' ORDER BY id
[sql] expand: SELECT groupname FROM radusergroup
WHERE username = '%{SQL-User-Name}' ORDER BY priority ->
SELECT groupname FROM radusergroup WHERE username =
'gebzewm19' ORDER BY priority
[sqlippool] expand: %{User-Name} -> gebzewm19
[sqlippool] sql_set_user escaped user --> 'gebzewm19'
[sqlippool] expand: SELECT framedipaddress FROM radippool WHERE
pool_name = '%{control:Pool-Name}' AND (expiry_time < NOW() OR
expiry_time IS NULL) ORDER BY (username <> '%{User-Name}'),
(callingstationid <> '%{Calling-Station-Id}'), expiry_time LIMIT 1
FOR UPDATE -> SELECT framedipaddress FROM radippool WHERE pool_name =
'IP_TCELL_YSS' AND (expiry_time < NOW() OR expiry_time IS NULL) ORDER
BY (username <> 'gebzewm19'), (callingstationid <> '905366292079'),
expiry_time LIMIT 1 FOR UPDATE
[sqlippool] expand: UPDATE radippool SET nasipaddress =
'%{NAS-IP-Address}', pool_key =
'%{NAS-IP-Address}-%{Calling-Station-Id}', callingstationid =
'%{Calling-Station-Id}', username = '%{User-Name}', expiry_time = NOW()
+ INTERVAL 7200 SECOND WHERE framedipaddress = '172.30.73.8' AND
expiry_time IS NULL -> UPDATE radippool SET nasipaddress =
'172.30.80.1', pool_key = '172.30.80.1-905366292079', callingstationid
= '905366292079', username = 'gebzewm19', expiry_time = NOW() +
INTERVAL 7200 SECOND WHERE framedipaddress = '172.30.73.8' AND
expiry_time IS NULL
[sqlippool] expand: Allocated IP: %{reply:Framed-IP-Address} from
%{control:Pool-Name} (did %{Called-Station-Id} cli
%{Calling-Station-Id} port %{NAS-Port} user %{User-Name}) -> Allocated
IP: 172.30.73.8 from IP_TCELL_YSS (did yasarapn cli 905366292079 port
32257377 user gebzewm19)
Allocated IP: 172.30.73.8 from IP_TCELL_YSS (did yasarapn cli
905366292079 port 32257377 user gebzewm19)
...
...
sqlippool] expand: IP Allocation FAILED from %{control:Pool-Name}
(did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port}
user %{User-Name}) ->
...
--
More information about the Freeradius-Users
mailing list