To configure the SNMP server:
You can also set up SNMP traps and set up the router to collect bulk statistics. See Configuring Traps and Collecting Bulk Statistics.
To enable the SNMP server, use the following command.
snmp-server
For SNMPv1/v2c, access to an SNMP server by an SNMP client is governed by a proprietary SNMP community table that identifies those communities that have read-only, read-write, or administrative permission to the SNMP MIB stored on a particular server.
When an SNMP server receives a request, the server extracts the client’s IP address and the community name. The SNMP community table is searched for a matching community. If a match is found, its access list name is used to validate the IP address. If the access list name is null, the IP address is accepted. A nonmatching community or an invalid IP address results in an SNMP authentication error.
Each entry in the community table identifies:
The community name acts as a password and is used to authenticate messages sent between an SNMP client and a router containing an SNMP server. The community name is sent in every packet between the client and the server.
SNMP has three privilege levels:
The IP access list identifies those IP addresses of SNMP clients permitted to use a given SNMP community.
snmp-server community
To configure SNMPv3 users, use the following command.
snmp-server user
With dynamic configurable views and groups you can fine-tune application features to a specific group, You can have 32 view entries (with distinct names) per virtual router. Because there is no limit to the number of entries within a distinct view name, you can configure complex views. You can also have 32 access entries (with distinct names) per virtual router. All views are on a per-virtual-router basis; although static views are on a per-virtual-router basis, they cannot be altered. If you modify a view, the system deletes the original entry and creates the new view. Therefore, if the new view fails, the original view is no longer available.
SNMP v3 configurations are allowed only at the maximum CLI privilege level (15).
snmp-server group
snmp-server view
Setting the server’s contact person and location provides helpful identifiers for the SNMP server. These identifiers are arbitrary and do not affect the server’s function, but they are useful to have.
snmp-server contact
The SNMP server must support a PDU with an upper limit of 484 bytes or greater. There is no need to coordinate the maximum packet size across the entire network. Many requests and responses tend to be smaller than the maximum value.
snmp-server packetsize
You can set up the router to send memory warning messages when memory utilization reaches a specified value.
memory
You can control how the router encodes the ifDescr and ifName objects in the SNMP agent’s interface table and in the bulkstats application.
There are two choices of encoding schemes: an E Series router proprietary method and a conventional industry method.
For example a PPP interface configured on top of an ATM interfaces is:
snmp-server interfaces description-format
You can set up the SNMP agent to compress the number of interface instances in the standard interface and stack tables. You can also control the interface numbering method used in the interface tables.
You can compress interfaces by interface type, table type, and the administrative status of the interface.
Compressing interfaces without specifying a table type removes them from the interface tables (ifTable, ifXTable, and juniIfTable), the interface stack tables (ifStackTable, ifInvStackTable, and juniIfInvStackTable), the ipAddrTable, and the ipNetToMedia table, which increases table retrieval performance. For example, if you want statistics kept only on IP interfaces, then you can compress all interfaces except IP; subsequently, only IP interfaces will appear in the interface tables, interface stack tables, ipAddrTable, and ipNetToMedia table.
Compressing a table type in an interface removes the interface from the specified table type. For example, if you want to compress an interface only in interface tables, you can specify the table-type keyword and interface-tables as the TableType value.
To compress interfaces that have an administrative status of down, use the snmp-server interfaces compress-restriction command.
To compress interfaces according to type, use the snmp-server interfaces compress command. To see the list of interfaces that you can remove, use the CLI help:
- host1(config)#snmp-server interfaces compress
?
- Atm Atm interface layer
- Atm1483 Atm1483 interface layer
- AtmAal5 AtmAal5 interface layer
- . . .
SonetVT SonetVT
interface layer
- VlanMajor VlanMajor interface layer
- VlanSub VlanSub interface layer <cr>
If you enter the snmp-server interfaces compress command without keywords, the following interface types are removed from the interface tables:
snmp-server interfaces compress
Subsequent use of the same command on any interface (in the following example, Atm) on the same router without the table-type keyword compresses the interface only in the ipNetToMedia table (not in interface or interface stack tables):
- host1(config)#snmp-server interfaces compress
?
- [interfaceList]
table-type Category of SNMP tables from which to remove
< cr >
- host1(config)#snmp-server interfaces compress
atm table-type ?
interface-stack-tables Compression will be applicable to
ifStackTable/ifInvStackTable/juniIfStackTable
interface-tables Compression will be applicable to
ifTable/ifXtable/juniIfTable
- host1(config)#snmp-server interfaces compress
atm table-type interface-tables
- host1(config)#snmp-server interfaces compress
Ds1 table-type interface-stack-tables
- Router#show snmp interfaces
Compressed(Removed) Interface Types :
From ipNetToMediaTable:
From ifTables : Atm
From ifStackTables : Ds1
Armed Interface Numbering Mode: Sparse ifIndex
Interface Description Setting: Proprietary
snmp-server interfaces compress-restriction
Each interface in the ifTable is assigned an ifIndex number. RFC 1213 required that ifIndexes use contiguous integers and that the ifIndex be less than the value of the total number of interfaces (ifNumber). More recent RFCs—1573, 2232, and 2863—removed these restrictions to accommodate interface sublayers. The E Series router implementation of SNMP derives index numbers in 32-bit values that are unique on a given router. This numbering scheme can result in large gaps in the ifIndex.
Legacy network management software that was designed to work with RFC 1213 implementations expects contiguous integers and can fail when the software encounters large gaps in the ifIndex.
By default, the router uses a numbering scheme based on RFC 2863. For compatibility with RFC 1213, you can set up the router to use contiguous numbers and to limit the values of the ifIndex and the ifNumber.
snmp-server interfaces rfc1213
![]() |
Caution: Reducing the value of the maxIfIndex or maxIfNumber causes the router to automatically reboot to factory default settings. |
- host1(config)#snmp-server interfaces rfc1213
55000 100000
- WARNING: Execution of this command will cause all configuration
settings to revert to factory defaults upon the next system reboot.
- Proceed with 'snmp interfaces rfc1213'? [confirm]
Use the following command to view the configuration of your interface tables.
show snmp group
host1#show snmp interfaces Compressed(Removed) Interface Types: HDLC, FT1, ATM, ATM1483 Armed Interface Numbering Mode: RFC1213, maxIfIndex=65535, maxIfNumber=65535 Interface Description Setting: proprietary