Task 2 Exploring SNMP Capabilities by Using UCD-SNMP
About Using UCD-SNMP
"%
Basic Dial NMS Implementation Guide
enterprises.9.2.1.2.0 = "reload"
If SNMP-parsing errors are generated, suppress them by appending 2>/dev/null to the end of the
command. Standard output is tagged as 1. Error output is tagged as 2.
onionring:~$ snmpget travis-nas-01.the.net 5urf5h0p .1.3.6.1.4.1.9.2.1.2.0 2> /dev/null
enterprises.9.2.1.2.0 = "reload"
onionring:~$
Note
If no response is returned by the SNMP agent, allow error messages to print to the
screen by removing the 2>/dev/null argument.
Step 2
Check the system up time by entering the snmpget command and sysUpTime OID:
onionring:~$ snmpget travis-nas-01.the.net 5urf5h0p .1.3.6.1.2.1.system.sysUpTime.0 2>
/dev/null
system.sysUpTime.0 = Timeticks: (45450609) 5 days, 6:15:06.09
onionring:~$
Step 3
To gather basic configuration management information about the Cisco IOS device, enter the
snmpwalk command and the system OID.
onionring:~$ snmpwalk travis-nas-01.the.net 5urf5h0p system 2> /dev/null
system.sysDescr.0 = "Cisco Internetwork Operating System Software ..IOS (tm) 5800
Software (C5800-P4-M), Version 12.1(2a)T1, RELEASE SOFTWARE (fc2)..Copyright
(c) 1986-2000 by cisco Systems, Inc...Compiled Mon 12-Jun-00 23:13 by ccai"
system.sysObjectID.0 = OID: enterprises.9.1.188
system.sysUpTime.0 = Timeticks: (45492606) 5 days, 6:22:06.06
system.sysContact.0 = "[email protected]"
system.sysName.0 = "travis-nas-01.the.net"
system.sysLocation.0 = "Lake Travis (Austin) Dial POP"
system.sysServices.0 = 78
system.8.0 = Timeticks: (0) 0:00:00.00
onionring:~$
Step 4
Change the OID environmental prefix by entering the commands prefix and export prefix. This step
reduces the number of key strokes you must enter at the command line.
onionring:~$ snmpget travis-nas-01.the.net 5urf5h0p .1.3.6.1.4.1.9.2.1.2.0 2> /
dev/null
enterprises.9.2.1.2.0 = "reload"
onionring:~$ PREFIX=.1.3.6.1.4.1.9
onionring:~$ export PREFIX
onionring:~$ snmpget travis-nas-01.the.net 5urf5h0p 2.1.2.0 2> /dev/null
enterprises.9.2.1.2.0 = "reload"
onionring:~$
The UCD-SNMP application attaches a prefix to the requested variable unless it is fully qualified (for
example, unless the variable starts with a period “.”). By default, the prefix points to the MIB-II node
.1.3.6.1.2.1 location. The Cisco enterprises prefix points to .1.3.6.1.4.1.9
Step 5
Inspect the IP address entry table by entering the snmptable command and ipAddrTable OID:
onionring:~$ snmptable travis-nas-01.the.net 5urf5h0p ip.ipAddrTable 2> /dev/null
SNMP table: ip.ipAddrTable.ipAddrEntry
ipAdEntAddr ipAdEntIfIndex ipAdEntNetMask ipAdEntBcastAddr ipAdEntReasmMaxSize
172.21.10.1
351
255.255.255.255
1
18024
172.21.101.20
289
255.255.255.0
1
18024
onionring:~$