资源描述
多组HSRP实验手册
1、 多组HSRP实验,R1、R2、R3跑OSPF,R3起loopback 0, R4、R5长拼R3 LP0,先后断开与恢复R1与R2的F0/0口,进行测试,实验网络的切换;
2、配置如下:
R1配置:
R1#show run
Building configuration...
Current configuration : 1127 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip tcp synwait-time 5
!
!
ip cef
no ip domain lookup
!
!
interface FastEthernet0/0
ip address 10.1.1.252 255.255.255.0 secondary
ip address 10.1.2.252 255.255.255.0
duplex auto
speed auto
standby 1 ip 10.1.1.254
standby 1 priority 120
standby 1 preempt
standby 2 ip 10.1.2.254
standby 2 preempt
!
interface FastEthernet1/0
ip address 10.1.13.1 255.255.255.0
duplex auto
speed auto
!
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
network 10.1.1.0 0.0.0.255 area 0
network 10.1.2.0 0.0.0.255 area 0
network 10.1.13.1 0.0.0.0 area 0
!
no ip http server
no ip http secure-server
!
control-plane
!
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
!
!
end
R1#
R1#
R1#
R2配置:
R2#show run
Building configuration...
Current configuration : 1120 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip tcp synwait-time 5
!
!
ip cef
no ip domain lookup
!
!
interface FastEthernet0/0
ip address 10.1.2.253 255.255.255.0 secondary
ip address 10.1.1.253 255.255.255.0
duplex auto
speed auto
standby 1 ip 10.1.1.254 //虚拟网关
standby 1 preempt //开启抢占功能
standby 2 ip 10.1.2.254
standby 2 priority 120 //设置优先级
standby 2 preempt
!
interface FastEthernet1/0
ip address 10.1.23.2 255.255.255.0
duplex auto
speed auto
!
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
network 10.1.1.0 0.0.0.255 area 0
network 10.1.2.0 0.0.0.255 area 0
network 10.1.23.2 0.0.0.0 area 0
!
no ip http server
no ip http secure-server
!
!
control-plane
!
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
!
!
end
R2#
R3配置:
R3#show run
Building configuration...
Current configuration : 997 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip tcp synwait-time 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface FastEthernet0/0
ip address 10.1.13.3 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 10.1.23.3 255.255.255.0
duplex auto
speed auto
!
router ospf 1
router-id 3.3.3.3
log-adjacency-changes
network 3.3.3.0 0.0.0.255 area 0
network 10.1.13.3 0.0.0.0 area 0
network 10.1.23.3 0.0.0.0 area 0
!
no ip http server
no ip http secure-server
!
!
!
!
!
control-plane
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
!
!
end
R3#
R4配置:
PC2#show run
Building configuration...
Current configuration : 758 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname PC2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip routing
no ip icmp rate-limit unreachable
ip tcp synwait-time 5
!
!
no ip cef
no ip domain lookup
!
!
!
!
interface FastEthernet0/0
ip address 10.1.2.1 255.255.255.0
no ip route-cache
duplex auto
speed auto
!
ip default-gateway 10.1.2.254
no ip http server
no ip http secure-server
!
!
!
!
!
control-plane
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
!
!
end
PC2#
PC2#
PC2#
R5配置:
PC1#show run
Building configuration...
Current configuration : 758 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname PC1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip routing
no ip icmp rate-limit unreachable
ip tcp synwait-time 5
!
!
no ip cef
no ip domain lookup
!
!
interface FastEthernet0/0
ip address 10.1.1.1 255.255.255.0
no ip route-cache
duplex auto
speed auto
!
ip default-gateway 10.1.1.254
no ip http server
no ip http secure-server
!
!
!
control-plane
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
!
!
end
PC1#
注意:1、R4与R5要NO IP ROUTING,然后加上IP DEFAULT ;
2、红色部分为配置内容;
展开阅读全文