交换机基本配置

1、端口隔离:

思科:

对于低端交换机cisco 3550或者2950

Switch(config)#interface range f0/10 , f0/11      
Switch(config-if-range)#switchport protected      将端口设置成保护端口
这两个端口之间不在通信。除非经过路由(在同一交换机的同一网段或者vlan内是不会再通信的),属于二层隔离,三层互通

 

华为、H3C

[Switch] interface gigabitEthernet 0/0/1

[Switch-GigabitEthernet0/0/1] port-isolate enable group 5 //端口GE0/0/1加入到端口隔离组5

[Switch] interface gigabitEthernet 0/0/2

[Switch-GigabitEthernet0/0/2] port-isolate enable group 5 //端口GE0/0/2加入到端口隔离组5

1口和2口属于二层隔离三层互通

单向隔离,1口可以访问3口,3口不能访问1口

[Switch] interface GigabitEthernet 0/0/3

[Switch-GigabitEthernet0/0/3] am isolate gigabitethernet 0/0/1 //在GE0/0/3上配置端口隔离功能,并指定隔离的端口是GE0/0/1

在系统视图下执行port-isolate mode all命令即可实现二三层都隔离

 

2、端口镜像

Cisco

Switch(config)#monitor session 1 source interface fastEthernet 0/0 tx   //后面参数tx意思是监控0/0接口发送的流量,默认为both,即监控收发的流量

Switch(config)#monitor session 1 destination interface fastEthernet 0/1   //把session 1里面接口

在源端口交换机上配置:

Switch1(config)#vlan100   //vlan号必须独立于现网使用的vlan,不能和业务vlan相同,

Switch1(config-vlan)#name SPAN-VLAN   //为vlan 100名字配置为SPAN-VLAN

Switch1(config-vlan)#remote-span   //模式改成RSPAN,特殊vlan用来做端口镜像

Switch1(config)#monitor session 2 source interface Gig 0/1   //配置要抓取原端口的流量

Switch1(config)#monitor session 2 destination remote vlan 100   //目的端口配置为SPAN的vlan

在目的端口交换机上配置:

Switch2(config)#vlan100   //vlan要和被抓取流量端口的交换机vlan要一致

Switch2(config-vlan)#name SPAN-VLAN   //为vlan 100名字配置为SPAN-VLAN

Switch2(config-vlan)#remote-span   //模式改成RSPAN,特殊vlan用来做端口镜像

Switch2(config)#monitor session 3 destination interface Gig 0/2   //配置要抓取原端口的流量,这里的session 号不需要和Switch1的一致

Switch1(config)#monitor session 3 source remote vlan 100   //目的端口配置为SPAN的vlan号
友情连接:https://blog.csdn.net/qq_21453783/article/details/88802794

 

H3C

端口GigabitEthernet1/0/1和GigabitEthernet1/0/2为镜像源端口。连接Server的端口GigabitEthernet1/0/3为镜像目的端口。

<DeviceC> system-view

[DeviceC] mirroring-group 1 local

# 为本地镜像组配置源端口和目的端口。

[DeviceC] mirroring-group 1 mirroring-port gigabitethernet 1/0/1 gigabitethernet 1/0/2 both

[DeviceC] mirroring-group 1 monitor-port gigabitethernet 1/0/3

远程端口镜像:除了可以实现本地端口镜像的功能外,它还突破了源端口和目的端口必须在同一台设备上的限制,使源端口和目的端口间可以跨越多个网络设备。目前,远程端口镜像功能可以穿越二层网络,但无法穿越三层网络。

 

 

 友情连接:https://wenku.baidu.com/view/76c7da2b2af90242a895e5d5.html

HW

将一个镜像端口的报文复制到一个观察端口上。例如:将镜像端口GE2/0/1入方向的报文(即接收到的报文)复制到观察端口GE1/0/1上,GE1/0/1与监控设备直连。

<HUAWEI> system-view
[HUAWEI] observe-port 1 interface gigabitethernet 1/0/1
[HUAWEI] interface gigabitethernet 2/0/1
[HUAWEI-GigabitEthernet2/0/1] port-mirroring to observe-port 1 inbound

将一个镜像端口的报文复制到N个不同的观察端口上。例如:将镜像端口GE2/0/1入方向的报文(即接收到的报文)复制到观察端口GE1/0/1~GE1/0/3上,GE1/0/1~GE1/0/3与监控设备直连。

<HUAWEI> system-view
[HUAWEI] observe-port 1 interface gigabitethernet 1/0/1
[HUAWEI] observe-port 2 interface gigabitethernet 1/0/2
[HUAWEI] observe-port 3 interface gigabitethernet 1/0/3
[HUAWEI] interface gigabitethernet 2/0/1
[HUAWEI-GigabitEthernet2/0/1] port-mirroring to observe-port 1 inbound
[HUAWEI-GigabitEthernet2/0/1] port-mirroring to observe-port 2 inbound
[HUAWEI-GigabitEthernet2/0/1] port-mirroring to observe-port 3 inbound

观察端口批量进行配置(V200R005及后续版本支持)

<HUAWEI> system-view
[HUAWEI] observe-port 1 interface-range gigabitethernet 1/0/1 to gigabitEthernet 1/0/3
[HUAWEI] interface gigabitethernet 2/0/1
[HUAWEI-GigabitEthernet2/0/1] port-mirroring to observe-port 1 inbound

将N个镜像端口的报文复制到一个观察端口上。例如:将镜像端口GE2/0/1~GE2/0/3入方向的报文(即接收到的报文)复制到观察端口GE1/0/1上,GE1/0/1与监控设备直连。
<HUAWEI> system-view
[HUAWEI] observe-port 1 interface gigabitethernet 1/0/1
[HUAWEI] interface gigabitethernet 2/0/1
[HUAWEI-GigabitEthernet2/0/1] port-mirroring to observe-port 1 inbound
[HUAWEI-GigabitEthernet2/0/1] quit
[HUAWEI] interface gigabitethernet 2/0/2
[HUAWEI-GigabitEthernet2/0/2] port-mirroring to observe-port 1 inbound
[HUAWEI-GigabitEthernet2/0/2] quit
[HUAWEI] interface gigabitethernet 2/0/3
[HUAWEI-GigabitEthernet2/0/3] port-mirroring to observe-port 1 inbound
[HUAWEI-GigabitEthernet2/0/3] quit



3、端口聚合

CISCO设备端口聚合

Switch(config-if-range)#channel-group 1 mode ?  #通过此命令在交换机查看端口聚合可以使用的协议

  active   Enable LACP unconditionally      #主动发送LACP报文

  auto    Enable PAgP only if a PAgP device is detected  #被动发送PAgP报文

  desirable  Enable PAgP unconditionally             #主动发送PAgP报文

  on     Enable Etherchannel only              手动设置,需要两边都设置成on

  passive  Enable LACP only if a LACP device is detected  #被动接收LACP报文

 

Cisco(config)#int port-channel 10

Cisco(config-if)#switchport mode trunk       

Cisco(config-if)#switchport trunk allowed vlan all         

Cisco(config-if)#exit

Cisco(config)#int te1/0/1

Cisco(config-if)#channel-group 10 mode on  

Cisco(config-if)#eixt

Cisco(config)#int te2/0/1

Cisco(config-if)#channel-group 10 mode on  

Cisco(config-if)#eixt

、查看聚合链路详细状态信息

       查看所有聚合组详细状态信息:

       show etherchannel detail

       查看所有聚合组详细信息:

       show etherchannel <group-id> detail

、查看链路聚合简要状态信息

       查看所有聚合组简要状态信息:

       show etherchannel summary

       查看所有指定聚合组简要状态信息:

       show etherchannel <group-id> summary

查看聚合链路负载均衡模式

       show etherchannel load-balance

配置链路聚合负载均衡模式(可选配置)(全局配置模式)

       port-channel load-balance <load-balance-mode>

       聚合链路可以在不同成员端口上实现负载均衡,可以在全局配置模式下使用关键词 port-channel load-balance 来指定负载均衡的方式,一共可以选择以下5中负载分担方式 src-mac、dest-mac、src-ip、dest-ip、src-dst-ip、src-dst-mac ,之前已经介绍过了这里就不再赘述,通常默认的负载均衡方式是基于源MAC(src-mac)进行负载均衡,一般保持默认即可。

 

 

H3C设备端口聚合

[SwitchA] interface bridge-aggregation 1

[SwitchA-Bridge-Aggregation1] link-aggregation mode dynamic

[SwitchA-Bridge-Aggregation1] port link-type trunk

[SwitchA-Bridge-Aggregation1] port trunk permit vlan 10 20

[SwitchA] interface gigabitethernet 1/0/1

[SwitchA-GigabitEthernet1/0/1] port link-aggregation group 1

[SwitchA] interface gigabitethernet 1/0/2

[SwitchA-GigabitEthernet1/0/2] port link-aggregation group 1

 

 

HW设备端口聚合

<HUAWEI> system-view

[HUAWEI] sysname SwitchA

[SwitchA] interface eth-trunk 1

[SwitchA-Eth-Trunk1] mode lacp

[SwitchA-Eth-Trunk1] trunkport gigabitethernet 0/0/1 to 0/0/3

[SwitchA-Eth-Trunk1] quit

[SwitchA] interface eth-trunk 1

[SwitchA-Eth-Trunk1] port link-type trunk

[SwitchA-Eth-Trunk1] port trunk allow-pass vlan 10 20
[SwitchA-Eth-Trunk1] load-balance src-dst-mac

法2

[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] eth-trunk 1
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] eth-trunk 1

在SwitchA上配置系统优先级为100,使其成为LACP主动端
[SwitchA] lacp priority 100
在SwitchA上配置活动接口上限阈值为2
[SwitchA] interface eth-trunk 1
[SwitchA-Eth-Trunk1] max active-linknumber 2
[SwitchA-Eth-Trunk1] quit
在SwitchA上配置接口优先级确定活动链路
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] lacp priority 100
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] lacp priority 100
[SwitchA-GigabitEthernet0/0/2] quit

 

4、生成树配置

CISCO设备生成树配置

STP

#我确定完之后,sw1为主根交换机,sw2为副根交换机,sw3为接入层交换机

# 配置,在sw1中,配置vlan10,vlan20,为主根,vlan30,vlan40,为次根

Switch(config)#Spanning-tree

配置生成树协议的类型

Switch(config)#Spanning-tree mode stp/rstp

配置交换机优先级

Switch(config)#spanning-tree priority <0-61440> 

# 在全局配置模式下:

spanning-tree vlan 10 priority  0 

spanning-tree-vlan 20 priority 0

spanning-tree-vlan 30 priority 4096

spanning-tree-vlan 40 priority 4096   // #配置生成树的主根时,设置它的优先级,优先级默认是32768,比它小就越靠谱,#优先级默认是4096的倍数

# 配置,在sw2中,配置vlan30,vlan40,为主根,vlan10,vlan20,为次根

# 在全局配置模式下:

spanning-tree vlan 10 priority  4096 

spanning-tree-vlan 20 priority 4096

spanning-tree-vlan 30 priority 0

spanning-tree-vlan 40 priority 0  // #配置生成树的主根时,设置它的优先级,优先级默认是32768,比它小就越靠谱,#优先级默认是4096的倍数

 

MSTP

(config)#spanning-tree mode mst //启用MST,默认为PVST+
(config)#spanning-tree mst configuration //进入MST配置模式
(config-mst)#name test //注意交换机之间的实例Name要相同,不然会出现各自说自己是根桥.
(config-mst)#instance 1 vlan 2,3
(config-mst)#instance 2 vlan 4,14 //配置实例包括的Vlan,关于Vlan,VTP,Trunk配置这里不提了.
(config-if-range)#spanning-tree mst 1 port-priority 96
(config-if-range)#spanning-tree mst 2 port-priority 160 //MST端口优先级,我们要让3750成为vlan 2,3的根桥,3560成vlan 4,14 的根桥,默认端口优先级为128,+/-16.
或者
(config)#spanning-tree mst 1 root primary
(config)#spanning-tree mst 2 root secondary
(config)#spanning-tree mst 2 root primary
(config)#spanning-tree mst 1 root secondary

 

switch_C(config)# int g0/1               -- 在接入终端 PC的端口上配置

switch_C(config-if)# spanning-tree bpduguard enable

switch_C(config-if)# spanning-tree portfast

 

 

H3C设备生成树

MSTP

[DeviceA] interface gigabitethernet 1/0/1

[DeviceA-GigabitEthernet1/0/1] port link-type trunk

[DeviceA-GigabitEthernet1/0/1] undo port trunk permit vlan 1

[DeviceA-GigabitEthernet1/0/1] port trunk permit vlan 10 20

[DeviceA-GigabitEthernet1/0/1] stp enable

[DeviceA-GigabitEthernet1/0/1] quit

[DeviceA] interface gigabitethernet 1/0/2

[DeviceA-GigabitEthernet1/0/2] port link-type trunk

[DeviceA-GigabitEthernet1/0/2] undo port trunk permit vlan 1

[DeviceA-GigabitEthernet1/0/2] port trunk permit vlan 20 30

[DeviceA-GigabitEthernet1/0/2] stp enable

[DeviceA-GigabitEthernet1/0/2] quit

# 配置MST域的域名为example,将VLAN 10、20、30分别映射到生成树实例1、0、2上,并配置MSTP的修订级别为0。缺省情况下,MST域的域名为设备的桥MAC地址,所有VLAN都映射到instance 0上,MSTP的修订级别为0。

<DeviceA> system-view

[DeviceA] stp region-configuration

[DeviceA-mst-region] region-name example

[DeviceA-mst-region] instance 1 vlan 10

[DeviceA-mst-region] instance 0 vlan 20

[DeviceA-mst-region] instance 2 vlan 30

[DeviceA-mst-region] revision-level 0

# 查看MST域的预配置信息(建议在激活MST域的配置前,先查看MST域的预配置是否正确,确认配置无误后再激活MST域的配置)。

[DeviceA-mst-region] check region-configuration

# 激活MST域的配置。

[DeviceA-mst-region] active region-configuration

[DeviceA-mst-region] quit

# 配置本设备为生成树实例1和实例2的根桥。

[DeviceA] stp instance 1 root primary

[DeviceA] stp instance 2 root primary

# 配置本设备为生成树实例0的备份根桥。

[DeviceA] stp instance 0 root secondary

# 配置生成树的工作模式为MSTP模式。缺省情况下,生成树的工作模式为MSTP模式。

[DeviceA] stp mode mstp

# 全局使能MSTP协议。

[DeviceA] stp enable

配置端口为边缘端口

边缘端口是指不直接与任何交换机连接,也不通过端口所连接的网络间接与任何交换机相连的端口,用户如果将某个端口指定为边缘端口,那么当端口有阻塞状态向转发状态迁移时,这个端口可以实现快速迁移,而无需等待延时时间

[H3C-Ethernet0/1] stp edged-port enable

 

 

HW设备生成树配置

STP

S-switch-A]stp enable

[S-switch-B]stp enable
  [S-switch-C]stp enable
  [S-switch-D]stp enable
  这样交换机根据自己的MAC地址大小,自动选取根桥。
  1、查看stp的运行状态:
  [S-switch-B]dis stp
  2、(5)将与终端PC相连的端口去使能MSTP
  [S-switch-A]int g0/0/2
  [S-switch-A-GigabitEthernet0/0/2]stp disable
  3、stp 抓包分析
  <S-switch-D>debugging stp packet all
  <S-switch-D>terminal debugging
  4、手工指定根桥
  [S-switch-D]stp priority 4096
  或者
  [S-switch-D]stp root primary
  5、指定备份根桥
  [S-switch-B]stp root secondary
  6、指定端口为根端口:
  [S-switch-B]int e0/0/2
  [S-switch-B-Ethernet0/0/2]stp port priority 64
  或者
  [S-switch-B]int e0/0/2
  [S-switch-B-Ethernet0/0/2]stp cost 100 #修改端口的开销值

 

MSTP

Quidway> system-view

[Quidway] sysname SwitchA

[SwitchA] stp region-configuration

[SwitchA-mst-region] region-name RG1

[SwitchA-mst-region] instance 1 vlan 2 to 10

[SwitchA-mst-region] instance 2 vlan 11 to 20

[SwitchA-mst-region] active region-configuration

[SwitchA-mst-region] quit

# 配置SwitchB的MST域。

<Quidway> system-view

[Quidway] sysname SwitchB

[SwitchB] stp region-configuration

[SwitchB-mst-region] region-name RG1

[SwitchB-mst-region] instance 1 vlan 2 to 10

[SwitchB-mst-region] instance 2 vlan 11 to 20

[SwitchB-mst-region] active region-configuration

[SwitchB-mst-region] quit

# 配置SwitchA为MSTI1的根桥。

[SwitchA] stp instance 1 root primary

# 配置SwitchB为MSTI2的根桥。

[SwitchB] stp instance 2 root primary

 

5、虚拟化配置

CISCO交换机虚拟化(VSS)

用堆叠线缆

config t

switch 1 renumber 1

switch 1 priority 15

 

//在CISCO1 上配置vss域,两台设备都要在同一个域中  

Cisco-1(confgi)#switch virtual domain 100  //在Cisco-1 上配置Virtual Switch Domain  

Cisco-1(config-vs-domain)#switch 1  //配置Cisco-1 的Virtual Switch 号码为1  

//配置VSL  Port Channel和Ports  

Cisco-1(config)#interface port-channel 10   //配置Cisco 1上的Port Channel 为10  

Cisco-1(config-if)# switch virtual link 1   //将Cisco 1 port Channnel 10配置为vsl链路    

Cisco-1 (config-if)#no shutdown  //激活port Channel  

//在Cisco-1上配置物理口加入vsl 关联的Port Channel中  

Cisco-1(config)#interface range tenGigabitEthernet 1/1-2    //进入Cisco 1 的接口range t1/1-2  

Cisco-1(config-if) #channel-group 10 mode on    //将这些接口加入到channel group 10  

Cisco-1(config-if)#no shutdown     //激活以上接口  

//在Cisco 2 上做的配置  

Cisco-2(confgi)#switch virtual domain 100  //在Cisco-2 上配置Virtual Switch Domain  

Cisco-2(config-vs-domain)#switch 2  //配置Cisco-2 的Virtual Switch 号码为2  

//配置VSL  Port Channel和Ports  

Cisco-2(config)#interface port-channel 10  //配置Cisco2上的Port Channel 为10  

Cisco-2(config-if)# switch virtual link 2  //将Cisco 2 port Channnel 10配置为vsl链路 

Cisco-2(config-if)#no shutdown  //激活port Channel  

//在Cisco-2 上配置物理口加入vsl 关联的Port Channel中  

Cisco-2(config)#interface range tenGigabitEthernet 1/2-3  //进入Cisco 2 的接口range t1/2-3  

Cisco-2(config-if) #channel-group 10 mode on    //将这些接口加入到channel group 10  

Cisco-2(config-if)#no shutdown    //激活以上接口  

注:FAST-Hello 检测会比 IP-BFD快,因为在 VSL正常的情况下,FAST-hello 就在周期性的发送探测包。而 IP-BFD 要等故障出现后才发探测包。

配置命令:

vss(config)# interface range gigabitEthernet 1/2/47-48

vss(config-if)# dual-active fast-hello

vss(config)# interface range gigabitEthernet 2/2/47-48

vss(config-if)# dual-active fast-hello 

vss(config-if)# no shutdown 

vss(config)# switch virtual domain 100 

vss(config-vs-domain)# dual-active detection fast-hello

●当检测到 Dual-Active 后所采取动作

当检测到双活后,原 active switch 进入 recovery mode 同时会 down掉所 有接口(除 VSL和管理口),有效的将该交换设备从网络中移除;原 standby switch 进入 acvtive mode

管理口是通过以下命令指定的: ( 看实际情况配置 )

vss(config)#switch virtual domain 10 

vss(config-vs-domain)#dual-active exclude interface gigabitEthernet 1/5/3

//以上信息配置完后确认一下两台交换机上的的PFC模式匹配,如果不匹配的话,VSS将会进入RPR模式,可输入show platform hardware pfc mode 显示目前的PDC模式.

如果只有一个交换机处于PFC3CXL模式,那么可使用如下命令platform hardware vsl pfc mode pfc3c

Cisco-1# show platform hardware pfc mode //确认两台交换机上的PFC 操作模式匹配, 确认VSS处于SSO 模式

Cisco-2#show platform hardware pfc mode //确认两台交换机上的PFC 操作模式匹配, 确认VSS处于SSO 模式

Cisco-1# platform hardware vsl pfc mode pfc3c //设置交换机1的PFC操作模式为PFC3C,这个命令是可选的

Cisco-2# platform hardware vsl pfc mode pfc3c

//最后将两个设备切换为virtual模式也就是组建VSS。记住保存配置重启后VSS才可以生效。
Cisco-1# switch convert mode virtual
Cisco-2# switch convert mode virtual

BDF检测

vss (config)# interface gigabitethernet 1/5/3

vss (config-if)# no switchport

vss(config-if)# ip address 200.230.230.231 255.255.255.0

vss (config-if)# bfd interval 100 min_rx 100 multiplier 50

vss (config-if)# no shutdown

vss(config-if)# interface gigabitethernet 2/5/3

vss(config-if)# no switchport

vss(config-if)# ip address 201.230.230.231 255.255.255.0

vss (config-if)# bfd interval 100 min_rx 100 multiplier 50

vss(config-if)# no shutdown

vss(config-if)# exit

vss (config)# switch virtual domain 100

vss (config-vs-domain)# dual-active detection bfd

vss (config-vs-domain)# dual-active pair interface g 1/9/48 interface g 2/1/48 bfd

adding a static route 200.230.230.0 255.255.255.0 Gi2/1/48 for this dual-active pair adding a static route 201.230.230.0 255.255.255.0 Gi1/9/48 for this dual-active pair

vss(config-vs-domain)# exit

vss(config)# exit

vss# show switch virtual dual-active bfd

Bfd dual-active detection enabled: Yes Bfd dual-active interface pairs configured: interface1 Gi1/9/48 interface2 Gi2/1/48

 

show platform stack-manager all  //显示所有交换机堆叠的信息

show switch      //显示堆叠交换机的汇总信息

show switch 1       //显示1号交换机的信息

show switch detail   //显示堆叠成员明细的信息

show switch neighbors   //显示堆叠邻居的完整信息

show switch stack-ports   //显示堆叠交换机的完整端口信息

 

 

H3C交换机IRF配置

SW1

irf member 1 remember 1

irf member 1 priority 32

interface Ten-GigabitEthernet1/0/29

shut

interface Ten-GigabitEthernet1/0/30

shut

irf-port 1/1

port group interface Ten-GigabitEthernet1/0/29 mode enhanced

port group interface Ten-GigabitEthernet1/0/30 mode enhanced

interface Ten-GigabitEthernet1/0/29

undo shut

interface Ten-GigabitEthernet1/0/30

undo shut

Save

Irf-port-configuration active // 激活 irf 端口配置

在配置第二台设备之前就可以按照预先规划的接口将两台设备互联起来,等两台 IRF端口配置都激活后备机会自动重启,所以保存配置也很关键。

设备默认 member 为 1,所以第一台不需要改 member 号,以上都不是建立 IRF的关键 配置,这些都可以等 IRF建立之后再统一配置,关键是配置 IRF端口。

SW2:

irf member 1 remember 2

irf member 1 priority 16

Reboot

重启,重启之后设备 member 变为 2,所有接口也变为 2/0 开头

interface Ten-GigabitEthernet2/0/29

shut

interface Ten-GigabitEthernet2/0/30

shut

irf-port2/2

port group interface Ten-GigabitEthernet2/0/29

port group interface Ten-GigabitEthernet2/0/30 此处必须写为 2/2,因为该端口为接受第一台 IRF信息,又因为 remember 改成了 2, 如果还有第三台的话,则还可以新增 irf-port 2/1

interface Ten-GigabitEthernet2/0/29

undo shut

interface Ten-GigabitEthernet2/0/30

undo shut

Save 必须保存配置,否则下一条命令一配就会重启,配置全部丢失, irf 也会失败。

irf-port-configuration active 激活 irf 端口配置,此步骤也是必须得,记得在激活之前保存配置,此时第二台将 自动重启。

 

 

华为交换机堆叠配置

SW1

stack slot 0 priority 200

stack slot 0 renumber 0

interface stack-port 0/1

port interface gigabitethernet 0/0/27 enable

quit

interface stack-port 0/2

port interface gigabitethernet 0/0/28 enable

quit

 

SW2

stack slot 0 priority 100

stack slot 0 renumber 1

[SwitchB] interface stack-port 0/1

[SwitchB-stack-port0/1] port interface gigabitethernet 0/0/27 enable

[SwitchB] interface stack-port 0/2

[SwitchB-stack-port0/2] port interface gigabitethernet 0/0/28 enable

[SwitchB-stack-port0/2] quit

  • 下电前,建议通过命令save保存配置。
  • 本设备的stack-port 0/1必须连接邻设备的stack-port 0/2,否则堆叠组建不成功。
  • 为保证堆叠组建成功,建议按照以下顺序进行连线上电(如果用户希望某台交换机为主交换机可以先为其上电。例如,按以下顺序连线上电后,SwitchA为主交换机):
    1. 为SwitchA~SwitchC下电;
    2. 连接SwitchA与SwitchB之间的堆叠线缆;
    3. 先为SwitchA上电,SwitchA启动后,再为SwitchB上电;
    4. 检查SwitchA与SwitchB的堆叠组建是否成功,详细检查方法可参见检查堆叠组建是否成功
    5. 与上一步类似:连接SwitchC与SwitchB和SwitchA之间的堆叠线缆,再为SwitchC上电;
    6. 检查SwitchA、SwitchB、SwitchC的堆叠组建是否成功,详细检查方法可参见检查堆叠组建是否成功

 

posted @ 2019-10-12 11:34  LX落叶  阅读(2208)  评论(0编辑  收藏  举报