HSRP (不同VLAN之间的热备份路由协议)

HSRP 161620228.jpg
划分 vlan

R6(config-if)#switchport access vlan 10

R6(config-if)#inter f1/2

R6(config-if)#switchport access vlan 20

R6(config)#interface range f1/3 -4 配置

R5>en

R5#conf t

R5(config)#vlan 10 配置地址

R5(config-if)#no shut

R5(config)#inter vlan 10

R5(config-if)#standby 2 ip 192.168.10.1 配置占先权

R5(config-if)#standby 2 priority 150 配置 vlan20 配置占先权

R5(config-if)#standby 3 priority 145 负载均衡

% This switch is already the root of VLAN10 spanning tree

VLAN 10 bridge priority set to 8192

VLAN 10 bridge max aging time unchanged at 20

VLAN 10 bridge hello time unchanged at 2

VLAN 10 bridge forward delay unchanged at 15

R5(config)#spanning-tree vlan 20 root secondary

VLAN 20 bridge priority set to 16384

VLAN 20 bridge max aging time unchanged at 20

VLAN 20 bridge hello time unchanged at 2

VLAN 20 bridge forward delay unchanged at 15

R5(config)#inter f1/0

R5(config-if)#no switchport

R5(config-if)#ip address 202.106.1.10

R5(config-if)#ip address 202.106.1.10 255.255.255.0

R5(config-if)#no shut

R5(config)#ip route 0.0.0.0 0.0.0.0 202.106.1.1 上配置

R3>en

R3#conf t

R3(config)#inte f1/1 vlan 抢占

R3(config-if)#inter vlan 20

R3(config-if)#ip address 192.168.20.11 255.255.255.0

R3(config-if)#no shut

R3(config-if)#standby 3 ip 192.168.20.1

R3(config-if)#standby 3 preempt

R3(config-if)#standby 3 priority 150 负载均衡

VLAN 10 bridge priority set to 16384

VLAN 10 bridge max aging time unchanged at 20

VLAN 10 bridge hello time unchanged at 2

VLAN 10 bridge forward delay unchanged at 15

R3(config)#spanning-tree vlan 20 root primary

VLAN 20 bridge priority set to 8192

VLAN 20 bridge max aging time unchanged at 20

VLAN 20 bridge hello time unchanged at 2

VLAN 20 bridge forward delay unchanged at 15

R3(config)#ip route 0.0.0.0 0.0.0.0 202.106.10.1 上配置:

R4>en

R4#conf t

R4(config)#inter f0/0

R4(config-if)#ip address 202.106.10.1 255.255.255.0 测试结果

<span style="font-family: 宋体; color: red; font-size: 14pt; mso-hansi-font-family: "Times New Roman'; mso-ascii-font-family: 'Times New Roman'">

161632420.jpg

161643330.jpg

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值