Switching

=Basics=

STP

 * STP Port States:
 * Blocking - A port that would cause a switching loop if it were active. No user data is sent or received over a blocking port, but it may go into forwarding mode if the other links in use fail and the spanning tree algorithm determines the port may transition to the forwarding state. BPDU data is still received in blocking state. Prevents the use of looped paths.
 * Listening - The switch processes BPDUs and awaits possible new information that would cause it to return to the blocking state. It does not populate the MAC address table and it does not forward frames.
 * Learning - While the port does not yet forward frames it does learn source addresses from frames received and adds them to the filtering database (switching database). It populates the MAC Address table, but does not forward frames.
 * Forwarding - A port receiving and sending data, normal operation. STP still monitors incoming BPDUs that would indicate it should return to the blocking state to prevent a loop.
 * Disabled - Not strictly part of STP, a network administrator can manually disable a port


 * RSTP Port Roles:
 * Root - A forwarding port that is the best port from non-root bridge to root bridge
 * Designated - A forwarding port for every LAN segment
 * Alternate - An alternate path to the root bridge. This path is different from using the root port
 * Backup - A backup/redundant path to a segment where another bridge port already connects
 * Disabled - Not strictly part of STP, a network administrator can manually disable a port


 * RSTP Port States:
 * Disabled - Interface is administratively shut down or disabled.
 * Discarding - No user data is sent over the port
 * Learning - The port is not forwarding frames yet, but is populating its MAC-address-table
 * Forwarding - The port is fully operational


 * STP Enhancements:


 * PortFast -
 * UplinkFast -
 * BackboneFast -


 * STP Types:


 * What is Etherchannel? What are the protocols used?


 * What is behaviour of STP in Etherchannel?

Root Bridge Election
Source: firewall.cx

Native VLAN

 * The VLAN that untagged traffic received on a trunk port will be forwarded to.
 * Assume that trunk port carrying VLANs 10, 11, and 12.
 * VLAN 10 is set as the native VLAN.
 * Any frame received on that port with an explicit tag will go into the corresponding VLAN.
 * Any frame that has no tag will be put into VLAN 10 since that's defined as the native VLAN.
 * This is used in case you are connecting a PC via IP Phone to a Switch.

ARP vs MAC Table

 * A switch with Management VLAN assigned with IP address will have a ARP Table.
 * Router with a Switching module will have a MAC Table.

Unicast Flooding
– not learnt that mac address - entry expired & got flushed away
 * Flooding occurs when the switch do not have destination mac-address in MAC Table
 * To ensure the frame reaches its intended destination, the switch will replicate that frame out of all ports, less the port where the frame was received.
 * By default, each mac-address table entry has a timeout timer of 5 minutes
 * This timer gets reset as relevant frames keep coming into the relevant port