綠色資源網:您身邊最放心的安全下載站! 最新軟件|熱門排行|軟件分類|軟件專題|廠商大全

綠色資源網

技術教程
您的位置(zhì):首頁係統集成網絡管理(lǐ) → 詳解(jiě):Cisco HSRP的配置

詳解:Cisco HSRP的配置

我要評論 2011/09/22 11:19:59 來源:綠(lǜ)色資源網(wǎng) 編輯:ynaad.com [大(dà) 中(zhōng) ] 評論:0 點擊(jī):571次(cì)

 HSRP的配(pèi)置(zhì)

拓撲圖
\
實驗步驟(zhòu):
  1. 配(pèi)置IP地址和路由協議
    R1(config)#interface f0/0
    R1(config-if)#ip address 192.168.13.1 255.255.255.0
    R1(config-if)#no shutdown
    R1(config)#interface s1/1
    R1(config-if)#ip address 192.168.12.1 255.255.255.0
    R1(config-if)#no shutdown
    R1(config)#router rip
    R1(config-router)#network 192.168.12.0
    R1(config-router)#network 192.168.13.0
    R1(config-router)#passive-interface f0/0
    //之所以把f0/0接(jiē)口設為被動接口,是為了防(fáng)止從該口向R3發送RIP信息。
     
     
    R2(config)#interface f0/0
    R2(config-if)#ip address 192.168.2.254 255.255.255.0
    R2(config-if)#no shutdown
    R2(config)#interface s1/1
    R2(config-if)#clock 128000
    R2(config-if)#ip address 192.168.12.2 255.255.255.0
    R2(config-if)#no shutdown
    R2(config)#interface s1/3
    R2(config-if)#clock 128000
    R2(config-if)#ip address 192.168.23.2 255.255.255.0
    R2(config-if)#no shutdown
    R2(config)#router rip
    R2(config-router)#network 192.168.2.0
    R2(config-router)#network 192.168.12.0
    R2(config-router)#network 192.168.23.0
    R2(config-router)#passive-interface f0/0
     
    R3(config)#interface f0/0
    R3(config-if)#ip address 192.168.13.3 255.255.255.0
    R3(config-if)#no shutdown
    R3(config)#interface s1/3
    R3(config-if)#ip address 192.168.23.3 255.255.255.0
    R3(config-if)#no shutdown
    R3(config)#router rip
    R3(config-router)#network 192.168.13.0
    R3(config-router)#network 192.168.23.0
    R3(config-router)#passive-interface f0/0
     
    PC2(config)#no ip routing
    PC2(config)#interface f0/0
    PC2(config-if)#ip address 192.168.2.2 255.255.255.0
    PC2(config-if)#no shutdown
    PC2(config)#ip default-gateway 192.168.2.254
  •      配置(zhì)HSRP
    R1(config)#interface f0/0
    R1(config-if)#standby 11 ip 192.168.13.254
    //啟用HSRP功能,並配置虛擬IP網關地址,11為(wéi)standby的組號。相同組號的路由器屬於同一個HSRP組,需要注意的(de)是同一個組內的路由器設置虛擬網關地址必須(xū)一致(zhì)。
    R1(config-if)#standby 11 priority 120
    //配置HSRP的優先級,默認(rèn)是100,值越大優先級越高。
    R1(config-if)#standby 11 preempt
    //設置(zhì)路由器在優先級最高時(shí)成為活動路由器,如(rú)果不(bú)設(shè)置,即使路由器優先級再(zài)高也不會成為(wéi)活動路由器。
    R1(config-if)#standby 11 timers 3 10
    //其中的3為Hello Time,表示每隔多長時間發送(sòng)Hello消息。10為Hold Time,表(biǎo)示在多(duō)長時間內同組的(de)路由器沒有收到活動路由器發送的消息(xī),即(jí)認為活動(dòng)路由(yóu)器出現故障了,同組的(de)路(lù)由器該項設置必須一致。
    R1(config-if)#standby 11 authentication md5 key-string cisco
    //以上是配置認證(zhèng)密碼,防止非(fēi)法設備加入到HSRP組(zǔ),同組內(nèi)的設備密碼需保(bǎo)持一致。
     
     
    R3(config)#interface f0/0
    R3(config-if)#standby 11 ip 192.168.13.254
    R3(config-if)#standby 11 preempt
    R3(config-if)#standby 11 timers 3 10
    R3(config-if)#standby 11 authentication md5 key-string cisco
  • 查看HSRP狀(zhuàng)態
    R1#show standby brief
                         P indicates configured to preempt.
                         |
    Interface   Grp Prio P State    Active          Standby         Virtual IP    
    Fa0/0       11 120 P Active   local           192.168.13.3    192.168.13.254
    //以上表明R1是活動(dòng)路由,R3是(shì)備份路由。
     
    R3#show standby brief
                         P indicates configured to preempt.
                         |
    Interface   Grp Prio P State    Active          Standby         Virtual IP    
    Fa0/0       11 100 P Standby 192.168.13.1    local           192.168.13.254
    //以上表明R3是備份路由,R1是活(huó)動路由。
  • 修(xiū)改(gǎi)PC1的(de)配置(zhì)
    PC1(config)#interface f0/0
    PC1(config-if)#ip address 192.168.13.100 255.255.255.0
    PC1(config-if)#no shutdown
    PC1(config)#ip default-gateway 192.168.13.254
  • 測試,在PC1上連續ping PC2,ping的過程中關掉R1上f0/0端口,觀察ping的結果以及(jí)HSRP的狀態。
    PC1#ping
    Protocol [ip]:
    Target IP address: 192.168.2.2
    Repeat count [5]: 3000       ----------------設置ping的次數
    Datagram size [100]: 1500      ------------------設置ping包的(de)報文長度
    Timeout in seconds [2]:
    Extended commands [n]: y
    Source address or interface: 192.168.13.100
    Type of service [0]:
    Set DF bit in IP header

    關鍵詞:Cisco,HSRP

閱讀本文後您有什麽感(gǎn)想? 已(yǐ)有 人給出評價!

  • 0 歡迎喜歡
  • 0 白癡
  • 0 拜托
  • 0 哇
  • 0 加油
  • 0 鄙視
免费人欧美成又黄又爽的视频丨一本色道久久88综合日韩精品丨国产专区日韩精品欧美色丨午夜无遮挡男女啪啪视频丨国产欧美日韩综合精品一区二区丨亚洲精品无码不卡在线播HE丨亚洲精品国产精品国自产观看丨日韩国产高清av不卡