arrow-left

All pages
gitbookPowered by GitBook
1 of 7

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Configuring SNMP

Simple Network Management Protocol (SNMP) is an Internet Standard protocol for collecting and organizing information about managed devices on IP networks and for modifying that information to change device behaviour.

SNMP is widely used in network management for network monitoring. SNMP exposes management data in the form of variables on the managed systems organized in a Management Information Base (MIB) which describes the system status and configuration. These variables can then be remotely queried (and, in some circumstances, manipulated) by managing applications.

Configure SNMP communitychevron-rightConfiguring SNMP Trapchevron-rightConfiguring SNMP Thresholdchevron-rightConfiguring SNMP Userchevron-rightConfiguring SNMP Locationchevron-rightConfiguring SNMP Contactchevron-right

Configuring SNMP Location

You can configure the SNMP Location string using the below command:

hashtag
Reference

Command

[no] snmp-server location <location_name>

Description

hashtag
Example

You can verify the configuration by using the command(s) below:

Configuring SNMP Threshold

You can configure the SNMP Threshold using the below command:

hashtag
Reference

Command

[no] snmp-server trap <cpu-util/mem-util> threshold <%>

Description

hashtag
Example

You can verify the configuration by using the command(s) below:

Configure SNMP community

You can configure the SNMP Community string using the below command:

hashtag
Reference

Command

[no] snmp-server community <string>

Description

hashtag
Example

You can verify the configuration by using the command(s) below:

Configuring SNMP Trap

hashtag
Configure SNMP Trap

Traps are used when the Device needs to alert the Network Management software of an event without being polled. Traps ensure that the NMS gets information if a certain event occurs on the device that needs to be recorded without being polled by the NMS first. Managed network devices will have Trap MIBs with predefined conditions built into them. It’s crucial that the Network management system has these MIBs compiled into them to receive any traps sent by the given device/s. The primary focus of this feature is to support SNMP Trap notifications and in particular, linkUp, linkDown and config change trap notifications.

chevron-rightSupported MIBshashtag
  • MIBS added to support SNMP Trap

  • DISMAN-EVENT-MIB.txt

  • INET-ADDRESS-MIB.txt

With these MIBs, you can trigger sending an SNMP trap to a configured SNMP-server host based on certain events. Also, GET/GETNext/WALK operations can be supported on these mibs. The linkUp and linkDown traps are sent to the configured host in the event that an interface Admin or Oper status changes from up to down or vice-versa. The configChange trap monitors NPB (MAP, rule, port-npb config) and port (Speed, MTU, FEC, Autoneg) configuration changes. A configChangeTrap PDU is sent to the host when any value in these tables are modified, added or removed.

circle-info

It's recommended not to set up more than 4 SNMP-Trap servers.

hashtag
Reference

hashtag
Example

You can verify the configuration by using the command(s) below:

circle-info

Traps are only supported on SNMPv2c

hashtag
Disable PSU/FAN traps:

Below commands can be used to disable FAN/PSU traps temporarily,

hashtag
Reference

circle-info

By default, traps are generated every 60 seconds, which may cause unnecessary stress on memory and CPU. To mitigate this, disabling the default behaviour using the above command is recommended for disabling PSU and FAN traps.

This will result in traps being generated only when the PSU/FAN state changes, reducing the load on memory and CPU.

hashtag
SNMP Trap Logs:

Configuring SNMP Contact

You can configure the SNMP Contact string using the below command:

hashtag
Reference

Command

[no] snmp-server contact contact-name <contact_name> contact-mail <Contact_mail>

Description

hashtag
Example

You can verify the configuration by using the command(s) below:

SNMP location configuration

Parameters

SNMP location

Mode

CONFIG

pbnoscli# show snmp-location 
===================================================
Location     
===================================================
Location-1
pbnoscli# 

SNMP trap threshold configuration

Parameters

SNMP threshold

Mode

CONFIG

pbnoscli# show snmp-trap thresholds 
======================================
System-Object Threshold
======================================
CPU utilization          : 82
Memory utilization       : 80
Disk utilization         : 80
pbnoscli# 

SNMP community configuration

Parameters

SNMP community string

Mode

CONFIG

pbnoscli# configure terminal
pbnoscli(config)# snmp-server 
  community             Community string authentication
  contact               Configure SNMP contact
  location              Configure SNMP location
  trap                  Trap configuration
  user                  SNMP user
pbnoscli(config)# snmp-server community 
 <comm>                
pbnoscli(config)# snmp-server community public
pbnoscli(config)# 

SNMP contact configuration

Parameters

SNMP contact

Mode

CONFIG

pbnoscli# show snmp-contact 
===================================================
Contact      
===================================================
Contact Name : test-engineer
Contact Mail : test@example.com
pbnoscli# 

pbnoscli# configure terminal
pbnoscli(config)# snmp-server 
  community             Community string authentication
  contact               Configure SNMP contact
  location              Configure SNMP location
  trap                  Trap configuration
  user                  SNMP user
pbnoscli(config)# snmp-server location 
  <loc_str>                
pbnoscli(config)# snmp-server location Location-1
pbnoscli(config)#

pbnoscli(config)# no snmp-server location           
pbnoscli(config)# 
pbnoscli# show running-config 
configure terminal
!
interface mgmt
ip address 10.4.4.52/24 gateway 10.4.4.1
!
snmp-server location Location-1
!
pbnoscli# 

pbnoscli# configure terminal 
pbnoscli(config)# snmp-server trap 
  cpu-util              CPU utilization
  disk-util             Disk utilization
  fan-util              FAN utilization
  mem-util              Memory utilization
  modify                Modify
  psu-util              PSU utilization
pbnoscli(config)# snmp-server trap disk-util 
  threshold             Threshold limit
pbnoscli(config)# snmp-server trap disk-util threshold 
  <diskutil>            Percentage
pbnoscli(config)# snmp-server trap disk-util threshold 80 
pbnoscli(config)# snmp-server trap cpu-util threshold 82
pbnoscli(config)# 
pbnoscli# show running-config 
configure terminal
!
interface mgmt
ip address 10.4.4.52/24 gateway 10.4.4.1
!
snmp-server trap modify 2 server-id 1 10.2.2.11 port 29 community public
snmp-server community public
snmp-server trap cpu-util threshold 82
snmp-server trap disk-util threshold 80
snmp-server trap fan-util disable
snmp-server trap psu-util disable
!
pbnoscli# 
pbnoscli# show snmp-community
===================================================
Community    
===================================================
public (Read-only)
pbnoscli# 
pbnoscli# show running-config 
configure terminal
!
interface mgmt
ip address 10.4.4.52/24 gateway 10.4.4.1
!
snmp-server community public
!
pbnoscli# 
pbnoscli# configure terminal 
pbnoscli(config)# snmp-server
pbnoscli(config)# snmp-server contact contact-name 
 <cont_name>           
pbnoscli(config)# snmp-server contact contact-name test-engineer 
  contact-mail
pbnoscli(config)# snmp-server contact contact-name test-engineer contact-mail test@example.com 
pbnoscli#


pbnoscli(config)# no snmp-server contact
pbnoscli# 
pbnoscli# show running-config 
configure terminal
!
interface mgmt
ip address 10.4.4.52/24 gateway 10.4.4.1
!
snmp-server contact contact-name test-engineer contact-mail test@example.com
snmp-server location Location-1
!
pbnoscli#
IPV6-TC.txt
  • SNMP-FRAMEWORK-MIB.txt

  • SNMPv2-SMI.txt

  • DISMAN-SCHEDULE-MIB.txt

  • IP-FORWARD-MIB.txt

  • IPV6-UDP-MIB.txt

  • SNMP-MPD-MIB.txt

  • SNMPv2-TC.txt

  • ENTITY-MIB.txt

  • IP-MIB.txt

  • MTA-MIB.txt

  • SNMP-NOTIFICATION-MIB.txt

  • SNMPv2-TM.txt

  • HOST-RESOURCES-MIB.txt

  • IPV6-ICMP-MIB.txt

  • NETWORK-SERVICES-MIB.txt

  • SNMP-TARGET-MIB.txt

  • SNMP-VIEW-BASED-ACM-MIB.txt

  • HOST-RESOURCES-TYPES.txt

  • IPV6-MIB.txt

  • NOTIFICATION-LOG-MIB.txt

  • SNMP-USER-BASED-SM-MIB.txt

  • TCP-MIB.txt

  • IF-MIB.txt

  • IPV6-TCP-MIB.txt

  • SNMP-COMMUNITY-MIB.txt

  • SNMPv2-MIB.txt

  • UDP-MIB.txt

  • Command

    [no] snmp-server trap modify <version><ip4addr|ip6addr> [port <value>] [community

    <value>]

    Description

    SNMP trap configuration

    Parameters

    Version, IPv4 or v6 Address , port, community values

    Mode

    CONFIG

    Command

    snmp-server trap (psu-util/fan-util) disable

    Description

    disable PSU/FAN traps temperoraly

    Parameters

    FAN/PSU

    Mode

    EXEC

    pbnoscli# configure terminal 
    pbnoscli(config)# snmp-server 
      community             Community string authentication
      contact               Configure SNMP contact
      location              Configure SNMP location
      trap                  Trap configuration
      user                  SNMP user
    pbnoscli(config)# snmp-server trap 
      cpu-util              CPU utilization
      disk-util             Disk utilization
      fan-util              FAN utilization
      mem-util              Memory utilization
      modify                Modify
      psu-util              PSU utilization
    pbnoscli(config)# snmp-server trap modify 
      <version>             Version value
    pbnoscli(config)# snmp-server trap modify 2 
      <ipaddr>              A.B.C.D
      <ip6addr>             A:B::C:D
      server-id             Server ID
    pbnoscli(config)# snmp-server trap modify 2tr server-id 1 
      <ipaddr>              A.B.C.D
      <ip6addr>             A:B::C:D
    pbnoscli(config)# snmp-server trap modify 2 server-id 1 10.2.2.11 port 29 community public
    pbnoscli(config)# 
    pbnoscli# show snmp-trap            
    =====================================================================================
    Host          Version       Dest IP         Dest Port    Community     Vrf         
    =====================================================================================
    1                2	   10.2.2.11         29             public     None      
    pbnoscli# 
    pbnoscli# configure terminal
    pbnoscli(config)# snmp
      snmp-server           SNMP server configuration
    pbnoscli(config)# snmp-server
      community             Community string authentication
      trap                  Trap configuration
    pbnoscli(config)# snmp-server trap
      cpu-util              CPU utilization
      disk-util             Disk utilization
      fan-util              FAN utilization
      mem-util              Memory utilization
      modify                Modify
      psu-util              PSU utilization
    pbnoscli(config)# snmp-server trap psu-util
      disable               Disable the PSU traps
    pbnoscli(config)# snmp-server trap psu-util 
      disable               Disable the PSU traps. Notify only on state change
    pbnoscli(config)# snmp-server trap psu-util disable
    pbnoscli(config)# snmp-server trap fan-util disable 
    pbnoscli(config)# end
    pbnoscli# 
    // As received on the SNMP server
    
    
    //Disk Traps
    10.4.5.244.47699 > npbsrv01.snmp: [udp sum ok]  { SNMPv2c C="Aviz" { V2Trap(55) R=755944523  system.sysUpTime.0=5574 S:1.1.4.1.0=88.2.0.3="Current Disk usage 78% falls below threshold 79%" } }
    10.4.5.244.47549 > npbsrv01.snmp: [udp sum ok]  { SNMPv2c C="Aviz" { V2Trap(55) R=755944523  system.sysUpTime.0=5574 S:1.1.4.1.0=88.2.0.2="Current Disk usage 88% raised above threshold 80%" } }
    10.4.5.244.47239 > npbsrv01.snmp: [udp sum ok]  { SNMPv2c C="Aviz" { V2Trap(55) R=755944523  system.sysUpTime.0=5574 S:1.1.4.1.0=88.2.0.4="Disk /dev/sda3 failed" } }
    
    //CPU Traps
    10.4.5.244.49899 > npbsrv01.snmp: [udp sum ok]  { SNMPv2c C="Aviz" { V2Trap(55) R=755944523  system.sysUpTime.0=5574 S:1.1.4.1.0=88.2.0.3="Current CPU usage 70% falling below threshold 80%" } }
    10.4.5.244.35699 > npbsrv01.snmp: [udp sum ok]  { SNMPv2c C="Aviz" { V2Trap(55) R=755944523  system.sysUpTime.0=5574 S:1.1.4.1.0=88.2.0.2="Current CPU usage 88% raised above threshold 80%" } }
    
    //Memory Traps
    10.4.5.244.47689 > npbsrv01.snmp: [udp sum ok]  { SNMPv2c C="Aviz" { V2Trap(55) R=755944523  system.sysUpTime.0=5574 S:1.1.4.1.0=88.2.0.3="Current mem usage 71% falling below threshold 80%" } }
    10.4.5.244.47656 > npbsrv01.snmp: [udp sum ok]  { SNMPv2c C="Aviz" { V2Trap(55) R=755944523  system.sysUpTime.0=5574 S:1.1.4.1.0=88.2.0.2="Current mem usage 88% raised above threshold 80%" } }
    
    //PSU Traps
    10.4.4.52.32850 > npbsrv01.snmp:  V2Trap(101)  system.sysUpTime.0=42198 S:1.1.4.1.0=E:58564.2.1.1.1 E:58564.2.1.1.1="PSU 2 present, status OK"
    
    //FAN Traps
    10.4.4.52.32850 > npbsrv01.snmp:  V2Trap(100)  system.sysUpTime.0=42198 S:1.1.4.1.0=E:58564.2.1.1.2 E:58564.2.1.1.2="fan1 present, status OK"
    10.4.4.52.32850 > npbsrv01.snmp:  V2Trap(100)  system.sysUpTime.0=42198 S:1.1.4.1.0=E:58564.2.1.1.2 E:58564.2.1.1.2="fan2 present, status OK"
    10.4.4.52.32850 > npbsrv01.snmp:  V2Trap(100)  system.sysUpTime.0=42198 S:1.1.4.1.0=E:58564.2.1.1.2 E:58564.2.1.1.2="fan3 present, status OK"
    10.4.4.52.32850 > npbsrv01.snmp:  V2Trap(100)  system.sysUpTime.0=42198 S:1.1.4.1.0=E:58564.2.1.1.2 E:58564.2.1.1.2="fan4 present, status OK"
    10.4.4.52.32850 > npbsrv01.snmp:  V2Trap(100)  system.sysUpTime.0=42198 S:1.1.4.1.0=E:58564.2.1.1.2 E:58564.2.1.1.2="fan5 present, status OK"
    10.4.4.52.32850 > npbsrv01.snmp:  V2Trap(100)  system.sysUpTime.0=42198 S:1.1.4.1.0=E:58564.2.1.1.2 E:58564.2.1.1.2="fan6 present, status OK"
    10.4.4.52.32850 > npbsrv01.snmp:  V2Trap(100)  system.sysUpTime.0=42198 S:1.1.4.1.0=E:58564.2.1.1.2 E:58564.2.1.1.2="fan7 present, status OK"
    10.4.4.52.32850 > npbsrv01.snmp:  V2Trap(100)  system.sysUpTime.0=42198 S:1.1.4.1.0=E:58564.2.1.1.2 E:58564.2.1.1.2="fan8 present, status OK"
    
    10.4.4.52.32850 > npbsrv01.snmp:  V2Trap(105)  system.sysUpTime.0=42198 S:1.1.4.1.0=E:58564.2.1.1.2 E:58564.2.1.1.2="psu2_fan1 present, status OK"   
    pbnoscli# show running-config 
    configure terminal
    !
    interface mgmt
    ip address 10.4.4.52/24 gateway 10.4.4.1
    !
    snmp-server trap modify 2 server-id 1 10.2.2.11 port 29 community public
    snmp-server community public
    snmp-server trap fan-util disable
    snmp-server trap psu-util disable
    !
    pbnoscli# 
    https://support.aviznetworks.com/hc/en-us/articles/6940420122637-SNMP-Overview-and-Traps-Implemented-in-OPB-REL-2-1-0support.aviznetworks.comchevron-right
    Aviz SNMP support

    Configuring SNMP User

    You can configure the SNMP User string using the below command:

    hashtag
    Reference

    Command

    [no] snmp-server user <user_name> priv_type [AuthNoPriv/Priv/noAuthNoPriv] access [RO/RW] auth [HMAC-SHA-2/MD5/SHA] auth-password <auth_password>

    Description

    SNMP user configuration

    hashtag
    Example

    You can verify the configuration by using the command(s) below:

    Parameters

    user value, privilege type, access type, encryption type, password value

    Mode

    CONFIG

    pbnoscli# show snmp-users     
    ======================================================================================================
    Users                           Privilage           Access  Authentication      Encryption
    ======================================================================================================
    aviz                            AuthNoPriv          RO      MD5                         
    pbnoscli# 
    pbnoscli# configure terminal 
    pbnoscli(config)# snmp-server 
     community              contact                location               trap               user                  
    pbnoscli(config)# snmp-server 
      community             Community string authentication
      contact               Configure SNMP contact
      location              Configure SNMP location
      trap                  Trap configuration
      user                  SNMP user
    pbnoscli(config)# snmp-server user 
      <user_name>           Enter Username
    pbnoscli(config)# snmp-server user aviz 
      priv_type             User Privilage
    pbnoscli(config)# snmp-server user aviz priv_type 
      AuthNoPriv            User Authentication and No Encryption
      Priv                  User Authentication and Encryption
      noAuthNoPriv          No user authentication and No Encryption
    pbnoscli(config)# snmp-server user aviz priv_type au
    pbnoscli(config)# snmp-server user aviz priv_type AuthNoPriv 
      access                User access permission
    pbnoscli(config)# snmp-server user aviz priv_type AuthNoPriv access 
      RO                    Read only
      RW                    Read & Write
    pbnoscli(config)# snmp-server user aviz priv_type AuthNoPriv access RO 
      auth                  Authentication
    pbnoscli(config)# snmp-server user aviz priv_type AuthNoPriv access RO auth 
      HMAC-SHA-2            
      MD5                   
      SHA                   
    pbnoscli(config)# snmp-server user aviz priv_type AuthNoPriv access RO auth md
    pbnoscli(config)# snmp-server user aviz priv_type AuthNoPriv access RO auth MD5 
      auth-password         
    pbnoscli(config)# snmp-server user aviz priv_type AuthNoPriv access RO auth MD5 auth-password 
      <auth_password>       Auth Password length 8 to 64       
    pbnoscli(config)# snmp-server user aviz priv_type AuthNoPriv access RO auth MD5 auth-password password 
      <cr>
    pbnoscli(config)# snmp-server user aviz priv_type AuthNoPriv access RO auth MD5 auth-password password 
    pbnoscli(config)# 
    
    
    pbnoscli(config)# no snmp-server user aviz
    pbnoscli(config)#