Tuesday, September 3, 2019

Electing Designated Ports


Electing Designated Ports



To remove the possibility of loops, Spannig Tree Protocol (STP) makes a final computation to identify one designated port on each network segment. Suppose that two or more switches have ports connected to a single common network segment. If a frame appears on that segment, all the bridges attempt to forward it to its destination. Recall that this behavior was the basis of a loop and should be avoided.

Instead, only one of the links on a segment should forward traffic to and from that segment the one that is selected as the designated port. Switches choose a designated port based on the lowest cumulative root path cost to the root bridge.

Notice that the entire STP determination process has served only to identify bridges and ports. All ports are still active and switching loops still might lurk in the network. STP has a set of progressive states that each port must go through, regardless of the type or identification. These states actively prevent loops from forming.

In each determination process discussed so far, two or more links might have identical root path costs. This results in a tie condition, unless other factors are considered. All tiebreaking STP decisions are based on the following sequence of four conditions:

1. Lowest root bridge ID
2. Lowest root path cost to root bridge
3. Lowest sender bridge ID
4. Lowest sender port ID

Figure 2.5 demonstrates an example of designated port selection. This figure is identical to Figure 2.3 and Figure 2.4, with further spanning-tree development shown. The only changes are the choices of designated ports, although seeing all STP decisions shown on one network diagram is handy.



Figure 2.5 Example of Designated Port Selection

The three switches have chosen their designated ports (DPs) for the following reasons:

Switch A : Because this switch is the root bridge, all its active ports are designated ports, by definition. At the root bridge, the root path cost of each port is 0.

Switch B: Switch A port gi1/0/1 is the DP for the Segment A–B because it has the lowest root path cost (0). Switch B port gi1/0/2 is the DP for segment B–C. The root path cost for each end of this segment is 19, determined from the incoming BPDU on port gi1/0/1. Because the root path cost is equal on both ports of the segment, the DP must be chosen by the next criteria—the lowest sender bridge ID. When Switch B sends a BPDU to Switch C, it has the lowest MAC address in the bridge ID. Switch C also sends a BPDU to Switch B, but its sender bridge ID is higher. Therefore, Switch B port gi1/0/2 is selected as the segment’s DP.

Switch C : Switch A port gi1/0/2 is the DP for Segment A–C because it has the lowest root path cost (0). Switch B port gi1/0/2 is the DP for Segment B–C. Therefore, Switch C port gi1/0/2 will be neither a root port nor a designated port. As discussed in the next section, any port that is not elected to either position enters the Blocking state. Where blocking occurs, bridging loops are broken.

As a final step, it is often helpful to see the resulting network topology after STP has made its decisions. Figure 2.6 shows the topology without all of the STP notation and clutter. Even though the three switches are physically connected in a closed loop, STP has detected that possibility and has blocked the link between Switches B and C, effectively preventing a loop from forming. Both B and C can still pass traffic through Switch A, so the network is still fully functional.


Figure 2.6 The Resulting STP Topology

Think about how this topology might apply to a real network, where Switch A is in the distribution layer and Switches B and C are in the access layer. The root bridge is located higher in the network hierarchy, feeding lower-level switches with active links. The loop will be broken farthest away from the root, where traffic might have traveled between switches inefficiently.


No comments:

Post a Comment

Tables Used in Switching

Tables Used in Switching Catalyst switches maintain several types of tables to be used in the switching process. The tables are tailo...