--- title: "snmp-trap" slug: "cli-sc-snmp-trap" updated: 2025-07-02T03:30:27Z published: 2025-09-03T14:11:33Z canonical: "docs.crossworkassurance.cisco.com/cli-sc-snmp-trap" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.crossworkassurance.cisco.com/llms.txt > Use this file to discover all available pages before exploring further. # snmp-trap ## snmp-trap edit auto snmp-trap edit auto - Edit automatic SNMP trap handler configuration **Description:** This command allows you to change the automatic SNMP trap handler configuration. **Syntax:** ``` snmp-trap edit auto { {host-state {enable | disable}} | {host-community } | {host-port <1-65535>} {trap-version {v1 | v2c}} {host-name-refresh} }+ ``` **Parameters:** | Parameter | Description | | --- | --- | | host-state | Enable/Disable the sending of SNMP traps to the configured host. | | host-community | Community string used to send SNMP traps to the configured host. | | host-port | This command defines the UDP port to use when sending SNMP traps (the well-known SNMP trap port 162 is used by default). | | trap-version | Set the version (v1 or v2c) of the configured host SNMP traps. | | host-name-refresh | Refresh of the configured host name for SNMP traps. | ## snmp-trap edit v1 snmp-trap edit v1 - Edit SNMP v1 trap handler configuration **Description:** This command allows you to change the SNMP v1 trap handler configuration. **Syntax:** ``` snmp-trap edit v1 { {host-state {enable | disable}} | {host-community } | {host-name } | {host-port <1-65535>}}+ ``` **Parameters:** | Parameter | Description | | --- | --- | | host-state | Enable/Disable the sending of traps to the configured host. | | host-community | Community string used to send SNMP traps to the configured host. | | host-name | This command defines the host name or IP address of the server to which the traps (and/or inform notifications) are sent. The unit sends a Cold Start trap when it starts and upon authentication failure. | | host-port | This command defines the UDP port to use when sending traps (the well-known SNMP trap port 162 is used by default). | ## snmp-trap edit v2c snmp-trap edit v2c - Edit SNMP v2c trap handler configuration **Description:** This command allows you to change the SNMP v2c trap handler configuration. **Syntax:** ``` snmp-trap edit v2c { {host-state {enable | disable}} | {host-community } | {host-name } | {host-port <1-65535>}}+ ``` **Parameters:** | Parameter | Description | | --- | --- | | host-state | Enable/Disable the sending of traps to the configured host. | | host-community | Community string used to send SNMP traps to the configured host. | | host-name | This command defines the host name or IP address of the server to which the traps (and/or inform notifications) are sent. The unit sends a Cold Start trap when it starts and upon authentication failure. | | host-port | This command defines the UDP port to use when sending traps (the well-known SNMP trap port 162 is used by default). | ## snmp-trap show snmp-trap show - Show SNMP trap handler configuration **Description:** snmp-trap show displays the SNMP trap handler configuration. **Syntax:** ``` snmp-trap show ``` **© 2026 Cisco and/or its affiliates. All rights reserved.** For more information about trademarks, please visit: [Cisco trademarks](https://www.cisco.com/c/en/us/about/legal/trademarks.html)[](https://www.cisco.com/c/en/us/about/legal/trademarks.html) For more information about legal terms, please visit: [Cisco legal terms](https://www.cisco.com/c/en/us/about/legal/terms-conditions.html)