Page 1 of 1

Preventing any Static IP allocation on DHCP Router

Posted: Tue Nov 29, 2011 11:21 am
by ammar83
Hi Forum,

I have RB433 (for test) with MikroTik 5.8 on it. It works as DHCP server. It is allocating IPs from this pool:
[admin@DHCP] > ip pool print detail 
 0 name="dhcp_pool1" ranges=10.10.10.20-10.10.10.100 
Now I want to force the users to get their IPs from the DHCP server and do not allow any static allocation...

I've configured my DHCP server to add ARP for leases but it didn't work:
[admin@DHCP] > ip dhcp-server print detail 
Flags: X - disabled, I - invalid 
 0   name="dhcp1" interface=ether3 - Local DHCP lease-time=3d 
     address-pool=dhcp_pool1 bootp-support=static add-arp=yes 
     authoritative=after-2sec-delay   
At any time I can convert any lease to static so its MAC address in the ARP table will be bound with the IP and change its IP to something lies in another pool "Static_Pool":
[admin@DHCP] > ip pool print detail where name="Static_Pool"
 1 name="Static_Pool" ranges=10.10.10.101-10.10.10.250 
With this way, I can control the bandwidth of both pools for example set higher priority to the IPs that are lying in the Static Pool.

Any Suggestions to have the above scenario works normally? I believe that in MikroTik world there is nothing called "Impossible"
Thanks in advance...
Ammar

Re: Preventing any Static IP allocation on DHCP Router

Posted: Tue Nov 29, 2011 11:32 am
by janisk
set interface so arp=reply-only and set dhcp server to add mac addresses to arp table when address is assigned. That way, you will force anyone to use DHCP settings.

Re: Preventing any Static IP allocation on DHCP Router

Posted: Tue Nov 29, 2011 12:04 pm
by ammar83
set interface so arp=reply-only and set dhcp server to add mac addresses to arp table when address is assigned. That way, you will force anyone to use DHCP settings.
Totally handled the problem:
[admin@DHCP] > interface ethernet set "ether3" arp=reply-only 
Thanks janisk.. I really appreciate your reply...

Ammar.

Re: Preventing any Static IP allocation on DHCP Router

Posted: Mon Jan 09, 2012 12:53 pm
by ranpha
Sorry for bringing up this topic from the dead.

Setting 'ARP' for my DHCP server interface (in my case, it is 'bridge-local'') to 'reply-only' works fine at preventing users with static IP addresses from connecting to the network, but it also break my Hurricane Electric IPv6 tunnel routing. Is there anything I can do to prevent that from happening?

Routerboard RB751U-2HnD with RouterOS 5.11.

Re: Preventing any Static IP allocation on DHCP Router

Posted: Wed Jan 11, 2012 12:02 pm
by janisk
wait for 5.12 :) to be released.

Re: Preventing any Static IP allocation on DHCP Router

Posted: Sat Jan 21, 2012 6:56 pm
by ranpha
Just installed 5.12, and the IPv6 lost route problem is indeed fixed. But another problem surfaced with 5.12 that doesn't happen with 5.11. If I set ARP to reply-only at bridge-local, IPv4 routes will instead lost. With this, I can only access IPv6-enabled resources and not IPv4 resources.

Re: Preventing any Static IP allocation on DHCP Router

Posted: Mon Jan 30, 2012 3:55 pm
by janisk
this also is already fixed and waiting for next release.

Re: Preventing any Static IP allocation on DHCP Router

Posted: Sat Apr 27, 2013 5:27 am
by 2fast4youbr
arp=reply-only works, but lets say I have a pool of ip's for the dhcp from 10.0.0.10 - 10.0.0.100, but the addresses 1.0.0.1/2/3/4/5/6/7/8/9 I would like to fix them on my switch or any other device on the network that I need a fixed IP.

If I forde to them use DHCp, I will not able to forthe my switch to get the 10.0.0.9 .

how can I do that ?

Re: Preventing any Static IP allocation on DHCP Router

Posted: Thu May 02, 2013 12:43 pm
by janisk
use static dhcp leases, that way you can assign what host gets what address. In alignment with previous topic - use feature to add ARP entry when DHCP lease is given.