Download - 12 Lan Switching
-
7/29/2019 12 Lan Switching
1/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 1
LAN Switching
Novan Aryandi
Cisco Systems Indonesia
mailto:[email protected]:[email protected] -
7/29/2019 12 Lan Switching
2/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 2
Hierarchical Network Model
DistributionLayer
Core Layer
AccessLayer
-
7/29/2019 12 Lan Switching
3/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 3
Catalyst Switching Portfolio
Catalyst 2900
Catalyst 3750
Catalyst 3560
Catalyst 4500/E
Catalyst 6500
Catalyst Express 500
Catalyst 4500/E
Catalyst 6500
Small Medium-sized Large
Feat
ures,
Scalabilit
y,
Longevity
BladeSwitches
Catalyst 4900
Catalyst 6500
-
7/29/2019 12 Lan Switching
4/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 4
Physical Layer Functions
Defines:
Media type
Connector type
Signaling type
Voltage levels, pulse width,pulse intervals etc.
802.3
Physical
-
7/29/2019 12 Lan Switching
5/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 5
Physical Layer: Ethernet
Hub
Hosts
Host
10Base2Thick Ethernet10Base5Thick Ethernet
10BaseTTwisted Pair
-
7/29/2019 12 Lan Switching
6/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 6
Hubs Operate at Physical layer
A B C D
Physical
All devices in the same collision domain
All devices in the same broadcast domain
Devices share the same bandwidth
-
7/29/2019 12 Lan Switching
7/46 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 7
Hubs: One Collision Domain
More end stations means
more collisions
CSMA/CD is used
-
7/29/2019 12 Lan Switching
8/46 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 8
Data Link Layer Functions
Identification of encapsulated
data (framing)
Arbitration
Addressing
Error detection
Error recovery
Flow control
DataLink
Physica
l
EIA/TIA-232v.35
802.2
802.3
-
7/29/2019 12 Lan Switching
9/46 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 9
MAC Addresses
Ethernet layer-2 address is referred to as MAC address
MAC address is 6 bytes long:
first 3 bytes identifies the Organization (OUI)
last 3 bytes identifies a particular device on the network.
Basic MAC address types:
Broadcast MAC: FF-FF-FF-FF-FF-FF
Every device should process the frame
Multicast MAC: 01-00-5E-xx-xx-xx
Only a subset of all devices process the frame Unicast MAC: 00-08-02-8E-50-FD
Only the intended recipient process the frame
-
7/29/2019 12 Lan Switching
10/46 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 10
Each segment has its own collision domain
All segments are in the same broadcast domain
Data Link
Switches and Bridges Operate at Data Link Layer
OR1 2 3 1 24
-
7/29/2019 12 Lan Switching
11/46 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 11
Switches
Each segment has its own
collision domain
Broadcasts are forwardedto all segments
Memory
Switch
-
7/29/2019 12 Lan Switching
12/46 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 12
Address learning
Forward/filter decision
Loop avoidance
Three Switch Functions
-
7/29/2019 12 Lan Switching
13/46 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 13
How Switches Learn Host Locations
Initial MAC address table is empty
MAC address table
0260.8c01.1111
0260.8c01.2222
0260.8c01.3333
0260.8c01.4444
E0 E1
E2 E3
A B
C D
-
7/29/2019 12 Lan Switching
14/46 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 14
How Switches Learn Hosts Locations
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 allports except port E0 (unknown unicasts are flooded)
MAC address table
0260.8c01.1111
0260.8c01.2222
0260.8c01.3333
0260.8c01.4444
E0: 0260.8c01.1111
E0 E1
E2 E3DC
BA
-
7/29/2019 12 Lan Switching
15/46 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 15
How Switches Learn Host Locations
Station D sends a frame to station C
Switch caches station D MAC address to port E3 by learning thesource Address of data frames
The frame from station D to station C is flooded out to all portsexcept port E3 (unknown unicasts are flooded)
MAC address table
0260.8c01.1111
0260.8c01.2222
0260.8c01.3333
0260.8c01.4444
E0: 0260.8c01.1111
E3: 0260.8c01.4444
E0 E1
E2 E3 DC
A B
-
7/29/2019 12 Lan Switching
16/46 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 16
How Switches Filter Frames
Station A sends a frame to station C
Destination is known, frame is not flooded
E0: 0260.8c01.1111
E2: 0260.8c01.2222
E1: 0260.8c01.3333E3: 0260.8c01.4444
0260.8c01.1111
0260.8c01.2222
0260.8c01.3333
0260.8c01.4444
E0 E1
E2 E3
XX DC
A B
MAC address table
-
7/29/2019 12 Lan Switching
17/46 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 17
Broadcast and Multicast Frames
Station D sends a broadcast or multicast frame
Broadcast and multicast frames are flooded toall ports other than the originating port
0260.8c01.1111
0260.8c01.2222
0260.8c01.3333
0260.8c01.4444
E0 E1
E2 E3 DC
A B
E0: 0260.8c01.1111
E2: 0260.8c01.2222
E1: 0260.8c01.3333E3: 0260.8c01.4444
MAC address table
-
7/29/2019 12 Lan Switching
18/46 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 18
Redundant Topology
Redundant topology eliminates single points of failure
Redundant topology causes broadcast storms, multiple frame copies, andMAC address table instability problems
Segment 1
Segment 2
Server/host X Router Y
-
7/29/2019 12 Lan Switching
19/46 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 19
Broadcast Storms
Segment 1
Segment 2
Server/host X Router Y
Broadcast
Switch A Switch B
Host X sends a broadcast
-
7/29/2019 12 Lan Switching
20/46 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 20
Broadcast Storms (cont.)
Segment 1
Segment 2
Server/host X Router Y
Broadcast
Switch A Switch B
Broadcast is flooded by Switch A and B
-
7/29/2019 12 Lan Switching
21/46 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 21
Broadcast Storms (cont.)
Segment 1
Segment 2
Server/host X Router Y
Broadcast
Switches continue to propagate broadcast trafficover and over
Switch A Switch B
-
7/29/2019 12 Lan Switching
22/46 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 22
Multiple Frame Copies
Segment 1
Segment 2
Server/host X Router YUnicast
Switch A Switch B
Host X sends an unicast frame to router Y
Router Y MAC address has not been learned by eitherswitch yet
-
7/29/2019 12 Lan Switching
23/46 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 23
Multiple Frame Copies (cont.)
Segment 1
Segment 2
Server/host X Router Y
Unicast
Switch A Switch B
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
Unicast
Unicast
-
7/29/2019 12 Lan Switching
24/46 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 24
MAC Database Instability
Segment 1
Segment 2
Server/host X Router Y
Unicast Unicast
Switch A Switch B
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
Port 0
Port 1
Port 0
Port 1
-
7/29/2019 12 Lan Switching
25/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 25
MAC Database Instability (cont.)
Segment 1
Segment 2
Server/host X Router Y
Unicast Unicast
Switch A Switch B
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
Port 0
Port 1
Port 0
Port 1
-
7/29/2019 12 Lan Switching
26/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 26
Complex topology can cause multiple loops to occur
Layer 2 has no mechanism to stop the loop
Server/host
Workstations
Loop
Loop
Loop
Multiple Loop Problems
Broadcast
-
7/29/2019 12 Lan Switching
27/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 27
Solution: Spanning-Tree Protocol
Allows switches to communicate with each other fordiscovering physical loops in the network
Places certain ports in blocking state to arrive at aredundant loop-free network topology
Blockx
-
7/29/2019 12 Lan Switching
28/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 28
Spanning-Tree Operations
One root bridge per network
One root port per non-root bridge
One designated port per segment
x
Designated port (F) Root port (F)
Designated port (F) Non-designated port (B)
Root bridge Non-root bridge
SW X SW Y
100baseT
10baseT
-
7/29/2019 12 Lan Switching
29/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 29
Switch YDefault priority =32768 (hex 8000)
MAC = 0c0022222222
Switch XDefault priority =32768 (hex 8000)
MAC = 0c0011111111
Spanning-Tree Operations (cont.)
BPDU
Bridge ID = Bridge priority + Bridge MAC address Root Bridge = Bridge with the lowest bridge ID
In the example, which switch has the lowest Bridge ID ?
Port ID = Port priority + Port index
-
7/29/2019 12 Lan Switching
30/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 30
Structure of Configuration BPDU
Root BID
Root Path Cost
Sender BID
Port ID
Who is the Root Bridge ?
How far away is the Root Bridge ?
What is the BID of the bridge that
sent this BPDU ?What port on the sending bridgedid this BPDU come from ?
BPDU = Bridge Protocol Data Unit(sent every 2 seconds by default)
-
7/29/2019 12 Lan Switching
31/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 31
Spanning-Tree ProtocolPath Cost
Link Speed Cost per re-ratify IEEEspec (non-linear
scale)
Cost per older IEEEspec (linear scale)
10 Gbps 2 1
1 Gbps 4 1
100 Mbps 19 10
10 Mbps 100 100
-
7/29/2019 12 Lan Switching
32/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 32
Switch Y
Default priority = 32768MAC = 0c0022222222
Switch X
Default priority = 32768MAC = 0c0011111111
Spanning-Tree ProtocolPort States
Root bridge
x
Port 0
Port 1
Port 0
Port 1
100baseT
10baseT
Designated port (F) Root port (F)
Non-designated port (B)Designated port (F)
-
7/29/2019 12 Lan Switching
33/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 33
Spanning-Tree Election Criteria
Lowest Root BID
Lowest Path cost to the Root Bridge
Lowest Sender BID
Lowest Port ID
-
7/29/2019 12 Lan Switching
34/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 34
Spanning-Tree Port States
Spanning-tree transitions each port
through several different states
Init
Blocking
Listening Disabled
Forwarding
Learning
-
7/29/2019 12 Lan Switching
35/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 35
Spanning-Tree Port States(cont.)
State Function
Forwarding Sends and receives user data
Learning (15 secs) Builds bridging table
Listening (15 secs) Builds active topology
Blocking (20 secs) Only receives BPDUs
Disabled Non-operational state
-
7/29/2019 12 Lan Switching
36/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 36
Spanning-Tree Recalculation
Switch YMAC = 0c0022222222Default priority = 32768
Switch XMAC = 0c0011111111Default priority = 32768
Port 0
Port 1
Port 0
Port 1
10baseT
x
100baseT
Root Bridge
Designated port Root port (F)
Non-designated port (B)Designated port
-
7/29/2019 12 Lan Switching
37/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 37
Switch YMAC = 0c0022222222Default priority = 32768
Switch XMAC = 0c0011111111Default priority = 32768
Port 0
Port 1
Port 0
Port 1
10baseT
x
100baseT
Root Bridge
Designated port Root port (F)
Non-designated port (B)Designated portBPDU
xMAXAGE
x
Spanning-Tree Recalculation(cont.)
-
7/29/2019 12 Lan Switching
38/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 38
Key Issue: Time to Convergence
Convergence occurs when all the switchesand bridge ports have transitioned to either
the forwarding or blocking state
When network topology changes, switchesand bridges must re-compute the Spanning-
Tree Protocol, which disrupts user traffic
-
7/29/2019 12 Lan Switching
39/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 39
One STP Instance Per VLAN!
As if this wasn't complicated enough, there is a separate instance ofSpanning Tree Protocol running for each VLAN. This feature isreferred to as per-VLAN spanning tree (PVST)
So with PVST, each VLAN can have a different Root Bridge and
active topology for the same Layer-2 network
-
7/29/2019 12 Lan Switching
40/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 40
Primarily software based
One spanning-tree instance per bridge
Usually up to 16 ports per bridge
Bridging
Primarily hardware based (ASIC)
Many spanning-tree instances per switch
More ports on a switch
LAN Switching
Bridging Compared to LAN Switching
-
7/29/2019 12 Lan Switching
41/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 41
Transmitting Frames Through a Switch
Cut-through
Switch checks destination address andimmediately begins forwarding frame
Frame
-
7/29/2019 12 Lan Switching
42/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 42
Transmitting Frames through a Switch
Store and forward
Complete frame is received and checkedbefore forwarding
Cut-through
Switch checks destination address andimmediately begins forwarding frame
Frame FrameFrame
Frame
-
7/29/2019 12 Lan Switching
43/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 43
Transmitting Frames through a Switch
Cut-through
Switch checks destination address andimmediately begins forwarding frame
Frame
Fragment free(modified cut-through) - Cat1900 Default
Switch checks the first 64 bytes then immediatelybegins forwarding frame
Frame
Store and forward
Complete frame is received and checkedbefore forwarding
Frame
Frame
Frame
-
7/29/2019 12 Lan Switching
44/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 44
Duplex Overview
Half duplex (CSMA/CD) Unidirectional data flow Higher potential for collison Hubs connectivity
Switch
Hub
-
7/29/2019 12 Lan Switching
45/46
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 45
Duplex Overview
Half duplex (CSMA/CD) Unidirectional data flow Higher potential for collison Hubs connectivity
Switch
Hub
Full duplex Point-to-point only Attached to dedicated switched port
Requires full-duplex support on both ends Collision free Collision detect circuit disabled
-
7/29/2019 12 Lan Switching
46/46