Mikrotik script balanceo con IPS dinámicas

hay muchos foros como configurar mikrotik con balanceo doble WAN con IP dinámica, digamos que nuestro proveedor de ISP nos da acceso a Internet con IP dinámicas

solo cuando configuramos nuestra rutas luego comentar las rutas cada por un nombre

:local gw1 [ip dhcp-client get [find interface=ether1-WAN1  ] gateway ];
:local gw2 [ip dhcp-client get [find interface=ether2-WAN2  ] gateway ] ;

:local gw1com [ip route get [/ip route find dst-address=0.0.0.0/0 comment=wan1-mark] gateway];

:local gw2com [ip route get [/ip route find dst-address=0.0.0.0/0 comment=wan2-mark] gateway];

:local gw1comlim [ip route get [/ip route find dst-address=0.0.0.0/0 comment=wan1] gateway];

:local gw2comlim [ip route get [/ip route find dst-address=0.0.0.0/0 comment=wan2] gateway];

:if ($gw1 != $gw1com) do={
	/ip route set [/ip route find dst-address=0.0.0.0/0 comment=wan1-mark] gateway=$gw1
	/ip route set [/ip route find dst-address=0.0.0.0/0 comment=wan1] gateway=$gw1
}


:if ($gw2 != $gw2com) do={
	/ip route set [/ip route find dst-address=0.0.0.0/0 comment=wan2-mark] gateway=$gw2
	/ip route set [/ip route find dst-address=0.0.0.0/0 comment=wan2] gateway=$gw2
}

:if ($gw1 != $gw1comlim) do={
	/ip route set [/ip route find dst-address=0.0.0.0/0 comment=wan1-mark] gateway=$gw1
	/ip route set [/ip route find dst-address=0.0.0.0/0 comment=wan1] gateway=$gw1
}


:if ($gw2 != $gw2comlim) do={
	/ip route set [/ip route find dst-address=0.0.0.0/0 comment=wan2-mark] gateway=$gw2
	/ip route set [/ip route find dst-address=0.0.0.0/0 comment=wan2] gateway=$gw2
}