top of page
Writer's pictureMukesh Chanderia

Switching

Updated: Oct 9, 2022

Cisco switches runs PVSTP & RPVSTP & not STP or RSTP.


Lower value wins for Cost , Port Priority , Port Number & Root ID.


Bandwidth Cost


10 Mbps --> 100

100 Mbps --> 19

1 Gbps4 --> 4

10 Gbps2 --> 2


For Cisco Switches


Bridge ID = Priority + Vlan number


Root Switch is elected and cost from all switches to reach root switch is calculated.

The port which helps switch to reach root switch are called designated ports and redundant path is shut down by STP to avoid loop.


The ports which are shut down by STP are known as non-designated ports.


Port Fast: : It is Cisco proprietary & when enabled port skips listening & learning state and start forwarding traffic.


If interface is blocked by STP then it will pass through normal listening & learning state even if port fast is enabled.


If interface having portfast enabled receive bpdu packet then it's portfast feature is automatically disabled.


Port fast can be enabled in globally or per interface


(config) # spanning-tree portfast default


(Config -if) # spanning-tree portfast


Port fast can also be enabled on trunk but only in case of router on stick configuration or in simple words switch trunk interface is connected to router or firewall.


(Config -if) # spanning-tree portfast trunk


Edge Ports: : Ports on which portfast is enabled.


BPDU Guard: : If bpdu is received put port in error-disable


(config) # spanning-tree portfast bpduguard default


(Config -if) # spanning-tree bpduguard enable


BPDU filter: : filters bpdu


It can also be enabled globally or per port


If enabled globally then it will only filter outgoing bpdu.


(config) # spanning-tree portfast bpdufilter default


When enabled on interface then all incoming & outgoing bpdu will be filtered.


(Config -if) # spanning-tree bpdufilter enable


STP & PVSTP


Hello Time: Time interval between BPDU transmission. Its default value is 2 sec.


Forward Delay: time interval that is spent in the listening and learning state. The default timer is 15 seconds.


Maximum Age: Maximum time switch will keep the best BPDU. Default value 20 sec.


Aging Time: If the host is sitting idle i.e. not sending or receiving traffic then its information is deleted from mac address table in 300 sec or 5 min.


Port States


Disabled: Shutdown or unplugged


Listening: No Data is sent or received.

BPDUs are sent and received but no MAC address is learned.


Learning: No Data is sent or received.

BPDUs are sent and received & MACs are learned.


Forwarding: Data is sent & received

BPDUs are sent and received & MACs are learned


Blocking: No data is sent or received

BPDUs are received but not sent and no MAC address is learned.



For RSTP


Disabled: Shutdown or unplugged


Discarding: No Data is sent or received.

BPDUs are received but no MAC address is learned.


Learning: No Data is sent or received.

BPDUs are sent and received & MACs are learned.


Forwarding: Data is sent & received

BPDUs are sent and received & MACs are learned


Port Roles





Root: Port that receives the BPDUs with the lowest root path cost.


Designated: Port that transmits the best BPDU on the segment.


Alternate: Ports that have an alternate path to the root. Inferior BPDUs from same root are received.


Backup: Port on the same switch connected to the shared segment but less desirable than the designation.


Alternate Port can become Root port & Backup port can become Designated Port.


All ports of root switch are up & are designated ports.


Uplink Fast


Uplink Fast optimizes convergence when an uplink fails on an access layer switch.


Uplink Fast is enabled globally in a switch.


1) Increases the root priority to 49,152


2) Sets the post costs to 3000


3) Tracks alternate Root Ports (ports in which root Hellos are being received)


Now SW3 is unlikely to become root bridge given the large root priority value. Also, the very large costs on each link make the switch unlikely to be used as a transit switch.


When the RP port does fail, SW3 can fail over to an alternate uplink as the new RP and forward immediately.



Backbone Fast


Backbone Fast is used to recover from an indirect link failure. Let's say switch if lost connection to Root Switch, then it might claim itself to be Root bridge and send BPDUs to its Neighbours.


If Neighbour switch is still connected to the Root switch so it won't accept inferior BPDUs and after max age timer (20 sec) the old BPDUs will expire and will send BPDUs from

root switch to it so that it comes to know that root switch is still up.

























66 views0 comments

Recent Posts

See All

Interview Questions OSPF

Link-state routing protocols have a complete map of the network. Hence, it could calculate the shortest path to all the different...

Comentários


bottom of page