cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
375
Views
0
Helpful
1
Replies

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

labiehler
Level 1
Level 1

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 ?

1 Reply 1

gfullage
Cisco Employee
Cisco Employee

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.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: