osi reference model_layer 2 hardware

Upload: saychetdemnay

Post on 03-Jun-2018

223 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 OSI Reference Model_Layer 2 Hardware

    1/3

    OSI Reference Model: Layer 2 Hardware

    In my last article, I introduced the Open System Interconnect (OSI) reference model an

    discussed it's first layer; the Physical Layer. In this article I will discuss the second layer, th

    Data Lin Layer, from a hardware perspecti!e.

    "he data lin layer pro!ides functional and procedural methods of transferrin# da

    $etween two points. "here are fi!e #eneral functions which the Data Lin layer is responsi$for. "hese functions are%

    Lo#ical Lin &ontrol

    edia ccess &ontrol

    Data ramin#

    ddressin#

    *rror Detection

    Logical Link Control

    "he Lo#ical Lin &ontrol (LL&) is usually considered a su$layer of the Data Lin laye(DLL), as opposed to a function of the DLL. "his LL& su$layer is primarily concerned wit

    multiple+in# protocols to $e sent o!er edia ccess &ontrol (&) su$layer. "he LL& doe

    this $y splittin# up the data to $e sent into smaller frames and addin# descripti!e informatio

    to these frames, called headers.

    Media Access Control

    Lie LL&, the edia ccess &ontrol (&) is considered a su$layer of the DLL, as oppose

    to a function of the DLL. Included in this su$layer is what is nown as the & address. "h

    & address pro!ides this su$layer with a uniue identifier so that each networ acce

    point can communicate with the networ. "he & su$layer is also responsi$le for th

    actual access to the networ ca$le, or communication medium.

    Data Framing

    If one were to simply send data out onto the networ medium not much would happen. "h

    recei!er has to now how, and when, to read the data. "his can happen in a num$er of way

    and is the sole purpose of framin#. In #eneral terms, framin# or#ani-es the data to $

    transferred and surrounds this data with descripti!e information, called headers. hat, anhow much, information these headers contain is determined $y the protocol used on th

    networ, lie *thernet.

    "he structure of a frame adherin# to the *thernet protocol is shown $elow in i#ure /.

  • 8/12/2019 OSI Reference Model_Layer 2 Hardware

    2/3

    Figure 1:Structure of an *thernet frame (&ourtesy% iipedia)

    Addressing

    ddressin# in layer 0 happens, as I mentioned earlier, with the & address of the

    su$layer. It is !ery important not to confuse this with networ or IP addressin#. It can $

    helpful to associate the & address with a specific networ access point and the networ o

    IP address associated with an entire de!ice (i.e. a computer, ser!er, or router).

    Speain# of routers, eep in mind that routers operate in layer 1, not layer 0. Switches an

    hu$s do operate in layer two, and therefore direct data $ased on layer 0 addressin# (

    addresses) and are unaware of IP or networ addressin#. nd, 2ust so that I don't #et an in$ofilled with complaints ... yes I now... some routers also include layer 0 functionality. I wi

    discuss routers with layer 0 functionality in another future article.

    Error Detection and Handling

    hene!er data is sent o!er any ind of transmission medium, there e+ists a chance that th

    data will not $e recei!ed e+actly as it was sent. "his can $e due to many factors includin

    interference and, in the case of lon# transmissions, si#nal attenuation. So, how can a recei!

    now if the data recei!ed is error free3 "here are se!eral methods that can $e implemented taccomplish this. Some of these methods are simple and somewhat effecti!e 4 others ar

    complicated and !ery effecti!e.

    Parity $its are an e+ample of an error detection protocol that is simple and, despite its limite

    effecti!eness, its use is widespread. parity $it, simply put, is an e+tra $it added to

    messa#e. "here are two options for the !alue of this $it. hich !alue is chosen depends o

    the fla!or of parity $it detection that is in use. "hese two fla!ors are e!en and odd parit

    detection. If e!en parity is in use, then the parity $it is set to the !alue ('/' or '5') to mae th

    num$er of '/'s in the messa#e e!en. Liewise, if odd parity is in use the parity $it is set to th

    !alue needed to mae the num$er of '/'s in the messa#e odd.hen usin# parity $it error detection the recei!er will chec all '/'s in the frame, includin

    the parity $it. "he recei!er will ha!e a settin# for e!en or odd parity; if the num$er of '/'s

    the frame does not match this settin#, an error is detected. 6ow this is #reat, $ut as

    mentioned earlier the effecti!eness of this error detection method is limited. It is limite

    $ecause if there is an e!en num$er of errors in the frame then the e!enness or oddness of th

    num$er of '/'s will $e maintained and this method will fail to detect any errors 4 thus the nee

    for a more ri#orous error detection method.

  • 8/12/2019 OSI Reference Model_Layer 2 Hardware

    3/3

    checsum error detection method can #i!e us more ri#or especially if used with a parity $

    method. checsum method, as its name su##ests, will $asically chec the sum of all the '/

    in a messa#e and chec that !alue a#ainst the checsum !alue added $y the sender to th

    messa#e. hile a checsum method can pro!ide more ri#or to your error detection effort

    there are still limitations. or e+ample, a simple checsum cannot detect an e!en num$er o

    errors which sum to -ero, an insertion of $ytes which sum to -ero, or e!en the re7orderin# o

    $ytes in the messa#e. hile there are some more ad!anced implementations of the checsummethod, includin# letcher's checsum method, I will discuss an e!en more ri#orous metho

    here.

    One of the most ri#orous methods of error detection is the cyclic redundancy chec (&8&

    hat a &8& does is con!ert the messa#e to a polynomial where the !alue of the coefficien

    correspond to the $its in the messa#e and then di!ide that polynomial $y a predetermined, o

    standard, polynomial called a ey. "he answer, more specifically the remainder part of th

    answer, is what is sent alon# with the messa#e to the recei!er. "he recei!er performs th

    same polynomial di!ision with the same ey and then checs the answer. If the answe

    match, then the chances are pretty #ood that there were no errors. I say pretty #ood $ecausthere are a lot of possi$le polynomials one could use for a ey and not all polynomia

    pro!ide eually #ood error detection. s a #eneral rule, lon#er polynomials pro!ide $ette

    error detection $ut the mathematics in!ol!ed with this are uite comple+ and as with man

    aspects of technolo#y there is some de$ate as to which implementations of this metho

    pro!ide the $est error detection.

    Lastly, I would lie to point out that these error detection methods are not limited t

    transmissions of data o!er a networ medium; they can $e used eually well in a data stora#

    scenario where one wants to chec that the data has not $een corrupted.

    In my ne+t article I will discuss layer 1 of the OSI model. I will also e+plain in a little mordetail why routers (mostly) $elon# in the 1rd layer and not the 0nd.

    OSI Reference Model: Layer 2 hardware [http://windownetwor!ing"co#$"