Step 3: Display the Output for SNMP Trace Operations
Purpose
The SNMP log file shows more granular information about the packets sent and received through SNMP. In this step, the contents of the SNMP log file
snmpdare displayed to verify that both theGetRequestand theGetResponsepackets appear in the output.Action
To display the output for trace operations, enter the following JUNOS command-line interface operational mode command:
user@host>show log snmpdSample Output
user@R1>show log snmpd[...Output truncated...}Jan 21 16:32:32 snmpd[28b6fdb3] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Jan 21 16:32:32 snmpd[28b6fdb3] >>>Get-RequestJan 21 16:32:32 snmpd[28b6fdb3] >>> Source: 172.17.28.131Jan 21 16:32:32 snmpd[28b6fdb3] >>> Destination: 10.168.70.143Jan 21 16:32:32 snmpd[28b6fdb3] >>> Version: SNMPv1Jan 21 16:32:32 snmpd[28b6fdb3] >>> Request_id: 0x28b6fdb3Jan 21 16:32:32 snmpd[28b6fdb3] >>> Community: publicJan 21 16:32:32 snmpd[28b6fdb3] >>> Error: status=0 / vb_index=0Jan 21 16:32:33 snmpd[28b6fdb3] >>> OID : sysDescr.0Jan 21 16:32:33 snmpd[28b6fdb3] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Jan 21 16:32:33 snmpd[28b6fdb3] <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<Jan 21 16:32:33 snmpd[28b6fdb3] <<<Get-ResponseJan 21 16:32:33 snmpd[28b6fdb3] <<< Source: 10.168.70.143Jan 21 16:32:33 snmpd[28b6fdb3] <<< Destination: 172.17.28.131Jan 21 16:32:33 snmpd[28b6fdb3] <<< Version: SNMPv1Jan 21 16:32:33 snmpd[28b6fdb3] <<< Request_id: 0x28b6fdb3Jan 21 16:32:33 snmpd[28b6fdb3] <<< Community: publicJan 21 16:32:33 snmpd[28b6fdb3] <<< Error: status=0 / vb_index=0Jan 21 16:32:33 snmpd[28b6fdb3] <<< OID : sysDescr.0Jan 21 16:32:33 snmpd[28b6fdb3] <<< type : OctetStringJan 21 16:32:33 snmpd[28b6fdb3] <<<value: "m7i internet router, kernel 6.0RJan 21 16:32:33 snmpd[28b6fdb3] <<<1.5"Jan 21 16:32:33 snmpd[28b6fdb3] <<< HEX : 6d 37 69 20 69 6e 74 65Jan 21 16:32:33 snmpd[28b6fdb3] <<< 72 6e 65 74 20 72 6f 75Jan 21 16:32:33 snmpd[28b6fdb3] <<< 74 65 72 2c 20 6b 65 72Jan 21 16:32:33 snmpd[28b6fdb3] <<< 6e 65 6c 20 36 2e 30 52Jan 21 16:32:33 snmpd[28b6fdb3] <<< 31 2e 35Jan 21 16:32:33 snmpd[28b6fdb3] <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<[...Output truncated...]What It Means
The sample output shows the contents of the
snmpdlog file, with all of the packets sent and received through SNMP. TheGet-Requestpacket is sent from a network management station and theGet-Responsepacket is sent fromtp1. The value in theGet-responsepacket is the same as that returned to the network management station in Step 2,m7i internet router, kernel 6.0R1.5.