7 Bridging and Switching.docx
- 文档编号:9751795
- 上传时间:2023-05-21
- 格式:DOCX
- 页数:59
- 大小:1.01MB
7 Bridging and Switching.docx
《7 Bridging and Switching.docx》由会员分享,可在线阅读,更多相关《7 Bridging and Switching.docx(59页珍藏版)》请在冰点文库上搜索。
7BridgingandSwitching
7BridgingandSwitching
CERTIFICATIONOBJECTIVES
7.1BridgesandSwitches1
BridgingVersusSwitching1
MethodsofSwitching2
SwitchConnections3
7.2FunctionsofBridgingandSwitching4
LearningFunction5
ForwardingFunction6
7.3TheSpanningTreeProtocol13
BridgeProtocolDataUnits13
RootBridge14
RootPort16
DesignatedPort17
PortStates18
Layer-2Convergence19
RapidSpanningTreeProtocol20
7.41900and2950Configuration27
DefaultConfiguration27
QuickReview28
BasicInterfaceConfiguration30
VerifyingInterfaceConfiguration31
MACAddressesandPortSecurity34
CERTIFICATIONSUMMARY41
TWO-MINUTEDRILL41
SELFTEST43
SELFTESTANSWERS45
Bridgesandswitchesarebothlayer-2devices,functioningatthedatalinklayeroftheOSIReferenceModel.Eventhoughtheyarebothlayer-2devicesandhavemanysimilaritiesbetweenthem,theyalsohavemanydifferences.Withadvancementsinhardwareandtechnology,switchesperformfasterandhavemanymorefeatures.However,thebasicfunctionsofthesetwodevicesarethesame.Thischaptercoversthefunctionsofbridgesandswitches,theSpanningTreeProtocol(STP),andbasicswitchconfigurationtasksonCisco’sCatalyst1900and2950.
7.1BridgesandSwitches
Themainfunctionofbridgesandswitchesistosolvebandwidth,orcollision,problems.RememberthatinEthernet,multipledevicescansharethesamesegment,sothereisachancethatmorethanonedevicemighttrytotransmitatthesametime,creatingacollisionandaretransmission.Themoredevicesyouhaveinasharedmediumthemorelikelycollisionswilloccur.Thisdoesn’tmeanthatEthernetisabaddatalinklayertopology;it’sjustthewayitfunctions.
Intheolddaysofnetworkingyouusedhubstoconnectdevicestogether,orused10Base5or10Base2cabling(whereyouwouldhavemanydevicesononewire).Ifyouexperiencedconstantorexcessiveamountsofcollisions,youcouldusebridges(andlateron,switches)tobreakuptheuserdevicestomultiplesegments,whereeachsegmentwouldhavefewerusers,andthusfewercollisions.Youcouldalsousearoutertoperformthisfunction;however,thedisadvantageofarouteristhatitcostsalotmorethanabridgeorswitch.Thissectionprovidesabriefoverviewofbridgesandswitches.
BridgingVersusSwitching
Eventhoughbridgesandswitchesbothoperateatlayer2,therearemanydifferencesbetweenthem,asTable7-1shows.
Perhapsthebiggestdifferencebetweenthebridgesandswitchesisperformance.Bridgesswitchinsoftware,providingaframerateofabout50,000framespersecond(fps).Switches,ontheotherhand,performtheirswitchinginhardware,usingASICs(application-specificintegratedcircuits).ASICsarespecializedprocessors,andintheswitchingworld,theyarebuilttodoonething:
switchframesveryfast.Asanexample,the1900switchhasaframerateof500,000fpsandcanhandleallportsattheirmaximumspeed.Pleasenotethatthe1900isalow-endswitch.OnCisco’shigher-endswitches,theframerateisinthemillionsofframespersecond.
MethodsofSwitching
Anotherdifferencebetweenbridgesandswitchesishowtheyswitchframes.Theswitchingmethodaffectshowalayer-2devicereceives,processes,andforwardsaframe.Bridgessupportonlyoneswitchingmethod,store-and-forward,whileswitchesmightsupportone,two,orthreedifferentswitchingmethods.Thethreeswitchingmethodssupportedbylayer-2devicesincludethefollowing:
■Store-and-forward
■Cut-through
■Fragment-free
Thefollowingsectionscoverthesethreeswitchingmethods.
Store-and-Forward
Store-and-forwardswitchingisthemostbasicformofswitching.Withstore-and-forwardswitching,thelayer-2devicemustpullintheentireframeintothebufferoftheportandchecktheCRC(checksum)oftheframebeforethelayer-2devicewillperformanyadditionalprocessingoftheframe.WhencheckingtheCRC,thelayer-2devicewillcalculateaCRCvaluejustasthesourcedevicedid,andcomparethisvaluetowhatwasincludedintheframe.Iftheyarethesame,thentheframeisgoodandthelayer-2devicecanstartprocessingtheframe,includingtheforwardingtheframeoutthecorrectdestinationport.Iftheyaredifferent,thelayer-2devicewilldroptheframe.
Bridgessupportonlyastore-and-forwardswitchingmethod.Allswitchessupportstore-and-forward.However,someswitches,likethe1900series,maysupportanadditionalswitchingmethod(s);butthisisdependentontheactualswitchmodel.
Cut-Through
Someswitches,likethe1900,supportcut-throughswitching.Withcut-throughswitching,theswitchreadsonlytheveryfirstpartoftheframebeforemakingaswitchingdecision.OncetheswitchdevicereadsthedestinationMACaddress(eight-bytepreambleandsix-byteMACaddress),itbeginsforwardingtheframe(eventhoughtheframemaystillbecomingintotheinterface).Oneadvantageofcut-throughswitchingoverstore-and-forwardisthatitismuchfaster.Itsbiggestproblem,though,isthattheswitchmaybeswitchingbadframes.
Mostvendorssolvethisproblembysupportingadynamicswitchingmethod.Whenperformingcut-throughswitching,theswitchwillstillexaminetheCRCoftheframeasitisbeingswitched,lookingforbadframes.Eventhoughtheframemaybebad,itisstillswitched.However,theswitchkeepsacountofthesebadframes.Ifoveracertainperiodoftimetheswitchreachesacertainthresholdofswitchingbadframes,theswitchwilldynamicallyswitchitsmethodfromcut-throughtostore-and-forward.Thisfunction,though,isentirelydependentonwhetherornotthevendorincludedthisfunctioninitsswitchingmodel.The1900supportsthisfunction.
Fragment-Free
Thedefaultswitchingmethodofthe1900isfragment-freeswitching.Fragment-freeswitchingisamodifiedformofcut-throughswitching.Whereascut-throughswitchingreadsuptothedestinationMACaddressfieldintheframebeforemakingaswitchingdecision,fragment-freeswitchingmakessurethattheframeisatleast64bytesbeforeswitchingit(64bytesistheminimumlegalsizeofanEthernetframe).Thegoaloffragment-freeswitchingistoreducethenumberofEthernetruntframes(framessmallerthan64bytes)thatarebeingswitched.Sometimesfragment-freeswitchingisalsocalledmodifiedcut-throughorruntlessswitching.
Evenwithfragment-freeswitching,aswitchcouldstillbeswitchingcorruptframes(frameswithabadCRC),sincetheswitchischeckingonlythefirst64bytes,andtheCRCisattheendoftheframe.Toovercomethisproblem,manyvendorsimplementdynamicswitchingmethods,asdiscussedinthelastsection.Atleastwithfragment-freeswitching,mostcollisionstypicallycreaterunts,andthisswitchingmethodwouldpreventtheforwardingoftheseframes,unlikecut-throughswitching.
Eventhoughthe2950doesn’tsupportcut-throughandfragment-freeswitching,likethe1900,itstillswitchesframesfaster.Thisisbecausethe2950hasmuchfasterASICsthanthe1900switch.Therefore,youshouldn’tjudgeaswitchbyitsswitchingmethod,butbyacombinationoffactors,suchasprice,performance,andfeatures.
SwitchConnections
Duplexingaffectshowadevicecansendandreceiveframes.Therearetwomodestoduplexing:
halfandfull.Withhalf-duplex,thedevicecaneithersendorreceive—itcannotdobothsimultaneously.Half-duplexconnectionsareusedinshared-medium,like10Base2,10Base5,andEthernethubs.Inthisenvironment,onedevicesendswhileallotherdevicesinthecollisiondomainlistenforandreceivetheframe.Inasharedenvironmentlikethis,youcantypicallyget40–60percentutilizationoutofyourEthernetsegment.Pleasenote,however,thateverysituationisdifferentandthesenumbersareundernormal,oraverage,conditions.
Ifyourutilizationinahalf-duplexenvironmentstartseclipsingthe40–60percentutilizationrange,oryourcollisionsexceed2percentoftotaltraffic,youshouldconsidereitherusingfull-duplex,increasingthespeedofthelink(likeusingFastorGigabitEthernet),orbreakingupthecollisiondomainwithswitches.
Full-duplex,unlikehalf-duplex,allowsadevicetosendandreceiveframessimultaneously.However,thiswillworkonlyiftherearetwodevicesontheconnection,likeaPCconnectedtoaswitch,oraswitchconnectedtoarouter.Thisiscalledapoint-to-pointconnection.Youcannotuseahubinafull-duplexconnection.Inordertosetupafull-duplexconnection,bothdevicesneedtosupportfull-duplexing.Table7-2compareshalf-andfull-duplexconnections.
AsTable7-2pointsout,onemainadvantagethatfull-duplexconnectionshaveoverhalf-duplexonesisthatfull-duplexconnectionsdonotexperiencecollisions.Basically,thetransmitcircuitononesideiswiredtothereceivecircuitontheotherside,andviceversa.Inthissituation,theNIC(networkinterfacecontroller),orEthernetcard,disablesthecollisiondetectionmechanism,sinceitisn’tneeded.Full-duplexconnectionsaresupportedwiththefollowingmediatypes:
10BaseT,100BaseTX,100BaseTX,100BaseFX,andGigabitEthernet.Connectionsusing10Base5,10BaseFL,and10Base2supportonlyhalf-duplexing.Pleasenotethatsomeolder10BaseTNICsmaynotsupportfull-duplex.Anexampleofthisisthe10BaseTinterfacesonCisco2500seriesrouters.
Whendealingwithbridgesandswitches,bridgessupportonlyhalf-duplexconnections,whilemostswitchessupportboth.Forinstance,the1900and2950switchessupportbothconnectiontypes.Mostswitcheswillautosensetheduplexingandappropriatelyconfigureit.
7.2FunctionsofBridgingandSwitching
Withallofthesedifferencesb
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Bridging and Switching