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

Lecture 21 – Switching and Bridging

Lecture Objectives

• To understand the functioning of layer 2


devices
• Broadcast and Collision Domains
• Differentiating between a bridge and a
switch
• To understand different bridging and
switching techniques
• To examine the different types of
bridges and switches
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of the
Punjab, Pakistan
Overview of Link Layer
• Main functions:
– Data flow control
– Error control
– Physical addressing
– Managing access to physical media
– Framing
– Examples of link layer protocols:
• Token Ring (802.5), Ethernet(802.3),
FDDI.
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of the
Punjab, Pakistan
Internetworking Devices

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
Network Domains
• Domain is referred to a specific area.
– In Networks those computers which come in a
single domain can by default communicate
with each other.
• Broadcast Domain
– A range in which if a broadcast is done, all hear
it.

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
– A group of devices in the network that receives
one another’s broadcast messages.
– A broadcast domain is a set of NICs for which a
broadcast frame sent by one NIC is received by
all other NICs in the same broadcast domain.

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
Collision Domain
• Collision Domain
– A collision domain is a set of network interface
cards (NICs) for which a frame sent by one NIC
could result in a collision with a frame sent by
any other NIC in the same collision domain.
– group of devices connected to the same
physical media such that if two devices access
the media at the same time ,the result is the
collision of two signals

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
Network Domains
• Any device with more broadcast domains is
better, as it can segment the network into
multiple network segments, reducing the
broadcasts and thus improving the efficiency in
terms of time and load.
• Hubs
– Network becomes Half Duplex with Hubs
– Hubs supports a single collision domain (assume that at
the back plane/motherboard, there is a single road
available for the frames to travel)

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
• Switch
– Network becomes Full Duplex with Switches
– Switch supports multiple collision domains (assume that
at the back plane/motherboard, there are as many roads
are available for the frames to travel as many devices
are attached to the switch)

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of the
Punjab, Pakistan
Bridges and Switches
• Bridges
• Mostly used to connect two similar LAN’s

• Switches mostly used within a LAN in


place of a HUB in star topology

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
LAN Switching
• LAN switches forward Ethernet frames—they just
have to decide when to forward them and when
not to.
• Most switch logic relates somehow to the source
and destination MAC addresses inside the
Ethernet frame headers of the frames sent
through the LAN.
• Switch logic is also dependent on the type of MAC
addresses used.

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
• Working of a switch
– A switch listens for frames that enter all
its interfaces.
– After receiving a frame, about a switch
decides whether to forward a frame and,
if so, out which port(s).

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
MAC address Table
• Switches reduce network overhead by
forwarding traffic from one segment to another
only when necessary.
• To decide whether to forward a frame, the
switch uses a dynamically built table called a
bridge table or MAC address table.
• The switch examines the address table to
decide whether it should forward a frame.

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
Similarities
• Both are called Layer 2 devices (Data
Link Layer)
• Both filters the traffic on the basis of
MAC address
• Each segment has its own collision
domain
• All segments are in the same
broadcast domain.
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of the
Punjab, Pakistan
Bridges and Switches
• The basic 5 operations:
– Learning
– Forwarding
– Flooding
– Filtering
– Aging

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
Switches / Bridges
• Forwarding Decisions:
– If Source and Destination LANs are
same, discard the frame
– If Source and Destination LANs are
different, forward the frame
– If Destination LAN is unknown, use
flooding.

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
Bridges/Switches Operations
• Learning
– The switch learns MAC addresses by
examining the source MAC address of
each frame it receives.
– Switches build the MAC address table by
listening to incoming frames and
examining the frame’s source MAC
address.

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
– If a frame enters the switch, and the
source MAC address is not in the address
table, the switch creates an entry in the
table.
– The MAC address is placed in the table,
along with the interface in which the
frame arrived.
– By learning, the switch can make good
forwarding choices in the future.

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
Bridges/Switches Operations
• Flooding
– Bridges forward LAN broadcast frames,
and unknown unicast frames, out all
ports.
– The switch floods the frame with the hope
that the unknown device will be on some
other Ethernet segment, it will reply, and
the switch will build a correct entry in the
address table.

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
Bridges/Switches Operations
• Forwarding
– The switch decides when to forward a
frame based on the destination MAC
address.
– The switch looks at the previously
learned MAC addresses in an address
table to decide where to forward the
frames.

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
Bridges/Switches Operations
• Filtering
– A switch generally does filtering along
with forwarding
– There are two cases
• When the source and destination devices
exist on the same interface (port)

of
bridge/switch, then the bridge/switch will
filter the frame and doesn’t pass it to any
other interface
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of the
Punjab, Pakistan
• If source and destination are on different
interfaces, and the destination port is known,
then the frame is forwarded to only the
destination interface and it will be filtered or not
sent on the remaining interfaces.

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
Bridges/Switches Operations
• Aging
– By default, every switch keeps the entry of
a computer in its table for 5 minutes. After
5 minutes or aging time, the entry is
deleted from the table, assuming that the
device doesn’t exit on the network.
– (This is useful, if a device is disconnected
from the network, or moved from one
segment to another.)

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
Bridge

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
Learning Bridges

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of the
Punjab, Pakistan
LAN Switch Logic Summary
• The following list provides a quick review of the
basic logic a switch uses:
– 1. A frame is received.
– 2. If the destination is a broadcast or multicast, forward
on all ports except the port on
– which the frame was received.
– 3. If the destination is a unicast, and the address is not
in the address table, forward on all

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
– ports except the port on which the frame was received.
– 4. If the destination is a unicast, and the address is in
the address table, and if the associated
– interface is not the interface on which the frame arrived,
forward the frame out the one
– correct port.
– 5. Otherwise, filter (do not forward) the frame.

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
Switches
• Layer 2 device
• Usually connect individual computers in a LAN
• Supports multiple ports (modular switches)
• Gives dedicated bandwidth as compared to Hub’s
shared bandwidth
• Like bridges, perform filtering

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
Types of Switches
• ATM switches
– Provides high speed switching facility
– Used to connect multi-LAN networks
• LAN switches
– Use to interconnect multiple LAN
segments or individual computers WAN
switches
• WAN switches
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of the
Punjab, Pakistan
WAN Switch
• These devices typically switch such
traffic as Frame Relay, X.25, and
SMDS
– Switched Multi-megabit Data Service
• A WAN switching technology
• Offers inexpensive, high speed network
communication
• Supports high data rates 1.544 to 45 Mbps
• Like ATM uses 53 byte fixed length cells
• Provides no error checking
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of the
Punjab, Pakistan
Types of Internetworking
Devices
• Considering the Number of Ports in
Internetworking Devices, all the
devices can be categorized as:
– Fixed Port Devices
• In which the number of ports are fixed and
cannot be increased
– Modular Devices
• In which the number of ports can be
increase according the the requirements.

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
• Bridges
Comparison
• Switches
– Contains limited number – Contains multiple ports.
of ports. (maximum no. of Even new modular
ports is 16) switches support modules
in which we can increase
the no. of ports easily
– Only uses store-and-
forward switching – Two switching techniques
can be used
– Used to connect
– Generally used to connect individual devices in the
multiple LAN segments same LAN
– Bridges only run 1 – Switches can run multiple
spanning tree algorithm. spanning tree algorithms
– Switch can analyze
– Bridge only analyze one multiple frames at a time.
frame at a time

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
Layer 3 Switches
– A layer 3 switch performs the work of a
router as well as a switch.
– Layer 3 switches are modular switches,
we can add an RSM (Router Switch
Module) with it and then it can be used
to perform the work of a router I.e.
communication over WAN as well as LAN

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
• Layer 3 or Routing switches, however,
perform many of the layer 3 functions
usually reserved for routers. And because
the routing is implemented in hardware
rather than software, it is faster. The
downside of routing switches is that they
are not as powerful or as flexible as full-
fledged routers.

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
Switches
• Loop prevention
– The switch creates a loop-free
environment with other bridges by using
Spanning Tree Protocol (STP). Having
physically redundant links helps LAN
availability, and STP prevents the switch
logic from letting frames loop around the
network indefinitely, congesting the LAN.

CS-3302-3 Internet Architecture and


Protocols, PUCIT, University of the
Punjab, Pakistan
References
• Cisco ICND 2004 by Cisco Press
• TCP/IP Protocol Suite
– 2nd Edition, Behrouz A. Forouzan, McGraw-
Hill Inc.
• Computer Networks
– 4th Edition, Andrew S. Tananbaum
• Computer Networking; A Top Down
Approach Featuring the Internet
– 3rd Edition: Jim Kurose and Keith Ross
• http://www.cisco.com/univercd/cc/td/doc
/cisintwk/ito_doc/
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of the
Punjab, Pakistan

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