mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-08-04 10:14:31 +02:00
parent
d1c4eb2303
commit
39871f2221
4 changed files with 54 additions and 0 deletions
BIN
doc/mod/ipcalc.d/ipcalc.avif
Normal file
BIN
doc/mod/ipcalc.d/ipcalc.avif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
doc/mod/ipcalc.d/ipcalcreturn.avif
Normal file
BIN
doc/mod/ipcalc.d/ipcalcreturn.avif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
53
doc/mod/ipcalc.md
Normal file
53
doc/mod/ipcalc.md
Normal file
|
@ -0,0 +1,53 @@
|
|||
IP address calculation
|
||||
======================
|
||||
|
||||
[◀ Go back to main README](../../README.md)
|
||||
|
||||
> ℹ️️ **Info**: This module can not be used on its own but requires the base
|
||||
> installation. See [main README](../../README.md) for details.
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
This module adds functions for IP address calculation.
|
||||
|
||||
Requirements and installation
|
||||
-----------------------------
|
||||
|
||||
Just install the module:
|
||||
|
||||
$ScriptInstallUpdate mod/ipcalc;
|
||||
|
||||
Usage and invocation
|
||||
--------------------
|
||||
|
||||
### IPCalc
|
||||
|
||||
The function `$IPCalc` prints information to terminal, including:
|
||||
|
||||
* address
|
||||
* netmask
|
||||
* network in CIDR notation
|
||||
* minimum host address
|
||||
* maximum host address
|
||||
* broadcast address
|
||||
|
||||
It expects an IP address in CIDR notation as argument.
|
||||
|
||||
$IPCalc 192.168.88.1/24;
|
||||
|
||||

|
||||
|
||||
### IPCalcReturn
|
||||
|
||||
The function `$IPCalcReturn` expects an IP address in CIDR notation as
|
||||
argument as well. But it does not print to terminal, instead it returns
|
||||
the information in a named array.
|
||||
|
||||
:put ([ $IPCalcReturn 192.168.88.1/24 ]->"broadcast");
|
||||
|
||||

|
||||
|
||||
---
|
||||
[◀ Go back to main README](../../README.md)
|
||||
[▲ Go back to top](#top)
|
Loading…
Add table
Add a link
Reference in a new issue