Showing posts with label vrrp. Show all posts
Showing posts with label vrrp. Show all posts

Sunday, November 2, 2008

VRRP - Tracking the metric of a route

R5 and R6 are configured for VRRP on a LAN. R5 is to be the master unless its route to 172.30.21.0/24 disappears or its metric increases.

Here is the basic VRRP config on R5:

interface FastEthernet0/0
ip address 172.30.200.5 255.255.255.0
vrrp 1 ip 172.30.200.1
vrrp 1 priority 105
vrrp 1 authentication ipexpert

Now we need to figure out the metric threshold for the network we are tracking. Let's find our metric first:

IPeR5#show ip route 172.30.21.0 | in metric
Known via "ospf 1", distance 80, metric 65, type inter area
Advertised by eigrp 1 metric 1 1 1 1 1 route-map OSPF2EIGRP
Route metric is 65, traffic share count is 1
IPeR5#


Here we see our metric is 65. This will be our "UP" metric and anything above this will be our down metric. Let's configure the tracking object:

IPeR5(config)#track 2 ip route 172.30.21.0/24 metric threshold
IPeR5(config-track)#threshold metric ?
down Down threshold
up Up threshold
IPeR5(config-track)#threshold metric up 65 down 66
IPeR5(config-track)#int f0/0
IPeR5(config-if)#vrrp 1 track 2


Now let's check the state of our tracked object:

IPeR5#show track 2
Track 2
IP route 172.30.21.0 255.255.255.0 metric threshold
Metric threshold is Up (OSPF/65/65)
8 changes, last change 00:02:04
Metric threshold down 66 up 65
First-hop interface is Serial0/1/0
Tracked by:
VRRP FastEthernet0/0 1
IPeR5#


Let's increase our metric to 66. The route is learned via OSPF on inerface serial 0/1/0 so it is easy to change:

IPeR5(config)#interface s0/1/0
IPeR5(config-if)#ip ospf cost 65
IPeR5#
*Nov 2 22:59:35.437: %VRRP-6-STATECHANGE: Fa0/0 Grp 1 state Master -> Backup
IPeR5#


Notice we are back up now...what is the state of our tracked object?

IPeR5#show track 2
Track 2
IP route 172.30.21.0 255.255.255.0 metric threshold
Metric threshold is Down (OSPF/66/66)
9 changes, last change 00:00:42
Metric threshold down 66 up 65
First-hop interface is Serial0/1/0
Tracked by:
VRRP FastEthernet0/0 1
IPeR5#


It is DOWN! Let's bring it up:

IPeR5(config-if)#ip ospf cost 64
IPeR5(config-if)#^Z
*Nov 2 23:01:05.029: %VRRP-6-STATECHANGE: Fa0/0 Grp 1 state Backup -> Master
IPeR5#


Remember to be patient. The object may take 20-30 seconds to change state after the metric is changed.

Saturday, September 20, 2008

VRRP - SLA tracking

Today I have been doing IPexpert's volume 1 section 14 and 15 labs. Section 15 has to do with router redundancy, namely HSRP, VRRP and GLBP. I ran into a tracking issue that stumped for a short time but I thought it would be wise to document it.

The task states that R2 should be master unless its ping time to 150.100.220.7 exceeds 80ms. So I configure as follows:

track 2 rtr 1
!
ip sla monitor 1
type echo protocol ipIcmpEcho 150.100.220.7
threshold 80

int f1/0
vrrp 1 ip 150.100.12.100
vrrp 1 priority 105
vrrp 1 track 2


Immediately I see this on R2:

*Sep 20 22:18:20.107: %SYS-5-CONFIG_I: Configured from console by conso
*Sep 20 22:18:22.287: %VRRP-6-STATECHANGE: Fa1/0 Grp 1 state Master -> Backup


So I check my ping times:

R2#ping 150.100.220.7

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 150.100.220.7, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/9/12 ms


Way under 80 ms! What gives?

Turns out I never enabled the SLA!!

So I do this:

R2(config)#ip sla monitor schedule 1 start-time now
R2(config)#
*Sep 20 22:20:04.883: %VRRP-6-STATECHANGE: Fa1/0 Grp 1 state Backup -> Master
R2(config)#


I am glad this only took a few minutes to figure out but hopefully if you see this you will recognize the problem.