You are on page 1of 30

Working Principles of Ethernet Switches

Objectives

• After learning this course, you will be able to:


– Master the working principles and process of an Ethernet
switch
– Understand the harm of loops
– Understand the loop avoidance mechanism of an Ethernet
switch
Contents

• Working Principles of Ethernet Switches


• Loop Problems
• Solutions
Working Principles of Transparent Bridge

Station A

Segment A

1/1

Segment B 1/2

Station B

• A switch has the same characteristics as a transparent bridge.


Switch Functions

 Address learning

 Forward/Filter Frame

 Loop avoidance
Address Learning
MAC address table

A: 00d0.d001.1111 B: 00d0.d001.3333
E0 E1

E2 E3

C: 00d0.d001.2222 D: 00d0.d001.4444

• The initial MAC address table is empty.


Address Learning
MAC address table
E0: 00d0.d001.1111

A: 00d0.d001.1111 B: 00d0.d001.3333
E0 E1

E2 E3
C: 00d0.d001.2222 D: 00d0.d001.4444

• Station A sends a frame to Station C.


• The switch caches station A MAC address to port E0 by learning
the source address of data frames.
• The frame from station A to station C is flooded out to all ports
except port E0 (unknown unicast frames are flooded).
Address Learning
MAC address table
E0: 00d0.d001.1111
E2: 00d0.d001.2222

A: 00d0.d001.1111 B: 00d0.d001.3333
E0 E1

E2 E3
C: 00d0.d001.2222 D: 00d0.d001.4444

• Station C sends a frame to station A.


• The switch caches station C MAC address to port E2 by
learning the source address of data frames.
Filter
MAC address table
E0: 00d0.d001.1111
E2: 00d0.d001.2222
E1: 00d0.d001.3333
E3: 00d0.d001.4444
A: 00d0.d001.1111 B: 00d0.d001.3333
E0 E1
X
E2
XE3
C: 00d0.d001.2222 D: 00d0.d001.4444

 Station A sends a frame to Station C.


 The destination is known, so the frame is not flooded but
sent out from port E2.
Broadcast and Multicast Frames
MAC address table
E0: 00d0.d001.1111
E2: 00d0.d001.2222
E1: 00d0.d001.3333
E3: 00d0.d001.4444
A: 00d0.d001.1111
E0 E1 B: 00d0.d001.3333

E2 E3
C: 00d0. d001.2222 D: 00d0.d001.4444

• Station D sends a broadcast or multicast frame to station A.


• Broadcast and multicast frames are flooded to all ports other
than the originating port.
Contents

• Working Principles of Ethernet Switches


• Loop Problems
• Solutions
Guaranteeing Network Reliability

Access
Layer

Link A
Link B

Distribution
Layer
SW 1 SW 2
Redundant Topology

Server/host X Router Y

Segment 1

A loop occurs in the


redundant
topology.

Segment 2

Loop Problems:
Broadcast Storms
Multiple Frame Copies
MAC Database Instability
Broadcast Storms (1)

Server/host X Router Y

Segment 1
Broadcast

Switch A Switch B

Segment 2

Host X sends a Broadcast


Broadcast Storms (2)

Server/host X Router Y

Segment 1
Broadcast

Switch A Switch B

Segment 2

Host X sends a Broadcast


Broadcast Storms (3)

Server/host X Router Y

Segment 1

Switch A Broadcast Switch B

Segment 2

Switches continue to propagate broadcast traffic over and over.


Multiple Frame Copies (1)

Server/host X Unicast Router Y

Segment 1

Switch A Switch B

Segment 2

 Host X sends an unicast frame to router Y.


 Router Y MAC address has not been learned by either switch
yet.
Multiple Frame Copies (2)

Server/host X Unicast Router Y

Segment 1
Unicast
Unicast

Switch A Switch B

Segment 2
 Host X sends an unicast frame to Router Y.
 Router Y MAC Address has not been learned by either switch
yet.
 Router Y will receive two copies of the same frame.
MAC Database Instability (1)

Server/host X Router Y

Segment 1
Unicast Unicast

Port 0 Port 0
Switch A Switch
B
Port 1 Port 1

Segment 2

 Host X sends an unicast frame to Router Y.


 Router Y MAC Address has not been learned by either switch
yet.
 Switch A and B learn Host X MAC address on port 0.
MAC Database Instability (2)

Server/host X Router Y
Segment 1
Unicast Unicast

Port 0 Port 0
Switch A Switch B

Port 1 Port 1

Segment 2

 Router Y MAC Address has not been learned by either switch yet.
 A frame to Router Y is flooded.
 Switch A and B incorrectly learn Host X MAC address on port 1.
Loop Problems

Server/host
Broadcast
Loop

Loop

Loop

Workstations

 What if there are so many loops in the network?


Contents

• Working Principles of Ethernet Switches


• Loop Problems
• Solutions
Solution 1: Network Architecture

A switching network based on star topology can essentially avoid


physical loops.
Solution 2: Spanning Tree Protocol

x Block

The Spanning Tree Protocol (STP) can discover and


automatically eliminate loops in the redundant network
topology.
Spanning Tree Operations
100baseT

Designated port (F) Root port (F)

Root bridge Nonroot bridge


A B

Designated port (F)


x Nondesignated port (B)

10baseT

 One root bridge per network.


 For every segment, there is only one designated port.
 For every non-root bridge, there is a root port.
 A port that has not become the designated port or the root
port will be blocked. It is called a blocked port.
Defects of the STP
 Slow convergence  RSTP
 Packet switching in a large-scale network  MSTP
 Plenty of memory and CPU resources are consumed,
because the STP involves a great deal of computation.
Loop Solutions

• Star topology
– Conventional data network access.

• STP
– Used for the redundancy backup of switch links in
the access layer. In general, the MSTP is used.
Content Review
• Working principles of Ethernet switches
– Source address learning
– Destination address search/forwarding
• Loop problems
– Broadcast storms
– MAC Address table drift
– Multiple frame copies
• Loop solutions
– STP
– Star topology
Questions
• How does a switch deal with broadcast packets?

• How does a switch deal with unicast packets?

• What problems does the conventional STP have?


How to solve these problems?

• What methods can be used to solve loops?


Thank you.

You might also like