华为交换机堆叠配置(华为交换机堆叠配置有几种方法)

网友投稿 2629 2022-09-10


华为交换机堆叠配置(华为交换机堆叠配置有几种方法)

堆叠配置

是私有技术,各厂商的堆叠技术并不兼容,堆叠要求堆叠的成员设备必须型号相同(大版本相同),需要参考华为官方说明:

​​​​华为堆叠分两种

istack 面向盒式交换机

css 面向框式交换机

40.2 堆叠配置

Sw1(1、2口)------------- Sw2(1、2口)

分四个步骤:1成员编号 2配置优先级 3配置堆叠互联口 4链路聚合

40.2.1 成员编号(成员ID)

默认都是0,slot槽位号也是成员ID号,如 g0/0/1 最前面的0就是槽位,第二个0是子卡

[sw2]dis stack # 查看编号命令

Stack mode: Service-port

Stack topology type: Link

Stack system MAC: f4b7-8dc4-d6be

MAC switch delay time: 10 min

Stack reserved VLAN: 4093

Slot of the active management port: --

Slot Role MAC Address Priority Device Type

0 Master f4b7-8dc4-d6be 100 S5720S-28P-LI-AC

[sw2]dis int bri # 这个也可以查看槽位号GigabitEthernet0/0/1

PHY: Physical

*down: administratively down

#down: LBDT down

(l): loopback

(s): spoofing

(b): BFD down

(e): ETHOAM down

(dl): DLDP down

(lb): LBDT block

(o): Observe-port forwarding down

InUti/OutUti: input utility/output utility

Interface PHY Protocol InUti OutUti inErrors outErrors

GigabitEthernet0/0/1 up up 0% 0% 0 0

GigabitEthernet0/0/2 up up 0% 0% 0 0

GigabitEthernet0/0/3 down down 0% 0% 0 0

[sw2]stack slot 0 renumber 1 # 修改槽位号为1

Warning: All the configurations related to the slot ID will be lost after the slot ID is modified.

Do not frequently modify the slot ID because it will make the stack split. Continue? [Y/N]:y...

Info: Stack configuration has been changed, and the device needs to restart to make the configuration effective.

reboot # 完成后需要重启

Info: The system is now comparing the configuration, please wait...........................

Warning: The configuration has been modified, and it will be saved to the next startup saved-configuration file . Continue? [Y/N]:y

Now saving the current configuration to the slot 0...........

Save the configuration successfully.

Info: If want to reboot with saving diagnostic information, input 'N' and then execute 'reboot save diagnostic-information'.

System will reboot! Continue?[Y/N]:y

查看结果

[sw2]dis stack

Stack mode: Service-port

Stack topology type: Link

Stack system MAC: f4b7-8dc4-d6be

MAC switch delay time: 10 min

Stack reserved VLAN: 4093

Slot of the active management port: --

Slot Role MAC Address Priority Device Type

1 Master f4b7-8dc4-d6be 105 S5720S-28P-LI-AC

[sw2]dis int bri

PHY: Physical

*down: administratively down

#down: LBDT down

(l): loopback

(s): spoofing

(b): BFD down

(e): ETHOAM down

(dl): DLDP down

(lb): LBDT block

(o): Observe-port forwarding down

InUti/OutUti: input utility/output utility

Interface HY Protocol InUti OutUti inErrors outErrors

GigabitEthernet1/0/1 up up 0% 0% 0 0

GigabitEthernet1/0/2 up up 0% 0% 0 0

GigabitEthernet1/0/3 down down 0% 0% 0 0

40.2.2 配置优先级

先出主交换机,一主一备多从。默认优先级都是100,数字越大越优先,如果优先级相同看主板mac,mac越小越好。

注意:先启动的设备担任主设备。意思是优先级100的先启动,优先级105的后启动,那优先级100的先启动就是主,不抢占原则。

如果非要抢占需要手动主备切换,命令为slave switchover (华为、华三)

[sw1]slave ?

restart Restart slave board

switchover HA switch slave to master

[sw1]stack slot 0 priority 105 # 配置优先级为105

Warning: Do not frequently modify the priority because it will make the stack split. Continue? [Y/N]:y....

[sw1]dis stack # 查看优先级

Stack mode: Service-port

Stack topology type: Link

Stack system MAC: f4b7-8dc4-d6be

MAC switch delay time: 10 min

Stack reserved VLAN: 4093

Slot of the active management port: --

Slot Role MAC Address Priority Device Type

0 Master f4b7-8dc4-d6ba 105 S5720S-28P-LI-AC

40.2.3 配置堆叠互联口

创建逻辑的堆叠口,必须交叉互联

sw1

[sw1]int stack-port 0/? # 0/? 里面的0是slot槽位号

<1-2> Port number # 只能创建2个

[sw1]int stack-port 0/1 # 创建逻辑接口0/1

[sw1-stack-port0/1]port int g0/0/1 enable #把g0/0/1 放置到逻辑接口0/1里面

Warning: Enabling stack function may cause configuration loss on the interface. Continue? [Y/N]:y

[sw1-stack-port0/1]port int g0/0/2 en #把g0/0/2 放置到逻辑接口0/1里面

Warning: Enabling stack function may cause configuration loss on the interface. Continue? [Y/N]:y

查看配置

[sw1]dis stack configuration

---------------Configuration on slot 0 Begin---------------

stack enable

stack slot 0 renumber 0

stack slot 0 priority 105

stack reserved-vlan 4093

stack timer mac-address switch-delay 10

interface stack-port 0/1

port interface GigabitEthernet0/0/1 enable

port interface GigabitEthernet0/0/2 enable

interface stack-port 0/2

---------------Configuration on slot 0 End-----------------

sw2

[sw2]int stack-port 1/2 # 创建逻辑接口, 交叉互联

[sw2-stack-port1/2]port int g1/0/3 to g1/0/4 enable # 可以同时放置多个

注:实际操作时port int g1/0/1 to g1/0/2 enable 提示不能用,改为3和4就可以啦这和上面拓扑有差别

配置完成后,备设自动重启

查看是否成功

[sw1]dis int br

PHY: Physical

InUti/OutUti: input utility/output utility

Interface PHY Protocol InUti OutUti inErrors outErrors

GigabitEthernet0/0/1 up up 0% 0% 0 0

GigabitEthernet0/0/2 up up 0% 0% 0 0

GigabitEthernet0/0/3 down down 0% 0% 0 0

GigabitEthernet1/0/1 down down 0% 0% 0 0

GigabitEthernet1/0/2 down down 0% 0% 0 0

GigabitEthernet1/0/3 up up 0% 0% 0 0

GigabitEthernet1/0/4 up up 0% 0% 0 0

40.2.4 链路聚合

[sw1]int Eth-Trunk 1 # 创建逻辑聚合接口

[sw1-Eth-Trunk1]mode lacp

[sw1]int g0/0/3 # 将物理接口加入逻辑聚合口

[sw1-GigabitEthernet0/0/3]eth 1

Info: This operation may take a few seconds. Please wait a moment.

Info: The operation is successful.

[sw1-GigabitEthernet1/0/5]eth-trunk 1 # 将物理接口加入逻辑聚合口

Info: This operation may take a few seconds. Please wait a moment.

Info: The operation is successful.

[sw1]int Eth-Trunk 1 # 把聚合打上trunk

[sw1-Eth-Trunk1]port link-type tr

Info: This operation may take a few seconds. Please wait for a moment...done.

[sw1-Eth-Trunk1]port trunk allow-pass vlan all

Info: This operation may take a few seconds. Please wait a moment..done.

​sw3​

把sw3 int g0/0/3 和 int g0/0/4 聚合打上trunk

sw3 int g0/0/3对应sw1-GigabitEthernet0/0/3

sw3 int g0/0/4对应sw1-GigabitEthernet1/0/5

​手动单独重启设备,因为已经堆叠了​

reset slot ?

<0-1> The present slot

dis stack

Stack mode: Service-port

Stack topology type: Link

Stack system MAC: f4b7-8dc4-d6ba

MAC switch delay time: 10 min

Stack reserved VLAN: 4093

Slot of the active management port: --

Slot Role MAC Address Priority Device Type

0 Master f4b7-8dc4-d6ba 105 S5720S-28P-LI-AC

1 Standby f4b7-8dc4-d6be 105 S5720S-28P-LI-AC

reset slot 0

Warning: Confirm to reset slot 0? [Y/N]:

参考文献:​肖宗鹏​

​51CTO学堂华为认证教学总监  肖宗鹏​肖宗鹏​​


版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:科普:什么是网站安全证书,它对你的业务有什么作用?(下)(网站安全证书是什么意思)
下一篇:Java如何根据不同系统动态获取换行符和盘分割符
相关文章

 发表评论

暂时没有评论,来抢沙发吧~