10-04-2023 03:01 AM
I have used the EEM commands to create an OID dynamically for my tunnels to be able to monitor them. The commands are provided by Dan Frey (CISCO EMPLOYEE) where I started a conversation in the community (HERE IS THE LINK TO THE TOPIC)
event manager applet makeOIDs
event timer watchdog time 60
action 010 cli command "enable"
action 020 cli command "show ip int brief | inc Tunnel"
action 030 foreach line "$_cli_result" "\n"
action 040 regexp "(Tunnel[0-9]+)" "$line" match tunnel
action 050 cli command "show int $tunnel | inc destination"
action 060 regexp "Tunnel source ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+), destination ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)" $_cli_result match source destination
action 065 cli command "config ter"
action 070 cli command "snmp mib expression owner $tunnel name source"
action 080 cli command "expression $source"
action 090 cli command "snmp mib expression owner $tunnel name destination"
action 100 cli command "expression $destination"
action 110 cli command "enable"
action 120 cli command "exit"
action 130 cli command "exit"
action 140 end
I am currently facing an issue with SNMP (Simple Network Management Protocol) in my network setup, and I would like to explain the problem in detail to seek your assistance in resolving it.
SNMP Walk Request:
I initiated an SNMP walk request to retrieve information related to a specific OID (Object Identifier) using the following command:
snmpwalk -v 2c -c public -M /usr/share/snmp/mibs/ietf -m +ALL-on 192.168.1.2 iso.3.6.1.2.1.90.1 2> /dev/null
The result I obtained was as follows:
SNMPv2-SMI::mib-2.90.1.2.1.1.3.8.84.117.110.110.101.108.52.48.11.100.101.115.116.105.110.97.116.105.111.110 = STRING: "10.10.160.1"
SNMP Set Request:
Subsequently, I used an SNMP set request to modify the value associated with the same OID. Here is the command I used:
snmpset -v2c -c private 192.168.1.2 mib-2.90.1.2.1.1.3.8.84.117.110.110.101.108.52.48.11.100.101.115.116.105.110.97.116.105.111.110 s "10.10.160.31"
Initial Value Change:
Upon issuing the SNMP set request, the value of the OID changed successfully to "10.10.160.31," which was confirmed by the following snmpget command:
DISMAN-EXPRESSION-MIB::expExpression."Tunnel40"."destination" = STRING: "10.10.160.31"
Reversion of Value:
However, the unexpected issue arises approximately 10 seconds after the successful change. The value of the same OID reverts back to its previous state, "10.10.160.1," as confirmed by the following snmpget command:
snmpget -v2c -c private 192.168.1.2 mib-2.90.1.2.1.1.3.8.84.117.110.110.101.108.52.48.11.100.101.115.116.105.110.97.116.105.111.110
DISMAN-EXPRESSION-MIB::expExpression."Tunnel40"."destination" = STRING: "10.10.160.1"
Could you please help me with that? Why my value is not set?
the tunnel 40's configs are :
unnel40 is up, line protocol is down
Hardware is Tunnel
Internet address is 10.10.120.1/24
MTU 17868 bytes, BW 100 Kbit/sec, DLY 50000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation TUNNEL, loopback not set
Keepalive not set
Tunnel linestate evaluation down - tunnel source interface is down
Tunnel source 10.10.140.1, destination 10.10.160.1
10-04-2023 10:01 AM
Does anyone have an idea about how to solve it ?
+reppp
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide