HSRP是思科的私有協定
HSRP的預設優先級為100,路由器啟動後,根據優先級決定誰可以成為活躍路由器,優先級高的将勝出。如果路由器優先級相同,再比較端口IP位址,IP位址大的成為活路躍路由器。
HSRP配置規則:
interface f0/x //進入實體接口或者svi接口
ip address xxxx xxxx //配置接口實體ip位址
standby {0-255} ip 192.168.1.254 //配置接口組的虛拟ip位址
standby {0-255} priority [0~255] 配置路由器的優先級預設為100
standby {0-255} preempt 配置搶占
standby {0-255} authentication [] 配置認證密碼
standby {0-255} timers[hello timer][holdtime] 配置hello和holdtime 時間間隔
VRRP是公有協定
思科VRRP配置規則:
interface f0/x //進入實體接口或者svi接口
ip address xxxx xxxx //配置接口實體ip位址
standby {0-255} ip 192.168.1.254 //配置接口組的虛拟ip位址
standby {0-255} priority [0~255] 配置路由器的優先級預設為100
驗證指令:
show standby brief 檢視狀态
show standby 檢視詳細狀态
華為VRRP配置規則:
[SW]int vlan 10 //進入svi接口 或者實體接口
[SW-Vlanif10]ip address 10.1.1.1 24 //配置svi
[SW-Vlanif10]vrrp vrid {0-255} virtual-ip 10.1.1.254 //配置接口組的虛拟ip位址
[SW-Vlanif10]vrrp vrid {0-255} priority 100 //配置優先級
[SW-Vlanif10]vrrp vrid {0-255} preempt-mode timer delay {0-3600} //用來配置VRRP備份組中路由器的搶占延遲時間
華三VRRP配置規則:
[SW-vlan10]int vlan 10 //進入svi接口 或者實體接口
[SW-Vlan-interface10]ip address 10.1.1.1 24 //配置svi
[SW-Vlan-interface10]vrrp vrid<1-255> virtual-ip 10.1.1.254 //配置接口組的虛拟ip位址
[SW-Vlan-interface10]vrrp vrid <1-255> priority <1-254> priority 100 //配置優先級
[SW-Vlan-interface10]vrrp vrid <1-255> preempt-mode delay <0-180000> //用來配置VRRP備份組中路由器的搶占延遲時間
驗證指令:
display vrrp