HSRP
In HSRP version 1, millisecond timer values are not advertised or learned, HSRP version 2 advertises and learns millisecond timers. This change ensures stability in the groups in all cases.
Version 1 Group Numbers: 0-255
Version 2 Group Numbers: 0-4095
For example,HSRPv1 MAC address range will be used, 0000.0C07.ACxx, where xx = 000-FFF (0-255).
For example,HSRPv2 MAC address range will be used, 0000.0C9F.Fyyy, where yyy = 000-FFF (0-4095).
Version 1 Multicast Address: 224.0.0.2
Version 2 Multicast Address: 224.0.0.102
Version 2 Packet Format: Includes 6-byte identifier field that is used to uniquely identify the sender of the message. Typically, this field is populated with the interface MAC address. This improves troubleshooting network loops and configuration errors.
Version 2: Allows for IPV6 support.
HSRP version 2 has a different packet format than HSRP version 1. The packet format uses a type-length-value (TLV) format. HSRP version 2 packets received by an HSRP version 1 router will have the type field mapped to the version field by HSRP version 1, and subsequently ignored.
A new command will allow changing of the HSRP version on a per-interface level standby version [1, 2]. Note that HSRP version 2 will not inter operate with HSRP version 1. However, the different versions can be run on different physical interfaces of the same router.
HSRP defines a standby group of routers, with one router as the active one.
Provides gateway redundancy by sharing IP and MAC addresses between redundant gateways.
Consists of virtual MAC and IP addresses that are shared between two routers that belong to the same HSRP group.
Active Router - Currently forwarding packets to the virtual router.
Standby Router - Primary backup router.
Standby Group - Set of routers participating in HSRP that jointly emulate a virtual router.
Configuration
standby group-number ip ip-address
Active & Standby Routers
Active Router
- Responds to ARP requests of the default gateway with the MAC address of the virtual router.
- Assumes the act of forwarding packets to the virtual router.
- Sends hello messages.
- Knows the virtual router's IP address.
- Listens for periodic hello messages.
- Assumes the act of forwarding packets if no messages are heard from the active router.
HSRP States
Initial - State at the start. After a configuration change when the interface comes up.
Listen - The router knows the virtual ip address. Listens for hello messages.
Speak - (has virtual IP addresses) Sends hello messages and actively participates in the election.
Standby - It is a candidate to become the next active router and sends hello messages.
Active - Currently for forwards packets that are sent to the group virtual MAC address.
Each router has a default priority of 100. The router with the highest IP address is elected as the active router with the default priority.
Highest Priority, then highest IP address.
Config
standby group-number priority priority-value
standby group-number preempt delay
standby group-number timers hello-time hold-time
Hello Time - Default is 3 seconds. Hello interval.
Hold Time - Default is 10 seconds. Time before active / standby is declared down.
Config
standby 10 preempt
standby 10 preempt delay minimum 300
VRRP
Active router referred to as the master virtual router.
Selection of master virtual virtual router.
- Real IP address.
- Virtual IP address.
- The router with the highest priority.
- The master uses VRRP messages to inform group members.
Three Timers
- Advertisement interval (Default = 1 sec)
- Master down interval. Default: 3 x Advertisement + Skew. (Default = skew + 1)
- Skew time. (256-priority/256)ms
VRRP Transition Times
Router A (Master) is sending advertisements by default every 1 second.
Router A fails -> Advertisements stop.
Router B & Router C stop receiving advertisements and wait for their respective master down interval to expire before transitioning to master state.
Skew is inversely proportional to priority, so master down of Router B is less than that Router C.Router B & Router C stop receiving advertisements and wait for their respective master down interval to expire before transitioning to master state.
Router B skew time (256-200/256) = 0.2 sec.
Router C skew time (256-100/256) = 0.6 sec.
Router B transitions to master after 3.2 seconds. (master down + skew)
Router C receives the advertisement from the new master, so it resets its master down interval and remains in the backup state.
VRRP Commands
vrrp group-number ip virtual-gateway-addressvrrp group-number priority priority-value
vrrp group-number timers advertise timer-value (on master router)
vrrp group-number ip timers learn (on non-master routers)
GLBP
Allows full use of resources on all devices without the administrative burden of creating groups.
Provides one virtual ip address and many virtual mac addresses.
Routes to a single gateway distributed across routers.
Provides automatic re-routing in the event of any failure.
HSRP vs. GLBP
Cisco Proprietary - 1994 Cisco Proprietary - 2005
16 Groups max 1024 Groups max
One active, one standby, several candidates One AVG, several AVFs
AVG load balances traffic among AVFs.
Virtual IP diff from active & standby real IP. Virtual ip diff from AVG & AVF real IP.
One virtual mac per group. One virtual mac per AVG/AVF per group.
224.0.0.2 224.0.0.102
Track int/obj. Track obj.
Default timers: 3/10 Default timers: 3/10
Auth supported. Auth supported.
GLBP Functions
Load sharing.
- Multiple virtual routers.
- Up to 1024 [GLBP Groups] on each physical interface of a router and up to 4 virtual forwarders per group.
- Pre-emption
- Pre-empt an AVG with a higher priority backup virtual gateway.
- Efficient resource utilization.
- Any router can serve as a backup.
- All available routers can support traffic.
Operational Modes for Load balancing
- Weighted load-balancing algorithm
- Amount of load is dependent of the weighting value.
- Host-Dependent load-balancing algorithm
- Host guaranteed use of same virtual mac address.
- Round-Robin load-balancing algorithm
- Reply to each client arp request contains the mac of the next router in round robin fashion.
GLBP weighting is used to determine whether a router can act as a virtual router.
- GLBP- Two thresholds are defined.
- One lower threshold that applies when the router loses weight.
- One upper threshold that applies when the router gains weight.
glbp group-number ip virtual gateway-address
glbp group-number priority priority-value
glbp group-number ip timers hello-value holdtime-value
vrrp group-number priority priority-value
vrrp group-number timers advertise timer-value (on master router)
vrrp group-number ip timers learn (on non-master routers)
VRRP Commands
vrrp group-number ip virtual-gateway-addressvrrp group-number priority priority-value
vrrp group-number timers advertise timer-value (on master router)
vrrp group-number ip timers learn (on non-master routers)