Jaycee's Networking

May 17, 2009

HSRP

Filed under: IOS — Tags: — Jaycee @ 12:53 am

A. HSRP (Host Standby Router Protocol):

1. Since you dont’ want to be running a routing protocol on individual hosts; you want to set up each host with a simple default route and leave it at that.

2. A redundant pair of routers (one is active and one is standby) act as a default gateway.

3. Need 3 IPs: IP of active router, IP of standby router, and a VIP as the gateway.

4. VIP is active on whichever router has the highest priority. The priority default = 100. (value b/w 0-255)

5. Routers send out HSRP packets to the multicast address 224.0.0.2 using UDP port 1985.

ALL HSRP packets have a TTL of 1, so they will not escape the local Ethernet segment.

6. Routers automatically generates a virtual MAC address for each HSRP router. A virtual MAC address ensures that the ARP caches remain valid when HSRP switches over to another router.

7. With HSRP groups, the routers use a unique MAC addres for each HSRP group.

B. HSRP Interface Tracking:

1. With “track” command, we can tell our HSRP process to watch another interface and decrement our priority if the other interface goes down.

Primary Internet link failure without interface tracking

R1:

interface FastEthernet0/0
 ip address 192.168.100.2 255.255.255.0
 standby ip 192.168.100.1
 standby preempt
 standby track Serial0/0 10

R2:

interface FastEthernet0/0
 ip address 192.168.100.3 255.255.255.0
 standby ip 192.168.100.1
 standby priority 95
 standby preempt
 standby track Serial0/0 10

2. As the above configuration, it will allow the Ethernet inferface to failover in the result of a serial interface failure.

3. Adding a priority decrement value is a very handy feature.

a. If each router had 3 links to the internet, you could decrement the priority be 3 for each tracked interface.

b. In our exmple, if one link went down, R1 would remain active, but if 2 serial links went down, we would decrement its priority by a total of 6, bringing it down to 94; this would be lower than R2’s priority of 95, so R2 would become the active router.

c. With 2 routers, each containing 3 links to the internet, the one with the most serial links up would become the active router.

C. Naming HSRP:

interface ethernet1
 standby name hsrpname1

D. Multiple-Group HSRP:

1. default group = 0.

2. In this example, we’ll use 3 physical routers to create 3 virtual routers, using three router groups:

a. R1 – Active for group 1 and standby for group 3
b. R2 – Active for group 2 and standby for group 3
c. R3 – Active for group 3 and standby for group 1 and group 2
d. Virtual router for group 1 is 10.10.1.11; group 2 has 10.10.1.12; group 3 has 10.10.1.13.

R1:

interface ethernet1
 ip address 10.10.1.1 255.255.255.0
 standby 1 priority 120
 standby 1 preempt
 standby 1 ip 10.10.1.11
 standby 3 ip 10.10.1.13

R1:

interface ethernet1
 ip address 10.10.1.2 255.255.255.0
 standby 2 priority 120
 standby 2 preempt
 standby 2 ip 10.10.1.12
 standby 3 ip 10.10.1.13

R1:

interface ethernet1
 ip address 10.10.1.3 255.255.255.0
 standby 3 priority 120
 standby 3 preempt
 standby 3 ip 10.10.1.13
 standby 1 ip 10.10.1.11
 standby 2 ip 10.10.1.12

E.Load Sharing with HSRP:

loadsharing with hot standby

1. Network 1 use the virtual Router 1 (10.10.28.3) for its default route, and Network 2 use the virtual Router 2 (10.10.28.4).

2. They both carry traffic until one of the routers goes down, and then the other router takes over all the traffic.

R1:

interface ethernet1
 ip address 10.10.28.1 255.255.255.0
 standby 1 preempt
 standby 1 priority 120
 standby 1 ip 10.10.28.3
 standby 2 ip 10.10.28.4

R2:

interface ethernet1
 ip address 10.10.28.2 255.255.255.0
 standby 2 preempt
 standby 2 priority 120
 standby 2 ip 10.10.28.4
 standby 1 ip 10.10.28.3

3. This configuration provides a primitive (簡單的) form of load sharing across the two networks. If either router goes down, the other takes over.

Advertisements

2 Comments »

  1. Question: what does the crossover connection do in HSRP? Does it need to be configure with ip addresses?

    thanks,

    Kai

    Comment by Kai — May 20, 2009 @ 8:17 am

    • That is for redundancy. Usually configure it as a trunk port.

      Comment by Jaycee — May 20, 2009 @ 8:31 am


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: