HSRP

 

HSRP 配置

 

配置过程如下:

----PC的配置-------
PC#configure terminal
PC(config)#no ip routing
PC(config)#ip default-gateway 192.168.1.100
PC(config)#interface f0/0
PC(config-if)#ip address 192.168.1.200 255.255.255.0
PC(config-if)#no shutdown
PC(config-if)#end

----SW1的配置-------#因为是用Dynamips模拟出的交换机,所以要激活所连接的端口,真的交换机不需要激活,如果端口自动激活此步可省略
SW1#configure terminal
SW1(config)#no ip routing
SW1(config)#int range fa0/0 -2
SW1(config)#no sh
SW1(config)#end
SW1#

----R1的配置-------
R1#configure terminal
R1(config)#interface f0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#standby 1 ip 192.168.1.100
R1(config-if)#standby 1 priority 120
R1(config-if)#standby 1 preempt 
R1(config-if)#standby 1 track s1/0 30
R1(config-if)#exit
R1(config-if)#interface s1/0
R1(config-if)#ip address 13.13.13.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#end

----R2的配置-------
R2#configure terminal
R2(config)#interface f0/0
R2(config-if)#ip address 192.168.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#standby 1 ip 192.168.1.100
R2(config-if)#standby 1 priority 100    
R2(config-if)#standby 1 preempt 
R2(config-if)#interface s1/1
R2(config-if)#ip address 23.23.23.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#end
----R3的配置-------
R3#configure terminal
R3(config)#interface s1/0
R3(config-if)#ip address 13.13.13.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#interface s1/1
R3(config-if)#ip address 23.23.23.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config-if)#interface loopback 0
R3(config-if)#ip address 202.101.18.8 255.255.255.0
R3(config-if)#end

你可能感兴趣的:(配置,pc,HSRP)