iap 20 - switching and bridging
TRANSCRIPT
-
8/14/2019 IAP 20 - Switching and Bridging
1/38
Lecture 21 Switching and Bridging
-
8/14/2019 IAP 20 - Switching and Bridging
2/38
Lecture Objectives
To understand the functioning of layer 2devices
Broadcast and Collision Domains
Differentiating between a bridge and aswitch
To understand different bridging and
switching techniques To examine the different types of
bridges and switchesCS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
3/38
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 thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
4/38
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
Internetworking Devices
-
8/14/2019 IAP 20 - Switching and Bridging
5/38
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 hearit.
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
6/38
A group of devices in the network that receivesone anothers broadcast messages.
A broadcast domain is a set of NICs for which abroadcast frame sent by one NIC is received byall other NICs in the same broadcast domain.
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
7/38
Collision Domain
Collision Domain A collision domain is a set of network interface
cards (NICs) for which a frame sent by one NICcould 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 accessthe media at the same time ,the result is thecollision of two signals
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
8/38
Network Domains
Any device with more broadcast domains isbetter, as it can segment the network intomultiple network segments, reducing thebroadcasts 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 atthe back plane/motherboard, there is a single road
available for the frames to travel)
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
9/38
Switch Network becomes Full Duplex with Switches
Switch supports multiple collision domains (assume thatat the back plane/motherboard, there are as many roadsare available for the frames to travel as many devicesare attached to the switch)
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
10/38
-
8/14/2019 IAP 20 - Switching and Bridging
11/38
-
8/14/2019 IAP 20 - Switching and Bridging
12/38
LAN Switching
LAN switches forward Ethernet framesthey justhave to decide when to forward them and whennot to.
Most switch logic relates somehow to the source
and destination MAC addresses inside theEthernet frame headers of the frames sentthrough the LAN.
Switch logic is also dependent on the type of MACaddresses used.
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
13/38
Working of a switch
A switch listens for frames that enter allits interfaces.
After receiving a frame, about a switchdecides whether to forward a frame and,if so, out which port(s).
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
14/38
MAC address Table
Switches reduce network overhead byforwarding traffic from one segment to anotheronly when necessary.
To decide whether to forward a frame, theswitch uses a dynamically built table called abridge 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 thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
15/38
Similarities
Both are called Layer 2 devices (DataLink Layer)
Both filters the traffic on the basis ofMAC address
Each segment has its own collisiondomain
All segments are in the samebroadcast domain.
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
16/38
Bridges and Switches
The basic 5 operations: Learning
Forwarding
Flooding
Filtering
Aging
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
17/38
Switches / Bridges
Forwarding Decisions: If Source and Destination LANs are
same, discard the frame
If Source and Destination LANs aredifferent, forward the frame
If Destination LAN is unknown, use
flooding.
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
18/38
Bridges/Switches Operations
LearningThe 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 frames source MACaddress.
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
19/38
If a frame enters the switch, and thesource MAC address is not in the addresstable, the switch creates an entry in the
table.The MAC address is placed in the table,
along with the interface in which theframe arrived.
By learning, the switch can make goodforwarding choices in the future.
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
20/38
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 someother Ethernet segment, it will reply, and
the switch will build a correct entry in theaddress table.
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
21/38
-
8/14/2019 IAP 20 - Switching and Bridging
22/38
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)
ofbridge/switch, then the bridge/switch willfilter the frame and doesnt pass it to anyother interface
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
23/38
If source and destination are on differentinterfaces, and the destination port is known,then the frame is forwarded to only thedestination interface and it will be filtered or not
sent on the remaining interfaces.
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
24/38
-
8/14/2019 IAP 20 - Switching and Bridging
25/38
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
Bridge
-
8/14/2019 IAP 20 - Switching and Bridging
26/38
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
Learning Bridges
-
8/14/2019 IAP 20 - Switching and Bridging
27/38
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
28/38
LAN Switch Logic Summary
The following list provides a quick review of thebasic 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 notin the address table, forward on all
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
29/38
ports except the port on which the frame was received.
4. If the destination is a unicast, and the address is inthe 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 thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
30/38
Switches
Layer 2 device
Usually connect individual computers in a LAN
Supports multiple ports (modular switches)
Gives dedicated bandwidth as compared to Hubsshared bandwidth
Like bridges, perform filtering
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
31/38
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 thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
32/38
-
8/14/2019 IAP 20 - Switching and Bridging
33/38
Types of InternetworkingDevices
Considering the Number of Ports inInternetworking Devices, all thedevices can be categorized as: Fixed Port Devices
In which the number of ports are fixed andcannot 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 thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
34/38
Comparison Bridges
Contains limited numberof ports. (maximum no. ofports is 16)
Only uses store-and-forward switching
Generally used to connectmultiple LAN segments
Bridges only run 1spanning tree algorithm.
Bridge only analyze oneframe at a time
Switches
Contains multiple ports.Even new modularswitches support modulesin which we can increasethe no. of ports easily
Two switching techniquescan be used
Used to connectindividual devices in thesame LAN
Switches can run multiplespanning tree algorithms
Switch can analyzemultiple frames at a time.
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
35/38
Layer 3 Switches
A layer 3 switch performs the work of arouter as well as a switch.
Layer 3 switches are modular switches,
we can add an RSM (Router SwitchModule) with it and then it can be usedto 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 thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
36/38
Layer 3 or Routing switches, however,perform many of the layer 3 functionsusually reserved for routers. And because
the routing is implemented in hardwarerather than software, it is faster. Thedownside of routing switches is that theyare not as powerful or as flexible as full-
fledged routers.
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
37/38
Switches
Loop prevention
The switch creates a loop-freeenvironment with other bridges by using
Spanning Tree Protocol (STP). Havingphysically redundant links helps LANavailability, and STP prevents the switchlogic from letting frames loop around the
network indefinitely, congesting the LAN.
CS-3302-3 Internet Architecture and
Protocols, PUCIT, University of thePunjab, Pakistan
-
8/14/2019 IAP 20 - Switching and Bridging
38/38
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 DownApproach 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