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

Help with EEM and Tcl script to solve a NAT issue

aalitehrani
Level 1
Level 1

I have found a tcl script on this same Forum but it is not working for me. I want to send a syslog alert and a SNMP trap to our NOC when dynamic NAT allocated usage reaches a certain threshold. Do you see something wrong with my tcl or my router config?

This is part of my config that is related to this issue. I artificially lower the threshold value for NAT from 80% down to 10% but EEM is not triggering any alerts. Although when I turn on “debug event manager” it shows that it opens the tcl script and debug shows some activities then it shows tcl has ended with normal exit status. Anyway debug is not providing anything meaningful to me.

!

ip nat pool ssbout 7.7.7.7 7.7.7.10 netmask 255.255.255.0

ip nat outside source list 10 pool ssbout

!

access-list 10 permit 172.25.20.121

!

snmp-server enable traps event-manager

snmp-server enable traps syslog

!

logging source-interface Loopback0

logging trap debugging

logging 2.2.2.2

!

event manager environment nat_pool_name ssbout

event manager environment nat_pool_threshold 10

event manager directory user policy "flash:/policies"

event manager policy NAT-pool-overflow.tcl type user

!

End

Router#sh flash:

-#- --length-- -----date/time------ path

1     51475984 Oct 14 2010 18:30:34 +00:00 c2800nm-advipservicesk9-mz.124-15.T10.bin

2            0 May 23 2011 19:14:28 +00:00 policies

3         4917 Oct 1 2012 21:10:36 +00:00 policies/NAT-pool-overflow.tcl

4         3248 Oct 2 2012 01:28:02 +00:00 policies/nat-pool-snmp.tcl

5         3241 Oct 2 2012 01:28:38 +00:00 policies/nat-pool-syslog.tcl

12517376 bytes available (51499008 bytes used)

Router#dir

Directory of flash:/policies/

    4  -rw-        3248   Oct 2 2012 01:28:02 +00:00  nat-pool-snmp.tcl

    3  -rw-        4917   Oct 1 2012 21:10:36 +00:00  NAT-pool-overflow.tcl

    5  -rw-        3241   Oct 2 2012 01:28:38 +00:00  nat-pool-syslog.tcl

64016384 bytes total (12517376 bytes free)

Router#

Router#sh ip nat statistics

Total active translations: 2 (1 static, 1 dynamic; 0 extended)

Outside interfaces:

  Serial0/0/0.205

Inside interfaces:

  Loopback0

Hits: 44  Misses: 0

CEF Translated packets: 44, CEF Punted packets: 0

Expired translations: 5

Dynamic mappings:

-- Outside Source

[Id: 1] access-list 10 pool ssbout refcount 1

pool ssbout: netmask 255.255.255.0

        start 7.7.7.7 end 7.7.7.10

        type generic, total addresses 4, allocated 1 (25%), misses 0

Appl doors: 0

Normal doors: 0

Queued Packets: 0

Router#

Thank you

0 Replies 0
Review Cisco Networking for a $25 gift card