Skip to Main Content
Cisco IOS in a Nutshell, 2nd Edition
book

Cisco IOS in a Nutshell, 2nd Edition

by James Boney
August 2005
Intermediate to advanced content levelIntermediate to advanced
798 pages
31h 12m
English
O'Reilly Media, Inc.
Content preview from Cisco IOS in a Nutshell, 2nd Edition

Name

snmp-server view — global

Synopsis

snmp-server view view-name oid-tree {excluded | included}
no snmp-server view

Configures

An SNMP view

Default

None

Description

This command defines an SNMP view that can be used in the snmp-server community command. A view is a list of SNMP object trees. By default, the entire SNMP object tree is available for access. A view restricts access to some subset of the entire tree. Different views can be made available to different SNMP communities.

view view-name

A unique name that identifies this SNMP view.

oid-tree

An SNMP object ID (in either numeric or human-readable form). All nodes underneath the given object belong to the tree. Asterisks can be used as wildcards when specifying the object ID.

excluded or included

Specifies whether the given oid-tree is included in or excluded from the view.

Example

Say that you want to give some group SNMP access to the ifEntry table for interface 2. (Perhaps this group is connected to the router through interface 2. Note that the interface number here is an index into the SNMP interface table, not an IOS interface name.)

To achieve this, define a view:

snmp-server view subset2 ifEntry.*.2 included

Then set the community string for this view:

snmp-server community sub2in view subset2 RO

Now users can use the community string sub2in to access the ifEntry table for interface 2, but aren’t allowed to access other SNMP objects.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

CISCO IOS in a Nutshell

CISCO IOS in a Nutshell

James Boney
Cisco IOS Cookbook, 2nd Edition

Cisco IOS Cookbook, 2nd Edition

Kevin Dooley, Ian Brown
Cisco Software-Defined Access

Cisco Software-Defined Access

Srilatha Vemula, Jason Gooley, Roddie Hasan

Publisher Resources

ISBN: 0596008694Errata