Top Banner

of 52

Advanced Networks Lectur 5.Pptx

Jun 01, 2018

Download

Documents

Israr Ahmad
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    1/52

    AdvancedComputerNetworks

    Lecture #5

    Instructor: Dr. Niamat Ullah

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    2/52

    - 1DirectLinkNetworks

    1. PhysicalConnectingHosts

    2. ( )HardwareBuildingBlocks Nodesand Links

    3. ( , , , 4 /5 )Encoding NRZ NRZ !anchester B B4. "raming

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    3/52

    DataLinkLayer

    Di#erent$unctionsatthelinklevel

    Encoding

    "raming

    /Errordetection correctionRelia%ledelivery

    !ediaaccesscontrol

    3

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    4/52

    -Directly Connected Networks

    oi t to poi t li ks: Eachnodeisdirectly

    connectedtoallothersviaalink

    ultiple ccess

    :Allnodessharethesamephysical

    medium

    4

    - -point to point

    multipleaccess

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    5/52

    Physical!edium

    &ignalstravelthroughthemediumandrepresent%its

    &hannon'sCapacity(heorem

    C=Blog2(1+S/N)

    De)nesthe upper%ound onthelinkcapacityCinH*

    -Can %eusedtoevaluatethe +error $ree,%andwidth o$a line

    5

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    6/52

    :&hannon's(heorem E-ample

    - :.oice grade phoneline B=3,300 -300 = 3H* /H*

    = 30(ypical&NR d ,B where

    d = 10B - log10(S/N)

    30"or d%S/N=1,000

    C= 3,000 -log2(1+1,000) 300 /%ps

    Higher%andwidthB( ),inH* highercapacity

    6

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    7/52

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    8/52

    :Encoding !ore&chemes ( )NRZ nverted NRZ : 1&witch$romcurrentstatetorepresenta

    1 ,(hissolves thepro%lemo$consecutive s %uto%viouslydoes nothing $or0 .consecutive s

    !anchesterEncoding: 12Rthe%itstreamwiththeclock

    0 1 ,Because %oth s and s result ina transitiontothe signal the clock can %e

    .e#ectivelyrecoveredatthereceiver

    8

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    9/52

    (he pro%lem withthe !anchesterencodingschemeisthatitdou%lestherateatwhichsignal

    ,transitionsaremadeonthelink whichmeansthatthereceiverhashal$thetimetodetecteachpulseo$

    .the signal (he rateatwhich the signalchanges iscalledthelink's baudrate.

    ,nthecaseo$the!anchesterencoding the%itrate ,ishal$the%audrate sotheencodingisconsidered

    50% .only e3cient

    9

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    10/52

    4 /5B B Encoding &cheme'ncode ()it s"mols into 5)it codes

    * &nal encoding that !e consider, called 4B/5B, attemptsto address the ine%cienc" of the +anchester encoding!ithout suering from the prolem of having e-tendeddurations of high or lo! signals.

    'ach code!ord has no more than one starting ero, and

    no more than t!o trailing erosNo more than /)conse0utive eros

    The idea of (1251 is to insert e-tra its into the itstreamso as to reak up long se0uences of $s or s.

    Then use N34I to solve the consecutive s prolem

    $6 e%cienc" 7 it is overhead8

    10

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    11/52

    4 /5E-ample o$ B B Encoding4-bit data

    symbol

    5-bit code 4-bit data

    symbol

    5-bit code

    $$$$ $ $$$ $$$

    $$$ $$$ $$ $$

    $$$ $$$ $$ $$

    $$ $$ $ $

    $$$ $$$ $$ $$

    $$ $$ $ $

    $$ $$ $ $$

    $ $ $

    11

    Thus, when sent back-to-back, no pair of 5-bit codes results in more than three

    consecutive 0s being transmitted. The resulting 5-bit codes are then transmitted

    using the NR! encoding, which e"plains wh# the code is onl# concerned about

    consecutive 0s$NR! alread# solves the problem of consecutive %s.

    The &'(5' encoding results in )0* efficienc#.

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    12/52

    "raming

    ( )(heprocess o$grouping%itsinto$rames messages orpackets

    (ypicallyimplemented%ythenetworkadaptor

    ?4hy$rames

    12

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    13/52

    -Byte 2riented"raming

    :B&5NC Binarysynchronouscommunication

    "rameisacollectiono$%ytesNeedtoindicatethe%eginningandendo$a$rame

    &entinelcharactersareused

    :&5N &ynchroni*ationcharacter

    :&2H &tarto$header

    , : ,&(1 E(1 &tarto$te-t Endo$te-t

    :CRC Cyclicredundancycheck

    13

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    14/52

    -Pro%lem withByte oriented"raming

    'T9 ma" occur in the pa"load

    recede it !ith a DL' 7data)link)escape8 character

    rolem propagates, precede DL' !ith anotherDL' 7e-tra overhead8

    oint)to)oint 78 protocol used " I

    ;T9: $$

    a"load: ,5$$ "tes

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    15/52

    -Byte counting"raming

    #nclude the o$ %ytesin the $rame asa )eld intheheader

    ( )DigitalData CommunicationsProtocol DDC!P

    : #Count &peci)es o$%ytesinthe %ody

    CRCensuresthatcount)eldisnotcorrupted

    15

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    16/52

    -Bit oriented"raming

    - ( )High Level DataLinkControl HDLC

    / , : 01111110Beginning end o$$rame 6ag

    nsteado$inserting%ytesdo%itstu3ng

    0 1&enderaddsa a$ter )veconsecutive s

    1Receiverremoves*eroa$ter)ve s

    16

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    17/52

    -E-ample o$ Bit stu3ng;ender

    $ $ $

    3eceiver $ $ $ $ $ $$

    17

    $ $ $ $

    - - - -

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    18/52

    11DirectLinkNetworks7

    1. ErrorDetection

    2. ( 802.3)Ethernet EEE

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    19/52

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    20/52

    Single bit errorsare the leastlikelyt"pe of errors in serial data

    transmission ecause the noisemust have a ver" short duration!hich is ver" rare.

    Example:Example:

    If data is sent at +ps then eachit lasts onl" 2,$$$,$$$ sec. or >s.

    ?or a single)it error to occur, thenoise must have a duration of onl" >s, !hich is ver" rare.

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    21/52

    The term burst errorburst errormeans thatt!o or more its in the data unit

    have changed from to $ or from $to .

    Burst errorsdoes notnecessaril"mean that the errors occur inconsecutive bits, the length of theurst is measured from the &rst

    corrupted it to the last corruptedit. ;ome its in et!een ma" nothave een corrupted.

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    22/52

    Burst error is most likely to happenin serial transmissionsince the

    duration of noise is normall" longer thanthe duration of a it.

    The numer of its aected depends onthe data rate and duration of noise.

    Example:Example:If data is sent at rate @ Aps then a noise of

    2$$ sec can aect $ its.72$$B$$$8

    If same data is sent at rate @ +ps then a noiseof 2$$ sec can aect $,$$$ its.72$$B$C8

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    23/52

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    24/52

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    25/52

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    26/52

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    27/52

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    28/52

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    29/52

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    30/52

    Checksum

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    31/52

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    32/52

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    33/52

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    34/52

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    35/52

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    36/52

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    37/52

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    38/52

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    39/52

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    40/52

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    41/52

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    42/52

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    43/52

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    44/52

    802.3 Ethernet

    Carrier-sense multiple access with collision detection(CSMA/C!.

    CS = carrier sense

    MA = multiple access

    CD = collision detection"ase Ethernet standard is #0 M$ps.

    100Mbps, 1Gbps, 10Gbps standards came later

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    45/52

    Ethernet CSMA/C

    CSMA/C (carrier sense multiple access with collisiondetection! media access protocol is used.

    Data is transmitted in the form of packets.

    Sense channel prior to actual packet transmission.

    Transmit packet onl if channel is sensed idle! else,defer the transmission until channel becomes idle.

    After packet transmission is started, the node monitorsits o"n transmission to see if the packet has

    e#perienced a collision.$f the packet is obser%ed to be under&oin& a collision,the transmission is aborted and the packet isretransmitted after a random inter%al of time usin&'inar (#ponential 'ackoff al&orithm.

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    46/52

    CSMA/C (Ctnd..!

    After first collision, each station "aits for 0 or 1 slot beforetrin& a&ain.

    After second collision, the pick either 0, 1, ), or * slots atrandom to "ait.

    After *rd. collision, number of slots to "ait is bet"een 0 and )*+1.

    $n &eneral, after $ collisions, "ait is bet"een 0 and ) i 1.

    After 10 collisions, randomi-ation inter%al fro-en at 10)*slots.

    After 1 collisions, error/

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    47/52

    Ethernet %rame Structure

    &ream$le'

    btes "ith pattern 10101010 follo"ed b one bte "ithpattern 10101011

    sed to snchroni-e recei%er, sender clock rates

    Addresses' btes, frame is recei%ed b all adapters on a2A3 and dropped if address does not match

    en)th') btes, len&th of Data field

    C*C'4 btes &enerated usin& C5+*), checked at recei%er, iferror is detected, the frame is simpl dropped

    ata &a+load'Ma#imum 1600 btes, minimum 4 btes$f data is less than 4 btes, pad "ith -eros to 4 btes

    2en&th

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    48/52

    Ethernet&h+sical Media '-

    10 'ase6 + Thick Co+a#ial Cable "ith 'us Topolo&

    10 'ase) + Thin Co+a#ial Cable "ith 'us Topolo&

    10 'aseT + T7 Cat *86 "ith Tree Topolo&

    10 'ase92 + Multimode8Sin&lemode 9iber "ith Tree

    Topolo&

    Ma,imum Se)ment en)th

    10 'ase6 + 600 m "ith at most 4 repeaters :se 'rid&e to e#tend the net"ork;

    10 'ase) + 1

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    49/52

    %ast Ethernet

    #00 M$ps $andwidth

    ses same CSMA/C media access protocol and packetormat as in Ethernet.

    #00"ase (&! and #00"ase% (%i$er! standards

    &h+sical media '-

    100 'aseT + T7 Cat 6e

    100 'ase9 + Multimode 8 Sin&lemode 9iber

    %ull uple,/1al uple, operations.

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    50/52

    %ast Ethernet

    &roision or Auto-e)otiation o media speed'#0 M$ps or #00M$ps (popularl+ aaila$le or coppermedia onl+!.

    Ma,imum Se)ment en)th#00 "ase - #00 m

    #00 "ase % - 2 4m (Multimode %i$er!

    #00 "ase % - 20 km (Sin)lemode %i$er!

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    51/52

    5i)a$it Ethernet

    # 5$ps $andwidth.

    ses same CSMA/C media access protocol as in Ethernetand is $ackward compati$le (#0/#00/#00 modules areaaila$le!.

    #000"ase (&!6 #000"aseS (Multimode %i$er! and#000"ase (Multimode/Sin)lemode %i$er! standards.

    Ma,imum Se)ment en)th

    1000 'ase T + 100m :Cat 6e8;

    1000 'ase S + )6 m :Multimode 9iber;1000 'ase 2 + 61) m :Multimode 9iber;

    1000 'ase 2 + )0 >m :Sin&lemode 9iber;

    1000 'ase 2? + m :Sin&lemode 9iber;

  • 8/9/2019 Advanced Networks Lectur 5.Pptx

    52/52

    #0 5i) Ethernet

    #0 5$ps $andwidth.

    ses same CSMA/C media access protocol as in

    Ethernet.

    &ropositioned or Metro-Ethernet

    Ma,imum Se)ment en)th

    10G'ase+25 + 10 >m :Sin&lemode 9iber;

    10G'ase+(5 + 40 >m :Sin&lemode 9iber;