Path MonitoringΒΆ

The tracker service provides helpers to monitor the availability of IP addresses, using ICMP echo requests.

In the following example, the router has two links to reach the server: the main link and the backup link. Trackers can be used to monitor the availability of the server through both links, and configure static routing accordingly. An higher priority is assigned to the main link, using the distance parameter in the static routing context.

../../../../_images/tracker.svg

This can be configured as below:

vrouter running config# / tracker
vrouter running tracker# icmp main vrf main address 10.100.0.1 gateway 10.10.0.254 source 10.10.0.1
vrouter running tracker# icmp backup vrf main address 10.100.0.1 gateway 10.20.0.254 source 10.20.0.1
vrouter running tracker# / vrf main routing static
vrouter running static# ipv4-route 10.100.0.0/16
vrouter running ipv4-route 10.100.0.0/16#! next-hop 10.10.0.254 track main distance 1
vrouter running ipv4-route 10.100.0.0/16# next-hop 10.20.0.254 track backup distance 2

To display the trackers state:

vrouter running config# / tracker
vrouter running tracker# show state
tracker
    icmp main address 10.100.0.1 vrf main source 10.10.0.1 gateway 10.10.0.254 period 500 threshold 1 total 1 discriminator 583249321 state down diagnostic timeout type icmp-echo
    icmp backup address 10.100.0.1 vrf main source 10.20.0.1 gateway 10.20.0.254 period 500 threshold 1 total 1 discriminator 489368122 state up diagnostic ok type icmp-echo
    ..

The same configuration can be made using this NETCONF XML configuration:

ubuntu1804 running config# show config xml
<config xmlns="urn:6wind:vrouter">
  <tracker xmlns="urn:6wind:vrouter/tracker">
    <icmp xmlns="urn:6wind:vrouter/tracker/icmp">
      <name>main</name>
      <vrf>main</vrf>
      <address>10.100.0.1</address>
      <gateway>10.10.0.254</gateway>
      <source>10.10.0.1</source>
      <period>500</period>
      <threshold>5</threshold>
      <total>10</total>
      <packet-size>100</packet-size>
      <packet-tos>192</packet-tos>
      <timeout>500</timeout>
    </icmp>
    <icmp xmlns="urn:6wind:vrouter/tracker/icmp">
      <name>backup</name>
      <vrf>main</vrf>
      <address>10.100.0.1</address>
      <gateway>10.20.0.254</gateway>
      <source>10.20.0.1</source>
      <period>500</period>
      <threshold>5</threshold>
      <total>10</total>
      <packet-size>100</packet-size>
      <packet-tos>192</packet-tos>
      <timeout>500</timeout>
    </icmp>
  </tracker>
  <vrf>
    <name>main</name>
    <routing xmlns="urn:6wind:vrouter/routing">
      <static>
        <ipv4-route>
          <destination>10.100.0.0/16</destination>
          <next-hop>
            <next-hop>10.10.0.254</next-hop>
            <track>main</track>
            <distance>1</distance>
          </next-hop>
          <next-hop>
            <next-hop>10.20.0.254</next-hop>
            <track>backup</track>
            <distance>2</distance>
          </next-hop>
        </ipv4-route>
      </static>
    </routing>
    <network-stack xmlns="urn:6wind:vrouter/system">
      <icmp/>
      <ipv4/>
      <ipv6/>
      <neighbor/>
      <conntrack/>
    </network-stack>
    <interface xmlns="urn:6wind:vrouter/interface"/>
    <logging xmlns="urn:6wind:vrouter/logging"/>
  </vrf>
</config>