---
type: Monitoring Guide
title: "How to Monitor Interface Traffic via SNMP (In/Out Octets)"
description: "Read ifInOctets/ifHCInOctets counters, diff two polls, and convert octet deltas to bits per second."
resource: "https://snmp-monitoring.info/monitoring/network/interface-traffic/"
tags: [monitoring]
timestamp: 2026-07-11T00:00:00Z
---

# How to Monitor Interface Traffic via SNMP (In/Out Octets)

Read ifInOctets/ifHCInOctets counters, diff two polls, and convert octet deltas to bits per second.

## Related concepts

- Up: [SNMP Network Monitoring: Interfaces, Bandwidth & Errors](/monitoring/network/index.md)

## Frequently asked questions

### What OID is interface traffic in SNMP?

Inbound bytes are ifInOctets (1.3.6.1.2.1.2.2.1.10) or, for fast links, ifHCInOctets (1.3.6.1.2.1.31.1.1.1.6); outbound are ifOutOctets / ifHCOutOctets. They're cumulative counters, so you diff two reads to get a rate — there's no ready-made "Mbps" object.

### How do I convert octets to Mbps?

Take the difference between two octet reads, multiply by 8 (bytes to bits), divide by the seconds between reads, then divide by 1,000,000. So (Δoctets × 8 ÷ Δseconds) ÷ 1e6 = Mbps.

### Why do my interface counters reset to zero?

The agent restarted — a device reboot or an SNMP daemon restart zeroes every counter. The delta right after a reset is meaningless and should be discarded; good pollers detect the drop and skip it rather than plotting a negative spike.

### Should I use 32-bit or 64-bit interface counters?

Use 64-bit ifHC counters on any link 1 Gbit or faster, because 32-bit counters can wrap in under a minute on fast links and wreck your rate math. Only fall back to 32-bit for slow links or agents that don't expose the high-capacity table.

## Source

Concept generated from https://snmp-monitoring.info/monitoring/network/interface-traffic/ — the SNMP Monitoring vendor-neutral knowledge base. Content is limited to what that page states (no external claims added here).
