Enable SNMP & Traps on FortiSwitch

Reading Time: < 1 minute

Connect to your FortiGate, then enter the following commands in CLI to enable and configure SNMP on all FortiSwitchs at the same time.

Step 1 – Set up a local-access security policy with the following commands to allow SNMP access on the internal interfaces.

config switch-controller security-policy local-access
edit default
set internal-allowaccess ping snmp 
end

Step 2 – Configure SNMP system information and community globally

config switch-controller snmp-sysinfo
set status enable
set engine-id 1
set name public
set description FortiSwitch
set contact-info support@domain.com
set location Montreal
end

config switch-controller snmp-community
edit 1
set status enable
set query-v1-status disable
set query-v2c-status enable
set trap-v1-status disable
set trap-v2c-status enable
set events cpu-high mem-low log-full intf-ip ent-conf-change
config hosts
edit 1
set ip x.x.x.x
end
end

1. (set name public) – public is the community string here.
2. (set ip x.x.x.x) – x.x.x.x represent the IP of your blësk server.
3. We disable SNMP v1 and enable SNMP v2c.

wpadmin
Author: wpadmin