Tim Hieu Multicast

  • View
    29

  • Download
    6

Embed Size (px)

DESCRIPTION

Tim Hieu Multicast

Transcript

  • Hi Qun Page 1

    I. Khi qut Unicast, Broadcast v Multicast

    1. Unicast.

    Gi s c 3 Host H1, H2, H3 mun nhn mt gi tin t Video Server. Video Server phi gi 3

    gi tin Unicast tng ng cho 3 Host. Nu nh c mt s lng ln cc Host mun nhn thng

    tin, th tng ng phi c tng y gi tin c to ra v truyn trong mng, gy nghn bng

    thng. Do , giao thc Unicast khng thch hp cho m hnh mng ln.

    2. Broadcast

    Khc vi Unicast, trong Broadcast, Video Server ch gi mt gi tin Broadcast. Khi ti cc

    Router (Switch) kt ni trc tip vi cc Host. Cc Router (Switch) nay t ng gi Broadcast ra

    tt c cc Host c kt ni trc tip vi n. iu nay l khng cn thit, bi v trong nhng

    Host , c nhng Host khng mong mun nhn c nhng thng tin ny.

    3. Multicast

    gii quyt nhc im ca Unicast v Broadcast, giao thc Multicast c trin khai. Khi ,

    Video Server s gi ra mt gi tin Multicast, v cc Router ( Switch ) ch forward gi tin ny ti

    cc Host c yu cu mun nhn thng tin ny.

  • Hi Qun Page 2

    II. Nhng iu cn thit trin khai Multicast.

    1. Phi c di a ch dnh ring cho hot ng Multicast.

    Di a ch IP lp D: 224.0.0.0 239.255.255.255

    2. a ch IP Multicast ch c xem nh l mt a ch ch ch khng c xem nh l a

    ch ngun. Khc vi Unicast, a ch ch trong gi Multicast, khng m ta c th mt i

    tng nhn m n ch thng bo rng, gi tin mang mt lu lng Multicast cho mt

    nhm c th.

    3. C ch bo hiu cho vic nhn / khng nhn gi tin Multicast.

    IGMP Internet Group Management Protocol Ver.1, Ver.2, Ver.3

    4. C ch nh tuyn Multicast.

    PIM-DIM, PIM SM, DVMRP, MOSPF

    5. C ch matching gia a ch Multicast layer 3 v a ch Mac- Address.

    Sau y, ta s i tm hiu chi tit giao thc Multicast hot ng nh th no.

    III. Tm hiu v giao thc Multicast

    Gi s rng mt ng dng Video Multicast c ci t ln Video Server dng a ch Multicast

    l 225.5.5.5. Cc Host t H50 -> H100 l nhng Host c ci ng dng Video Multicast v

    mong mun nhn c thng tin t Video Server. Khi , cc Host ny Join vo Group

    225.5.5.5, tc l n mun nhn gi tin Multicast c gi ti a ch 225.5.5.5. Cc Host ny

    thng bo ln Router R2 thng qua giao thc IGMP. ng dng Multicast trn cc Host s tnh

    ton da trn c ch Matching gia a ch Multicast Layer 3 v a ch Layer 2. (Layer 3:

    225.5.5.5 -> Layer 2: 0x0100.5e05.0505). Khi , cc Host s lng nghe gi tin c a ch MAC

  • Hi Qun Page 3

    l 0x0100.5e05.0505. Cc SW2 v SW3 cng xc nh c cc cng ca n c yu cu nhn

    gi tin Multicast thng qua IGMP t cc HOST. V cc Router cng vy, n cng xc nh c

    cc Link c kt ni ti cc Switch (Host) c yu cu nhn gi tin Multicast cho mt Group.

    Tm li, ng i ca gi tin Multicast trn s trn nh sau:

    Gi tin Multicast t Video Server ti R1, R1 forward gi tin ny ti R2. R2 nhn thy hai ng

    Link kt ni ti SW2 v SW3 u c cc Host mun nhn gi tin Multicast. Nn n gi gi tin

    Multicast ra c hai Link ny, ng thi tin ton a ch MAC da trn a ch IP Multicast.

    Sau , cc SW2 v SW3 s forward cc gi tin ny ra khi cc cng c Host mun nhn gi tin

    Multicast vi a ch Mac Address c tnh. Khi gi tin ti cc Host, Host so snh a ch

    Mac so vi a ch Mac c tnh trn ng dng.

    1. Tm hiu giao thc IGMP Internet Group Management Protocol

    - Giao thc IGMP dng thng bo cho Multicast Router cc Host mun nhn lu lng

    Multicast

    - Dng thng bo cho Multicast Router rng Host mun ri khi nhm, khng mun nhn lu

    lng Multicas na.

    Router dng IGMP lu gi thng tin v cc Multicast Group m n cn forward v cc Port

    (Interface) kt ni vi Host mong mun nhn gi tin Multicast cho Group . IGMP s t ng

    c bt khi cu hnh Multicast Routing trn Router.

    Trong bi vit ny, ta tp trung vo giao thc IGMP Ver.2 v mt s c im quan trng trong

    IGMP Ver.3

    1.1 IGMP Verson 2

    Type: 8 BIT

    - Membership Querry: Dng Router Multicast xc nh cc Gourp Multicast hin din trn cc Subnet ( Interface). Mt Membership Querry s thit lp a ch trong trng

    Group Address v 0.0.0.0. V mt Group-Specific Querry s thit lp a ch trong Group

    Address l a ch Multicast ca nhm c Querry.

    - Membership Report: Dng Group Member ( Host) thng bo cho Router nhng Multicast Group ang hin din trn Subnet ( Interface)

    - Leave Group: Dng Group Member thng bo cho Router rng n mun ri khi Group .

  • Hi Qun Page 4

    Cc bc trao i gi tin IGMP gia Host v Router.

    B1. Tin trnh Query

    Router R1 gi mt gi tin Membership Query ra tt cc cc Interface ca n xc nh cc Multicast Group. Cc gi tin ny c a ch tng ng nh sau:

    - Destination: IP Address 224.0.0.1 v Mac Address 01.00.5e.00.00.01

    - Source Address: a ch IP v Mac ca cc Interface tng ng.

    Gi s H1 v H3 c ci t ng dng Multicast v ang mong mun nhn lu lng trn a ch Multicast l 226.1.1.1 , tng ng vi Mac l

    01.00.5e.01.01.01. Do , n lng nghe cc bn tin Querry trn hai a Multicast

    Mac Address l 01.00.5e.00.00.01 v 01.00.5e.01.01.01.

    B2. Tin trnh Report.

    Khi nhn c bn tin Query, nhng Host mun nhn lu lng Multicast cho mt Group c th

    s gi bn tin Report tr li cho Router. Tuy nhin, nu tt c cc Host cng gi mt tin Query

    th s gy ra s lng ph bng thng ( trong trng hp ny l H1 v H3). Do , cc Host s s

    dng c ch x l l MRT Maximum Reponse Time. Gi tr ny c c la chn ngu

    nhin bi cc Host.

    C ch ny hot ng nh sau:

  • Hi Qun Page 5

    - Gi s H1 v H3 nhn c mt bn tin IGMP Querry t Router. Do c hai Host ny cng tham gia vo Group 226.1.1.1. Nn chng cn phi gi mt IGMP Report, Gi s

    H1 v H3 nhn gi tr MRT tng ng l 3 v 1.

    - H3 c gi tr MRT nh hn H1, nn n gi mt bn tin IGMP Report vi Dest IP Address: 226.1.1.1, Dest Mac Address: 01.00.5e.01.01.01. Source IP Address: 10.1.1.3.

    Group Address: 226.1.1.1 thng bo cho Multicast Router rng n mun nhn lu

    lng Multicast cho group ny.

    - Gi tin Report ca H3 c s c gi ti Router 1, v H1. H1 nhn thy gi tin Report t

    R3 c cng Multicast Group vi mnh nn n s khng gi thm bn tin Report na.

    - Router R1 nhn c bn tin Report cho group Multicast 226.1.1.1 trn Interface Fa0/0. Nn n s bt u Forward cc gi tin Multicast cho group 226.1.1.1 ra cng Fa0/0

  • Hi Qun Page 6

    B3. Tin trnh Join Group ca Host mi.

    - Gi s rng H4 mun tham gia vo Group 226.1.1.1. N s gi mt bn tin Report v tng t nh B2. Router R1 s bt u Forward cc gi tin Multicast cho group

    226.1.1.1 ra cng Fa0/1

    B4. Tin trnh Leave Group.

    - Gi s H3 mun Leave khi Group 226.1.1.1. N s gi mt bn tin IGMP Leave ti Dest IP Add: 224.0.0.2. Khi Router nhn c bn tin Leave, n s gi mt bn tin

    Specific-Group Querry xc nh xem cn Host no mun nhn lu lng Multicast

    cho Group 226.1.1.1 khng. Nu c, n s tip tc Forward, cn nu khng, n s ngng

    Forward lu lng.

    1.2 IGMP Verson 3.

    Giao thc IGMP Version 3 c ci tin hn Verson 2 ch, n cho php lc Source Multicast i

    vi cng mt Group. Chng hn nh:

    Trong bn tin IGMP Report Ver.3. c thm mt trng, cho php H1 thng bo vi Router

    Multicast rng n ch mun nhn lu lng Multicast cho Group trn mt ngun Multicast

    c ch nh. Tnh nng ny gi l SSM Source Specific Multicast.

    1.3 LAN Multicast Optimize

    y l tin Switch trao i, lu gi thng tin v cc Group Multicast, cc Router, cc Host cn

    n foward gi tin.

    1. CGMP Cisco Group Management Protocol

    Router kt ni vi Switch chu trch nhim thng bo cho Switch cc Host (Mac Address)

    mong mun nhn lu lng Multicast cho mt group c th thng qua cc bn tin CGMP

    Join

  • Hi Qun Page 7

    2. IGMP Snoop

    Switch s t ng hc cc thng tin thng qua cc bn tin IGMP trao i gia Router, Host

    3. RPMP - Router Port Management Protocol

    Khc phc khuyt im ca IGMP Snooping. Switch s qun l cc Router kt ni vi n

    theo Group Multicast, forwar cc gi Multicast, trnh chuyn tip tha

    Hin ti mng VN2 ang s dng giao thc IGMP Version 3.

    Vi khai bo SSM nh sau:

    ip igmp ssm-map static SSM-RANGE 123.29.128.4

    ip igmp ssm-map static SSM-RANGE 123.29.128.5

    ip access-list standard SSM-RANGE

    III. Giao thc nh tuyn Multicast

    Nh chng ta c bit, chc nng c bn ca mt Router l Forward cc gi tin IP, da trn a

    cha Dest v Source ca gi tin . Khi nhn c mt gi tin Unciast, Router s cn c vo a

    ch Dest, tra bng nh tuyn Unicast tm ra c Next-hop v s forward theo Next-Hop .

    i vi gi tin Multicast m Router nhn c, do trong bng nh tuyn ca Router khng tn

    ti a ch IP Multicast , nn n s khng th forward gi tin Multicast c.

    c th forward c gi tin Multicast, Router chy cc giao thc nh tuyn Multicast nh

    Dense Mode & Sparse Mode. Phn tip theo, s trnh by chi tit v cc giao thc nh tuyn

    Multicast ny.

    1. Multicast Fowarding Dense Mode: Trong giao thc nh tuyn Multicast Dense Mode.

    Router mc nh s gi gi tin ra tt c cc Interface c cu hnh nh tuyn Multicast, tr

    Interface m n nhn c gi tin Multicast ngn nga Loop xy ra. Cc giao thc nh tuyn

    Dense Mode c s dng l DVMRP, PIM-DM, MOSPF. Dense Mode c s dng khi tt

    c c Subnet ca Router u c cc Host mong mun c nhn cc gi tin Multicast.

    2. RPF- Reverse Path Forwarding: Hiu khi qut, RPF dng la chn Source Multicast.

    Gi s Source S1 gi mt gi tin Multicast cho Router R1. R1 s flood gi tin Multicast ny

    sang R2, R3. Tip , R2 cng tip tc flood gi tin Multicast ny qua Router R3. Nh vy, R3

    s nhn c hai gi tin Multicast t S1 v R2. Nh thng l, nu khng s dng RPF check,

    R3 s tip tc flood gi tin ny sang R2 v S1, v tip tc nh vy s c nhiu gi tin Multicast

    c truyn trong mng, to nn mt vng loop. Do , RPF c s dng ngn nga iu

    ny. Cc gi tin Multicast s khng c forward qua Router nu khng qua RPF check.

    Quy trnh RPF check nh sau:

  • Hi Qun Page 8

    Gi s R3 nhn c mt gi ti