Description |
This article describes how to use SNMP to query and monitor for network routes present on the FortiGate. |
Scope | FortiGate, SNMP. |
Solution |
This article assumes that the FortiGate has already been configured as an SNMP agent and has an SNMP Community added. For instructions regarding setting up SNMP on the FortiGate, refer to the following KB article: Technical Tip: How to Configure FortiGate SNMP Agent for Monitoring.
To monitor/query the routing table on the FortiGate, perform an snmpwalk for the following SNMP OID in the main RFC-1213 MIB. Note that this will query the entire routing table, though it is possible to distinguish the type of route (local, bgp, etc.) using the ipRouteProto SNMP OID:
ipRouteTable .1.3.6.1.2.1.4.21 ipRouteProto .1.3.6.1.2.1.4.21.1.9
As an example, consider the following snmptable output using the OID .1.3.6.1.2.1.4.21 (ipRouteTable):
Note how the ipRouteProto section shows 'local' in this case for static and connected routes, though more options are supported including other(1), local(2), netmgmt(3), icmp(4), egp(5), ggp(6), hello(7), rip(8), is-is(9), es-is(10), ciscoIgrp(11), bbnSpfIgp(12), ospf(13), and bgp(14):
To compare against the routing table on FortiGate, run the CLI command get router info routing-table all:
Related articles: |
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.