How to use a ping test of upstream device (more than 1 hop away) to change default route

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
Using Summit x690s XOS 22.  No dynamic routing protocols.  Want to change the default route on the switch if a ping test to an upstream router fails.  The upstream router is more than one hop away so cannot use the flow redirect.
Photo of Tim Kimball

Tim Kimball

  • 80 Points 75 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of Karthik Mohandoss

Karthik Mohandoss, Employee

  • 6,168 Points 5k badge 2x thumb
Hi Tim,

Please check if this helps. 

configure iproute add [default | ipv4_or_ipv6_network] gateway
{protection [bfd | ping | none]}


Usage Guidelines
For static routes configured with protection type ping, static routes are initially down. Static routes
become "up" for each configured gateway/device IP when a timely ICMP Echo Reply is received from
that IP within the configured ping interval. Static routes transition from up to down when no timely
reply is received for the configured number of missed intervals. Severely delayed ICMP Echo Replies are
ignored if received after the configured interval time elapses, because a new ICMP Echo Request has
already been sent. Static routes with ping protection need not be ECMP routes. Thus when a device is
unresponsive, a different route with a higher cost or shorter prefix length can route packets elsewhere.


This command was first available in ExtremeXOS 22.1.
Photo of Tim Kimball

Tim Kimball

  • 80 Points 75 badge 2x thumb
This only works to test the default gateway IP to see if it is up.  We need to test a few hops away.
Thanks
Photo of Grosjean, Stephane

Grosjean, Stephane, Employee

  • 13,676 Points 10k badge 2x thumb
Hi,

I usually do this via a script, executed by a UPM timer. You ping whatever (group of) remote IP(s), add whatever weight for each and do what is needed (change the default, add/remove a PBR, etc).