You should search under failover scripts. Many people wrote scripts for this purpose. You could always adopt it to your needs.
The command you need to run in your script, is something like:
/ip address set [find name="interfacename’] interface=ether1/wlan2/pppoe-out1
Try and write a script from what you find in the forum, and past it when you get stuck. The easiest way to learn scripting is by struggling till you get it right
Having the same address in the router will be somewhat difficult to setup in your case. It will just mess things.
Might try setting up bridge, with RSTP, or using ospf on your link and leave it enabled, while setting priorities to determine wich will be the active connection when both are available.
I agree with jorj. It is not a good idea to have the same address for 2 bandwidth sources.
I would suggest making ISP 1’s ip eg 1.1.1.254/24 and ISP 2’s IP eg 1.1.2.254/24 on your routers connecting to your ISP’s.
You could add static routes to route two hardly ever used IP’s via both ISP’s. (eg, route 196.25.1.1 via ISP1 and 196.25.1.2 via ISP2). Now you can setup monitors to monitor both those IP’s. If eg ISP1’s IP go down, it’s likely that ISP1 is down (but 196.25.1.1 could also be down, so be careful of doing it this way, make sure you use an IP ON that ISP’s backbone).
From here you can write scripts to change your default gateway to the other ISP’s address (1.1.1.254 or 1.1.2.254)