7

I've recently switched my Mikrotik Router's DHCP server to authoritative mode. It fixed several problems with some clients remembering bad IP addresses. But what would happen if I connected a device with static IP to the network? Will the DHCP server protest, or is it ok?

Ron Maupin
  • 98,218
  • 26
  • 115
  • 191
Amunak
  • 173
  • 1
  • 1
  • 7

3 Answers3

11

This only deals with how the DHCP server responds to a client DHCP REQUEST for a certain IP address that is not provided by the DHCP server configuration.

If it isn't part of the DHCP scope on the Mikrotik and the setting is yes, then it responds with a DHCP NACK message, which should prompt the client to do a DHCP DISCOVER.

If set to no, then it will just ignore those packets (assuming that there may be another DHCP server to handle the request).

This should have no effect on a statically assigned IP address since they do not make a DHCP REQUEST. However, I always prefer to still do my static IP addresses through static reservations on the DHCP server when possible.

YLearn
  • 27,141
  • 5
  • 59
  • 128
  • Thanks, this seems to be the case. If I understand it correctly, when I set a static IP on a machine, it doesn't send the DHCP request, therefore it cannot be rejected. The rest is then just a question if setting static IP or static lease is better :) – Amunak May 29 '13 at 20:46
2

You should reserve a seperate pool of IP addresses which will not be distributed by the DHCP server. This will allow you to have spare IPs which you can use to assign static addresses. An example from the Mikrotik website:

To define a pool named ip-pool with the 10.0.0.1-10.0.0.125 address range excluding gateway's address 10.0.0.1 and server's address 10.0.0.100, and the other pool dhcp-pool, with the 10.0.0.200-10.0.0.250 address range:

[admin@MikroTik] ip pool> add name=ip-pool ranges=10.0.0.2-10.0.0.99,10.0.0.101
10.0.0.126
[admin@MikroTik] ip pool> add name=dhcp-pool ranges=10.0.0.200-10.0.0.250
[admin@MikroTik] ip pool> print
  # NAME                                        RANGES
  0 ip-pool                                     10.0.0.2-10.0.0.99
                                                10.0.0.101-10.0.0.126
  1 dhcp-pool                                   10.0.0.200-10.0.0.250

[admin@MikroTik] ip pool>
Lucas Kauffman
  • 4,151
  • 5
  • 28
  • 51
1

You will want to either

  1. set the DHCP scope as a subset of the subnet and issue static addresses out of there, or
  2. create an exclusion within the DHCP scope for the addresses that you assigned as static

If you do not do this then the DHCP server could issue that address and you will have a duplicate.

Mike Marotta
  • 2,057
  • 1
  • 14
  • 26
  • The static addresses I assign are in a different part of the subnet than the ones assigned by the DHCP server, so that shouldn't be a problem. – Amunak May 29 '13 at 20:40