cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1820
Views
10
Helpful
3
Replies

Cisco router EEM script : clear ip nat translation at a periodic time

Ismael10
Level 1
Level 1

Hello All,

is it possible to clear ip nat translation lines from the table at a given time periodically using EEM?

1 Accepted Solution

Accepted Solutions

Hello
Should be able to scheduled a cron job daily or weekly.

Below should clear the nat table working every day at 16:45


"* * * * *" = "min hour dayofmonth monthofyear dayofweek" (0 = sunday)

event manager applet Clear-Nat_Table
event timer cron cron-entry "45 16 * * 1-5"
action 1.1 cli command "enable"
action 1.2 cli command "clear ip nat translations **
action 1.3 syslog msg "Nat table cleared"


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

3 Replies 3

Hello
Should be able to scheduled a cron job daily or weekly.

Below should clear the nat table working every day at 16:45


"* * * * *" = "min hour dayofmonth monthofyear dayofweek" (0 = sunday)

event manager applet Clear-Nat_Table
event timer cron cron-entry "45 16 * * 1-5"
action 1.1 cli command "enable"
action 1.2 cli command "clear ip nat translations **
action 1.3 syslog msg "Nat table cleared"


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

thank you for the quick response Paul.

I have configured an enable password. does it matter in the way to configure action cli?

Hello

the script runs in the router-switch so it’s will work even if your not logged into the device - so that’s fine 


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
Review Cisco Networking products for a $25 gift card