I am going to demonstrate using telnet access-profile, snmp should be the same.
1. create dynamic ACL
create access-list telnet_acl " source-address 192.168.100.101/32 ; destination-address 10.67.72.85/32 ; protocol tcp ; destination-port 23 ;" " permit ;" application "Cli"
2. Add ACL to telnet access-profile
configure telnet access-profile add "telnet_acl" first
3. You should see the hit count when permit/deny
* X460-24t.35 # show access-list counter process telnet================================================================================
Access-list Permit Packets Deny Packets
================================================================================
telnet_acl 1 0
================================================================================
Total Rules : 1
SNMP should be the same using snmp access-profile
Managing ACL Rules for SNMPBefore you can assign an ACL rule to SNMP, you must create a dynamic ACL rule as described in ACLs.
Managing the Switch
• To add or delete a rule for SNMP access, use the following command:
configure snmp access-profile [ access_profile {readonly | readwrite} | [[add
rule ] [first | [[before | after] previous_rule]]] | delete rule | none ]
• To display the access-list permit and deny statistics for an application, use the following command:
show access-list counters process [snmp | telnet | ssh2 | http]