Está en la página 1de 4

4.2 Phn on v ti hp 4.2.

1 IPv6 Datagram size, MTU, Fragment & Reassembly IP c nhim v truyn cc gi tin qua h tng mng. Khi mt n v d liu (Datagram) truyn gia cc Host trn mng, n phi i qua tng Router, qua nhiu kt ni vt l. Cc gi tin ny c ng vo cc Frame Datalink Layer. c th truyn thnh cng mt n v d liu t u ny n u kia, kch thc ca mi n v d liu phi ph hp vi kch thc ti a m h tng mng bn di c th x l c. Gii hn ny gi l Maximum Transfer Unit (MTU). Mi lin kt trn mng c trng bi gi tr MTU ny. Nu mt Datagram c kch thc ln hn gi tr MTU ca mng (cc lin kt trn mng t ngun n ch), Datagram ny phi c chia thnh nhng on nh hn. Qu trnh ny gi l phn on (Fragmentation). Cc on ny c ti hp trm ch. y l vn quan trng i vi c IPv4 ln IPv6. Tuy nhin, khi ng dng cho IPv6, c mt s thay i quan trng trong giao thc. Nhng thay i ny th hin r nt nht cch thc Fragment v Reassembly c thc hin. Nhng s thay i ny nhm mc ch nng cao hiu qu ca qu trnh nh tuyn, cng nh kh nng hot ng n nh ca mng. C th nh sau: - Tng gi tr MTU mc nh: Vi IPv4, gi tr MTU ti thiu mc nh l 576 byte. Vi IPv6, gi tr ny l 1280 byte, gp i so vi IPv4. Nh m c th nng cao hiu qu ca vic truyn tin do ci thin c t s v hn ch tn sut phn on. HeaderLength -----------------MaximumPayload - Hn ch vic phn on trn tng Router: Vi IPv4, mt Datagram c th c phn on bi trm ngun hoc cc Router trung gian trn route t ngun n ch. i vi IPv6, qu trnh phn on cc gi tin ch xy ra ti trm ngun, cc Router khng thc hin qu trnh ny. Trm ngun phn on cc gi tin va vi kch thc MTU ti thiu trn ton tuyn (MTU ny c pht hin nh Path MTU Discovery Protocol) v cc on ny c ti hp li ti trm ch. - MTU size error feedback: Trong IPv6, do Router khng can thip vo qu trnh phn on cc gi tin, do , khi gp gi tin c kch thc ln hn MTU, Router buc phi loi b gi. Router c mt c ch phn hi (feedback) dng ICMPv6 thng bo cho trm ngun bit li ny. C ch ny ng vai tr quan trng trong Path MTU Discovery. - Path MTU Discovery: y l giao thc gip cho trm ngun xc nh kch thc MTU ti thiu ca ton tuyn. Da vo trm ngun c th phn on cc gi tin vi kch thc thch hp. Giao thc ny c nh ngha cho IPv4 nhng c ti nh ngha cho IPv6.

4.2.2 Quy tc phn on Source only trong IPv6 i vi IPv4, Node ngun c th gi i cc gi tin vi kch thc bt k trong phm vi cho php ( MTU trn Local-link ca n). Trn ng n ch, cc gi c th i qua nhiu Router trung gian. Nu cc Router ny nhn thy kch thc cc gi ny ln hn MTU cho php trn Local-link ca Router, cc Router ny thc hin phn on cc gi tin. Trn thc t qu trnh ny xy ra tim n trn mng, khng th gim st c. Chnh iu ny nh hng n phm cht ca vic nh tuyn cc gi tin. Do phi x l cc gi tin, Router chuyn cc gi tin chm hn so vi thng thng. Qu trnh phnn on ny c th xy ra ti nhiu Node trn mng, lm cho cc gi tin b x vn, dn n HeaderLength -------------------MaximumPayload tng ln. i vi IPv6, Host ngun dng Path MTU Discovery Protocol pht hin MTU thch hp cho ton tuyn (y chnh l gi tr MTU nh nht trong s cc MTU ca cc Local-link trn ton tuyn t ngun n ch). Nguyn l hot ng ca Path MTU Discovery Protocol s c m t di. Sau khi xc nh c MTU thch hp, Host ngun s tin hnh phn on cc gi tin vi kch thc ph hp vi MTU , cc Router khng cn phi can thip vo cc gi tin ny na. Do , khc phc c mt s nhc im ca IPv4. 4.2.3 Xc nh kch thc thch hp cho cc Datagram C hai cch Host ngun xc nh kch thc ph hp cho cc gi tin dng IPv6: - Dng MTU mc nh: cch ny l n gin nht, Host ngun ch cn dng MTU mc nh ti thiu l 1280 byte. Vi gi tr ny tt c cc Router u c th x l gi tin m khng gp bt k trc trc no v vn kch thc ca cc Datagram v y l gi tr ti thiu. Cch ny n gin nhng cha tht s mang li hiu qu. Cch ny ch ph hp vi vic truyn d liu trong phm vi nh, vi lu lng d liu thp. - Dng Path MTU Discovery Protocol: cch ny c s dng ph bin hn. Giao thc ny c m t trong RFC 1981, m t v cch thc m Host c th xc nh MTU ti u truyn cc gi tin qua mng. 4.2.4 Nguyn l hot ng ca Path MTU Discovery Protocol Lc u, Host cha xc nh c MTU ca ton tuyn, Host vn tin hnh gi cc gi tin vi kch thc ph hp vi MTU Local-link ca n. Nu cc gi tin ny n ch m khng gp tr ngi no, th MTU Local-link ca Host cng chnh l MTU ca ton

tuyn. Trong trng hp mt Router trung gian pht hin ra gi c kch thc ln hn MTU Local-link ca n, Router loi b gi v kch hot c ch phn hi (MTU Size Error Feedback nh cp trn). Router gi v Host ngun gi tin ICMPv6 Packet Too Big (gi ICMPv6 cha bn tin Packet Too Big). Khi nhn c gi tin ny, Host ngun bit c gi tin b loi b. Host ngun tin hnh phn on cc gi tin theo kich thc MTU c cnh bo trong bn tin Packet Too Big va nhn c. Qu trnh ny lp i lp li n khi cc gi tin truyn n ch sun s. Lc Path MTU Discovery proccess kt thc. Path MTU ca mt tuyn t ngun n ch c th thay i lin tc do s thay i v Routing Topology. Gi tr Path MTU gim c nhn bit bi bn tin Packet Too Big. Host nhn bit s gia tng ca Path MTU bng cch tng kch thc cc gi tin. Nu tng kch thc gi tin m mng vn chuyn c cc gi th Node lp tc cp nht cc gi tr Path MTU ny. n khi nhn c bn tin Packet Too Big, Host ly gi tr Path MTU trc . Khi vt qu kch thc cho php, cc gi s b loi b. Do , vic tng kch thc ny c thc hin ht sc hn ch. 4.2.5 Qu trnh phn on trong IPv6 Qu trnh ny tng t nh trong IPv4, tuy nhin IPv6 cn c thm phn Header m rng. Mi Datagram IPv6 chia thnh hai phn: - Unfragmentable Part: Phn ny bao gm Main Header ca Datagram ban u v Extension Header. Nhng phn ny khng th thiu trong mi Fragment sau khi c phn on. - Fragmentable Part: Phn ny bao gm Payload ca mi Datagram ban u v c th c thm phn Extension Header nu c s hin din ca Authentication Header, Encapsulating Security Payload. Unfragment Part buc phi c trong tt c cc on sau khi phn. Cn Fragmentable Part c th tri u trong cc on sau khi phn. Nh vy cu trc mi on sau khi phn c sp xp theo trt t sau: - Unfragmentable Part: Ton b phn Unfragmentable ca Datagram ban u, nhng gi tr ca trng Payload Legth c cp nht li, ch th kch thc Payload ca Datagram c phn on. - Fragment Header. - Fragmentable Part: Mt phn ca phn Fragmentable ca Datagram ban u. Sau y l mt v d v cu trc cc Datagram sau khi c phn on: Gi s c mt IPv6 Datagram vi kch thc 320 byte, bao gm 40 byte IPv6 Header, 4 Extension Header kch thc 30 byte, v 160 byte d liu. Trong c 2 Extension Header thuc nhm Unfragmentable, 2 Extension Header cn li thuc nhm Fragmentable. Gi s Path MTU m Host ngun hc c l MTU=230 byte. N phn on cc Datagram nh sau:

Hnh 4.2.5 Phn on gi tin IPv6.

Datagram ban u c chia thnh 3 Datagram: - Datagram u tin: Gm 100 byte ca phn Unfragmentable, theo sau l 30 byte Fragment Header v 100 byte ca phn Fragmentable trong Datagram ban u. Phn Fragmentable ny gm 60 byte ca 2 Extension Header l Authentication Header v Destination Option Header, 40 byte trong s 160 byte ca phn data trong Payload ban u. 120 byte data cn li c sp xp vo cc Datagram sau. - Datagram th 2: Gm 100 byte ca phn Unfragmentable, theo sau l 30 byte Fragment Hea der, tip theo l 100 byte data tip theo ca Payload ban u (byte 40 n 139). 20 byte cn li c sp xp vo cc Datagram sau. - Datagram th 3: Gm 100 byte ca phn Unfragmentable, 30 byte Fragment Header v 20 byte data cn li ca phn Payload ban u. Cng ging nh trong IPv4, bit M (More) c xc lp gi tr 1 cho 2 Datagram u v c xc lp gi tr 0 cho Datagram th 3. Bit ny gip ch cho qu trnh ti hp cc Datagram ny Host u cui.