本案例采用H3C HCL模拟器来模拟RSTP的部署,在网络拓扑图中已经明确标识了具体的设备和VLAN划分,其中SW部署IRF模式,SW2和SW3为接入交换机,为了实现链路冗余,将SW2和SW3连接起来,接着使用STP COST来指定端口的开销来实现链路的“主备”,在该网络拓扑中,SW2和SW3互联的端口都配置STP COST为100,这样不仅能避免物理环路,还能实现链路冗余。
1、部署SW的IRF:
1号设备IRF部署:
<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]irf member 1 renumber 1
Renumbering the member ID may result in configuration change or loss. Continue?[Y/N]:y
[H3C]int range ten 1/0/49 to ten 1/0/50
[H3C-if-range]shutdown
[H3C-if-range]quit
[H3C]irf-port 1/1
[H3C-irf-port1/1]port group interface Ten-GigabitEthernet 1/0/49
[H3C-irf-port1/1]port group interface Ten-GigabitEthernet 1/0/50
[H3C-irf-port1/1]quit
[H3C]int range ten 1/0/49 to ten 1/0/50
[H3C-if-range]undo shutdown
[H3C-if-range]quit
[H3C]irf-port-configuration active
[H3C]%Oct 24 10:07:34:375 2020 H3C STM/6/STM_LINK_UP: IRF port 1 came up.
[H3C]save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[flash:/startup.cfg]
(To leave the existing filename unchanged, press the enter key):
Validating file. Please wait...
Saved the current configuration to mainboard device successfully.
2号设备IRF部署:
[H3C]irf member 1 renumber 2
Renumbering the member ID may result in configuration change or loss. Continue?[Y/N]:y
[H3C]int range ten 1/0/49 to ten 1/0/50
[H3C-if-range]shutdown
[H3C-if-range]quit
[H3C]irf-port 1/2
[H3C-irf-port1/2]port group interface Ten-GigabitEthernet 1/0/49
[H3C-irf-port1/2]port group interface Ten-GigabitEthernet 1/0/50
[H3C-irf-port1/2]quit
[H3C]int range ten 1/0/49 to ten 1/0/50
[H3C-if-range]undo shutdown
[H3C-if-range]quit
[H3C]save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[flash:/startup.cfg]
(To leave the existing filename unchanged, press the enter key):
Validating file. Please wait...
Saved the current configuration to mainboard device successfully.
[H3C]irf-port-configuration active
[H3C]%Oct 24 10:10:59:609 2020 H3C STM/6/STM_LINK_UP: IRF port 2 came up.
[H3C]save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[flash:/startup.cfg]
(To leave the existing filename unchanged, press the enter key):
flash:/startup.cfg exists, overwrite? [Y/N]:y
Validating file. Please wait...
Saved the current configuration to mainboard device successfully.
重启部署了IRF的两台设备。
IRF部署已完成:
1、配置SW的VLAN及RSTP
<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]sysname SW
[SW]vlan 10
[SW-vlan10]quit
[SW]vlan 20
[SW-vlan20]quit
[SW]int range gi 1/0/1 gi 2/0/1
[SW-if-range]port link-type trunk
[SW-if-range]undo port trunk permit vlan 1
[SW-if-range]port trunk permit vlan 10 20
[SW-if-range]quit
[SW-if-range]quit
[SW]int vlan 10
[SW-Vlan-interface10]ip address 192.168.10.1 24
[SW-Vlan-interface10]quit
[SW]int vlan 20
[SW-Vlan-interface20]ip address 192.168.20.1 24
[SW-Vlan-interface20]quit
[SW]stp global enable
[SW]stp mode rstp
[SW]stp priority 0
SW2配置:
<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]sysname SW2
[SW2]vlan 10
[SW2-vlan10]quit
[SW2]vlan 20
[SW2-vlan20]quit
[SW2]int range gi 1/0/1 to gi 1/0/2
[SW2-if-range]port link-type trunk
[SW2-if-range]undo port trunk permit vlan 1
[SW2-if-range]port trunk permit vlan 10 20
[SW2-if-range]quit
[SW2]int gi 1/0/3
[SW2-GigabitEthernet1/0/3]port link-type access
[SW2-GigabitEthernet1/0/3]port access vlan 10
[SW2-GigabitEthernet1/0/3]stp edged-port
Edge port should only be connected to terminal. It will cause temporary loops if port GigabitEthernet1/0/3 is connected to bridges. Please use it carefully.
[SW2-GigabitEthernet1/0/3]quit
[SW2]stp global enable
[SW2]stp mode rstp
[SW2]int gi 1/0/2
[SW2-GigabitEthernet1/0/2]stp cost 100
[SW2-GigabitEthernet1/0/2]quit
SW3配置:
<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]sysname SW3
[SW3]vlan 10
[SW3-vlan10]quit
[SW3]vlan 20
[SW3-vlan20]quit
[SW3]int range gi 1/0/1 to gi 1/0/2
[SW3-if-range]port link-type trunk
[SW3-if-range]undo port trunk permit vlan 1
[SW3-if-range]port trunk permit vlan 10 20
[SW3-if-range]quit
[SW3]int gi 1/0/3
[SW3-GigabitEthernet1/0/3]port link-type access
[SW3-GigabitEthernet1/0/3]port access vlan 20
[SW3-GigabitEthernet1/0/3]stp edged-port
Edge port should only be connected to terminal. It will cause temporary loops if port GigabitEthernet1/0/3 is connected to bridges. Please use it carefully.
[SW3-GigabitEthernet1/0/3]quit
[SW3]stp global enable
[SW3]stp mode rstp
[SW3]int gi 1/0/2
[SW3-GigabitEthernet1/0/2]stp cost 100
[SW3-GigabitEthernet1/0/2]quit
填写PC的IP,并测试PING网关:
切换演练开始:
在网络正常时的STP根桥和STP端口的状态如下:
SW:
SW2:
SW3:
根据SW3反馈的STP端口状态,G1/0/1为根端口,G1/0/2被阻塞掉了。
在网络正常时,根桥稳定,各端口都在正常的状态内,仅SW3的G1/0/2端口被阻塞,因此没有成环。
切换演练:
断开SW的gi 1/0/1端口,并查看STP的状态和STP端口状态:
SW:
SW2:
根据SW2反馈的情况来看,GI 1/0/2已经切换为根端口
SW3:
SW3的根端口没有变动,因为SW3有直连链路到SW上。
PC PING 不丢包:
恢复SW的GI 1/0/1端口,并关闭GI 2/0/1端口:
查看SW:
SW2:
根据SW2反馈的情况来看,GI 1/0/2端口已从阻塞状态切换到指定端口
SW3:
根据SW3反馈的情况来看,GI 1/0/2端口已切换到根端口。
恢复网络,重新开启SW的GI 2/0/1端口:
再次分别查看SW、SW2、SW3的状态,已正常切换回来:
至此,S5820 RSTP典型组网配置案例1及切换演练已完成!
该案例暂时没有网友评论
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作