Automatic Reloading of a Hanging Router that Is Connected to NetPing 2/PWR-220 v3/ETH Power Distribution Unit

  • Published In: Tutorial
  • Created Date: 2018-08-09
  • Hits: 51

Devices for remote controlling of power supply NetPing (IP power distribution unit) can control a status of network equipment connected to them and reboot the power supply of the equipment when necessary.

In this article, the example of configuring the automatic reboot of a router connected to a NetPing 2/PWR-220 v3/ETH IP power distribution (IP PDU) unit when the Internet connection fails will be examined.

On the picture above, an approximate interaction scheme is represented: a network router with the Internet access is powered from a PWR1 socket that is controlled by a NetPing IP PDU. To test a network connection status, a NetPing IP PDU sends specific requests in the ICMP format to network resources specified in the settings. As soon as the access to the requested resources fails (i.e. they stop responding to ping), a NetPing IP PDU reboots the power supply of a router.

To implement such a scheme, there is a need to have:

Configuring the "Watchdog" Mode

Connect a router and a NetPing 2/PWR-220 v3/ETH power distribution unit using the Ethernet cable, connect a router to the power supply through the PWR1 socket and go to configuring a NetPing IP PDU through a web interface. (On default, a web interface address is 192.168.0.100, login: visor, password: ping.  

  • The tab of a web interface "Settings" - at the tab, we are most interested in "Network Settings". Ad a public DNS server from Google and specify a correct network gateway for the access of a NetPing IP PDU to external network resources. (Picture 2):
    Network configurations of a NetPing power distribution unit

  • The tab "Relays" - as soon as a router is connected in PWR1, we switch the control mode of the Relay1 to the "Watchdog" and write "Router" in the memo of a channel (Picture 3):
    Configuring a relay mode of a NetPing power distribution unit

  • The tab "Watchdog" - all primary settings of the Watchdog mode are set using this tab, therefore let's consider each point in more details (Picture 4):
    Configuring the Watchdog of a NetPing power distribution unit

    • Memo (up to 30 chars) - this parameter is set at the tab "Relays", we have already labeled Channel1 as "Router";

    • Polling of Address A,B,C - here we check the checkbox for the accessibility of the resources that we want to test (from one to three) and specify addresses of these resources. In our case, a NetPing device will test the accessibility of a public DNS server from Google, a domain name ya.ru and one internal IP address from our sub network;

    • Reset Counter (cleared on firmware reboot) - shows how many times the channel has been reset as a result of the operation of the mode "Watchdog". A reset counter is zeroed when a NetPing device is rebooted;

    • Ping Polling Period, s (10-300) - is a time interval between sending pings after receiving a response from the address. Too little interval will create the unnecessary load for the network, therefore the maximal 300 seconds are set here;

    • Ping Timeout, ms (600-9000) - to avoid false triggering of the Watchdog because of the delays in responses from addresses, this parameter should be set with a certain reserve (let's say, a regular time of responding of the resource х2);

    • Max Ping Repeats after Timeout - is a maximum number of attempts to receive a response from a single address. After this number is exceeded, the IP address will be considered unavailable. It is also desirable so that a ping polling period exceeds a ping timeout multiplied by a maximum number of attempts. If this condition is not fulfilled, then a new polling cycle will be postponed until a specified number of attempts is over;

    • Reset Duration, s (1-900) - for how many seconds the power supply of the channel will be switched off;

    • Ping Polling Pause after Reset, s (1-3600) - is the time during which the resources will not be checked after rebooting the load. Theoretically, a router may need several minutes to completely reboot and switch on, therefore specify time with a reserve here;

    • Limit Number of Reset Retries (0 off, 1-255) - how many consequent resets a device will undergo before the testing is disabled. "0" here will remove the limit for the number of resets;

    • Reset Polarity: Switch Relay On / Switch Relay Off - what exactly must be performed when conditions for the reset are fulfilled (switch a relay on or off);

    • Reset Condition Logic - determines the case when a router will be rebooted. In our case, a suitable variant is "no replay from any of Address (A,B,C)". This is will ensure the absence of false triggering (for example, when one of the tested addresses is simply unavailable, but a router is not frozen)

Let examine how to estimate a reaction time and logic of the system behavior in more details. Let's take the parameters with the next values:

  • Ping Polling Period, s (10-300) - 300
  • Ping Timeout, ms (600-9000) - 9000
  • Max Ping Repeats after Timeout - 10
  • Reset duration, s (1-900) - 5
  • Ping Polling Pause after Reset, s - 300
  • Reset Condition Logic - when the mode "Watchdog" is activated, the next things happen - polling of all addresses simultaneously is initiated, and when the polling is over (with a response or a timeout), the reset logic is applied to the results of the polling. It has four operation modes: 1) any of addresses A, B or C did not respond; 2) all addresses under polling did not respond; 3) address A didn't respond and one of B or C didn't respond either; 4) address A did not respond but B or C responded.

It is possible to use the tab "Log" of a web interface to see if the load was reset and estimate the reaction time with specified parameters. In our example, Log looks the next way (Picture 5):

Log of a NetPing power distribution unit

As far as we can see from the log, a relay switched off following the delays specified in the settings (>90 sec. [10 repeats at the timeout of * 9 seconds before repeating ping] an attempt to get a response for ping  -> and in 5 sec. for the reset -> 300 seconds of the pause after the reset + 90 sec. attempt to get a response -> 5 sec. for the reset). After achieving a maximum number of resets the relays stopped switching off, and after receiving the response from the server the mode “Watchdog” was activated enough.

The timing diagram of the operation of the Watchdog in NetPing 2PWR-220 v3ETH power distribution unit

A device for controlling the power supply NetPing 2/PWR-220 v3/ETH configured in this way, will follow the status of a network connection and reboot router when specified and at the inaccessibility of the resources specified for testing.


comments powered by Disqus