Well netsh turned out to be the perfect solution for my problem(even though doing it in python would have given me some kicks). I managed it with two .bat files for toggling the gateway ips. Thank you friend.