VRRP 实验
实验实验
实验
一
一一
一、
、、
、实验拓扑图
实验拓扑图实验拓扑图
实验拓扑图:
::
:
二
二二
二、
、、
、网络接口
网络接口网络接口
网络接口:
::
:
PC1 F0/0 <----> Switch1 F0/1
PC2 F0/0 <----> Switch1 F0/2
Router1 F0/0 <----> Switch1 F0/11
Router2 F0/0 <----> Switch1 F0/12
三
三三
三、
、、
、实验配置
实验配置实验配置
实验配置:
::
:
PC1 的配置
的配置的配置
的配置:
::
:
Router>en
Router#conf t
Router(config)#host PC1
PC1(config)#no ip do lo
PC1(config)#line con 0
PC1(config-line)#logg syn
PC1(config-line)#exec-time 0 0
PC1(config-line)#exit
PC1(config)#int f0/0
PC1(config-if)#ip add 192.168.1.10 255.255.255.0
PC1(config-if)#no sh
PC1(config-if)#exit
//配置网关
配置网关配置网关
配置网关
PC1(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.1
PC1(config)#end
PC1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 192.168.1.1 to network 0.0.0.0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 192.168.1.1
//可以
可以可以
可以 PING 通
通通
通 R1 的回环
的回环的回环
的回环
PC1#ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 48/63/76 ms
//当
当当
当 R1 的
的的
的 F0/0 接口
接口接口
接口 DOWN 掉
掉掉
掉,
,,
,就
就就
就 PING 不通
不通不通
不通
PC1#ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
//激活又可以
激活又可以激活又可以
激活又可以 PIGN 通
通通
通
PC1#ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 28/73/148 ms
//R1 没有
没有没有
没有 DOWN 掉的情况下走
掉的情况下走掉的情况下走
掉的情况下走 R1 接口
接口接口
接口
PC1#traceroute ip 10.1.1.1 source 192.168.1.10
Type escape sequence to abort.
Tracing the route to 10.1.1.1
1 192.168.1.1 160 msec * 80 msec
//当
当当
当 R1 有
有有
有 DOWN 掉的情况下走
掉的情况下走掉的情况下走
掉的情况下走 R2 接口
接口接口
接口
PC1#traceroute ip 10.1.1.1 source 192.168.1.10
Type escape sequence to abort.
Tracing the route to 10.1.1.1
1 192.168.1.2 96 msec * 16 msec
//激活优先走
激活优先走激活优先走
激活优先走 R1 接口
接口接口
接口
PC1#traceroute ip 10.1.1.1 source 192.168.1.10
Type escape sequence to abort.
Tracing the route to 10.1.1.1
1 192.168.1.1 80 msec * 48 msec
//最后的配置
最后的配置最后的配置
最后的配置
PC1#sh run
Building configuration...
Current configuration : 512 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
!
!
ip cef
!
!
no ip domain lookup
!
!
!
!
!
interface FastEthernet0/0
ip address 192.168.1.10 255.255.255.0
duplex auto
speed auto
!
ip http server
ip route 0.0.0.0 0.0.0.0 192.168.1.1
!
!
!
!
!
control-plane
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
End
PC2 的配置
的配置的配置
的配置:
::
:
Router>en
Router#conf t
Router(config)#host PC2
PC2(config)#no ip do lo
PC2(config)#line con 0
PC2(config-line)#logg syn
PC2(config-line)#exec-time 0 0
PC2(config-line)#exit
PC2(config)#int f0/0
PC2(config-if)#ip add 192.168.1.20 255.255.255.0
PC2(config-if)#no sh
PC2(config-if)#exit
//配置网关
配置网关配置网关
配置网关
PC2(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.2
PC2(config)#end
PC2#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 192.168.1.2 to network 0.0.0.0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 192.168.1.2
//可以
可以可以
可以 PING 通
通通
通 R2 的回环
的回环的回环
的回环
PC2#ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 32/56/76 ms
//当
当当
当 R1 接口
接口接口
接口 DOWN 掉的情况下
掉的情况下掉的情况下
掉的情况下,
,,
,没有影响
没有影响没有影响
没有影响
PC2#ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/68/92 ms
//配置好
配置好配置好
配置好 VRRP 后
后后
后 DOWN 掉的情况下也没有影响
掉的情况下也没有影响掉的情况下也没有影响
掉的情况下也没有影响
PC2#ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/74/132 ms
//最后的配置
最后的配置最后的配置
最后的配置
PC2#sh run
Building configuration...