Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

source based static nat failover

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 tip sla 1icmp-echo

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 don't forget to rate any posts that have been helpful. Thanks.
4 REPLIES
New Member

You can probably accomplish

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

 

New Member

Thanks wmoronta, I hadn't

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 tip sla 1icmp-echo

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 don't forget to rate any posts that have been helpful. Thanks.
New Member

Thanks so much for writing

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

137
Views
5
Helpful
4
Replies
CreatePlease login to create content