WAN failover script with debounced failover logic. See primary_failover_decider.md for usage.
Reusable RouterOS script for provisioning VLAN network components with idempotent checks.
Convention used by this repository:
- VLAN interface name:
bridge.<vlan_id>-<canonic_name> - DHCP pool name:
vlan.<vlan_id>-<canonic_name> - DHCP server name:
vlan.<vlan_id>-<canonic_name> - Subnet:
172.16.<vlan_id>.0/24 - Gateway:
172.16.<vlan_id>.1
Objects created (if missing):
/interface vlan/ip address/ip pool/ip dhcp-server/ip dhcp-server network/interface list member(optional, defaults toLAN)
How to use:
- Open
add_vlan_network.rsc. - Set variables at the top (
vlanID,canonicName,parentInterface, pool range, etc.). - Import or paste into terminal.
- Re-running is safe: existing objects are detected and skipped.
Example for VLAN 192 (storage):
vlanID=192canonicName="storage"parentInterface="bridge"- resulting subnet:
172.16.192.0/24
This example completes the missing VLAN 192 parts in backup config where pool/network already exist but interface, gateway IP and DHCP server were absent.