VRRPv2 interface and route tracking

This post is a followup to my previous post about VRRPv2 and explain simple interface and route tracking conifguration for VRRP.

Why do we need tracking?

In most cases you want check your uplink states to your core routers. Because the VRRP Master should be able to route your traffic into your core and should not be a black hole if your core router fails.

The VRRP configuration gives you two options to achieve this. With interface tracking, you can specify one or more interfaces to track on. This allows you to track for the physical link properties. The other option is route tracking, which allow you to track for a specific route which must be present in your routing-table.  Both options give you the ability to track your uplink states in a more or less simple way.

Interface Tracking

You can add a tracking for one or multiple interfaces. The tracked interface need a priority-cost, which will be substracted from the configured priority if the interface goes down.

vrrpv2_interface_tracking

admin@ROUTER:R2# show
interfaces {
    fe-0/2/1 {
        unit 0 {
            family inet {
                address 10.0.1.3/24 {
                    vrrp-group 1 {
                        virtual-address 10.0.1.1;
                        priority 90;
                        authentication-type md5;
                        authentication-key "$9$NC-wgoaUiHmg4QF/9pu"; ## SECRET-DATA
                        track {
                            interface fe-0/2/3.0 {
                                priority-cost 20;
                            }
                        }
                    }
                }
            }
        }
    }
}

Verify operation:

admin@ROUTER:R2> show vrrp detail
Physical interface: fe-0/2/1, Unit: 0, Address: 10.0.1.3/24
  Index: 102, SNMP ifIndex: 657, VRRP-Traps: disabled
  Interface state: up, Group: 1, State: backup, VRRP Mode: Active
  Priority: 90, Advertisement interval: 1, Authentication type: md5
  Delay threshold: 100, Computed send rate: 0
  Preempt: yes, Accept-data mode: no, VIP count: 1, VIP: 10.0.1.1
  Dead timer: 3.101s, Master priority: 100, Master router: 10.0.1.2
  Virtual router uptime: 00:23:50
  Tracking: enabled
    Current priority: 90, Configured priority: 90
    Priority hold time: disabled
    Interface tracking: enabled, Interface count: 1
      Interface     Int state   Int speed   Incurred priority cost
      fe-0/2/3.0    up               100m                       0
    Route tracking: disabled

admin@ROUTER:R2> edit
Entering configuration mode

[edit]
admin@ROUTER:R2# set interfaces fe-0/2/3 unit 0 disable

[edit]
admin@ROUTER:R2# commit
run sh vrrp decommit complete

[edit]
admin@ROUTER:R2# run show vrrp detail
Physical interface: fe-0/2/1, Unit: 0, Address: 10.0.1.3/24  
Index: 102, SNMP ifIndex: 657, VRRP-Traps: disabled
  Interface state: up, Group: 1, State: backup, VRRP Mode: Active
  Priority: 70, Advertisement interval: 1, Authentication type: md5
  Delay threshold: 100, Computed send rate: 0
  Preempt: yes, Accept-data mode: no, VIP count: 1, VIP: 10.0.1.1
  Dead timer: 3.325s, Master priority: 100, Master router: 10.0.1.2
  Virtual router uptime: 00:24:40
  Tracking: enabled
    Current priority: 70, Configured priority: 90
    Priority hold time: disabled
    Interface tracking: enabled, Interface count: 1
      Interface     Int state   Int speed   Incurred priority cost
      fe-0/2/3.0    down                0                      20
    Route tracking: disabled

[edit]
admin@ROUTER:R2#

Route Tracking

You can add a tracking for one or multiple routes. You must specify the exact prefix and the routing-instance, which is for inet.0 the name “default”.

vrrpv2_route_tracking

admin@ROUTER:R2# show
interfaces {
    fe-0/2/1 {
        unit 0 {
            family inet {
                address 10.0.1.3/24 {
                    vrrp-group 1 {
                        virtual-address 10.0.1.1;
                        priority 90;
                        authentication-type md5;
                        authentication-key "$9$NC-wgoaUiHmg4QF/9pu"; ## SECRET-DATA
                        track {
                            route 20.0.0.0/8 routing-instance default priority-cost 20;
                        }
                    }
                }
            }
        }
    }
}

This example output show you the active route tracking for 20.0.0.0/8. Because the route is not present in inet.0 the priority-cost of 20 will be substracted from the configured priority.

admin@ROUTER:R2# run show vrrp detail
Physical interface: fe-0/2/1, Unit: 0, Address: 10.0.1.3/24
  Index: 102, SNMP ifIndex: 657, VRRP-Traps: disabled
  Interface state: up, Group: 1, State: backup, VRRP Mode: Active
  Priority: 70, Advertisement interval: 1, Authentication type: md5
  Delay threshold: 100, Computed send rate: 0
  Preempt: yes, Accept-data mode: no, VIP count: 1, VIP: 10.0.1.1
  Dead timer: 3.315s, Master priority: 100, Master router: 10.0.1.2
  Virtual router uptime: 00:35:49
  Tracking: enabled
    Current priority: 70, Configured priority: 90
    Priority hold time: disabled
    Interface tracking: disabled
    Route tracking: enabled, Route count: 1
      Route               VRF name     Route state      Priority cost
      20.0.0.0/8          default      down                        20
 
[edit]
admin@ROUTER:R2#

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.