How to extract network variables?
Posted: Tue Feb 28, 2023 12:10 pm
In Linux, utilizing the commands "ipcalc" or "sipcalc" followed by an IP address and subnet mask allows me to extract helpful variables using "awk".
On RouterOS, I aim to assign the variable "10.0.88.0/24" to "network" and create variables for the minimum and maximum usable hosts, as well as the network address with a value "n" added to it.
As of now, I only know how to extract the network address by removing the subnet mask using the command: ":put [:pick $network 0 [:find $network "/"]]"
Is there a pre-existing script that accomplishes these tasks?
On RouterOS, I aim to assign the variable "10.0.88.0/24" to "network" and create variables for the minimum and maximum usable hosts, as well as the network address with a value "n" added to it.
As of now, I only know how to extract the network address by removing the subnet mask using the command: ":put [:pick $network 0 [:find $network "/"]]"
Is there a pre-existing script that accomplishes these tasks?