Unformatted text preview: bles is sent in a single UDP datagram, and the response is also a single
We show the variables as their respective object identifiers, because that is what's sent in the SNMP
messages. We had to specify the instance of the two variables as 0. Notice also that the name of the file:///D|/Documents%20and%20Settings/bigini/Doc...omenet2run/tcpip/tcp-ip-illustrated/snmp_sim.htm (11 of 33) [12/09/2001 14.47.40] Chapter 25. SNMP: Simple Network Management Protocol variable (its object identifier) is always returned in the response. We'll see below that this is
required for the get-next operator to work.
The operation of the get-next operator is based on the lexicographic ordering of the MIB. We
start the following example by asking for the next object identifier after udp (without specifying
any instance, since this is not a leaf object). This returns the first object in the UDP group. We then
ask for the next entry after this one, and the second entry is returned. We repeat this one more time
to get the third entry:
sun % sninpi -a gateway -c secret
snmpi> next udp
snmpi> next udpInDatagraros.0
snmpi> next udpNoPorts.0
This example shows why a get-next operator must return the name of the variable: we ask the
agent for the next variable, and the agent returns its name and value.
Using the get-next operator in this fashion, one could imagine a manager with a loop that starts
at the beginning of the MIB and queries the agent for every variable that the agent maintains.
Another use of this operator is to iterate through tables.
We can reiterate the column-row ordering of tables using our simple query program to step through
the entire UDP listener table. We start by asking for the next variable after udpTable. Since this is
not a leaf object we can't specify an instance, but the get-next operator still returns the next
object in the table. We then work our way through the table, with the agent returnin...
View Full Document
This test prep was uploaded on 04/04/2014 for the course ECE EL5373 taught by Professor Guoyang during the Spring '12 term at NYU Poly.
- Spring '12