Users filtering & binding MAC-to-IP

Hi,

I have over 300 Users.

All users MAC addresses & ip’s are in text file in following Format:
00:11:22:33:44:55 10.0.0.10 # JOHN
00:55:66:77:88:99 10.0.0.11 # OFFICE LAPTOP
11:33:96:66:55:44 10.0.0.11 # FLAT 23

& so on. I need a script which will do the following.

Add entry in DHCP server, so every time users gets the same static ip mentioned inthe file.
Read from this file and bind MAC to IP. so only allowed users should be able to connect to the server. Unknown users should get fake ips like from 192.168.0.x series.

Know this is not exactly your question, but why not give user static ip and authenticate with mac or with user name and password? Get rid of DHCP. Just a suggestion.

Hi,

We also provide static IP to the user, but how do we authenticate once we provide them static IP?

Thanks in advance for your help.

Bind user ip with his MAC Address.

Yes, we’re doing that too. All our interfaces that connect to the LAN are configured as “reply-only” ARP type.

Then, we’re putting static ARP entries into the ARP table.

I guess the best way to move forward would be to use PPPoE. We want to use PPPoE too, but we want to use it using a separate Radius server like FreeRadius. Do you know of any good documents which outlines the process?

Thanks in advance for your reply.

IPLESS PPPoE is very good and secure choice. It will save you from many hurdles as well.

Read following links to get an overview on Mikrotik with FREERADIUS.

http://wiki.mikrotik.com/wiki/RouterOs_MySql_Freeradius

http://infodotnet.blogspot.com/2007/11/part-1-mikrotik-hotspot-freeradius.html