Hello.
I have a DHCP running in the range 192.168.10.2-192.168.10.200
Anyway, I wish to make static every device on the network, yet there is a few devices which is with preset IPs (ESP32 and other microcontrolers).
How to add these devices to the list, so no conflicts could be caused eventually ?
I am currently doing it from IP->ARP->Make Static, but I am not quite sure that this is the proper way.
It should be done as IP → DHCP Server → Leases → Add New … you will need to know devices’ MAC addresses to make leases meaningfull - theoretically you could enter just any MAC address but that would a) allow for problems in rare case when a device with configured MAC appeared in the network and b) it’s harder to relate static leases to actual devices (one has to rely on comments) …
Or use the dynamic lease, make static and then set the desired IP.
Then you don’t need to fiddle with the MAC address.
This only works if client device is actually running DHCP client and network admin wants client to have a particular IP address.
@OP indicated that devices had truely static setup and he only wants to “punch holes in DHCP address pool” to avoid any possibility of address clashes which might come true if a static-address device is switched off for a while, DHCP server offers address to another device and check for address availability thus doesn’t trigger. After static-address device joins the network again, it’ll shamelessly resume using its address and thus creating address clash with the DHCP device.
yep. this is exactly what hapening.
So ARP->Make Static is different from IP->DHCP Server->Leases->Make Static ?
I am confused.
Than what does ARP->Make Static does ?
ARP is not related to DHCP at all.
The protocol is used to map L3 IP addresses to L2 MAC addresses. And that is what the ARP table is.
L2 device does not need an IP address to send data over the local network and uses the ARP table.
edit:
ARP table says
A device with this MAC address has this IP address and is reachable on this network port.
The vast majority of my devices are DHCP reservations (what MT calls Static). ALL of the reservations are outside of my DHCP pool range. For devices that are truly static, they are also assigned addresses that are outside the DHCP range. The MT DHCP server knows nothing of them so they are not listed in the leases page. I have a separate listing for all of my IP assignments (both static and reservations). Because of having every with reservations, my DHCP pool for each LAN is very small 192.168.VLAN-ID.201 to 192.168.VLAN-ID.209
I do like mkx’s idea of putting the truly static devices into the lease list. Keeps you from causing an issue if you typo a number. My OCD would require that the correct MAC be there however…
Than what does ARP->Make Static does ?
When IP device wants to communicate with another IP device over ethernet (or wifi), it sends packets to MAC address. ARP is protocol suite to map IP addresses to MAC addresses. And when device resolves MAC address for connection peer, it temporarily stores the MAC address in ARP table so that it doesn’t have to resolve it for each individual packet. ARP table entries time-out in configured time, Mikrotik’s default seems to be 30 seconds, other vendors may have it much longer (can be in order of hour).
If ARP resolution procedures are not successfull (e.g. because broadcasts are blocked network-wide or some otger reason), then it’s possible to add static entries to ARP table (which don’t get timed-out). This should be used carefully because things will break if for any reason mapping between IP and MAC addresses change (e.g. because host gets NIC replaced).
Thank You fellows for explaining me ! ![]()