VRRP技術總結(jié)和配置實踐-創(chuàng)新互聯(lián)

1、VRRP作為網(wǎng)關可靠性的常用方法,基本思路是,兩臺路由器組成一個虛擬路由器,通過VRRP協(xié)議對內(nèi)網(wǎng)呈現(xiàn)一個虛擬的網(wǎng)關ip, 以便讓局域網(wǎng)內(nèi)部的終端通過這個虛擬網(wǎng)關對外進行通信。

創(chuàng)新互聯(lián)自2013年創(chuàng)立以來,先為新城等服務建站,新城等地企業(yè),進行企業(yè)商務咨詢服務。為新城企業(yè)網(wǎng)站制作PC+手機+微官網(wǎng)三網(wǎng)同步一站式服務解決您的所有建站問題。

2、VRRP的最簡單配置就是一條命令,分別在兩個路由器的對內(nèi)網(wǎng)端口上配置。

vrrp vrid 1 virtual-ip x

3、VRRP也可以實現(xiàn)為負載均衡的配置,實現(xiàn)兩個路由器同時轉(zhuǎn)發(fā)流量。

4、VRRP也可以配置監(jiān)測上行端口的擁塞情況,作為VRRP主動調(diào)整自己的優(yōu)先級的依據(jù),從而讓兩個路由器協(xié)商出更好的網(wǎng)關。

4、以eNSP的實驗為例,

組網(wǎng)圖:

關鍵配置:

VRRP配置:

R1的配置:

#
interface GigabitEthernet0/0/1
ip address 192.168.0.10 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.0.1
#

R2的配置:

#
interface GigabitEthernet0/0/2
ip address 192.168.0.20 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.0.1
#

等價路由的配置:

R3上配置到192.168.0.0 網(wǎng)段的兩條等價路由

#
ip route-static 192.168.0.0 255.255.255.0 2.0.0.10
ip route-static 192.168.0.0 255.255.255.0 3.0.0.10
#

檢查VRRP運行結(jié)果:

在R1上查看VRRP的運行結(jié)果:

<Huawei>display vrrp 1
GigabitEthernet0/0/1 | Virtual Router 1
State : Master
Virtual IP : 192.168.0.1
Master IP : 192.168.0.10
PriorityRun : 100
PriorityConfig : 100
MasterPriority : 100
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Create time : 2017-10-22 17:21:39 UTC-08:00
Last change time : 2017-10-22 17:21:43 UTC-08:00

<Huawei>

<Huawei>display vrrp brief
VRID State Interface Type Virtual IP
----------------------------------------------------------------
1 Master GE0/0/1 Normal 192.168.0.1
----------------------------------------------------------------
Total:1 Master:1 Backup:0 Non-active:0
<Huawei>

在R2上查看VRRP的運行結(jié)果

<Huawei>display vrrp
GigabitEthernet0/0/2 | Virtual Router 1
State : Backup
Virtual IP : 192.168.0.1
Master IP : 192.168.0.10
PriorityRun : 100
PriorityConfig : 100
MasterPriority : 100
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Create time : 2017-10-22 17:34:29 UTC-08:00
Last change time : 2017-10-22 17:34:29 UTC-08:00

<Huawei>

<Huawei>display vrrp brief
VRID State Interface Type Virtual IP
----------------------------------------------------------------
1 Backup GE0/0/2 Normal 192.168.0.1
----------------------------------------------------------------
Total:1 Master:0 Backup:1 Non-active:0
<Huawei>

從上述結(jié)果看,左邊的路由器是VRRP的主路由器。

驗證路由器故障的情況:

1、關閉左邊路由器

查看R2上VRRP狀態(tài)

<Huawei>display vrrp brief
VRID State Interface Type Virtual IP
----------------------------------------------------------------
1 Master GE0/0/2 Normal 192.168.0.1
----------------------------------------------------------------
Total:1 Master:1 Backup:0 Non-active:0
<Huawei>display vrrp
GigabitEthernet0/0/2 | Virtual Router 1
State : Master
Virtual IP : 192.168.0.1
Master IP : 192.168.0.20
PriorityRun : 100
PriorityConfig : 100
MasterPriority : 100
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Create time : 2017-10-22 17:34:29 UTC-08:00
Last change time : 2017-10-22 17:58:11 UTC-08:00

<Huawei>

驗證從PC1 ping PC3,可見可以ping 通

PC>ping 10.0.0.102

Ping 10.0.0.102: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 10.0.0.102: bytes=32 seq=2 ttl=126 time=187 ms
From 10.0.0.102: bytes=32 seq=3 ttl=126 time=94 ms
From 10.0.0.102: bytes=32 seq=4 ttl=126 time=94 ms
From 10.0.0.102: bytes=32 seq=5 ttl=126 time=109 ms

--- 10.0.0.102 ping statistics ---
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 0/121/187 ms

PC>

當前題目:VRRP技術總結(jié)和配置實踐-創(chuàng)新互聯(lián)
文章位置:http://muchs.cn/article44/cdjdhe.html

成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站設計、虛擬主機域名注冊、做網(wǎng)站網(wǎng)站建設、網(wǎng)站收錄

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

外貿(mào)網(wǎng)站制作