2. What is a Bridge?
An internetworking device that relays frames among its ports based upon
Data Link Layer information( e.g. MAC addresses and/or VLAN
identifiers)
3. Bridge Operation
•Receive frames from all ports.
•Look up the destination MAC address from the Bridge address
table(filtering database) and identify the interface through which it has
to be forwarded.
•Forward the frame through that port alone.
•If entry not present then forward through all ports except on the one
through which it was received (flooding).
•Table entries could be manually entered or learnt dynamically.
5. Operations on filtering database
•Destination Address Lookup
• To forward the frames to the destination.
•Source Address Learning
• To maintain the filtering database.
•Ageing of entries
• To avoid stale entries in the database.
6. Source Address Learning
H1 H2 H5
H4H3
H6
H7 H8
MAC Address Port #
Frame sent
to H5
Port 1 Port 2
Port 3 Port 4
H2 1
Entry for H2
added
Flooded through
all ports
Entry for H2 not
present
Entry for H5
not present
7. Destination Address Lookup
H1 H2 H5
H4H3
H6
H7 H8
MAC Address Port #
Port 1 Port 2
Port 3 Port 4
H2 1
Frame sent
to H2
Frame
forwarded
only through
port 1
Address present in
table looked up
8. Aging Entries from the table
Table entry Valid bit Hit bit
Entry1
Entry2
Entry3
Entry4
1
1
1
0
1
0
0
0
Valid and
active
Aged out
Ready for
ageing
9. Problem of loop
Loop results in
• Unicast frame duplication.
• Multicast frame multiplication.
• Address table non-convergence.
10. Unicast frame duplication
Unicast frame from
H3 to H1
port2
port2
port1
port1
port2
B1
B3 B2
Link A
Cost=100
Link B
port1
H1
H2
H3 H4 H5
1H4
1H3
2H2
2H1
1H4
1H3
2H2
2H1
1H4
1H3
3H2
2H1
port3
Both B2 and B3
forward the frame
on respective
ports
H1 receives 2
copies of the
same frame
11. Multicast Frame Multiplication
port2
port3
port1
port1
port2
B1
B3 B2
Link A
Cost=100
Link B
port1
H1
H2
H3 H4 H5
1H4
1H3
2H2
2H1
1H4
1H3
3H2
3H1
1H4
1H3
3H2
2H1
port3
port2
Multiple
copies of
the same
frame
received
Multicast
frame sent
from H1
Flooded thru all
ports
Flood
ed
thru
all
ports
13. Solution for avoiding loop
•Manual configuration
•Spanning Tree Protocol: The purpose of STP was and is to prevent
loops in a bridged network while allowing redundant connections.
14. STP Concepts
•Tree Topology
• Loop free topology.
• No segment is isolated.
•Root Bridge
• There is exactly one root bridge.
• This the logical center.
•Designated bridges
• One and only one bridge is responsible for forwarding traffic from the direction
of the root onto any given link or bridge.
• Each link will have exactly one designated bridge.
15. •Designated ports
• Forwards frames away from root in an active topology.
• That is designated bridge is attached to the segment through the designated
port.
•Root Port
• Provides connectivity from the designated bridge to the root port.
• There is only one root port for a bridge that is determined based on the path
cost to the root.
16. Calculating and Maintaining a
Spanning Tree
•Elect a root bridge.
• Bridge with lowest numerical bridge identifier becomes the root bridge.
•Elect the designated bridges and designated ports.
• Once root is known lowest cost path to it for a link is found, and is elected as
the designated bridge for that LAN.
• If same cost, then elect the one with lowest bridge identifier as designated
bridge.
• Port that provides lowest cost path is elected as the designated port for that
link.
• If same cost, then elect the one with lowest port identifier as designated port.
17. •Maintain the topology over time.
• On an STP network, bridges and switches will pass messages between each
other known as BPDUs.
• These messages are multicasts that are used to determine the STP network
topology.
• An STP switch or bridge will send out BPDU messages every 2 seconds by
default.
•Configuration message(BPDU) contains
- BPDU type
- Flags(TC,TCN)
- Root Identifier
- Root Path Cost
- Bridge Identifier
- Port Identifier
- Message age
- Max age
- Hello time
- Forward delay
18. BPDU Details
which this message is based
time since root sent a
message on
Destination
MAC address
Source MAC
address
Configuration
Message
protocol identifier
version
message type
flags
root ID
Cost
bridge ID
port ID
message age
maximum age
hello time
forward delay
Set to 0 Set to 0
Set to 0
lowest bit is "topology change bit (TC bit)
ID of root Cost of the path from the
bridge sending this
message
ID of port from which
message is sent
ID of bridge sending this message
Time between
recalculations of the
spanning tree
(default: 15 secs)
Time between
BPDUs from the root
(default: 1sec)
24. Elect the designated Bridges and
designated ports
root bridge is the
designated bridge
for each link it
attaches
For link B, B2
has lowest BID
hence B2 is the
designated
bridge
B1
B3 B2
Link A
Cost=100
Link B
Root BID=B1
BID=B1
Root BID=B1
BID=B2
Root BID=B1
BID=B3
port2 port1
Designated port
for link B