Unfortunatly, this is not possible. IOS does not allow you to dynamically build a static NAT entry. Either by tracking a dead host or otherwise.
The only way i can see you doing this is by either investing in a Load Balancer (expensive) or by manually changing over. You can use a telnet app that supports scripting ZOC, or secureCRT and create a script that automatically logs into the router and changes the entry.
i.e. 1st script changes the NAT statement to the second server and 2nd script changes it back to the first server. This way anyone can do it.
If you are going to do this, don't forget to clear NAT connecitons first by using the
clear ip nat trans *
at the start of the script. otherwise the NAT entry maybe in use and the script will not work.
HTH (Please rate if it does)
A free, open source network device configuration management tool, customizable to your needs!
- Always vote on an answer if you found it helpful
One of the load balance methods I have seen pretty much puts the virtual address sharing on the servers themselves. Our web proxies work this way.
What happens is you put a "loopback" address on each server with same ip address. When the server responds to users it always uses this loopback address as his source rather than his true ethernet address.
So if your server application can accomplish this you can make this work.
The Nat part is simple you put in a static from the outside to the shared inside.
To make the "loadbalance" work you would put a policy route on the outside interface and set the nexthop to the server ethernet address you want to process the data. The policy routing can track RTR object to select which server to send to.
This scenario provides failover for your website. The primary web server is WEB_A. The R2 router is send a ping the virtual ip of WEB_A in every 4 seconds and the wating for the response for 2 seconds. If the WEB_A fails then the router will switch to WEB_B.
Of course the router is keep pinging the virtual ip address, but it will never response anymore. So if WEB_A is recovered, you have to manually set the same virtual ip address for WEB_B. Onece the router is chaged the static route back to WEB_A (should happen in few seconds) you should remove the virtual address from WEB_B config.
Hi everyone, I would like to thank you in advance for any help you can provide a newcomer like myself!
Im studying the 100-105 book by Odom and am currently on the topic of Port security. I purchased a used 2960 and I'm trying to follow a...
While deploying a number of 18xx/2802/3802 model access points (APs), which run AP-COS as their operating platform. It can be observed on some occasions that while many of their access points were able to join the fabric WLC withou...
I am going to design and build an LAN network under a tunnel underground with long distance between the switches.
I will have 2 Catalyst switches and 8 Industrial IE3000, and they will be connected with fiber.
For now I am planning on use Layer-2 s...