0% found this document useful (0 votes)
6 views

Lect 2

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Lect 2

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Machine Translated by Google

Switch Concepts and Configuration

CSMA/CD

ÿ Shared medium
Physical shared
cable or hub.
ÿ Ethernet was
designed to work
with collisions.

ÿ Uses carrier sense multiple access collision detection.


Machine Translated by Google

CSMA/CD

ÿ Device needs to transmit.

ÿ It “listens” for signals on the medium. ÿ If it


finds signals – it waits. If clear – it sends. ÿ Carry on
listening. If it receives while sending the first 64
bytes of the frame then collision. ÿ Stop
sending frame, send jam signal. ÿ Wait for
random time (backoff) ÿ Try again –
listen for signals etc
Machine Translated by Google

No collisions

ÿ Fully switched network with full duplex operation = no


collisions
ÿ Higher bandwidth Ethernet does not define collisions –
must be fully switched.
ÿ Cable length limited if CSMA/CD needed.
ÿ Fiber optic – always fully switched, full duplex.
ÿ (Shared medium must use half duplex in order to detect
collisions.)
Machine Translated by Google

Ethernet Communications

Unicast:
one-to-one

Broadcast:
one-to-all

Multicast:
one-to-many
Machine Translated by Google

Ethernet Frame: Minimum 64 bytes, Maximum 1518 bytes

802.2 is data link layer LLC sublayer


ÿ Preamble: Synchronize to medium. ÿ
Destination Address: MAC Address of destination device. ÿ Source
Address: MAC address of source device. ÿ Length/Type:
Length of frame or protocol type code. ÿ Data: Encapsulated
data from OSI Layers 7 to 3. ÿ FCS: Frame Check Sequence.
Machine Translated by Google

MAC address

ÿ 48-bits written as 12 hexadecimal digits. Format varies:


00-05-9A-3C-78-00, 00:05:9A:3C:78:00, or
0005.9A3C.7800.

ÿ MAC address can be permanently encoded into a ROM chip on a


NIC. ÿ Some
manufacturers allow the MAC address to be
modified locally.
Machine Translated by Google

Collision Domains

ÿ Shared medium – same collision domain.

ÿ Collisions reduce throughput


ÿ The more devices – the more collisions

ÿ Hub – maybe 60% of available bandwidth


Machine Translated by Google

How many collision domains


Machine Translated by Google

11
Machine Translated by Google

Broadcast domains

ÿ Layer 2 switches flood broadcasts. ÿ


Devices linked by switches are in the same broadcast
domain.
ÿ A layer 3 device (router) splits up broadcast domains, does
not forward broadcasts
ÿ Destination MAC address for broadcast is all 1s,
that is FF:FF:FF:FF:FF:FF
Machine Translated by Google

How many broadcast domains


Machine Translated by Google

2
Machine Translated by Google

Switch Port Settings:

AUTO:
Auto-negotiation of duplex mode. The two ports communicate
to determine the best mode.
FULL:
Full-duplex mode.
HALF:
Half-duplex mode.
Machine Translated by Google

Configure Duplex and Speed:


Machine Translated by Google

ÿ If auto-negotiation fails because the attached device does not support


it, the Catalyst switch defaults the switch port to half-duplex
mode.
ÿ Half-duplex on one end and full-duplex on the other causes late
collision errors at the half-duplex end. ÿ To avoid this,
manually set the duplex parameters of the switch to match the attached
device.
ÿ A cross-over or a straight-through cable was required depending
on the type of device that was being connected to the
switch.
Machine Translated by Google

Ethernet Switches and Bridges

ÿ Address learning ÿ
Forward/filter decision

ÿ Loop avoidance
Machine Translated by Google

Switch MAC Address Table

ÿ A switch builds a MAC address table by learning the MAC addresses of


each device connected to each of its ports.
ÿ Once the MAC address has been added to the table, the
switch uses the table entry to forward traffic to that node.
ÿ If a destination address is not in the table, the switch
forwards the frame out all ports except the receiving port.
ÿ When the destination responds, the MAC address is added to the table.

ÿ If the port is connected to another switch or a hub, multiple


MAC addresses will be recorded in the table.
Machine Translated by Google

MAC Address Table

Initial MAC address table is empty.


Machine Translated by Google

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).
Machine Translated by Google

ÿ 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).
Machine Translated by Google

Filtering Frames

ÿ Station A sends a frame to station C.

ÿ Destination is known; The frame is not flooded.


Machine Translated by Google

Broadcast and Multicast Frames

ÿ Station D sends a broadcast or multicast frame.

ÿ Broadcast and multicast frames are flooded to all ports other than the
oriinatin ort.
Machine Translated by Google

Switch Forwarding Methods


Cut-Through
Store and Forward
•Switch checks destination
Complete frame is received
address and immediately
and checked before forwarding.
begins forwarding frame.

Fragment-Free
•Switch checks the first 64 bytes,
then immediately begins
forwarding frame.
Machine Translated by Google

Symmetric and Asymmetric Switching

ÿ Symmetric – all ports operate at


same bandwidth

ÿ Asymmetric – different bandwidths


used, eg server or uplink has greater bandwidth

ÿ Requires store and forward operation


with buffering.
ÿ Most switches now are asymmetric
to allow flexibility.
Machine Translated by Google

Port Based Buffering

Each incoming port has its own queue.


Frames stay in buffer until outgoing port is free.
Each incoming port has a fixed and limited amount of memory.
Machine Translated by Google

Shared Memory Buffering

ÿ All incoming frames go in a common buffer. ÿ Switch


maps frame to destination port and forwards it when port is free. ÿ Flexible
use of
memory allows larger frames.
ÿ Important for asymmetric switching where some ports work faster than
others.
Machine Translated by Google

Layer 2 and Layer 3 Switching

ÿ Traditional Ethernet switches


work at layer 2.
ÿ They use MAC addresses to make
forwarding decisions.
ÿ They do not look at layer 3
information.
Machine Translated by Google

ÿ Layer 3 switches can carry out the


same functions as layer 2 switches.

ÿ They can also use layer 3 IP


addresses to route between
networks.

ÿ The can control the spread of


broadcasts.
Machine Translated by Google

Storage and start-up

ÿ ROM, Flash, NVRAM, RAM generally similar to router.


ÿ Boot loader, POST, load IOS from flash, load configuration
file.
ÿ Similar idea to router. Some difference in detail.

ÿ Boot loader lets you re-install IOS or recover from


password loss.

You might also like