- Redundancy in network
- STP (Spanning Tree Protocol)
- Redundancy is an essential part of a network which makes the network infrastructure resilient to failures as much as possible
However without spanning tree, there is a major problem here whcih can destroy the network
although pc2 recived the arp request and sent its reply, broadcast frame still remains in the network switches will continue flooding them
-
These broadcast frames will loop around the network indefinitely. If enough of these looped broadcasts accumulates in the network, the network will be too congested for legitimate traffic to use the network. This is called a
Broadcast strom
-
Each time a frame arrives on a switch port, the switch uses the mac address field to 'learn' and update its mac address table. When frames with the same source mac address repeatedly arrive on different interfaces, the switch is continuously updating the interface in its mac address table. This is known as
Mac Address Flapping
- IEEE 802.1D
- Switches from all vendors run STP by default
- STP prevents layer 2 loop by placing redundant ports in a blocking state, essentially disabling the interface
- These interfaces act as backups that can enter a forwarding state if an active (currently forwarding ) interface fails
- Interfaces in forwarding state behave normally. They send and receive all normal traffic.
- Interfaces in blocking state only sends and receive STP messages (called
BPDUs
= Bridge Protocol Data Units) - STP-enabled switches send/receive
Hello BPDUs
out of all interfaces (once every 2 seconds) - If a switch receives a
Hello BPDUs
on a n interface, it knows that interface is connected to another switch (routers, PCs, etc do not use STP , so they do not sendHello BPDUs
)
- Switches use one field in the STP
BPDUs
, theBRIDGE ID
field , to elect aroot bridge
for the network - The switch with the lowest
Bridge ID
becomes theroot bridge
- All ports on the
root bridge
are put in a forwarding state, and other switches in the topology must have a path to reach the root bridge.
This is the traditional bridge ID
Here SW1 is the Root Bridge , D = (Designated Ports) means it is in forwarding state
Bridge Priority id UPDATE as;
- When a switch is powered on, it assumes it is the root bridge.
- It will only give up its position if it receives a
superior BPDU (Lower Bridge ID)
- Once the topology has converged and all switches agree on the root bridge, only the root bridge sends BPDUs.
- Other switches in the network will forward these BPDUs, but will not generate their own original BPDUs.
- Each remaining switch will select one of its interfaces to be its
root port
. The interface with the lowestroot cost
will be the root port. Root Ports are also in a forwarding state.
- The
root cost
is the total cost of the outgoing interfaces along the path to theroot bridge
.