HSRP

 

 

实验环境介绍:R2R3是公司的路由器,R1模拟internet上的一台路由器,R4是内部网络中的一台PC.IP及端口如图所示
实验要求:利用HSRP热备份功能,实现路由器冗余。R4可以通过R2R3访问10.10.10.0/2网段,图中设置R2为主路由器,当R2fa0/0接口down了以后,自动切换到R3访问外网10.10.10.0/24网段。

 Basic Configure

R1 configure

 

R1(config)#hostname R1
R1(config)#interface loopback 0
R1(config-if)#ip address 10.10.10.10 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 1.1.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface fastEthernet
R1(config)#interface fastEthernet 0/1
R1(config-if)#ip address 2.2.2.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#router
R1(config)#router rip
R1(config-router)#network 10.0.0.0
R1(config-router)#network 1.0.0.0
R1(config-router)#network 2.0.0.0

 

 

 

 

 

 

 

R2 configure

 

R2(config)#hostname R2
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip address 1.1.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface fastEthernet 0/1
R2(config-if)#ip address 192.168.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#router rip
R2(config-router)#network 1.0.0.0
R2(config-router)#network 192.168.1.0

 

 

R3 configure

 

R3(config)#interface fastEthernet 0/0
R3(config-if)#ip address 2.2.2.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface fastEthernet 0/1
R3(config-if)#ip address 192.168.1.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#router rip
R3(config-router)#network 2.0.0.0
R3(config-router)#network 192.168.1.0

 

 

 

HSRP Configure

 

R2

 

R2(config)#interface fastEthernet 0/1
R2(config-if)#standby 1 ip 192.168.1.254
R2(config-if)#standby 1 priority 120
R2(config-if)#standby 1 preempt
R2(config-if)#standby 1 track fastEthernet 0/0 30

 

 

 

R3

 

R3(config)#interface fastEthernet 0/1
R3(config-if)#standby 1 ip 192.168.1.254
R3(config-if)#standby 1 priority 110
R3(config-if)#standby 1 preempt
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章