Track device traffic statistics when NAC is enabled 7.2.4
Starting in FortiOS 7.2.4 with FortiSwitchOS 7.2.3, you can use the FortiOS CLI to report device statistics when NAC is enabled. The device statistics report the MAC addresses of known devices, the number of packets and bytes received, the number of seconds since the last update, and the age of the MAC counter in seconds.
|
To display device statistics:
-
Enable NAC.
config user nac-policy
edit <NAC_policy_name>
set status enable
next
end
-
Enable packet counting in the MAC policy. By default, packet counting is disabled.
config switch-controller mac-policy
edit <MAC_policy_name>
set count enable
next
end
-
Specify how long inactive MAC addresses are kept before being removed from the client database. By default, MAC addresses are kept for 24 hours. The range of values is 0-168 hours. If you set this option to 0, the value for the
mac-aging-interval
setting is used instead.config switch-controller global
set mac-retention-period <number_of_hours>
end
-
Enter the following command to display the device statistics:
diagnose switch-controller telemetry show mac-stats
For example:
diagnose switch-controller telemetry show mac-stats MAC Packets Bytes Last Update (secs ago) Age ------------------------------------------------------------------------------------ 00:00:00:00:00:0f 234562 2356546842 41 23433 00:00:00:00:14:21 44273 456346 68 7477 00:03:7a:a8:82:e7 12346 34545 30 983452 00:04:f2:f3:2b:7f 4357 345345 30 23423 00:04:f2:f6:77:05 463453 4564564 430 362456265 00:04:f2:f6:7a:6a 34535 1312354 30 23423 00:04:f2:f6:7b:66 73821 345345 68 374546 00:05:9a:3c:7a:00 43 9144 68 456725