2010年3月21日 星期日

L3 Switch for HSRP

HSRP (Hot Standby Router Potocol)




L3 switch 比較特別的是,可以區分VLAN active 在不同的switch 上。
這樣可以減輕 Loading,達到Load balance。


由於要區分不同的vlan,所以指令不能設定在實體界面上。


SwA(config)# interface vlan 1 
SwA(config-if)# ip address 10.10.10.252  255.255.255.0 
SwA(config-if)# standby ip  10.10.10.254 
SwA(config-if)# standby  preempt 
SwA(config-if)# standby priority 105
SwA(config-if)# standby track fa0/1


SwB(config)# interface vlan 1 
SwB(config-if)# ip address 10.10.10.253  255.255.255.0 
SwB(config-if)# standby ip  10.10.10.254 
SwB(config-if)# standby  preempt 
SwB(config-if)# standby priority 100
SwB(config-if)# standby track fa0/1

standby preempt   
此設定在於,當 SwA 失效時,SwB的 Vlan1會從standby 變成 active,等到SwA恢復正常後,Vlan 1 的所有權,會再回到SwA

standby priority 100 
Default  priority is 100 。
數值越大,表示優先權越高。這與 Switch priority 定義 相反,需注意。

standby track fa0/1
一般使用HSRP時,其中一個設備shutdown,Standby設備才會Active。Track的好處可以同時偵測多個介面,(Etherchannel 也行),當device shutdown,會自動減少其priority值,切換成Standby設備接手。

沒有留言:

張貼留言