Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the spanning tree redundancy and load sharing technology of the server?

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "what is the spanning tree redundancy and load sharing technology of the server". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "what is the spanning tree redundancy and load sharing technology of the server?"

There are three areas in the switching layer that involve redundancy and load sharing, namely, spanning tree, EC Ethernet channel, and FHRP gateway protocol. This paper is about the implementation technology related to spanning tree. The main functions of spanning tree (including stp, rstp, mstp) from low to high are: anti-ring convergence, redundant backup, load balancing. First of all, redundancy and load sharing are two concepts. Redundancy is often associated with backup, and redundancy technology alone does not necessarily achieve load sharing. The load sharing technology depends on redundancy.

1. STP (Spanning-Tree Protocol)

STP protocol is born for redundancy, simple tree network can not provide enough reliability, so we introduce additional links, which leads to the problem of loops. However, the standard 802.1D STP protocol alone can not achieve real redundancy and load sharing.

STP is the IEEE 802.1D standard, and there is only one STP tree inside it, so there must be one link that will be blocking and will not forward data. Only when there is a problem with the other link, will the link by blocking take over the responsibility of the previous link and do the data forwarding. In any case, there will always be a link that is not in use, and redundancy is available, but load sharing is unthinkable.

Cisco makes improvements to STP, which makes each VLAN run a stp tree, so that the first link can serve vlan 123, for vlan 456 blocking, the second link can be vlan 456 forwarding, closed to vlan 123, virtually realizing link redundancy and load sharing. This technology is called PVST+.

With the development of the network, people find that the traditional STP protocol can not meet the needs of fast switching between the active and standby, because the STP protocol defines five states of the port: blocking listening learning forwarding disabling. If you want to switch from blocking to forwarding, you have to go through a period of 50 seconds, which we can only wait passively. In the 20-second blocking state, if the BPDU packet sent by the neighbor is not detected, you will enter listening. After electing Root Bridge, Designate Port and Root Port,15 seconds, you can learn the MAC address in the learning,learning state to prepare for the final forwarding, which is also 15 seconds, and finally reaches the forwarding status. Such a delay is extremely unbearable in the modern network environment.

2. RSTP (802.1w)

The emergence of RSTP solves the problem of delay, and its convergence speed is very fast. Of course, CISCO has also launched its own RPVST+ technology for this technology. RSTP defines two additional port role on top of STP (note the concept here, port role), which are alternate and backup. In addition, port state (port state) is redefined, which is discarding, Learning and Forwarding.

One of the big failures of STP is that it confuses the concepts of port role and port state. On RSTP, such a problem no longer exists, and port state has nothing to do with port role. Alternate port is responsible for backing up the link on another switch, while backup port prepares the port on this switch.

76543210TCProposalPort-rolelearningforwardingAgreementTCA

The most important change in RSTP is the use of the type field in BPDU. Previously, STP only used two of these bits, and many functions have been implemented in the other 6 bits, including no longer having to wait for 50 seconds to complete the master / slave switch, and directly using proposal to negotiate with agreement, which greatly shortens the convergence time.

RSTP also defines two new concepts: edge port and link type. If it is edge port, it means that the next connection can only be the host, and the existence of the loop is impossible, so we can directly switch it from discarding to forwarding state, similar to the port fast technology in STP. Link type defines whether the link is point-to-point or shared. If there is a pt-pt environment, we can do fast switching.

3. MSTP (802.1s)

STP and RSTP both use a STP tree, load sharing can not be achieved, while CISCO's PVST+ and RPVST+ use a spanning tree for each VLAN, although achieving load sharing, it will take up a lot of CPU time. This is why MSTP (802.1s) comes into being.

MSTP can map the spanning tree of multiple VLAN to one instance, that is, vlan map to an instance. We don't need so many spanning trees, we just need to figure out how many spanning trees are needed according to the number of redundant links.

If there are only two links and there are 1-1000 VLAN, we can define 1-1000 as instance 1 and 501-1000 to instance 2. Only two trees 1 and 2 are generated, which also achieves redundancy and load sharing.

MSTP is based on RSTP and cannot be run without RSTP,MSTP.

In addition:

In PVST+ and RPVST+ mode: the switch can support 128STP instance.

In MSTP mode: the switch can support 65 MST instance, of course, the number of VLAN in each instance is unlimited.

4.Ether channel

In fact, channel technology is not only the binding of interfaces. Usually, when the bandwidth of backbone links is insufficient, we may want to bind multiple links. At this time, we will naturally use ether-channel technology, which binds multiple physical interfaces into one logical interface, and can bind up to 8 interfaces to achieve the bandwidth binding effect of 1600g. But in fact, the data is still forwarded through the physical interface in the process of transmission. This puts forward another scheme for us to do load sharing. We can share the load according to the source and destination IP addresses, that is, a session. The first session takes the first interface, and the second session automatically switches to the second physical interface for forwarding. In this way, a large amount of data will not be forwarded through physical interface 1.

Ether Channel can be specified manually or dynamically, so we need to mention two other technologies, one is Cisco private PAGP, the other is LACP (802.3ad) of IEEE standard, we just need to pay attention to the way they negotiate.

Interface modes: on, desirable, auto:

When configured as on, dynamic negotiation of PAGP is not accepted. It must be specified manually, that is, both ends must be configured in on mode, otherwise it cannot be bound.

Desirable indicates active negotiation. If the peer is desirable or auto, channel can be formed.

Auto means passive negotiation. If the peer is auto, the channel cannot be formed, and the peer must be desirable.

This is easy to understand, but why we should pay attention to it is because there are several similar patterns when we set up trunk, and these modes in trunk are very confusing and can be negotiated successfully dynamically anyway. For example, on and desirable can be negotiated successfully.

The interface mode of LACP is different from PAGE, but the meaning is similar. They are: on, off, passive, active.

At this point, I believe you have a deeper understanding of "what is the spanning tree redundancy and load sharing technology of the server". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report