1. 程式人生 > >華為VRRP配置詳解

華為VRRP配置詳解

type image 端口配置 mark res ethernet mar inter 模擬

1.實驗拓撲如下圖:

技術分享圖片

2.路由器端口配置ip,如拓撲圖所示,配置如下
R1配置:
[R1]interface g0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.1.254 24
[R1]interface g0/0/1
[R1-GigabitEthernet0/0/1]ip address 192.168.13.1 24

R2配置:
[R2]interface g0/0/0

[R2-GigabitEthernet0/0/0]ip add
[R2-GigabitEthernet0/0/0]ip address 192.168.1.253 24
[R2-GigabitEthernet0/0/0]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add

[R2-GigabitEthernet0/0/1]ip address 192.168.23.1 24

R3配置:

[R3]interface g0/0/0
[R3-GigabitEthernet0/0/0]ip ad
[R3-GigabitEthernet0/0/0]ip address 192.168.13.2 24
[R3]interface g0/0/0
[R3-GigabitEthernet0/0/0]ip ad
[R3-GigabitEthernet0/0/0]ip address 192.168.13.2 24
[R3-LoopBack1]ip address 10.0.0.1 24

3.R1、R2配置vrrp,並監控g0/0/1

[R1-GigabitEthernet0/0/0]vrrp vrid 1 virtual-ip 192.168.1.250

[R1-GigabitEthernet0/0/0]vrrp vrid 1 track interface g0/0/1 reduced 50

[R2-GigabitEthernet0/0/0]vrrp vrid 1 virtual-ip 192.168.1.250
[R2-GigabitEthernet0/0/0]vrrp vrid 1 track interface g0/0/1 reduced 51

4.R1、R2、R3配置靜態路由,確保全網互通

[R1]ip route-static 10.0.0.1 255.255.255.0 192.168.13.2

[R2]ip route-static 10.0.0.1 255.255.255.0 192.168.23.2

[R3]ip route-static 192.168.1.0 255.255.255.0 192.168.13.1
[R3]ip route-static 192.168.1.0 255.255.255.0 192.168.23.1

5.測試
R1上查看vrrp
技術分享圖片

R2上查看
技術分享圖片

PC上測試
技術分享圖片
技術分享圖片

6.模擬R2->R3線路故障,測試路由
技術分享圖片

技術分享圖片

在PC上跟蹤路由
技術分享圖片
R2上看vrrp
技術分享圖片

vrrp自動切換R2為master路由,鏈路備份成功。

華為VRRP配置詳解