eem.tmpl.in 3.6 KB

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