Difference Between Cisco Switch Stacking and HSRP

       With the increasing popularity of the Internet, people are increasingly dependent on the network. This also puts forward higher requirements for the stability of the network. People naturally think of a device-based backup structure, just like the dual hard disk structure used in the server to improve data security. The core switch is the core and heart of the entire network. If a fatal failure of the core switch occurs, the local network will be paralyzed, and the loss caused is also inestimable.

       At present, all Layer 3 switches in the industry use the Hot Standby Routing Protocol (VRRP), while Cisco generally uses its own proprietary protocol, Hot Standby Routing Protocol (HSRP). A stacking line with a stack of switches stacks together to form a logical switch.

Then let's take a look at the introduction of stacking and HSRP (Hot Standby Routing Protocol).

stack

       At present, more and more Cisco products support stacking. Currently, the stacking models are supported by Cisco Catalyst 3750 series, and now 2960S, 3560X and 3750X are supported, but for these new models to use the stacking function, special stacking modules must be used, and The Cisco Catalyst 3750 series is shipped with a 0.5 stacking cable by default in the box. The 3750 switches are connected to each other through Cisco's proprietary stacking cable, and up to 9 switches can be stacked into one logical switch. All switches in this logical switch share the same configuration and routing information. The performance of individual switches is not affected as they are added and removed to a logical switch.

       The stacked switches are connected by two loops. The hardware of the switch is responsible for load balancing the data packets on the dual loops. The loop acts as the backplane of this large logical switch. When both loops are working normally, the transmission rate of data packets on this logical switch is 32Gbps.

       When a data frame needs to be transmitted, the switch's software will calculate which loop is more available, and then the data frame will be sent to that loop. If a stacking cable fails, the switches at both ends of the failure will detect the failure and disconnect the affected loop, while the logical switch can still work as a single loop with a packet throughput rate of 16Gbps. The switches are stacked in a daisy-chain manner. Refer to the following figure for the connection method.

image

       When several switches are stacked, one switch will be responsible for management functions, which is called the master switch. The master switch will automatically update configuration files, routing information, and stacking information to other switches. The master switch adopts a 1:N redundant backup mode, and all switches in the stack can become the master switch and replace it when the master switch fails.

       The master switch is responsible for downloading the CAM forwarding table to each switch, and the master switch is also responsible for maintaining and distributing the routing information of the Layer 3 switches. Some other QoS features or access control list operations are also controlled by the master switch to tell other switches. When a new switch is added or an existing switch is removed, the master switch will send a notification, and other switches will update their stack information accordingly.

       Each switch on the ring will have a MAC address table to store its own local MAC address information, and a MAC address table to maintain the MAC address information of other switches. The MAC address table is updated by the master switch.

       Also, stack switches handle packets very efficiently, each packet has a 24-byte header that includes the packet's destination information (this information is used in stack switches and is given by the master switch) ) and QoS indicator.

       HSRP

       Using hot backup for core switches is an inevitable choice to improve network reliability. In the case of a core switch completely inoperable, all its functions are completely taken over by another backup router in the system, until the router in question returns to normal, which is the Hot Standby Router Protocol (HotStandbyRouterProtocol).

       实现HSRP的条件是系统中有多台核心交换机,它们组成一个“热备份组”,这个组形成一个虚拟路由器。在任意时刻,一个组内只有一个路由器是活动的,并由它来转发数据包,如果活动路由器发生了故障,将选择一个备份路由器来替代活动路由器,但是在本网络内的主机看来,虚拟路由器没有改变。所以主机仍然保持连接,没有受到故障的影响,这样就较好地解决了核心交换机切换的问题。

       为了减少网络的数据流量,在设置完活动核心交换机和备份核心交换机之后,只有活动核心交换机和备份核心交换机定时发送HSRP报文。如果活动核心交换机失效,备份核心交换机将接管成为活动核心交换机。如果备份核心交换机失效或者变成了活跃核心交换机,将由另外的核心交换机被选为备份核心交换机。

       在上面已经了解了各自的区别了,下面图解HSRP与堆叠故障切换与数据流的走向。

       热备份路由协议(HSRP)故障切换与数据流走向

       HSRP正常情况下,数据流量走向

image

       (通过上图可以得知)正常情况下,终端1去访问应用服务器时,首先经过接入层交换机1再到过核心交换机A,通过核心交换机A到过应用服务器,而完成数据的交换。

        当某台接入层交换机到主核心交换机的线路出现故障,切换至备机,数据流走向

image

       当接入层交换机1上联至核心交换机A的数据链路出现故障,导致接入层交换机1的数据链路切换至核心交换机B,但在切换期间接入层交换机1分丢6个数据包,如上图所示。

       服务器链路出现故障

image

       当服务器与核心交换机A之间主链路出现故障(如线路、网卡等),服务器主网卡切换至备用网卡上时,会丢6个数据包,但当主链路恢复以后,服务器会自动从备用网卡切换至主网卡,而这次切换时数据包不会丢失。具体终端访问服务器的数据流走向如上图。

       主交换机出现故障

image

       当核心交换机A出现故障以后,接入层交换机、服务器等均会从主链路切换至备用链路,但是在切换期间都会丢6个数据包。

以上则是热备份路由协议(HSRP)在链路或者设备出现故障以后,在切换期间的一些表现。

       堆叠故障切换与数据流走向

       堆叠要求:

       IOS版本要一致、专用的堆叠模块和堆叠线缆、最大堆叠个数9台

       堆叠的好处:

       高密度端口、便于管理(配置时显示的是一台交换机,而其他交换机的端口则以slot号显示)

       避免STP(生成树协议)

注意:

       1、堆叠最好成环,否则只有一半的带宽(16G)。

       2、最好把你想作为master的交换机的Priority指为最高15,默认为1,最大为15,值越大越优先。

       堆叠后正常情况下,数据流量走向

image

       在使用Cisco Catalyst 3750系列交换机做堆叠时,将两台或多台Cisco Catalyst 3750系列交换机堆叠以后,会形成一台逻辑交换机。该逻辑交换机中的所有交换机共享相同的配置信息和路由信息。当向逻辑交换机增加和减少单体交换机时不会影响其性能。

       在核心交换机与接入层交换机以及服务器之间,通过两条链路互联,在核心交换机与接入层交换机上将对应的端口做端口捆绑,而这样在链路上可以达到双倍的效果,还可以避免STP(生成树)带来的问题。

       接入层上行链路故障

image

       当接入层以交换机1的某条上行链路出现故障,而对于该终端1访问应用服务器的数据不会终端,而只是在该链路的带宽下降一半而已。

       服务器链路出现故障

image

       当服务器与核心交换机之间某条链路出现故障,也不会导致服务器丢包情况出现。

       单台核心交换机出现故障

image

       由于接入层交换机与应用服务器均采用双链路方式与核心交换机互联,所以当其中一台核心交换机出现故障,也不会对整个网络造成丢包情况。

       I believe that through the above pictures, you should understand the difference between the two applications!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324768980&siteId=291194637