HSRP and track objec

简介:

HSRP track object is a really cool stuff to modulate behaviour of HSRP.
This kind of object is usually used by means of 'line-protocol' feature. You can change Active Virtual Router, if an upstream interface comes down.
Such as :

DWS1(config)# track 20 interface FastEthernet 1/13 line-protocol 
DWS1(config)# interface fa 1/13
DSW1(config-if)#standby 10 track FastEthernet 1/13 60

If FastEthernet 1/23 comes down. HSRP priority is decremented by 60.



But, you can use track object with condition on routes. Object reacts when it is and is not between some values. These values are scaled because of different kinds of metric. Imagine EIGRP and RIP metrics. It is so different. It is due to this, we seed metric in redistribution and here we scale it to be able to make condition on routes.



Imagine we want to change HSRP state if default route learned from gw becomes lower than 111.


Now imagine (it is purely imagination and not really in production useful, but ...) your serial link is downgraded so your EIGRP metric will downside and your HSRP track object is under 111! Then HSRP state will become 'standby' on R1, and R2 HSRP state will become 'active'.

 
DSW1#sh ip route 0.0.0.0 
Routing entry for 0.0.0.0/0, supernet
  Known via "eigrp 10", distance 170, metric 284160, candidate default path
  Tag 10, type external
  Redistributing via eigrp 10
  Last update from 10.1.4.5 on FastEthernet0/0, 00:40:24 ago
  Routing Descriptor Blocks:
  * 10.1.4.5, from 10.1.4.5, 00:40:24 ago, via FastEthernet0/0
      Route metric is 284160, traffic share count is 1
      Total delay is 10100 microseconds, minimum bandwidth is 100000 Kbit
      Reliability 128/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1
      Route tag 10

And track object is :

DSW1#sh track
Track 10
  IP route 0.0.0.0 0.0.0.0 metric threshold
  Metric threshold is Up (EIGRP/284160/111)
    2 changes, last change 01:01:12
  Metric threshold down 112 up 111
  First-hop interface is FastEthernet0/0
  Tracked by:
    HSRP Vlan10 10

You will ask me : Why 111 ?



This value is due to metric scaling in HSRP track object. EIGRP routes are scaled by means of 2560. It is a default value which can be modofied by :

track resolution

.



So, if you divide 284160 by 2560 : you have 111 !



R1 HSRP state is active. Now, imagine (not production useful and possible) that serial line between 'gw' and 'R1' is downgraded, so EIGRP metric is modified and the value of the track object become lower than 111. So HSRP state become 'standby' and R2 become active on the HSRP group.



The real configurations is :

interface Vlan10
 ip address 10.2.1.1 255.255.255.0
 ip helper-address 10.1.4.5
 standby 10 ip 10.2.1.254
 standby 10 priority 150
 standby 10 preempt
 standby 10 track 10 decrement 60
!
track 10 ip route 0.0.0.0 0.0.0.0 metric threshold
 threshold metric up 111 down 112

It is a great stuff. I like it.





本文转自 tiger506 51CTO博客,原文链接:http://blog.51cto.com/tiger506/510446,如需转载请自行联系原作者

目录
相关文章
|
7月前
|
运维 监控 网络协议
OSPF Hello和Dead间隔是什么
OSPF的Hello和Dead间隔是维护邻居关系的关键。Hello间隔定义了发送Hello报文的频率,用于发现和保持邻居关系,而Dead间隔是未收到来自邻居Hello报文后判定其失效的等待时间,通常是Hello间隔的四倍。配置不一致可能导致邻居关系失败。在Cisco IOS设备上,可使用示例代码修改间隔,并通过`show ip ospf interface`命令验证配置。了解和正确调整这些间隔对网络稳定性至关重要。
|
7月前
|
网络协议 网络安全 数据库
DHCP的interface(接口),global(全局)配置以及DHCP relay(中继),DHCP snooping,DHCP option
DHCP的interface(接口),global(全局)配置以及DHCP relay(中继),DHCP snooping,DHCP option
163 0
|
7月前
|
网络协议
network的使用(DHCP,BGP,OSPF,RIP使用network的异同)
network的使用(DHCP,BGP,OSPF,RIP使用network的异同)
110 0
|
缓存 安全 数据安全/隐私保护
PCIe组播介绍(Multicast Operations)
PCIe组播介绍(Multicast Operations)
878 0
PCIe组播介绍(Multicast Operations)
手动为网络接口设置 MTU 大小
http://support.microsoft.com/kb/900926 手动为网络接口设置 MTU 大小 如果手动为某个网络接口设置 MTU 大小,则该设置会覆盖此网络接口的默认 MTU。
944 0
|
网络协议 网络架构
TP-LINK路由器如何设置DHCP
TP-LINK路由器如何设置DHCP
2258 0
TP-LINK路由器如何设置DHCP