cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
619
Views
0
Helpful
3
Replies

Dynamic nat regarding reachability

prestigio391
Level 1
Level 1

Hello team,

 

I want provide little tuning of nat statements .

 

Situation:

 

host a.a.a goest to -----> x.x.x ---->DNAT to y.y.y (everything works)

 

BUt in situation when is DNAT y.y.y unrecheable i want change nat statement to :

 

host a.a.a goest to -----> x.x.x ---->DNAT to z.z.z

 

Is this possible with ip sla track ? OR EEM scripting is necesary ?

 

1 Accepted Solution

Accepted Solutions

Its funny but i did it exactly the same way few hrs ago So thank you for your answer

View solution in original post

3 Replies 3

balaji.bandi
Hall of Fame
Hall of Fame

yes possible, you need to clear NAT table with EEM Script

 

use below thread for example :

 

https://community.cisco.com/t5/routing/static-nat-for-two-internet-connect/td-p/3925675

 

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Hello


@prestigio391 wrote:

BUt in situation when is DNAT y.y.y unrecheable i want change nat statement to :

 

host a.a.a goest to -----> x.x.x ---->DNAT to z.z.z

 

Is this possible with ip sla track ? OR EEM scripting is necesary ?

 


You can use both ipsla and eem.

Example:
ip sla 1
icmp-echo <to y.y.y > source-interface xxx
ip sla schedule 1 life forever start-time now
track 10 rtr 1 reachability

 

event manager applet DNAT1_down
event track 10 state down
action 5.0 cli command "enable"
action 5.1 cli command "conf t"
action 5.2 cli command "no ip nat inside source static x.x.x.x y.y.y.y "
action 5.3 cli command "clear ip nat translation inside x.x.x.x y.y.y.y"
action 5.4 cli command "ip nat inside source static x.x.x.x z.z.z.z"
action 5.5 cli command "end"

event manager applet DNAT1_Up
event track 10 state up
action 5.6 cli command "enable"
action 5.7 cli command "conf t"
action 5.8 cli command "no ip nat inside source static x.x.x.x z.z.z.z "
action 5.9 cli command "clear ip nat translation inside x.x.x.x z,z,z,z"
action 6.0 cli command "ip nat inside source static x.x.x.x y.y.y.y"
action 6.1 cli command "end"


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

Its funny but i did it exactly the same way few hrs ago So thank you for your answer

Review Cisco Networking for a $25 gift card