IPv4 to SNMP OID Index Calculator
Convert an IPv4 address into the dotted suffix used by a table row whose index is defined as an IpAddress. Enter the column OID and address to construct a full instance OID. For example, 192.0.2.25 becomes the index suffix .192.0.2.25 on an IpAddress-indexed column.
OID table index
Convert IPv4 to an SNMP OID index
Append the four IPv4 address octets to an OID column that uses an IpAddress table index, such as the legacy IP-MIB ipAddrTable.
Indexed instance OID
.1.3.6.1.2.1.4.20.1.1.192.0.2.25
Index suffix: 192.0.2.25
This conversion applies to table indexes defined as IpAddress with four octets. Many newer tables use ifIndex or other index types. Check the MIB definition before constructing an instance OID.
How IPv4 OID indexes work
SNMP table indexes are encoded as additional OID subidentifiers after the column's base OID. An IpAddress index contains four octets, each represented as a decimal arc from 0 through 255. The IP-MIB ipAddrTable is a familiar example. Its ipAdEntAddr column has base OID 1.3.6.1.2.1.4.20.1.1, so the instance for 192.0.2.25 is 1.3.6.1.2.1.4.20.1.1.192.0.2.25.
This tool constructs only that four-octet form. Many newer tables use ifIndex, integer indexes, composite indexes, or variable-length octet strings. Their suffixes must follow the INDEX clause in the MIB and cannot be inferred from an IPv4 address alone.
Verify the table's index definition
Read the MIB definition for the table entry before adding an address suffix. The INDEX clause defines the order and type of every index component. If a table uses IpAddress followed by an interface index, both components must be appended in that order. The generated suffix is a syntactic helper and does not confirm that the agent implements the object or that the row exists.
The old IP-MIB table has been superseded for many modern use cases by IP-MIB tables with different indexes. Interface-related tables commonly use ifIndex, while address tables may represent IPv4 and IPv6 addresses with different index structures. Confirm the exact MIB and object before querying.