如需注册 @ccie.engineer、@ccde.engineer、@ccar.engineer、@hcie.engineer、@rhce.engineer 和 @cissp.engineer 邮箱,请点击这里。 |
传送门:CCIE RS V5 考试 LAB1 实验详解:Section 1.2 Layer 2 ports
Section 1.3 Spanning tree

根据下列需求配置 ACME 的网络:
- SW1 必须是奇数 VLAN 的根交换机,同时必须是偶数 VLAN 的备份根交换机。(需求一)
- SW2 必须是偶数 VLAN 的根交换机,同时必须是奇数 VLAN 的备份根交换机。(需求一)
- SW3 必须是奇数 VLAN 的根交换机,同时必须是偶数 VLAN 的备份根交换机。(需求一)
- SW4 必须是偶数 VLAN 的根交换机,同时必须是奇数 VLAN 的备份根交换机。(需求一)
- 清楚地配置根和备份根的角色,确保其他交换机在未来使用缺省配置后最终也能加入到网络中来。(就是显式配置根和备份根的角色,缺省配置就是默认优先级 32768;需求一)
- 所有交换机必须针对每一个 VLAN 维护一个 STP 生成树实例。(需求二)
- 使用的 STP 生成树模式只能有 3 个状态。(只有 3 个状态,就是使用快速生成树;需求二)
- 所有的 access port 必须快速进入转发状态,也必须参与到 STP 生成树中去。在每个交换机上使用一条命令去完成这个特性。(意思就是开启默认 portfast;需求二)
- access port 如果收到了任何 BPDU 必须自动 shutdown,shutdown 后必须由管理员手动重启接口。在每个交换机上使用一条命令去完成这个特性。(意思就是开启默认 BPDU guard;需求二)
需求一:
SW01(config)#do show vlan brief VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Et4/0, Et4/1, Et4/2, Et4/3 Et5/0, Et5/1, Et5/2, Et5/3 14 VLAN0014 active Et1/0 15 VLAN0015 active Et0/0, Et1/1 23 VLAN0023 active Et0/1, Et0/2 24 VLAN0024 active Et0/3 35 VLAN0035 active 46 VLAN0046 active 57 VLAN0057 active 67 VLAN0067 active Et1/2, Et1/3 999 VLAN0999 active Et3/0, Et3/1, Et3/2, Et3/3 1002 fddi-default act/unsup 1003 trcrf-default act/unsup 1004 fddinet-default act/unsup 1005 trbrf-default act/unsup SW01(config)#spanning-tree vlan 1,15,23,35,57,67,999 root primary —— SW1 必须是奇数 vlan 的根交换机,root primary 就是显式配置根角色 SW01(config)#spanning-tree vlan 14,24,46 root secondary —— SW1 同时必须是偶数 vlan 的备份根交换机 SW02(config)#spanning-tree vlan 1,15,23,35,57,67,999 root secondary —— 因为 SW1 和 SW2 是反过来的,所以在 SW1 的基础上复制一下命令,改一下交换机的角色就好 SW02(config)#spanning-tree vlan 14,24,46 root primary SW03(config)#do show vlan brief VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Et4/0, Et4/1, Et4/2, Et4/3 Et5/0, Et5/1, Et5/2, Et5/3 34 VLAN0034 active 38 VLAN0038 active 49 VLAN0049 active Et0/1 89 VLAN0089 active Et0/0 111 VLAN0111 active Et0/2 310 VLAN0310 active 411 VLAN0411 active Et0/3 999 VLAN0999 active Et1/0, Et1/1, Et1/2, Et1/3 Et3/0, Et3/1, Et3/2, Et3/3 1002 fddi-default act/unsup 1003 trcrf-default act/unsup 1004 fddinet-default act/unsup 1005 trbrf-default act/unsup SW03(config)#spanning-tree vlan 1,49,89,111,411,999 root primary SW03(config)#spanning-tree vlan 34,38,310 root secondary SW04(config)#spanning-tree vlan 1,49,89,111,411,999 root secondary SW04(config)#spanning-tree vlan 34,38,310 root primary
需求二:
SW01/02/03/04(config)#spanning-tree mode rapid-pvst SW01/02/03/04(config)#spanning-tree portfast default %Warning: this command enables portfast by default on all interfaces. You should now disable portfast explicitly on switched ports leading to hubs, switches and bridges as they may create temporary bridging loops. SW01/02/03/04(config)#spanning-tree portfast bpduguard default
该 section 用到的一些 show 命令:
SW01#show spanning-tree summary Switch is in rapid-pvst mode —— 这里查看 STP mode Root bridge for: VLAN0001, VLAN0015, VLAN0023, VLAN0035, VLAN0057, VLAN0067 VLAN0999 —— 这里查看哪些 VLAN 是根 EtherChannel misconfig guard is enabled Extended system ID is enabled Portfast Default is enabled —— 这里查看是否开启 Portfast PortFast BPDU Guard Default is enabled —— 这里查看是否开启 BPDU Guard Portfast BPDU Filter Default is disabled Loopguard Default is disabled UplinkFast is disabled BackboneFast is disabled Configured Pathcost method used is short Name Blocking Listening Learning Forwarding STP Active ---------------------- -------- --------- -------- ---------- ---------- VLAN0001 0 0 0 12 12 VLAN0014 3 0 0 2 5 VLAN0015 0 0 0 6 6 VLAN0023 0 0 0 6 6 VLAN0024 3 0 0 2 5 VLAN0035 0 0 0 4 4 VLAN0046 3 0 0 1 4 Name Blocking Listening Learning Forwarding STP Active ---------------------- -------- --------- -------- ---------- ---------- VLAN0057 0 0 0 4 4 VLAN0067 0 0 0 6 6 VLAN0999 0 0 0 4 4 ---------------------- -------- --------- -------- ---------- ---------- 10 vlans 9 0 0 47 56
注意点:
在考试时注意查看 SW1 – SW4 所有 trunk 的双工模式,如果是半双工,那么它的接口类型将为 share,由于 RSTP 只有在 point-to-point 的接口类型下,才能实现 STP 快速收敛。所以建议在考试中,如果 trunk 的接口类型为 share,最好将其修改为 point-to-point ,命令如下:
SW1 - SW4 int range e 2/0-3 spanning-tree link-type point-to-point
发表评论?