mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-04-16 18:19:36 +00:00
rename lease-script -> dhcpv4-server-lease
This commit is contained in:
parent
6b3f3c1e46
commit
e54a4572f7
25 changed files with 156 additions and 150 deletions
|
|
@ -64,14 +64,14 @@ Usage and invocation
|
|||
|
||||
Run this script from a dhcp server as lease-script to collect the MAC
|
||||
address when a new address is leased. You may want to use
|
||||
[lease-script](lease-script.md).
|
||||
[dhcpv4-server-lease](dhcpv4-server-lease.md).
|
||||
|
||||
See also
|
||||
--------
|
||||
|
||||
* [Comment DHCP leases with info from access list](dhcp-lease-comment.md)
|
||||
* [Create DNS records for DHCP leases](dhcp-to-dns.md)
|
||||
* [Run other scripts on DHCP lease](lease-script.md)
|
||||
* [Run other scripts on IPv4 DHCP server lease](dhcpv4-server-lease.md)
|
||||
|
||||
---
|
||||
[⬅️ Go back to main README](../README.md)
|
||||
|
|
|
|||
|
|
@ -50,14 +50,14 @@ Usage and invocation
|
|||
|
||||
Run this script from a dhcp server as lease-script to update the comment
|
||||
just after a new address is leased. You may want to use
|
||||
[lease-script](lease-script.md).
|
||||
[dhcpv4-server-lease](dhcpv4-server-lease.md).
|
||||
|
||||
See also
|
||||
--------
|
||||
|
||||
* [Collect MAC addresses in wireless access list](collect-wireless-mac.md)
|
||||
* [Create DNS records for DHCP leases](dhcp-to-dns.md)
|
||||
* [Run other scripts on DHCP lease](lease-script.md)
|
||||
* [Run other scripts on IPv4 DHCP server lease](dhcpv4-server-lease.md)
|
||||
|
||||
---
|
||||
[⬅️ Go back to main README](../README.md)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ Just install the script:
|
|||
$ScriptInstallUpdate dhcp-to-dns;
|
||||
|
||||
Then run it from dhcp server as lease script. You may want to use
|
||||
[lease-script](lease-script.md).
|
||||
[dhcpv4-server-lease](dhcpv4-server-lease.md).
|
||||
|
||||
A scheduler cares about cleanup:
|
||||
|
||||
|
|
@ -102,8 +102,8 @@ See also
|
|||
|
||||
* [Collect MAC addresses in wireless access list](collect-wireless-mac.md)
|
||||
* [Comment DHCP leases with info from access list](dhcp-lease-comment.md)
|
||||
* [Run other scripts on IPv4 DHCP server lease](dhcpv4-server-lease.md)
|
||||
* [Create DNS records for IPSec peers](ipsec-to-dns.md)
|
||||
* [Run other scripts on DHCP lease](lease-script.md)
|
||||
|
||||
---
|
||||
[⬅️ Go back to main README](../README.md)
|
||||
|
|
|
|||
54
doc/dhcpv4-server-lease.md
Normal file
54
doc/dhcpv4-server-lease.md
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
Run other scripts on IPv4 DHCP server lease
|
||||
===========================================
|
||||
|
||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
[⬅️ Go back to main README](../README.md)
|
||||
|
||||
> ℹ️ **Info**: This script can not be used on its own but requires the base
|
||||
> installation. See [main README](../README.md) for details.
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
This script is supposed to run from IPv4 DHCP server as lease script. On a
|
||||
DHCP lease it runs each script containing the following line, where `##` is
|
||||
a decimal number for ordering:
|
||||
|
||||
# provides: dhcpv4-server-lease, order=##
|
||||
|
||||
Currently it runs if available, in order:
|
||||
|
||||
* [dhcp-to-dns](dhcp-to-dns.md)
|
||||
* [collect-wireless-mac](collect-wireless-mac.md)
|
||||
* [dhcp-lease-comment](dhcp-lease-comment.md)
|
||||
* `hotspot-to-wpa-cleanup`, which is an optional cleanup script
|
||||
of [hotspot-to-wpa](hotspot-to-wpa.md)
|
||||
|
||||
Requirements and installation
|
||||
-----------------------------
|
||||
|
||||
Just install the script:
|
||||
|
||||
$ScriptInstallUpdate dhcpv4-server-lease;
|
||||
|
||||
... and add it as `lease-script` to your dhcp server:
|
||||
|
||||
/ip/dhcp-server/set lease-script="dhcpv4-server-lease" [ find ];
|
||||
|
||||
See also
|
||||
--------
|
||||
|
||||
* [Collect MAC addresses in wireless access list](collect-wireless-mac.md)
|
||||
* [Comment DHCP leases with info from access list](dhcp-lease-comment.md)
|
||||
* [Create DNS records for DHCP leases](dhcp-to-dns.md)
|
||||
* [Use WPA network with hotspot credentials](hotspot-to-wpa.md)
|
||||
|
||||
---
|
||||
[⬅️ Go back to main README](../README.md)
|
||||
[⬆️ Go back to top](#top)
|
||||
|
|
@ -49,24 +49,24 @@ and add a scheduler.
|
|||
|
||||
For `wifi`:
|
||||
|
||||
$ScriptInstallUpdate hotspot-to-wpa-cleanup.wifi,lease-script;
|
||||
/system/scheduler/add interval=1d name=hotspot-to-wpa-cleanup on-event="/system/script/run hotspot-to-wpa-cleanup.wifi;" start-time=startup;
|
||||
$ScriptInstallUpdate hotspot-to-wpa-cleanup.wifi,dhcpv4-server-lease;
|
||||
/system/scheduler/add interval=1d name="hotspot-to-wpa-cleanup" on-event="/system/script/run hotspot-to-wpa-cleanup.wifi;" start-time=startup;
|
||||
|
||||
For legacy CAPsMAN:
|
||||
|
||||
$ScriptInstallUpdate hotspot-to-wpa-cleanup.capsman,lease-script;
|
||||
/system/scheduler/add interval=1d name=hotspot-to-wpa-cleanup on-event="/system/script/run hotspot-to-wpa-cleanup.capsman;" start-time=startup;
|
||||
$ScriptInstallUpdate hotspot-to-wpa-cleanup.capsman,dhcpv4-server-lease;
|
||||
/system/scheduler/add interval=1d name="hotspot-to-wpa-cleanup" on-event="/system/script/run hotspot-to-wpa-cleanup.capsman;" start-time=startup;
|
||||
|
||||
And add the lease script and matcher comment to your wpa interfaces' dhcp
|
||||
server. You can add more information to the comment, separated by comma. In
|
||||
this example the server is called `hotspot-to-wpa`.
|
||||
|
||||
/ip/dhcp-server/set lease-script=lease-script comment="hotspot-to-wpa=wpa" hotspot-to-wpa;
|
||||
/ip/dhcp-server/set lease-script="dhcpv4-server-lease" comment="hotspot-to-wpa=wpa" hotspot-to-wpa;
|
||||
|
||||
You can specify the timeout after which a device is removed from leases and
|
||||
access-list. The default is four weeks.
|
||||
|
||||
/ip/dhcp-server/set lease-script=lease-script comment="hotspot-to-wpa=wpa, timeout=2w" hotspot-to-wpa;
|
||||
/ip/dhcp-server/set lease-script="dhcpv4-server-lease" comment="hotspot-to-wpa=wpa, timeout=2w" hotspot-to-wpa;
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
|
@ -117,7 +117,7 @@ passphrase from hotspot credentials.
|
|||
See also
|
||||
--------
|
||||
|
||||
* [Run other scripts on DHCP lease](lease-script.md)
|
||||
* [Run other scripts on IPv4 DHCP server lease](dhcpv4-server-lease.md)
|
||||
|
||||
---
|
||||
[⬅️ Go back to main README](../README.md)
|
||||
|
|
|
|||
|
|
@ -1,54 +1 @@
|
|||
Run other scripts on DHCP lease
|
||||
===============================
|
||||
|
||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
[⬅️ Go back to main README](../README.md)
|
||||
|
||||
> ℹ️ **Info**: This script can not be used on its own but requires the base
|
||||
> installation. See [main README](../README.md) for details.
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
This script is supposed to run from dhcp server as lease script. On a dhcp
|
||||
lease it runs each script containing the following line, where `##` is a
|
||||
decimal number for ordering:
|
||||
|
||||
# provides: lease-script, order=##
|
||||
|
||||
Currently it runs if available, in order:
|
||||
|
||||
* [dhcp-to-dns](dhcp-to-dns.md)
|
||||
* [collect-wireless-mac](collect-wireless-mac.md)
|
||||
* [dhcp-lease-comment](dhcp-lease-comment.md)
|
||||
* `hotspot-to-wpa-cleanup`, which is an optional cleanup script
|
||||
of [hotspot-to-wpa](hotspot-to-wpa.md)
|
||||
|
||||
Requirements and installation
|
||||
-----------------------------
|
||||
|
||||
Just install the script:
|
||||
|
||||
$ScriptInstallUpdate lease-script;
|
||||
|
||||
... and add it as `lease-script` to your dhcp server:
|
||||
|
||||
/ip/dhcp-server/set lease-script=lease-script [ find ];
|
||||
|
||||
See also
|
||||
--------
|
||||
|
||||
* [Collect MAC addresses in wireless access list](collect-wireless-mac.md)
|
||||
* [Comment DHCP leases with info from access list](dhcp-lease-comment.md)
|
||||
* [Create DNS records for DHCP leases](dhcp-to-dns.md)
|
||||
* [Use WPA network with hotspot credentials](hotspot-to-wpa.md)
|
||||
|
||||
---
|
||||
[⬅️ Go back to main README](../README.md)
|
||||
[⬆️ Go back to top](#top)
|
||||
This script has been renamed. Please see [dhcpv4-server-lease](dhcpv4-server-lease.md).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue