i have 3 connections, 2 pppoe and 1 static ip, how to make that gateway can be 1 routing? does anyone have a script for that?
thanks for advice
I have 2 pppoe accounts dynamically, and 1 static account, can with a script we can enter the ip route in 1 comment?Explain better and probably someother help you
:local newgw1 [/ip address get [find interface="pppoe-out1"] network];
:local newgw2 [/ip address get [find interface="pppoe-out2"] network];
:local routegw1 [/ip route get [find comment="Test"] gateway ];
:local routegw2 [/ip route get [find comment="Test"] gateway ];
:if ($newgw1 != $routegw1),($newgw2 != $routegw2) do={
/ip route set [find comment="Test"] gateway=$newgw1,$newgw2;
}
/ip route set [find where comment=#pppoe1] gateway=[/ip address get [/ip address find interface=pppoe-cli-1] network]
:local newgw1 [/ip address get [find interface="pppoe-out1"] network];
:local newgw2 [/ip address get [find interface="pppoe-out2"] network];
:local routegw1 [/ip route get [find comment="Test"] gateway ];
:local routegw2 [/ip route get [find comment="Test"] gateway ];
:if ($newgw1 != $routegw1) do={
/ip route set [find comment="Test"] gateway="$newgw1,$newgw2";
}