日本免费全黄少妇一区二区三区-高清无码一区二区三区四区-欧美中文字幕日韩在线观看-国产福利诱惑在线网站-国产中文字幕一区在线-亚洲欧美精品日韩一区-久久国产精品国产精品国产-国产精久久久久久一区二区三区-欧美亚洲国产精品久久久久

雙機熱備經(jīng)典案例之Cisco HSRP的配置

HSRP一般用于兩臺,也可以用于多臺 。必須在每臺起HSRP上的路由器上配置 。
When the HSRP is configured on a network segment, it provides a virtual Media Access Control (MAC) address and an IP address that is shared among routers in a groupof routers that is running HSRP. One of these devices is selected by the protocol to be the active router. The active router receives and routes packets destined for the group"s MAC address. For n routers running HSRP, there are n1 IP and MAC addresses assigned.
但是aceive只有一臺,standby只有一臺,其實其他的都在監(jiān)聽狀態(tài) 。所以zyx說的是處在active和standby的狀態(tài)的只有兩臺 。
附一個配置實例:
version 12.0
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname r1
!
enable password cisco
!
ip subnet-zero (新版的IOS都支持全0/1子網(wǎng))
!
!
!
!
interface Ethernet0
ip address 136.147.107.101 255.255.0.0
no ip redirects
no ip directed-broadcast
standby 150 timers 5 15;;;/* 定義150組5秒交換一次hello信息,15秒沒收到;hello信息就開始切換 */
standby 150 priority 110 /* 定義150組的主路由器權(quán)值,值越大,為主路由器希望越大 */
standby 150 preempt /* enable 150組的hsrp搶占功能 */
standby 150 authentication cisco;;/* 設(shè)置150組的router身份驗證串 */
standby 150 ip 136.147.107.100 /* 定義150組的浮動地址,也是這臺router
連接的網(wǎng)絡(luò)的網(wǎng)關(guān) */
standby 150 track Ethernet0 /* 定義監(jiān)控的端口 */
!
interface Serial0
no ip address
no ip directed-broadcast
no ip mroute-cache
shutdown
no fair-queue
!
ip classless
!
!
line con 0
transport input none
line 1 16
line aux 0
line vty 0 4
password cisco
login
!
end
配置基本HSRP例子:
提問 "當(dāng)主用路由器當(dāng)?shù)粢院髠浞萋酚善骺梢越庸苤饔寐酚善鞯腎P地址和MAC地址
回答
Router1:
Router1#configure terminal
Enter configuration commands, one per line.;End with CNTL/Z.
Router1(config)#interface FastEthernet 0/1
Router1(config-if)#ip address 172.22.1.3 255.255.255.0
Router1(config-if)#standby 1 ip 172.22.1.1
Router1(config-if)#standby 1 priority 120
Router1(config-if)#exit
Router1(config)#end
Router1#
Router2:
Router2#configure terminal
Enter configuration commands, one per line.;End with CNTL/Z.
Router2(config)#interface FastEthernet 1/0
Router2(config-if)#ip address 172.22.1.2 255.255.255.0
Router2(config-if)#standby 1 ip 172.22.1.1
Router2(config-if)#standby 1 priority 110 (默認priority is 100)
Router2(config-if)#exit
Router2(config)#end
Router2#
注釋 由于HSRP虛擬出來的MAC地址跟組相關(guān),所以可能會出現(xiàn)同一交換機收到多個相同的MAC地址的情況,這時候就需要用standby 1 mac-address 0000.0c07.ad01 命令來人工指定一個MAC地址
提問 強制某個路由器啟動后一直在組中處于主用狀態(tài)
回答
Router1#configure terminal
Enter configuration commands, one per line.;End with CNTL/Z.
Router1(config)#interface FastEthernet 0/1
Router1(config-if)#standby 1 ip 172.22.1.1
Router1(config-if)#standby 1 priority 120
Router1(config-if)#standby 1 preempt
Router1(config-if)#exit
Router1(config)#end
Router1#
Router2#configure terminal
Enter configuration commands, one per line.;End with CNTL/Z.
Router2(config)#interface FastEthernet 1/0
Router2(config-if)#standby 1 ip 172.22.1.1
Router2(config-if)#standby 1 priority 110

推薦閱讀