华三堆叠

html-css030

华三堆叠,第1张

将多台交换机设备通过线缆连接后组合在一起,虚拟化成一台设备,是一种横向虚拟化技术

纵向虚拟化技术主要用于两层架构,主要用于数据中心场景

可靠组网

  vrrp+mstp

  堆叠+链路捆绑 (推荐使用)

不同厂商的堆叠

  华为:CSS(Cluster Switch System)[框式交换机支持]、 iStack(Intelligent  Stack)[盒式交换机支持]

  Cisco:VSS(Virtual Switch System)

  H3C  :IRF

  锐捷:  VSU(Virtual Switch Unit)

堆叠概念

  主交换机 负责管理整个堆叠,堆叠中只有一台主交换机,主备交换机依据优先级来定,优先级高的为主交换机,在堆叠中,备交换机也仅有一台

  从交换机可以有多台

堆叠域:所有交换机在一个堆叠域里头

堆叠端口:是逻辑端口,需要和物理端口进行绑定

  华为  stack-port 0/1

  华三  irf-port  1/1

#每台交换机上堆叠端口最多有两个

堆叠时要进行交叉连接,即stack1连接stack2

堆叠分为链型堆叠和环形堆叠

华为堆叠配置(部分配置)

    堆叠卡配置

        stack enable  #配置完后重启设备

   

    业务口堆叠

        int stack-port 0/1  #创建堆叠口

        port interface gi0/0/1  enable #将业务接口加入到堆叠口中

华三堆叠配置

SW1  (master)

  sys

  sysname SW1

  irf member 1  priority  5  #将优先级设置为5,1是默认配置,接口的member ID ,也就是后面标红的1GE1/0/2   

  int ten 1/0/50

      shutdown

  irf-port 1/1

      port  group  interface ten1/0/50

  return

  save  #必须要进行保存

sys

  sysname SW1

  irf member 1  priority  5   

  int ten 1/0/50

      shutdown

  irf-port 1/1

      port  group  interface ten1/0/50

  return

  save 

  SW2  (slave)

    sys

    sysname  SW2

    irf  member 1 renumber 2  #将sw2的member ID改为2

    save

    reboot

    int ten  2/0/50

      shutdown

    irf-port 2/2 #此处的第二个数字2要与sw1的irf-port第二个数字1交叉(一个交换机一共有2个irf-port,要求是1-2,2-1,也就是交叉相连)

        port group interface  Ten-GigabitEthernet 2/0/50

    return

    save

sys

    sysname  SW2

    irf  member 1 renumber 2 

    save

    quit

    reboot

    int ten  2/0/50

      shutdown

    irf-port 2/2

        port group interface  Ten-GigabitEthernet 2/0/50

    return

    save 

   

    ##拔掉sw1和sw2之间的连接线

    SW1

        int ten1/0/50

          undo shutdown

        quit

        irf-port-configuration  active

        save

    SW2 #在配置完成后,因为2是备用交换机,所以交换机2会重启

        int ten2/0/50

          undo shutdown

        quit

        irf-port-configuration  active 

        save

   

  最后一个步骤:插上线缆     

 

注意

  1、一个堆叠的irf ID要交叉,一个交换机创建两个irf ID,一个交换机用1,1其连接的另一端就必须得用2,这个叫交叉连接

  2、堆叠口间不能进行链路聚合 

查看配置

<SW1>dis  irf  configuration 

<SW1>dis irf    link  查看堆叠链路状态

<SW1>dis  irf topology

如何区分主备

<SW1>dis  irf

MemberID    Role    Priority  CPU-Mac        Description

*+1        Master  5        4240-ad9a-0104  ---  #  +号表示该台设备堆叠信息,role看,此为主

  2        Standby 1        4240-afe9-0204  ---

--------------------------------------------------

* indicates the device is the master.

+ indicates the device through which the user logs in.

The bridge MAC of the IRF is: 4240-ad9a-0100

Auto upgrade                : yes

Mac persistent              : 6 min

Domain ID                  : 0

<SW1>

<SW1>dis irf

MemberID    Role    Priority  CPU-Mac        Description

  *1        Master  5        4240-ad9a-0104  ---

  +2        Standby 1        4240-afe9-0204  ---  # +号结合role看,此为备

--------------------------------------------------

* indicates the device is the master.

+ indicates the device through which the user logs in.

The bridge MAC of the IRF is: 4240-ad9a-0100

Auto upgrade                : yes

Mac persistent              : 6 min

Domain ID                  : 0

<SW1>

正常的主的状态

<SW1>    dis  irf conf

<SW1>dis  irf configuration

MemberID NewID    IRF-Port1                    IRF-Port2

1        1        Ten-GigabitEthernet1/0/50    disable

2        2        disable                      Ten-GigabitEthernet2/0/50

<SW1>dis irf  li

<SW1>dis irf  link

Member 1

IRF Port  Interface                            Status

1        Ten-GigabitEthernet1/0/50            UP

2        disable                              --

Member 2

IRF Port  Interface                            Status

1        disable                              --

2        Ten-GigabitEthernet2/0/50            UP

<SW1>dis  irf to

<SW1>dis  irf topology

                              Topology Info

-------------------------------------------------------------------------

              IRF-Port1                IRF-Port2

MemberID    Link      neighbor      Link      neighbor    Belong To

2          DIS        ---          UP        1          4240-ad9a-0104

1          UP        2            DIS        ---        4240-ad9a-0104

<SW1>

正常的备的状态

<SW1>dis irf configuration

MemberID NewID    IRF-Port1                    IRF-Port2

1        1        Ten-GigabitEthernet1/0/50    disable

2        2        disable                      Ten-GigabitEthernet2/0/50

<SW1>dis irf  li

<SW1>dis irf  link

Member 1

IRF Port  Interface                            Status

1        Ten-GigabitEthernet1/0/50            UP

2        disable                              --

Member 2

IRF Port  Interface                            Status

1        disable                              --

2        Ten-GigabitEthernet2/0/50            UP

<SW1>dis irf  to

<SW1>dis irf  topology

                              Topology Info

-------------------------------------------------------------------------

              IRF-Port1                IRF-Port2

MemberID    Link      neighbor      Link      neighbor    Belong To

2          DIS        ---          UP        1          4240-ad9a-0104

1          UP        2            DIS        ---        4240-ad9a-0104

Cisco VSS

1.原理

VSS是将两台及以上的物理设备虚拟成逻辑上的一台,可类比堆叠。VSS在控制层面上两个交换机有主从之分,但在数据面上处理是双活的。无论是从网络控制层面和管理视图上在网络上都是一个单独的设备实体。

对于邻居,这个虚拟交换系统相当于一台单独的交换机或者路由器。在虚拟交换系统中,其中一个机箱指定为活跃交换机,另一台被指定为备份虚拟交换机。所有的控制层面的功能,包括管理(SNMP,Telnet,SSH等),二层协议(BPDU,PDUs,LACP等),三层协议(路由协议等),以及软件数据等,都是由活跃交换机的引擎进行管理。

从数据层面和流量转发来看,在虚拟交换系中的所有交换机都参与流量转发。在虚拟主交换机超级引擎上的PFC执行为所有进入活跃虚拟交换机的流量转发查找,反之位于备份状态的交换机引擎上的PFC执行为所有进行备份状态交换机流量转发查找。

VSS增加了交换机整体性能,可以不使用MSTP+VRRP方案,简化管理减少网络协议的同时又可以加快收敛性能。实现网络系统虚拟化,提供机箱间的状态化切换(SSO),改进无中断通信,切换时间〈200ms;跨机箱EtherChannel,优化路径选择。

虚拟交换系统技术是通过一条特殊的链路来绑定两个机箱成为一个虚拟的交换系统,这个特殊的链路称之为虚拟交换机链路(Virtual Switch Link,VSL)。经过主机箱处理的协议报文,通过VSL转发到从机箱。

 VSS的作用:简化网络拓扑,降低网络复杂性,缩短恢复的时间和业务中断的时间,提高网络资源的利用率。

与传统的L2/L3网络设计相比,VSS提供了出色优势,可分为以下四个大类:

1)VSS通过简化网络提高了运营效率,将交换机管理开销降低至少50%。

为Cisco Catalyst 6500虚拟交换机提供单管理点、IP地址和路由实例

- 管理单一配置文件和节点。无需用相同策略配置冗余交换机两次。

- 每VLAN只需一个网关IP地址,而不必像现在这样每VLAN使用三个IP地址。

- 无需再使用HSRP、VRRP和GLBP。

- 能使用CiscoWorks LAN Management System (LMS) 3.0来将Cisco Catalyst 6500虚拟交换机作为单一实体加以集中管理。

2)多机箱EtherChannel®(MEC)是一种L2多路径技术,创建了简化的无环路技术,不再采用生成树协议,同时仍能激活以严格防御用户误配置。

3)灵活的部署选项。底层物理交换机不必共置。这两个物理交换机通过标准万兆以太网接口相连,其相隔的距离仅受限于所选的万兆以太网光纤长度。例如,如采用X2-10GB-ER万兆以太网光纤,这两个交换机可相距40公里。

2.配置

配置VSS时,两台交换机互联的端口channel-group时,千万不要选相同的

比如:T1/1/32和T2/1/32为port-channel 9,那么 T1/1/31和T2/1/32的port-channel为10

如果两个port-channel同时9,那么当第二台交换机执行switch convert mode virtual之后,会反复重启,反复重启

在两台交换机上的startup-config配置文件的VSS配置必须一致。如果更新了交换机的优先级或者抢占功能,只有在保存了配置文件和交换机启后,配置才会生效。

对于线路冗余,在VSL配置的时候为每个交换机配置至少2个端口;对于模块冗余,2个端口可以位于机箱的不同交换模块上。  

1)在CISCO1 上配置vss域和switch ID,两台设备都要在同一个域中

Cisco-1(config)#switch virtual domain 100  //在Cisco-1 上配置Virtual Switch Domain  Cisco-1(config-vs-domain)#switch 1  //配置Cisco-1 的Virtual Switch 号码为1

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

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

  2)交换机优先级设置

   高优先级交换机,成为active,低优先级的交换机成为standby。若优先级一样,则Switch ID小的为active,switch ID大的为standby。  

Standalone Switch1:

Cisco-1(config)#switch virtual domain 100

Cisco-1(config-vs-domain)# switch1priority110

Cisco-1(config-vs-domain)# switch2priority100

Standalone Switch 2:

Cisco-2(config)#switch virtual domain 100

Cisco-2(config-vs-domain)# switch1priority110

Cisco-2(config-vs-domain)# switch2priority100

  3)配置 Virtual Switch Link (VSL)和Ports  

VSL是一个有特殊用途的EthernetChannel链路,包含一个或多个(最多8个)物理端口。VSL作用有二:

1、其中只选择一个物理成员接口作为控制链路,承载机箱之间的系统控制信息

2、这其余的物理成员接口承载网络控制信息,当必要时也可以承载普通数据流量

Cisco-1(config)#interface port-channel10//配置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(config)#interface range tenGigabitEthernet 1/1-2

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

Cisco-1(config-if)#no shutdown

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(config)#interface range tenGigabitEthernet 1/2-3

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

Cisco-2(config-if)#no shutdown

由于VSL EtherChannel对每个成员链路使用LMP,因此不需要PAgP和LACP等链路聚合协议每个成员链路必须在无条件的EtherChannel模式下配置,使用命令上的channel-group group-number on模式。

  4)最后将两个设备切换为virtual模式也就是组建VSS。  

Standalone Cisco-1:

Cisco-1# switch convert mode virtual

This command will convert all interface names

to naming convention "interface-type switch-number/slot/port",

save the running config to startup-config and

reload the switch.

Do you want to proceed? [yes/no]: yes

Converting interface names

Building configuration...

Standalone Cisco-2:

Cisco-2# switch convert mode virtual

This command will convert all interface names

to naming convention "interface-type switch-number/slot/port",

save the running config to startup-config and

reload the switch.

Do you want to proceed? [yes/no]: yes

Converting interface names

Building configuration...

  记住保存配置重启后VSS才可以生效。

重启设备的作用:

1)2个配置合并为1个配置

2)为端口重新编号----从slot/port到switch-number/slot/port

3)只有重启设备,才能通过NSF/SSO协商A/S角色

  5)在VSS模式下, 你将会在活跃交换机上输入所有的配置命令,启动配置文件将会自动同步到备份交换机上. 为了使VSS 操作正确, 活动交换机需要另一端备份交换机的VSL Link 配置信息。

  在活动交换机上输入switch accept mode virtual 命令后, 在活动和备份交换机上的更新配置会自动保存到其startup 配置文件中。

3.查看VSS:

       show switch virtual

       show switch virtual role

       show switch virtual link

show module all 

show switch virtual redundancy

show redundancy states

Cisco表示,在正常情况下,虚拟交换系统间VSL链路上的流量大约为万兆接口的5%。

4.VSS 双活检测设计和配置(VSS Dual-Active Supervisors)

  VSL 链路丢失和恢复:如果 VSL 出现故障,则备用机箱无法确定活动机箱的状态。 为了确保发生切换而不出现延迟,备用机箱假设活动机箱已发生故障,并启动切换来接管活动角色。

  如果原始活动机箱仍运行正常,则两个机箱此时均处于活动状态。 此情形称为双活动情形。 双活动情形会对网络稳定性产生不利影响,因为两个机箱均会使用相同的 IP 地址、SSH 密钥和 STP 网桥 ID。 虚拟交换系统 (VSS) 必须检测双活动情形,并执行恢复操作。VSS支持增强的 PAgP、 IP 双向转发检测 (BFD)和dual-active fast-hello三种方法,以便检测双活动情形。建议:如有可能,请同时启用基于 ePAgP 和直接心跳链路的 VSLP Fast Hello 方法。

  在单独的主从机的互联端口上配置直接心跳链路的 VSLP Fast Hello  

Fast- Hello Configuration and Monitoring VSS Active Virtual Switch :CISCO-VSS(config)# switch virtual domain10CISCO-VSS(config-vs-domain)# dual-active detection fast-hello

CISCO-VSS(config)#intgi1/4/48CISCO-VSS(config-if)# dual-active fast-hello

CISCO-VSS(config-if)#intgi2/4/48CISCO-VSS(config-if)# dual-active fast-hello%VSDA-SW2_SPSTBY-5-LINK_UP: Interface Gi1/4/48is now dual-active detection capable%VSDA-SW1_SP-5-LINK_UP: Interface Gi2/4/48is now dual-active detection capable

CISCO-VSS# show switch virtual dual-active fast-hello//查看fast-hello配置

ePAgP Configuration and Monitoring VSS Active Virtual Switch :CISCO-VSS(config)# switch virtual domain10CISCO-VSS(config-vs-domain)# dual-active detection pagp trust channel-group205CISCO-VSS# show switch virtual dual-active pagp

PAgP dual-active detection enabled: Yes

PAgP dual-active version:1.1! <<Snip >>

Neighbor switch that supports enhanced PAgP:

CISCO-VSS# show pagp dual-active PAgP

dual

-active detection enabled: Yes

PAgP dual

-active version:1.1

Dual-Active Detection - Exclude Interfaces

一旦检测到双活情况,原先Active交换机将会禁用其上面的所有端口以确保不影响其余网络的正常工作,然而,对于用于管理用途的端口等,我们并不希望他们也被禁用,因为管理端口被禁用后就不能远程管理该交换机。

CISCO-VSS#conf t

Enter configuration commands, one per line. End with CNTL/Z.

CISCO-VSS(config)#)#switch virtual domain10CISCO-VSS(config-vs-domain)#dual-active exclude interface Gig1/5/1CISCO-VSS(config-vs-domain)#dual-active exclude interface Gig2/5/1

4.手动故障切换

在Active交换机上输入命令手工执行故障切换(命令输入之后,本地交换机将自动重启,备机将active接起业务):

switch-1#redundancy force-switchover

This will reload the active unit and force switchover to standby[confirm]

Preparing for switchover..

00:15:17: %SYS-SW1_SP-3-LOGGER_FLUSHING: System pausing to ensure console debugging output

5.如果虚拟交换机成员间的所有VSL连接丢失,将会发生什么?

VSL能在两台交换机间配置多达8条链路,使用任意组合的线卡或管理引擎端口,提供高冗余性。如果在极意外的情况下,虚拟交换机成员间的所有VSL连接均丢失,而虚拟交换机成员均正常运行,那么VSS将转为双激活恢复模式。

通过以下两种方法之一,能迅速(在一秒内)检测出双激活状态:

连接思科交换机,改进MEC中使用的PAgP

在虚拟交换机成员间的直接连接链路(除VSL外)上,或通过接入层交换机的L2链路,进行L3双向转发检测(BFD)配置

在双激活恢复模式中,以前主用的虚拟交换机成员除VSL接口外的所有接口都处于操作关闭状态。新的主用虚拟交换机继续在所有链路上转发流量。

6.类似技术,华为称为CSS,H3C称为IRF,锐捷称为VSU。