Labs / Under Load / Management & monitoring: LLDP, out of band, errors & SNMP

Lab 4 of 4 · Management & monitoring: LLDP, out of band, errors & SNMP

SNMP: asking devices how they are

Poll devices with SNMP, turn counters into rates and secure it with SNMPv3.

Open this lab Pro 6 steps

The idea

nms, a management station, asks coreRouter, a Router, and fileServer for their counters over UDP, while a laptop sends traffic. Two polls, some seconds apart, make a rate.

Tables point at each other by ifIndex
Tables point at each other by ifIndex
A rate is two readings apart
A rate is two readings apart

Steps

  1. Ask a device who it is

    Every monitoring tool starts by asking devices questions, so ask one. coreRouter and fileServer run an SNMP agent: a small server that answers questions about its device. nms is the station that asks. Ask the router for its name and where it is.

    nms:~# snmpget -v2c -c n3tops-ro coreRouter.lab sysName.0 sysLocation.0
    nms:~# snmpget -v2c -c n3tops-ro -On coreRouter.lab sysName.0
  2. The interface table

    Graphs are drawn per card, so a station first learns which card is which. Most of what it graphs is in IF-MIB: one row per card, numbered by ifIndex. List the router's cards, then find which one holds 10.0.2.2, its address on serverNetwork.

    nms:~# snmpwalk -v2c -c n3tops-ro coreRouter.lab ifDescr
    nms:~# snmpwalk -v2c -c n3tops-ro coreRouter.lab IP-MIB::ipAdEntIfIndex

Pro

4 more steps in the app

  1. Counters, not rates
  2. The community string travels in the clear
  3. SNMPv3: a user, a password, encryption
  4. Traps: the device speaks first
Get Pro

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Start with a free account: Google or email, no card.

Open this lab