Created on 08-18-2023 01:11 AM Edited on 08-18-2023 01:11 AM By Anthony_E
Description | This article describes when to use the ha-direct feature under the SNMP configuration. |
Scope | FortiGate v6 and above. |
Solution |
In this example, let's have a look into two scenarios:
Scenario 1: When trying to pull SNMP information from the dedicated management port.
Setup: SNMP server (10.5.63.202) --------------------------------- port2 Fortigate (10.5.61.78)
Configuration.
Port 2 configuration:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
HA configuration:
set ha-mgmt-status enable xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
SNMP configuration:
config system snmp community xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Initiated SNMP walk from the SNMP server. From the SNMP sniffers collected on FortiGate, it is possible to see that FortiGate is not responding to SNMP request coming from the SNMP server
2023-08-16 13:50:58.482222 port2 in 10.5.63.202.60434 -> 10.5.61.78.161: udp 36 <----- FortiGate is receiving the SNMP packets but it is not responding back.
Solution: Since HA dedicated management interface has been configured on port2 and SNMP traffic is hitting on port2 interface, it is necessary to enable ha-direct under SNMP settings
FGT #(community) # show full-configuration
Now, it is possible to see the SNMP server is successfully able to get SNMP responses from the FortiGate's Port2 Interface:
FGT# diagnose sniffer packet any "port 161" 4 0
Scenario 2: When trying to pull SNMP information from a Non-dedicated management port.
Setup: SNMP server (172.31.143.202) --------------------------------- port3 Fortigate (172.31.141.78) [But here Port2 is ha dedicated mgmt port]
Configuration.
HA configuration:
set ha-mgmt-status enable
SNMP requests will be coming on Port3.
Port3 configuration:
config system interface xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
SNMP configuration:
config system snmp community xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Initiated SNMP walk from the SNMP server. From the SNMP sniffers collected on FortiGate, it is possible to see that FortiGate is not responding to SNMP request coming from the SNMP server.
FGT# diagnose sniffer packet any "port 161" 4 0 l
Solution: When an SNMP request is for a non-dedicated management port in this case FortiGate will not respond to any SNMP query if ha-direct is enabled because it is non dedicated management port. Hence, it is necessary to disable ha-direct when SNMP request is for a non-dedicated management interfaces.
FGT # config system snmp community config system snmp community
Initiated SNMP walk from the SNMP server. Now, it is possible to see the SNMP server is successfully able to get SNMP responses from FortiGate's non-dedicated management port. In this case Port3 Interface:
FGT # diagnose sniffer packet any "port 161" 4 0 a Note. If the issues are persistent, confirm the below settings:
Is there a trusted host configured under the Administrator login? Then, add the SNMP server in the trusted-host setting. Is the SNMP server reachable from FortiGate?
Collect the below output and share it with TAC for further assistance.
Terminal 1:
diag debug application snmpd -1 diag debug enable
Terminal 2:
diag sniffer packet any "port 161 or 162" 6 0 l
Related article: Technical Tip: FortiGate SNMP polling via the dedicated HA management port |
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 2024 Fortinet, Inc. All Rights Reserved.