• A Network Switch Mapping Solution
  • Search

How to turn on SNMP packet debugging on a Cisco switch

This discussion assumes that you are familiar with how to access Command Line Interface (CLI) using a serial cable and terminal program such as TeraTerm.

Background: Sometimes you will need to see if SNMP packets from the Managed Switch Port Mapping Tool are actually reaching your switch. IOS provides a way of debugging the SNMP packets going in and out of the switch. This assumes SNMP is activated on your switch.

How to enable debugging from CLI. Please enter these commands in this order (bold):

Switch>enable
Switch#debug snmp packets
SNMP packet debugging is on

To see the debug output, press Map Switch on the Managed Switch Port Mapping Tool. You should see debug output similar to below. The data below is truncated and only shows the first few SNMP requests from our tool running on IP 192.168.0.205.

This is a normal SNMP exchange when mapping a switch. If you see nothing when trying to map the switch, the settings in the Switch Port Mapping Tool are mismatched with the running-config snmp-server statements. SNMP settings in the switch and Managed Switch Port Mapping Tool must exactly match. If you see only the system.2.0 Get request with no Response (first exchange shown below), you have an ACL violation (your computer IP is not in the ACL or it is misconfigured).

Switch#
00:04:11: SNMP: Packet received via UDP from 192.168.0.205 on Vlan1
00:04:11: SNMP: Get request, reqid 18985, errstat 0, erridx 0
system.2.0 = NULL TYPE/VALUE
00:04:11: SNMP: Response, reqid 18985, errstat 0, erridx 0
system.2.0 = products.516
00:04:11: SNMP: Packet sent via UDP to 192.168.0.205

^Switch Port Mapper asking for and getting back the manufacturer ID.

00:04:12: SNMP: Packet received via UDP from 192.168.0.205 on Vlan1
00:04:12: SNMP: Get request, reqid 18986, errstat 0, erridx 0
system.5.0 = NULL TYPE/VALUE
00:04:12: SNMP: Response, reqid 18986, errstat 0, erridx 0
system.5.0 = Switch.domain.actdsltmp
00:04:12: SNMP: Packet sent via UDP to 192.168.0.205

^Switch Port Mapper asking for and getting back the system name.

00:04:12: SNMP: Packet received via UDP from 192.168.0.205 on Vlan1
00:04:12: SNMP: Get request, reqid 18987, errstat 0, erridx 0
system.1.0 = NULL TYPE/VALUE
00:04:12: SNMP: Response, reqid 18987, errstat 0, erridx 0
system.1.0 = Cisco IOS Software, C3750 Software (C3750-IPBASEK9-M), Version 12.2(55)SE10, RELEASE SOFTWARE (fc2)
00:04:12: SNMP: Packet sent via UDP to 192.168.0.205

^Switch Port Mapper asking for and getting back the system description.

How to disable SNMP packet debugging on a Cisco Switch running IOS

This discussion assumes that you are familiar with how to access Command Line Interface (CLI) using a serial cable and terminal program such as TeraTerm.

How to disable it from CLI. Please enter these commands in this order (bold):

Switch>enable
Switch#no debug snmp packets
SNMP packet debugging is off