Ivan Kalik schrieb:
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.
^^ It's not ippool.sql - we're talking about the RADIPPOOL table - No I haven't changed this - go and check it by yourself:/freeradius-1.1.7/freeradius-1.1.7/doc/examples/postgresql And besides that I'm not using "ippool.sql" but instead of I'm using "postgresqlippool.conf" because I'm using PostgreSQL as DB 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.
Well actually I think I don't need to change that .. I was just wondering why NAS's IP address is 255.255.255.255
.... 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.
Didn't you read what I wrote? ; ) It won't work , because there are fields which can't be NULL ... for example "pool_key" and so on
^^ 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.
^^ proper shema won't work.
^^ 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.
^^ ah, ok that makes sence ; ) but untill now I'm only able to tell the DB a fix Timestamp like 2008-12-31 11:15:00 but how do I change that the server is picking up the actual time everytime somebody gets an IP. Might there be a special variable for our case?
Ivan Kalik Kalik Informatika ISP
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html