(4)网络连通性测试
对于接在接入层设备 S2126上的用户,为其分配IP地址为192.168.0.3/24~192.168.0.252/24,网关可以指向192.168.0.1或者192.168.0.2,由于在出口路由器上配置了VRRP,VRRP 功能可以为网络提供冗余备份和负载均衡功能。使用如下命令进行网络连通性测试。
D:>ipconfig!显示测试计算机PC1的IP地址
WindoWs2000IPConfiguration
Ethernet adapter本地连接:
Connection-specific DNS Suffix:
IPAddress............................:192.168.0.234
Subnet Mask..........................:255.255.255.0
Default GateWay....................:192.168.0.1
! 终端用户以虚拟组10为网关
D:>ping192.168.0.1
Pinging192.168.0.1With32bytes of data:
Reply from192.168.0.1:bytes=32time<10ms TTL=255
! 测试 pc192.168.0.234到网关192.168.0.1通信正常。
D:>ipconfig!显示测试计算机PC2的IP地址
WindoWs2000IPConfiantration
Ethernet adapter本地连接:
Connection-snecific DNS Suffix:
IPAddress..............................:192.168.0.235
Subnet Mask..........................:255.255.255.0
Default GateWay.....................:192,168.0.2
! 终端用户以虚拟组20为网关
D:>ping192.168.0.2
Pinging192.168.0.2With32bytes of data:
Reply from192.168.0.2:bytes=32time<10ms TTL=255
! 测试pc192.168.0.234到网关192.168.0.1通信正常。
4.VRRP功能测试
根据VRRP功能,在主路由器失效的情况下,备份路由器会在一定的时间里切换为主路由器;在启用了抢占模式后,在路由器故障恢复后,VRRP会重新计算,主路由器切换到备份状态,故障路由器为主状态。VRRP冗余备份与负载均衡功能的测试如下。
网络正常运行情况下,测试VRRP状态及网络连通性:
R2624-A#shoW Vrrp brief
Interface Grp Pri Time OWn Pre State Master addr Group addr
FastEthernet010 105- - P Master192.168.0.254192.168.0.1
FastEthernet020 100- - P Backup192.168.0.253192.168.0.2
! R2624-A VRRP 状态
R2624-B#shoW Vrrp brief
Interface Grp Pri Time OWn Pre State Master addr Group addr
FastEthernet010100- - P Backup192.168.0.254192.168.0.1
FastEthernet020150- - P Master192.168.0.253192.168.0.2
! R2624-B VRRP状态
下面模拟两台计算机PC1和PC2,它们的网关地址分别是192.168.0.1和192.168.0.2。
D:>ipconfig
WindoWs2000IPConfieuration
Ethernet adapter 本地连接:
Connection-specific DNS Suffix:
IPAddress...............................:192.168.0.234
Subnet Mask...........................:255.255.255.0
Default GateWay.......................:192.168.0.1
! 以虚拟组10为默认网关的终端用户
D:>ping192.168.0.1
Pinging192.168.0.1With32bytes of data:
Reply from192.168.0.1:bytes=32time<10ms TTL=255
! 测试终端用户PC192.168.0.234到网关192.168.0.1通信正常。
D:>ipconfig
WindoWs2000IPConfiguration
Ethernet adapter 本地连接:
Connection-specific DNS Suffix:
IPAddress...............................:192.168.0.235
Subnet Mask...........................:255.255.255.0
Default GateWay.......................:192.168.0.2
D:>ping192.168.0.2
Pinging192.168.0.2With32bytes of data:
Reply from192.168.0.2:bytes=32time<10ms TTL=255
! 测试终端用户 PC192.168.0.234到网关192.168.0.1通信正常
在R2624-A路由器出现故障,VRRP状态及网络的连通性如下。
当终端用户使用ping命令加t参数来观察路由器出现故障后网络连通性的变化时,可通过将 S3550-24-A与R2624-A之间的线缆人为doWn掉来模拟R2624-A路由器故障。
在网络正常运行时网络通信正常:
D:>ipconfig
WindoWs2000IPConfiguration
Ethernet adapter本地连接:
Connection-specific DNS Suffix:
IPAddress...............................:192.168.0.234
Subnet Mask............................:255.255.255.0
Default GateWay........................:192.168.0.1
D:>ping192.168.0.1-t
Pinging192.168.0.1With32bytes of data:
Reply from192.168.0.1:bytes=32time<10ms TTL=255
……
! ……表示Reply from192.168.0.1:bytes=32time<10ms TTL=255
! 在网络正常运行时网络通信正常。
当R2624-A出现故障时,网络连通性的变化情况:
D:>ipconfig
WindoWs2000IPConfiguration
Ethernet adapter 本地连接:
Connection-specific DNS Suffix:
IPAddress................................:192.168.0.234
Subnet Mask.............................:255.255.255.0
Default GateWay........................:192.168.0.1
D:>ping192.168.0.1-t
Pinging192.168.0.1With32bytes of data:
Reply from192.168.0.1:bytes=32time<10ms TTL=255
Reply from192.168.0.1:bytes=32time<10ms TTL=255
! R2624-A路由器出现故障时刻
Request timed out.
Request timed out.
Reply from192.168.0.1:bytes=32time<10ms TTL=255
Reply from192.168.0.1:bytes=32time<10ms TTL=255
........
! ……表示Reply from192.168.0.1:bytes=32time<10ms TTL=255
! R2624-A路由器出现故障后,网络出现中断,之后很快网络恢复网络连通性
当 R2624-A出现故障时VRRP状态的变化情况:
R2624-B#shoW Vrrp brief
Interface Grp Pri Time OWn Pre State Master addr Group addr
FastEthernet010100- - P Master 192.168.0.253192.168.0.1
FastEthernet020150- - P Master 192.168.0.253192.168.0.2
从R2624-A 出现故障到其恢复正常的过程中,网络连通性的变化情况:
D:>ipconfig
WindoWs2000IPConfiguration
Ethernet adapter本地连接:
Connection-specific DNS Suffix:
IPAddress...............................:192.168.0.234
Subnet Mask...........................:255.255.255.0
Default GateWay......................:192.168.0.1
D:>ping192.168.0.1-t
Pinging192.168.0.1With32bytes of data:
Reply from192.168.0.1:bytes=32time<10ms TTL=255
Reply from192.168.0.1:bytes=32time<10ms TTL=255
! R2624-A 出现故障
Request timed out.
Request timed out.
Reply from192.168.0.1:bytes=32time<10ms TTL=255
Reply from192.168.0.1:bytes=32time<10ms TTL=255
......
Reply from192.168.0.1:bytes=32time<10ms TTL=255
Reply from192.168.0.1:bytes=32time<10ms TTL=255
! R2624-A 恢复正常时刻
Reply from192.168.0.1:bytes=32time<10ms TTL=255
Reply from192.168.0.1:bytes=32time<10ms TTL=255
......
! 当R2624-A出现故障,到当R2624-A恢复正常的过程中,网络在出现暂时中断之后恢复正常,在路由器R2624-A恢复正常后,网络切换回来,通信正常,不会发生中断。
从R2624-A出现故障到其恢复正常的过程中,VRRP状态的变化情况:
R2624-B#shoW VrrV brief
Interface Grp Pri Time OWn Pre State Master addr Group addr
FastEthernet010100- - P Master 192.168.0.253192.168.0.1
FastEthernet020150- - P Master 192.168.0.253192.168.0.2
! R2624-A发生故障,R2624-B路由器VRRP状态,备份组状态发生变化
R2624-B#shoW Vrrp brief
Interface Grp Pri Time OWn Pre State Master addr Group addr