This article explains how to retrieve system interface information from a FortiGate firewall using SNMP by querying the appropriate Object Identifiers (OIDs). This is useful for monitoring network interface status, IP assignments, and traffic statistics using an SNMP manager.
FortiGate.
Prerequisites
Relevant OID for System Interface Table:
The primary OID to get information about the FortiGate’s interfaces is .1.3.6.1.2.1.2.2.1 (ifTable)
| Sub-OID | Description | Example |
|--------------------------|-------------------------------------|---------------------|
| .1.3.6.1.2.1.2.2.1.1 | ifIndex – Interface index | 1, 2... |
| .1.3.6.1.2.1.2.2.1.2 | ifDescr – Interface name | "port1", "wan1" |
| .1.3.6.1.2.1.2.2.1.8 | ifOperStatus – Operational status | 1 = up, 2 = down |
| .1.3.6.1.2.1.2.2.1.10 | ifInOctets – Bytes received | Counter |
| .1.3.6.1.2.1.2.2.1.16 | ifOutOctets – Bytes transmitted | Counter |
| .1.3.6.1.2.1.4.20.1.2 | IP address to interface index | For IP mapping |
Example SNMP Command (Linux / CLI):
snmpwalk -v2c -c public 192.168.1.99 .1.3.6.1.2.1.2.2.1.2 <----- Returns the names of all configured interfaces on the FortiGate.
To get operational status:
snmpwalk -v2c -c public 192.168.1.99 .1.3.6.1.2.1.2.2.1.8
Additional OIDs (Useful for Interfaces)
.1.3.6.1.2.1.4.20.1.1 – IP addresses configured on the system
.1.3.6.1.2.1.31.1.1.1.18 – Interface alias/description
.1.3.6.1.2.1.31.1.1.1.6 – High capacity ifInOctets
.1.3.6.1.2.1.31.1.1.1.10 – High capacity ifOutOctets
Note:
By using standard SNMP OIDs, administrators can monitor FortiGate interface status and traffic metrics efficiently. Ideal for integration with network monitoring tools.
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.