Sunday, January 19, 2020

HSRP

Router redundancy         (Hot Spare Router Protocol below)

1. Simple Layer 3 Redundancy: (R1 perspective)

Static route to SP1:
ip route 0.0.0.0 0.0.0.0 203.0.113.1

If link to SP1 is down, backup defalult static route via R2:
ip route 0.0.0.0 0.0.0.0 10.10.20.2 5

(5) set Administrative Distance to 5 so as not to load balance traffic

If link to CD1 is down, backup route to inside network via R2:
ip route 10.10.10.0 (/24) 10.10.10.20.2

No need to set AD, as this static route's AD by default is 1, and the existing Connected Link has a default  AD of 0 so the Connected route will be preferred automatically. 

Redundancy for the PCs
Setting up half the PCs to default-gateway of R1, and the others to R2 is not preferable, much manual work if a router is not reachable..therefore-

2. FHRP - First Hop Redundancy Protocols
  • These use Virtual IPs and MAC addresses to allow for automated gateway failover.
  • The host uses the VIP as their gateway address, and if a physical gateway fails, another gateway takes over.
  • HSRP is a Cisco proprietary FHRP deployed in active/standby pair.
  • VRRP (Virtual Router Redundancy Protocol) is an open standard, deployed in active/standby pair. Very similar to HSRP.
  • GLBP (Gateway Load Balancing Protocol) is Cisco proprietary and supports active/active load balancing across multiple routers
   _______________________________________________________
  • HSRP: 

    • Routers have unique physical IP and MAC addresses
    • Routers then also have the HSRP VIP and MAC address too
    • When they come online, one is elected as the HSRP active router (holds the VIP and MAC address) and the other in standby
    • The active route then responds to ARP requests and all traffic for the VIP goes through the active router

    • The routers send hello messages to each over their HSRP interface. (R1 sends hello to R2: the source would be 10.10.10.2 and the destination is 10.10.10.3)
    • If the standby router stops receiving hellos it will transition to the active router and take ownership of the VIP and MAC and respond to ARP requests
    • R1(config)# inter gi0/1
    • R1(config-if)# ip address 10.10.10.2  255.255.255.0
    • R1(config-if)# no shut
    • R1(config-if)# standby 1 ip 10.10.10.1

    • R2(config)# inter gi0/1
    • R2(config-if)# ip address 10.10.10.3  255.255.255.0
    • R2(config-if)# no shut
    • R2(config-if)# standby 1 ip 10.10.10.1

    • Verification:  show standby
    • note: the command to show PC ARP table C:\arp -a 

    • HSRP Priority and Pre-emption
    • If Priority is enable, you can define which router will be active if both routers are booted at the same time
    • The default is 100 if not defined, but the higher priority number will win if set
    • In the event of a Priority tie, the hightest IP address wins
    • If Pre-emption is enabled also,  when a higher priority router comes back online after a failure it will transition back to active
    • If pre-emption is not enabled (default), the lower priority router will remain active when the failed router comes back online (this can be more stable if the higher priority router is flapping)
    • R1(config-if)# standby 1 priority 110   (add to above R1 commands)
    • R1(config-if)# standby 1 preempt  
    • R2(config-if)# standby 1 priority 90

    • HSRP version 2 introduces some improvements, however, version 1 is the default. NOTE: both routers must have some version. 
    • R1/R2(config-if)# standby version 2


No comments:

Post a Comment

Spanning Tree