Assign IP Address to the client based on MAC Address

454 views
Skip to first unread message

Shakthi S S

unread,
Mar 4, 2016, 8:16:33 AM3/4/16
to Grase Hotspot
Dear Friends

          My Setup is,  LAN IP Address : 192.165.0.0/24,  What i want is.

1. Assign The IP Address 192.165.0.1 Which Have the Mac Address XX-XX-XX-XX-XX(My Ipad)
2. Assign The IP Address 192.165.0.2 Which Have the Mac Address XX-XX-XX-XX-XX(My Iphone)
3. Assign The IP Address 192.165.0.3 Which Have the Mac Address XX-XX-XX-XX-XX(My Laptop)
4. Any Other Laptop or Ipad DHCP Request need to block from dhcp server and no need to provide the ip address.


Please Help Me to Complete this. 

Thanks in Advance



Edward Allen

unread,
Mar 4, 2016, 8:40:34 AM3/4/16
to Grase Hotspot

That's static dhcp entries which isn't yet implemented


--
This mailing list is for the Grase Hotspot Project http://grasehotspot.org
---
You received this message because you are subscribed to the Google Groups "Grase Hotspot" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grase-hotspo...@grasehotspot.org.
To post to this group, send email to grase-...@grasehotspot.org.
Visit this group at https://groups.google.com/a/grasehotspot.org/group/grase-hotspot/.
To view this discussion on the web visit https://groups.google.com/a/grasehotspot.org/d/msgid/grase-hotspot/7504745a-7650-4f4a-9af9-590a54584fc5%40grasehotspot.org.

Shakthi S S

unread,
Mar 4, 2016, 11:41:00 PM3/4/16
to Grase Hotspot
Can I Install the Other DHCP Service on the same computer Where Grase is HOTspot is Running. and Relay the DHCP Request to that New Installed Service. Stop the Coova Chilli DHCP Service. If Possible please guide me.

Thanks in Advance

Henry Terkura Swende

unread,
Mar 7, 2016, 6:13:21 AM3/7/16
to grase-...@grasehotspot.org

In my case I created a /etc/ethers file, then added the option ethers=/etc/ethers option in the radreply table. In my /etc/ethers file, I entered the mac-ip assignment.

--
This mailing list is for the Grase Hotspot Project http://grasehotspot.org
---
You received this message because you are subscribed to the Google Groups "Grase Hotspot" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grase-hotspo...@grasehotspot.org.
To post to this group, send email to grase-...@grasehotspot.org.
Visit this group at https://groups.google.com/a/grasehotspot.org/group/grase-hotspot/.

Shakthi S S

unread,
Mar 8, 2016, 6:02:31 AM3/8/16
to Grase Hotspot
Can you Please Provide the Step by step to configure this.

Henry Terkura Swende

unread,
Mar 9, 2016, 4:33:01 AM3/9/16
to grase-...@grasehotspot.org

Add this entry to your 'radreply' table
UserName:CoovaChilli
Attribute: ChilliSpot-Config
op:+=
Value: ethers=/etc/ethers
Then create a file in /etc directory called ethers
I.e
Run this command on your Linux terminal
sudo touch /etc/ethers
Then populate the /etc/ethers file with the IP-MAC mapping in this format
AA:BB:CC:DD:EE:FF 123.123.123.123
On each line with its own entry
In my case I tried adding comments to the file but it ended up messing the file so I had to remove the comments in the file.
You will have to restart chilli for effects to take place

KIRA Ynet

unread,
Mar 9, 2016, 6:56:59 AM3/9/16
to Grase Hotspot
Great Henry. This will be another a must have tweaked feature. Maybe in the future, this can be added directly into Grase-Hotspot Web Management panel.
Gonna try this tweak soon. :)

Shakthi S S

unread,
Mar 16, 2016, 3:58:29 AM3/16/16
to Grase Hotspot
mysql -u root -p
use radius;
show tables;
select * from radreply;
INSERT INTO radreply (id,UserName,Attribute,op,Value)
VALUES ('15','CoovaChilli','ChilliSpot-Config','+=','/etc/ethers');
quit

As root i Created the file
vi /etc/ethers
F0:F6:1C:44:E2:0B 192.165.0.203

Then
/etc/init.d/chilli restart

Starting chilli: coova-chilli: unrecognized option '--/etc/ethers'
coova-chilli[1803]: options.c: 181: could not generate configuration (/var/run/chilli.1803.cfg.bin), sleeping one second
coova-chilli: unrecognized option '--/etc/ethers'

Shakthi S S

unread,
Mar 16, 2016, 3:59:51 AM3/16/16
to Grase Hotspot
File Permission

-rw-r--r-- 1 root root 32 Mar 16 13:29 /etc/ethers

Timothy White

unread,
Mar 16, 2016, 5:35:03 AM3/16/16
to Grase Hotspot
Instead of trying to use the ethers file, there is a nice convenient method of doing Static IP's, if you are doing MAC Auth.

Ideally, you'd assign these in the Static IP range, but as we don't currently set that, just assign it towards the end of the DHCP range.


Basically, you add a Radius Reply attributed for Framed-IP-Address. 

This only works for MAC Auth users (so computers or other devices you create a computer account for).

I'll continue to investigate options for devices not doing MAC Auth.

Regards

Tim

Shakthi S S

unread,
Mar 16, 2016, 5:58:43 AM3/16/16
to Grase Hotspot
I delete the /etc/ethers file and delete the entry in mysql db delete from radreply where id=15. and reboot but i got the same error

Starting chilli: coova-chilli: unrecognized option '--/etc/ethers'
coova-chilli[1803]: options.c: 181: could not generate configuration (/var/run/chilli.1803.cfg.bin), sleeping one second
coova-chilli: unrecognized option '--/etc/ethers'



Henry Terkura Swende

unread,
Mar 16, 2016, 10:29:42 AM3/16/16
to grase-...@grasehotspot.org

mysql -u root -p
use radius;
show tables;
select * from radreply;
INSERT INTO radreply (id,UserName,Attribute,op,Value)

VALUES ('15','CoovaChilli','ChilliSpot-Config','+=',ethers='/etc/ethers');
quit

Take note of 'ethers=/etc/ethers'
And not
'/etc/ethers'
Alone

Instead of

mysql -u root -p
use radius;
show tables;
select * from radreply;
INSERT INTO radreply (id,UserName,Attribute,op,Value)
VALUES ('15','CoovaChilli','ChilliSpot-Config','+=','/etc/ethers');
quit

Henry Terkura Swende

unread,
Mar 16, 2016, 10:33:46 AM3/16/16
to grase-...@grasehotspot.org

INSERT INTO radreply (id,UserName,Attribute,op,Value)

VALUES ('15','CoovaChilli','ChilliSpot-Config','+=','ethers=/etc/ethers');

Shakthi S S

unread,
Mar 17, 2016, 3:02:48 AM3/17/16
to Grase Hotspot
Its Working. Now i can able to assign the ip address based in mac address between the dhcp start and end range like this..

DHCP Start 192.165.0.101
DHCP End 192.165.0.150

/etc/ethers
XX:XX:XX:XX:XX:XX 192.165.0.101

Is it possible to use like this


DHCP Start 192.165.0.101
DHCP End 192.165.0.150

/etc/ethers
XX:XX:XX:XX:XX:XX 192.165.0.151

Thanks For your Valuable support in time.
Reply all
Reply to author
Forward
0 new messages