Popular Posts

Chapter 3 - 3




Per-Port Configuration
Global Configuration
PortFast State
PortFast BPDU Filtering State
Default
Enable
Enable
Enable
Default
Enable
Disable
Disable
Default
Disable
Not applicable
Disable
Disable
Not applicable
Not applicable
Disable
Enable
Not applicable
Not applicable
Enable

●     Root Guard - Prevents switches connected on ports configured as access ports from becoming the root switch. Enforces the position of the root bridge. When a root guard port gets a BPDU with a higher priority, it transitions into a special STP state (root-inconsistent) which is the effectively same state as listening and no traffic is passed through. When it stops receiving superior BPDUs, it will actually transition to regular STP. Enable root guard using the following interface-level command: [no] spanning-tree guard root
●     show spanning-tree summary totals
●     show spanning-tree summary
●     show spanning-tree interface fa0/1 detail
●     show spanning-tree inconsistentports
●     Black holes in a network are created when a device that receives frames has no forwarding information for that packet and thus essentially drops all such packets.
●     Loop Guard - Improves the stability of Layer 2 networks by preventing bridging loops. When a blocked port stops receiving BPDUs, instead of transitioning to a forwarding state, it’ll go into a loop-inconsistent state. Can be configured on a per-port basis and will only block on a per-VLAN basis. Enable Loop Guard on all non-designated ports. Should be enabled on root and alternative ports for all possible combinations of active topologies. Interface level command to enable: spanning-tree guard loop. You can enable it globally on all ports using the following command: spanning-tree loopguard default. To disable loop guard on an interface: no spanning-tree loopguard. To verify loopguard on an interface: show spanning-tree interface interface-id detail
●     UDLD - Detects and disables unidirectional links (traffic is being transmitted between neighbors in one direction only - can cause topology loops). Will shut down an interface with this issue. Useful on a fiber port to prevent network issues resulting in miswiring at the patch panel causing the link to be up/up status but the BPDUs are lost. Layer 2 protocol that works with layer 1 mechanisms. With UDLD enabled, the switch periodically sends UDLD protocol packets to it’s neighbor and expects the packets to be echoed back before the predetermined timer expires. If the timer expires, the switch determines the link is unidirectional and shuts it down. Default interval is 15 seconds which is configurable.
●     UDLD uses MAC 01-00-oc-cc-cc-cc with Subnetwork Access Protocol (SNAP) High-Level Data Link Control (HDLCC) protocol type 0x0111. Packet contains info about sending port’s device ID and port ID and the neighbor’s device ID and port ID.
●     In normal mode, UDLD simply changes the port to an undetermined state if it stops receiving UDLD messages from it’s directly connected neighbor. Aggressive mode UDLD tries to reestablish the connection with the neighbor and after 8 failed retries, the port state changes to the err-disabled state.
●     Aggressive mode is the preferred method of configuring UDLD.
●     In EtherChannel, UDLD shuts down only the physical link that failed.
●     Renabling the port is simply shutting it down and no shutting it.
●     In order for UDLD to work, it must be enabled on both ports on both sides
UDLD Default Config Status:

Feature
Default Status
UDLD Global enable state
Globally disabled
UDLD per-interface enable state for fiber-optic media
Enabled on all ethernet fiber-optic interfaces
UDLD per-interface enable state for twisted-pair (copper) media
Disabled on all Ethernet 10/100 and 1000BAST-TX interfaces

●     To enable UDLD on an interface: udld enable [aggressive]
●     To enable UDLD globally on fiber-optic interfaces: udld {enable | aggressive}
●     To disable UDLD on individual non-fiberinterfaces: no udld enable
●     To disable individual fiber-optic interface: no udld port
●     Verify config: show udld gigabitethernet 0/1
●     A designated port transmits BPDUs whereas a nondesignated port receives BPDUs

Comparison between Loop Guard and Aggressive Mode UDLD      

Loop Guard
Aggressive Mode UDLD
Configuration
Per port
Per port
Action granularity
Per VLAN
Per port
Auto-recovery
Yes
Yes, with err-disable timeout feature
Protection against STP failures caused by unidirectional links
Yes, when enabled on all root ports and alternative ports in redundant topology
Yes, when enabled on all links in redundant topology
Protection against STP failures caused by problem in software resulting in designated switch not sending BPDUs
Yes
No
Protection against miswiring
No
Yes


●     Enabling both aggressive mode UDLD and LoopGuard provides highest level of protection against bridging loops and black holes in multilayer switches
●     Flex Links is a layer 2 availability feature that provides an alternative solution to STP and allows users to turn off STP and still provide basic link redundancy. Can coexist with STP in distribution switches. Can enable a convergence time of less than 50 milliseconds consistently regardless of the number of VLANs or MAC addresses configured on the uplink ports.
●      Based on active/standby link pair on common access switch. Pair of layer 2 interfaces (switchports or port channels) that are configured to act as a backup to another layer 2 interface.
●     Configured on one L2 interface (active) by assigning another L2 interface as the Flex Links or backup links. Can be on the same switch or other switch in the stack. When one link is up and forwarding, the other link is in standby and ready to forward if the other link shuts down. If active goes down, standby goes up. When active comes back up, standby goes down again. Supported only on L2 ports/port channels, not VLANs or L3 ports.
●     Guidelines on Flex Links:
○     Can configure only one Flex Links backup link for any active link and it much be a different interface from the active interface
○     Interface can only belong to one Flex Links pair and can be a backup for only on active link. Active link cant’ below to another Flex Links pair.
○     Neither of the links can be a port that belongs to an EtherChannels but you can configure two port channels (Etherchannel logical interfaces) as Flex Links. Can configure a port channel and a physical interface as Flex Links with either the port channel or the physical interface as the active link.
○     Backup link does not have to be the same type of media as the active link but you should configure both to have similar characteristics so there aren’t loops or changes in behavior if standby begins to forward traffic
○     STP is disabled on Flex Links ports. That port doesn’t participate in STP even if the VLANs present on the port are configured for STP. When STP is not enabled, be sure there are no loops in the configured topology.
●     Flex Links are configured at the interface level with the command: switchport backup interface
○     Example:
■     interface fa1/0/1
■     switchport backup interface fa1/0/2
■     end
■     show interface switchport backup
●     To limit the limitations of not having multipathing and networkwide failure domain, the general recommendation is to use L3 connectivity at the distribution or core layer of the network and keeping L2 for the access layer.
●     Using L3 between the distribution and the core layer allows multipathing (up to 16 paths) using Equal-Cost Multipathing (ECMP) without dependency of STP and preferred unless there is a need to extend L2 across a data center pod (distribution block).
●     ECMP refers to situation where router has multiple equal-cost paths to a prefix and load-balances traffic over each path.
●     RSTP superior to 802.1D and PVST+ from a convergence perspective. If network includes other vendor switches, isolate the different STP domains with L3 routing to avoid STP compatibility issues
●     To configure a VLAN instance to become the root bridge, enter the spanning-tree vlan vlan_ID root  command to modify the bridge priority from the default value (32768) to a lower value. Manually placing the primary and secondary bridges enables you to support a deterministic configuration where you know which ports should be forwarding and blocking


Troubleshooting STP:
●     Duplex mismatch on point-to-point links can cause issues in STP which could lead to a bridging loop. Collisions on one side would prevent BPDUs from being sent and assumes the root bridge is no longer present and then shifts another port into forwarding state. Correct this by checking and adjusting to full duplex
●     Unidirectional Link Failure can lead to bridging loops and routing black holes. Resolve by configuring aggressive mode UDLD to detect incorrect cabling or unidirectional links which will put the affected port in err-disabled state. Recommended practice is to use aggressive mode UDLD on all point-to-point interfaces in any multilayer switched network
●     Frame corruption - high rate of physical errors may result in lost BPDUs which leads the interface to move to forwarding state. Very rare this happens since the port would need to miss BPDUs for over 50 seconds and successful BPDUs received breaks the loop. More common for nondefault STP parameters and aggressive STP timer values. This is generally a result of duplex mismatch, bad cable, or incorrect cable length
●     Resource Errors - If CPU is over-utilized, might lack resources to send out BPDUs. Look at product documentation for recommended number of VLANs and STP instances as not to exhaust resources
●     PortFast Configuration Error - If PortFast configured on the wrong ports, the fast transition can lead to bridging loops.

●     Troubleshooting Methodology:
○     Develop a plan
○     Isolate the cause and correct an STP problem
○     Document findings

●     Develop a Plan - Understand the following
○     Topology of the bridged network
○     Location of the root bridge
○     Location of the blocked ports and, therefore, the redundant links

●     Isolate the cause and correct an STP problem:
○     1 - Identify a bridging loop
■     Capture traffic on saturated link and check for duplicated packets
■     Check port utilization on devices - Look for abnormal values
■     Look for other protocols (like HSRP) breaking down
■     Check for lapping MAC addresses which doesn’t happen in a stable network
■     Don’t associate a bridging loop with a packet storm
○     2 - Restore connectivity
■     Break the loop - Can involve disabling every port that is redundant manually. Identify the part of the network that is more affected and start there. If possible, start by disabling ports that should be in blocking state first.
■     Enable logging and increase the logging level of STP events on switches with failures. Use debug commands (debug spanning-tree). Use following command to capture debug information into the logging buffer: logging buffered
○     3 - Check port status
■     Blocked ports - check that switch reports receiving BPDUs periodically on root and blocked ports. Issue the following to display the information: show spanning-tree vlan vlan-id detail
■     Duplex mismatch - Use the show interface command on specified ports
■     Port utilization - show interface will show if interface utilization using the load of the interface and the packet input and output rates
■     Frame corruption - look for increases in input error fields of the show interface command
○     4 - Check for resource errors
■     Use the show processes cpu command for this. Switches prioritize control packets such as BPDU over any lower-priority traffic. If the CPU exceeds 70 percent, action should be taken immediately or the network should be considered for re-architecture
○     5 - Disable unneeded features
■     Disable as many features as possible to reduce troubleshooting complexity. Reapply after root cause is found.

●     Document findings to improve upon future issues

No comments:

Post a Comment