VRRP与MSTP综合组网配置举例_第1页
VRRP与MSTP综合组网配置举例_第2页
VRRP与MSTP综合组网配置举例_第3页
VRRP与MSTP综合组网配置举例_第4页
VRRP与MSTP综合组网配置举例_第5页
已阅读5页,还剩40页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、VRRP与 MSTP综合组网配置举例特性简介VRRP 简介MSTP 简介应用场合单独使用 VRRP 的组网方式VRRP 与 MSTP 配合使用的组网方式配置前提配置举例组网需求配置思路配置步骤设备 A 的配置设备 B 的配置设备 C 的配置设备 D 的配置设备 E 的配置主机的配置4.4 验证配置4.5 配置文件相关资料特性简介VRRP简介VRRP 用来为网关设备提供冗余备份。 如图 1-1 所示, VRRP 将可以承担网关功能的一组设 备加入到备份组中, 形成一台虚拟路由器, 局域网内的主机将此虚拟路由器设置为缺省网关。VRRP 根据优先级从备份组中选举出一台网关设备作为 Master ,负

2、责转发局域网内主机与 外部通信的流量,其他网关设备作为 Backup 。当 Master 出现故障后, VRRP 重新选举新 的 Master ,保证流量转发不会中断。图 1-1 虚拟路由器示意图VRRP 可以监视上行接口或链路的状态。 当路由器的上行接口或链路出现故障时,该路由器主动降低自己的优先级, 使得备份组内其它路由器的优先级高于这个路由器, 由器成为 Master ,导致流量转发失败。以避免这个路1.2MSTP简介MSTP 是在 STP 的基础上发展而来的,用于在局域网中消除数据链路层的物理环路。作为一种二层管理协议, MSTP 通过选择性地阻塞网络中的冗余链路来消除二层环路,将环路

3、网络结构修剪成无环路的树型网络结构, 从而防止报文在环路网络中不断增生和无限循环, 避同时,它还具备链路备份的功能。免设备由于重复接收相同报文而造成报文处理能力的下降;VLAN 的流量沿各自的路与 STP 相比, MSTP 可以实现网络拓扑的快速收敛,也能使不同 径转发,从而为冗余链路提供了更好的负载分担机制。应用场合单独使用 VRRP的组网方式图 1-2 VRRP 为网关提供冗余备份单独使用 VRRP 为网关提供冗余备份的组网方式如 图 1-2 所示:局域网内的主机通过二层 交换机接入两台网关设备 Device A 和 Device B , Device A 和 Device B 构成一台虚

4、拟路 由器, 为网关提供冗余备份, 以提高网关设备的可靠性。 这种组网方式虽然可以防止网关的 单点故障,但是仍然存在以下问题:? 不能防御所有的链路故障。例如,链路 a 和链路 c 同时发生故障时,局 域网内的主机将无法与外界通信。? 链路 a 或链路 b 出现故障时, 即使 Master 正常工作, 也会导致 Backup 接收不到 Master 发送的 VRRP 通告报文,从而错误地认为 Master 出现故障, 进行 Master 和 Backup 状态切换。VRRP与 MSTP配合使用的组网方式图 1-3 VRRP 与 MSTP 配合使用提高网络可靠性VRRP 与 MSTP 配合使用的

5、组网方式如 图 1-3 所示:在 Device A 和 Device B 之间增加心 跳线(链路 e )为下行链路提供冗余备份,并使用 MSTP 技术阻塞网络中的冗余链路以消 除二层环路。 采用这种组网方式, 不仅可以为网关设备提供冗余备份, 还可以为下行的二层 链路提供冗余备份,极大地提高了网络的可靠性。 VRRP 与 MSTP 配合使用的组网方式具 有以下优势:? 可以防御多种链路故障。只要上行链路(链路 c 和链路 d )、下行链路(链路 a 和链路 b )中各有一条可达链路, 即可保证通信不会中断。 例如,DeviceA 作为 Master 时,如果链路 a 和链路 c 同时出现故障,

6、 则通过链路 b 链路 e 链路 d 这条路径转发流量; 如果链路 a 和链路 d 同时出现故障, 则通过 VRRP 监视上行接口或链路功能降低 Device A 的优先级, 使得 Device B 成为 Master , 流量通过链路 b 链路 c 这条路径转发;如果链路 a 和链路 e 同时出现故障,则 Device B 接收不到 Device A 的通告报文,使得 Device B 成为 Master ,流 量通过链路 b 链路 c 这条路径转发。? 通过在 Device A 和 Device B 之间增加心跳线,避免链路 a 或链路 b 出 现故障、网关正常工作时错误地进行 Maste

7、r 和 Backup 状态切换。在 VRRP 与 MSTP 配合使用的组网方式中,心跳线链路 e 通常为聚合链路,以提高 可靠性。配置前提本文档不严格与具体软、 硬件版本对应, 如果使用过程中与产品实际情况有差异, 请参考相 关产品手册,或以设备实际情况为准。本文档中的配置均是在实验室环境下进行的配置和验证, 配置前设备的所有参数均采用出厂 时的缺省配置。 如果您已经对设备进行了配置, 为了保证配置效果, 请确认现有配置和以下 举例中的配置不冲突。配置举例组网需求? 局域网中采用 VRRP 技术进行网关设备的备份,提高网关的可靠性。当 一台网关设备出现故障时,局域网内的主机仍然可以通过另一台网

8、关设备访问 外部网络。? 在网关设备工作正常时, 区域 A 用户通过网关设备 Switch A 进行数据转发;区域 B 用户通过网关设备 Switch B 进行数据转发,实现流量的负载分担。? 当网关设备的上行链路出现故障时,降低该网关设备的优先级,以避免 该网关设备成为 Master ,导致流量转发中断。局域网内进行二层链路的冗余备份,保证网关设备下行链路故障时,流量转发不会中断。使用 MSTP 技术避免二层网络中出现环路。网关设备通过核心层的出口设备 Switch E 与 Internet 连接。通常情况下, 核心层会部署多台出口设备, 以提高网络的可靠性。 为了简化配置过程, 本文仅以一

9、台出口设备为例, 说明出口设备的配置方法。 多台出口设备时, 配置方法 与此类似。图 1-4 VRRP 与 MSTP 综合配置组网图设备接口IP 地址设备Switch AVlan-int10110.1.1.2/24Switch BVlan-int10210.2.1.2/24Vlan-int1000100.0.0.2/24Virtual IP 110.1.1.1/24Virtual IP 210.2.1.1/24Switch EVlan-int1000100.0.0.1/24Vlan-int2000200.0.0.1/24Vlan-int300030.0.0.1/24配置思路实现上述组网需求,需

10、要进行如下配置:? Switch A 、 Switch B 上分别创建两个 VRRP 备份组。? 配置 Switch A 在备份组 1 内具有更高的优先级, 即正常情况下 Switch A 作为备份组 1 的 Master 设备;配置 Switch B 在备份组 2 内具有更高的优先级, 即正常情况下 Switch B 作为备份组 2 的 Master 设备。? 区域 A 内的主机将备份组 1 的虚拟 IP 地址设置为网关, 区域 B 内的主机 将备份组 2 的虚拟 IP 地址设置为网关。 从而保证在网关设备工作正常时, 区域 A 用户通过网关设备 Switch A 进行数据转发, 区域 B

11、用户通过网关设备 Switch B 进行数据转发,实现流量的负载分担。? Switch A 、Switch B 上分别配置 VRRP 备份组监视上行接口,当上行接口出现故障时,降低路由器在备份组中的优先级。? Switch A 、 Switch B 和二层交换机之间启用 MSTP 多实例,并在各实例 中指定根桥和备份根桥。?在 Switch A 、Switch B 和 Switch E 之间配置 OSPF 路由协议。 Switch A和 Switch B 通过 OSPF 发布区域 A 和区域 B 所在网段的路由,以实现区域 A与区域 B 内主机与外部网络的三层互通。并在Switch A 和 S

12、witch B 上合理配置路由的 Cost 值,以便内网访问外网、 外网访问内网的双向流量通过同一台设 备处理。? Switch A 和 Switch B 之间的链路采用聚合链路,以提高心跳线的可靠 性。配置步骤设备 A 的配置# 配置端口 Ethernet1/1 属于 VLAN 1000 、 Ethernet1/3 属于 VLAN 102 、Ethernet1/4 属于 VLAN 101 。 system-viewSwitchA vlan 1000SwitchA-vlan1000 port ethernet 1/1SwitchA-vlan1000 quitSwitchA vlan 101Sw

13、itchA-vlan101 port ethernet 1/4SwitchA-vlan101 quitSwitchA vlan 102SwitchA-vlan102 port ethernet 1/3SwitchA-vlan102 quit# 创建二层聚合接口 1 。SwitchA interface bridge-aggregation 1SwitchA-Bridge-Aggregation1 quit # 分别将端口 Ethernet1/2 和 Ethernet1/5 加入到聚合组 1 中。SwitchA interface ethernet 1/2SwitchA-Ethernet1/2

14、port link-aggregation group 1 SwitchA-Ethernet1/2 quitSwitchA interface ethernet 1/5SwitchA-Ethernet1/5 port link-aggregation group 1 SwitchA-Ethernet1/5 quit# 配置二层聚合接口 1 为 Trunk 端口,并允许 VLAN 101 和 102 的报文通过。SwitchA interface bridge-aggregation 1SwitchA-Bridge-Aggregation1 port link-type trunkSwitchA

15、-Bridge-Aggregation1 port trunk permit vlan 101 to 102 SwitchA-Bridge-Aggregation1 undo port trunk permit vlan 1 SwitchA-Bridge-Aggregation1 port trunk pvid vlan 101 SwitchA-Bridge-Aggregation1 quit# 配置上行接口 IP 地址。SwitchA interface vlan-interface 1000SwitchA-Vlan-interface1000 ip address 100.0.0.2 24

16、 SwitchA-Vlan-interface1000 quit# 创建 Track 项 1 ,监视上行接口的物理状态。SwitchA track 1 interface vlan-interface 1000# 创建 VRRP 备份组 1,配置 Switch A 在备份组 1 中的优先级为 110。 SwitchA interface vlan-interface 101SwitchA-Vlan-interface101 ip address 10.1.1.2 24SwitchA-Vlan-interface101 vrrp vrid 1 virtual-ip 10.1.1.1SwitchA

17、-Vlan-interface101 vrrp vrid 1 priority 110# 配置 VRRP 备份组 1 监视 Track 项 1 的状态。 当 Track 项状态为 Negative (即上行接口 的物理状态为 down )时, Switch A 在备份组 1 的优先级降低 20 ,使得 Switch B 的优先 级高于 Switch A , Switch B 成为 Master 。SwitchA-Vlan-interface101 vrrp vrid 1 track 1 reduced 20 SwitchA-Vlan-interface101 quit# 创建 VRRP 备份组

18、 2 。SwitchA interface vlan-interface 102SwitchA-Vlan-interface102 ip address 10.2.1.2 24SwitchA-Vlan-interface102 vrrp vrid 1 virtual-ip 10.2.1.1SwitchA Vlan-interface102 quit# 配置 MSTP 。SwitchA stp region-configurationSwitchA-mst-region region-name vrrpSwitchA-mst-region instance 1 vlan 101SwitchA-m

19、st-region instance 2 vlan 102SwitchA-mst-region active region-configurationSwitchA-mst-region quitSwitchA stp instance 1 root primarySwitchA stp instance 2 root secondarySwitchA stp enable# 在上行接口上关闭 STP 功能。SwitchA interface ethernet 1/1SwitchA-Ethernet1/1 undo stp enableSwitchA-Ethernet1/1 quit# 配置

20、OSPF 发布网段路由。SwitchA ospfSwitchA-ospf-1 area 0SwitchA-ospf-1-area-0.0.0.0 network 100.0.0.0 0.0.0.255SwitchA-ospf-1-area-0.0.0.0 network 10.1.1.0 0.0.0.255SwitchA-ospf-1-area-0.0.0.0 network 10.2.1.0 0.0.0.255SwitchA-ospf-1-area-0.0.0.0 quitSwitchA-ospf-1 quit# 配置接口 Vlan-int102 的路由 Cost 值为 5 ,以便外网访问区

21、域 B 的报文优先通过 Switch B 转发。SwitchA interface vlan-interface 102SwitchA-Vlan-interface102 ospf cost 5SwitchA-Vlan-interface102 quit设备 B 的配置# 配置端口 Ethernet1/1 属于 VLAN 2000 、 Ethernet1/3 属于 VLAN 102 、Ethernet1/4 属于 VLAN 101 。 system-view SwitchB vlan 2000SwitchB-vlan2000 port ethernet 1/1SwitchB-vlan2000

22、quitSwitchB vlan 101SwitchB-vlan101 port ethernet 1/4SwitchB-vlan101 quitSwitchB vlan 102SwitchB-vlan102 port ethernet 1/3SwitchB-vlan102 quit# 创建二层聚合接口 1 。SwitchB interface bridge-aggregation 1SwitchB-Bridge-Aggregation1 quit# 分别将端口 Ethernet1/2 和 Ethernet1/5 加入到聚合组 1 中。SwitchB interface ethernet 1/

23、2SwitchB-Ethernet1/2 port link-aggregation group 1SwitchB-Ethernet1/2 quitSwitchB interface ethernet 1/5SwitchB-Ethernet1/5 port link-aggregation group 1SwitchB-Ethernet1/5 quit# 配置二层聚合接口 1 为 Trunk 端口,并允许 VLAN 101 和 102 的报文通过。SwitchB interface bridge-aggregation 1SwitchB-Bridge-Aggregation1 port lin

24、k-type trunkSwitchB-Bridge-Aggregation1 port trunk permit vlan 101 to 102SwitchB-Bridge-Aggregation1 undo port trunk permit vlan 1SwitchB-Bridge-Aggregation1 port trunk pvid vlan 101SwitchB-Bridge-Aggregation1 quit# 配置上行接口 IP 地址。SwitchB interface vlan-interface 2000SwitchB-Vlan-interface2000 ip addr

25、ess 200.0.0.2 24SwitchB-Vlan-interface2000 quit# 创建 Track 项 1 ,监视上行接口的物理状态。SwitchB track 1 interface vlan-interface 2000# 创建 VRRP 备份组 1 。SwitchB interface vlan-interface 101SwitchB-Vlan-interface101 ip address 10.1.1.3 24SwitchB-Vlan-interface101 vrrp vrid 1 virtual-ip 10.1.1.1SwitchB Vlan-interface

26、101 quit# 创建 VRRP 备份组 2,配置 Switch B 在备份组 2 中的优先级为 110 。SwitchB interface vlan-interface 102SwitchB-Vlan-interface102 ip address 10.2.1.3 24SwitchB-Vlan-interface102 vrrp vrid 1 virtual-ip 10.2.1.1SwitchB-Vlan-interface102 vrrp vrid 1 priority 110# 配置 VRRP 备份组 2 监视 Track 项 1 的状态。 当 Track 项状态为 Negativ

27、e (即上行接口 的物理状态为 down )时, Switch B 在备份组 2 的优先级降低 20,使得 Switch A 的优先级高于 Switch B , Switch A 成为 Master 。SwitchB-Vlan-interface102 vrrp vrid 1 track 1 reduced 20SwitchB-Vlan-interface102 quit# 配置 MSTP 。SwitchB stp region-configurationSwitchB-mst-region region-name vrrpSwitchB-mst-region instance 1 vlan

28、101SwitchB-mst-region instance 2 vlan 102SwitchB-mst-region active region-configurationSwitchB-mst-region quitSwitchB stp instance 2 root primarySwitchB stp instance 1 root secondarySwitchB stp enable# 在上行接口上关闭 STP 功能。SwitchB interface ethernet 1/1SwitchB-Ethernet1/1 undo stp enableSwitchB-Ethernet1

29、/1 quit# 配置 OSPF 发布网段路由。SwitchB ospfSwitchB-ospf-1 area 0SwitchB-ospf-1-area-0.0.0.0 network 200.0.0.0 0.0.0.255SwitchB-ospf-1-area-0.0.0.0 network 10.1.1.0 0.0.0.255SwitchB-ospf-1-area-0.0.0.0 network 10.2.1.0 0.0.0.255 SwitchB-ospf-1-area-0.0.0.0 quitSwitchB-ospf-1 quitSwitch# 配置接口 Vlan-int101 的路由

30、 Cost 值为 5 ,以便外网访问区域 A 的报文优先通过 A 转发。SwitchB interface vlan-interface 101SwitchB-Vlan-interface102 ospf cost 5SwitchB-Vlan-interface102 quit设备 C的配置# 配置 VLAN 101 。 system-viewSwitchC vlan 101SwitchC-vlan101 port ethernet 1/1 to ethernet 1/3SwitchC-vlan101 quit# 配置 MSTP 。SwitchC stp region-configuratio

31、nSwitchC-mst-region region-name vrrpSwitchC-mst-region instance 1 vlan 101SwitchC-mst-region instance 2 vlan 102SwitchC-mst-region active region-configurationSwitchC-mst-region quit SwitchC stp enable4.3.4设备 D的配置# 配置 VLAN 102 。 system-viewSwitchD vlan 102SwitchD-vlan102 port ethernet 1/1 to ethernet

32、 1/3SwitchD-vlan102 quit# 配置 MSTP 。SwitchD stp region-configurationSwitchD-mst-region region-name vrrpSwitchD-mst-region instance 1 vlan 101SwitchD-mst-region instance 2 vlan 102SwitchD-mst-region active region-configurationSwitchD-mst-region quitSwitchD stp enable4.3.5设备 E 的配置# 配置 VLAN 1000 。 syste

33、m-viewSwitchE vlan 1000SwitchE-vlan1000 port ethernet 1/1SwitchE-vlan1000 quit# 配置接口 Vlan-int1000 的 IP 地址。SwitchE interface vlan-interface 1000SwitchE-Vlan-interface1000 ip address 100.0.0.1 24SwitchE-Vlan-interface1000 quit# 配置 VLAN 2000 。SwitchE vlan 2000SwitchE-vlan2000 port ethernet 1/2SwitchE-v

34、lan2000 quit# 配置接口 Vlan-int2000 的 IP 地址。SwitchE interface vlan-interface 2000SwitchE-Vlan-interface2000 ip address 200.0.0.1 24SwitchE-Vlan-interface2000 quit# 配置 VLAN 3000 。SwitchE vlan 3000SwitchE-vlan3000 port ethernet 1/3SwitchE-vlan3000 quit# 配置接口 Vlan-int3000 的 IP 地址。SwitchE interface vlan-int

35、erface 3000SwitchE-Vlan-interface3000 ip address 30.0.0.1 24SwitchE-Vlan-interface3000 quit# 配置 OSPF 发布网段路由。SwitchE ospf SwitchE-ospf-1 area 0SwitchE-ospf-1-area-0.0.0.0 network 100.0.0.0 0.0.0.255SwitchE-ospf-1-area-0.0.0.0 network 200.0.0.0 0.0.0.255SwitchE-ospf-1-area-0.0.0.0 network 30.0.0.0 0.0

36、.0.255SwitchE-ospf-1-area-0.0.0.0 quitSwitchE-ospf-1 quit4.3.6 主机的配置配置区域 A 内主机的缺省网关为 10.1.1.1 ,区域 B 内主机的缺省网关为 10.2.1.1 ,具体配 置过程略。4.4 验证配置网关设备和链路均正常工作时, 验证局域网内主机是否可以与外部网络通信# 在 Switch A 和Switch B 上查看 VRRP备份组的信息。 可以看到 Switch A 在备份组 1中 为 Master , Switch B 在备份组 2 中为 Master ,从而保证区域 A 的主机通过 Switch A 与 外部通信

37、,区域 B 的主机通过 Switch B 与外部通信。 display vrrpIPv4 Standby Information:Run Mode : StandardRun Method: Virtual MACTotal number of virtual routers : 2Interface VRID State Run Adver Auth VirtualPriTimer TypeIPVlan101 1 Master 110 1 None 10.1.1.1Vlan102 1 Backup 100 1 None 10.2.1.1 display vrrpIPv4 Standby In

38、formation:Run Mode : StandardRun Method : Virtual MACTotal number of virtual routers : 2Interface VRID State Run Adver Auth VirtualPri Timer Type IPVlan1011Backup1001None10.1.1.1Vlan1021Master1101None10.2.1.1# 在 Switch C 上查看生成树状态。可以看到端口 Ethernet1/2 为替换端口,不可以转发流 量,从而避免环路。 display stp briefMSTIDPortRo

39、leSTP State Protection1Ethernet1/1ROOTFORWARDINGNONE1Ethernet1/2ALTEDISCARDINGNONE1Ethernet1/3DESIFORWARDINGNONE# 在 Switch D 上查看生成树状态。可以看到端口 Ethernet1/1 为替换端口,不可以转发流 量,从而避免环路。 display stp briefMSTIDPortRole STP StateProtection2Ethernet1/1ALTEDISCARDINGNONE2Ethernet1/2ROOTFORWARDINGNONE2Ethernet1/3DE

40、SIFORWARDINGNONE# 在区域 A 和区域 B 的主机上 ping 30.0.0.1 ,可以 ping 通。C: ping 30.0.0.1Pinging 30.0.0.1 with 32 bytes of data:Reply from 30.0.0.1: bytes=32 time=19ms TTL=254Reply from 30.0.0.1: bytes=32 time1ms TTL=254Reply from 30.0.0.1: bytes=32 time1ms TTL=254Reply from 30.0.0.1: bytes=32 time1ms TTL=254Pin

41、g statistics for 30.0.0.1:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:Minimum = 0ms, Maximum = 19ms, Average = 4ms# 在 Switch A 、 Switch B 和 Switch E 上开启 ICMP 超时报文发送功能。 system-viewSwitchA ip ttl-expires enable system-view SwitchB ip ttl-expires en

42、able system-view SwitchE ip ttl-expires enable# 在区域 A 内 IP 地址为 10.1.1.4 的主机上查看到达 30.0.0.1 的报文所经过的路径。 出,区域 A 内访问外网的报文通过 Switch A 转发。C: tracert 30.0.0.1Tracing route to 30.0.0.1 over a maximum of 30 hops1 23 ms 1 ms 1 ms 10.1.1.22 1 ms 1 ms tracert 30.0.0.1Tracing route to 30.0.0.1 over a maximum of 3

43、0 hops1 13 ms 1 ms 1 ms 10.2.1.32 1 ms 1 ms 1 ms 30.0.0.1Trace complete.# 在 Switch E 上查看到达 10.1.1.4 (区域 A 内某主机的 IP地址)的报文所经过的路径。可以看出,外网访问区域 A 内主机的报文通过 Switch A 转发。SwitchE tracert 10.1.1.4traceroute to 10.1.1.4(10.1.1.4) 30 hops max,40 bytes packet, press CTRL_C to break1 100.0.0.2 2 ms 1 ms 1 ms2 10.

44、1.1.4 1 ms 1 ms 1 ms# 在Switch E 上查看到达 10.2.1.4 (区域 B内某主机的 IP地址)的报文所经过的路径。可以看出,外网访问区域 B 内主机的报文通过 Switch B 转发。SwitchE tracert 10.2.1.4traceroute to 10.2.1.4(10.2.1.4) 30 hops max,40 bytes packet, press CTRL_C to break1 200.0.0.2 1 ms 2 ms 1 ms2 10.2.1.4 1 ms 1 ms 1 ms一台网关设备出现故障后,验证局域网内主机是否可以与外部网络通信# 保

45、存当前配置后,重启 Switch A 。 save config.cfgThe current configuration will be saved to flash:/config.cfg. Continue? Y/N:yflash:/config.cfg exists, overwrite? Y/N:yNow saving current configuration to the device.Saving configuration flash:/config.cfg. Please wait.Configuration is saved to flash successfully.

46、rebootStart to check configuration with next startup configuration file, please wait.DONE!This command will reboot the device. Continue? Y/N:y# 在 Switch B 上查看 VRRP 备份组的信息。可以看到 Switch B 在备份组 1 和备份组 2 中 均为 Master ,区域 A 和区域 B 的流量均通过 Switch B 转发。 display vrrpIPv4 Standby Information:Run Mode : StandardR

47、un Method: Virtual MACTotal number of virtual routers : 2InterfaceVRID StateRunAdverAuthVirtualPriTimerTypeIPVlan1011Master100 1None10.1.1.1Vlan1021Master110 1None10.2.1.1# 在区域A 和区域 B 的主机上ping 30.0.0.1 ,均可以 ping通。(具体验证过程略)# 在区域 A 内 IP 地址为 10.1.1.4 的主机上查看到达 30.0.0.1 的报文所经过的路径。 可以看 出,区域 A 内访问外网的报文通过 S

48、witch B 转发。C: tracert 30.0.0.1Tracing route to 30.0.0.1 over a maximum of 30 hops1 12 ms 1 ms 1 ms 10.1.1.32 1 ms 1 ms tracert 30.0.0.1Tracing route to 30.0.0.1 over a maximum of 30 hops1 23 ms 1 ms 1 ms 10.2.1.32 1 ms 1 ms 1 ms 30.0.0.1Trace complete.# 在 Switch E 上查看到达 10.1.1.4 (区域 A 内某主机的 IP地址)的报文

49、所经过的路径。可 以看出,外网访问区域 A 内主机的报文通过 Switch B 转发。 tracert 10.1.1.4traceroute to 10.1.1.4(10.1.1.4) 30 hops max,40 bytes packet, press CTRL_C to break1 200.0.0.2 1 ms 1 ms 1 ms2 10.1.1.4 1 ms 1 ms 1 ms# 在 Switch E 上查看到达 10.2.1.4 (区域 B内某主机的 IP地址)的报文所经过的路径。可以看出,外网访问区域 B 内主机的报文通过 Switch B 转发。 tracert 10.2.1.4

50、 traceroute to 10.2.1.4(10.2.1.4) 30 hops max,40 bytes packet, press CTRL_C to break1 200.0.0.2 1 ms 2 ms 1 ms2 10.2.1.4 1 ms 1 ms 1 ms链路出现故障时,验证局域网内主机是否可以与外部网络通信区域 A 和区域 B 的网络是对称的,此处仅以区域 A 为例,验证链路出现故障时,局域网内 主机是否可以与外部网络通信。为了简化描述,对区域 A 与外部网络通信过程中涉及的链 路进行命名,如 图 1-5 所示。图 1-5 区域 A 与外部通信的网络链路 a 和链路 c 同时出

51、现故障时,验证局域网内主机是否可以与外部网络通信# 在 Switch A 上关闭接口 Ethernet1/4 。 system-viewSwitchA interface ethernet 1/4SwitchA-Ethernet1/4 shutdownSwitchA-Ethernet1/4 quit# 在 Switch B 上关闭接口 Ethernet1/1 。 system-viewSwitchB interface ethernet 1/1SwitchB-Ethernet1/1 shutdownSwitchB-Ethernet1/1 quit# 在 Switch A 和 Switch B

52、上查看 VRRP 备份组的信息。 可以看到由于上行接口故障, Switch B 在备份组 2 中的优先级降低为 90 。 Switch A 在备份组 1 和备份组 2 中均为 Master ,区 域 A 和区域 B 的流量均通过 Switch A 转发。SwitchA display vrrpIPv4 Standby Information:Run Mode : StandardRun Method: Virtual MACTotal number of virtual routers : 2Interface VRID State Run Adver Auth VirtualPriTimer

53、 TypeIPVlan1011Master1101None10.1.1.1Vlan1021Master1001None10.2.1.1SwitchB display vrrpIPv4 Standby Information:Run Mode: StandardRun Method: Virtual MACTotal number of virtual routers : 2Interface VRID State Run Adver Auth VirtualPri Timer Type IPVlan101 1 Backup 100 1 None 10.1.1.1Vlan102 1 Backup

54、 90 1 None 10.2.1.1# 在 Switch C 上查看生成树状态。 可以看到端口 Ethernet1/2 变为根端口, 可以转发流量。 display stp briefMSTIDPortRoleSTP State Protection1Ethernet1/2ROOTFORWARDING NONE1Ethernet1/3DESIFORWARDING NONE# 在区域 A 的主机上 ping 30.0.0.1 ,可以 ping 通。(具体验证过程略)# 在区域 A 内 IP 地址为 10.1.1.4 的主机上查看到达 30.0.0.1 的报文所经过的路径。 可以看 出,区域 A

55、 内访问外网的报文通过 Switch A 转发。C: tracert 30.0.0.1Tracing route to 30.0.0.1 over a maximum of 30 hops1 12 ms 1 ms 1 ms 10.1.1.22 1 ms 1 ms 1 ms 30.0.0.1Trace complete.# 在 Switch E 上查看到达 10.1.1.4 (区域 A 内某主机的 IP地址)的报文所经过的路径。可 以看出,外网访问区域 A 内主机的报文通过 Switch A 转发。 tracert 10.1.1.4traceroute to 10.1.1.4(10.1.1.4)

56、 30 hops max,40 bytes packet, press CTRL_C to break1 100.0.0.2 2 ms 2 ms 1 ms2 10.1.1.4 1 ms 1 ms 1 ms? 链路 a 和链路 d 同时出现故障时,验证局域网内主机是否可以与外部网 络通信# 在 Switch A 上关闭接口 Ethernet1/1 和 Ethernet1/4 。 system-viewSwitchA interface ethernet 1/1SwitchA-Ethernet1/1 shutdownSwitchA-Ethernet1/1 quitSwitchA interface

57、 ethernet 1/4SwitchA-Ethernet1/4 shutdown SwitchA-Ethernet1/4 quit# 在 Switch A 和 Switch B 上查看 VRRP 备份组的信息。 可以看到由于上行接口故障, SwitchA 在备份组 1 中的优先级降低为 90 。 Switch B 在备份组 1 和备份组 2 中均为 Master ,区 域 A 和区域 B 的流量均通过 Switch B 转发。SwitchA display vrrpIPv4 Standby Information:Run Mode : StandardRun Method: Virtual

58、MACTotal number of virtual routers : 2Interface VRID State Run Adver Auth VirtualPri Timer Type IPVlan101 1 Backup 90 1 None 10.1.1.1Vlan102 1 Backup 100 1 None 10.2.1.1 SwitchB display vrrpIPv4 Standby Information:Run Mode : StandardRun Method : Virtual MACTotal number of virtual routers : 2Interfa

59、ce VRID State Run Adver Auth VirtualPri Timer Type IPVlan101 1 Master 100 1 None 10.1.1.1Vlan1021 Master1101 None10.2.1.1# 在 Switch C 上查看生成树状态。可以看到端口 Ethernet1/2 为根端口,可以转发流量。 display stp briefMSTIDPortRoleSTP State Protection1Ethernet1/2ROOTFORWARDINGNONE1Ethernet1/3DESIFORWARDINGNONE# 在区域 A 的主机上 pi

60、ng 30.0.0.1 ,可以 ping 通。(具体验证过程略)# 在区域 A 内 IP 地址为 10.1.1.4 的主机上查看到达 30.0.0.1 的报文所经过的路径。 可以看 出,区域 A 内访问外网的报文通过 Switch B 转发。C: tracert 30.0.0.1Tracing route to 30.0.0.1 over a maximum of 30 hops1 12 ms 1 ms1 ms 10.1.1.32 1 ms 1 ms1 ms 30.0.0.1Trace complete.# 在 Switch E 上查看到达 10.1.1.4 (区域 A 内某主机的 IP 地址

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论