IOS-XE – SNMPv3
Sets up SNMPv3 access with either read/write enforcement or read-only discovery, plus MAC address notifications.
Demo guide — not a tested configuration
On this page
Before you begin
Confirm each prerequisite before planning changes. Checklist progress is kept for this visit and resets when you reload.
Overview
Sets up SNMPv3 access with either read/write enforcement or read-only discovery, plus MAC address notifications.
Before applying this configuration
This is a device configuration baseline. Existing VLANs, routing and the FortiNAC policy design are assumed; adapt placeholders and select the intended interfaces.
Choose either Read/write enforcement or Read-only discovery, then apply its per-port example. Each option includes its own ACL, SNMPv3 user, trap receivers and global MAC-notification settings; neither depends on the other. Omit the FNAC_2_IP lines when there is no secondary FortiNAC server.
Read/write enforcement
Use this device configuration for read/write enforcement. Replace the example values before applying it.
conf t
ip access-list standard FORTINAC-SNMP
permit <FNAC_IP>
permit <FNAC_2_IP>
exit
snmp-server view fortinac-snmp-rw iso included
snmp-server view fortinac-snmp-rw system included
snmp-server view fortinac-snmp-rw interfaces included
snmp-server group fortinac-group v3 priv read fortinac-snmp-rw write fortinac-snmp-rw notify fortinac-snmp-rw access FORTINAC-SNMP
snmp-server group fortinac-group v3 priv context vlan- match prefix read fortinac-snmp-rw write fortinac-snmp-rw access FORTINAC-SNMP
snmp-server user fortinac-rw fortinac-group v3 auth sha <SNMP_AUTH_PASSWORD> priv aes 128 <SNMP_PRIV_PASSWORD> access FORTINAC-SNMP
snmp-server host <FNAC_IP> traps version 3 priv fortinac-rw mac-notification
snmp-server host <FNAC_2_IP> traps version 3 priv fortinac-rw mac-notification
snmp-server enable traps mac-notification change move threshold
mac address-table notification change
mac address-table notification mac-move
mac address-table notification threshold
end
write memoryPer-port example — read/write
After the matching global configuration above, enable MAC added/removed notifications on each intended Layer 2 access port. Repeat for additional ports. SNMP read-only/read-write permissions apply to the FortiNAC user; the port notification commands are the same for both options.
configure terminal
interface <ACCESS_INTERFACE>
snmp trap mac-notification change added
snmp trap mac-notification change removed
exit
end
write memoryRead-only discovery
Use this device configuration for read-only discovery. Replace the example values before applying it.
configure terminal
ip access-list standard FORTINAC-SNMP
permit <FNAC_IP>
permit <FNAC_2_IP>
exit
snmp-server view fortinac-snmp-ro iso included
snmp-server group fortinac-ro-group v3 priv read fortinac-snmp-ro notify fortinac-snmp-ro access FORTINAC-SNMP
snmp-server group fortinac-ro-group v3 priv context vlan- match prefix read fortinac-snmp-ro access FORTINAC-SNMP
snmp-server user fortinac-ro fortinac-ro-group v3 auth sha <SNMP_AUTH_PASSWORD> priv aes 128 <SNMP_PRIV_PASSWORD> access FORTINAC-SNMP
snmp-server host <FNAC_IP> traps version 3 priv fortinac-ro mac-notification
snmp-server host <FNAC_2_IP> traps version 3 priv fortinac-ro mac-notification
snmp-server enable traps mac-notification change move threshold
mac address-table notification change
mac address-table notification mac-move
mac address-table notification threshold
end
write memoryPer-port example — read-only
After the matching global configuration above, enable MAC added/removed notifications on each intended Layer 2 access port. Repeat for additional ports. SNMP read-only/read-write permissions apply to the FortiNAC user; the port notification commands are the same for both options.
configure terminal
interface <ACCESS_INTERFACE>
snmp trap mac-notification change added
snmp trap mac-notification change removed
exit
end
write memoryRequired — suppress linkUp/linkDown traps
Mandatory — disable linkUp/linkDown traps
After the core SNMP configuration, choose one method: Global for all interfaces within the stated scope, or Per interface for the ports covered by this integration. Apply the chosen method and verify the result; you do not need to apply both.
Monitoring tools and interface exceptions
Global
Disable linkUp/linkDown traps switch-wide. The IOS/IOS-XE global command includes the snmp keyword.
configure terminal
no snmp-server enable traps snmp linkup linkdown
end
write memoryPer interface
Instead, disable link-status traps on the selected interface. Repeat for each interface covered by the integration, or use interface range <PORT_RANGE> where supported. Leave the global setting unchanged when choosing this method.
configure terminal
interface <INTERFACE>
no snmp trap link-status
exit
end
write memoryConsiderations
Both options create their own ACL and notification configuration. Select read-only for discovery or read/write when the intended FortiNAC action requires it. On L3 switches, select a stable trap source with snmp-server source-interface traps <SOURCE_INTERFACE> where supported. Apply the mandatory linkUp/linkDown suppression below the core configuration while retaining MAC notifications.
References
Original configuration source (Notion; access may be required) ↗
The supplied snippets are source-derived, not lab-validated. Confirm exact platform and firmware support before applying them. Original Notion pages may require access; their contents were not independently retrieved.
Cisco — SNMP trap controls and global/per-interface contexts ↗
Cisco IOS-XE — global and per-interface MAC notification configuration ↗
Verify the result
Use observed results to decide whether the intended outcome has been achieved.
Expected result
If it isn’t working
If polling or traps fail, check reachability, source restrictions, SNMP version, credentials and destination settings. Check the permissions required by the intended operation.
Change one variable at a time
Video walkthrough
The written guide stands on its own. A companion video can be added after the guide is validated.