1.什么是hsrp?
hsrp全称:hot standby router protocol
中文:热备份路由协议
2.hsrp有什么作用?
从这个协议的名字可以看出来,主要是用作路由器冗余的。热备份说的是当网络中一条线路无法工作时,其他备份线路可以自动接替其工作。
3.原理
……
4.实验模拟
实验环境:
思科3640系列路由器(ios为C3660-IK9O3S-M,,Version 12.4)
实验要求:
当内部网络对外访问的主线路无法工作时,备份线路自动接替主线路的工作,保证网络的正常访问。
实验拓扑:
说明:
R1为外网路由器,R2和R3为内网路由器,别且配置为内网网关,R4和R5为内网用户。
实验配置:
R1
- interface Loopback0
- ip address 1.1.1.1 255.255.255.0
- !
- interface FastEthernet0/0
- ip address 192.168.12.1 255.255.255.0
- duplex auto
- speed auto
- !
- interface FastEthernet0/1
- ip address 192.168.13.1 255.255.255.0
- duplex auto
- speed auto
- !
- router ospf 1
- log-adjacency-changes
- network 0.0.0.0 255.255.255.255 area 0
R2
- interface FastEthernet0/0
- ip address 192.168.12.2 255.255.255.0
- duplex auto
- speed auto
- !
- interface FastEthernet0/1
- ip address 192.168.1.2 255.255.255.0
- duplex auto
- speed auto
- standby ip 192.168.1.100
- standby priority 90
- standby preempt
- !
- router ospf 1
- log-adjacency-changes
- network 0.0.0.0 255.255.255.255 area 0
R3
- interface FastEthernet0/0
- ip address 192.168.13.3 255.255.255.0
- duplex auto
- speed auto
- !
- interface FastEthernet0/1
- ip address 192.168.1.3 255.255.255.0
- duplex auto
- speed auto
- standby ip 192.168.1.100
- standby preempt
- !
- router ospf 1
- log-adjacency-changes
- network 0.0.0.0 255.255.255.255 area 0
R4
- interface FastEthernet0/0
- ip address 192.168.1.1 255.255.255.0
- no ip route-cache
- duplex auto
- speed auto
- !
- interface FastEthernet0/1
- no ip address
- no ip route-cache
- shutdown
- duplex auto
- speed auto
- !
- ip default-gateway 192.168.1.100
实验验证:
在R4上ping 1.1.1.1,结果为联通,traceroute 1.1.1.1 ,结果如下:
- Type escape sequence to abort.
- Tracing the route to 1.1.1.1
- 1 192.168.1.3 276 msec 156 msec 80 msec
- 2 192.168.13.1 124 msec * 208 msec
转载于:https://blog.51cto.com/peterchang/965953