MHSRP配置(多组热备份路由协议)
一、拓扑
2、目的
在路由器R1和R2上配置多组热备份路由协议(MHSRP),为网络提供冗余路由和负载均衡。
3、配置
(1)、将WEB路由器配置为一个WEB服务器,并配置路由器的用户名、vty和安全口令、IP地址,启动HTTP管理服务。
config terminal
hostname web
interface fastethernet 0/0
ip address 10.1.1.4 255.255.255.0
no shutdown
exit
line vty 0 4
password gzy
login
enable secret class
exit
ip http server
(2)、配置R1和R2路由器
R1:
config terminal
hostname R1
interface fastethernet 0/0
ip address 10.1.1.2 255.255.255.0
no shutdown
exit
interface fastethernet 0/1
ip address 10.1.2.2 255.255.255.0
no shutdown
exit
line vty 0 4
password gzy
login
enable secret class
exit
R2:
config terminal
hostname R2
interface fastethernet 0/0
ip address 10.1.1.3 255.255.255.0
no shutdown
exit
interface fastethernet 0/1
ip address 10.1.2.3 255.255.255.0
no shutdown
exit
line vty 0 4
password gzy
login
enable secret class
exit
(3)、在路由器上配置EIGRP(增强型内部网关路由选择协议)WEB:
config terminal
router eigrp 10
network 10.0.0.0
R1:
config terminal
router eigrp 10
network 10.0.0.0
R2:
config terminal
router eigrp 10
network 10.0.0.0
(4)、配置HSRP,测试看下HSRP的作用(实现了路由冗余,但是只有一条路由即活动路由在转发数据,另一条备份路由处于空闲状态)
R1:
config terminal
interface fastethernet 0/1
standby ip 10.1.2.1
standby preempt
R2:
config terminal
interface fastethernet 0/1
standby ip 10.1.2.1
standby preempt
(5)、在R1和R2之间配置MHSRP,将R1和R2配置在两个相同的HSRP组中。对组1来说R1是活动路由器,R2是备份路由器;对组2来说R2是活动路由器,R1是备份路由器。使用HSRP组1的虚拟IP地址配置一半主机的默认网关,使用HSRP组2的虚拟IP地址配置另一半主机的默认网关。
首先删除刚才配置的HSRP
R1:
interface fastethernet 0/1
no standby ip 10.1.2.1
R2:
interface fastethernet 0/1
no standby ip 10.1.2.1
然后配置MHSRP
R1:
interface fastethernet 0/1
standby 1 ip 10.1.2.1
standby 1 preempt
standby 1 track fastethernet 0/0
standby 2 ip 10.1.2.254
standby 2 preempt
standby 2 priority 95
standby 2 track fastethernet 0/0
R2:
interface fastethernet 0/1
standby 1 ip 10.1.2.1
standby 1 preempt
standby 1 priority 95
standby 1 track fastethernet 0/0
standby 2 ip 10.1.2.254
standby 2 preempt
standby 2 track fastethernet 0/0
至此,MHSRP配置完毕,实现了R1和R2路由器之间的冗余和负载均衡。