Script to fetch Gateway IP
Posted: Wed Sep 27, 2017 12:13 pm
Hello everybody!
I'm in desperate need of a scripting God to help me with a script. I have six VDSL lines bridged to a RB1100AHx2 which does the PPPoE connections to the ISP (pppoe1, pppoe2, pppoe3, etc). I use PCC load balancing but my gateway IPs are dynamic and change whenever there is a disconnection and this can happen at any given time (due to power failures, reboots, ISP disconnects etc.). So I'm need of a script that will fetch the gateway ip of each of the connections and then apply the appropriate route in the /ip route list (XXX.XXX.XXX.XXX%pppoe1, etc). If anyone already has a similar script that he can share or can at least point me at the right direction, would be very much appreciated!
I'm in desperate need of a scripting God to help me with a script. I have six VDSL lines bridged to a RB1100AHx2 which does the PPPoE connections to the ISP (pppoe1, pppoe2, pppoe3, etc). I use PCC load balancing but my gateway IPs are dynamic and change whenever there is a disconnection and this can happen at any given time (due to power failures, reboots, ISP disconnects etc.). So I'm need of a script that will fetch the gateway ip of each of the connections and then apply the appropriate route in the /ip route list (XXX.XXX.XXX.XXX%pppoe1, etc). If anyone already has a similar script that he can share or can at least point me at the right direction, would be very much appreciated!