🔌 Guide Router
Mikrotik OS

Come eseguire gli script su scenari multi-WAN su Mikrotik

1min
per sincronizzare 2 o più indirizzi ip pubblici, è necessario creare uno script su mikrotik con le seguenti righe /ip route remove \[find comment=ddns wan] sostituisci \<gateway wan2> con il gateway della seconda linea (wan) /ip route add dst address=185 236 104 114 gateway=\<gateway wan2> comment=ddns wan nei campi user1 e pass1, inserisci il nome utente (username) e la password del tuo account (prima rete) \ tool fetch url="" fai la stessa cosa per user2 e pass2 nota bene per sincronizzare il secondo indirizzo ip pubblico, devi inserire la seconda rete nel tuo dashboard (menu network) \ tool fetch url="" copia e incolla anche le seguenti righe per eliminare le rotte statiche create in precedenza e cancellare la cache /ip route remove \[find comment=ddns wan] /ip dns cache flush di seguito sono riportati gli script da utilizzare nel caso di 3 e 4 wan nota come spiegato in precedenza, devi sostituire i campi gateway wan, user e pass con i tuoi dati /ip route remove \[find comment=ddns wan] /ip route add dst address=185 236 104 114 gateway=\<gateway wan2> comment=ddns wan /ip route add dst address=185 236 104 124 gateway=\<gateway wan3> comment=ddns wan \ tool fetch url="" \ tool fetch url="" \ tool fetch url="" /ip route remove \[find comment=ddns wan] /ip dns cache flush /ip route remove \[find comment=ddns wan] /ip route add dst address=185 236 104 114 gateway=\<gateway wan2> comment=ddns wan /ip route add dst address=185 236 104 124 gateway=\<gateway wan3> comment=ddns wan /ip route add dst address=185 236 104 134 gateway=\<gateway wan4> comment=ddns wan \ tool fetch url="" \ tool fetch url="" \ tool fetch url="" \ tool fetch url="" /ip route remove \[find comment=ddns wan] /ip dns cache flush infine, è necessario creare un scheduler per eseguire automaticamente lo script , ad esempio, ogni minuto dal tuo dashboard, nel menu networks , puoi verificare lo stato delle varie reti se tutto funziona correttamente, dovresti vedere i vari indirizzi ip pubblici e lo stato di sincronizzazione altri modi per chiedere » » come eseguire script in scenari multi wan su mikrotik » » esecuzione di script in scenari multi wan su mikrotik come gestirli