< Free Open Study > |
HSRP Overview and ConfigurationHSRP uses the exchange of multicast messages to communicate a configured priority with other routers in the same standby group . The priority defines which router will be the primary and which router(s) will be secondary in the group. The default priority is 100; the router with the highest priority will be the primary for the group. If the priorities are the same, the first router up becomes the primary. Any prioritization is then based on the IP address. If a new router (at the same priority) joins, it doesn't bump the current primary router, even if its IP address is higher; however, it can bump the current standby router. If priorities are different, a new router joining with a higher priority becomes active, even if preemption is not configured; however, if the router is already up and its priority changes (because of tracking or reconfiguration), it won't bump the primary without preemption configured. HSRP uses three types of multicast messages to exchange standby group information:
To configure HSRP, use the following guidelines:
NOTE HSRP requires a routing protocol that converges rapidly , such as EIGRP or OSPF, to transport packets without interruption. HSRP is designed to reroute packets upon router or link failure without any retransmissions or drops occurring. For this to happen, the router must be capable of converging quickly during a failure. Configuring HSRP Between RoutersUsing Figure 16-1 as an example, you will configure HSRP between the routers caladan and giedi prime. In this scenario, multiple IP clients reside on the Ethernet segment of 172.16.1.0/24. All the TCP/IP clients need access to arakasarakas for access to the Internet; caladan and giedi prime have access to arakas through the Frame Relay network. To exchange routing information, all routers are running EIGRP as the routing process. HSRP will provide the IP clients with uninterrupted access to arakas. To accomplish this, caladan is selected as the primary router, and giedi prime is the secondary router. You will use 172.16.1.1 as the virtual IP address between the two routers. Because the ultimate destination of the clients is arakas, you should track on the serial interfaces. By tracking on the serial interface, you can force giedi prime to become the primary if the link to arakas fails. NOTE When tracking is used, two potential situations can cause giedi prime to become the primary router. One is a loss of the connection to caladan, such as physical loss to the Ethernet port on caladan. The second situation involves the loss of physical connectivity between arakas and caladan, causing the serial interface on caladan to drop. First, you will configure caladan. To do so, you need to add a standby group to the E0 interface. You already know that caladan is going to be the primary, so you will need a priority greater than 100; for this example, use 105. You also want to track on the serial interface. The default tracking cost is 10, so if the caladan router looses its serial link, it will have an HSRP cost of 95. Make note of this value because you need to configure the priority of giedi prime to be greater then 95 but less then 105. Example 16-1 demonstrates the configuration of caladan. Example 16-1 Configuring HSRP on the Primary Routercaladan(config)# interface ethernet 0 caladan(config-if)# standby 1 ip 172.16.1.1 caladan(config-if)# standby 1 priority 105 caladan(config-if)# standby 1 preempt caladan(config-if) #standby 1 track s0 When a member of an HSRP group goes from the standby state to the active state, the following message is generated: 01:10:14: %STANDBY-6-STATECHANGE: Standby: 1: Ethernet0 state Speak -> Standby 01:10:14: %STANDBY-6-STATECHANGE: Standby: 1: Ethernet0 state Standby -> Active To configure giedi_prime, you must set the standby group to be the same as caladan, which is standby group 1. You also must use the same virtual IP address as caladan. The use of the preempt argument will allow giedi prime to become the primary router, if that router's priority exceeds caladan's. Perhaps the most important command is the priority command. On the primary router, you have a priority of 105 and tracking on the serial interface. The priority of the primary router, caladan, will be 95 if it loses its serial interface. Therefore, the priority of the secondary, giedi_prime, needs to be greater then 95. In this example, you will use 101. A value of 101 also provides the router with a higher priority than any new routers that might be added to the network with a default priority of 100. Example 16-2 demonstrates the configuration of giedi prime. Example 16-2 Configuring HSRP on the Secondary Routegiedi_prime(config)# interface ethernet 0 giedi_prime(config-if)# standby 1 ip 172.16.1.1 giedi_prime(config-if)# standby 1 priority 101 giedi_prime(config-if)# standby 1 preempt giedi_prime(config-if)# standby 1 track s0 To verify the functionality of HSRP, use the show standby command. This command shows which router is primary, tells whether it can preempt, and gives the virtual IP and MAC addresses used in that group. Example 16-3 illustrates the show standby command on caladan, the primary router, and giedi prime, the secondary router. Example 16-3 show standby Command Output for the Primary and Secondary Routerscaladan# show standby Ethernet0 - Group 1 Local state is Active, priority 105, may preempt Active=Primary router Hellotime 3 holdtime 10 Next hello sent in 00:00:02.496 Hot standby IP address is 172.16.1.1 configured Virtual IP address Active router is local Standby router is 172.16.1.3 expired Standby virtual mac address is 0000.0c07.ac01 Tracking interface states for 1 interface, 1 up: Up Serial0 caladan# _______________________________________________________________ giedi_prime# show standby Ethernet0 - Group 1 Hellotime 3 holdtime 10 Next hello sent in 00:00:02.540 Hot standby IP address is 172.16.1.1 configured Active router is 172.16.1.2 expires in 00:00:09 Standby router is local Tracking interface states for 1 interface, 1 up: Up Serial0 giedi_prime# To add authentication, simply add the standby 1 authentication password command under the Ethernet interface. Be sure that all routers in the group are authenticating. Example 16-4 shows the configurations in their entirety. Example 16-4 caladanhostname caladan ! <<<text omitted>>> ! interface Ethernet0 ip address 172.16.1.2 255.255.255.0 no ip redirects this is added by the router when standby is enabled no ip directed-broadcast standby 1 priority 105 standby 1 preempt standby authentication cisco cisco is the password and is case sensitive standby 1 ip 172.16.1.1 standby 1 track Serial0 ! interface Serial0 ip address 172.16.10.2 255.255.255.0 no ip directed-broadcast encapsulation frame-relay no ip mroute-cache no fair-queue frame-relay map ip 172.16.10.1 21 broadcast frame-relay map ip 172.16.10.3 21 broadcast ! router eigrp 2001 network 172.16.0.0 ! ________________________________________________________________ hostname giedi_prime ! <<<text omitted>>> ! interface Ethernet0 ip address 172.16.1.3 255.255.255.0 no ip redirects delay 1000000 influence EIGRP, to not load-share standby 1 priority 101 standby 1 preempt standby authentication cisco cisco is the password and is case sensitive standby 1 ip 172.16.1.1 standby 1 track Serial0 ! interface Serial0 ip address 172.16.10.3 255.255.255.0 encapsulation frame-relay no fair-queue frame-relay map ip 172.16.10.1 31 broadcast frame-relay map ip 172.16.10.2 31 broadcast ! router eigrp 2001 network 172.16.0.0 ! |
< Free Open Study > |