Вы находитесь на странице: 1из 46

LAN Switching

Novan Aryandi naryandi@cisco.com Cisco Systems Indonesia

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

Hierarchical Network Model

Core Layer

Distribution Layer

Access Layer

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

Catalyst Switching Portfolio


Features, Scalability, Longevity

Catalyst 6500
Catalyst 4500/E

Catalyst 6500
Catalyst 4900 Blade Switches

Catalyst 6500 Catalyst 4500/E Catalyst 3750 Catalyst 3560 Catalyst 2900 Catalyst Express 500

Small

Medium-sized

Large

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

Physical Layer Functions


Defines: Media type Connector type
802.3

Signaling type
Voltage levels, pulse width, pulse intervals etc.

Physical

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

Physical Layer: Ethernet

10Base2Thick Ethernet 10Base5Thick Ethernet

Host
Hub
10BaseTTwisted Pair

Hosts

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

Hubs Operate at Physical layer

Physical

All devices in the same collision domain

All devices in the same broadcast domain


Devices share the same bandwidth
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential

Hubs: One Collision Domain

More end stations means more collisions CSMA/CD is used

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

Data Link Layer Functions


Identification of encapsulated data (framing)
Data Link

Arbitration
Addressing

802.2

Error detection
Physical 802.3

Error recovery Flow control


2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential

EIA/TIA-232 v.35

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

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

Switches and Bridges Operate at Data Link Layer

Data Link

OR

Each segment has its own collision domain All segments are in the same broadcast domain
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential

10

Switches

Switch
Memory

Each segment has its own collision domain Broadcasts are forwarded to all segments
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential

11

Three Switch Functions

Address learning

Forward/filter decision
Loop avoidance

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

12

How Switches Learn Host Locations


MAC address table

0260.8c01.1111

E0 E2

E1 E3

0260.8c01.3333

0260.8c01.2222

0260.8c01.4444

Initial MAC address table is empty

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

13

How Switches Learn Hosts Locations


MAC address table E0: 0260.8c01.1111
A B

0260.8c01.1111

E0

E1

0260.8c01.3333

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)
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential

14

How Switches Learn Host Locations


MAC address table E0: 0260.8c01.1111 E3: 0260.8c01.4444
A B

0260.8c01.1111

E0

E1

0260.8c01.3333

E2

E3

0260.8c01.2222

0260.8c01.4444

Station D sends a frame to station C Switch caches station D MAC address 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)
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential

15

How Switches Filter Frames


MAC address table

E0: E2: E1: E3:

0260.8c01.1111 0260.8c01.2222 0260.8c01.3333 0260.8c01.4444

0260.8c01.1111

E0

E2

X X

E1

0260.8c01.3333

E3
0260.8c01.4444

0260.8c01.2222

Station A sends a frame to station C

Destination is known, frame is not flooded

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

16

Broadcast and Multicast Frames


MAC address table E0: E2: E1: E3: 0260.8c01.1111 0260.8c01.2222 0260.8c01.3333 0260.8c01.4444

0260.8c01.1111

E0

E1

0260.8c01.3333

E2

E3

0260.8c01.2222

0260.8c01.4444

Station D sends a broadcast or multicast frame Broadcast and multicast frames are flooded to all ports other than the originating port
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential

17

Redundant Topology
Server/host X
Router Y Segment 1

Segment 2
Redundant topology eliminates single points of failure Redundant topology causes broadcast storms, multiple frame copies, and MAC address table instability problems

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

18

Broadcast Storms
Server/host X Router Y
Segment 1 Broadcast

Switch A

Switch B

Segment 2

Host X sends a broadcast


2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential

19

Broadcast Storms (cont.)


Server/host X Router Y Segment 1 Broadcast

Switch A

Switch B

Segment 2

Broadcast is flooded by Switch A and B


2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential

20

Broadcast Storms (cont.)


Server/host X Router Y
Segment 1

Switch A

Broadcast

Switch B

Segment 2

Switches continue to propagate broadcast traffic over and over


2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential

21

Multiple Frame Copies


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
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential

22

Multiple Frame Copies (cont.)


Server/host X Unicast Router Y Segment 1 Unicast Unicast Switch B

Switch A

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
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential

23

MAC Database Instability


Server/host X Unicast
Port 0 Switch A

Router Y
Segment 1 Unicast Port 0 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
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential

24

MAC Database Instability (cont.)


Server/host X Unicast Port 0 Switch A Port 1 Router Y Segment 1 Unicast Port 0 Switch B 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
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential

25

Multiple Loop Problems


Broadcast Server/host

Loop Loop

Loop

Workstations

Complex topology can cause multiple loops to occur Layer 2 has no mechanism to stop the loop
26

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

Solution: Spanning-Tree Protocol

Block

Allows switches to communicate with each other for discovering physical loops in the network Places certain ports in blocking state to arrive at a redundant loop-free network topology

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

27

Spanning-Tree Operations
One root bridge per network One root port per non-root bridge One designated port per segment 100baseT
Designated port (F) Root port (F)

Root bridge

SW Y SW X Designated port (F) Non-designated port (B)

Non-root bridge

10baseT
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential

28

Spanning-Tree Operations (cont.)

Switch X Default priority = 32768 (hex 8000) MAC = 0c0011111111

BPDU

Switch Y Default priority = 32768 (hex 8000) MAC = 0c0022222222

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
2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential

29

Structure of Configuration BPDU

BPDU = Bridge Protocol Data Unit (sent every 2 seconds by default)


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 bridge did this BPDU come from ?

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

30

Spanning-Tree Protocol Path Cost


Link Speed Cost per re-ratify IEEE spec (non-linear scale) 2 Cost per older IEEE spec (linear scale) 1

10 Gbps

1 Gbps

100 Mbps

19

10

10 Mbps

100

100

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

31

Spanning-Tree Protocol Port States


100baseT

Port 0

Designated port (F)

Port 0

Root port (F)


Switch Y Default priority = 32768 MAC = 0c0022222222

Switch X Default priority = 32768 Root bridge MAC = 0c0011111111 Port 1

Port 1

Designated port (F)


10baseT

Non-designated port (B)

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

32

Spanning-Tree Election Criteria

Lowest Root BID Lowest Path cost to the Root Bridge Lowest Sender BID Lowest Port ID

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

33

Spanning-Tree Port States


Spanning-tree transitions each port through several different states
Init

Blocking

Listening

Disabled

Learning

Forwarding

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

34

Spanning-Tree Port States (cont.)


State
Forwarding Learning (15 secs) Listening (15 secs) Blocking (20 secs) Disabled

Function
Sends and receives user data Builds bridging table Builds active topology Only receives BPDUs Non-operational state

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

35

Spanning-Tree Recalculation

100baseT
Designated port Root port (F)
Switch Y MAC = 0c0022222222 Default priority = 32768

Switch X MAC = 0c0011111111 Default priority = 32768Root Bridge Port 1

Port 0

Port 0

Designated port

Port 1

Non-designated port (B)

10baseT

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

36

Spanning-Tree Recalculation (cont.)


100baseT
Designated port
MAXAGE

Switch X MAC = 0c0011111111 Default priority = 32768Root Bridge Port 1

Port 0

Port 0

Root port (F)


Switch Y MAC = 0c0022222222 Default priority = 32768

BPDU

Designated port

Port 1

Non-designated port (B)

10baseT

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

37

Key Issue: Time to Convergence

Convergence occurs when all the switches and bridge ports have transitioned to either the forwarding or blocking state When network topology changes, switches and bridges must re-compute the SpanningTree Protocol, which disrupts user traffic

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

38

One STP Instance Per VLAN!


As if this wasn't complicated enough, there is a separate instance of Spanning Tree Protocol running for each VLAN. This feature is referred 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

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

39

Bridging Compared to LAN Switching


Bridging
Primarily software based One spanning-tree instance per bridge Usually up to 16 ports per bridge

LAN Switching
Primarily hardware based (ASIC) Many spanning-tree instances per switch More ports on a switch

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

40

Transmitting Frames Through a Switch


Cut-through
Switch checks destination address and immediately begins forwarding frame

Frame

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

41

Transmitting Frames through a Switch


Cut-through
Switch checks destination address and immediately begins forwarding frame

Store and forward


Complete frame is received and checked before forwarding

Frame Frame

Frame Frame
42

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

Transmitting Frames through a Switch


Cut-through
Switch checks destination address and immediately begins forwarding frame

Store and forward


Complete frame is received and checked before forwarding

Frame

Frame Frame Frame

Fragment free (modified cut-through) - Cat1900 Default


Switch checks the first 64 bytes then immediately begins forwarding frame

Frame

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

43

Duplex Overview
Half duplex (CSMA/CD) Unidirectional data flow Higher potential for collison Hubs connectivity Switch Hub

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

Full duplex Point-to-point only Attached to dedicated switched port Requires full-duplex support on both ends Collision free Collision detect circuit disabled

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

45

2009 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

46

Вам также может понравиться