VRRP配置
1、 实验目的:
通过本次试验,我们可以掌握如下技能
1) 理解VRRP的工作原理
2) 掌握VRRP 的配置
2、 实验拓扑图:
3、 实验步骤:
(1) 配置路由器的各个接口的IP地址。
R1(config)#interface g0/0
R1(config-if)#ip address 192.168.13.1 255.255.255.0
R1(config-if)#no shutdown
R1(config)#interface s0/0
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 g0/0
//把g0/0设置为被动接口,是为了防止从该接口发送rip信息
R2(config)#interface g0/0
R2(config-if)#ip address 192.168.20.2 255.255.255.0
R2(config-if)#no shutdown
R2(config)#interface s0/0
R2(config-if)#ip address 192.168.12.2 255.255.255.0
R2(config-if)#clock rate 128000
R2(config-if)#no shutdown
R2(config)#interface s0/1
R2(config-if)#ip address 192.168.23.2 255.255.255.0
R2(config-if)#clock rate 128000
R2(config-if)#no shutdown
R2(config)#router rip
R2(config-router)#network 192.168.12.0
R2(config-router)#network 192.168.23.0
R2(config-router)#network 192.168.20.0
R2(config-router)#passive-interface g0/0
R3(config)#interface g0/0
R3(config-if)#ip address 192.168.13.3 255.255.255.0
R3(config-if)#no shutdown
R3(config)#interface s0/1
R3(config-if)#ip address 192.168.23.2 255.255.255.0
R3(config-if)#no shutdown
R3(config)#router rip
R3(config-router)#network 192.168.23.0
R3(config-router)#network 192.168.13.0
R3(config-router)#passive-interface g0/0
(2) 配置多个VRRP组并跟踪接口
R1(config)#track 100 interface s0/0 line-protocl
R1(config)#interface g0/0
R1(config-if)#vrrp 1 ip 192.168.13.254
R1(config-if)#vrrp 1 priority 120
R1(config-if)#vrrp 1 preemlpt
R1(config-if)#vrrp 1 authentication md5 key-string benet
R1(config-if)#vrrp 1 track 100 decrement 30
R1(config-if)#vrrp 2 ip 192.168.13.253
R1(config-if)#vrrp 2 preempt
R1(config-if)#vrrp 2 authentication md5 key-string benet
R3(config)#track 100 interface s0/0 line-protocl
R3(config)#interface g0/0
R3(config-if)#vrrp 1 ip 192.168.13.254
R3(config-if)#vrrp 1 priority 120
R3(config-if)#vrrp 1 preemlpt
R3(config-if)#vrrp 1 authentication md5 key-string benet
R3(config-if)#vrrp 1 track 100 decrement 30
R3(config-if)#vrrp 2 ip 192.168.13.253
R3(config-if)#vrrp 2 preempt
R3(config-if)#vrrp 2 authentication md5 key-string benet
OK 配置完成!!!!!!!!!!!!!
转载于:https://blog.51cto.com/lorna8023/244076