3-redundancy protocol-HSRP Configuration on Cisco IOS

  In this section we will do an HSRP configuration to understand the issue better. To do this we will use the below the topology [t'pld]. At the end ofthis article, you will find the GNS3 configuration lab of this lesson.


wKiom1YDmTbjLqBUAADHgMkUhS8598.jpg



  Before the HSRP configuration, we must prepare our topology.We will change the router names and we will assign the IP address of the routerinterfaces.

For the left side of topology, we will use 10.10.10.0/24 network, and for the right side, we will use 10.10.20.0/24 network. All the interfaces connected to the layer 2 switch will be assigned with the IP address related to its connected port. For example the fa0/0 interface of the site 1 router will be assigned the IP address 10.10.10.1 and GW1’s and GW2’s fa0/0 IP address will be 10.10.10.2 and 10.10.10.3 orderly  ['d()l].

   After interface configuration, we will configure a static route on each Site 1 and Site2. In this static route we will use two virtual IP address that we will explain in this article.This virtual address will be 10.10.10.10 and 10.10.20.20.


Site1(config)#ip route 10.10.20.0 255.255.255.0 10.10.10.10

site2(config)#ip route 10.10.10.0 255.255.255.0 10.10.20.20


Now our configuration is ready to HSRP configuration. Let’s start on side (left) on GW1 and GW2 and after that we will configure a second HSRP configuration for the other side (right)

GW1

 

GW1(config)#interface fa0/0

GW1(config-if)#standby 1 ip 10.10.10.10

GW1(config-if)#standby 1 preempt

GW1(config-if)#standby 1 priority 110

GW1(config-if)#standby 1 track fa0/1

GW1(config-if)#exit

 

 

GW1(config)#interface fa0/1

GW1(config-if)#standby 1 ip 10.10.20.20

GW1(config-if)#standby 1 preempt

GW1(config-if)#exit

 

GW2

GW2(config)#interface fa0/0

GW2(config-if)#standby 1 ip 10.10.10.10

GW2(config-if)#standby 1 preempt

GW2(config-if)#standby 1 priority 100

GW2(config-if)#standby 1 track fa0/1

GW2(config-if)#exit

 

GW2(config)#interface fa0/1

GW2(config-if)#standby 1 ip 10.10.20.20

GW2(config-if)#standby 1 preempt

GW2(config-if)#exit

 

You do not need to do this configuration for both sides, but in this configuration, we do it for both sites. After this you can check the configuration with”show standby “command on GW1 and GW2. As you see below, for both redundancy configuration GW1 is the active router and the GW2 is the standby


wKiom1YDmkDzbgemAAIXEGJ92do442.jpg

wKioL1YDmkPjYQv1AAHuxBKPQCg549.jpg

To check that traffic from site 1 to site2 is preferring the GW1 while it is active, do traceroute from Site1. As you can see below the nexthop will be GW1.

wKioL1YDmoXgiKQRAACTTSW9hIc744.jpg

And like the same, when you start traceroute from Site 2 to Site1, the traffic will choose the GW1 again, because for this redundancy session, the active router is GW1 again.

wKioL1YDmyewEHXIAACdK0tmKy0895.jpg

When we administratively shoutdown the fa0/0 interface of GW1 for test, we see that GW2 become active become active by a console message and after that when we check the status, we see that it is active like below.

wKiom1YDm1WCWJHaAAJBAqtm2Rg662.jpg

Lastly, when we start traceroute from site1 to site2 then we realize that the traffic is no longer go through GW1, but it is going through GW2.

 

 

 

Beside this basic configuration commands, we can also use the below command while configuring the redundancy with HSRP.

We use “preempt”command above but it is necessary to tell about something about this command.

This command is used to force a router that has higher priority become active router. By default if a higher priority router come online, it does not become active if the preempt command isnot used on it.

Another important point is “delay” command, it is used to mention the waiting time before becoming active router.

Router (config-if) standby 1 preempt delay 10

You canalso change hello and holder time with the below command.

Router (config-if) standby 1 timers 4 12

By default HSRP Hello packets are sent to the multicast address 224.0.0.2 over UDP port 1985

There can be multiple HSRP virtual IP addresses.

Router (config-if) standby 1 ip 192.168.1.5

Router (config-if) standby 1 ip 192.168.1.6 secondary

HSRP Group is also assigned a “virtual MAC address”. For HSRP Group 1, the value is 0000.0c07.ac08

Router (config-if) standby 1 mac-address 0000.0c07.ac08

Forauthentication, all the HSRP Group must be configured with the same password.

Router (config-if) standby 1 authentication CISCO

Lastly I want to refer one point, “tracking”. During HSRPusage, there can be a problem on an interface that it is critical for the connection. This interface can be other than the interface that provide standby-active routers’ connection. So, a link down in this interface cannot be realized by standby router. To overcome this issues, HSRP use “track” command that provide decreasing the priority of the router even if a specified interface become down. With this decrease, the active router is changed.

Router (config-if) standby track fa0/1 50


I hope this article will be helpful for you. Let’s continue with VRRP, the standard base redundancy protocol.

 

Thank you,

Arrow Yang


你可能感兴趣的:(Cisco,Better)