Allied Telesis Support Portal

What is Ping Polling and how is it configured

What is Ping Polling and how is it configured?

Introduction

Ping polling lets your device regularly check whether it can reach other hosts on a network. It works by sending ICMP Echo Requests to a host and waiting for replies sent back. If ping polling indicates that a host’s status has changed, then your device can respond to the new status. When a host is unreachable, ping polling continues monitoring the host’s reachability.

You can configure triggers to activate when ping polling determines that the state of connectivity to the host has changed. For example, you could configure a trigger to run a script that opens and configures an alternative link if the host at the other end of a preferred link becomes unavailable. You could then configure a second trigger to run a script that automatically returns traffic to the preferred  link as soon as it is available again.

By default, a polling instance sends a ping every 30 seconds as long as it is receiving replies. The frequency of this polling is controlled by the normal-interval command. When a reply is not received, the polling instance increases the frequency at which it polls the device. This frequency is controlled by the critical-interval command, and by default, is set to send a packet every one second. It maintains this higher rate of polling until it has received sufficient consecutive replies.

Configuring Ping Polling

The Ping Polling feature in AlliedWare Plus allows you to easily configure polling instances with a minimum of commands. To configure a ping poll instance suitable for most network situations:
  • Create a polling instance by using the command:
awplus(config)#ping-poll <1-100>
The range <1-100> identifies the polling instance in the trigger commands and in other ping poll commands. Your device can poll up to 100 IP addresses at once.
  • Set the IP address of the device you are polling by using the command:
awplus(config-ping-poll)#ip {<ip-address>|<ipv6-address>}
  • Enable the polling instance by using the command:
awplus(config-ping-poll)#active
  •  If desired, set an optional description to identify the polling instance, by using the command:
awplus(config-ping-poll)#description <description>

You do not need to configure any other commands for most networks, because convenient defaults exist for all other ping poll settings. The following table summarizes the default configuration created.

Ping Poll defaults

Options available when configuring a Polling Instance

When creating a polling instance, There are several parameters that can be used to tailor this feature to meet your needs. Some of the parameters that can be configured include Packet size, polling frequency, and response timeout.

  

Ping Polling Trigger & Script Example

In this example, we are using a normal ('primary') WAN connection, and a redundant 'secondary' connection, that we wish to keep disabled in normal operation

The steps below describes how to use a ping-poll to monitor the state of the primary IP connection, and have the corresponding 'down' and 'up' ping-poll triggers to run scripts that enable and disable the secondary connection respectively.
Ping-Poll Example
  1. Create the down and up trigger scripts.
The scripts should be created in the built-in editor, or loaded onto the switch/router. Note the default routes and their respective administrative distances (shown in bold).
down.scp

enable
conf t
ip route 0.0.0.0/0 10.17.92.254 255
ip route 0.0.0.0/0 10.17.39.1 1
int port1.0.2
no shutdown
------------------------------------------------
up.scp

enable
conf t
ip route 0.0.0.0/0 10.17.92.254 1
ip route 0.0.0.0/0 10.17.39.1 255
int port1.0.2
shutdown
  1. Configure the VLANs and assign IP addresses to them.
This this configuration, VLAN1 is the primary IP connection and VLAN2 is the backup IP connection.
awplus(config)#interface vlan1
awplus(config-if)#ip address 10.17.92.13/24
awplus(config)#interface vlan2
awplus(config-if)#ip address 10.17.39.138/24
  1. Assign the VLANs to the ports (port 1.0.1 is already in VLAN1 by default) and disable the backup connection.
awplus(config)#interface port1.0.2
awplus(config-if)#switchport access vlan2
awplus(config-if)#shutdown
  1. Now create static default routes towards both connection gateways.
Note the administrative distances that have been assigned to properly weight the routing process to prefer the the primary connection when available.
awplus(config)#ip route 0.0.0.0/0 10.17.92.254 1
awplus(config)#ip route 0.0.0.0/0 10.17.39.1 255
  1. Create and Activate the ping-poll to monitor the primary connection
awplus(config)#ping-poll 1
awplus(config-ping-poll)#ip 10.17.92.253
awplus(config-ping-poll)#active
  1. Add and Enable the up/down triggers to invoke the scripts.
awplus(config)#trigger 1
awplus(config-trigger)#type ping-poll 1 down
awplus(config-trigger)#script 1 down.scp
awplus(config-trigger)#active

awplus(config-trigger)#trigger 2
awplus(config-trigger)#type ping-poll 1 up
awplus(config-trigger)#script 1 up.scp
awplus(config-trigger)#active


Useful show commands:

Two commands used to monitor your Ping-polling instances are "show trigger counter" and "show counter ping-poll as show below:
  • Show Trigger counter
awplus#show trigger counter
Trigger Module Counters
-------------------------------------------------------
Trigger activations 3
Last trigger activated 2
Time triggers activated today 0
Periodic triggers activated today 0
Interface triggers activated today 0
Resource triggers activated today 0
Reboot triggers activated today 0
Ping-poll triggers activated today 3
Card event triggers activated today 0
Stack master fail triggers activated today 0
Stack member triggers activated today 0
Stack link triggers activated today 0
ATMF node triggers activated today 0
-------------------------------------------------------
  • Show counter ping-poll
awplus#show counter ping-poll
Ping-polling counters
Ping-poll: 1
PingsSent ......... 2481
PingsFailedUpState ......... 10
PingsFailedDownState ......... 2251
ErrorSendingPing ......... 0
CurrentUpCount ......... 125
CurrentFailCount ......... 0
UpStateEntered ......... 3
DownStateEntered ......... 2