思科HSRP配置
阿新 • • 發佈:2018-03-05
HSRP 虛擬網關
1.配置設備基本信息
包括接口ip、vlan、trunk、路由等配置
·
2.配置HSRP
//SW1配置
sw1(config)#int vlan 10
sw1(config-if)#ip add 192.168.10.1 255.255.255.0
sw1(config-if)#standby 10 ip 192.168.10.254 ------------------//配置虛擬ip地址
sw1(config-if)#standby 10 priority 200------------------------//配置優先級
sw1(config-if)#standby 10 preempt------------------------//配置搶占權
sw1(config-if)#standby 10 track f1/1 100----------//配置端口跟蹤和減去的優先級
·
//SW2配置
sw2(config)#int vlan 10
sw2(config-if)#ip add 192.168.10.2 255.255.255.0
sw2(config-if)#standby 10 ip 192.168.10.254
sw2(config-if)#standby 10 priority 150
sw2(config-if)#standby 10 preempt
·
3.驗證HSRP
sw1#show standby brief
P indicates configured to preempt.
|
1.配置設備基本信息
包括接口ip、vlan、trunk、路由等配置
·
2.配置HSRP
//SW1配置
sw1(config)#int vlan 10
sw1(config-if)#ip add 192.168.10.1 255.255.255.0
sw1(config-if)#standby 10 ip 192.168.10.254 ------------------//配置虛擬ip地址
sw1(config-if)#standby 10 priority 200------------------------//配置優先級
sw1(config-if)#standby 10 preempt------------------------//配置搶占權
·
//SW2配置
sw2(config)#int vlan 10
sw2(config-if)#ip add 192.168.10.2 255.255.255.0
sw2(config-if)#standby 10 ip 192.168.10.254
sw2(config-if)#standby 10 priority 150
sw2(config-if)#standby 10 preempt
·
3.驗證HSRP
sw1#show standby brief
P indicates configured to preempt.
Interface Grp Pri P State Active Standby Virtual IP
Vl10 10 200 P Active local 192.168.10.2 192.168.10.254
·
sw2#show standby brief
P indicates configured to preempt.
|
Interface Grp Pri P State Active Standby Virtual IP Vl10 10 150 P Standby 192.168.10.1 local 192.168.10.254
思科HSRP配置