MSTP address link load balancing and link detection

Source: Internet
Author: User
Tags failover

MSTP addressing link load balancing and link detection topologies


Figure 1
1 topology shown, there are two links between the huiju switch and the Jieru switch, Huiju G0/0/1 Gigabit Port, G0/0/2 Gigabit Port, Jieru G0/0/1 Gigabit Optical port, E0/0/2 hundred Gigabit Electric port, Link1 is bare fiber, LINK2 Link uses transceiver for photoelectric conversion, transceiver for the hundred trillion.

Requirements
    • The two-layer Ethernet link between Huiju and Jieru, two links are backed up, and traffic load balancing can be achieved.
Topology analysis
    1. If the implementation of two links to each other for backup must ensure a link detection mechanism, timely detection of link failure and trigger action. A detection method is to detect the status of the port, in order to determine whether the link is faulty. 1 if LINK1 optical fiber link light failure is too large or broken, the optical signal can not be transmitted, Huiju and Jieru the logical link between the port, the port down, triggering action to switch traffic to the standby link. 2, the way to detect the port status can not deal with the situation of the LINK2 link, link2 link fiber failure, the transceiver and the switch between the port of the logical link is still maintained, the switch can not perceive LINK2 transmission path failure, resulting in a traffic black hole. Therefore, the link state of the LINK2 must be detected using a Hello message-based protocol. Huiju and Jieru periodically send a hello message, and each maintains a keepalive timer that, over a certain time, does not receive a hello message to the end, that is, the link fails, triggering the corresponding action.

      Figure 2
    2. Load Balancing can be implemented in a variety of ways, with the granularity of the load being a data frame, a data stream, or a VLAN or an instance 1 payload. EtherChannel technology can be based on the data flow payload 2,MSTP can be based on instance load.
Solution Solutions

The Huiju, Jieru configuration Mstp,huiju acts as the root bridge for all VLANs, uses MSTP to resolve link detection problems, and enables load balancing.

Principle describes load balancing

Huiju switch as the root bridge, g0/0/1-2 both ends are in forwarding state, the Jieru switch to elect the root port and block the other end port, to prevent the ring. Why is it possible to implement the load? Let's take a look at the Jieru switch root port election mechanism:
Generate tree root port election sequence
1. The port with the least cost to the root bridge path
2. Sender Bridge ID min 3
3. Sender Port ID min (Port id= Port priority + port number)
Each spanning tree instance (instance) on the bridge can select its own root port, according to the above election sequence 3, can change the port priority on the Huiju switch, to control the Jieru switch root port election, each instance chooses the different root port, thus realizes the load balance. See Figure 3

Figure 3
There is also a problem, Jieru on the G0/0/1 bandwidth is greater than E0/0/2, so g0/0/1 to the root bridge the least cost, according to order 1 should choose G0/0/1 as the root port, but not to match the order 3. This is also a good solution, you can manually force the two-port cost to be consistent, so that the spanning tree matches the election order 3.

Link detection

The spanning tree port state machine is based on the Hello message, so the spanning tree can perceive the link2 fiber link fault in Figure 1. By default spanning tree Hello Timer 2 s, dead timer S. For the network shown in Figure 3, the failover time is too long, and you can shorten the failover time by changing the network diameter 4来.

MAC Refresh Issues

Configure the MSTP after load Balancing test: (see Figure 3).

    1. LINK1 Link disconnects, network outage after approximately 1s recovery, instance 1 switch to backup link link2;
    2. Restore the Link1 link, instance 1 switch back to the main link link1, the network is non-disruptive;
    3. Link2 fiber link disconnection, network interruption after approximately 13s recovery, instance 2 switch to Link1;
    4. Restore the Link2 fiber link, the network outage after about 10s recovery, instance 2 switch back to LINK2;

Problem: In test 3, the network interrupt 13s is because the spanning tree has a dead time of 13s, but why is the network interrupted when test 4 recovers the fiber link?
When a spanning tree fails over, the forwarding path (MAC forwarding) of the VLAN that it maps to is also changed. Spanning tree notifies all switches through TC messages to take timely action to update Mac forwarding; What happens after the 3 fiber link disconnects? The link2 fiber link disconnects, and the G (E) 0/0/2 port on both switches is still up, except that BPDUs sent from the peer switch are not received. Spanning tree after the dead time timeout, the G0/0/2 is set to edge Port 5 with a status of forwarding. Fiber link recovery, G (E) 0/0/2 is still fowarding state, Jieru G0/0/1 become discarding state, spanning tree that the topology has not changed 6, so does not trigger TC, the switch's Mac forwarding is still using the old table entries (instance 2 traffic from G0 /0/1), thus causing a network outage (see Figure 4). For some time the host cannot communicate with the gateway, the host sends an ARP request or other multicast, the broadcast packet can refresh the switch's Mac forwarding post, and resume communication.

Figure 4

Conclusion

Based on the MSTP load of the figure 1 topology, the average time-to-failure of LINK2 is greater than LINK1, which can load time-sensitive, relatively insensitive traffic to link2.

Configuration (Huawei Devices)
**huiju **stp mode mstp stp bridge-diameter 3stp region-configurationregion-name GAinstance 1 vlan 1 to 50instance 2 vlan 51 to 100active region-configrationquitstp instance  1  root primarystp instance  2  root primaryint g0/0/1 port link-type trunkport trunk allow-pass vlan 1 50 100stp instance  1 port priority 0stp root-protectionint g0/0/2port link-type trunkport trunk allow-pass vlan 1 50 100stp instance  2 port priority 0stp root-protection**jieru**stp mode mstp stp bridge-diameter 3stp region-configurationregion-name GAinstance 1 vlan 1 to 50instance 2 vlan 51 to 100active region-configrationquitint  g0/0/1 port link-type trunkport trunk allow-pass vlan 1 50 100stp pathcost-standard dot1tstp instance 0 cost 2000stp instance 1 cost 2000stp instance 2 cost 2000int  e0/0/2port link-type trunkport trunk allow-pass vlan 1 50 100stp pathcost-standard dot1tstp instance 0 cost 2000stp instance 1 cost 2000stp instance 2 cost 2000

Finish

    1. Instance (instance) is a multi-spanning tree instance;
    2. EtherChannel not applicable to this topology;?
    3. For Jieru, "sender" refers to Huiju;
    4. Network diameter refers to the maximum number of switches that are passed when connecting between any two terminals, the default value is 7, which is generally based on the case value of 3-7. After adjusting the network diameter, the Hello and dead time will be correspondingly smaller.
    5. After the port enable tree protocol, the edge port Automatic detection feature is enabled by default, when the port does not receive the BPDU message in (2xHello timer+ 1) seconds, the port is automatically set to the edge port, otherwise it is set to the non-edge port.
    6. Topology change mechanism
      RSTP the criteria for judging the topology change are: ports on non-edge ports Enter the forwarding state. The switch that discovers the change will do the following work:
      1. Start a timer TC while timer (twice times the Hello time) for the other ports of all non-edge ports;
      2. Clear the MAC address on these ports;
      3. Within the TC while timer validity period, these ports send out BPDUs of TC position 1.
      The other switches receive the TC RSTP BPDUs, making the following changes:
      1. Clear the MAC address of all the ports except the TC Port received;
      2. Start TC while Timer on all ports and root ports, and send TC message. These ports are then sent out to the TC during this time period.
      RSTP TC Message flooding from the STP root bridge flooding to a gradual flood?

MSTP address link load balancing and link detection

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.