Configuring an SNMP Server

The SNMP server operates on a network device, such as a router, a switch, or a workstation. It responds to SNMP requests received from SNMP clients and generates trap messages to alert the client(s) about notable state changes in the network device.

To configure the SNMP server:

  1. Enable the SNMP server. For more information about enabling the SNMP server, see Enabling an SNMP Server.
    host1(config)#snmp-server
  2. Configure at least one authorized SNMP community (SNMPv1/v2c) or user (SNMPv3), which provides SNMP client access. For more information about configuring SNMP community and SNMPv3 users, see Configuring an Authorized SNMP Server Community and Configuring SNMPv3 Users.
    host1(config)#snmp-server community boston view everything rwhost1(config)#snmp-server user fred group private auth sha fred-password priv des password
  3. (Optional) Set the server parameters—contact name and server location. For more information about configuring contact name and location, see Configuring the SNMP Server Contact Person and Location.
    host1(config)#snmp-server contact Bob Smithhost1(config)#snmp-server location 3rdfloor
  4. (Optional) Reconfigure the maximum SNMP packet size. For more information about configuring SNMP packet size, see Configuring the SNMP Server Maximum Packet Size.
    host1(config)#snmp-server packetsize 1000
  5. (Optional) Configure memory warning parameters. For more information about configuring memory warning parameters, see Configuring Memory Warning Parameters.
    host1(config)#memory warning 80 70
  6. (Optional) Configure the method the router uses to encode the ifDescr and ifName objects. For more information about configuring encoding method, see Configuring the SNMP Server Encoding Scheme of the ifDescr and ifName Objects.
    host1(config)#snmp interfaces description-format common
  7. (Optional) Manage the interface sublayers (compress interfaces and control interface numbering). For more information about interface sublayers management, see Removing Interface Sublayers from the ifTable, ifStackTable, and ipAddrTable, Excluding Interfaces from the ifTable, ifStackTable, and ipAddrTable, and Setting Up an Interface Numbering Method in the IfTable to Use Contiguous Integers.
    host1(config)#snmp-server interfaces compress atmAal5 host1(config)#snmp-server interface compress-restriction ifadminstatusdown host1(config)#snmp interfaces rfc1213 55000 100000
  8. (Optional) Configure the dynamic group parameters. For more information about configuring dynamic group, see Configuring the SNMP Server Dynamic Groups and Views.
    host1(config)#snmp-server group grp1authpriv usm priv read grp1read write grp1write notify grp1notify
  9. (Optional) Configure the dynamic view parameters. For more information about configuring dynamic view, see Configuring the SNMP Server Dynamic Groups and Views.
    host1(config)#snmp-server view view1 1.3.6.1 included non-volatile

You can also set up SNMP traps and set up the router to collect bulk statistics. See SNMP Trap Overview and Bulk Statistics Data Collection Overview.

Related Documentation