Hi,
I am using static DHCP and static ARP for basic security. I am going to write script which reloads both DHCP and ARP only for entries that were changed recently in outside database. (Script is uploaded via ftp)
So far i have following solution:
:if ([/ip arp get value-name=mac-address number=[find address=192.168.1.4 ]] != "E0:3F:49:CF:4E:7B") do={ /ip arp remove [find where address=192.168.1.4]; /ip dhcp-server lease remove [/ip dhcp-server lease find where address=192.168.1.4]; /ip dhcp-server lease add address=192.168.1.4 mac-address=e0:3f:49:cf:4e:7b server=floor1; /ip arp add mac-address=e0:3f:49:cf:4e:7b address=192.168.1.4 interface=floor1};
this line is applied for every entry
unfortunately it’s little inefficient - script execution for over 400 entries takes about one minute (even in case where there is only one change)
Do you have any ideas for improvement? I don’t want to use API.