December 2006
Intermediate to advanced
1188 pages
72h 8m
English
You want to provide extra security to SNMP using access lists.
You can use the following commands to restrict which IP source addresses are allowed to access SNMP functions on the router. This is the legacy method:
Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router(config)#access-list99permitRouter(config)#172.25.1.0 0.0.0.255access-list99permit hostRouter(config)#10.1.1.1access-list99deny anyRouter(config)#snmp-server communityORAROroRouter(config)#99access-list98permitRouter(config)#172.25.1.0 0.0.0.255snmp-server communityORARWrwRouter(config)#98endRouter#
Here is a newer method to do the same thing using SNMP server groups:
Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router(config)#access-list99permitRouter(config)#172.25.1.0 0.0.0.255access-list99permit hostRouter(config)#10.1.1.1access-list99deny anyRouter(config)#snmp-server groupCOOKROv1 accessRouter(config)#99snmp-server userTESTRO1 COOKROv1Router(config)#endRouter#
Beginning with IOS Version 12.3(2)T, support for standard named access lists was added:
Router2#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router2(config)#ip access-list standardRouter2(config-std-nacl)#SNMPACLpermitRouter2(config-std-nacl)#172.25.1.0 0.0.0.255permit hostRouter2(config-std-nacl)#10.1.1.1deny anyRouter2(config-std-nacl)# ...