HSRP是Cisco對冗餘的私有協議。它提供幾乎100%的路由器可用性和冗餘。所以,如果某臺路由器發生故障,備份路由器會接管主路由器的路由 功能。
在我們討論如何配置HSRP之前,讓我們關注一下例子中使用的網絡。爲了幫助你更好的理解HSRP是如何工作的,這裏是一個基本的網絡圖表:
在使用HSRP的時候,路由器既可以是主的也可以是備用的。如果主路由器在一段時間內沒有向備用路由器發送HELLO數據包,備用路由器假定主 路由器已關閉,從而進行接管。然後備用路由器假定對虛擬IP地址負責,並開始對虛擬IP地址指向的虛擬以太網MAC地址響應。
你可以在路由器的接口配置模式使用standby命令完成幾乎所有HSRP配置。讓我們考慮在配置圖表中顯示的網絡所採用的步驟。
2.配置備用IP地址
3.配置備用搶先(通過搶先,只要路由器1可用,將總是主路由器。)
2.配置備用IP地址
3.配置備用優先小於100(在本例中,是99。)
interface Ethernet0/0
ip address 10.1.1.1 255.255.255.0
standby ip 10.1.1.3
standby preempt
Ethernet0/0 - Group 0
State is Active
2 state changes, last state change 00:00:29
Virtual IP address is 10.1.1.3
Active virtual MAC address is 0000.0c07.ac00
Local virtual MAC address is 0000.0c07.ac00 (default)
Hello time 3 sec, hold time 10 sec
Next hello sent in 0.692 secs
Preemption enabled
Active router is local
Standby router is 10.1.1.2, priority 99 (expires in 8.097 sec)
Priority 100 (default 100)
IP redundancy name is "hsrp-Et0/0-0" (default)
interface Ethernet0/0
ip address 10.1.1.2 255.255.255.0
standby ip 10.1.1.3
standby priority 99
Ethernet0/0 - Group 0
Local state is Standby, priority 99
Hellotime 3 sec, holdtime 10 sec
Next hello sent in 1.014
Virtual IP address is 10.1.1.3 configured
Active router is 10.1.1.1, priority 100 expires in 7.159
Standby router is local
4 state changes, last state change 00:02:02
0
收藏
推薦專欄更多
猜你喜歡
掃一掃,領取大禮包
Ctrl+Enter 發佈
發佈
取消