eem.tmpl.in 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. #event manager applet auto-config-port authorization bypass
  2. # event neighbor-discovery interface regexp ^GigabitEthernet0/[1-8]$ cdp add
  3. cli command "enable"
  4. cli command "show int $_nd_local_intf_name | inc Description:"
  5. regexp "STATIC:" $_cli_result
  6. if $_regexp_result eq 1
  7. exit 0
  8. end
  9. cli command "config t"
  10. cli command "default interface $_nd_local_intf_name"
  11. cli command "interface $_nd_local_intf_name"
  12. cli command "description $_nd_cdp_entry_name:$_nd_port_id"
  13. cli command "switchport access vlan %%WIRED_NAT_VLAN%%"
  14. cli command "switchport mode access"
  15. cli command "switchport nonegotiate"
  16. cli command "switchport port-security maximum %%MAX_MACS%%"
  17. cli command "switchport port-security"
  18. cli command "switchport port-security aging time 20"
  19. cli command "no logging event power-inline-status"
  20. cli command "load-interval 30"
  21. cli command "srr-queue bandwidth share 1 30 35 5"
  22. cli command "priority-queue out"
  23. cli command "ipv6 nd raguard"
  24. cli command "ipv6 dhcp guard"
  25. cli command "mls qos trust dscp"
  26. cli command "spanning-tree portfast"
  27. cli command "spanning-tree bpduguard enable"
  28. cli command "spanning-tree link-type point-to-point"
  29. regexp "K9W8-" $_nd_cdp_version
  30. if $_regexp_result eq 1
  31. cli command "switchport access vlan %%WIRELESS_AP_VLAN%%"
  32. cli command "storm-control broadcast level pps 100"
  33. cli command "storm-control multicast level pps 10k"
  34. exit 0
  35. end
  36. regexp "(Cisco IP Phone|Cisco IP Conference Station|CTS-CODEC-EX90)" $_nd_cdp_platform
  37. if $_regexp_result eq 1
  38. cli command "switchport access vlan %%VOICE_TP_VLAN%%"
  39. cli command "storm-control broadcast level pps 100"
  40. cli command "storm-control multicast level pps 2k"
  41. end
  42. regexp "CIVS-IPC-" $_nd_cdp_platform
  43. if $_regexp_result eq 1
  44. cli command "switchport access vlan %%VIDEO_SURVEILLANCE_VLAN%%"
  45. cli command "storm-control broadcast level pps 100"
  46. cli command "storm-control multicast level pps 2k"
  47. cli command "mls qos trust device ip-camera"
  48. end
  49. regexp "Cisco-DMP-" $_nd_cdp_platform
  50. if $_regexp_result eq 1
  51. cli command "switchport access vlan %%CISCOTV_DMP_VLAN%%"
  52. cli command "storm-control broadcast level pps 100"
  53. end
  54. regexp "CTS-CODEC-C90" $_nd_cdp_platform
  55. if $_regexp_result eq 1
  56. cli command "switchport access vlan %%SESSION_CAPTURE_VLAN%%"
  57. cli command "storm-control broadcast level pps 100"
  58. cli command "storm-control multicast level pps 2k"
  59. end
  60. !
  61. #event manager applet reset-port authorization bypass
  62. # event syslog pattern "LINK-3-UPDOWN.*Interface GigabitEthernet0/[1-8], changed state to down"
  63. regexp "Interface ([^,]+)" $_syslog_msg match intf
  64. cli command "enable"
  65. cli command "show int $intf | inc Description:"
  66. regexp "STATIC:" $_cli_result
  67. if $_regexp_result eq 1
  68. exit 0
  69. end
  70. cli command "config t"
  71. cli command "default interface $intf"
  72. cli command "interface $intf"
  73. cli command "switchport access vlan %%WIRED_NAT_VLAN%%"
  74. cli command "switchport mode access"
  75. cli command "switchport nonegotiate"
  76. cli command "switchport port-security maximum %%MAX_MACS%%"
  77. cli command "switchport port-security"
  78. cli command "switchport port-security aging time 20"
  79. cli command "load-interval 30"
  80. cli command "srr-queue bandwidth share 1 30 35 5"
  81. cli command "priority-queue out"
  82. cli command "ipv6 nd raguard"
  83. cli command "ipv6 dhcp guard"
  84. cli command "storm-control broadcast level pps 100"
  85. cli command "storm-control multicast level pps 2k"
  86. cli command "spanning-tree portfast"
  87. cli command "spanning-tree bpduguard enable"
  88. cli command "spanning-tree link-type point-to-point"
  89. cli command "end"