Community discussions

MikroTik App
 
Stryker777
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 71
Joined: Fri Jul 07, 2006 11:40 pm
Contact:

Saving time with freeradius

Sat Aug 12, 2006 6:27 am

Just posting this so no one else has to spend hours overlooking the issue.
I just set up a new radius server with mysql. Authenticated fine but I wanted static IPs assigned in some cases too. No problem, except Framed-IP-Address was not working so my users ended up with an IP from the pool in my pppoe profile.

Here was the solution in case some one else runs into this,
Open the users file and comment out all that default junk. It defaults and your attributes in your sql database don't do anything. Just never thought of it since I wasn't using the flat files.

Good luck to everyone.
 
jhambronk
just joined
Posts: 18
Joined: Mon Aug 14, 2006 9:17 am

explain it more

Mon Aug 14, 2006 9:31 am

hello there,

can u explain it more, i want to use Framed-IP-Address and Idle Timeout from freeradius too...but still no luck...


thanks


RF
 
Stryker777
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 71
Joined: Fri Jul 07, 2006 11:40 pm
Contact:

Tue Aug 15, 2006 2:01 pm

Sure can.
In the users file (mine is in /etc/freeradius) there are a bunch of defaults set and since we are using sql to feed the attributes, we do not need those defaults. They just stomp on us.

Here are a few of them, but I commented out all of them.
#DEFAULT        Service-Type == Framed-User
#       Framed-IP-Address = 255.255.255.254,
#       Framed-MTU = 576,
#       Service-Type = Framed-User,
#       Fall-Through = Yes

#DEFAULT        Framed-Protocol == PPP
#       Framed-Protocol = PPP,
#       Framed-Compression = Van-Jacobson-TCP-IP
The top one, if uncommented, would give you an ip from a pool and would not allow a static ip.

If you are using PPPoE and want a static user, here is what an entry should look like in a flat file (though useless with the above default turned on
bart Auth-Type=System
Service-Type=Framed-User,
Framed-Protocol=PPP,
Framed-IP-Address=192.0.3.49,
Framed-IP-Netmast=255.255.255.255,
Framed-MTU=1492
All of these attributes can be added in your sql radreply table with the associated user in order to get a static assigned by database (except the Auth-Type=System).
There are many more attribute options, but that is the basic to get a static IP.
So if you want to see it in a database, it should look something like this
ID UserName Attribute op Value
1 Bart Service-Type == Framed-User
2 Bart Framed-Protocol = PPP
3 Bart Framed-IP-Address = 192.0.3.49
4 Bart Framed-IP-Netmast = 255.255.255.255
5 Bart Framed-MTU = 1492
Good luck

Who is online

Users browsing this forum: idishmonya, inteq, MSN [Bot], Quasar and 172 guests