Community discussions

MikroTik App
 
ali9319
just joined
Topic Author
Posts: 6
Joined: Fri Nov 10, 2017 11:45 am

pcc ftth+lte bridge

Sun Dec 12, 2021 4:46 pm

I have two internet lines, the first is ftth and the other is a 5g router, a bridge. I am trying to do load balancing, but I can’t because IP 5g changes automatically every 24 hours or when rebooting.
Can I copy the new IP from ip-Dhcp clinet and add them in ip-firewall-mangle and ip-route list automatic
 
ali9319
just joined
Topic Author
Posts: 6
Joined: Fri Nov 10, 2017 11:45 am

Re: pcc ftth+lte bridge  [SOLVED]

Tue Dec 21, 2021 2:04 am

schedule
 :local newgw [ip dhcp-client get [find interface="ether7"] gateway];
:local routegw [/ip route get [find comment="isp1"] gateway ];
:if ($newgw != $routegw) do={
     /ip route set [find comment="isp1"] gateway=$newgw;
}

schedule 
:local newgw1 [ip dhcp-client get [find interface="ether7"] address];
:local routegw1 [/ip firewall mangle get [find comment="isp2"] dst-address ];
:if ($newgw1 != $routegw1) do={
     /ip firewall mangle set [find comment="isp2"] dst-address=$newgw1;
} 

/ip firewall mangle
add action=accept chain=prerouting comment=isp2 dst-address=1.1.1.1/30

/ip route
add comment=isp1 distance=1 gateway=1.1.1.1 routing-mark=to_wan2

Who is online

Users browsing this forum: tcx and 22 guests