Computer Networks

Tutorial #15 - Suggested Solutions

  1. How would you request a router to return the actual values of the objects ipForwarding, icmpInEchoes and tcpMaxConn? Give solutions using each of the get and get-next commands.
    Before we start - most SNMP implementations allow the user to short-circuit (or abbreviate) the first part of the official OBJECT IDENTIFIER for the SNMP MIB. Thus, instead of specifing { 1 3 6 1 2 1 ip(4) }, we can refer to the same node of the name tree as simply ip. This is very convenient.

    For ipForwarding, you could do snmpget ... ip.ipForwarding.0, where the "..." means there's other stuff in here we can't be bothered with right now. If I replaced the snmpget with snmpgetnext, I could leave off the trailing .0
    Similarly, for icmpInEchoes (which, incidentally, gives a measure of how often this item of equipment has been pinged), I could do snmpgetnext ... icmp.icmpInEchoes Note the absence of the trailing .0 - I could put it in if I wanted and instead do snmpget.
    For tcpMaxConn (the maximum number of simultaneous TCP connections which this equipment can support) I could do either of snmpget ... tcp.tcpMaxConn.0 or snmpgetnext ... tcp.tcpMaxConn.

    Note that what I've written here is in terms of the CMU SNMP library of command-line SNMP functions. The snmpget and snmpgetnext commands simply implement the get and get-next requests of the SNMP protocol. Students can (if they wish) look up the Unix man pages for these commands to see how they're used in real life. They would also discover how these commands implement the shorthand MIB specification mentioned at the start of this solution.
    It's important to note that just because these command-line software tools permit abbreviations, nevertheless the actual SNMP protocol only deals with full OBJECT IDENTIFIERs. What actually gets requested is, for example, get(1.3.6.1.2.1.4.4.0), the full OBJECT IDENTIFIER for ipForwarding.

  2. The following is a diagrammatic view of portion of a table (ifTable) in the interfaces portion of the standard MIB, edited to fit the page. The table consists of a sequence of ifEntry elements. Values shown are from the router r-bgowan at Bendigo.

    1. Describe interface 3 on this router.
      It's a serial point-to-point link running at 252kbps. In fact, it used to be the serial ISDN (4 B channels) between Bendigo and Bundoora, back when the r-bgowan router was still in regular service (it's now a backup to the microwave link). Technical aside: the value 252000 is what happens when you aggregate 4xB channels (each 64kbps) into a single fast link. Because Telstra doesn't guarantee any timing relationship between different B channels, this 4kbps aggregation overhead allows additional synchonisation codes to be sent to make sure that things don't get out of timing.
    2. What would be the structure of an SNMP get-request to discover the speed, in bps, of interface 1.
      This is actually a bit of a trick question. The clue to how this is done is the column marked ifIndex, which is the last thing that has to appear in the request. Thus, a suitable request might be: snmpget ... interfaces.ifTable.ifEntry.ifSpeed.1 where a trailing .0 zero is not needed, because the ifIndex performs the equivalent function of defining an instance value.
    3. What value would be returned by get-next(...ifSpeed.2)?
      The get-next operation returns the next object in a depth first search of the tree. Thus, in this case it simply increments the ifIndex by one, so you'd get the value of ifSpeed.3 which is 252Kbps. More interesting, perhaps, is what you'd get if you requested get-next(...ifSpeed.3), which would be the first item in the next column. If you think this is confusing - you're right! Tables in SNMP are jolly messy, IMHO.
  3. Why do SNMP proponents use the expression "powerful get-next"? In other words, what problem does the get-next operation solve very elegantly?
    In his definitive (and very readable) reference to SNMP The Simple Book[1], Marshall T. Rose states that the get-next request is particularly powerful because it gives a very simple and effective way of browsing the MIB in a particular piece of equipment. You can also apply it repeatedly to fetch all of the management information from a router, etc. Exercise - how?
  4. (Philosophical question) What is the purpose of the SNMP portion of the MIB?
    The SNMP portion of the MIB contains information about the operation of the SNMP subsystem itself - for example, how many SNMP GET-Requests have been received by this system. Of course, if you ask a router how many times it's had an SNMP request, you thereby add one to the total of SNMP requests!

[1] Which I stupidly loaned to a student a few years ago and never saw again. That book cost me $75 of my own money too! I'll tell you his name if you're interested.
[Previous Tutorial] [Tutorial Index] [Next Tutorial]
Phil Scott