You are on page 1of 37

Switching

* Switch only depends on a source also sends frames as broadcast ()

Learning by source address unknown unicast are flooded


Ethernet Switches and Bridges

• Address learning
• Forward/filter decision
• Loop avoidance
MAC Address Table

• Initial MAC address table is empty.


Learning Addresses

• Station A sends a frame to station C.


• Switch caches the MAC address of station A 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 unicasts are flooded).
Learning Addresses (Cont.)

• Station D sends a frame to station C.


• Switch caches the MAC address of station D to port E3 by learning the source
address of data frames.
• The frame from station D to station C is flooded out to all ports except port
E3 (unknown unicasts are flooded).
Filtering Frames

• Station A sends a frame to station C.


• Destination is known; frame is not flooded.
Filtering Frames (Cont.)

MAC Address Table

E0 ...........
E0 ...
E0 S1 E0 ..
S2 E0 .
E0 .
E0 .
E0 .
• Station A sends a frame to station B.
• The switch has the address for station B in the MAC address table.
Broadcast and Multicast Frames

• Station D sends a broadcast or multicast frame.


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

• Address learning
• Forward/filter decision
• Loop avoidance
Redundant Topology

11
Redundant Topology

• Redundant topology eliminates single points of failure.


• Redundant topology causes broadcast storms, multiple frame copies, and
MAC address table instability problems.
Broadcast Storms

• Host X sends a broadcast.


• Switches continue to propagate broadcast traffic over and
over.
Multiple Frame Copies

• Host X sends a unicast frame to router Y.


• MAC address of router Y has not been learned by either switch
yet.
• Router Y will receive two copies of the same frame.
MAC Database Instability

• Host X sends a unicast frame to router Y.


• MAC address of router Y has not been learned by either switch.
• Switches A and B learn the MAC address of host X on port 0.
• The frame to router Y is flooded.
• Switches A and B incorrectly learn the MAC address of host X on port 1.
Spanning-Tree Operation

One root bridge per network


One root port per nonroot bridge
One designated port per segment
Nondesignated ports are unused
100Mb/s
SW4 SW3

100Mb/s
100Mb/s

SW1 100Mb/s SW2


STP Root Bridge Selection

▪ BPDU (default = sent every 2 seconds) MAX 20sec

▪ Root bridge = bridge with the lowest bridge ID


Bridge MAC
BID ▪ Bridge ID =
Priority Address
SW4 100Mb/s
SW3

100Mb/s
100Mb/s

D(f)

D(f)
SW1 100Mb/s SW2
One root port per nonroot bridge
The lowest cost to Root bridge

If equal the lowest port no.


SW4 100Mb/s
SW3
19

38

100Mb/s
100Mb/s
19 38
19 4

D(f)

Root Bridge
D(f) 19 R(F)
SW1 100Mb/s SW2
SW4 100Mb/s
SW3

100Mb/s
100Mb/s

D(f)

D(f) R(F)
SW1 100Mb/s SW2
SW4 100Mb/s
SW3

R(F)

100Mb/s
100Mb/s

D(f)

D(f) R(F)
SW1 100Mb/s SW2
One designated port per segment

The lowest cost to Root bridge

If equal “ the lowest bridge id


SW4 100Mb/s
SW3

R(F)
D(f)

100Mb/s
100Mb/s

D(f)

D(f) R(F)
SW1 100Mb/s SW2
SW4 100Mb/s
SW3
Alt/blk D(f)

R(F)
D(f)

4 100Mb/s
19 100Mb/s

D(f)

D(f) R(F)
SW1 100Mb/s SW2
SW4 100Mb/s
SW3
The Lowest BID D(f)

R(F)
D(f)

100Mb/s
1Gb/s 100Mb/s

D(f)

D(f) R(F)
SW1 100Mb/s SW2
Non designated ports are
unused
SW4 100Mb/s
SW3
ND(B) D(f)

R(F)
D(f)

100Mb/s
100Mb/s

D(f) ND(B)

D(f) R(F)
SW1 100Mb/s SW2
Link at the network down
SW4 1Gb/s
SW3

1Gb/s
1Gb/s

SW1 100Mb/s SW2


Spanning-Tree Port States
Spanning tree transits each port through several different states:
Rapid Spanning-Tree Port States
Spanning tree transits each port through several different states:

15
SW4 1Gb/s
SW3

1Gb/s
1Gb/s

D(f)

D(f)
SW1 100Mb/s SW2
Describing PortFast

You might also like