Or, you can walk the entire sub-tree: snmpwalk -v 2c -c public localhost IF-MIB::ifEntry You can then poll the IF-MIB::ifDescr to see which index corresponds to which interface, for example: IF-MIB::ifDescr.1 = STRING: sit0 X at the end of IF-MIB::ifPhysAddress.1 indicates the object's index in this particular case the index of an interface. ![]() They may look something like this: IF-MIB::ifPhysAddress.1 = STRING: 01:23:45:67:89:AA That should return one or a bunch of lines, depending on how many interfaces are present on the box. ![]() Specifically, poll IF-MIB::ifPhysAddress OID to get MAC addresses, for example: snmpwalk -v 2c -c public localhost IF-MIB::ifPhysAddress To get interface-related info, you need IF-MIB.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |