Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Is there a way to filter snmp packets based on community string ?

on a router with 12.1 or 12.2 IOS how can I filter snmp from one interface to another :

Can it be done through acl (apparently only udp port 161 and 162 can be filtered) or though class-map protocol ?

Cisco Employee

Re: Is there a way to filter snmp packets based on community str

From one interface to another the only way is to filter using an ACL and then only on UDP port 161 or 162 (snmp or snmptrap keywords). You can't filter the traffic dependent on the community string within an ACL.

You could also filter traffic using a class-map, but then again, the only thing you can do is filter all SNMP traffic. For example:

sec-3640#conf t

Enter configuration commands, one per line. End with CNTL/Z.

sec-3640(config)#class-map openforum

sec-3640(config-cmap)#match protocol snmp ?

sec-3640(config)#class-map openforum

As you can see, there's no other options under the SNMP protocol to filter on anything else.

CreatePlease login to create content