Está en la página 1de 25

Tm hiu v nhng hn ch ca ipv4 v c im ca ipv6:

1. Nhng hn ch ca IPv4:

- Giao thc tng mng trong b giao thc TCP/IP hin ti ang l IPv4 (Internet- working protocol verision 4) . Mc d IPv4 c thit k kh tt, s thng i thng tin tin trin t lc khi u IPv4 vo nhng nm 1970, nhng IPv4 c nhng s thiu ht khin cho n khng ng b cho s pht trin nhanh ca Internet, gm nhng th sau: + IPv4 c 2 level cu trc a ch (netid v hostid) phn nhm vo 5 lp (A, B, C, D v E). S s dng nhng a ch l khng hiu qu. V d nh khi cos mt t chc c cp cho 1 a ch lp A, 16 triu a ch t a ch c phn phi duy nht cho t chc s dng. Nu 1 t chc c cp cho 1 a ch lp C, mt khc ch c 256 a ch c phn phi cho t chc, y khng phi l mt s . Cng vy, nhiu triu a ch b lng ph trong nhm D v E. Phng thc phn a ch ny dng ht nhng a ch ca IPv4, v mau chng s khng cn a ch no cn cp cho bt k mt h thng mi no mun kt ni vo Internet + Internet phi thch nghi c vi s chuyn giao audio v video thi gian thc. Loi chuyn giao ny yu cu nhng sch lc tr hon t nht v s t trc ca ti nguyn khng c cung cp trong thit k. + Internet phi thch nghi c vi s m ho v s chng nhn ca d liu cho mt s ng dng. Khng mt s m ho v s chng nhn no c cung cp trong IPv4. - khc phc thiu st trn ng ta cho ra chun ipv6 nh l 1 s i thay cho ipv4 2 c im ca IPv6: a.C khng gian a ch ln: - IPv6 c a ch ngun v ch di 128 bt thay v 32 bit nh hin ti. Vi 32-bit, IPv4 ch cho php cung cp khong 4,3 t a ch IP. V mi thit b c kt ni Web nh: my ch, my tnh bn, xch tay, in thoi thng minh, Tablet PC v nhiu hn na cn phi c a ch IP. V k t khi Web bng n cc nc nh Trung Quc v n , th gii ang nhanh chng tip cn n nhng a ch c sn cui cng ca IPv4. Trong khi , vi 128-bit m IPv6 mang li, n c kh nng cung cp mt s lng rt ln a ch IP vt xa nhu cu s dng Internet hin nay cng nh cc thit b kt ni web. Thay v 4,3 t a ch gii hn ca IPv4, a ch IPv6 c cung cp hng t t a ch IP cho ngi dng trn khp hnh tinh ny.

b.a ch phn cp,h tng nh tuyn hiu qu: - Cc a ch ton cc ca Ipv6 c thit k to ra mt h tng nh tuyn hiu qa, phn cp v c th tng qut ho da trn s phn cp thng thy ca cc nh cung cp dch v Internet (ISP) trn thc t c.Khun header c n gin ha: - Header ca IPv6 c thit k gim chi ph n mc ti thiu. iu ny t c bng cch chuyn cc trng khng quan trng v cc trng la chn sang cc header m rng c t pha sau ca IPv6 header. Khun dng header mi ca IPv6 to ra s x l hiu qu hn ti cc router. d.T cu hnh a ch: - n gin cho vic cu hnh cc trm, IPv6 h tr c vic t cu hnh a ch stateful nh kh nng cu hnh server DHCP v t cu hnh a ch stateless (khng c server DHCP). Vi t cu hnh a ch dng stateless, cc trm trong lin kt t ng cu hnh chng vi a ch IPv6 ca lin kt (a ch cc b lin kt) v vi a ch rt ra t tin t c qung b bi router cc b. Thm tr nu khng c router, cc trm trn cng mt lin kt c th t cu hnh chng vi cc a ch cc b lin kt v giao tip vi nhau m khng phi thit lp cu hnh th cng. e.Kh nng xc thc v bo mt an ninh: - Tch hp sn trong thit k IPv6 gip trin khai d dng m bo s tng tc ln nhau gia cc nt mng f.H tr tt v cht lng dch v QoS - Lu thng trn mng c phn thnh cc lung cho php s l mc u tin khc nhau ti cc router. g.H tr tt tnh nng di ng: - Kh nng di ng MobileIP tn dng c cc u im ca IPv6 so vi IPv4. h.Kh nng m rng: - Thit k ca IPv6 c d phng cho s pht trin trong tng lai ng thi d dng m rng khi c nhu cu.

3 Cu trc a ch IPv6: a.a ch ipv6: - Mt a ch gm c 16 bytes, l 128 bt di. Kiu k hiu du 2 chm trong h m 16 ( Hexadecimal Colon Notation): - lm cho nhng a ch tr nn c th c c nhiu hn, IPv6 trnh by r trong kiu k hiu du 2 chm trong h m 16. Trong kiu k hiu ny, 128 bt c chia thng 8 phn, mi phn rng 2 byte. 2 byte trong kiu k hi h m 16 yu cu 4 ch s trong h m 16 ny. V th cho nn a ch gm c 32ch s trong h m 16 vi mi 4 ch s mt li c mt du : chm. 111111101111101100..111111111111 128 bt= 16 bytes= 32ch s trong h m 16

FDEC : : 7654 3210 ADBF 2922 FFFF a ch IP phin bn 6 ( IPv6 Address) - S rt gn: + Mc d l a ch IP ngay c khi trong nh dnh h s m 16, vn rt di, nhiu ch s 0 trong mt a ch. Th d: 1080:0000:0000:0000:0008:0800:200C:417A Do c ch nn a ch c dng biu din d dng hn cc loi a ch dng ny. Ta khng cn vit cc s 0 u cc nhm, nhng nhng s 0 bn trong th khng th xo.
Cha rt gn

1080:0000:0000:0000:0008:0800:200C:417A
rt gn 1080: 0: 0: 0: 8: 800:200C:417A

S rt gn a ch (Abbreviated Address) - Hn na ta c th s dng k hiu :: ch mt chui cc s 0. Tuy nhin k hiu trn ch c s dng mt ln trong mt a ch. a ch IP c di c nh, ta c th tnh c s cc bit 0 m k hiu biu din. Ta c th p dng u hay cui a ch. Cch vit ny c bit c li khi biu din cc a ch multicast, loopback hay cc i ch cha ch nh.

Cha rt gn

1080: 0: 0: 0: 8: 800:200C:417A
rt gn 1080::8:800:200C:417A

S rt gn a ch c s 0 lin tip (Abbreviated Address with consecutive zeros) - Vic khi phc li s rt gn a ch l rt n gin: thm s 0 vo cho n khi nhn c a ch nguyn bn (4 ch s trong 1 phn , 32 ch s trong mt a ch) - IPv6 cho php gim ln a ch v c biu din theo k php CIDR. V d: Biu din mng con c di tin t 80 bt:
1080:0:0:0:8::/80

a ch CIDR ( CIDR Address) b.Khng gian a ch: - Khng gian a ch c di ln hn IPv4( 128 bt so vi 32 bt) do cung cp khng gian a ch ln hn rt nhiu. Trong khi khng gian a ch 32 bt ca IPv4 cho php khong 4 t a ch, khng gian a ch IPv6 c

th c khong 6.5*10

23

a ch trn mi mt vung b mt tri t. N

to ra nhiu mc phn cp v linh hot trong a ch ho v nh tuyn hin khng c trong IPv4. - Khng gian a ch c nhiu mc ch khc nhau. Ngi ta thit k a ch IP chia khng gian a ch thnh 2 phn, vi phn u c gi l kiu tin t. Phn gi tr tin t ny cho bt mc ch ca a ch. Nhng m s c thit k sao cho khng c m s no ging phn u ca bt k m s no khc. Do khng c s nhp nhng khi mt a ch c trao kiu tin t c th d dng xc nh c. 128 bt Bin Bin

Kiu tin t

Phn cn li ca a ch Cu trc a ch ( Address Structure)

- Khng gian IPv6 c chia trn c s cc bt u trong a ch. Trng c di thay i bao gm cc bt u tin trong a ch gi l Tin t nh dng ( Format Prefix) FP. C ch phn b a ch nh sau: Phn b D phng D phng D phng cho a ch NSAP D phng cho a ch IPX Cha cp pht Cha cp pht Cha cp pht a ch da trn v tr a l ( Hin loi b) Tin t nh dng 0000 0000 0000 0001 0000 001 0000 010 0000 011 0000 1 0001 001 T l trong khng gian a ch 1/256 1/256 1/128 1/128 1/128 1/32 1/16 1/8

Cha cp pht Cha cp pht Cha cp pht Cha cp pht Cha cp pht Cha cp pht Cha cp pht a ch lin kt cc b a ch site cc b a ch multicast

101 110 1110 1111 0 1111 10 1111 110 1111 1110 0 1111 1110 10 1111 1110 11 1111 1111 C ch phn b a ch

1/8 1/8 1/16 1/32 1/64 1/128 1/512 1/1024 1/1024 1/256

c.Cp pht a ch IPv6:


1.a ch unicast trn c s ngi cung cp:

- a ch trn c s ngi cung cp c s dng chung bi 1 host bnh thng nh 1 a ch unicast. nh dng a ch c din t nh sau: 128 bits 8 bits Provider Indentifler 010 Registry Subscriber Indentifler Subnet Indentifler Node Indentifler

0000 C nh 0001 Tm thi 3 bits 5 bits

Hnh 7: a ch trn c s ngi cung cp (Provider-based Address)

- Nhng trng cho a ch ngi dng trn c s cung cp nh sau : + Chng thc kiu (Type indentifier): Trng 3 bt ny nh ngha nhng a ch nh l 1 a ch trn c s ngi cung cp. + Chng thc ng k (Registry indentifier) : Trng 5 bt ny trnh by chi nhnh ng k a ch. Hin thi th c 3 trung tm a ch c nh ngha: RIPE- NCC (m 01000): Ti Chu u. INTERNIC (m 11000): Ti Bc M. APNIC (m 10100): Ti Chu - Thi Bnh Dng + Chng thc nh cung cp (Provider indentifier): Trng di tu bin ny xc nhn nh cung cp (provider) cho truy cp Internet 16 bit di l khuyn co i vi trng ny. + Chng thc thu bao (Subscriber indentifier): Khi mt t chc t mua Internet di hn thng qua 1 nh cung cp, n c cp pht 1 th nhn dng ngi t mua (Subscriber indentification). 24 bt di l khuyn co i vi trng ny. + Chng thc Subnet (Subnet indentifier): Mi subscriber c th c nhiu subnetwork khc nhau, v mi network c th c nhiu chng thc. Chng thc. Chng thc subnet nh ngha mt network c th di khu vc ca subscriber. 32 bt di l khuyn co i vi trng ny. + Chng thc None (None indentifier): trng cui cng nh ngha nhn dng giao im kt ni ti subnet. di 8 bt l khuyn co vi trng ny lm n thch hp vi a ch link 48 bt (Vt l) c s dng bi Ethernet 2.a ch d tr: + a ch khng xc nh (Unspecified Address): y l mt a ch m phn khng phi tin t ch cha ch s 0. Ni mt cch khc phn cn li ca a ch gm ton zero. a ch ny c s dng khi host khng hiu c a ch ca chnh n v gi 1 cu hi thm tm a ch ca n 8 bt 00000000 120 bit Tt c ton bt 0

+ a ch vng ngc (Loopback Address): y l mt a ch c s dng bi 1 host kim tra n m khng cn vo mng. Trong trng hp

ny 1 thng ip c to ra tng ng dng n gi ti tng chuyn ti v i qua tng mng. Tuy nhin thay v i n mng vt l n tr li tng chuyn ti v i qua tng ng dng. a ch ny rt hu dng cho vic kim tra nhng gi phn mm chc nng trong tng ny trc khi thm ch c vic kt ni my tnh vo mng. a ch c m t trong hnh di y gm c tin t 0000 0000 v theo sau l 119 bit 0 v 1 bit 1. 8 bt 00000000 120 bit 000000000000.00000000000001

a ch vng ngc ( Loopback Address) + a ch IPv4: Nhng g chng ta thy c trong sut qu trnh chuyn i t a ch IPv4 v IPv6, host c th s dng a ch IPv4 ca n c nhng vo a ch IPv6. C 2 nh dng a ch c thit k cho mc ch ny: thch ng ( compatible) v ho (mapped) + a ch thc ng ( Compatile Address): L mt a ch ca 96 bit 0 theo sau 32 bit ca a ch IPv4. a ch ny c s dng khi 1 my tnh s dng IPv6 mun gi mt thng ip sang 1 my tnh s dng IPv4. Tuy nhin gi tin phi i qua mt min m mng vn s dng IPv4. Ngi gi s dng a ch thch ng IPv4 lm cho thun tin vic chuyn gi tin qua min s dng IPv4. Th d: a ch IPv4 l 2.13.17.14 (nh dng du chm trong h m 10) c chuyn thnh 0::020D:110E (nh dng du 2 chm trong h m 16). a ch IPv4 c thm 96 bt 0 to ra a ch IPv6 128 bt.

8 bt 00000000

88 bt Tt c ton bt 0 a. a ch thch ng

32 bt a ch IPv4

a ch IPv6 0::020D:110E 2.13.17.14

a ch IPv4

b. Chuyn i a ch

Hnh 11: a ch thch ng ( Compatible Address) + a ch ho (Mapped Address): Gm 80 bt 0 theo sau l 16 bt 1 sau na l 32 bt ca a ch IPv4. a ch ny c s dng khi 1 my tnh vn s dng IPv4. Gi tin du lch phn ln qua mng IPv6 nhng sau ht c chuyn ti 1 host s dng IPv4. a ch IPv4 c thm 16 bt 1 v 80 bt 0 to a ch IPv6 128 bt. 8 bt 00000000 72 bt Tt c bt 0 16 bit Tt c bt 1 32 bt a ch IPv4

a.a ch ho a ch IPv6 a ch IPv4

0::020D:110E 2.13.17.14

b. Chuyn i a ch

a ch ho (Mapped Address) 3.a ch cc b ( Local Address): + a ch link cc b ( Link local Address): Nhng a ch ny c s dng khi 1 mng LAN mun s dng giao thc Internet nhng khng kt ni Internet v l do an ninh. Kiu a ch ny s dng tin t 1111 1110 10. 10 bt 70 bt 48 bt

Tt c bt 0 a ch Node a ch link cc b ( Link local Address) + a ch site cc b (Site Local Address): Nhng a ch ny c s dng nu nh 1 site c mt s mng s dng giao thc Internet nhng khng kt ni Internet v nhng l do an ninh. Kiu a ch ny s dng tin t 1111 1110 11 4. a ch Multicast: - a ch multicast c s dng nh ngha cho mt nhm cc host thay v ch 1. Tt c u s dng tin t 1111 1111 trong trng u tin. Trng th hai l c (flag) nh ngha 1 nhm a ch hoc c nh hoc tm thi. Mt nhm a ch c nh c nh ngha bi nh cm quyn Internet v c th truy cp bt c lc no. Mt nhm a ch tm thi, ni mt cch khc c s dng mt cch tm thi. H thng tham d vo mt hi ngh t xa c th s dng mt nhm tm thi. Trng th 3 nh ngha phm vi hot ng ca nhm a ch.

11111111010

8 bt 11111111

4 bt C

4 bt Phm vi

112 bt ID nhm

0000 C nh 0001 Tm thi

0000 Dnh trc 0001 Node cc b 0010 Link cc b 0101 Site cc b 1000 t chc cc b 1110 Chung 1111 Dnh ting

a ch Multicast (multicast address) d. nh dng gi tin trong IPv6 : - Gi tin trong IPv6 c thy nh trong hnh di y. Mi gi tin bao gm mt vng header nn tng bt buc theo sau bi payload. Payload gm c 2 phn: nhng vng Header m rng tu chn v d liu t tng cao hn. Vng Header nn tng chim gi 40 byte, trong khi nhng vng Header m rng v d liu t tng cao hn cha n 65535 byte thng tin.

40 byte u mc nn tng u mc m rng (tu la chn)

C th ln n 65535 byte Payload Gi d liu t tng cao hn

nh dng gi tin IPv6 (IPv6 Data Packet Format) .1 Vng nn tng ( Base Header): - Vng header nn tng trong hnh 17 cho ta thy n c 8 trng, nhng trng ny m t nh sau: VER PRI di Payload Flow lable Vng Header k tip Gii hn nhy

Nhng a ch ngun Nhng a ch ch Nhng u mc m rng Payload +


Gi d liu t tng cao hn

Hnh 17 : nh dng ca 1 n v d liu IPv6 ( Format of an IPv6 datagram) + Phin bn (VER- version): Trng 4 bt ny nh ngha s phin bn ca IP. Vi IPv6 gi tr l 6. + Quyn u tin (PRI- prority): Trng 4 bt ny nh ngha s u tin ca nhng gi tin i vi s tc nghn giao thng.

+ Nhn lu lng (Flow lable): Nhn lu lng l mt trng 3 byte 24 bit c thit k cung cp s iu khin c bit i vi nhng lu lng c bit ca d liu. + di Payload (Payload Length): Trng di Payload 2 byte ny c nh ngha di tng cng ca n v d liu IP tr vng Header nn tng. + Vng Header k tip (Next Header): Vng Header k tip l 1 trng 8 bt nh ngha 1 u mc m theo sau vng Header nn tng trong n v d liu. Vng header k tip l 1 trong nhng vng m rng tu la chn c s dng bi IP hoc vng Header cho 1 giao thc tng cao hn nh UDP hay TCP. Mi vng Header m rng li c cha trng ny. Bng sau cho chng ta thy nhng gi tr ca vng Header k tip. M s 0 2 6 17 43 44 50 51 59 60 Vng Header k tip Tu chn nhy tng bc mt ICMP TCP UDP Routing ngun S phn ming Payload bo mt m ho S chng thc Trng ( Khng vng Header k tip) Tu chn ch

5 Vng header m rng : - di ca vng header c b tr 40 byte. Tuy nhin, em n nhiu chc nng hn cho n v d liu IP vng header nn tng c th cho theo sau n 6 vng header m rng. Nhiu vng header ny l nhng tu chn trong IPv4.

VER

PRI

Flow label Vng Header k tip a ch ngun a ch ch Gii hn nhy

di Payload

nh dng vng header m rng ( Extenion header format ) - Su loi vng header c nh ngha. Chng l tu chn nhy tng bc, l trnh ngun, s phn mnh, s chng thc, Payload bo mt m ho v tu chn ch

Tu chn nhy tng bc Ngun tm ng S phn ming Nhng vng Header m rng S chng thc Bo mt Payload m ho Tu chn ch

Nhng loi vng header m rng (Extension header types) a.ty chn nhy tng bc: - Tu chn nhy tng bc c s dng khi ngun cn chuyn thng tin qua tt c cc router c thm bi n v d liu - Xa hn, ch c 3 tu chn c nh ngha: Pad1, PadN v jumbo payload

M s (8 bt)

di (8 bt)

D liu ( di c th thay i)

Hnh

Kiu

2 bt 1 bt 5 bt Hnh ng : s thc hin nu tu chn khng c xc nhn 00 B qua tu chn Kiu 01 Loi b n v d liu khng c hnh ng no na 00000 Pal1 10 Loi b n v d liu v gi 1 thng ip li 00001 PadN 11 Nh m 10, nhng nu ch khng phi a ch munlticast C: (change) gi tr thay i tu chn 00010 jumbo payload 0 : khng b thay i trong vn chuyn 1 : C th b thay i trong vn chuyn

nh dng ca nhng tu chn ca vng header tu chn nhy tng bc(Format of options in a hopbyhop option header) Pad1: Tu chn ny di 1 byte v n c thit k cho nhng mc ch sp nhm. Mt s tu chn cn phi bt u 1 bit ring bit trong 32 bit). Nu mt tu chn ca s yu cu ny rt chnh xc l 1 byte, Pad1 s c thm vo lm nn s khc bit. Pad1 khng cha trng di tu chn m cn khng c cha trng d liu tu chn. N gm c duy nht trng m tu chn vi tt c cc bt c t l 0 ( hnh ng l 00, C l kiu 00000). Pad1 c th c chn vo bt k ch no trong vng header tu chn nhy tng bc.

M 00000000 ~ Nhng tu chn Pad1 ~ a. Pad1 b. S dng lm m Pad1 PadN: PadN ging Pad1 v tng. S khc nhau l PadN c s dng khi 2 hay nhiu bt c cn cho vic sp nhm. Tu chn ny gm c 1 byte m tu chn, 1 byte di tu chn, v mt bin s nhng s 0 lm byte m. Gi tr ca m tu chn l 1 (hnh ng l 00, C l 0 v kiu l 00001). di tu chn cha s byte m. D liu

M 00000001 1 byte

di 1 byte

D liu Tt c bt 0 s byte c th thay i Jumbo Payload

b.L trnh ngun: Vng header m rng l trnh ngun kt hp vi tng ca nhng tu chn l trnh ngun chnh xc v l trnh ngun khng chnh xc ca IPv4. Vng header l trnh ngun cha mt s nh nht ca 7 trng. Hai trng u tin, vng header k tip v di vng header, l ng vi vng header m rng nhy tng bc. Trng kiu nh ngha l trnh l chnh xc hoc khng chnh xc. Trng nhng a ch cn li ch ra s bc nhy cn ti ch. Trng mt n tuyt i/ tng i xc nh s chc chn ca l trnh. Nu mt n l tuyt i, l trnh phi theo chnh xc nhng g c ch ra bi ngun. Nu

thay vo mt n tng i nhng router khc c th thm vo trong vng header. Vng header nn tng di vng Kiu Nhng a ch Mt n tuyt i/ tng i a ch th nht a ch th hai a ch cui cng Phn cn li ca Payload

Vng header k D tr

L trnh ngun (Source Routing) a ch ch trong l trnh ngun khng tun theo s nh ngha trc ca chng ta (a ch cui cng trong n v d liu). Thay vo n thay i t router sang router. c. S phn ming ( Fragmentation): tng v s phn ming nh trong IPv4. Tuy nhin ni m s phn ming chim gi khng ging nhau. IPv4 ngun hoc router cn phn ming nu c ca n v d liu ln hn MTU ca mng vi nhm n c d liu s c a i. IPv6 ch nhng ngun nguyn thu mi c phn ming. Mt ngun phi s dng 1 k thut khm ph qu o MTU (Path MTU Discovery) tm MTU nh nht c h tr bi bt k mt mng no trong qu o. Ngun sau phn ming s khm pht ny. Nu ngun khng se dng k thut khm ph qu o MTU n c th phn minh n v d liu thnh nhng ming c 576 byte hoc nh hn. y l c nh nht MTU yu cu cho mi mng kt ni vo Internet. Hnh di y cho ta thy nh dng ca vng header m rng s phn ming:

Vng Header nn tng Vng header k tip di vng S phn ming b header p a ch th nht Phn cn li ca Payload S phn ming (Fragmentation) d. S chng thc (Authentication): Vng header m rng s chng thc c mt mc ch kp: n lm cho thng ip gi c gi tr v m bo s nguyn vn ca d liu. u tin cn ngi nhn c th chc chn l t ngi gi tht v khng phi l t 1 k mo danh. iu cui cng cn kim tra l d liu khng b thay i trong vn chuyn bi hacker. nh dng ca vng Header m rng s chng thc c trnh by hnh 28 . Trng ch mc tham gia s bo mt nh ngha thun ton c s dng cho s chng thc. Trng chng thc cha d liu cha nhng d liu tht c sinh ra bi thut ton. 0 M

Kho bo mt 128 bt

n v d liu IP vi nhng trng s thay i v s chng thc c t l 0


Kho bo mt 128 bt

Thut ton s chng thc

S chng thc d liu 128 bt S tnh ton ca s chng thc d liu (Calculation Of Authentication Data) Ngi gi i qua kho bo mt 128 bt, ton b n v d liu IP v kho bo mt 128 bt ln na n thut ton. Nhng trng ny trong n v d liu vi nhng gi tr c thay i trong qu trnh vn chuyn (V d nh bc nhy) s c t l 0. n v d liu qua c thut ton s cha vng header s chng thc, vi trng s chng thc d liu c t l 0. Thut ton to ra s chng thc d liu vi nhng th c a vo trong vng header m rng trc khi ti qu trnh vn chuyn n v d liu. Nhng chc nng ngi nhn trong 1 phng php tng t. N nhn mang i kho bo mt v nhn ly n v d liu ( ln na vi nhng trng thay i c t l 0) v i qua chng n thut ton s chng thc.

Nu kt qu ging s chng thc d liu, n v d liu c chng thc nu khng chng s b loi.

e. Payload bo mt m ho (Encrypted Secutity Payload - ESP): - Payload b mt m ho l phn m rng m cung cp mt cch tn nhim v bo v chng li s nghe ln -Trng khc cha nhng d liu ang m ho vi bt k nhng tham s thm no c cn bi thut ton. S m ho c th c trang b trong 2 cch : Mode vn chuyn (Transport Mode): Trong mode vn chuyn mt TCP hay n v d liu ngi s dng UDP l ci u tin c m ho v c gi vo trong 1 gi IPv6. S m ho trong mode vn chuyn c s dng a s m ho d liu t host sang host. Mode tunnel (Tunnel Mode): Trong mode tunnel ton b d liu IP vi nhng vng Header nn tng ca n v nhng vng Header m rng c m ho v gi vo trong 1 gi IP mi s dng vng Header m rng Paylaod bo mt m ho. Ni cch khc chng ta c 2 vng Header nn tng: 1 m ho, 1 cha m ho. f.Tu chn ch (Destination Option): - Tu chn ch c s dng khi ngun ch cn chuyn thng tin n ch. Nhng router khng ngay lp tc trao quyn truy cp cho nhng thng tin ny. nh dng ca tu chn ch tng t nh tu chn nhy tng bc. Xa hn ch c Pad1 v PadN c nh ngha. So snh gia IPv4 v IPv6: Chng ta hy thc hin mt s s so snh gia nhng vng Header m rng ca IPv4 v IPv6: Tu chn khng hot ng (no-operetion) v kt thc tu chn ( end- of - option) trong IPv4 c thay bng Pad1 v PadN trong IPv6. Tu chn bn ghi tm ng khng c trang b trong IPv6 v n khng c s dng. Tu chn ten thi gian (timestamp) khng c trang b v n khng c s dng. Tu chn ngun tm ng (source route) c gi l vng Header m rng tu chn ngun tm ng trong IPv6. Nhng trng s phn ming (fragmentation) trong khu vc vng Header nn tng ca IPv4 c chuyn n vng Header m rng tu chn s phn ming ca IPv6. Vng Header s chng thc l mi trong IPv6.

Vng Header m rng Payload bo mt m ho l mi trong IPv6. 6.So snh vng header ipv4 v ipv6:

Hnh 1: IPv4 Header.

Hnh 2: IPv6 Header

Trng a ch ngun (Source Address) v a ch ch (Destination Address) c chiu di m rng n 128 bt. Mc d trng a ch ngun v a ch ch c chiu di m rng ti gp 4 ln s bt, song chiu di header ca IPv6 khng h tng nhiu so vi header

ca IPv4. l bi v dng thc ca header c n gin ho i trong IPv6. Mt trong nhng thay i quan trng l khng cn tn ti trng options trong header ca IPv6. Trng Options ny c s dng thm cc thng tin v cc dch v tu chn khc nhau. VD thng tin lin quan n m ho c th c thm vo ti y. V vy, chiu di ca IPv4 header thay i tu theo tnh trng. Do s thay i , cc router iu khin giao tip theo nhng thng tin trong IP header khng th nh gi chiu di header ch bng cch xem xt phn u gi tin. iu ny lm cho kh khn trong vic tng tc x l gi tin vi hot ng ca phn cng. Trong a ch IPv6 th nhng thng tin lin quan n dch v km theo c chuyn hn ti mt phn on khc gi l header m rng extension header. Trong hnh v trn l header c bn. i vi nhng gi tin thun tu, chiu di ca header c c nh l 40 byte. V x l gi tin bng phn cng, c th thy trong IPv6 c th thun tin hn IPv4. Mt trng khc cng c b i l Header Checksum. Header checksum l 1 s s dng kim tra li trong thng tin header, c tnh ton ra da

trn nhng con s ca header. Tuy nhin, c mt vn ny sinh l header cha trng TTL (Time to Live), gi tr trng ny thay i mi khi gi tin c truyn qua 1 router. Do vy, header checksum cn phi c tnh ton li mi khi gi tin i qua 1 router. Nu gii phng router khi cng vic ny, chng ta c th gim c tr. Thc ra, tng TCP pha trn tng IP c kim tra li ca cc thng tin khc nhau bao gm c a ch nhn v gi. Vy c th thy cc php tnh tng t ti tng IP l d tha, nn Header Checksum c g b khi IPv6. Trng c cng chc nng vi Service Type c i tn l Traffic Class. Trng ny c s dng biu din mc u tin ca gi tin, v d c nn c truyn vi tc nhanh hay thng thng, cho php thit b thng tin c th x l gi mt cch tng ng. Trng Service Type gm TOS (Type of Service) v Precedence. TOS xc nh loi dch v v bao gm: gi tr, tin cy, thng lng, tr hoc bo mt. Precedence xc nh mc u tin s dng 8 mc t 0-7. Trng Flow Label c 20 bt chiu di, l trng mi c thit lp trong IPv6. Bng cch s dng trng ny, ni gi gi tin hoc thit b hin thi c th xc nh mt chui cc gi tin, v d Voice over IP, thnh 1 dng, v yu cu dch v c th cho dng . Ngay c trong IPv4, mt s cc thit b

giao tip cng c trang b kh nng nhn dng dng lu lng v gn mc u tin nht nh cho mi dng. Tuy nhin, nhng thit b ny khng nhng kim tra thng tin tng IP v d a ch ni gi v ni nhn, m cn phi kim tra c s port l thng tin thuc v tng cao hn. Trng Flow Label trong IPv6 c gng t tt c nhng thng tin cn thit vo cng nhau v cung cp chng ti tng IP. IPv6 c mc tiu cung cp khung lm vic truyn ti thng minh, d dng x l cho thit b bng cch gi cho header n gin v chiu di c nh.