cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1551
Views
10
Helpful
9
Replies

Reboot RV34xx devices with SNMP?

train_wreck
Level 1
Level 1

I haevn't combed through the MIB, which SNMP OID should be used to reboot/reload the RV34x devices?

9 Replies 9

Iliya Gatsev
Cisco Employee
Cisco Employee

Hi, 
My name is Iliya Gatsev from Cisco Technical Support Team.

 

Let me check that.

 

Iliya Gatsev
Cisco STAC Network Engineer
Together we are the human network .:|:.:|:. CISCO

Hello,

 

Is there any update on this matter ?

 

Regards,

 

Romain

nagrajk1969
Spotlight
Spotlight

You will need to use RestAPI/RestConf and/or NETCONF. 

Hello,

 

Thanks for the answer. Actually that's (also) what I have been trying to do all day, but with no success so far...

 

That's probably due to the fact that I could not find any relevant documentation about the needed parameters for restconf restart operations...

 

I found these endoints when I fetch the http//X.X.X.X/restconf/operations:

 

 
<ciscosb-sys:system-reboot xmlns:ciscosb-sys="http://cisco.com/ns/ciscosb/system">/restconf/operations/ciscosb-system:system-reboot</ciscosb-sys:system-reboot>
<sys:system-restart xmlns:sys="urn:ietf:params:xml:ns:yang:ietf-system">/restconf/operations/ietf-system:system-restart</sys:system-restart>
<sys:system-shutdown xmlns:sys="urn:ietf:params:xml:ns:yang:ietf-system">/restconf/operations/ietf-system:system-shutdown</sys:system-shutdown>
 

But when I make a request to either one of them (PUT, PATCH) I get a 405 (method not allowed),

With a POST request all I managed to get so far is a 400 (wrong parameters) with the response bellow:

 

<errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf">
  <error>
    <error-message></error-message>
    <error-path>/ietf-system:system-restart</error-path>
    <error-tag>malformed-message</error-tag>
    <error-type>application</error-type>
  </error>
</errors>

I tried all kinds of body (XML, JSON) and many type of fields (delay, force, which I guessed from googling around ) but none a them made a difference...

 

Do you have any clues ? Did you manage to restart a RV using restconf ?

 

Thanks !

 

Romain

 

 

 

 

I finally got it working using  YangSuite from cisco's github.

 

The parameters needed to trigger the reboot was (IN JSON) :

{
    "system-reboot": [{
        "firmware-state": "active",
        "option": "none"
    }]
}

So in curl format: 

 

curl -L -X POST 'https://X.X.X.X/restconf/operations/ciscosb-system:system-reboot' \
-u "user:password" \
-H 'Content-Type: application/yang-data+json' \
--data-raw '{
    "system-reboot": [{
        "firmware-state": "active",
        "option": "none"
    }]
}'

Thanks anyway  

 

Romain

 

etihaenni
Level 1
Level 1

I am currently working on a manner to reboot my RV160 and RV340 routers using a Raspberry pi as a "internet ping watchdog" and discover the trick to reboot these routers with the SNMP command, it is the following:

snmpset -v 2c -c "set community password" "ip address" 1.3.6.1.4.1.9.6.1.110.2.1.1.0 i 2

I found this command using the "Paessler MIB importer v3" in which I import the "CISCOSB-MODEL-MIB.mib" file which I download from here: https://software.cisco.com/download/home/286315556/type/282465797/release/1.0.1 

The branch is: CISCOSB-MODEL-MIB --> basic mgt --> mgt system reset

Best regards

 

Hi there,

 

My name is Nikola and I'm a Small Business Devices Team member.

 

When trying to reboot RV34xx please use this MIB version:

 

https://software.cisco.com/download/home/286288298/type/282465797/release/1.0.1

 

Regards,

 

 

etihaenni
Level 1
Level 1

Dear Nikola,

Thank you very much for your message. Even if this topic is about the RV34x, I refer to the MIB file of the RV160/260 while I didn't find in the MIB files of the RV34x the OID to set a reboot. By chance it's the same OID for RV160/260/340/345

Can you please tell me in which MIB file dedicated to the RV34x you mention above I can find the reboot OID?
As for the RV160/260, there is a lot of MIB files in the downloaded zip, but I didn't find a "CISCOSB-MODEL-MIB.mib" file in the zip file dedicated to the RV34x.

Kind regards

train_wreck
Level 1
Level 1

Hey good find, thanks for sharing.