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 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
Explain better and probably someother help you
I have 2 pppoe accounts dynamically, and 1 static account, can with a script we can enter the ip route in 1 comment?
: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;
}
@cooling
No need for crossposing same question in multiple threads.
ok Jotne , i’am sorry
hi cooling,
You shouldn’t be doing this at all because it will break most of your nat’d connections over pppoe interfaces (/ip route set [find comment=“Test”] gateway=$newgw1,$newgw2; this will do ecmp and multi socket like https will go haywire)
Try creating a default route with routing marks and a ppp profile for each of your links, and use the script tab to automate the gateway change and then split traffic using mangle, maybe pcc with source address matcher
/ip route set [find where comment=#pppoe1] gateway=[/ip address get [/ip address find interface=pppoe-cli-1] network]
Regards,
Solved
: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";
}
Insert route with one comment Test
Thanks All