0% found this document useful (0 votes)
18 views21 pages

STP Summrize ١

Uploaded by

aldorah2moh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views21 pages

STP Summrize ١

Uploaded by

aldorah2moh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

How Spanning Tree Protocol Helps?

Spanning tree protocol prevent looping of frames around LAN by


placing ports of switch in either forwarding or blocking state.
Interfaces (ports of switch) which are in forwarding state act as
normally but Interfaces in blocking state doesn’t process any frame
received except STP messages and other important overheads.
Blocking Interfaces doesn’t learn MAC addresses, don’t forward
frames and don’t process received frames. Now if we again consider
the above discussed scenario with SW3’s Gi0/2 interface in blocking
state.

• Arvind sends the frame to SW3.


• SW3 forwards frame only to Gi0/1 port as Gi0/2 port is in
blocking state.
• Now SW1 receives frame and forward to Fa0/1 and Gi0/1
interfaces.
• SW2 receives frame and forward to Fa0/2 and Gi0/1
interfaces.
• SW3 will receive the frame on Gi0/2 interface but ignores the
frame as it is in blocking state.
In this way looping of frame around LAN can be prevented by using
STP.
What is Bridge in Computer Network –
Types, Uses, Functions & Differences
Last Updated : 19 Jun, 2024

••
The bridge is a networking device in a computer network that is used to
connect multiple LANs to a larger LAN. In computer networks, we have
multiple networking devices such as bridges, hubs, routers, switches, etc,
each device has its own specification and is used for a particular purpose.
The bridge is a networking device that connects the larger LAN networks
with the group of smaller LAN networks.
In this article, we are going to discuss everything about the bridge including
what exactly a bridge is, and the type of bridges we have in computer
networks including transparent bridges, source routing bridges, and
translational bridges, which will be followed by advantages and
disadvantages of the bridge in networking. then how the bridge is different
from the gateway and last we will look into the applications and functions
of the bridge in the network.
Bridge in Computer Network
A bridge in a computer network is a device used to connect multiple LANs
together with a larger Local Area Network (LAN). The mechanism of
network aggregation is known as bridging. The bridge is a physical or
hardware device but operates at the OSI model’s data link layer and is also
known as a layer of two switches.
The primary responsibility of a switch is to examine the incoming traffic and
determine whether to filter or forward it. Basically, a bridge in computer
networks is used to divide network connections into sections, now each
section has a separate bandwidth and a separate collision domain. Here
bridge is used to improve network performance.

Types of Bridges
There are three types of bridges in computer networks, which are as
follows:
• Transparent Bridge: Transparent bridges are invisible to other
devices on the network. This bridge doesn’t reconfigure the
network on the addition or deletion of any station. The prime
function of the transparent bridge is to block or forward the data
according to the MAC address.
• Source Routing Bridge: Source routing bridges were developed
and designed by IBM specifically for token ring networks. The
frame’s entire route is embedded with the data frames by the
source station to perform the routing operation so that once the
frame is forwarded it must follow a specific defined path/route.
• Translational Bridge: Translational bridges convert the
received data from one networking system to another. Or it is
used to communicate or transmit data between two different
types of networking systems. Like if we are sending data from a
token ring to an Ethernet cable, the translational cable will be
used to connect both the networking system and transmit data.
Working of Bridges
Let’s see the step-by-step working of the bridge in computer networks:
• Receiving Data: The bridge gets data packets (or frames) from
both network segments A and B.
• Building a Table: It creates a table of MAC addresses by looking
at where the data is coming from to know which device is on
which segment.
• Filtering Data: If the data from network A is meant for a device
also on network A, the bridge stops it from going further.
• Forwarding Data: If the data from network A is meant for a
device on network B, the bridge sends it to the correct place on
network B.
• Repeating for Both Sides: The bridge does the same thing for
data coming from network B.

Working of Bridge
Models of Bridge in Computer Networks
There are two main models of bridging in computer network: Local
bridging and remote bridging. Let us learn about them in detail.
• Local Bridging Local bridging connects LAN switches using local
cables. This allows computers on the same Ethernet segment,
whether they’re connected to virtual hubs or physical LANs, to
communicate freely. It’s used when LANs within the same area
need to talk to each other directly at the link layer.
• Remote Bridging Remote bridging connects two bridges over a
Wide Area Network (WAN). This model is used when LANs are
located in different geographical areas and need to communicate
with each other at the link layer.
Uses of Bridge in Computer Network
• Bridges are used to increase the network capacity as they can
integrate multiple LANs together.
• On receiving a data frame, databases use the bridge to decide
whether to accept or reject the data.
• In the OSI model, it can be used to transmit the data to multiple
nodes of the network.
• Used to broadcast the data even if the MAC address or
destination address is unavailable.
• It forwards data packets despite faulty nodes.
• The data packet can be forwarded or discarded by the bridge
when the MAC address is available.
Functions of Bridges in the Network
• The bridge is used to divide LANs into multiple segments.
• To control the traffic in the network.
• It can interconnect two LANs with a similar protocols.
• It can filter the data based on destination/MAC address.
Advantages
• Bridges can be used as a network extension like they can connect
two network topologies together.
• It has a separate collision domain, which results in increased
bandwidth.
• It can create a buffer when different MAC protocols are there for
different segments.
• Highly reliable and maintainable. The network can be divided
into multiple LAN segments.
• Simple installation, no requirement of any extra hardware or
software except the bridge itself.
• Protocol transparency is higher as compared to other protocols.
Disadvantages
• Expensive as compared to hubs and repeaters.
• Slow in speed.
• Poor performance as additional processing is required to view
the MAC address of the device on the network.
• As the traffic received is in bulk or is broadcasted traffic,
individual filtering of data is not possible.
• During the broadcasting of data, the network has high broadcast
traffic and broadcast storms can be formed.
Conclusion
In computer networking, a bridge connects multiple network segments,
allowing them to function as a single network. There are several types,
including transparent, source-routing, and translation bridges, each serving
different purposes. Bridges are used to improve network performance,
reduce traffic, and extend the reach of networks. They function by filtering
traffic and forwarding data based on MAC addresses. In essence, bridges help
manage data flow in complex networks, ensuring efficient communication
and connectivity between different network sections.

Frequently Asked Questions on Bridge in Computer Network – FAQs


What does a bridge do?
A bridge helps manage network traffic, reduces congestion, and
connects different network segments.

What are the types of network bridges?


There are three main types:
• Transparent Bridge: Works automatically without user
input.
• Source-Routing Bridge: Uses information in the data to
decide where to send it.
• Translation Bridge: Connects different kinds of networks,
like Ethernet and Wi-Fi.

How does a bridge work?


A bridge looks at the addresses of incoming data, decides whether to
keep it within the same segment or send it to another segment, and
then forwards it appropriately.

Why use a bridge in a network?


Bridges improve performance, extend the network’s reach, and help
manage data traffic.
Working of Spanning Tree Protocol (STP)
Last Updated : 21 Sep, 2022

••
Spanning Tree Protocol (STP) prevents the looping of the frame by putting
the interfaces of the switch in either forwarding or blocking state. How
Switch is able to decide which interface should be in forwarding or blocking
state. We’ll learn the answer to this question in this article. Before we
further proceed, we must know some terms.
• BID – It stands for Bridge ID. It is an 8-byte value unique to each
switch. The first two bytes are priority bytes and the remaining six
bytes contain the built-in MAC addresses of the switch.
• Path Cost – It is a numeric value given to link between two
interfaces based on the speed of the interface. The higher the link
speed, the lower will be the cost.
• BPDU –Bridge protocol data unitis a message that switches
exchange b/w them. Commonly used BPDU is Hello. It contains
cost and BID.
Note – We use the word “Bridge” although switches are involved because
STP was introduced before switches. Bridges were the first device to use
STP. Hence, various terms include the word “Bridge”.
In Order to choose an interface for forwarding and blocking states, STP uses
three criteria:
• Selection of root switch. All of its interfaces are in a forwarding
state.
• All other non-root switches make a root port. And root port is the
port whose path cost to the root switch is minimum. All root ports
are placed in a forwarding state.
• The least path cost from each switch to the root switch is called
that switch’s root cost. And among all switches, the switch whose
root cost is minimum becomes the designated switch. The Port of
the designated switch from which root cost is calculated becomes
the designated port(DP). DP is placed in a forwarding state.

Characterization of ports STP states

All ports of the root switch Forwarding state


Characterization of ports STP states

Root port of the non-root switch Forwarding state

Designated ports Forwarding state

All other working ports Blocking state

Electing Root Switch :


All switches in a LAN exchange Hello BPDU with each other. Firstly all
switches consider themselves root switches but the root switch is selected
based on the BID of a switch. A switch having a lower priority bit in BID is a
selected root switch. If the priority bit gets tied, then the switch has a lower
MAC address in Hello BPDU is the selected root switch. In the diagram
shown below, SW1 becomes the Root switch after comparing BID from each
switch in LAN.

Choosing Root port on Non-root Switches :


The ports in each switch having minimum path cost to the root switch are
chosen as the root port for that switch. In the diagram shown below, the
Gi0/1 port of both SW2 and SW3 is chosen as the Root port (RP).
Root Bridge Election in Spanning Tree
Protocol
Last Updated : 16 Jun, 2022

••
Redundant links are used to provide a backup path when one link goes
down but a Redundant link can sometimes cause switching loops. The
main purpose of Spanning Tree Protocol (STP) is to ensure that you do
not create loops when you have redundant paths in your network.
Spanning Tree Protocol (STP) –
As IEEE STP is used to make a loop-free network by monitoring the
network to track all the links and shut down the redundant ones. These
are some important terms related to Spanning Tree Protocol:

• Bridge Priority Data Unit (BPDU) – It contains the Bridge ID,


Sender’s Bridge ID, Cost to the Root Bridge, Timer values on Root
Bridge. All switches exchange BPDU in order to elect root bridge.
The switch with the lowest Bridge ID become the root bridge.
• Bridge ID – It is an 8-byte field that is a combination of bridge
priority (2 bytes) and Base Mac address (6 bytes) of a device. If
there is a tie on bridge priority then the Base Mac address is
considered.
• Bridge Priority – It is a priority, which is assigned to every
switch, 32768 by default.
• Root Bridge – The root bridge is the bridge with the lowest
Bridge ID. All the decisions like which ports are the root ports
(the port with the best path to the root bridge) are made from
the perspective of the root bridge.
• Path cost – A switch may encounter one or more switches in the
path to the root bridge. All the paths are analyzed and the path
with the lowest cost will be selected.

Speed Link Cost

10 Mbps 100

100 Mbps 19

1 Gbps 4

10 Gbps 2

Designated port – The port which sends the best BPDU i.e ports on the
root bridge will be in a forwarding state.
Root port – The port which receives the best BPDU on a non-root
bridge. Criteria for selecting root port:

1. Lowest path cost to reach the root bridge


2. Lowest sender bridge ID
3. Lowest sender port ID
(Port priority + Port number) – Port priority is by default 128 and port
number is the switch interface number.
Election procedure –
All the switches in the network declare themselves root bridges and
start exchanging their own BPDU. The BPDU with the lowest bridge ID
is considered as superior. Now the switch receiving the superior BPDU
makes changes in its own BPDU and carries forward to its neighbours. It
changes the value of root Bridge ID with its superior BPDU bridge ID.
This process goes on until all the switches are satisfied with which
bridge has the lowest bridge ID and hence that switch will be declared
as the root bridge.
Now according to the criteria, the root ports will be selected and then
the port left will be in blocking mode.
Example –

Here is a small topology with three switches switch A (mac address-


0000.0ACA7.A603), switch B(0030.F222.2794), and switch
C(000A.41D5.7937) with all having default priority (32768).
Root Bridge election –
As all the switches have default priority therefore there is a tie on the
basis of priority. Now, the switch with the lowest Mac address will
become a root bridge. Here, switch A will become the root bridge as it
has the lowest Mac address. Therefore, the ports of switch A will be in
forwarding state i.e designated port.

Root Ports Election –


The root ports are selected on non-root bridges, i.e. switch B and switch
C. Now, for instance, if switch C choose the path through switch B then
the cost will be (4+4=8) but if it chooses the directly connected path to
switch A then the cost will be 4, therefore, both switch B and switch C
will choose the ports connected to switch A as their root ports.
Now, the only thing left is to find which port will be in forwarding mode
and blocking mode respectively. Now as the link between switch B and
switch C has the same cost as the root bridge, therefore, the switch with
the lowest bridge I’d be in forwarding mode therefore switch C port will
be in forwarding mode and switch B port will be in block mode.

How Spanning Tree Protocol (STP) Select


Designated Port?
Last Updated : 25 Feb, 2022

••
Spanning tree protocol is a type of communication protocol that
functions to build a loop-free topology, which means the arrangement of
elements in a computer network. STP commonly works for layer-
2 bridges and switches. It also provides a backup link for the network
system if the active link fails. Layer-2 devices send the data in the form of
frames.
The root port of each bridge forms a part of the spanning tree. The ports
selected by the spanning tree are the best ports to reach the root bridge,
which is also known as the destination port. It means that every switch
or bridge has only one root port. If any other switch does not have any
root port, it selects one designated port and the other as non-designated
ports. The designated port will be considered as the ports in forwarding
state, while others in blocking state.
STP enables a single port of a node and disables all other ports. It means
that it allows only one active path for transmission between the two
nodes. The port selected by the STP is named the root port, which sends
data to the root bridge. The root bridge receives all the data from
different bridges.
The cost of the port, port priority, and switch ID determines the path
for the destination. If the cost of the port and the switch ID is the lowest,
it becomes the path for the destination.

Steps of selecting the designated port

The process to select the designated port is listed below:


1. Select the switch with the lowest path cost: We need to
select the switch that has the lowest path cost.
2. Select the designated port in the switch based on the
lowest cost: There are two ports to reach the destination. We
need to select one port with the lowest cost as the designated
port and another port as the non-designated port.
Or
Select the designated port in the switch based on the bridge
ID: If the lowest cost on two switches is the same, it selects the
designated port based on the Bridge ID. The designated port
works in a forwarding state. It forwards the data.
3. Specify the other port as the Non-designated port: The root
port of the other switches is specified as NDP (Non-designated
port), which is in a non-forwarding or blocking state. It is done
to avoid any loops during the data transmission.
Example: Consider the below switch diagram:

Data transfer in the above diagram will be from switch3 to switch2.


Explanation: It is because of the lowest cost. The switch2 has the lowest
Bridge ID and is thus selected as the root bridge. Among the switches,
switch3, and switch1, one needs to be selected as the designated port and
the other is selected as the non-designated port. Since, switch3 has the
lowest cost (10<18), it is selected as the designated port made in the
forwarding state. Switch1 is selected as the non-designated port made in
the blocking state.
Types of Spanning Tree Protocol (STP)
Last Updated : 02 Nov, 2021

••
Prerequisite – Spanning Tree Protocol
Spanning Tree Protocol (STP) is used to make a loop free network by
monitoring the network to track all the links and shut down the least
redundant ones.
Root bridge is a switch in a single VLAN or whole topology (according to
the type of STP standard used) which is responsible for distributing BPDUs
and block the least redundant port.
Election procedure (root bridge) –
All the switches in the network declare themselves as root bridge and start
exchanging their own BPDUs. The BPDU with the lowest bridge I’d will be
considered as superior. Now the switch receiving the superior BPDU make
changes in its own BPDU and carry forward to its neighbour switches. It
changes the value of root Bridge I’d with its superior BPDU bridge I’d. This
process goes on until all the switches are satisfied with which bridge have
the lowest bridge I’d and hence that switch will be declared as root bridge.
Types of Spanning Tree Protocol (STP) –
1. 802.1D – This is also known as CST (Common Spanning Tree). It is a
spanning tree standard developed by IEEE which elects only one root
bridge per whole topology. All the traffic flows over the same path (the
best path to the root bridge) but this doesn’t hold good always as there can
be scenarios in which the optimised path to reach a VLAN is different than
the path obtained on electing the root bridge. It is very slow as it takes 32
seconds to converge.
Advantages:
• Less CPU and memory required.
Disadvantages:
• Lesser optimisation as the path calculated as the best cost to root
bridge might not be the best path to reach a network.

• No load balancing.

2. Per VLAN Spanning Tree + (PVST+) – It is a spanning tree standard


developed by Cisco for its devices which finds the root bridge per VLAN. It
is a Cisco default version of STP. It finds separate 802.1d spanning tree
instance for each VLAN. It also provides backward comparability with
802.1d or CST. This is more optimized to the IEEE because it provides
optimal path selection as separate instance of STP per VLAN is find. This is
as slow as CST.
Advantages:
• PVST+ provides more optimization on the performance of a
network than CST as it selects root bridges per VLAN.

• Bandwidth consumption is lesser than CST.

• Optimum load balancing is achieved.


Disadvantages:
• This is slow as CST i.e. convergence time is slow. By default, Cisco
switches take 50 seconds for converging.

• More resources (CPU and memory) is required.

3. 802.1w – Rapid Spanning Tree Protocol (RSTP) – It is a spanning


standard developed by IEEE which provides faster convergence than CST
but holds the same idea of finding a single root bridge in the topology. The
bridge resources needed in RSTP is higher than CST but less than PVST+ .
Advantages:
• Prevents network loops.
• Prevents redundancy.
• Faster Convergence.
• Backward compatible with STP.
4. Rapid Per VLAN Spanning Tree + (RPVST+) –This Spanning Tree
standard is developed by Cisco which provides faster convergence than
PVST+ and finds separate instance of 802.1w per VLAN. It requires much
more CPU and memory than other STP standards.

5. 802.1s (Multiple Spanning Tree) :-This standard is developed by IEEE


in which grouping of VLANs is done and for each single group, RSTP is run.
This is basically a Spanning Tree Protocol running over another Spanning
Tree Protocol.
Advantages:
• High redundancy
• load balancing can be achieved.
• lower CPU and memory usage is required
Disadvantages:
• More configuration is required and not easy to implement.
Rapid Spanning Tree Protocol
Last Updated : 29 Nov, 2021

••
RSTP is the more improved and advanced version of STP which is a layer 2
protocol that prevents bridge loops and broadcast storms in local
networks with redundant connections. Rapid spanning tree protocol has
faster convergence and it is also backward-compatible with STP. To make
sure a loop-free topology, the Rapid Spanning Tree Protocol (RSTP)
precludes some of the connections which permit only a single active path
between any two devices. All these disabled connections can be used as
backup paths in case an active connection fails. The IEEE standard for
Rapid spanning tree protocol is 802.1w.
Similarities between STP and RSTP:
• In both STP and RSTP bridge with the lowest Bridge ID is elected
as Root Bridge.
• BPDUs in both STP and RSTP are forwarded between switches.
• Roots and designated ports are elected in the same manner as
they are elected in STP and their functionality is also identical to
that of STP.
Working of RSTP
RSTP follows a strict set of rules by which the switches decide the best
way to forward the traffic on the network free from any redundancy.
When RSPT is enabled on a network, the spanning tree algorithm decides
the configuration of the spanning tree automatically.
The topmost bridge of the spanning tree is the Root bridge in RSTP and it
is in charge of sending all the network topology information to other
switches present in the network. This plays an important role when
hardware failures occur, or some other topology changes occur. So, the
most efficient alternate paths are established without any delay.
Port Roles in RSTP
There are four-port roles in RSTP
1. Root Port: The port with the best path cost is elected as the root
port. A non-root bridge can only have one root port. Root ports
forward data to the bridge.
2. Designated Port: It is a non-root port that is used as a
forwarding port for every LAN segment.
3. Backup Port: It is a backup path to a segment where another
bridge port is already connected. These ports receive BPDUs
from their switches but they remain in a blocked state.
4. Alternate Port: It is a Backup port with a less desirable path
cost. All such ports remain in a blocked state.
Port States in RSTP
Rapid spanning tree protocol supports three port states.
1. Discarding: In the discarding state, no user data is sent over the
port.
2. Learning: In the learning state the ports learn about the MAC
address but it doesn’t forward any frames.
3. Forwarding: In the forwarding state the ports can send data and
are fully operational.
Working of Port States:
At first, a switch port starts in a discarding state, a discarding port does not
forward any frames nor does it learn MAC addresses, and it also listens for
BPDUs. Backup and alternate ports remain discarding.
In RSTP if a port is elected as a Root port or Designated port, the transition
will directly take place from a discarding state to a learning state. Hence,
RSTP doesn’t need a listening state. A learning port adds MAC addresses
into the Content addressable memory table; However, it can not forward
frames.
In the next phase, a learning port transitions into a forwarding state. A
forwarding port is completely functional i.e., it learns MAC addresses,
sends and listens for BPDUs, and forwards frames.
Benefits of RSTP:
• Prevents network loops.
• Prevents redundancy.
• Faster Convergence.
• Backward compatible with STP.
• Every switch generates BPDU and sends them out at the hello
interval.
• Switches don’t need artificial forward delay timers.
In STP BPDUs are generated only by the root bridge. If a non-root bridge
receives a BPDU from the root bridge on its root port, it will pass on the
BPDU downstream to its neighbors. This Convergence process is slower
and STP relies on forwarding delay timers to make sure a loop-free
environment, this takes a lot of time.
In RSTP, switches just handshake directly with their neighboring switches,
this allows quick synchronization in the topology. This lets ports promptly
change from a discarding state to a forwarding state without a delay timer.
Types of ports in RSTP
There are three types of ports in RSTP
1. Edge: It is a port that connects to a host.
2. Root: It is a port that connects to another switch, and it has the
best path cost to the root bridge.
3. Point-to-point: It is a port that connects to another switch and it
has the potential of becoming the designated port for a segment.
RSTP algorithm
RSTP algorithm follows some general steps:
• Determining root bridge: The switch with the lowest bridge
priority is elected as the root bridge. In the case of a tie, a
tiebreaker based on the MAC address is used to decide the root
bridge i.e., the switch with the lowest MAC address is elected as
the root bridge.
• All root bridge interfaces are put in forwarding state: In the
forwarding state, all the ports learn MAC addresses, and also
send and receive data.
• All non-root switches select a root port: Based on root cost the
root port is the best path to the root bridge. There is only one
root port in a non-root switch.
• Selecting designated port: these ports are allowed to forward
traffic and they are selected based on port cost. All leftover root
bridge ports are designated ports.
• Rest of the ports in blocking state: these ports do not pass any
data to other switches and they also don’t learn MAC addresses.
Configuring Spanning Tree Protocol Portfast
Last Updated : 31 Mar, 2022

••
Spanning Tree Protocol is a data link layer or layer-2 protocol whose prime
objective is to prevent loops in the different network configurations or
network topologies. It tracks all the links and closes the redundant ones. It
uses the spanning tree algorithm(STA) to create a topology database and
then search out the redundant links to disable them.

Switch Topology with Loops ( Before STP )

This network is vulnerable to nasty issues like broadcast storms,


multiple frame copies, and MAC thrashing.
In order to understand STP, there are 3 major things you need to identify
first:
1. Identify the root bridge by checking bridge IDs.
2. Find out root ports by determining the lowest path cost to the
root bridge.
3. Find designated ports by checking bridge IDs.
In short, identify – the root bridge, root ports, and designated ports. So
let’s identify them with the below topology:
Root Bridge: Bridge having lowest Bridge ID.
Bridge ID: Combination of bridge priority and MAC address of a bridge.
Path cost: A switch may encounter one or more switches on its path to
the root bridge and there may be more than one possible path. A path
cost is calculated for each unique path by adding port costs encountered
on the way to the root bridge.
Root Port: The root port is the link between the lowest path cost and the
root bridge. Remember the root bridge can never have a root port
designation, while every other switch in a network must have one and
only one root port.
Designated Port: A designated port is one that’s been determined to
have the lowest cost to get to on a given network segment, compared to
other ports on that segment. A designated port will be marked as a
forwarding port.
Example:

Election of Root Bridge, Root Port, and Forwarding Port (After STP)

In the above topology, the first root bridge is elected. Since all bridges
have the same priority, the MAC address is the tiebreaker to elect the root
bridge. Since Switch1 has the lowest bridge ID, it is elected as Root
Bridge. Now, apart from the root bridge rest, all bridges have to find the
root port. Looking at the cost of each link it’s clear that Switch2 and
Switch3 use directly connected links as root ports (mentioned as RP). If
Switch2 chooses a path via Switch3 to Root Bridge then the total cost
would be 4 + 4 = 8. Hence it is rejected. Every port on the root bridge is a
forwarding port(mentioned as F).
Now the only thing left is to choose the one forwarding port on the
segment between Switch2 and Switch3. So based on the bridge ID, the
port with the best and lowest(here Switch2) would become the only
bridge forwarding on that segment, with the one having the highest
Bridge ID (here Switch3) put into blocking mode (mentioned with a
cross).
Port Fast:

For STP to converge it takes about 50 seconds i.e. to identify root bridge,
root ports, blocking the port, and transition of designated to forwarding
port, all these things take about 50 seconds. Now if you don’t wish to wait
that long and you are absolutely sure that your topology is loop-free(and
will be) you may use the feature of PortFast which is a Cisco proprietary
extension to the 802.1d standard. By using PortFast the ports will
transition from blocking to the forwarding state immediately. If you have
a server or other devices connected to a port, you may take the help of
this feature.
Access Port: Any switch port that allows traffic of only a single VLAN is
known as an access port and it belongs to that VLAN. e.g. Consider a port
f0/0 that is connected to the finance department then it will be
configured in such a way that only traffic belonging to the finance
department will flow through that port.
Trunk Port: This term trunk port is inspired by the telephone system
trunks wherein multiple telephone conversations are carried out at a
time. Similarly, trunk ports in switches carry traffic of multiple VLANs at
a time. Hence the bandwidth of any trunk port is usually far more than
any access port – mostly in 100s, 1000s, or even 10000s of Mbps!

Enabling PortFast on an Access Port:

Step 1: To enable PortFast over an access port connected on a single


server, workstation, or switch. Use the following command:
set spantree PortFast mod_num/port_num enable | disable
Step 2: Now, verify the PortFast setting over a switch port.
show spantree [mod_num/port_num] [vlan]

Enabling PortFast on a Trunk Port:

Step 1: To enable PortFast on a trunk port connected to a single server,


workstation, or switch. Use the following command:
set spantree portfast mod_num/port_num enable trunk
Note: If the above command is written without the trunk keyword, the
PortFast will remain disabled.
Step 2: Now, verify the PortFast setting over a switch port.
show spantree portfast [mod_num/port_num]
Disabling PortFast:

Step 1: For disabling PortFast, use the following command in the


privileged mode of the system:
set spantree portfast mod_num/port_num disable
Step 2: To verify the PortFast setting, use the following command:
show spantree mod_num/port_num

Resetting PortFast:

Step 1: For resetting PortFast to default, use the following in the


privileged mode of the system:
set spantree portfast mod_num/port_num default
Step 2: To verify the PortFast setting, use the following command:
show spantree mod_num/port_num

You might also like