Below documentation explains how to enable SNMP agent and trap/inform settings on Versa flex software:
Snmp-server(172.16.10.2)--------------------------------(172.16.10.1)LAN-VR-Branch-box- Agent
1> Login into VD->configuration->Template->edit branch template->
2> Go-to management-services tab-> configuration snmp parameters.
Configuration IP address of the snmp server which will receive the snmp traps and perform polling to the agent.
3> Redeploy the template.
4> Go to device and update the device group configuration.
4> Go to bind data in device configuration and update the _SNMPtargetsource field. Use the interface IP of branch box. I have used vni-0/1 which is
a part of LAN-VR in my lab setup.
Test Configuration from the branch:
==========================
set snmp agent enabled
set snmp agent ip 127.0.0.1
set snmp agent udp-port 161
set snmp agent extra-listen ::1 161
set snmp agent version v1
set snmp agent version v2c
set snmp agent max-message-size 50000
set snmp system contact ""
set snmp system name cpe1
set snmp system location "bangalore, india"
set snmp community versa123 sec-name versa123
set snmp target v1_172.16.10.2 ip 172.16.10.2 <<<<<<<<<< This address has to be SNMP management server IP.
set snmp target v1_172.16.10.2 udp-port 162
set snmp target v1_172.16.10.2 tag [ std_v1_trap ]
set snmp target v1_172.16.10.2 timeout 1500
set snmp target v1_172.16.10.2 retries 3
set snmp target v1_172.16.10.2 v1 sec-name versa123
set snmp target v2_172.16.10.2 ip 172.16.10.2
set snmp target v2_172.16.10.2 udp-port 162
set snmp target v2_172.16.10.2 tag [ std_v2_inform std_v2_trap ]
set snmp target v2_172.16.10.2 timeout 1500
set snmp target v2_172.16.10.2 retries 3
set snmp target v2_172.16.10.2 v2c sec-name versa123
set snmp notify std_v1_trap tag std_v1_trap
set snmp notify std_v1_trap type trap
set snmp notify std_v2_inform tag std_v2_inform
set snmp notify std_v2_inform type inform
set snmp notify std_v2_trap tag std_v2_trap
set snmp notify std_v2_trap type trap
set snmp notify std_v3_inform tag std_v3_inform
set snmp notify std_v3_inform type inform
set snmp notify std_v3_trap tag std_v3_trap
set snmp notify std_v3_trap type trap
set snmp target-source 172.16.10.1 <<<<<<<<<<<<< This should be the interface address on our branch router which will be used
as a source address.
set snmp vacm group access-v1-public-internet member versa123 sec-model [ v1 ]
set snmp vacm group access-v1-public-internet access v1 no-auth-no-priv read-view internet
set snmp vacm group access-v1-public-internet access v1 no-auth-no-priv notify-view internet
set snmp vacm group access-v2c-public-internet member versa123 sec-model [ v2c ]
set snmp vacm group access-v2c-public-internet access v2c no-auth-no-priv read-view internet
set snmp vacm group access-v2c-public-internet access v2c no-auth-no-priv notify-view internet
set snmp vacm view internet subtree 1.2 included
set snmp vacm view internet subtree 1.3 included
set snmp vacm view internet subtree 1.3.6.1 included
The above configuration, in the vacm context, is required to enable access for community "versa123" which was initially defined in the "set snmp community" context.
It's required to configure the local interface, whose ip-address will is to be used for snmp polling (the address that would be used by the snmp poller to poll the snmp mibs on this branch), as an entry in the vnf-manager context as shown below - vni-0/1 has been added to the list of vnf-mgmt-interfaces. You can add any interface (including a loopback interface) whose address would be used for polling the mib on this branch.
admin@xyz-cli(config)% set system vnf-manager vnf-mgmt-interfaces [ vni-0/1.0 tvi-0/9.0 ]
The absence of the above entry would cause snmp requests, initiated by the poller towards the interface address, to timeout on this branch
Below is the snmp inform sent to Snmp server: You can verify the same on branch box under /var/log/versa/confd/snmp.log
24-Aug-2018::08:32:26.265 cpe1 confd[1328]: snmp inform-request reqid=251962746 172.16.10.2:162 (TimeTicks sysUpTime=26305)(OBJECT IDENTIFIER snmpTrapOID=interfaceDown)(OCTET STRING alarmType=interfaceDown)
24-Aug-2018::08:33:23.860 cpe1 confd[1328]: snmp inform-request reqid=251962748 172.16.10.2:162 (TimeTicks sysUpTime=32065)(OBJECT IDENTIFIER snmpTrapOID=interfaceUp)
Interface capture=>
Frame 1: 579 bytes on wire (4632 bits), 579 bytes captured (4632 bits)
Ethernet II, Src: RealtekU_c6:4f:b6 (52:54:00:c6:4f:b6), Dst: RealtekU_1a:50:59 (52:54:00:1a:50:59)
Internet Protocol Version 4, Src: 172.16.10.1, Dst: 172.16.10.2
User Datagram Protocol, Src Port: 55745, Dst Port: 162
Simple Network Management Protocol
version: v2c (1)
community: versa123
data: informRequest (6)
informRequest
request-id: 251962748
error-status: noError (0)
error-index: 0
variable-bindings: 19 items
1.3.6.1.2.1.1.3.0: 32065
Object Name: 1.3.6.1.2.1.1.3.0 (iso.3.6.1.2.1.1.3.0)
Value (Timeticks): 32065
1.3.6.1.6.3.1.1.4.1.0: 1.3.6.1.4.1.42359.2.2.2.1.3.2.1 (iso.3.6.1.4.1.42359.2.2.2.1.3.2.1)
1.3.6.1.4.1.42359.2.2.2.3.1.2.0: 696e746572666163655570
1.3.6.1.4.1.42359.2.2.2.3.1.3.0: 73797374656d
1.3.6.1.4.1.42359.2.2.2.3.1.4.0: 696e746572666163655570
1.3.6.1.4.1.42359.2.2.2.3.1.6.0: <MISSING>
1.3.6.1.4.1.42359.2.2.2.3.1.7.0: 2
1.3.6.1.4.1.42359.2.2.2.3.1.8.0: 5
1.3.6.1.4.1.42359.2.2.2.3.1.9.0: 612
1.3.6.1.4.1.42359.2.2.2.3.1.11.0: 07e20818081f26002d0800
Hope this helps:-)
Regards,
Madhu Uniyal