Need inputs in adding IP routes on failover
I have a requirement where I need to update the add the routes for my application to connect to the network and source systems everytime the failover or switchover happens.
If Application is running on node 1 then following routes should be added
route add -net IP netmask 255.255.255.255 10.225.230.1 gw dev bond0: 1
route add -net IP1 netmask 255.255.255.255 10.225.230.1 gw dev bond0: 1
route add -net IP2 netmask 255.255.255.255 10.225.230.1 gw dev bond0: 1
If Application is running on node 2 then following routes should be added
route add -net IP netmask 255.255.255.255 10.225.230.1 gw dev bond0: 0
route add -net IP1 netmask 255.255.255.255 10.225.230.1 gw dev bond0: 0
route add -net IP2 netmask 255.255.255.255 10.225.230.1 gw dev bond0: 0