【实验】iStack堆叠
主设备Master
<Leaf1>system-view immediately
[Leaf1]stack //进入堆叠模式
[Leaf1-stack]stack member 1 priority 255 //设备该设备的堆叠优先级为255 设置堆叠成员1 优先级为255
Info: The operation will take effect after reboot. //注意重启后生效 会提示 重启后才生效
[Leaf1-stack]stack member 1 domain 10 //配置堆叠域10 两个设备必须处于同一个域
Info: The operation takes effect only after the save command is executed. The device with a lower priority then will be reset in the stack merging scenario. //该操作会在保存命令执行后生效,低优先级设备在堆叠实施后重启。
!
[Leaf1]int range 10GE 1/0/3
[Leaf1-port-group]shutdown //关键的关闭接口命令命令 出现一堆日志 避免在配置过程中因为堆叠合并而使得低优先级交换机提前重启 导致无法保存配置 堆叠无法建立
[Leaf1]int Stack-Port 1/1 //在堆叠接口中加入物理接口
[Leaf1-Stack-Port1/1]port member-group interface 10GE 1/0/3 //两个接口会被转化为堆叠模式,同时”port crc-statistics trigger error-down“命令会被配置到接口下。自动生成的 CRC的校验
Warning: The interface(s) (10GE1/0/1-1/0/2) will be converted to stack mode and be configured with the port crc-statistics trigger error-down command if the configuration does not exist. [Y/N]:y
<Leaf1>save //保存完毕配置对端设备
<Leaf1>reboot // 重启设备
备设备Standby
[Leaf2]stack //进入堆叠模式
[Leaf2-stack]stack member 1 renumber 2 inherit-config //修改板卡编号为2 集成配置 1/0/48到2/0/1
//配置堆叠成员1,并指定修改后堆叠ID编号为2,即板卡变为2 重启后生效
参数inherit-config,则设备重启后会继承重启前的堆叠相关配置(包括堆叠优先级、域编号、堆叠物理成员端口配置);
如果不指定参数inherit-config,则当前堆叠相关配置在重启后都会丢失,配置文件中新堆叠成员ID相关的配置生效
Warning: The stack configuration of member ID 1 will be inherited to member ID 2 after the device resets. Continue? [Y/N]:y //堆叠 ID1 中的配置会继承到ID2 继续吗? 继续
Info: The operation will take effect after reboot. //重启后生效
[Leaf2-stack]stack member 1 domain 10 //配置堆叠域为10,和对端相同,此处没有配置堆叠优先级,则采用默认堆叠优先级100,此设备会成为从交换机。
[Leaf2]interface range 10GE 1/0/3
[Leaf2-port-group]shutdown //关键命令 必须先shutdown
[Leaf2]interface Stack-Port 1/1 //是否可以设置为2/1 或者3/1?? 未重启前只能是1/1 或者1/2 修改member2 后重启有可用1/1 1/2 2/1 2/2
[Leaf2-Stack-Port1/1]port member-group interface 10g 1/0/3 //将物理成员接口加入到逻辑堆叠接口
Warning: The interface(s) (10GE1/0/1-1/0/2) will be converted to stack mode and be configured with the port crc-statistics trigger error-down command if the configuration does not exist. [Y/N]:y
//两个接口会被转化为堆叠模式,同时”port crc-statistics trigger error-down“命令会被配置到接口下。自动生成的
<Leaf2>save
Warning: The current configuration will be written to the device. Continue? [Y/N]:y //保存配置
<Leaf2>reboot // 重启设备
[Leaf1]int range 10GE 1/0/3
[Leaf1-port-group]un shutdown
主设备优先开启 然后在开启备设备 开启堆叠的物理端口
【验证:】
、
配置堆叠双主检测
int 10ge 1/0/X //该接口为规划好的双主检测接口
dual-active detect mode direct //配置业务口的直连双主检测功能。业务口配置直连双主检测功能后,会进入被阻塞状态,不转发普通业务报文,仅处理BPDU报文。
一旦发生堆叠分裂,分裂成多部分的堆叠系统将互发竞争报文,竞争失败的交换机上除了保留端口以外的所有业务端口都将被Error-Down(Error-Down是指设备检测到故障后将接口状态设置为ERROR DOWN状态,此时接口不能收发报文,接口指示灯为常灭。)