Trouble "SQL Based IP Pool"

Ivan Kalik tnt at kalik.net
Tue May 6 23:50:58 CEST 2008


>From your previous post:

PostgreSQL:
########################################################

CREATE TABLE radippool (
        id                      BIGSERIAL PRIMARY KEY,
        pool_name               text NOT NULL,
        FramedIPAddress         INET,
        NASIPAddress            text NOT NULL,
        CalledStationId         VARCHAR(64),
        CallingStationId        text DEFAULT ''::text NOT NULL,
        expiry_time             TIMESTAMP(0) without time zone NOT NULL,
        username                text DEFAULT ''::text,
        pool_key                VARCHAR(30) NOT NULL
);

#################################################################

This is not the schema from ippool.sql. You have made changes and broke
the queries. Use the schema provided with the server.

>This is my actual output for a user who has attribute: "Pool-Name = mypool"
>
>root ~ #  radtest leander 123456 10.1.10.80:1812 2 schaefer
>Sending Access-Request of id 79 to 10.1.10.80 port 1812
>        User-Name = "leander"
>        User-Password = "123456"
>        NAS-IP-Address = 255.255.255.255
>        NAS-Port = 2
>rad_recv: Access-Accept packet from host 10.1.10.80:1812, id=79, length=122
>        Framed-Protocol = PPP
>        Framed-MTU = 1492
>        Framed-Compression = Van-Jacobson-TCP-IP
>        Session-Timeout = 86400
>        Framed-IP-Address = 255.255.255.254
>        Service-Type = Framed-User
>        Framed-IP-Netmask = 255.255.255.255
>root ~ #
>
>^^ Btw. Why is my NAS-IP-Address = 255.255.255.255 ? I didn't write that
>in clients.conf? Where might I change that?

You can't configure NAS-IP-Address in radtest. If you want to send
different NAS-IP-Address use radclient.

>
>.... just once again .. because I can't get rid of the guess that my
>mistake is in the data I typed into the DB table:
>
>INSERT INTO radippool (pool_name, framedipaddress, nasipaddress,
>expiry_time, pool_key) VALUES ('mypool', '192.168.5.1', '10.1.10.80',
>'2008-12-31 00:00:00', '0');

Don't. Type what's documented. If you use proper schema it will work.

>^^ 1. What is pool_key standing for? Why do _I_ have to write that in
>manually?

No you don't. You are just breking thing further. Again, use proper
schema.

>^^ 2. What is expiry_time good for if there is already an
>lease-duration = 3600 configured in the postgresqlippool.conf? And why
>do I get forced to use unix timestamp instead of using a simple time in
>secounds when it'll be expired?

Seconds from when? You do need a timestamp for lease start then.

Ivan Kalik
Kalik Informatika ISP




More information about the Freeradius-Users mailing list