December 2006
Intermediate to advanced
1188 pages
72h 8m
English
You want to limit which MIB variables can be remotely accessed with SNMP.
You can use the following commands to restrict SNMP access to portions of the MIB tree. This example shows the legacy configuration 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-list99denyanylogRouter(config)#snmp-server viewORAVIEWmib-2 includedRouter(config)#snmp-server viewORAVIEWat excludedRouter(config)#snmp-server viewORAVIEWcisco includedRouter(config)#snmp-server communityORAROviewORAVIEWroRouter(config)#99snmp-server viewRESTRICTED lsystem.55includedRouter(config)#snmp-server communityORARWviewRESTRICTEDrwRouter(config)#99endRouter#
Cisco also has a new method for restricting MIB access, which uses the snmp-server group command:
Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router(config)#snmp-server viewORAVIEWmib-2 includedRouter(config)#snmp-server viewORAVIEWat excludedRouter(config)#snmp-server viewORAVIEWcisco includedRouter(config)#snmp-server groupTESTv1 readRouter(config)#ORAVIEWsnmp-server userORARO TESTv1Router(config)#snmp-server viewRESTRICTED lsystem.55includedRouter(config)#snmp-server groupTEST2v1 writeRouter(config)#RESTRICTEDsnmp-server userORARW TEST2v1Router(config)#endRouter#
By default, enabling SNMP services on ...