SNMP Lab
CT320: Network and Systems Administration
Description
For this lab, we will execute SNMP commands with several different
options. You will create a document with answers to the questions that
follow. Number each question part.question, e.g., 4.3 for
Part 4, Question 3. Show it to the TA when you’re done.
                
Hosts
Here are the hosts that we will use. They are not workstations
or laptops, but they are devices on the net:
                
Host | Community String |
10.1.44.62 | public tuba, HP printer, CSB 120 |
10.1.44.66 | public guitar, HP printer, CSB 3rd floor |
10.1.44.63 | public copier-1, Xerox copier/printer/scanner |
129.82.44.10 | this4now some kind of switch |
They all speak both version 1 and version 2c of the SNMP protocol.
                
Part 1 — SNMP Package Installation
Ensure that the following packages are installed:
snmp
snmp-mibs-downloader
See the Installation lab if you’ve forgotten how to install
packages.
                
Ensure that the line “mibs :
” in /etc/snmp/snmp.conf
is commented out.
                
Part 2 — Using snmpget
Use snmpget
to retrieve some information about 10.1.44.62:
                
snmpget -v2c -c public 10.1.44.62 sysDescr.0
snmpget -v2c -c public 10.1.44.62 sysUpTimeInstance
That’s correct: sysDescr.0
ends with .0
, but
sysUpTimeInstance
doesn’t.
                
Execute the second command several times; note that the time increases.
                
- What does
-v2c
mean?
- What does
-c public
mean?
- What is the system description?
- How long has 10.1.44.62 been up?
Part 3 — Identification
Using snmpget
, identify all four hosts. What sort of device is each
one? Write it down.
                
Part 4 — Using snmpwalk
The snmpwalk
command retrieves a bunch of information:
                
snmpwalk -v2c -c public 10.1.44.63
It’s quite a lot—send it to a file, and view the file in an editor.
                
- What is the system description?
- Who is the system contact?
- How many network interfaces are there?
(Look at the lines starting with IF-MIB::
for network interface
information.)
- What are the interface types?
- What is the MTU of each interface?
- What is the physical address (alias MAC address)
of the Ethernet interface?
Part 5 — Using snmpset
Use snmpget
to retrieve just the contact information for
10.1.44.63:
                
snmpget -v2c -c public 10.1.44.63 sysContact.0
Now, use snmpset
to change that contact information:
                
snmpset -v2c -c public 10.1.44.63 sysContact.0 string "The Dread Pirate Roberts"
- How did that work out?
- Why?
Part 6 — Printer MIB
We will now focus on one particular MIB, the Printer MIB.
                
Execute this command, which will display all the information defined in
the Printer MIB, which is in /var/lib/snmp/mibs/ietf/Printer-MIB
.
                
snmpwalk -mPrinter-MIB -v1 -c public 10.1.44.66 printmib
Send it to a file; view it in an editor.
                
- Why did we specify
-mPrinter-MIB
?
- Find the capacity of the paper trays, by looking in the output for
prtInputMaxCapacity
. There are two values, one for each paper
tray. What are the values?
- Find
prtInputCapacityUnit
in the output, which is the units used
for prtInputMaxCapacity
. That is, it says whether
prtInputMaxCapacity
is in sheets of paper, inches of paper, meters
of paper, etc. Which one is it?
- See
prtInputCurrentLevel
, which is how much paper is actually in
the tray right now. What are the values?
- Read the
prtInputCurrentLevel
entry in the MIB. What do the values
from the previous question really mean?
Part 7 — Color Printers
- For each printer, fetch the values for
prtMarkerColorantValue
using snmpwalk
. Which printers can print what colors?
- Curiously, the colors may show as hexadecimal bytes instead
of printable ASCII characters. Use this
ASCII table
to translate.
- Do the same for non-printers. What happens?
Part 8 — Cleanup
- Remove the SNMP tools:
sudo apt purge snmp snmp-mibs-downloader
Part 9 — Credit
Show your work to the TA for credit.