Integrating Cisco Press Resources into the Academy Classroom

Download Report

Transcript Integrating Cisco Press Resources into the Academy Classroom

Networking Basics CCNA 1
Chapter 8
www.ciscopress.com
Ethernet Switch Operations
Layer 2 Bridging and Switching Operations
• Earliest networking devices were repeaters and
hubs
• Multiple LAN segments could be connected to
make larger LANs, within 5-4-3 design rules
• As it became apparent that reducing size of
collision domains was important, bridges were
created
• Bridges are aware of Ethernet framing and
Layer 2 MAC addressing (IEEE 802.3)
www.ciscopress.com
Ethernet Switch Operations
Layer 2 Bridging and Switching Operations
• Bridges extend LAN distances, without some of
the negative effects of repeaters and hubs
• Bridges were typically much more expensive
than repeaters and hubs (were usually a PC
running software to perform the bridging
function)
• Bridges usually had only two interfaces, where
hubs had multiple ports
www.ciscopress.com
Ethernet Switch Operations
Layer 2 Bridging and Switching Operations
• Next major step in LAN devices was the LAN
switch
– Does the same thing as a bridge
– Instead of using software, process could be done with
a chip (sometimes called application-specific
integrated circuits – ASICs)
– Switches have more interfaces than bridges, are
smaller, and do the same work faster
– As switch prices fell, bridges disappeared from the
market
www.ciscopress.com
Ethernet Switch Operations
The Forwarding and Filtering Decision
• Repeaters and hubs simply react to the
incoming signal
– make no decisions and require no
programming logic
– Receive, regenerate and send signal out all
ports except the one on which it was received
• Bridges implemented their logic in
software
www.ciscopress.com
Ethernet Switch Operations
The Forwarding and Filtering Decision
• Switches implement their logic in hardware
– Run much faster than bridges
– Cisco makes switches that can forward
hundreds of millions of Ethernet frames per
second
www.ciscopress.com
Ethernet Switch Operations
The Forwarding and Filtering Decision
• Filtering and forwarding logic
– Examine incoming signal; interpret as 0s and
1s (OSI Layer 1 standards)
– Interpret the received bits based on Ethernet
framing rules; find MAC destination address in
frame (OSI Layer 2 standards, IEEE 802.3
MAC sublayer)
www.ciscopress.com
Ethernet Switch Operations
The Forwarding and Filtering Decision
• Filtering and forwarding logic (continued)
– Examine table that maps MAC addresses with
corresponding interfaces
• Find table entry that matches the destination
MAC address of frame
• If frame came in on a different interface than the one listed on
the table, process is called forwarding the frame
• If the frame came in on the same interface as the one it was
received on, discard it (this is called filtering)
www.ciscopress.com
Ethernet Switch Operations
The Forwarding and Filtering Decision
• The table a bridge or switch refers to may
be called:
– Bridging table
– Switching table
– MAC address table
– Forwarding table
– Content Addressable Memory (CAM) table
www.ciscopress.com
Ethernet Switch Operations
A Bridge Filtering Decision Based on the CAM
www.ciscopress.com
Ethernet Switch Operations
A Bridge Forwarding Decision Based on the CAM
www.ciscopress.com
Ethernet Switch Operations
Learning CAM Table Entries and Flooding
Unknown Unicasts
• Switches and bridges learn entries in the CAM
dynamically
• They use this logic:
– Examine the source MAC address of the frame and
the interface on which it was received
– Add that source MAC address and corresponding
interface to the table
www.ciscopress.com
Ethernet Switch Operations
Learning
CAM
Table
Entries:
One
Switch
www.ciscopress.com
Ethernet Switch Operations
Learning CAM Table Entries: Two Switches
www.ciscopress.com
Ethernet Switch Operations
Handling Unknown Unicasts
• Switches typically learn CAM entries for all
working devices on the LAN as soon as those
devices start sending data
• Sometimes a switch receives a frame that does
not have a CAM entry – this is an unknown
unicast frame
• The switch sends the unknown unicast frame
out all ports, a process called flooding
www.ciscopress.com
Ethernet Switch Operations
Forwarding Broadcasts and Multicasts
• Unicast frame has a destination MAC address
of a single NIC or interface
• Broadcast frames are sent to a destination MAC
address of FFFF.FFFF.FFFF.FFFF and are
delivered to all devices on the LAN
• Multicast frames are sent to one of a range of
MAC addresses
www.ciscopress.com
Ethernet Switch Operations
Flooding
Unknown
Unicasts
www.ciscopress.com
Ethernet Switch Operations
Forwarding Broadcasts and Multicasts
• Multicast addresses provide a way to send
certain frames to a subset of devices
– Streaming video
• Some low-end switches flood multicasts like
broadcasts
• Higher-end switches allow multicasting, making
the process more efficient
www.ciscopress.com
Ethernet Switch Operations
Different Forwarding Behavior for Multicasts
www.ciscopress.com
Ethernet Switch Operations
The Cisco Switch CAM
• All switches and bridges use some table that
lists the MAC address and port through which
each MAC address can be reached
• Cisco calls this the CAM (Content Addressable
Memory)
• The MAC address is input into the memory and
CAM instantly outputs the table entry
• This process occurs quickly, every time,
regardless of table size
www.ciscopress.com
Ethernet Switch Operations
Switch Internal Processing
• The amount of time it takes for a frame to
progress through a network from one device to
another is called latency
• Some factors that affect latency cannot be
improved, such as propagation delay (the
amount of time it takes for electricity to go from
one end of the network to another)
• Other types of delay vary with network
conditions; frames may be waiting in a buffer
(queuing delay)
www.ciscopress.com
Ethernet Switch Operations
Switch Internal Processing – Factors that
Impact Latency
• The finite speed that signals can travel
(propagation delay)
• Circuit delays caused by electronics
• Software delays caused by software decisions
being made
• Delays caused by frame contents and location
of the frame switching decisions
www.ciscopress.com
Ethernet Switch Operations
Store-and-Forward Switching
• Switch receives entire frame before forwarding it
• Advantages of store-and forward switching
– FCS field is at end of frame; frame can be checked
for an error
– Can check for rare error in which the 802.3 Length
field does not match the Data field length
– Can forward between ports running at different
speeds (asymmetric switching)
• Disadvantage
– More latency than other switching types
www.ciscopress.com
Ethernet Switch Operations
Cut-Through Switching
• Destination MAC address is located at beginning of
Ethernet frame
• Advantage of cut-through switching
– Once destination MAC address is read, switch can
begin forwarding frame
– Less latency than store-and-forward
• Disadvantages of cut-through switching
– Cannot check FCS; may forward frames with errors
– Forwards before some legitimate collisions have
occurred
– Only works with symmetric switching
www.ciscopress.com
Ethernet Switch Operations
Fragment-Free Switching
• Overcomes a problem that cut-through
switching has: cut-through is too fast
– Collisions should occur while a frame’s first
64 bytes are being transmitted
– Cut-through switching often begins
transmitting before 64 bytes are received
– Cut-through switching can forward collision
fragments
www.ciscopress.com
Ethernet Switch Operations
Fragment-Free Switching
• Fragment-free switching waits until it has
received first 64 bytes to begin
transmitting
• Ensures switch does not forward frames
that have collided
www.ciscopress.com
Ethernet Switch Operations
Cisco Enterprise Switch – Internal
Processing Paths
www.ciscopress.com
Ethernet Switch Operations
Spanning Tree Protocol
• Most LAN design include redundant physical
paths
• A trunk is a link between two switches;
sometimes called a backbone link
• Spanning tree protocol (STP) prevents
switching loops from the logic used to forward
unknown unicast and broadcast frames
www.ciscopress.com
Ethernet Switch Operations
Typical Enterprise Campus Building Block
Design, with Redundancy
www.ciscopress.com
Ethernet Switch Operations
The
Problem
That STP
Solves:
Switching
Loops
www.ciscopress.com
Ethernet Switch Operations
The Problem That STP Solves: Switching Loops
• In previous slide, if PC1 sends a broadcast, it
goes around LAN in both directions
• Each switch broadcast the frame(s) out every
port (except the one on which it was received)
• This process continues for a long time,
continuing until no other traffic can be sent over
the LAN: a “broadcast storm”
www.ciscopress.com
Ethernet Switch Operations
STP Protocol: STP Blocking
• STP makes some ports quit forwarding or receiving
frames
• An interface that is not allowed to process traffic by STP
is considered to be in an STP blocking state
• In the figure that follows, SW3’s port 1 is in a blocking
state – it receives the broadcast frame but ignores it
• STP causes the LAN to use particular paths and leaves
others idle and unused
www.ciscopress.com
Ethernet Switch Operations
IEEE 802.1D STP Interface States
www.ciscopress.com
Ethernet Switch Operations
IEEE 802.1D STP Interface States
• The forwarding and blocking states are the
most common, because a working network
interface stabilizes into one of these states
• Failed interfaces stabilize into a disabled state
• Listening and learning states are used to solve
problems with CAM tables
www.ciscopress.com
Ethernet Switch Operations
Stable STP Topology and Switch CAMs in a
Three-Switch Network
www.ciscopress.com
Ethernet Switch Operations
Changing the CAM with the Listening and
Learning States
• The topology can fail when a trunk fails or when a new
trunk comes up
• STP determines the topology by having switches send
bridge protocol data units (BPDUs) to each other
• BPDUs and the Spanning Tree Algorithm (STA) are part
of the IEEE 802.1D standard
• Information learned allows the switches to determine
the topology and decide which interfaces should
forward and which should block frames
www.ciscopress.com
Ethernet Switch Operations
Changing the CAM with the Listening and
Learning States
• The listening and learning states are used by STP
when it needs to transition to a new topology
• An STP topology refers to the topology of the network
when each interface is in one of three stable states
• STP remains in the stable topology until something
happens
– A trunk goes down (perhaps cut)
– The network engineer shuts down a trunk
– A new switch is added
– An interface fails
www.ciscopress.com
Ethernet Switch Operations
Changing the CAM with the Listening and
Learning States
• Switches use listening and learning states as
interim states when transitioning an interface
for two reasons:
– For the switches’ CAM table entries to time out
(during the listening state)
– For the switches to relearn the MAC addresses and
(possibly different) interfaces used to reach the MAC
addresses
www.ciscopress.com
Ethernet Switch Operations
A New STP Topology After a Failure
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
Collision Domains
• A collision domain is a set of LAN interfaces for
which a frame sent out any two of these
interfaces, at the same time, would cause a
collision
• Hubs repeat signals out interfaces and do not
consider CSMA/CD logic, so any frames sent
simultaneously will collide
• The terms shared bandwidth and shared media
refer to the fact that the devices in a hubbed
network share the same media and bandwidth
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
One Collision Domain with One 10BASE-T Hub
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
Large/Long Collision Domains
• The 5-4-3 (or 5-4-3-2-1) Rule for 10BASE-T
networks
–
–
–
–
5 segments of network media
4 repeaters or hubs at most
3 links at most, between two end-user devices
If 5 segments exist between two end-user devices, 2
segments must not have any end-user devices
connected to them
– It’s all 1 large collision domain
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
One Collision Domain with Multiple
10BASE-T Hubs
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
Large/Long Collision Domains
• The 5-4-3-2-1 rule for 10BASE-T restrictions
are required due to the round-trip time of the
collision domain
• Within one collision domain, all the devices
share the 10 Mbps of bandwidth
• Within one collision domain, a (practically)
simultaneous transmission of a frame by two or
more PCs results in a collision
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
Large/Long Collision Domains
• The more PCs in a collision domain, the less
efficient it is
• The more frames, the more collisions
• The more collisions, the more time sent waiting
to resend frames
• Once a LAN reaches about 30-40% of
bandwidth utilization, the number of collisions
increases dramatically
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
High LAN Utilization Resulting in Much Higher
Percentage of Collisions
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
Large/Long Collision Domains
• Large collision domains should not be
used for the following reasons:
– Shared bandwidth – as the size of the
collision domain grows, each device has less
available bandwidth
– Higher utilization – the more devices in a
single collision domain, the better the chance
of a collision and of driving the utilization rate
higher
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
Creating Many Small Collision Domains
• Significantly reduces the negative effects of a
large collision domain
• Process of breaking a LAN into multiple
collision domains is called segmentation
• Switches, bridges, and routers can segment
LANs into multiple collision domains
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
Two LANs with Many Small Collision Domains
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
Creating Many Small Collision Domains
• Benefits of segmenting 10BASE-T LANs:
– Design rules (5-4-3-2-1) apply to each individual
collision domain
– With smaller collision domains, reaching the point of
utilization where performance is degraded is less
likely
– Each domain gets its own bandwidth, so fewer
devices are sharing the available bandwidth
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
Creating Many Small Collision Domains
• When switches are used on the LAN, the terms
switched LAN and switched bandwidth are
used
– Each switch port connects to a separate collision
domain
– Connecting a single end-user device to each switch
port is a process called microsegmentation
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
Creating Many Small Collision Domains
• Microsegments meet the requirements to allow
full duplex
– Full duplex gives twice the bandwidth
– A 24 port 10BASE-T hub shares 10 Mbps of
bandwidth among 24 ports
– A 24 port 10BASE-T switch gives each port 20 Mbps
of bandwidth
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
Main Benefits of Using Many Small
Collision Domains
• Collision domain design rules are easier to
achieve
• Smaller collision domains reduce the probability
of LAN overutilization
• Each collision domain gets its own separate
switched bandwidth
• With a collision domain consisting of only two
interfaces/NICs, full duplex can be used
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
How Switches and Bridges Prevent
Collisions
• Switches reduce or prevent collisions by
buffering or queuing frames
• Repeaters and hubs do not perform buffering
• Bridges, switches and routers follow CSMA/CD
rules if not using full duplex
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
Switch Buffering Example
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
Layer 2 Broadcast Domains
• A broadcast domain is:
– The set of LAN interfaces (including NICs
and network device interfaces) for which a
broadcast frame sent by one device with be
forwarded to all other interfaces in that same
broadcast domain
– Bridges and switches forward broadcasts
– Routers do not forward broadcasts
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
One Router
Creating
Two
Broadcast
Domains
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
Performance Impact of Multicast and
Broadcast Domains
• PC NICs see all frames on the LAN
• PC NICs can ignore unicast frames not for
them
• PC NICs must send multicast and broadcast
frames to their CPU for processing, which
affects PC performance
• This is less of an issue today with fewer
proprietary network protocols doing broadcasts
and with more powerful processors
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
NIC Giving Broadcasts and Multicasts to the CPU
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
More Broadcasts, Less CPU Capacity for
End-User Work
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
The Impact of Broadcasts and
Multicasts Today
• Biggest risk is in wasting CPU cycles
from multicasts
– Switches flood multicasts just like broadcasts
– LAN engineers must enable multicast
optimization tools in switches to prevent
switches from flooding multicasts to every
device in the LAN
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
The Impact of Broadcasts and Multicasts
Today
• Broadcasts such as RIP and ARP don’t cause
problems in today’s networks, but did in the
past when networks were slower
– ARP remembers the info it learns, so an individual
PC might not send one ARP per minute
– RIP broadcasts may be sent by routers and UNIX
workstations; now most UNIX workstations have it
turned off by default so these are no longer an issue
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
Identifying Networking Devices by OSI Layer
• Repeaters and hubs are Layer 1 devices
• Bridges and switches are Layer 2 devices
• Routers are Layer 3 devices
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
Sample Network with Collision Domains
and Broadcast Domains Shown
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
Data Flow with Layer 1, Layer 2, and Layer 3
Devices
www.ciscopress.com
LAN Design: Collision Domains and
Broadcast Domains
The Ambiguous Term Segment
• Three main uses of the term segment
– LAN concepts – a segment is a collision domain
– LAN (physical) – in a LAN using a bus topology, a
segment is a continuous electrical circuit, often
connected to other segments with repeaters
– TCP – the process of taking a large piece of data
and breaking it into smaller pieces; one of those
pieces
www.ciscopress.com
Summary
• Bridges and switches work the same way
regarding basic forwarding, learning, flooding
and STP
– They build forwarding tables by examining the
source MAC addresses of incoming frames
– They make filtering and forwarding decisions by
looking at the destination MAC address of the frame
and comparing it to the table
– They flood broadcast frames and also flood multicast
frames, unless optimization features have been
enabled
www.ciscopress.com
Summary
• Switches differ from bridges
– They have much more powerful hardware
– They use content addressable memory (CAM) to
hold the switching table
– The CAM allows the switch to find a MAC address
and its associated port very quickly every time
• Latency is the time that passes as a frame or
packet is sent through the network
• Propagation delay is the time it takes for
electrical or optical energy to pass over the
cable, and contributes to latency
www.ciscopress.com
Summary
• Three internal switch processing options:
– Cut-through switching begins forwarding the frame
as soon as the destination MAC address is read;
does not check FCS to determine if frame is good;
low latency
– Store-and-forward switching receives the entire
frame; does error-checking; necessary for
asymmetrical switching
– Fragment-free switching waits for the first 64 bytes to
be received before beginning forwarding; enables it
to detect normal collisions
www.ciscopress.com
Summary
• Switches and bridges use Spanning Tree
Protocol (STP) to identify and block redundant
paths through the network; gives a logical path
with no loops
• A collision domain with a single device
connected to a switch port is called a
microsegment
– Microsegments use UTP cabling, allow the use of full
duplex
– With no collisions possible, CSMA/CD can be
disabled
www.ciscopress.com
Summary
• Placing a large number of PCs in a collision domain
increases demand for bandwidth
– This increases possibility of collisions
– Breaking large collision domains into multiple
smaller collision domains reduces the chance of
collisions while adding bandwidth
– Separating LANs into more segments by using
bridges and switches creates additional collision
domains, one per bridge and switch port
• Broadcast domains are a set of devices in which if one
device sends a broadcast, all other devices receive the
broadcast; Layer 3 devices (routers) separate
broadcast domains
www.ciscopress.com