Artificial intelligent assistant

Where does snmpwalk start if no OID is specified? Where in the SNMP OID tree does `snmpwalk` start if no OID is specified, i.e. `snmpwalk` is started like `snmpwalk -v 2c -c public host`? From `.1.3.6.1.2.1`?

Yes, from doing a network capture, it would seem so:


SNMP 84 get-next-request 1.3.6.1.2.1


Which is:


$ MIBS=+all snmptranslate 1.3.6.1.2.1
SNMPv2-SMI::mib-2
$ MIBS=+all snmptranslate -Of 1.3.6.1.2.1
.iso.org.dod.internet.mgmt.mib-2


Confirmed by reading the source:


oid objid_mib[] = { 1, 3, 6, 1, 2, 1 };
[...]
if (arg < argc) {
[...]
} else {
/*
* use default value
*/
memmove(root, objid_mib, sizeof(objid_mib));
rootlen = sizeof(objid_mib) / sizeof(oid);
}


And the man page:

> If no OID argument is present, snmpwalk will search the subtree rooted at SNMPv2-SMI::mib-2.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 27d15a2602d0971fabe497651be7c746