Click here to load reader

Chapter3 [compatibility mode]

  • View
    11

  • Download
    3

Embed Size (px)

Text of Chapter3 [compatibility mode]

  • 1Hanoi University of Technology Faculty of Electronics and Telecommunications

    2008 Chng 3Chng 3. Kt ni mng lp 2 - tng lin kt d liu

    Tng lin kt d liu Chc nng ca tng lit kt d liu (DLL) a ch MAC v tnh cht Phng php framing iu khin lung Kim sot li Cc giao thc ca tng lin kt d liu: HDLC v PPP Bridge: transparent v sourouting

    Hanoi University of Technology Faculty of Electronics and Telecommunications

    2008 Chng 3Chng 3. Kt ni mng lp 2 - tng lin kt d liu

    Chc nng ca tng lin kt d liu Kh nng truyn khung tin cy trn ng lin kt vt l khng tin cy

    Application Layer

    Presentation Layer

    Session Layer

    Transport Layer

    Network Layer

    Data Link Layer

    Physical Layer

    Source node

    Network Layer

    Data Link Layer

    Physical Layer

    Application Layer

    Presentation Layer

    Session Layer

    Transport Layer

    Network Layer

    Data Link Layer

    Physical Layer

    Destination node

    Intermediate node

    Packets

    Frames

    Bits

  • 2Hanoi University of Technology Faculty of Electronics and Telecommunications

    2008 Chng 3Chng 3. Kt ni mng lp 2 - tng lin kt d liu

    o Destination address Single Group Broadcast: 1111

    o Addresses Local or global

    o Global addresses (246 possible) First 24 bits assigned to vendors (OUI) Next 24 bits assigned by vendors CISCO: 00-00-0C 3COM: 02-60-8C

    a ch MAC v tnh cht: IEEE 802.3 MAC Frame

    Hanoi University of Technology Faculty of Electronics and Telecommunications

    2008 Chng 3Chng 3. Kt ni mng lp 2 - tng lin kt d liu

    Phng php Framing DLL t chc bit stream thnh cc frame Bt u v kt thc ca frame c xc nh: Character count, control

    character, flag, Character count

    o S k t c ch ra trong v tr xc nh ca headero Bn nhn m s k t xc nh ni kt thc frame o V d: DDCMP (Digital data comm. message protocol)

  • 3Hanoi University of Technology Faculty of Electronics and Telecommunications

    2008 Chng 3Chng 3. Kt ni mng lp 2 - tng lin kt d liu

    Control charactero Mi frame bt u v kt thc vi chui k t c bit

    V d: bt u vi DLE STX (data link escape start of text) v kt thc vi DLE ETX (end of text)

    o Phn d liu phi l s nguyn ln cc k to Character stuffing: chn DLE trc mi k t DLE trong d liu,

    ngn chn kh nng xut hin cc k t bt u v kt thc xut hin bn trong frame

    V d: BISYNC

    STX: 0x02, ETX: 0x03 DLE: 0x01 (non-printable)

    Hanoi University of Technology Faculty of Electronics and Telecommunications

    2008 Chng 3Chng 3. Kt ni mng lp 2 - tng lin kt d liu

    Flaggingo Mi frame bt u v kt thc bng chui k t c bit flago Flag byte: 01111110 (0x7E)o Phn d liu ca frame c th cha s bit bt ko Bit stuffing: chn bit 0 vo sau mi chui 5 bit 1 lin tipo V d: SDLC, HDLC, LAPB

    01111110111101011111011110111110001111110Flag FlagFrame

  • 4Hanoi University of Technology Faculty of Electronics and Telecommunications

    2008 Chng 3Chng 3. Kt ni mng lp 2 - tng lin kt d liu

    iu khin lung (flow control) Khi nim iu khin lung

    o Kch thc b m lu gi cc frame nhn c bi gii hno Trn b m c th xy ra nu tc x l ti pha thu chm hn

    tc truyn frameo iu khin lung ngn chn trn b m bng cch iu khin tc truyn dn t pha pht (Tx) n pha thu (Rx)

    o Cc phng php ph bin: X-ON/X-OFF Stop and wait Sliding window

    Hanoi University of Technology Faculty of Electronics and Telecommunications

    2008 Chng 3Chng 3. Kt ni mng lp 2 - tng lin kt d liu

    Transmitter ReceiverX-OFF

    X-ON/X-OFFo Rx truyn X-OFF (DC3) nu b m yo Tx dng truyn khi nhn c X-OFFo Rx truyn X-ON (DC1) khi b m c gii phngo Tx bt u truyn li khi nhn c X-ONo C th s dng cc frame RR (Receive Ready) v RNR (Receive

    not Ready)o Nu s bit trong b m vt qu ngng 2tpropR, X-OFF c

    gi ti Txo Phng php: Stop-and-wait, sliding window

    X-ON

    Threshold

  • 5Hanoi University of Technology Faculty of Electronics and Telecommunications

    2008 Chng 3Chng 3. Kt ni mng lp 2 - tng lin kt d liu

    o Stop-and-wait Tx ngng truyn frame tip theo cho n khi nhn c ACK

    t Rx

    Rx truyn frame ACK khi sn sng nhn frame tip theo n gin, nhng khng hiu qu khi tr p ng ng

    truyn ln

    Data

    DataACK

    ACK

    Tx Rx

    tframetpropT

    12a1

    t2ttU

    frameprop

    frame

    +=

    +=

    Utilization:

    R / Lv / d

    tt

    a frame

    prop==,

    Satellite link: tprop = 270 ms, L = 500 byteR = 56 kbps tframe = 4/56 = 71 ms, a = tprop / tframe = 270/71 = 3.8, U = 0.12 = 12% ca 56 kbps

    Short link: tprop = 5 s, L = 500 byteR = 10 Mbps tframe = 4k/10 M = 400 s, a = tprop / tframe = 5/400 =0.012 U = 0,98 = 98% ca 10 Mbps

    Hanoi University of Technology Faculty of Electronics and Telecommunications

    2008 Chng 3Chng 3. Kt ni mng lp 2 - tng lin kt d liu

    o Sliding window Window WS bng kch thc b m ca bn nhn c th s

    dng nhn cc frame lin tip t Tx khng cn ACK C th trnh hin tng trn b m ca Rx Phi chn WS ln hn a (delay of bandwidth)

    0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 70 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7

    0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 70 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7

    0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 70 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7

    0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 70 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7

    F0F1F2

    ACK3

    ACK6

    F3F4F5F6

    System A System B

  • 6Hanoi University of Technology Faculty of Electronics and Telecommunications

    2008 Chng 3Chng 3. Kt ni mng lp 2 - tng lin kt d liu

    +