cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1472
Views
5
Helpful
4
Replies

source based static nat failover

zalumbaugh
Level 1
Level 1

Hello, 

Is there a way to configure a failover scenario for source based static NATs? I know it's possible with destination based static NAT's through the use of route-maps, but not sure if I'd use the same method for source based. 

 

Basically this is what I want to achieve: 

 

10.10.10.10 = internal server 1 (primary)

10.10.10.11 = internal server 2 (backup)

 

I have a static nat entry for server 1: 

ip nat inside source static 10.10.10.10 222.222.222.222 

Currently, when we want to failover to the backup server, I have to manually change this static NAT entry (ip nat inside source static 10.10.10.11 222.222.222.222)

 

I want to find a way to have the NAT failover automatically when we failover to the backup server (i.e. if 10.10.10.10 stops translating to 222.222.222.222, make 10.10.10.11 translate to 222.222.222.222)

 

I hope that makes sense, I'm not a network genius. I really appreciate any help/advice I can get. Thanks! 

Z

 

 

 

1 Accepted Solution

Accepted Solutions

Hello

 

conf t

ip sla 1
icmp-echo 10.10.10.10 source-ip x.x.x.x
exit


ip sla scheduled 1 start-time now life forever

track 1 ip sla 1 reachability


event manager applet NatPrimary-UP
event track 1 state up
action 1.0 cli command "enable"
action 1.1 cli command "conf t"
action 1.2 cli command "no ip nat inside source static 10.10.10.11 222.222.222.222"
action 1.3 cli command "ip nat inside source static 10.10.10.10 222.222.222.222"
exit

event manager applet NatPrimary-Down
event track 1 state down
action 2.0 cli command "enable"
action 2.1 cli command "conf t"
action 2.2 cli command "no ip nat inside source static 10.10.10.10 222.222.222.222"
action 2.3 cli command "ip nat inside source static 10.10.10.11 222.222.222.222"
exit

res
Paul


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

View solution in original post

4 Replies 4

willy moronta
Level 1
Level 1

You can probably accomplish this doing EEM scripting, but from a purely solution based view, I think assigning a VIP to 2 servers and configuring them for fail over may give you better results.  In this scenario you have 2 servers sharing 1 virtual IP, depending on the server OS (windows clustering for example) when one fails the other takes up the load. 

For 2008 server this is the info : http://blogs.technet.com/b/askcore/archive/2010/02/12/windows-server-2008-failover-clusters-networking-part-1.aspx

 

Thanks wmoronta, I hadn't even thought of EEM scripting. That's probably the only solution that will work for me as we don't have a very sophisticated server load balancing solution in place yet. 

 

Thank you for taking the time to read my question and respond. Very much appreciated.

 

Best,

Z

Hello

 

conf t

ip sla 1
icmp-echo 10.10.10.10 source-ip x.x.x.x
exit


ip sla scheduled 1 start-time now life forever

track 1 ip sla 1 reachability


event manager applet NatPrimary-UP
event track 1 state up
action 1.0 cli command "enable"
action 1.1 cli command "conf t"
action 1.2 cli command "no ip nat inside source static 10.10.10.11 222.222.222.222"
action 1.3 cli command "ip nat inside source static 10.10.10.10 222.222.222.222"
exit

event manager applet NatPrimary-Down
event track 1 state down
action 2.0 cli command "enable"
action 2.1 cli command "conf t"
action 2.2 cli command "no ip nat inside source static 10.10.10.10 222.222.222.222"
action 2.3 cli command "ip nat inside source static 10.10.10.11 222.222.222.222"
exit

res
Paul


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Thanks so much for writing that config out for me Paul. I think EEM is the way to go for us on this one. I really appreciate you taking the time to read my question and write out a detailed reply. 

 

Best,

Z

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card