by
Dr. S. Selvaganesan [email protected]
CS8591 Computer Networks
UNIT II
DATA-LINK
LAYER & MEDIA
ACCESS
CS8591 COMPUTER NETWORKS -Syllabus
CS8591 COMPUTER NETWORKS -Books
UNIT II
DATA-LINK LAYER & MEDIA
ACCESS 9
Introduction–Link-LayerAddressing–
DLCServices–Data-LinkLayerProtocols
–HDLC–PPP-MediaAccessControl-
WiredLANs:Ethernet-WirelessLANs–
Introduction–IEEE802.11,Bluetooth–
ConnectingDevices.
DataLinkLayer
Thedatalinklayerisresponsibleformovingframesfromonehop
(node)tothenext.
Data Link Layer
FunctionsofDataLinkLayer
1.Framing:Itdividesthestreamofbitsreceivedfromnetworklayerinto
manageabledataunitscalledframes.
2.PhysicalAddressing:Itaddsaheadertotheframetodefinethesender
andreceiveroftheframe.
3.FlowControl:Thedatalinklayerimposesaflowcontrolmechanismto
avoidoverwhelmingthereceiver.
4.ErrorControl
•Itaddsreliabilitybyaddingmechanismstodetectandretransmit
damagedorlostframes.
•Italsousesamechanismtorecognizeduplicateframesbyaddingthe
trailertotheendoftheframe
5.AccessControl
•Itdetermineswhichdevicehascontroloverthelinkatanygiven
timewhentwoormoredevicesareconnectedtothesamelink.
Data Link Layer
Sub-layersofDataLinkLayer
1.LogicalLinkControl(LLC)Layer
•TheLogicalLinkControl(LLC)layerisoneoftwosub-layers
thatmakeuptheDataLinkLayeroftheOSImodel.
•TheLogicalLinkControllayercontrolsframe
synchronization,flowcontrolanderrorchecking.
2.MediaAccessControl(MAC)Layer
•TheMediaAccessControlLayerisoneoftwosub-layersthat
makeuptheDataLinkLayeroftheOSImodel.
•TheMAClayerisresponsibleformovingdatapacketstoand
fromoneNetworkInterfaceCard(NIC)toanotheracrossa
sharedchannel.
Data Link Layer
2.8
Figure: Relationshipof layers and addresses in TCP/IP
Error Detection and Correction
TypesofRedundancyCheck
Four types of redundancy checks are common in data communications.
1.Vertical Redundancy Check (VRC)
2.Longitudinal Redundancy Check (LRC)
3.Cyclic Redundancy Check (CRC)
4.Checksum
Flow Control
Stop-and-WaitARQ
ThesimplestARQschemeisthestop-and-waitalgorithm.
Aftertransmittingoneframe,thesenderwaitsforan
acknowledgmentbeforetransmittingthenextframe.
Iftheacknowledgmentdoesnotarriveafteracertainperiodof
time,thesendertimesoutandretransmittheoriginalframe.
Stop-and-Wait ARQ
The main drawback of the stop-and-wait algorithm is that it allows the
sender to have only one outstanding frame on the link at a time.
Media Access Control
Thetwomainfunctionofthedatalinklayer
areDataLinkControlandMediaAccess
Control.
Thedatalinklayerdealswiththedesignand
proceduresforcommunicationbetweentwo
adjacentnodes:node-to-nodecommunication.
Thesecondfunctionofthedatalinklayeris
mediaaccesscontrol,orhowtosharethelink.
Media Access Control
Whennodesorstationsareconnectedandusea
commonlink,calledamultipointorbroadcast
link,weneedamultiple-accessprotocolto
coordinateaccesstothelink.
Theuppersub-layeroftheDLLthatis
responsibleforflowanderrorcontroliscalledthe
LogicalLinkControl(LLC)layer.
Thelowersub-layeroftheDLLthatismostly
responsibleformultipleaccessresolutioniscalled
theMediaAccessControl(MAC)layer.
Media Access Control
Manyformalprotocolshavebeenrevisedto
handleaccesstoasharedlinks;
Wecategorizethemintothreegroups:
Media Access Control
RANDOMACCESSorCONTENTION METHOD
Inrandomaccess,nostationissuperiortoanotherstation.
Nostationisassignedthecontroloveranother.
Astationthathasdatatosendusesaproceduredefinedby
theprotocoltomakeadecisiononwhetherornottosend.
Thisdecisiondependsonthestateofthemedium(idleorbusy).
Twofeaturesofrandomaccessare:
1)Thereisnoscheduledtimeforastationtotransmit.
Transmissionisrandomamongthestations.Thatiswhy
thesemethodsarecalledRandomAccess.
2)Norulesspecifywhichstationshouldsendnext.Stations
competewithoneanothertoaccessthemedium.Thatiswhy
thesemethodsarealsocalledContentionMethods.
Media Access Control
RANDOMACCESSorCONTENTION METHOD
Inrandomaccess,eachstationhastherighttothemedium
withoutbeingcontrolledbyanyotherstation.
Ifmorethanonestationtriestosend,thereisanaccess
conflict(collision)andtheframeswillbeeitherdestroyedor
modified.
Toavoidaccessconflictortoresolveitwhenithappens,
eachstationfollowsaprocedurethatanswersthefollowing
questions:
1)Whencanthestationaccessthemedium?
2)Whatcanthestationdoifthemediumisbusy?
3)Howcanthestationdeterminethesuccessorfailureofthe
transmission?
4)Whatcanthestationdoifthereisanaccessconflict?
Media Access Control
RANDOMACCESSorCONTENTION METHOD
TherandomaccessmethodevolvedfromALOHAprotocol
whichusedaverysimpleprocedurecalledmultipleaccess
(MA).
Themethodwasimprovedwiththeadditionofprocedure
thatforcesthestationtosensethemediumbefore
transmitting.ThiswascalledCarrierSenseMultipleAccess
(CSMA).Thismethodlaterevolvedintotwoparallel
methods:
i.CarrierSenseMultipleAccesswithcollisiondetection
(CSMA/CD);CSMA/CDtellsthestationwhattodowhena
collisionisdetected.
ii.CarrierSenseMultipleAccesswithcollisionavoidance
(CSMA/CA);CSMA/CAtriestoavoidthecollision.
RANDOM ACCESS orCONTENTION METHOD
ALOHA
ALOHA,theearliestrandomaccessmethodwas
developedattheUniversityofHawaiiin1970.
Itwasdesignedforaradio(wireless)LAN,butitcan
beusedonanysharedmedium.
PureALOHA
TheoriginalALOHAprotocoliscalledpure
ALOHA.
Theideaisthateachstationsendsaframewhenever
ithasaframetosend.Whenthechannelisshared,
thereisthepossibilityofcollisionbetweenframes
fromdifferentstation.
Media Access Control
PureALOHA
RANDOM ACCESS orCONTENTION METHOD
Media Access Control
PureALOHA
Inthefigure,therearefour
stationsthatcontendwithone
anotherforaccesstotheshared
channel.
Eachstationsendstwoframes;
thereareatotalofeightframes
onthesharedmedium.
Someoftheseframescollide
becausemultipleframesarein
contentionforthesharedchannel.
Onlytwoframessurvive:frame
1.1andframe3.2.
ThepureALOHAprotocolrelies
onacknowledgmentsfromthe
receiver.
Iftheacknowledgmentdoesnot
arriveafteratime-outperiod,the
stationassumesthattheframe(or
acknowledgment)hasbeen
destroyedandresendstheframe.
RANDOM ACCESS orCONTENTION
METHOD
Media Access Control
RANDOM ACCESS orCONTENTION METHOD
Media Access Control
ProcedureforpureALOHAprotocol
ACollisioninvolvestwoormore
stations.
Ifallthesestationstrytoresend
theirframesafterthetime-out,the
frameswillcollideagain.
PureALOHAdictatesthatwhen
thetime-outperiodpasses,each
stationwaitsarandomamountof
timebeforeresendingitsframe.
Therandomnesswillhelpavoid
morecollisions.Thistimeiscalled
theBack-offtimeT
B.
PureALOHAhasa2
nd
methodto
preventcongestingthechannel
withretransmittedframes.Aftera
maximum number of
retransmissionattempts,K
max’s
stationmustgiveupandtrylater.
RANDOM ACCESS orCONTENTION
METHOD
Media Access Control
Vulnerable time
RANDOM ACCESS orCONTENTION METHOD
Media Access Control
Vulnerabletime
Thelengthoftimeinwhichthereisa
possibilityofcollisionisthe
vulnerabletime.
Weassumethatthestationssendfixed-
lengthframeswitheachframetaking
T
frsecondstosend.
PureALOHAvulnerabletime=2×T
fr
ThethroughputforpureALOHAis
S=G×e
-2G
whereG=averagenumberofframes
generatedbythesystemduringone
frametransmission.
Themaximumthroughput
S
max=0.184whenG=½
RANDOM ACCESS orCONTENTION METHOD
Media Access Control
Slotted ALOHA
RANDOM ACCESS orCONTENTION METHOD
Media Access Control
•SlottedALOHAwasinventedtoimprovetheefficiencyofpureALOHA.
•InslottedALOHA,wedividethetimeintoslotsofT
frsecondsandforcethestationtosend
onlyatthebeginningofthetimeslot.
•Becauseastationisallowedtosendonlyatthebeginningofthesynchronizedtimeslot,ifa
stationmissesthismoment,itmustwaituntilthebeginningofthenexttimeslot.The
vulnerabletimeisnowreducedtoone-half,equaltoT
fr.
•SlottedALOHAvulnerabletime=T
fr
•Throughput:Itcanbeprovedthattheaveragenumberofsuccessfultransmissionsforslotted
ALOHAis
S=G×e
-G
Themaximumthroughput
S
max=0.368whenG=1
Slotted ALOHA
RANDOM ACCESS orCONTENTION METHOD
Media Access Control
Carrier Sense Multiple Access (CSMA)
Media Access Control
Media Access Control
Carrier Sense Multiple Access (CSMA)
CSMAisbasedontheprinciple
‘Sensebeforetransmit’or‘listen
beforetalk’.
CSMAcanreducethepossibilityof
collision,butitcannoteliminateit.
ThereasonforthisisshowninFigure
–Spaceandtimemodelofthe
collisioninCSMA.
Stationsareconnectedtoashared
channel(usuallyadedicatedmedium).
Thepossibilityofcollisionstillexistsbecauseofpropagationdelay;Whenastationsendsa
frame,itstilltakestime(althoughveryshort)forthefirstbittoreacheverystationandfor
everystationtosenseit.Inotherwords,astationmaysensethemediumandfinditidle,
onlybecausethefirstbitsentbyanotherstationhasnotyetbeenreceived.
VulnerableTimeforCSMA
Carrier Sense Multiple Access (CSMA)
Media Access Control
VulnerableTimeforCSMA
•ThevulnerabletimeforCSMAisthepropagationtimeT
p.Thisisthetimeneeded
forasignaltopropagatefromoneendofthemediumtotheother.
•Whenastationsendsaframe,andanyotherstationtriestosendaframeduring
thistime,acollisionwillresult.
•Butifthefirstbitoftheframereachestheendofthemedium,everystationwill
alreadyhaveheardthebitandwillrefrainfromsending.
•Inthefigure,theleftmoststationAsendsaframeattimet
1,whichreachestherightmost
stationDattinet
1+T
p.Thegreyareashowsthevulnerableareaintimeandspace.
Carrier Sense Multiple Access (CSMA)
Media Access Control
PersistenceMethods
•Whatshouldastationdoifthechannelisbusy?What
shouldastationdoifthechannelisidle?
•Threemethodshavebeendevisedtoanswerthese
questions:
1.1-persistentmethod
2.non-persistentmethod
3.p-persistentmethod
Carrier Sense Multiple Access (CSMA)
Media Access Control
PersistenceMethods
•Figureshowsthebehaviorofthreepersistencemethodswhena
stationfindsachannelbusy.
1-persistent
•Simpleandstraightforward.
•Inthismethods,afterthestationfindsthelineidle,itsendsits
frameimmediately(withprobability1).
•Thismethodhasthehighestchanceofcollisionbecausetwoor
morestationsmayfindtheidleandsendtheirframes
immediately.
Media Access Control
Carrier Sense Multiple Access (CSMA)
Non-persistent
•Inthismethods,astationthathasaframetosendsensestheline.
•Ifthelineisidle,itsendsimmediately.
•Ifthelineisnotidle,itwaitsarandomamountoftimeandthensensesthe
lineagain.
•Thenon-persistentapproachreducesthechanceofcollision.Becauseit
isunlikelythattwoormorestationswillwaitthesameamountoftime
andretrytosendsimultaneously.
•However,thismethodreducestheefficiencyofthenetworkbecausethe
mediumremainsidlewhentheremaybestationswithframestosend.
Media Access Control
Carrier Sense Multiple Access (CSMA)
Media Access Control
Carrier Sense Multiple Access (CSMA)
•CSMA/CDaugmentsthealgorithmtohandlethe
collision.
•Inthismethod,astationmonitorsthemediumafterit
sendsaframetoseeifthetransmissionwassuccessful.
Ifso,thestationisfinished.
•If,however,thereiscollision,theframeissentagain.
Carrier Sense Multiple Access with Collision
Detection (CSMA/CD)
Media Access Control
•Procedure
•Weneedtosensethechannelbeforewestartsendingthe
framebyusingoneofthepersistentprocesses.
•Transmissionandcollisiondetectionisacontinuous
process.
•Wedonotsendtheentireframe(bitbybit).
•Bysendingashortjammingsignal,wecanenforcethe
collision,incase,otherstationshavenotyetsensedthe
collision.
Carrier Sense Multiple Access with
Collision Detection (CSMA/CD)
Media Access Control
Carrier Sense Multiple Access with
Collision Detection (CSMA/CD)
Carrier Sense Multiple Access with
Collision Detection (CSMA/CD)
•CSMA/CAwasinventedtoavoidcollisionsonwireless
networks.
•CollisionsareavoidedthroughtheuseofCSMA/CA’s
threestrategies:
1.InterframeSpace(IFS)
2.ContentionWindow
3.Acknowledgment
Carrier Sense Multiple Access with
Collision Avoidance (CSMA/CA)
Media Access Control
1.InterframeSpace(IFS)
•Whenanidlechannelisfound,thestationdoesnotsend
immediately.
•Itwaitsforaperiodoftimecalledtheinterframespace
orIFS.
•Eventhoughthechannelmayappearidlewhenitis
sensed,adistantstationmayhavealreadystarted
transmitting.Thedistantstation’ssignalhasnotyet
reachedthisstation.
Carrier Sense Multiple Access with
Collision Detection (CSMA/CA)
Media Access Control
2.ContentionWindow
•Thecontentionwindowisanamountoftimedivided
intoslots.
•Astationthatisreadytosendchoosesarandomnumber
ofslotasitswaittime.
•Thestationneedstosensethechannelaftereachtime
slot.
•However,ifthestationfindsthechannelbusy,itdoes
notrestarttheprocess;itjuststopsthetimerandrestarts
itwhenthechannelissensedasidle.Thisgivespriority
tothestationwiththelongestwaitingtime.
Carrier Sense Multiple Access with
Collision Detection (CSMA/CA)
Media Access Control
3.Acknowledgment
•Withalltheseprecautions,therestillmaybeacollision
resultingindestroyeddata,andthedatamaybe
corruptedduringthetransmission.
•Thepositiveacknowledgmentandthetime-outtimercan
helpguaranteethatthereceiverhasreceivedtheframe.
Carrier Sense Multiple Access with
Collision Detection (CSMA/CA)
Media Access Control
Media Access Control
Manyformalprotocolshavebeenrevisedtohandle
accesstoasharedlinks;
Wecategorizethemintothreegroups:
•Incontrolledaccess,thestationsconsultoneanotherto
findwhichstationhastherighttosend.
•Astationcannotsendunlessithasbeenauthorizedby
otherstations.
•Threepopularcontrolled-accessmethods:
1.Reservation
2.Polling
3.TokenPassing
Media Access Control
CONTROLLED ACCESS
Comparison of ETHERNET and IEEE 802.3
10Base5,10Base2,10BaseF:Signalregenerationcanbedonewithhelpof
repeaters.
10BaseT:A hub functions as a repeater with additional functions.
802.11 Wireless LAN
Providesnetworkconnectivityoverwirelessmedia
AnAccessPoint(AP)isinstalledtoactasBridge
betweenWirelessandWiredNetwork
TheAPisconnectedtowirednetworkandis
equippedwithantennaetoprovidewireless
connectivity
Network
connectivity
to the
legacy
wired LAN
Desktop
with PCI 802.11 LAN card
Laptop
with PCMCIA 802.11 LAN card
Access Point
•IEEE802.11definestwokindsofservices.Theyare
i.BasicServiceSet(BSS)
ii.ExtendedServiceSet(ESS)
IEEE 802.11 Wireless LAN
BLUETOOTH
•FRAMEFORMAT
•Accesscode:This72-bitfieldnormallycontainssynchronizationbitsandtheidentifierofthe
primarytodistinguishtheframeofonepiconetfromanother.
BLUETOOTH
•L2CAP(LogicalLinkControlandAdaptationProtocol)
•EquivalenttoLLCsublayerinLANs.
•UsedfordataexchangeonACLlink.SCQchannelsdonotuse
L2CAP.
•Frameformatcontainsthefollowingthreefields:Length,
ChannelID,DataandControl.
•L2CAPcandoMultiplexing,segmentationandreassembly,
QoSandgroupmanagement.
Switching andForwarding
Switch
Amechanismthatallowsusto
interconnectlinkstoforma
largenetwork
Amulti-input,multi-output
devicewhichtransferspackets
fromaninputtooneormore
outputs
Aswitchisconnectedtoasetof
linksandforeachoftheselinks,
runstheappropriatedatalink
protocoltocommunicatewith
thatnode
Adds the star topology
to the links
43
Switching andForwarding
A switch’s primary job is to receive incoming packets on one of its
links and to transmit them on some other link
This function is referred as switching or forwarding
According to OSIarchitecturethisis the
mainfunctionofthe
network layer
How does the switch decide which output port to place each packet
on?
It looks at the header of the packet for an identifier that it uses to
make the decision
Two common approaches
Datagram or Connectionless approach
Virtual circuit or Connection-oriented approach
A third approach source routing is less common
44
Switching andForwarding
packetcontains
Datagrams
Key Idea
Every
enoughinformationto
enable any switch to decide
how to get it to destination
Every packet
containsthe complete
destinationaddress
Todecidehowto
packet,a
forwarda
consults
aforwarding
switch
table(sometimes
called a routingtable)
An examplenetwork
Dest Port
-------------------
A 3
B.0
C.3
D.3
E.2
F.1
G.0
H.0
Forwarding Table
for Switch 2
45
Switching andForwarding
Characteristics of Connectionless (Datagram) Network
A host can send a packet anywhere at any time, since any packet that turns
up at the switch can be immediately forwarded using the forwarding table
When a host sends a packet, it does NOT know if the network is capable
of delivering it or if the destination host is even up and running
Each packet is forwarded independently of previous packets that might
have been sent to the same destination.
ThustwosuccessivepacketsfromhostA to
hostB mayfollow completely different paths
Aswitchorlinkfailuremightnothaveanyseriouseffecton
communicationifitispossibletofindanalternateroutearoundthefailure
andupdatetheforwardingtableaccordingly
Virtual Circuit Switching (connection-oriented)
Uses the concept of virtual circuit (VC)
First set up a virtual connection from the source host to the destination host
and then send the data
46
Switching andForwarding
Two-stage process
Connection setup
Data Transfer
Host A wants to send
packets to host B
Connection setup
Establish“connectionstate”ineachoftheswitches
betweenthesourceanddestinationhosts
Theconnectionstateforasingleconnectionconsistsofan
entryinthe“VCtable”ineachswitchthroughwhichthe
connectionpasses
47
Switching andForwarding
Characteristics of VC
SincehostAhastowaitfortheconnectionrequesttoreachthefarsideofthenetwork
andreturnbeforeitcansenditsfirstdatapacket,thereisatleastoneRTTofdelay
beforedataissent
WhiletheconnectionrequestcontainsthefulladdressforhostB(whichmightbequite
large,beingaglobalidentifieronthenetwork),eachdatapacketcontainsonlyasmall
identifier,whichisonlyuniqueononelink.
Thus the per-packet overhead caused by the header is reduced relative to the datagram model
Ifaswitchoralinkinaconnectionfails,theconnectionisbrokenandanewonewill
needtobeestablished.
Also the old one needs to be torn down to free up table storage space in the switches
Theissueofhowaswitchdecideswhichlinktoforwardtheconnectionrequestonhas
similaritieswiththefunctionofaroutingalgorithm
Comparison with the Datagram Model
Datagramnetworkhasnoconnectionestablishmentphaseandeachswitchprocesses
eachpacketindependently
Each arriving packet competes with all other packets for buffer space
If there are no buffers, the incoming packet must be dropped
48
Switching andForwarding
Good Properties of VC
By the time the host gets the go-ahead to send data, it knows quite a lot about the
network-
For example, that there is really a route to the receiver and that the receiver is
willing to receive data
It is also possible to allocate resources to the virtual circuit at the time it is established
X.25 network ( an early virtual-circuit-based networking technology but now
largely obsolete) allocates buffers per VC
In VC, we could imagine providing each circuit with a different quality of service (QoS)
The network gives the user some kind of performance related guarantee
Switches set aside the resources they need to meet this guarantee
For example, a percentage of each outgoing link’s bandwidth
Delay tolerance on each switch
Most popular examples of VC technologies are X.25, Frame Relay and ATM
However, with the success of the Internet’s connection-less model, none of them enjoys
great popularity today
49
Switching andForwarding
ATM (Asynchronous TransferMode)
Most well-known VC-based networkingtechnology
Somewhat pasts its peak in terms ofdeployment
Was important in the 1980s and early1990s
High-speed switchingtechnology
Was thought of to take over theworld
Connection-oriented packet-switchednetwork
Packets are calledcells
5 byte header + 48 bytepayload
Fixed length packets are easier to switch inhardware
Simpler todesign
ATM
VPI: Virtual PathIdentifier
CLP: Cell LossPriority
GFC: Generic Flow Control (notused)
VCI: Virtual CircuitIdentifier
(VPI + VCI together makes the VC number we talkedabout)
Type: management,congestion controlHEC: Header Error Check(CRC-8)
50
Source Routing
Alltheinformationaboutnetworktopologythatis
requiredtoswitchapacketacrossthenetworkis
providedbythesourcehost
Notes on Source Routing
Assumes that the source host knows enough about the
topology of the network
Analogous the problem of building the forwarding
tables in datagram networks or
figuring out where to send a setup packet in a virtual
circuit network
Wecannotpredicthowtheheaderneedstobe(#of
switchesinthepath)
Can be usedin both
datagramand virtualcircuit
networks
Forexample,IP,whichisadatagramprotocolincludesa
sourcerouteoptionthatallowsselectedpacketstobesource
routed.
Switching andForwarding
51
Bridges and LANSwitches
Bridges and LAN Switches
Class of switches that is used to forward packets between shared-media LANs such as
Ethernets
Known as LAN switches
Referred to as Bridges
Suppose you have a pair of Ethernets that you want to interconnect
One approach is put a repeater in between them
It might exceed the physical limitation of the Ethernet
No more than four repeaters between any pair of hosts
No more than a total of 2500 m in length is allowed
An alternative would be to put a node between the two Ethernets and have the node forward
frames from one Ethernet to the other
This node is called a Bridge
A collection of LANs connected by one or more bridges is usually said to form an Extended LAN
Simplest Strategy for Bridges
Accept LAN frames on their inputs and forward them out to all other outputs
Used by early bridges
Learning Bridges
Observe that there is no need to forward all the frames that a bridge receives
52
Consider the followingfigure
When a frame from host A that is addressed to host B arrives on port 1,there
is no need for the bridge to forward the frame out over port2.
How does a bridge come to learn on which port the various hostsreside?
Solution
Download a table into thebridge
Who does thedownload?
Human
Too much work formaintenance
Bridges and LANSwitches
Host Port
--------------------
A 1
B 1
C 1
X 2
Y 2
Z 2
53
Bridges and LANSwitches
Can the bridge learn this information by itself?
Yes
How
Each bridge inspects the source address in all the frames it receives
Record the information at the bridge and build the table
When a bridge first boots, this table is empty
Entries are added over time
A timeout is associated with each entry
The bridge discards the entry after a specified period of time
To protect against the situation in which a host is moved from one network to
another
Ifthebridgereceives a framethatis
addressedto hostnot currently in the table
Forward the frame out on all other ports
54
Bridges and LANSwitches
Strategy works fine if the extended LAN does not have aloop
init
Why?
Frames potentially loop through the extended LANforever
Bridges B1, B4, and B6 form aloop
55
Bridges and LANSwitches
How does an extended LAN come to have a loop in it?
Network is managed by more than one administrator
Forexample, it spansmultiple
departmentsin an
organization
Itis possible thatno singleperson
knowstheentire configuration of the network
A bridge that closes a loop might be added without anyone knowing
toprovideLoopsarebuiltintothenetwork
redundancy in case of failures
Solution
Distributed Spanning Tree Algorithm
56
Spanning TreeAlgorithm
Think of the extended LAN as being represented by a graph that
possibly has loops (cycles)
A spanning treeis a sub-graphof this
graphthatcoversallthe vertices but contains no
cycles
Spanning treekeepsallthevertices of
theoriginal graphbut throws out some of the edges
Example of (a) a cyclic graph; (b) a corresponding spanningtree.
57
Spanning TreeAlgorithm
Developed by Radia Perlman at Digital
A protocol used by a set of bridges to agree upon a spanning
tree for a particular extended LAN
IEEE802.1specificationforLANbridgesis
basedon this algorithm
Each bridge decides the ports over which it is and is not willing
to forward frames
In a sense the extended LAN is reduced to an acyclic tree
Details are NOT required for the exam purposes
Take point: Spanning Tree Algorithm removes the cycles/loops
from the extended (bridged) LANs
58
Virtual LANs(VLANs)
Allow a single extended LAN to be partitioned into
several logical LANs
Each VLAN is assigned an ID (or color)
Frames can only be travel between LANs segments
within the same VLAN
Partiallysolvesthebroadcastproblemin
theextended LAN
One Attractive feature of VLANs is
Wecanchange thelogicaltopology
oftheextended LAN without moving/changing
any wire or addresses
Just change the Bridge configuration
60
Virtual LANs(VLANs)
WhenaframefromXarrivesatbridgeB2,thebridgeobservesthat
itcameinaportthatwasconfiguredasbeinginVLAN100,soit
insertsaVLANheader(hastheVLANID)betweentheEthernet
headeranditspayload
WhentheframearrivesatB1,itwillonlyforwardittotheportof
VLAN100andnottoVLAN200
The link between B1 and B2 is considered to be in both VLANs
61