niet, guntur

Upload: avidasari

Post on 30-May-2018

233 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/14/2019 Niet, Guntur

    1/27

    NIET, GUNTUR Medium Access Sub Layer

    1

    4. The Medium Access Sub Layer

    Broadcast channels [or multi-access channels] are a categoryof networks and the key

    issue is how todeterminewhogets to use the channelwhen there is competition for it. The

    protocols which define these factors belong to a sub layer of data link layer called the

    MAC(medium accesscontrol)sub layer.

    ALOHA: Norman Abramson devised a new and elegant method to solve the channel

    allocation problem calledthe ALOHA system which usedground-based Radio broadcasting.

    Twocategoriesare presentinthis ALOHA system. They are:

    a. Requiresglobaltimesynchronization [SLOTTED ALOHA]b. Doesntrequireglobaltimesynchronization. [PURE ALOHA]

    (a). SLOTTED ALOHA: Roberts publisheda methodfordoublingthecapacityofan ALOHA

    system by dividing the time up into discrete intervals, with each interval corresponding to a

    singleframe. Timesynchronizationwasachieved byhavingaspecialstationthatemitsa pip at

    the start of each interval, like a clock. In this system, a computer is not permitted to send

    wheneveracarriagereturnistyped. Instead, itisrequiredtowaitforthe beginningofnextslot.

    Sincethevulnerability period isnowhalved, the probabilityofnoothertrafficduringthesome

    slotise-gleadsto.

    S = Ge-g

    Throughput Vsofferedtrafficgraph:

    From thegraph, SLOTTED ALOHA peaksat G=1 withathroughputofabout 0.368.

    If system is operating at G=1, Probability of empty slot is 0.368 i.e. 36% of channel is

    utilized.

  • 8/14/2019 Niet, Guntur

    2/27

    NIET, GUNTUR Medium Access Sub Layer

    2

    OperatingathighervaluesofG

    y Reducesthenoofempties.y Increasesthenoofcollisionsexponentially.

    (b).PURE ALOHA: Inan ALOHA system, userstransmitwhenevertheyhavedatato besent

    infixedlengthframes.whencollisionoccur, thesendergetstheinformationduetothefeedback

    propertyofbroadcasting. Iftheframewasdestroyed, thesender justwaitsarandom amountof

    timeandsendsitagain.

    Frame generation in an ALOHA system:

    User

    A

    B

    C

    D

    E

    If the first bitofanew frameoverlapswith just the last bitofa framealmost finished,

    bothframeswill betotallydestroyedand bothwillhaveto bere-transmittedlater.

    Letthe meanframe (new)generated bydifferentnumberofusers perframetime be s(frames

    withoutcollisions). ThevalueofS can betherefore, either0 or1.

    FRAME TIME:theamountoftimeneededtotransmitthestandard, fixedlengthframe

  • 8/14/2019 Niet, Guntur

    3/27

    NIET, GUNTUR Medium Access Sub Layer

    3

    (1)

    Letthe meanframes (new + retransmitted)generated bydifferentnoofusers perframetime

    withoutcollisions be G. ThevalueofG isobviouslygreaterthanofequalto S(2)

    Atlowloadi.e., S=0

    Therewill befewcollisions.so, fewretransmissionsarerequired. So,

    (3)

    Athighloadi.e., S=1.

    Therewill be manycollisions.so, fewre-transmissionsarerequired. So,(4)

    IfP0isthe probabilitythataframedoesntsufferfrom anycollision,

    (5)

    IfPr[k]isthe probabilitythat kframesaregeneratedduringagivenframetime, then

    (6)

    The probabilityof0framesis Pr[0] = G0e-G

    K!

    P0 = e-G

    ( 7)

    The meanno.offramesgeneratedinanintervalof2 frametimeslongisgiven by 2G.

    The probabilityofnoothertraffic beinginitiatedduringtheentirevulnerable periodisgiven by

    P = e-2G

    (8)

    The maximum throughputoccursat G=0.5with S=1/2ei.e., S=0.184 i.e.,

    0S

    S=GP0

    Pr[k] = Gk

    e-G

    K!

    With Pure ALOHA, 18% channel utilization is made

  • 8/14/2019 Niet, Guntur

    4/27

    NIET, GUNTUR Medium Access Sub Layer

    4

    Carrier Sense Multiple Access Protocols:

    Thereare3typesofcarriersense protocols. Theyare:

    1. 1-Persistant CSMA2. Non-Persistent CSMA3. p-Persistent CSMA

    (1)1-Persistant CSMA: Whenastationhasdatatosend, itfirstlistenstothechanneltoseeif

    anyone else is transmitting at that moment. If the channel is busy, the station waits until it

    becomesidle. Whenthestationdetectsanidlechannel, ittransmitsaframe. Ifacollisionoccurs,the station waits a random amount of time and starts all over again. The protocol is called

    1-persistant becausethestationtransmitswitha probabilityof1 wheneveritfinds channelidle.

    Problems:-

    1. Ifastation becomesreadytosend (justafteranotherstation beginssending),ifsensesthechannelto beidle(becauseofpropagationdelayofthefirst)andwill beginsending, which

    resultsinacollision.

    2. If2 stations becomereadyinthe middleofthirdstationstransmission, bothwill politelywait untilthetransmissionendsand bothwill begintransmittingexactlysimultaneously,

    resultinginacollision.

    2.Non-persistent CSMA:- A station senses the channel before sending. IF no one else is

    sending, thestation beginsdoingso itself. If thechannel isalready in use, thestationdoesnot

    continually sense it for the purpose of seizing it immediately upon detecting the end of the

    previoustransmission. Insteaditwaitsarandom periodoftimeandthenrepeatsthealgorithm.

    Def:- Protocols in which stations listen for a carrier (i.e. transmission) and actaccordingly are called Carrier Sense Protocols.

  • 8/14/2019 Niet, Guntur

    5/27

    NIET, GUNTUR Medium Access Sub Layer

    5

    3.p-Persistent CSMA:- Itappliestoslottedchannels. Whenastation becomesreadytosend, if

    senses thechannel. If it is idle, it transmitswitha probability Pwitha probabilityq=1-p it

    differs until the next slot. If that slot is also idle, it either transmits or defers again, with

    probabilities p and q. This process is repeated until either the frame has been transmitted or

    anotherstationhas began transmitting. If thestation initially senses thechannel busy, itwaits

    untilthenextslotandappliestheabovealgorithm.

    II.(b). CSMA with collision Detection:

    In this protocol, the stations abort their transmissions as soon as they

    detect a collision .If 2 stations sense the channel to be idle and begin transmitting

    simultaneously, they will both detect the collision almost immediately. Rater than finish

    transmitting their frames, which are irretrievably garbled anyway, they should abruptly stop

    transmittingassoonasthecollisionisdetected. Quicklyterminatingdamagedframessavestime

    and bandwidth. This protocol is known asCSMA/CD and is usedwidely usedon LANs in

    MAC sub layer.

    Conceptual model ofCSMA/CD:-

    to

    Transmission Contention Contention idlePeriod Period slots Period

    Time

    Frame Frame Frame Frame

  • 8/14/2019 Niet, Guntur

    6/27

    NIET, GUNTUR Medium Access Sub Layer

    6

    Atthe point marked to, astationhasfinishedtransmitting itsframe. Anyotherstation

    havingaframetosend maynowattempttodoso. Asactualtransmissionsandretransmissions

    (ifanycollisionoccurs)occur, ourmodelforCSMA/CD willconsistofalternatingtransmission

    andcontention periods, withidle periodsoccurringwhenallstationsarequit.

    If2 stations begintransmitting bothexactlyattime to, theyrealizethattherehas beena

    collision bydeterminingthelengthofcontention periodandthusthedelayandthroughput.

    The minimum time todetect thiscollision is the time taken by the signal to propagate

    from onestationtotheother.

    IEEE standard 802 for LANs:

    Severalstandards produced by IEEE whichinclude CSMA/CD token busandtokenringare

    collectivelyknownas IEEE 802.

    802.1 standardgivesanintroductiontothesetofstandardsanddefines I/fprimitives. 802.2 standardgivesthe upperpartofdatalinklayerwhich uses LLC protocol. 802.3standarddescribesthe LAN standard.CSMA/CD 802.4standarddescribesthe LAN standard Token bus. 802.5standarddescribesthe LAN standardTokenring.

    IEEE 802.3: The 2.94mbps CSMA/CD system built by Xerox PARC connects over 100

    personalstationsona 1 k.m cablecalled Ethernet, inwhich thesystem uses ALOHA along

    withcarriersensingtechnique. Later, Xerox, DEC and INTEL drew up astandardfora 10-mbps

    Ethernet, called the 802.3,which describes a whole family of 1-PERSISTENT CSMA/CD

    systemsrunningatspeedsfrom 1 to 10mbpsonvarious media.

    a).cabling: 4typesofcablingarecommonly usedin802.3

    1. 10 base-52. 10 base-23. 10 base-T4. 10 base-F

  • 8/14/2019 Niet, Guntur

    7/27

    NIET, GUNTUR Medium Access Sub Layer

    7

    1) 10 base-5: Thisis popularlycalled ThickEthernet. Itresemblesayellowgardenhouse,

    with markingsevery 2.5mts to showwhere the tapsgo. Connections to itaregenerally made

    using Vampire Taps, inwhicha pin iscarefully forcedhalfway into thecoaxialcablescore.

    The notation 10base5 means that it operates at 10 mbps, uses base band signaling and can

    supportsegmentsofup to500mts.

    Transceiver: Itisclampedsecurelyaroundthecablesothatitstap makescontactwiththeinner

    core. It contains the electronics that handle carrier detection and collision detection. When a

    collisionisdetected, it putsaspecialinvalidsignalonthecabletoensurethatalso putsaspecial

    invalidsignal, on thecable toensure thatallother transceiversalsorealize thatacollisionhas

    occurred.

    Transceiver Cable: Itconnectsthetransceivertoan I/fboardinthecomputer. It may be upto

    50mtslongandcontains5individuallyshieldedtwisted pairs:

    y 2 pairsfordatain & dataout.y 2 pairsforcontrolsignalsin & out.y 1 pairto powertransceiverelectronics.

    I/F board: Itcontainsacontrollerchip thattransmitsframesto, receivesframesfrom

    transceiver.

    Controller: Itisresponsibleforassemblingthedatainto properframeformat , aswellas

    computingchecksumsonoutgoingframesandverifyingthem onincomingframes.

    Note: The lengthofthen/wcan beextended bythe useofrepeaters betweenany 2 stations.

    Thisstandardallowsa maximum of4repeaters in the path betweenany 2 stations, extending

    theeffectivelengthofthe medium to 2.5km.

  • 8/14/2019 Niet, Guntur

    8/27

    NIET, GUNTUR Medium Access Sub Layer

    8

    2) 10 base-2: This is popularly called Thin Ethernet. Connections to it are made using

    industrystandardBNC connectorstoform T-junctions. Itruns foronly 200mtsandcanhandle

    30 machines percablesegment. It is muchcheaperandeasier to install. Theconnection tothe

    cable is just a passive B NC T-junction connector. The transceiver electronics are on the

    controllerboardandeachstationalwayshasitsowntransceiver.

    3) 10 base-T: Thisdefinesastar-shapedtopologyinwhichallstationshaveacablerunningtoa

    centralhub. Usuallythesewiresaretelephonecompanytwisted pairs. Inthis, thehub actsasthe

    repeaterinwhichitrepeatsthesignalontheoutgoinglinetoeachstation, whenasinglestation

    transmits.

    Time Domain Reflectometry: Todetectcable breaks, badtapsorlooseconnectors, a pulse

    ofknownshapeisinjectedintothecable, bywhichanechowill begeneratedandsent back,

    If it hitsanobstacleorendof cable.Bycarefully timing the interval between sending the

    pulseandreceivingtheecho , originofechocan belocalized.

  • 8/14/2019 Niet, Guntur

    9/27

    NIET, GUNTUR Medium Access Sub Layer

    9

    Advantages:

    y With 10base-T thereisnocableatall, justthehub.y Addingorremovingastationissimplerinthisconfigurationy Cable breakscan bedetectedeasily.y Maintenanceiseasy.

    Disadvantages:

    y The maximum cablerunfrom thehub isonly 100mtsy Largehub coststhousandsofdollars.

    4) 10 base-F: This uses Fiberoptics, whichhasexcellentnoiseimmunityanditisthechoiceof

    methodwhenrunning between buildingsrwidelyseparatedhubs.

    Switched 802.3 LANs:

    As moreand morestationsareaddedto 802.3 LAN, thetrafficwillgo up andeventually,

    the LAN will saturate. The solution is togo tohigher speed, say from 10mbps to 100mbps,

    whichisachievedthrougha switched802.3 LAN.

  • 8/14/2019 Niet, Guntur

    10/27

    NIET, GUNTUR Medium Access Sub Layer

    10

    Theheartofthissystem isaswitchcontainingahigh-speed backplaneandroom fortypically

    4to32 plug-inlinecards, eachcontaining 1 to98connectors. Mostoften, eachconnectorhasa

    10 base-T twisted pairconnectiontoasinglehostcomputer.

    Whenastationwants totransmit802.3frames, itcomputesastandard frame totheswitch

    the plug-in cardgetting the frame checks to see if it isdestined forone of the other stations

    connected to thesamecard. Ifso, the frame iscopied there. Ifnot, the frame is sentover the

    high-speed backplanetypicallyrunsatover1 gap usinga proprietary protocol.

    Problem: Do 2 machinesattachedtothesame plug-incardtransmitframeatsametime?

    Solution1: Form alocalonward LAN withallthe plotsonthecard, wiringtogether. So,

    collisionswill bedetectedandhandledasinan CSMA/CD n/w, with

    retransmission using backoffalgorithm.

    Solution2: Each I/P portis backoffalgorithm soincomingframesarestoredinthecardson-

    board RAM astheyarrive. Onceaframehas beencompletelyreceived, thecard

    canthenchecktoseeiftheframeisdestined post, andtransmitaccordingly. As

    each portisaseparatecollisiondomain, nocollisionsoccur.

    IEEE standard 802.4: Token Bus

    Physically Token bus is a linear or Tree-shaped cable onto which the stations are attached.

    Logically the stations are praised into a ring with each station knowing the address of the

    stationtoits left and right. Whenthelogicalringisinitialized, thehighestnumberedstation

    may send the first frame. After it isdone, it passes permission to its immediate neighbor by

    sending the neighbor a special control frame called a token which propagates around the

    logical ring, with only the token holder being permitted to transmit frames. Since only one

    stationata timeholds the token, collisionsdonotoccur. The token bus uses 75- broadband

    coaxialcableforphysicallayerwhich permits3differentanalog modulationschemes:

  • 8/14/2019 Niet, Guntur

    11/27

    NIET, GUNTUR Medium Access Sub Layer

    11

    1. Phasecontinuous Frequency Shift Keying.2. Phasecoherent Frequency Shift Keying3. Multilevelduo binaryamplitude modulated Phase Shift Keying.

    The Token Bus MAC Sub layer protocol:

    When thering is initializedstationsare inserted into it inorderofstationaddress, from

    highest to lowest. Token passing isalsodone from high to lowaddresses. Each timeastation

    acquires the token; itcan transmit frames foracertainamountof timeand then, it passes the

    tokenon. Ifastationhasnodata, it passesthetokenimmediately upperreceivingit.

    Thetoken busdefines4 priorityclasses 0, 2, 4and6fortraffic, with 0 the lowestand6thehighest. When the tokencomes into the stationover thecable, it is passed initially to the

    priority6 substation, which may begin transmitting frames, if ithasany. When it isdone, the

    tokenis passedinternallyto priority4substationwhich maythentransmitframes untilitstimer

    expires atwhich point the token is passed internally to priority 2 substation. This process is

    repeated untileitherthe priority 0 substationhassentallofitsframesoritstimerhasexpired. At

    this point , thetokenissenttothenextstationinthering.

    Logical Ring Maintenance:

    Addition of new station into the Ring: Once the ring has been established, each stations

    interface maintainstheaddressofthe predecessorandsuccessorstationsinternally. Periodically,

    the tokenholdersendsof the SOLICIT-SUCCESSOR frames tosolicit bids from stations that

    wishto jointhering. Theframegivesthesendersaddressandthesuccessorsaddress. Stations

    inside thatrange may bid toenter. Ifnostation bids toenterwith inaslot time, theresponse-

    windowisclosedandthetokenholdercontinueswithitsnormal business. Ifexactlyonestation

    bidstoenter, it is insertedintotheringand becomesthetokenholderssuccessor. If2 ormore

    stations bid to enter, their frameswill collide and be garbled. The tokenholder then runs an

    arbitrationalgorithm, startingwith the broadcastofa RESOLVE-CONTENTION frame. Each

    stationhasatimerthatisresetwheneveritacquiresthetoken.

  • 8/14/2019 Niet, Guntur

    12/27

    NIET, GUNTUR Medium Access Sub Layer

    12

    Leaving of a station from the ring: A station Xwith successor S and predecessor P

    leaves the ring, by sending P a SET-SUCCESSOR frame telling it that henceforth its

    successorsis SinsteadofX. Then X justtransmitting.

    Initialization of a Ring:

    o Itisaspecialcaseofaddingnewstations. Assoonasthesystem is powered ON andifitnoticesthatthereisnotrafficforacertain period, itsendsa CLAM - TOKEN Frame.

    o Itcreatesatokenandsets up aringcontainingonlyitself.o Periodicity, itsolicits bidsfornewstationsto join.o Asnewstationsare ON, theywillrespondtothese bidsand join bid usingcontentionalg.

    Problems with Logical Ring / Token due to Transmission Errors:

    1. If a stations tries to the token to a station that has gone down..Sol: Afterpassingthetoken, astationlistenstoseeifitssuccessoreithertransmitsaframe

    orpassesthetokenandifsothetokenis passedasecondtime. Ifthatalsofails, thestation

    transmitsaWHO-FOLLOWS framespecifying theaddressof its successorseesa WHO-

    FOLLOWS frame naming its predecessor, it responds by sending a SET-SUCCESSOR

    frametothestationwhosesuccessorfailed, named itselfasthenewsuccessor. Inthisway,

    thefailedstationisremovedfrom thering.

    2. If a station fails to pass the token to its successor and also fails to locate thesuccessor and also fails to locate the successors successor, which may also be down.

    Sol: The system sends a SOLICITSUCCESSOR2 frame to see if anyone else is still

    alien. Onceagainthestandardcontention protocolisrun, withallstationsthatwantto bein

    theringnow biddingfora place. Eventuallytheringisreestablished

    3. If the token holder goes down and takes the token with it.Sol: Thisissolved using Ring Initializationalgorithm. Eachstationissuesahitsathreshold

    value, thestationissuesaCLAIMTOKENframeandcontentionalgorithm determineswho

    getsthetoken.

  • 8/14/2019 Niet, Guntur

    13/27

    NIET, GUNTUR Medium Access Sub Layer

    13

    4. Multiple TokensSol:

    y If a station holding the token notices a transmission from another station, itdiscardsitstoken.

    y Iftherewere 2, therewouldnow beone.y Iftherewere morethan 2, this processwould berepeatedsoonerorlateruntilall

    butonewerediscards.

    y If by accident, all tokens are discarded, then lackof activitywill causeone ormorestationstotrytoclaim token.

    3. IEEE Standard 802.5 : Token Ring

    A token ring isnotreally a broadcast medium, butacollectionof individual point-to-

    point links thathappens to form acircle, whichcanrunon twisted pair, coaxialcableor fiber

    optics. A majorissueinthedesignandanalysisofanyringnetworkisthe physicallength ofa

    bit. If thedatarateof thering is R mbps, thena bit isemittedevery 1/R secwitha typical

    signal propagationspeedofabout 200m/ sec, each bitoccupies 200/R mtsonthering.

    Eg:In a 1 mbps ring with circumference of 1000mts, the length of each bit = 200/1000=1/5.

    i.e., only 5 bits are present on the ring, at once.

    A tokenringconsistsofacollectionofringinterfacesconnected by point-to-pointlines. Each bit

    arriving atan interface iscopied intoa 1-bit bufferand thencopiedouton to the ringagain.

    Whileinthe buffer, the bitcan beinspectedand possibly modified before beingwrittenout. This

    copying bitintroducesa 1-bitdelayateachinterface.

  • 8/14/2019 Niet, Guntur

    14/27

    NIET, GUNTUR Medium Access Sub Layer

    14

    Ina tokenring, aspecial bit patterncalled the token, circulatesaroundtheringwhen

    everall stations are idle. Whena stationwants to transmita frame, it is required to seize the

    token byinvertingasingle bitin3-bytetoken.

    Logically it isa ring but physically, eachstation isconnected to the wirecenter bya

    cablecontaining 2 twisted pairs (at least)one fordata tothestationandone fordata from the

    station. Inside thewirecenterare bypassrelays thatareenergized bycurrentfrom thestations.

    Thering breaksorastationgoesdown, lossofdrivecurrentwillreleasestherelayand bypass

    thestation. Theringcanthencontinueoperationwiththe badsegment bypassed

    The Token Ring MAC

    sub layer protocol :

    When there is no traffic or the ring, a 3-bits token circulates endlessly waiting for a

    stationtosizeit bysettingaspecific 0 bittoa 1 bit, thusconvertingthetokenintothestart-

    of-framesequence. Thestationthenoutputstherestofanormaldataframe.

    1 1 1 2 or6 2 or6 nolimit 4 1 1

    SD AC FC Destinationaddress Sourceaddress DATA CheckSum ED FS

    Frame Control Ending Delimiter

    Access Control Frame Status

    Starting Delimiter

    A station mayholdthetokenfortheToken-Holdingtime.

  • 8/14/2019 Niet, Guntur

    15/27

    NIET, GUNTUR Medium Access Sub Layer

    15

    SD: startingdelimitermarksthe beginningoftheframe

    ED:startingdelimitermarkstheendingoftheframe

    AC:containsthetoken bits, monitorbits, priority bitsandreservation bits

    FC:distinguishesdataframesfrom various possiblecontrolframes

    DA: destinationaddress

    SA: sourceaddress

    CheckSum: checksum field.

    FS:itcontains Aand C bits.

    o Whenaframearrivesattheg/fofastationwiththedestinationaddressthei/fturnson A bitasit passesthough.

    o Ifthei/fcopiestheframetothestation, itturnson C bit.A C Meaning

    0 0 Destinationnot presentornot powered up

    1 0 Destination presentframenotaccepted

    1 1 Destination presentandframecopied

    Ring Maintenance: Thetokenring protocolhandles maintenance bythe presenceofmonitor

    station that theoverseas ring. When the ringcomes up oranystationnotices that these isno

    monitor, itcan transmitaC

    LAIM TOKENcontrol framenavigates the ring beforeanyotherCLAIM TOKEN framesaresent, thesenderbecomesthenew monitor.

    Monitors Responsibilities:

    1. Toseethatthetokenisnotlost2. Totakeactionwhenthering breaks3. Toclearthering up whengarbledframesappear.4. Towatchoutfororphanframes

    Orphan frame:

    Itisaframethatoccurswhenastationtransmitsashortframeinitsentiretyontoalongring

    andthencrashesoris powereddown beforetheframecan bedrained. Ifnothingisdone, the

    framewillcirculateforever

  • 8/14/2019 Niet, Guntur

    16/27

    NIET, GUNTUR Medium Access Sub Layer

    16

    The Token Ring Control Frames:

    1. To checkfor lost token: The monitorhasatimerthatissettothelongest possibletokenless

    Interval.eachstationtransmittingforthefulltoken-holdingtime. Ifthistimergoesoff, the monitor

    drainstheringandissuesanewtoken.

    2.When a garbled frame appears: The monitorcandetectit byitsinvalidformatorchecksum,

    opentheringtodrainit, andissueanewtokenwhentheringhas beencleaned up.

    3. When orphan frame is detected:Anorphanframeisdetected bysettingthemonitorbitin

    Access Control byte whenever it passes through. If an incoming frame has this bit set,

    something iswrong since the same frame has passed the monitor twicewithout having been

    drained, sothe monitordrainsit.

    4. When the Ring breaks:A stationtransmitsaBEACONframe, [ifitnoticesthateitherofits

    neighborsappears to bedead]giving theaddressof presumablydead station, bywhich itcan

    knowthenoofstationsdownanddeletethem from thering usingthe bypassrelaysinthewire

    center.

    Bytes 1 1 1

    Staring Delimiter

    Access Control

    Ending Delimiter

    Control field Name Meaning

    00000000 Duplicateaddresstext Textif2 stationshavesameaddress

    00000010 Beacon Usedtolocate breaksinthering

    00000011 Chaintoken Attemptto become Monitor

    00000100 Purge Reinitializethering

    00000101 Active monitorpresent Issued periodically bythe monitor

    00000110 Standby monitorpresent Announcesthe presenceofpotential monitors

    SD AC ED

  • 8/14/2019 Niet, Guntur

    17/27

    NIET, GUNTUR Medium Access Sub Layer

    17

    A tokenringconsistsofacollectionofring interfacesconnected by point-to-point lines. Each

    bitarrivingataninterfaceiscopiedintoa 1-bit bufferandthencopiedoutontotheringagain.

    While in the buffer, the bitcan be inspectedand possibly modified before beingwrittenout.

    Thiscopying bit introducesa 1-bitdelayateach interface. Inatokenring, aspecial bit pattern

    called the token, circulates around the ringwhen ever all stations are idle. When a station

    wants to transmita frame, it is required to seize the token by invertinga single bit in3-byte

    token.Because there isonlyone token, onlyone station can transmit at a given instant, thus

    solvingthechannelaccess problem. Thetokenring mustitselfhavesufficientdelaywhichhas 2

    components:

    1. 1-bitdelayintroduced byeachstation2. Signal propagationdelay.

    A ringinterfacehas 2 operating modes:

    (a). Listen Mode: Inthis mode, thei/p bitsaresimplycopiedtoo/p withadelayof1-bittime.

    (b). Transmit Mode: This modeisenteredonlyafterthetokenhas beenseized, thei/fbreaks

    theconnection betweeni/p ando/p enteringitsowndataintothering.

    Problem with a ring network: Ifthecable breakssomewhere, theringdies.

    Solution: WIRE CENTER .

    4 stations connected via a Wire Center:

  • 8/14/2019 Niet, Guntur

    18/27

    NIET, GUNTUR Medium Access Sub Layer

    18

    BRIDGES

    Def: Thedevices bywhich multiple LANscan beconnectedarecalledBRIDGES and

    thesedevicesoperatein Data LinkLayer.

    Multiple LANS connected bya backbonetohandleatotalloadhigherthanthecapacityofsingle LAN:

    Reasons to construct Bridges:

    802.3 802.4 802.51. The protocolissimple. 1. The protocoliscomplex. 1. The protocoliscomplex.

    2. Delayatlowlocaliszero. 2.Substantialdelayatlow

    Load.

    2. Substantialdelayatlowload.

    3. Substantialanalogcomponent. 3. Noanalogcomponent. 3. Noanalogcomponent.

    4. Prioritiesarenot possible. 4. Prioritiescan beassigned. 4. Prioritiescan beassigned.

    5. Asthespeedincreasesthe

    Efficiencydecreases.

    5. Asthespeedincreasesthe

    Efficiencyincreases.

    5. Asthespeedincreasesthe

    Efficiencyincreases.

    6. Athighload, the presenceofcollision seriouslyaffectthe

    Throughput.

    6. Athighload, ithasexcellentThroughput & efficiency.

    6. Athighload, ithasexcellentThroughput & efficiency.

    7. It usesa passivecable. 7. It useshighlyreliablecableTelevisionequipment.

    7. Ringsone built usingvirtuallyanytransmission medium from

    Carrierpigeontofiberoptics.Standardtwisted pairischeap.

    8. Automaticdetection &

    eliminationofcablefailuresisnot possible.

    8. Automaticdetection &

    eliminationofcablefailuresisnot possible.

    8.Automaticdetection &

    eliminationofcablefailureisdone bythe useofwirecenters.

  • 8/14/2019 Niet, Guntur

    19/27

    NIET, GUNTUR Medium Access Sub Layer

    19

    1. Many universitiesandcorporatedepartmentshavetheirown LANsinwhichgoalsofvarious

    departmentsdiffer.Bridgesareneededwhenthereisneedforinteraction betweenthese

    variousdepartments.

    2. Theorganization may begeographicallyspreadoverseveral buildingsseparated by

    considerabledistances. It may becheapertohaveseparate LANsineach buildingandconnect

    them with bridgesratherthantorunasinglecoaxialcableovertheentiresite.

    3. It may benecessarytosplitwhatislogicallyasingle LAN intoseparate LANsto

    accommodatetheload.

    4. Insomesituations, asingle LAN would beadequateintermsoftheload, butthe physical

    distance betweendistant machinesistoogreat.(Eg: >2.5kmsfor802.3). Even iflayingthe

    cableiseasytodo, thenetworkwouldnotworkduetotheexcessivelylonground-trip delay.

    Theonlysolutionisto partitionthe LAN andinstall bridges betweenthesegments.

    5.Bridgescancontributetoorganizationssecurity. Most LAN interfaceshavea promiscuous

    mode, inwhichallframesaregiventothecomputer, not justthoseaddressedtoit.By

    inserting bridgesatvarious placesand beingcarefulnottoforwardsensitivetraffic, itis

    possibletoisolate partsofthenetworksothatitstrafficcannotescapeandfallintowrong

    hands.

    6. Thereisno matterofreliability. Onasingle LAN, adefectivenodethat keepsoutputtinga

    continuousstream ofgarbagewillcripplethe LAN.Bridgescan beinsertedatcritical places

    to preventasinglenodewhichhasgone berserkfrom bringingdowntheentiresystem.

    Problems:

    1. Eachofthe LANs usesadifferentframeformat. Anycopying betweendifferent LANsrequirereformatting, whichtakes CPU time, requiresanewchecksum calculationand

    introducesthe possibilityofundetectederrorsdueto bad bitsinthe bridges memory.

    2. Interconnected LANsdonotnecessarilyrunatthesamedatarate. Whenforwardingalongrunofback-to-backframesfrom afast LAN toaslowerone, the bridgewillnot be

    abletogetridoftheframesasfastastheycomein. Itllhaveto bufferthem, hopingnotto

    runoutofmemory.

    3. Thevalueoftimersinhigherlayersisa bottleneckproblem in bridges. Supposethatthen/wlayerinan802.4 LAN istryingtosendaverylong messageasasequenceofframes.

  • 8/14/2019 Niet, Guntur

    20/27

    NIET, GUNTUR Medium Access Sub Layer

    20

    Aftersendingthelastone, itstartsitstimertowaitforanacknowledgement. Ifthe

    message hastotransmita bridgetoaslower802.5 LAN, thereisadangerthatthetimer

    willgooffbeforethelastframehas beenforwardedontotheslowerLAN. Then/wlayer

    willassumethatthe problem isduetoalostframeand justretransmitstheentiresequence

    again. Afternfailedattempts, it maygive-up andtellthetransportlayerthatthe

    destinationisdead.

    4. Allthethree LANshaveadifferent maximum framelength. For802.3,802.4,802.5standards, the payloadis 1500, 8191 and5000 bytesrespectively.

    5. Anobvious problem iswhenalongframe must beforwardedontoa LAN thatcannotacceptit, whichhasnosolution. Framesthataretoolargeto beforwarded must be

    discarded.

    Bridges from 802.x to 802.y(problems):

    : Theonlythingthatcangowrongisthatthedestination LAN isso

    heavilyloadedthatframeskeep pouringintothe bridge, butthe

    bridgecannotgetridofthem. Ifthissituation persistslongenough,

    the bridge mightrunoutofbufferspaceand begindroppingframes.

    : Wehavethe problem ofwhatto putinthe priority bits.

    : The bridge mustgenerate priority bits.

    : (a). 802.4framescarry priority bitsthat802.3framesdonothave.

    (b). Temporarytokenhandofffeatureof802.4

    : Theonly problem iswhattodowiththetemporarytokenhandoff.

    : (a). Potential problem withframesthataretoolong.

    (b). Temporarytokenhandoffproblem.

    : The802.5frameformathas A and C bitsintheframestatus byte.

    These bitsareset bythedestinationtotellthesenderwhetherthe

    stationaddressedsawtheframeandwhetheritcopiedit. Here, a

    bridgecanlieandsaytheframehas beencopied, butifitlater

    turnsoutthatthedestinationisdown, serious problems mayarise.

    2.3 2.4

    2.3 2.5

    2.4 2.3

    2.4 2.4

    802.4 802.5

    2.5 2.3

  • 8/14/2019 Niet, Guntur

    21/27

    NIET, GUNTUR Medium Access Sub Layer

    21

    : (a). Definitionofpriority bitsisdifferentforthe 2 LANs

    (b). The A and C bitsofframestatus bytein802.5

    : Whattodowith A and C bitsisthe majorproblem.

    DifferentkindsofBridges:

    1. TransparentBridges.2. Spanning TreeBridges.3. Source RoutingBridges.4. RemoteBridges.

    1. Transparent Bridges:

    Thisisthefirst802 bridge, whichoperatesin promiscuous modeacceptingeveryframe

    transmittedonall LANstowhichitisattached.

    Eg: A configurationwith4 LANsand 2 Bridges:

    Bridge B1 connected to LANs 1 and 2.

    Bridge B2 connected to LANs 2, 3 and 4.

    A framearrivingat bridgeB1 on LAN1 destined for Acan bediscarded immediately,

    because it isalreadyon theright LAN, buta framearrivingon LAN1 for Cand F must be

    forwarded. Whenaframearrives, a bridge mustdecidewhethertodiscardorforwardit, andif

    the latter , on which the LAN to put the frame. This decision is made by looking up the

    destination address in a big (hash) table inside the bridge. The table can list each possible

    destinationandtellwhichoutputline (LAN)it belongson. Whenthe bridgesarefirst pluggedin,

    all thehash tablesareempty. Noneof the bridgesknowwhereanyof thedestinationsare, so

    they usefloodingalgorithm.

  • 8/14/2019 Niet, Guntur

    22/27

    NIET, GUNTUR Medium Access Sub Layer

    22

    The algorithm used by the transparent bridges is BACKWARD LEARNING. Itworks as

    follows:

    y The bridgesoperatein promiscuous modeandtheyseeeveryframesentonanyoftheirLANs.By lookingat the sourceaddress, theycan tellwhich machine isaccessibleon

    which LAN.

    Eg: Intheabovefigure, Ifbridge B1seesaframeon LAN2 comingfrom C, itknows

    that C must be reachable LAN2, so it makes an entry in its hash table noting that

    framesgoingto Cshould use LAN2. Anysubsequentframeaddressedto Ccomingon

    LAN1 will beforward, butaframeforCcomingon LAN2 will bediscarded.

    y Thetopologycanchangeas machinesand bridgesare powered up anddownand movedaround. Tohandledynamictopologies, wheneverahashtableentry is made, thearrival

    timeoftheframeisnotedintheentry. Wheneveraframewhosedestinationisalreadyin

    thetablearrives, itsentryis updatedwiththecurrenttime. Thus, thetimeassociatedwith

    everyentrytellsthelasttimeaframefrom that machinewasseen.

    y Periodically, a processinthe bridgescansthehashtableand purgesallentries morethanafew minutesold. Inthisway, ifacomputeris unpluggedfrom its LAN, movedaround

    the buildingandre-pluggedinsomewhereelse, withinafew minutes, itwill be backin

    normaloperation, withoutany manualintervention.

    Routing: The Routing procedure foran incoming framedependson the LAN itarriveson(thesource LAN)andthe LAN itsdestinationison (the Destination LAN), asfollows:

    1) Ifthedestinationandsource LANS arethesame, discardtheframe.

    2) Ifthedestinationandsource LANS aredifferent, forwardtheframe.

    3) Ifthedestination LAN is unknown, useflooding.

    Aseachframearrives, thisalgorithm must beapplied.

    Flooding Algorithm:

    Everyincomingframeforan unknowndestinationisoutputonallthe LANstowhichthe bridge

    isconnectedexcepttheone itarrivedon. Astimegoeson, the bridges learnwheredestinations

    are. Onceadestination isknown, framesdestinedforitare putononlythe properLAN andare

    notflooded.

  • 8/14/2019 Niet, Guntur

    23/27

    NIET, GUNTUR Medium Access Sub Layer

    23

    The unknown Destination is handled using flooding i.e., copies it to LAN2 in the above

    example. Shortly there after, bridge1 sees F2, a framewith an unknown destination, which it

    copies to LAN1, generating F3. Similarly, bridge2 copies F1 to LAN1 generating F4 .Bridge1

    nowforwards F4and bridge2 copies F3. Thiscyclegoesonforever.

    2. Spanning Tree Bridges :

    As paralleltransparent bridgescreateloopsinthetopology, spanningtree bridgesare

    employed. Inthis, the bridgescommunicatewitheachotherandoverlaytheactualtopologywith

    aspanningtreethatreachesevery LAN .Ineffect, some potentialconnections between LANS are

    ignoredintheinterestofconstructingafictitiousloop-freetopology.

    In the above example, 9 LANS are interconnected by 10 bridges. This configuration can be

    abstracted into a graphwith the LANS as the nodes. An arc connects any 2 LANS that are

    connected bya bridge. Thegraphcan bereducedtoaspanningtree bydroppingthearcsshown

    asdottedlines.

  • 8/14/2019 Niet, Guntur

    24/27

    NIET, GUNTUR Medium Access Sub Layer

    24

    A spanning tree covering the LANS :

    Using this spanning tree, there is exactlyone path from every LAN to every other

    LAN .Once the bridges have agreed on the spanning tree , all forwarding between LANS

    follows the spanning tree. Since there isa unique path from eachsourcetoeach destination,

    loopsare impossible.

    Building a spanning tree (using DISTRIBUTED ALGORITHM):

    y First, the bridgeshavetochooseone bridgeto betherootofthetree. Each broadcastisassigned its uniqueserialnumberandthe bridgewith lowestserialnumber becomesthe

    root.

    y Next, atreeofshortest pathsfrom theroottoevery bridgeand LAN isconstructed. Thistreeisthespanningtree.

    y Ifa bridgeorLAN fails, anewoneiscomputed.Theresultofthisalgorithm isthata unique path isestablishedfrom every LAN totherootand

    thustoeveryotherLAN.

    3. Source Routing Bridges:

    This scheme is employed by token ring people where as Transparent bridges are

    employed by TokenBus & CSMA/CD. The Source Routing assumes that the sender of each

    frame knowswhether or not the destination is on its own LAN. When sending a frame to a

    different LAN, thesource machinegetshigh -order bitof thesourceaddress to 1, to mark it.

    Furthermore, itincludesinthe Frameheadertheexact paththattheframewillfollow.

    This pathcan beconstructedasfollows:--

  • 8/14/2019 Niet, Guntur

    25/27

    NIET, GUNTUR Medium Access Sub Layer

    25

    1. Each LAN hasa unique 12-bitnumberandeach bridgehasa4-bitnumberthat uniquelyidentifies it in the context of its LANS. A route is then a sequence of bridge, LAN,

    bridge, LAN,numbers.

    2. A source routing bridge is only interested in those frames with high-order bit ofdestinationsetto 1.

    3. Foreachsuchframethatitsees, itscanstheroutelookingforthenumberofthe LAN onwhichtheframearrived.

    4. Ifthis LAN numberisfollowed byitsown bridgenumber, the bridgeforwardstheframeontothe LAN whosenumberfollowsits bridgenumberintheroute.

    5. If the number of some other bridge follows the incoming LAN number, it does notforwardtheframe.

    This Algorithm leads itself to 3 possible implementations:

    (a). Software: The bridgerunsin promiscuous mode, copyingallframestoits memorytoseeif

    theyhavethehigh-orderdestination bitsetto 1. Ifso, theframeisinspectedfurther. Otherwise,

    itisnot.

    (b). Hybrid: The bridges LAN interfaceinspectsthehigh-orderdestination bitandonlyaccepts

    frameswith the bit set. This If is easy to build into H/W andgreatly reduces the number of

    framesthe bridge mustinspect.

    (c). Hardware: The bridges LAN interfacenotonlychecksthehigh-orderdestination bit, butit

    alsoscanstheroutetosee ifthis bridge mustdoforwarding. Onlyframesthat mustactually be

    forwarded are given to the bridge. This implementation requires the most complex H/W but

    wastesno bridge CPU cycles becauseallirrelevantframesarescreenedout.

    In source Routing, every machine in the internet, knows or can find, the best path to

    everyother machine. These routersarediscovered from the basic idea that Ifadestination is

    unknown, thesourceissuesa broadcastframeaskingwhereitis. TheDISCOVERY FRAMEis

    forwarded byevery bridgeso that it reachesevery LAN or the internetwork. When the reply

    comes back, the bridgesrecord their identity in it, sothattheoriginalsendercansee theexact

    routetakenand ultimatelychoosethe bestroute.

  • 8/14/2019 Niet, Guntur

    26/27

    NIET, GUNTUR Medium Access Sub Layer

    26

    DISADVANTAGE: Itsuffersfrom aframeexplosion. ConsideraseriesofLANS connected by

    tripleBridges:

    1. Each discovery frame sent by station 1 is copied by eachof the3 bridgeson LAN1,yielding3discoveryframeson LAN2.

    2. Eachofthese is copied by each ofthe bridgeson LAN2, resultingin9 frameson LAN3.

    3. Bythetimewereach LAN N, 3N-1

    framesarecirculating.

    4. Ifadozensetsofbridgesaretraversed , morethana milliondiscoveryframeswillhaveto beinjectedintothelast LAN, causingseverecongestion.

    Comparison of IEEE 802 bridges:

    S.no Issue Transparent Bridge Source Routing Bridge

    1 Orientation Connectionless Connection orientation

    2 Transparency Fullytransparent Nottransparent

    3 configuration Automatic Manual

    4 Routing Sub optimal Optimal

    5 Locating Backward Learning Discovery frames

    6 Failures Handled by bridges Handled byhosts

    7 Complexity Inthe bridges Inthehosts

    8 Compatibility Compatible Not Compatible

    9 Parallel bridges Notapplicable Applied b/w 2 LANS tosplitthe Load

    10 N/W Management Notneeded N/Wmanagerinstalls LAN & Bridgenumbers

  • 8/14/2019 Niet, Guntur

    27/27

    NIET, GUNTUR Medium Access Sub Layer

    4. Remote Bridges :

    Used toconnect 2 ormoredistant LANS. Forexample , acompany mighthave plantsinseveral

    cities, eachwithitsown LAN. Ideally ,allthe LAND should be interconnectedsothecomplete

    system acts likeone large LAN. Thisgoalcan beachieved by puttinga bridgesoneach LAN

    andconnectingthe bridges pairwisewith point-to-pointlines.

    Example :considerasystem with3 LANS:

    The3 point-to-pointlinesareregardedashostless LANS . Thenwehaveanormalsystem of6

    LANS interconnected by4Bridges.

    Various protocols can be used for Point-to-Point lines:

    y Tochoosesomestandard Data link protocol, puttingcomplete MAC frames in payloadfield.

    y Tostrip offthe MAC headerandtraileratsource bridgeand putwhat is left in payloadfieldofpoint-to-point protocol. A new MAC headerandtrailercanthen begeneratedat

    thedestination bridge.