Introduction
Thesmalldata(aspecialframeof3bytes)transmittedonthetokenringiscalledatoken,andwhoeverhasthetokenhasthetransmissionauthority.Ifastationontheringreceivesthetokenandhasinformationtosend,itchangesonebitinthetoken(thisoperationturnsthetokenintoaframestartsequence),addstheinformationitwantstotransmit,andthensendstheentireinformationGotothenextstationinthering.Whenthisinformationframeistransmittedonthering,thereisnotokeninthenetwork,whichmeansthatotherworkstationsmustwaittotransmitdata.Therefore,thereisnotransmissionconflictinthetokenringnetwork.
Theinformationframeistransmittedalongtheringuntilitreachesthedestination,andthedestinationcreatesacopyforfurtherprocessing.Theinformationframecontinuestotravelalongtheringuntilitreachesthesendingstationandcanbedeleted.Thesendingstationcancheckthereturnframetoseeiftheframeisreceivedandcopiedbythereceivingstation.
UnliketheEthernetCSMA/CDnetwork,thetokenpassingnetworkisdeterministic,whichmeansthatanyterminalstationcancalculatethemaximumwaitingtimebeforeitcantransmit.Thisfeature,combinedwithotherreliabilityfeatures,makesthetokenringnetworksuitableforapplicationsthatneedtobeabletopredictdelaysandsituationsthatrequirereliablenetworkoperation.
ThetokenringnetworkwasdevelopedbyIBMin1984.IthasbeenIBM'snetworkstandardforalongtimeandissupportedbyallIBMcomputers.TokenRingcanconnecttoothernetworkswithabridgeorrouter.Thetokenringnetworkisindeeda"ring"networkinpracticalapplications,butbecauseoftheuseofso-calledmulti-stationaccessunitequipment,star-shapedwiringcanberealized.Suchadevicehasacertaindegreeofintelligence,andwillloopupunusedportstomakethetokenunblocked.TheIEEE802.5standardismainlybasedonIBM'stokenringnetwork,buttherearesomesubtledifferences.
Theworkingprincipleofthetokenring
(1)First,initializethering(establishalogicalring),andthengenerateanemptytokentoflowonthering.
(2)Astationwishingtosendaframemustwaituntilitdetectsthearrivalofanemptytoken.
(3)Afterthestationthatwantstosendgetsanemptytoken,itfirstputsitinabusystate,andthestationsendsadataframetothebackofthetoken.
(4)Whenthetokenisbusy,becausethereisnoemptytokenonthenetwork,allstationsthatwanttosenddataframesmustwait.
(5)Eachstationringinterfacethatthedatapassesthroughcomparesthedestinationaddressoftheframewiththeaddressofthestation.Iftheaddressesmatch,theframeisputintothereceivingbufferandthensenttothestation.Atthesametime,theframewillcontinuetoflowonthering;iftheaddressdoesnotmatch,theringinterfacewillonlyforwardthedataframe.
(6)Thesentframecirculatesaroundtheringandthenreturnstothesendingstation.Thesendingstationremovestheframefromtheringandreleasesthetokenatthesametime(changeitsstatusto"idle")Sendtothenextstation.
TokenRingNetwork
TokenRingNetworkisakindoflocalareanetworkdevelopedonthebasisofringnetworktopology.Althoughitcanalsobeconnectedinastarstructureintermsofphysicalcomposition,itstillworksinaringmannerlogically.Thecommunicationtransmissionmediumcanbeunshieldedtwistedpair,shieldedtwistedpairandopticalfiber.
Transmissionmethod
Whentransmittingdata,thecomputerthathasthetokenwillsendthedatafirst.Thecomputerreceivingthedatawillchecktheframeheader,andprocessitifitissenttoitself.Regardlessofwhetheritisgiventoyourself,itwillbepassedonagain,andafteraroundoftransmission,checkwhetherthedataisthesametomakesurethatthedatahasnotransmissionerrors.Aftersendingthedata,youcanadjustthepriorityofthetokenasneeded(changeittobelowerthanyourownpriority),andthenpassthetokentothenextcomputer.Ifyoureceivethetokenbutthepriorityishigherthanyourown,youhavetopassthetokentothenextcomputer.
Inaddition,theTokenPassingProtocolisalsousedintheFiberDistributedDataInterface(FDDI).