Tag - dhcp - liczba wpisów 2

IP > DHCP Server > [+] > zakładka [Script]

Lease Script:

:local recipient "user@domain.com"
/ip dhcp-server lease

:if ($leaseBound = 1 && ([/ip dhcp-server lease find where dynamic mac-address=$leaseActMAC])) do={
	:do {
        :local dhcphostname $"lease-hostname"        
		:tool e-mail send to=$recipient subject="DHCP Address Alert [$leaseActIP] [$leaseActMAC] [$dhcphostname]" body="MAC address: [$leaseActMAC]\nIP address: [$leaseActIP]\nDHCP Server: [$leaseServerName]\nHostname: [$dhcphostname]"
		#:log info "Sent DHCP alert for MAC $leaseActMAC"
        
	} on-error={:log error "Failed to send alert email to $recipient"}}

https://forum.mikrotik.com/viewtopic.php?t=153641

Mikrotik export DHCP config Kategoria: MikroTik | Tagi: dhcp, mikrotik | Autor: Bartłomiej Gałęzia

/ip dhcp-server export file=leaseConfiguration.txt

Źródło: https://forum.mikrotik.com/viewtopic.php?t=29597