Community discussions

MikroTik App
 
doush
Long time Member
Long time Member
Topic Author
Posts: 636
Joined: Thu Jun 04, 2009 3:11 pm

PPPoE IP pools from RADIUS

Fri Apr 03, 2009 8:07 pm

Hello
I have a fully routed network, 6 NAS es and Im trying to give public ip s to the users.

The main problem is I have to create IP pools for each NAS and that way Im wasting a lot of IPs and also its hard to manage the IP distrubution.

I have the DMA RAdius Manager for Freeradius but it does intended to be used with one central NAS (bridged network) to distrubute the IP s from a single pool defined in NAS.

Is there another way I can distrubute IPs from a single router or RADIUS ?
 
doush
Long time Member
Long time Member
Topic Author
Posts: 636
Joined: Thu Jun 04, 2009 3:11 pm

Re: PPPoE IP pools from RADIUS

Fri Apr 03, 2009 8:33 pm

anyone ?
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8388
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: PPPoE IP pools from RADIUS

Sat Apr 04, 2009 8:56 pm

what do you use? DHCP? PPPoE? PPTP?
Russian-speaking forum: https://forum.mikrotik.by/. Welcome!

For every complex problem, there is a solution that is simple, neat, and wrong.

MikroTik. Your life. Your routing.
 
doush
Long time Member
Long time Member
Topic Author
Posts: 636
Joined: Thu Jun 04, 2009 3:11 pm

Re: PPPoE IP pools from RADIUS

Sat Apr 04, 2009 10:21 pm

what do you use? DHCP? PPPoE? PPTP?
I use PPPoE
 
doush
Long time Member
Long time Member
Topic Author
Posts: 636
Joined: Thu Jun 04, 2009 3:11 pm

Re: PPPoE IP pools from RADIUS

Sun Apr 05, 2009 11:08 am

any suggestions ?
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8388
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: PPPoE IP pools from RADIUS

Mon Apr 06, 2009 9:12 am

then your RADIUS should maintain your IP Pools
Russian-speaking forum: https://forum.mikrotik.by/. Welcome!

For every complex problem, there is a solution that is simple, neat, and wrong.

MikroTik. Your life. Your routing.
 
doush
Long time Member
Long time Member
Topic Author
Posts: 636
Joined: Thu Jun 04, 2009 3:11 pm

Re: PPPoE IP pools from RADIUS

Mon Apr 06, 2009 8:23 pm

can you please explain it a bit deeply ?

My radius frontend can only map IP pools defined in each NAS (only mikrotik NAS).

Is there a workaround for this that I define a single /24 pool in freeradius ?
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8388
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: PPPoE IP pools from RADIUS

Tue Apr 07, 2009 9:19 am

if your RADIUS do not support distribution of IPs, only setting of IP Pools, then you can do nothing, I think... so split your pool to many small pools and distribute them between NASes
Russian-speaking forum: https://forum.mikrotik.by/. Welcome!

For every complex problem, there is a solution that is simple, neat, and wrong.

MikroTik. Your life. Your routing.
 
doush
Long time Member
Long time Member
Topic Author
Posts: 636
Joined: Thu Jun 04, 2009 3:11 pm

Re: PPPoE IP pools from RADIUS

Wed Apr 08, 2009 12:41 am

Im having multi sector locations so defining an address space in a pool just wastes the public ips.

Because you never know how many customers will connect to that specific pppoe server.
 
Muqatil
Trainer
Trainer
Posts: 574
Joined: Mon Mar 03, 2008 1:03 pm
Location: London - UK
Contact:

Re: PPPoE IP pools from RADIUS

Wed Apr 08, 2009 10:56 am

freeradius has the module radippool to manage ip pools between multiple NAS.
tho you have to configure ad enable it.
and don't ask me how to , i don't know! :lol:
Renato Bernardi

skype: medtech5
 
doush
Long time Member
Long time Member
Topic Author
Posts: 636
Joined: Thu Jun 04, 2009 3:11 pm

Re: PPPoE IP pools from RADIUS

Wed Apr 08, 2009 7:35 pm

freeradius has the module radippool to manage ip pools between multiple NAS.
tho you have to configure ad enable it.
and don't ask me how to , i don't know! :lol:
thanks a lot medianet I guess these are what I was looking at.

Tho I dont know any radius frontend supporting these modules. Do you ?
 
fabarca
just joined
Posts: 16
Joined: Mon Jul 09, 2007 9:50 am

Re: PPPoE IP pools from RADIUS

Thu Apr 09, 2009 6:55 pm

I'm using Radius manager & I have already do that.

You have to modify 2 files:

radiusd.conf
users

Inside radiusd.conf you have to load the ippool module & create the pools you need:


create the pool:

# Example:
# radiusd.conf: ippool students { [...] }
# users file : DEFAULT Group == students, Pool-Name := "students"
#
# ********* IF YOU CHANGE THE RANGE PARAMETERS YOU MUST *********
# ********* THEN ERASE THE DB FILES *********
#
ippool student {

# range-start,range-stop: The start and end ip
# addresses for the ip pool
range-start = 10.0.0.1
range-stop = 10.0.0.100

# netmask: The network mask used for the ip's
netmask = 255.255.255.0

# cache-size: The gdbm cache size for the db
# files. Should be equal to the number of ip's
# available in the ip pool
cache-size = 255

# session-db: The main db file used to allocate ip's to clients
session-db = ${raddbdir}/db.ippool

# ip-index: Helper db index file used in multilink
ip-index = ${raddbdir}/db.ipindex

# override: Will this ippool override a Framed-IP-Address already set
override = no

# maximum-timeout: If not zero specifies the maximum time in seconds an
# entry may be active. Default: 0
maximum-timeout = 0
}




enable the pool:

# Return an address to the IP Pool when we see a stop record.
student
# sqlippool


# Post-Authentication
# Once we KNOW that the user has been authenticated, there are
# additional steps we can take.
post-auth {
# Get an address from the IP Pool.
student
# sqlippool




Inside the users file you have to define when you want ude this pool. For default Radius Manager has:

DEFAULT Auth-Type = Local
Exec-Program-Wait="/usr/local/bin/rmauth \"%{NAS-IP-Address}\" \"%{User-Name}\" \"%{Calling-Station-Id}\" \"%{NAS-Port}\""


For example you can use different pool via REALM:

DEFAULT Mikrotik-Realm == student, Pool-Name := "student"
Exec-Program-Wait="/usr/local/bin/rmauth \"%{NAS-IP-Address}\" \"%{User-Name}\" \"%{Calling-Station-Id}\" \"%{NAS-Port}\""



Bye
 
doush
Long time Member
Long time Member
Topic Author
Posts: 636
Joined: Thu Jun 04, 2009 3:11 pm

Re: PPPoE IP pools from RADIUS

Fri Apr 10, 2009 10:33 pm

hello fabarca;

thanks for your helpful reply but Im having problems with above configuration.

yalmandogus(at)yahoo.com

is my email please contact me, I need help urgently. :)
 
denis
Frequent Visitor
Frequent Visitor
Posts: 71
Joined: Tue Sep 20, 2005 9:27 pm
Location: Serbia

Re: PPPoE IP pools from RADIUS

Mon Apr 13, 2009 10:41 am

I'm using Radius manager & I have already do that.

You have to modify 2 files:

radiusd.conf
users

Inside radiusd.conf you have to load the ippool module & create the pools you need:
Who's RM are you using - DMASoftLab's I presume. What version of FreeRadius are you running? I think the elder ones do not support IPPools
 
marko_bg
Member Candidate
Member Candidate
Posts: 119
Joined: Sat Jun 03, 2006 11:48 am

Re: PPPoE IP pools from RADIUS

Mon Apr 13, 2009 11:10 am

can do this with ippool ...

10 AP , each have one pppoe server,
each need 4 different pool,
total = 40 pools ?
 
denis
Frequent Visitor
Frequent Visitor
Posts: 71
Joined: Tue Sep 20, 2005 9:27 pm
Location: Serbia

Re: PPPoE IP pools from RADIUS

Mon Apr 13, 2009 11:55 am

Marko

U can always define IP pool within each MT that runs PPPoE server and than let Raduis do the job on authentication. Just keep the names of the pools the same on all MT's and change the IP's. That's not a problem.

Tell me, what does "_bg" stands for in your uname? Where are you from?
 
doush
Long time Member
Long time Member
Topic Author
Posts: 636
Joined: Thu Jun 04, 2009 3:11 pm

Re: PPPoE IP pools from RADIUS

Tue Apr 14, 2009 12:42 am

Marko

U can always define IP pool within each MT that runs PPPoE server and than let Raduis do the job on authentication. Just keep the names of the pools the same on all MT's and change the IP's. That's not a problem.
Im using DMA s radius manager.

How could I know that Im going to have for example 40 customers per sector? Maybe more maybe less. Moreover its like a chain. Increasing a pools ip block by just 1 will cause me to change other pools in all network too.
 
doush
Long time Member
Long time Member
Topic Author
Posts: 636
Joined: Thu Jun 04, 2009 3:11 pm

Re: PPPoE IP pools from RADIUS

Thu Apr 16, 2009 8:33 pm

than here it comes a feature request ..

* routeros ability to fetch remote ip pool information between each other.

Like :

Remote IP Pool address :
Remote IP Pool Name:
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8388
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: PPPoE IP pools from RADIUS

Fri Apr 17, 2009 12:44 am

there's no protocols for this. I think it's almost RFC - it must be described, what routers should do when they cannot connect to each other, what they should do with intersecting addresses after restoration of connection, etc...
Russian-speaking forum: https://forum.mikrotik.by/. Welcome!

For every complex problem, there is a solution that is simple, neat, and wrong.

MikroTik. Your life. Your routing.
 
doush
Long time Member
Long time Member
Topic Author
Posts: 636
Joined: Thu Jun 04, 2009 3:11 pm

Re: PPPoE IP pools from RADIUS

Fri Apr 17, 2009 9:12 pm

mikrotik propiteary protocol : nstreme
mikrotik propiteray AP Tx Rx
mikrotik propiteary EoIP etc..

why not Remote IP pools ? This feature can be very helpful to a lot of people. Only between mikrotik devices..
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8388
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: PPPoE IP pools from RADIUS

Fri Apr 17, 2009 9:33 pm

what they should do with intersecting addresses after restoration of connection
the most interesting question =)

for example, MySQL in master-master replication scheme for auto-increment fields uses incrementing not by 1, but by the number of servers. otherwise there will be conflicting values in case of simultaneous inserting on multiple servers.

projecting on the pools - it's the same as distributing different pools per server. with the only difference - IP pools are much smaller than auto-increment fields values =(
Russian-speaking forum: https://forum.mikrotik.by/. Welcome!

For every complex problem, there is a solution that is simple, neat, and wrong.

MikroTik. Your life. Your routing.
 
doush
Long time Member
Long time Member
Topic Author
Posts: 636
Joined: Thu Jun 04, 2009 3:11 pm

Re: PPPoE IP pools from RADIUS

Tue Jun 23, 2009 3:52 pm

I'm using Radius manager & I have already do that.

You have to modify 2 files:

radiusd.conf
users

Inside radiusd.conf you have to load the ippool module & create the pools you need:


create the pool:

# Example:
# radiusd.conf: ippool students { [...] }
# users file : DEFAULT Group == students, Pool-Name := "students"
#
# ********* IF YOU CHANGE THE RANGE PARAMETERS YOU MUST *********
# ********* THEN ERASE THE DB FILES *********
#
ippool student {

# range-start,range-stop: The start and end ip
# addresses for the ip pool
range-start = 10.0.0.1
range-stop = 10.0.0.100

# netmask: The network mask used for the ip's
netmask = 255.255.255.0

# cache-size: The gdbm cache size for the db
# files. Should be equal to the number of ip's
# available in the ip pool
cache-size = 255

# session-db: The main db file used to allocate ip's to clients
session-db = ${raddbdir}/db.ippool

# ip-index: Helper db index file used in multilink
ip-index = ${raddbdir}/db.ipindex

# override: Will this ippool override a Framed-IP-Address already set
override = no

# maximum-timeout: If not zero specifies the maximum time in seconds an
# entry may be active. Default: 0
maximum-timeout = 0
}




enable the pool:

# Return an address to the IP Pool when we see a stop record.
student
# sqlippool


# Post-Authentication
# Once we KNOW that the user has been authenticated, there are
# additional steps we can take.
post-auth {
# Get an address from the IP Pool.
student
# sqlippool




Inside the users file you have to define when you want ude this pool. For default Radius Manager has:

DEFAULT Auth-Type = Local
Exec-Program-Wait="/usr/local/bin/rmauth \"%{NAS-IP-Address}\" \"%{User-Name}\" \"%{Calling-Station-Id}\" \"%{NAS-Port}\""


For example you can use different pool via REALM:

DEFAULT Mikrotik-Realm == student, Pool-Name := "student"
Exec-Program-Wait="/usr/local/bin/rmauth \"%{NAS-IP-Address}\" \"%{User-Name}\" \"%{Calling-Station-Id}\" \"%{NAS-Port}\""



Bye
hello fabarca
Im trying to implement your suggestion above.
Apart from those two files (radiusd.conf,users), do i have to modify sqlipool.conf aswell ?
 
Muqatil
Trainer
Trainer
Posts: 574
Joined: Mon Mar 03, 2008 1:03 pm
Location: London - UK
Contact:

Re: PPPoE IP pools from RADIUS

Fri Jun 26, 2009 1:00 pm

sqlippool.conf is related to mysql pools so u dont need to edit it if you are gonna use ippool
Renato Bernardi

skype: medtech5
 
doush
Long time Member
Long time Member
Topic Author
Posts: 636
Joined: Thu Jun 04, 2009 3:11 pm

Re: PPPoE IP pools from RADIUS

Sun Jun 28, 2009 4:21 pm

sqlippool.conf is related to mysql pools so u dont need to edit it if you are gonna use ippool
thanks medianet.

So I can use both sql based configuration and internal databases of RADIUS at the same time. I dont need to do everything in sql even if my current frontend is sql based. ?
 
Muqatil
Trainer
Trainer
Posts: 574
Joined: Mon Mar 03, 2008 1:03 pm
Location: London - UK
Contact:

Re: PPPoE IP pools from RADIUS

Mon Jun 29, 2009 10:51 am

sqlippool.conf is related to mysql pools so u dont need to edit it if you are gonna use ippool
thanks medianet.

So I can use both sql based configuration and internal databases of RADIUS at the same time. I dont need to do everything in sql even if my current frontend is sql based. ?
radippool is an external module of freeradius so it's not required to keep the same database. Although it's suggested to keep things clear :)
Renato Bernardi

skype: medtech5
 
mersudin
newbie
Posts: 29
Joined: Wed Jan 28, 2009 4:47 pm

Re: PPPoE IP pools from RADIUS

Sun Mar 08, 2015 2:12 pm

After long reasearch and testing, there seems to be problem with DMA radismanager software, problem patched in radiusmanager-4.1-cumulative_patch.tgz, and now it fully works. Yes i know it's old thread.

Who is online

Users browsing this forum: eworm, siddik, sindy and 67 guests