Difference between revisions of "Hot Standby Router Protocol"
m (→Configuration of R1, R2 and R3) |
m (→Configuration of R1, R2 and R3) |
||
Line 23: | Line 23: | ||
|} | |} | ||
== Configuration of R1, R2 and R3 == | == Configuration of R1, R2 and R3 == | ||
+ | === HSRP Group number === | ||
+ | All the Routers in a HSRP Group must use the same Group number. In the example the Routers uses Group number 10. The group number ranges from 0 - 255. (Default is 0) | ||
+ | === The virtual MAC-address === | ||
+ | The virtual MAC-address is divided into three fields. In the example 00-10-0C-07-AC-0A | ||
+ | *00-10-0C is the vendor code. (Cisco for example) | ||
+ | *07-AC is a well-known HSRP code | ||
+ | *0A is the HSRP group number 10 decimal is 0A hexadecimal | ||
+ | === Priority === | ||
+ | The priority are used to decide which Router should be the active Router and in which order the standby Routers will take over. The priority field can range from 0 - 255. (Default is 100)<br/> | ||
+ | If more Routers has the same priority the Router with the highest configured IP address will become the active Router. | ||
+ | ==== Preempt ==== | ||
+ | If a Router with a higher priority becomes operative in the HSRP group, the active Router will continue to be active regardless of the new Router having a higher priority. To have the new Router with the higher priority to take over operation as the active Router use the ''preempt'' statement. | ||
+ | |||
{| | {| | ||
| | | | ||
Line 30: | Line 43: | ||
interface FastEthernet1/0 | interface FastEthernet1/0 | ||
ip address 10.0.0.11 255.0.0.0 | ip address 10.0.0.11 255.0.0.0 | ||
− | standby | + | standby 10 priority 130 |
− | standby | + | standby 10 preempt |
− | standby | + | standby 10 ip 10.0.0.1 |
</pre> | </pre> | ||
| | | | ||
Line 40: | Line 53: | ||
interface FastEthernet1/0 | interface FastEthernet1/0 | ||
ip address 10.0.0.12 255.0.0.0 | ip address 10.0.0.12 255.0.0.0 | ||
− | standby | + | standby 10 priority 120 |
− | standby | + | standby 10 preempt |
− | standby | + | standby 10 ip 10.0.0.1 |
</pre> | </pre> | ||
| | | | ||
Line 50: | Line 63: | ||
interface FastEthernet1/0 | interface FastEthernet1/0 | ||
ip address 10.0.0.13 255.0.0.0 | ip address 10.0.0.13 255.0.0.0 | ||
− | standby | + | standby 10 priority 110 |
− | standby | + | standby 10 preempt |
− | standby | + | standby 10 ip 10.0.0.1 |
</pre> | </pre> | ||
|} | |} | ||
[[Category:Cisco]][[Category:CCNP]][[Category:IOS]][[Category:Network]][[Category:CCNP3]] | [[Category:Cisco]][[Category:CCNP]][[Category:IOS]][[Category:Network]][[Category:CCNP3]] |
Revision as of 10:10, 3 May 2009
HSRP or Hot Standby Router Protocol is a protocol defined by Cisco and now described in rfc2281.
Contents
Purpose of HSRP
The purpose of HSRP is to ensure network connectivity in case of Router or access circuit failure, by having one or more standby Router(s) waiting to take over from the failing active Router.
Other high availability Router protocols
How does HSRP workHSRP works by two or more Routers agreeing upon which Router serves the virtual Router. The Virtual RouterThe Virtual Router is a MAC-address and a IP Address the active Router serves beside its configured IP address. If the active Router fails one of the standby Routers becomes the Virtual Router by serving the virtual MAC-address and IP Address. HSRP exampleIn picture 1 three Routers R1,R2 and R3 are setup in a HSRP Group. The Virtual IP address 10.0.0.1 and virtual MAC-Address 00-10-0C-07-AC-0A are served by the active Router R1. R1 continuesly transmits hello packets to the standby Routers. |
Configuration of R1, R2 and R3
HSRP Group number
All the Routers in a HSRP Group must use the same Group number. In the example the Routers uses Group number 10. The group number ranges from 0 - 255. (Default is 0)
The virtual MAC-address
The virtual MAC-address is divided into three fields. In the example 00-10-0C-07-AC-0A
- 00-10-0C is the vendor code. (Cisco for example)
- 07-AC is a well-known HSRP code
- 0A is the HSRP group number 10 decimal is 0A hexadecimal
Priority
The priority are used to decide which Router should be the active Router and in which order the standby Routers will take over. The priority field can range from 0 - 255. (Default is 100)
If more Routers has the same priority the Router with the highest configured IP address will become the active Router.
Preempt
If a Router with a higher priority becomes operative in the HSRP group, the active Router will continue to be active regardless of the new Router having a higher priority. To have the new Router with the higher priority to take over operation as the active Router use the preempt statement.
hostname R1 ! interface FastEthernet1/0 ip address 10.0.0.11 255.0.0.0 standby 10 priority 130 standby 10 preempt standby 10 ip 10.0.0.1 |
hostname R2 ! interface FastEthernet1/0 ip address 10.0.0.12 255.0.0.0 standby 10 priority 120 standby 10 preempt standby 10 ip 10.0.0.1 |
hostname R3 ! interface FastEthernet1/0 ip address 10.0.0.13 255.0.0.0 standby 10 priority 110 standby 10 preempt standby 10 ip 10.0.0.1 |