Catalyst Switch Operations
Catalyst Switch Operations
OPERATION
Objectives
Wire speed
Layer 2 switch is considered faster because no
modification in the packet.
Low Latency
Because the switching is faster
Low cost
Three Main Functions of a Switch
Address learning
Forward/filter decision
Loop avoidance
How Switches Learn Host
Locations
MAC address table
A B
0260.8c01.1111 0260.8c01.3333
E0 E1
C E2 E3 D
0260.8c01.2222 0260.8c01.4444
A B
0260.8c01.1111 0260.8c01.3333
E0 E1
C D
E2 E3
0260.8c01.2222 0260.8c01.4444
• Station A sends a frame to Station C
• 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 unicasts are flooded)
How Switches Learn Host
Locations
MAC address table
E0: 0260.8c01.1111
E3: 0260.8c01.4444
A B
0260.8c01.1111 0260.8c01.3333
E0 E1
C E2 E3 D
0260.8c01.2222 0260.8c01.4444
0260.8c01.2222 0260.8c01.4444
If not found the Broadcast / Multicast is sent on all the ports and
the exit port for this particular address is determined.
Broadcast and Multicast
Frames
MAC address table
E0: 0260.8c01.1111
A E2: 0260.8c01.2222 B
E1: 0260.8c01.3333
E3: 0260.8c01.4444
0260.8c01.1111 0260.8c01.3333
E0 E1
C E2 E3 D
0260.8c01.2222 0260.8c01.4444
Segment 1
Segment 2
Segment 1
Broadcast
Switch A Switch B
Segment 2
Server/host X Router Y
Segment 1
Broadcast
Switch A Switch B
Segment 2
Segment 1
Segment 2
Segment 1
Switch A Switch B
Segment 2
Segment 1
Unicast
Unicast
Switch A Switch B
Segment 2
Server/host X Router Y
Segment 1
Unicast Unicast
Port 0 Port 0
Switch A Switch B
Port 1 Port 1
Segment 2
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
• Frame to Router Y is flooded
• Switch A and B incorrectly learn Host X MAC address on port 1
Multiple Loop Problems
Server/host
Broadcast
Loop
Loop
Loop
Workstations
x Block
100baseT
10baseT
Bridge Protocol Data Units
Switch X Switch Y
Default priority 32768 BPDU Default priority 32768
(8000 hex) (8000 hex)
MAC 0c0011111111 MAC 0c0022222222
10baseT
Spanning-Tree Protocol
Path Cost
Link Speed Cost (reratify IEEE spec) Cost (previous IEEE spec)
----------------------------------------------------------------------------------------------------
10 Gbps 2 1
1 Gbps 4 1
100 Mbps 19 10
10 Mbps 100 100
How STP Works
100baseT
Port 0 Port 0
Switch X Switch Y
MAC 0c0011111111 MAC 0c0022222222
Default priority 32768 Default priority 32768
Port 1 Port 1
100baseT
Can you figure out:
• What is the root bridge?
• What are the designated, non-designated, and root ports?
• Which are the forwarding and blocking ports?
Spanning-Tree:
Switch Z
Mac 0c0011110000
Default priority 32768
Port 0
Designated port (F)
100baseT
Port 0 Root port (F) Port 0 Root port (F)
Switch X Switch Y
MAC 0c0011111111 MAC 0c0022222222
Default priority 32768 Default priority 32768
Port 1 Port 1
Designated port (F) Nondesignated port (BLK)
100baseT
Can you figure out:
• What is the root bridge?
• What are the designated, non-designated, and root ports?
• Which are the forwarding and blocking ports?
Electing Root Bridge
In one Broadcast Domain only one Bridge is designated
as Root Bridge.
All Ports on the Root Bridge are in Forwarding State and
Port.
Bridge ID includes the priority and the MAC Address of
the device.
Root Port for a Non-root
Bridge
The
Root Port is the lowest cost path from a
Non-Root Bridge to the Root Bridge.
Spanning Tree Path Cost is an accumulated cost
based on bandwidth.
More Bandwidth - Less Cost
In the event that the cost is the same then the
deciding factor would be the lowest port no.
Root Ports are in forwarding state.
Designated Port
There will be only one Designated Port in one
Segment.
Designated Port is selected on the bridge that
segmentation
Nondesignated Ports are normally in the blocking
state to break the loop topology. That means the
Spanning Tree is preventing it from forwarding
traffic.
Spanning-Tree Port States
Blocking
Listening
Learning
Forwarding
Spanning Tree Port State
100baseT
10baseT
Spanning-Tree Recalculation
100baseT
x
Switch X MAXAGE
x
Switch Y
MAC 0c0011111111 MAC 0c0022222222
Default priority 32768 Root Bridge Default priority 32768
Port 1 BPDU Port 1
Designated port
x Nondesignated port (BLK)
10baseT
Key Issue: Time to
Convergence
Bridging
LAN Switching
Primarily hardware based (ASIC)
Many spanning-tree instances per switch
More ports on a switch
Transmitting Frames Through a
Switch
Cut-through
Switch checks destination
Frame
Transmitting Frames through a
Switch
Cut-through Store and forward
Switch checks destination
Complete frame is received and
address and immediately begins checked before forwarding
forwarding frame
Frame Frame
Frame
Frame
Transmitting Frames through a
Switch
Cut-through Store and forward
Switch checks destination Complete frame is received and
Frame Frame
Frame
Frame
Fragment free
(modified cut-through)
Switch checks the first 64 bytes then immediately
Frame
Duplex Overview
Switch
Half duplex (CSMA/CD)
• Unidirectional data flow
• Higher potential for collison Hub
• Hubs connectivity
Duplex Overview
Switch
Half duplex (CSMA/CD)
• Unidirectional data flow
• Higher potential for collison Hub
• Hubs connectivity
Full duplex
• Point-to-point only
• Attached to dedicated switched port
• Requires full-duplex support on both ends
• Collision free
• Collision detect circuit disabled
Configuring the Switch
Ports on the Catalyst Switch
Ports on the Catalyst Switch
wg_sw_d#sh run
wg_sw_d#sh spanning-tree
Building configuration...
Port Ethernet 0/1 of VLAN1 is Forwarding
Current configuration:
Port path cost 100, Port priority 128
!
Designated root has priority 32768, address 0090.8673.3340
!
Designated bridge has priority 32768, address 0090.8673.3340
interface Ethernet 0/1
Designated port is Ethernet 0/1, path cost 0
!
Timers: message age 20, forward delay 15, hold 1
interface Ethernet 0/2
wg_sw_a#show vlan
Configuration Modes
Global configuration mode
wg_sw_a# conf term
wg_sw_a(config)#
Interface configuration mode
wg_sw_a(config)# interface fa0/1
wg_sw_a(config-if)#
Configuring the Switch IP
Address
wg_sw_a(config)#
wg_sw_a(config)#int vlan 1
wg_sw_a(config-if)#ip address 10.5.5.11 255.255.255.0
Managing Mac Address Table
wg_sw_a#show mac-address-table
Managing Mac Address Table
wg_sw_a#show mac-address-table
wg_sw_a#sh mac-address-table
Number of permanent addresses : 0
Number of restricted static addresses : 0
Number of dynamic addresses : 6
wg_sw_d#erase startup