华为交换机级联/级连(串联)的配置

基于实际情况遇到,本来一栋楼里面的楼层汇聚交换机一共是有三台的,但是由于某些原因,导致了有一台交换机与机房的汇聚交换机的光纤不通,大概是被老鼠咬断或者是其他原因导致链路不通,更巧的是,楼层的12芯的纤盘的光纤又已经用完了,那这种情况该怎么办呢?那只能是使用级联或者是堆叠的方法了,但是堆叠那些交换机不一定支持,而且配置堆叠的工程中,另一台交换机也会出现断网的情况,所以使用级联的方式是最好的了。

关于级联的理解:这个接看个人吧,可以叫级联或者是级连,也可以叫串联,重要的是你自己能理解就行了。

注意1:楼层的接入交换机可以使用堆叠或者是级联还有直连汇聚的办法。堆叠看当初的网络规划吧,也可以使用,基本上是直连,更加没有你们想要说的STP了。

注意2:大家在配置交换机上行端口的时候,尽量不要允许vlan1 或者是全部的vlan通过,允许对应或者是相关的vlan通过就可以了

注意3:这个是要非常注意的,那就是你要用级联的话,比如JR2要接到JR1当中,你JR1的交换机必须要有JR2当中的对应的vlan,而且上行口也要放行这些对应的vlan通过,汇聚的那个端口也是一样的操作,不然的话,你JR2的业务是不行的,网络也是用不了的。

疑问1:为什么PC2要用172的IP地址?是为了好区分一点,让你们看得明白一点

疑问2:为什么还要配置telnet远程?因为正常的实际情况当中二层的交换机都是要配置telnet远程的,方便管理

疑问3:为什么不用dhcp配置?为了让你们更加易懂.

拓扑图如图所示:

配置脚本如下:

汇聚交换机HJ
sys
sysname HJ
undo info-center enable
vlan batch 10 20 30 100
interface Vlanif10
 ip address 192.168.10.254 255.255.255.0
quit
interface Vlanif20
 ip address 172.16.20.254 255.255.255.0
quit
interface Vlanif30
 ip address 192.168.30.254 255.255.255.0
quit
interface Vlanif100
 ip address 172.16.100.254 255.255.255.0
quit
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 10 20 100
quit
interface GigabitEthernet0/0/3
 port link-type trunk
 port trunk allow-pass vlan 20 100
quit
interface GigabitEthernet0/0/4
 port link-type trunk
 port trunk allow-pass vlan 30 100
quit


接入交换机 JR1
sys
sysname JR1
undo info-center enable
vlan batch 10 20 100
interface Vlanif100
 ip address 172.16.100.1 255.255.255.0
quit
interface Ethernet0/0/1
 port link-type access
 port default vlan 10
quit
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 10 20 100
quit
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan  20 100
quit
user-interface vty  0 4
protocol  inbound  telnet 
authentication-mode password 
set authentication  password   cipher  Aa@123456
user privilege level 15
quit
ip route-static 0.0.0.0 0.0.0.0 172.16.100.254

接入交换机 JR2
sys
sysname JR2
undo info-center enable
vlan batch 20 100
interface Vlanif100
 ip address 172.16.100.2 255.255.255.0
quit
interface Ethernet0/0/1
 port link-type access
 port default vlan 20
quit
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 20 100
quit
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan  20 100
quit
user-interface vty  0 4
protocol  inbound  telnet 
authentication-mode password 
set authentication  password   cipher  Aa@123456
user privilege level 15
quit
ip route-static 0.0.0.0 0.0.0.0 172.16.100.254


sys
sysname JR3
undo info-center enable
vlan batch 30 100
interface Vlanif100
 ip address 172.16.100.3 255.255.255.0
quit
interface Ethernet0/0/1
 port link-type access
 port default vlan 30
quit
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 30 100
quit
user-interface vty  0 4
protocol  inbound  telnet 
authentication-mode password 
set authentication  password   cipher  Aa@123456
user privilege level 15
quit
ip route-static 0.0.0.0 0.0.0.0 172.16.100.254

正常情况下网络都是互通的,验证如下:

telnet远程验证:

模拟故障出现,网络出现不通:

使用级联的配置后网络恢复

拓扑变成这样

telnet远程配置验证也没有问题:

综上所述,使用了级联使得网络恢复了正常。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值