对齐方式
公司总部核心交换机到下联机构原本一条同城专线,下联机构有2台S5120V2,2台设备间原本用网线端口聚合连接,原本下联专线只有一条,连载S5120V2-A交换机上。
为了增加网络的冗余性和抗风险性,现在准备再拉另一运营商的一条同城专线到下联结构准备连在S5120V2-B上。
请问可否进行一定的限制,让S5120V2-A到S5120V2-B的线路,平时阻塞,当A或B上联专线故障时,打通A-B间的链路?
能否有大佬指导,如何个方案,并给点具体实施案例,谢谢。
(0)
最佳答案
交换机使用二层接口互联接成环路时,可以通过生成树协议进行防环,正常情况下AB之间为阻塞状态,如果专线断开,AB之间的线路会变为转发状态。
确认专线可以转发stp报文,将生成树的根桥设置在5560x即可
# 在MSTP模式下,配置设备为根桥。
<Sysname> system-view
[Sysname] stp root primary
(0)
您好,请知:
可以考虑STP,以下是配置案例,请参考:
本案例采用H3C HCL模拟器来模拟STP的部署,在网络拓扑图中已经明确标识了具体的设备和VLAN划分,其中SW部署IRF模式,SW2和SW3为接入交换机,为了实现链路冗余,将SW2和SW3连接起来,接着使用STP COST来指定端口的开销来实现链路的“主备”,在该网络拓扑中,SW2和SW3互联的端口都配置STP COST为100,这样不仅能避免环路,还能实现链路冗余。
1、部署SW的IRF:
1号设备IRF部署:
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及STP
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 stp
[SW]stp priority 0
SW2配置:
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 stp
[SW2]int gi 1/0/2
[SW2-GigabitEthernet1/0/2]stp cost 100
[SW2-GigabitEthernet1/0/2]quit
SW3配置:
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 stp
[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 丢包14个即可恢复:
恢复SW的GI 1/0/1端口,并关闭GI 2/0/1端口:
查看SW:
SW2:
根据SW2反馈的情况来看,GI 1/0/2端口没有变动,因为SW2直连到SW
SW3:
根据SW3反馈的情况来看,GI 1/0/2端口已切换到根端口。
恢复网络,重新开启SW的GI 2/0/1端口:
再次分别查看SW、SW2、SW3的状态,已正常切换回来:
(0)
(1)
正常时pc走a,视频走b,故障时都走好的那个,当然想平时都走a,a故障则都走b也可以,让a做全部的跟桥和master就可以
正常时pc走a,视频走b,故障时都走好的那个,当然想平时都走a,a故障则都走b也可以,让a做全部的跟桥和master就可以
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
https://www.h3c.com/cn/d_202009/1332178_30005_0.htm