Está en la página 1de 100

I HC NNG

TRNG CAO NG CNG NGH THNG TIN

N TT NGHIP

Tm hiu IPv6 v cu hnh chuyn i giao tip t IPv4 sang IPv6

Ging vin hng dn: TS.HUNH CNG PHP Sinh vin thc hin : 1. L XUN TM 2. NGUYN HNG S Lp Ngnh Kha : 08N : CNG NGH MNG V TRUYN THNG : 2008-2011

Nng,Thng 5 Nm 2011

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv4 sang IPv6

M U
ng trc s pht trin mnh m ca CNTT c bit l trong lnh vc mng my tnh th ngoi vic gii quyt vn v lu lng cho mng th a ch ca cc thit b mng nh a ch ca cc my tnh, my in, mail server, web server, dch v xDSL, dch v Internet qua ng cp truyn hnh (IPTV), pht trin cc mng gio dc, game trc tuyn, thit b di ng tham gia vo mng Internet, truyn ti thoi, audio, video trn mng l mt trong nhng vn nan gii cn phi c quan tm thc s. Hin nay, a ch ca cc my tnh trn Internet ang c nh s theo th h a ch phin bn 4 (IPv4) gm 32 bits. Trn l thuyt, khng gian IPv4 bao gm hn 4 t a ch (thc t th t hn). Tuy nhin ng trc s pht trin mnh m v s lng thit b mng nh vy th xy ra nguy c thiu ht khng gian a ch IPv4 l iu s khng trnh khi; cng vi nhng hn ch trong cng ngh v nhng nhc im ca IPv4 thc y s ra i ca mt th h a ch Internet mi l IPv6. Phin bn IPv6 l mt phin bn a ch mi ca Internet. IPv6 c thit k vi hy vng khc phc nhng hn ch vn c ca a ch IPv4 nh hn ch v khng gian a ch, cu trc nh tuyn v bo mt, ng thi em li nhng c tnh mi tha mn cc nhu cu dch v ca th h mng mi nh kh nng t ng cu hnh m khng cn h tr ca my ch DHCP, cu trc nh tuyn tt hn, h tr tt hn cho multicast, h tr bo mt v cho di ng tt hn. Hin nay IPv6 c chun ha tng bc, chun b a vo ng dng thc t trong tng lai.V vy chng em chn ti ny lm ti nghin cu tt nghip. Trong ni dung ti ny,chng em xin trnh by 4 chng : Chng 1: Nhng hn ch ca a ch IPv4 v Cu trc ca a ch IPv6 Chng 2: c tnh v quy trnh hot ng ca a ch IPv6 Chng 3: Cng ngh chuyn i giao tip t IPv6 sang Ipv4 Chng 4: Demo m hnh thc hin cu hnh chuyn tip t IPv4 sang IPv6

GVHD: TS.Hunh Cng Php

SVTH: L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv4 sang IPv6

Do y l ti tng i ln, cng vi thi gian cng nh kin thc c hn nn nu c g thiu st chng em rt mong nhn c s ng gp kin ca thy (c) cng cc bn n ca chng em c hon chnh hn.

GVHD: TS.Hunh Cng Php

SVTH: L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv4 sang IPv6

LI CM N
Trong qu trnh lm n ny,chng em nhn c s hng dn nhit tnh t thy TS.Hunh Cng Php. Trong qu trnh thc hin n ,chng em c thy to iu kin v ti liu v kin thc lin quan gip chng em hon thnh tt n ny.V vy qua y em chng em mun gi li cm n chn thnh nht n thy Php. Bn cnh , em cng mun gi li cm n ti cc thy c trong b mn tin hc trng Cao ng Cng Ngh Thng Tin gip chng em trong vic trang b kin thc hon thnh kha tt nghip ny. Chng em xin chn thnh cm n!

Nng , Thng 05 nm 2011 Sinh Vin Thc Hin

L Xun Tm Nguyn Hng S

GVHD: TS.Hunh Cng Php

SVTH: L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv4 sang IPv6

NHN XT (Ca ging vin hng dn : Hunh Cng Php)


............................................................................................................................... ............................................................................................................................... ............................................................................................................................... ............................................................................................................................... ............................................................................................................................... ............................................................................................................................... ............................................................................................................................... ............................................................................................................................... ............................................................................................................................... ............................................................................................................................... ............................................................................................................................... ............................................................................................................................... ............................................................................................................................... ............................................................................................................................... ............................................................................................................................... ............................................................................................................................... ............................................................................................................................... ............................................................................................................................... Ch k ca GVHD

GVHD: TS.Hunh Cng Php

SVTH: L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv4 sang IPv6

MC LC M U DANH MC CC T VIT TT DANH MC CC BNG BIU DANH MC CC HNH NH


CHNG 1:NHNG HN CH CA A CH IPV4 V CU TRC A CH IPV6....................................................................................................................................... 1 1.1 NHNG HN CH CA A CH IPV4 V S RA I CA A CH . 1 1.1.1 NHNG HN CH CA A CH IPV4 ................................................ 1 1.1.2 NGUYN NHN RA I A CH IPV6 ............................................... 2 1.2 CU TRC A CH IPV6 ................................................................................ 4 1.2.1 TNG QUAN V A CH IPV6 V S KHC BIT SO VI A.. 4 1.2.2 C IM CA IPV6 ............................................................................... 6 1.2.3 BIU DIN A CH IPV6 ........................................................................ 7 1.2.4 KHNG GIAN A CH .......................................................................... 10 1.2.5 PHN LOI A CH IPV6 .................................................................... 11 1.2.5.1 a ch unicast(truyn thng n hng): .......................................... 11 1.2.5.2 a ch Multicast .................................................................................... 17 1.2.5.3 a ch Anycast....................................................................................... 23 1.2.6 LA CHN A CH MC NH TRONG IPV6 ............................... 24 1.2.7 PHN U IPV6....................................................................................... 25 1.2.7.1 Chiu di Phn u Ipv6: ..................................................................... 25 1.2.7.2 Nhng trng b i trong Phn u IPv6........................................... 26 1.2.1.1 So snh gia vng phn u ca IPv4 v Ipv6 ................................... 27 1.2.8 VNG PHN U M RNG ............................................................... 27 1.3 KT LUN CHNG ..................................................................................... 31 CHNG 2: C TNH V QUY TRNH HOT NG CA A CH IPV6 ..... 32 2.1 C TNH CA A CH IPV6 ..................................................................... 32 2.1.1 TNG QUT CHUNG ............................................................................. 32 2.1.2 CHT LNG DCH V (QoS) TRONG TH H A CH IPV6 .. 34 2.1.3 H tr tt hn v bo mt ......................................................................... 35 2.2 QUY TRNH HOT NG C BN CA A CH IPV6 ........................ 36 2.2.1 MT S TH TC C BN C S DNG TRONG A CH . 36 2.2.1.1 Th tc iu khin internet phin bn 6.............................................. 36 2.2.1.2 Th tc pht hin nt mng ln cn .................................................... 43 2.2.2 QUY TRNH HOT NG ..................................................................... 47 2.2.2.1 Quy trnh phn gii a ch lp 2 t a ch lp 3 ............................... 47 2.2.2.2 .Kim tra trng lp a ch trn mt ng kt ni ........................... 49 2.2.2.3 .Kim tra kh nng c th kt ni c ti nt mng ln cn .......... 49 2.2.2.4 Tm kim b nh tuyn trn ng kt ni (Router Discoverry) .... 50 2.2.2.5 Cu hnh a ch mt cch t ng ca thit b IPv6 ......................... 51

GVHD: TS.Hunh Cng Php

SVTH: L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv4 sang IPv6

2.2.2.6 Quy trnh tm kim gi tr PathMTU cho vic phn mnh gi tin Ipv6 53 2.2.2.7 nh s li cho thit b Ipv6 ................................................................. 54 2.3 .KT LUN CHNG .................................................................................... 55 CHNG 3 : CNG NGH CHUYN I GIAO TIP T IPV4 SANG IPV6 ... 56 3.1 TNG QUAN V CC CNG NGH CHUYN I IPV4 SANG IPV6 56 3.1.1 DUAL - STACK : CHNG HAI GIAO THC ..................................... 57 3.1.2 CNG NGH NG HM (Tunnel) .................................................. 59 3.1.2.1 Nguyn tc hot ng ca vic to ng hm................................... 61 3.1.2.2 Phn loi cng ngh ng hm: ......................................................... 61 3.1.2.3 Mt s cng ngh to ng hm: ....................................................... 62 3.1.2.3.1 Cu hnh ng hm bng tay ....................................................... 63 3.1.2.3.2 Cng ngh ng hm 6to4 ............................................................ 63 3.1.3 CNG NGH CHUYN I: ................................................................ 69 3.1.3.1 Phn loi cng ngh NAT-PT ............................................................... 70 3.1.3.2 Nguyn l lm vic ca NAT-PT .......................................................... 70 3.2 KT LUN CHNG: .................................................................................... 72 CHNG 4 : DEMO M HNH THC HIN CU HNH CHUYN TIP T IPV4 SANG IPV6............................................................................................................... 73 4.2 M HNH THC HIN TRIN KHAI CU HNH .................................... 73 4.2 CNG C DNG CU HNH .................................................................. 73 4.3 TRIN KHAI CU HNH TRN CC ROUTER ........................................ 74 4.4 PING KIM TRA KT QU........................................................................... 78 KT QU T C..................................................................................... 80 KT LUN V NH GI..................................................................................... 81 HNG PHT TRIN CA TI ............................................................... 81 PH LC............................................................................................................................ 82 DANH MC TI LIU THAM KHO.......................................................................... 88

GVHD: TS.Hunh Cng Php

SVTH: L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv4 sang IPv6

DANH MC CC T VIT TT Authentication Phn u Application Level Gateway Address Resolution Protocol Classless Inter-Domain Routing Destination Address Duplicate Address Detection Dynamic Host Configuration Protocol Phn u nhn thc Cng lp ng dng Giao thc phn gii a ch nh Tuyn lin vng khng phn lp a ch ch pht hin a ch trng lp Giao thc cu hnh IP ng cho cc my trm DHCP phin bn 4 DHCP phin bn 6 H thng tn min Giao thc to thng ip iu khin ca Internet ICMP phin bn 4 ICMP phin bn 6 Giao thc qun l nhm Internet Chng thc s Giao thc Internet Giao thc bo mt Internet Nh Cung cp dch v Internet Mng cc b Kim sot truy nhp mi trng truyn thng n v truyn dn cc i Truy vn i tng nghe lu lng truyn thng nhm Bo co i tng nghe lu

AH ALG ARP CIDR DA DAD DHCP

DHCPv4 Dynamic Host Configuration Protocol version 4 DHCPv6 Dynamic Host Configuration Protocol version 6 DNS Domain Name System ICMP Internet Control Message Protocol ICMPv4 Internet Control Message Protocol version 4 ICMPv6 Internet Control Message Protocol version 6 IGMP Internet Group Management Protocol ID Indentify Digital IP Internet Protocol IPSec Internet Protocol Security ISP Internet Service Provider LAN Local Area Network MAC Medium Access Control MTU MLQ MLR Maximum Transmission Unit Multicast Listener Query Multicast Listener Report

GVHD: TS.Hunh Cng Php

SVTH: L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv4 sang IPv6

lng truyn thng nhm MLD NA Multicast Listener Done Neighbor Advertisement Kt thc nghe lu lng truyn thng nhm Qung b ca nt mng ln cn C ch bin dch a ch mng C ch bin dch a ch mng - giao thc dch D tm nt mng ln cn Lin kt cc h thng m C ch bin dch a ch cng Cht lng dch v Chuyn hng Qung b ca b nh tuyn D tm b nh tuyn a ch ngun Giao thc iu khin truyn dn Loi dch v Thi gian sng Giao thc d liu ngi dng Mng ring o

NAT Network Address Translation NAT-PT Network Address Translation-Protocal Translation NS OSI PAT QoS R RA RS SA TCP ToS TTL UDP VPN Neighbor Solicitation Open Systems Interconnection Port Address Translation Quality of Service Redirect Router Advertisement Router Solicitation Source Address Transmission Control Protocol Type of Service Time to Live User DataGram Protocol Virtual Private Network

GVHD: TS.Hunh Cng Php

SVTH: L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv4 sang IPv6

DANH MC CC BNG BIU Bng 1.1 khc bit gia a ch IPv4 v a ch IPv6 ......................................... 5 Bng 1.2 a ch multicast mi im .................................................................... 20 Bng 1.3 a ch multicast mi b nh tuyn ...................................................... 22 Bng 2.1 Cc thng ip bo li ....................................................................... 40

Bng 2.2 Thng ip thng tin c bn .................................................................. 41 Bng 2.3 Thng ip thng tin m rng ............................................................... 41 Bng 2.4 Cc ty chn dng ND(Neighbor Discovery) ...................................... 45 Bng 2.5 Quy trnh th tc ND cung cp .............................................................. 48

DANH MC CC HNH NH Hnh 1.1 M hnh thc hin NAT ca a ch Ipv4 ............................................. 2 Hnh 1.2 S pht trin ca a ch IP ................................................................... 4 Hnh 1.3 a ch IP phin bn 6 Hnh 1.4 S rt gn a ch ....................................................................... 8 ....................................................................... 9

Hnh 1.5 S rt gn a ch c s 0 lin tip ......................................................... 9 Hnh 1.6 a ch CIDR(nh tuyn lin vng khng phn lp) ........................... 10 Hnh 1.7 Cu trc a ch ....................................................................... 11

Hnh 1.8 C ch phn b a ch ....................................................................... 11 Hnh 1.9 Unicast m nhiu cng kt ni ti cc my tnh .................................... 12 Hnh 1.10 Cu trc a ch link local .................................................................... 14 Hnh 1.11 Cu trc a ch site local ..................................................................... 14 Hnh 1.12 Cu trc nh danh ton cu ................................................................. 15

GVHD: TS.Hunh Cng Php

SVTH: L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv4 sang IPv6

Hnh 1.13 a ch ipv4-comparetible .................................................................... 16 Hnh 1.14 a ch ipv4 mapped ....................................................................... 16 Hnh 1.15 Kt ni multicast ....................................................................... 17

Hnh 1.16 Cu trc a ch multicast ..................................................................... 17 Hinh 1.17 Phm vi a ch ipv6 ....................................................................... 20

Hnh 1.18 Multicast trong phm vi 1 ng kt ni ............................................ 21 Hnh 1.19 Cu thnh a ch Multicast Solicited ................................................. 23 Hnh 1.20 Cu trc a ch Anycast ..................................................................... 23 Hinh 1.21 Phn phn u ca a ch ipv4 ............................................................ 26 Hnh 1.22 Phn u ca ipv6 Hnh 1.23 Cu trc gi tin Ipv6 ....................................................................... 26 ....................................................................... 27

Hnh 1.24 Phn u m rng ca a ch ipv6 ..................................................... 29 Hnh 1.25 Nhng loi vng phn u m rng .................................................... 30 Hnh 1.26 Th t x l cc phn u m rng ..................................................... 32 Hnh 2.1 Trng h tr QoS trong phn u ca ipv4 v ipv6 ............................ 35 Hnh 2.2 Cu trc gi tin ICPMv6 ....................................................................... 39 Hnh 2.3 Cu trc gi tin ND ....................................................................... 45

Hnh 2.4 Quy trnh phn gii a ch ..................................................................... 50 Hnh 2.5 T ng cu hnh a ch ca thit b Ipv6 ............................................ 53 Hnh 2.6 Quy trnh thc hin tm kim PathMU .................................................. 56 Hnh 3.1 Chng 2 giao thc ....................................................................... 60

Hnh 3.2 Cng ngh Dual Stack ....................................................................... 61

GVHD: TS.Hunh Cng Php

SVTH: L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv4 sang IPv6

Hnh 3.3 Dual Stack trong h iu hnh cisco .................................................... 61 Hnh 3.4 Cng ngh ng hm Tunnel .............................................................. 62 Hnh 3.5 Cu trc a ch ipv6 6to4 ...................................................................... 67 Hnh 3.6 Cc thnh phn ca tunnel 6to4 ............................................................. 68 Hnh 3.7 Kt ni ipv6 vi tunnel Broker .............................................................. 70 Hnh 3.8 M hnh ca tunnel Broker ................................................................... 71 Hnh 3.9 Cng ngh bin dch NAT PT.............................................................. 72 Hnh 3.10 Chuyn i gi tin ipv4 thnh ipv6 ..................................................... 74 Hnh 4.1 M hnh Cu hnh chung ....................................................................... 75 Hnh 4.2 Cu hnh trn router V4_R1 .................................................................. 76 Hnh 4.3 Cu hnh trn Router V6V4_R2 ............................................................. 77 Hnh 4.4 Cu hnh trn Router V6_R3 ................................................................. 78 Hnh 4.5 cu hnh trn Router V6V4_R3 ............................................................. 79 Hnh 4.6 cu hnh trn Router V6_R5 .................................................................. 80 Hnh 4.7 kt qu ping t Router V6_R3 sang Router V6_R5 .............................. 80 Hnh 4.8 kt qu ping t Router V6_R3 sang Router V6_R5 .............................. 81

GVHD: TS.Hunh Cng Php

SVTH: L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

CHNG 1:NHNG HN CH CA A CH IPV4 V CU TRC A CH IPV6 1.1 NHNG HN CH CA A CH IPV4 V S RA I CA A

CH IPV6
1.1.1

NHNG HN CH CA A CH IPV4

S cn kit a ch IPv4: theo s liu ca nhng t chc qun l a ch quc t th khng gian a ch IPv4 c s dng trn 60. Nhng cng ngh gp phn gim nhu cu a ch IP nh NAT, DHCP cp a ch tm thi c s dng rng ri. Tuy nhin, hin nay nhu cu a ch tng rt ln do nhng nguyn nhn nh Internet pht trin ti nhng khu vc dn ng nh Trung Quc, n ; nhng dng dch v mi i hi khng gian a ch IP c nh Cu trc nh tuyn khng hiu qu: a ch IPv4 c cu trc nh tuyn va phn cp, va khng phn cp. Mi b nh tuyn (router) phi duy tr bng thng tin nh tuyn ln, i hi router phi c dung lng b nh ln. IPv4 cng yu cu router phi can thip x l nhiu i vi gi tin IPv4. V d: thc hin phn mnh, iu ny tiu tn CPU ca router v nh hng n hiu qu x l (gy tr, hng gi tin ). Nhng hn ch v tnh bo mt v kt ni u cui u cui: khng cung cp phng tin m ha d liu, ch yu s dng bo mt mc ng dng. Nu p dng IPSec (Internet Protocol Security) l mt phng thc bo mt ph bin ti tng IP, m hnh bo mt ch yu l bo mt lu lng gia cc mng, vic bo mt lu lng u cui u cui c s dng rt hn ch. Mc khc, gim nhu cu s dng a ch, hot ng mng IPv4 s dng ph bin cng ngh bin dch NAT. Trong , my ch bin dch a ch can thip vo gi tin truyn ti v thay th trng a ch cc my tnh gn a ch ring (private) c th kt ni vo mng Internet. Nhng cng ngh bin dch NAT li lun tn ti nhng nhc im nh:

GVHD: TS.Hunh Cng Php

SVTH: L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

- Kh thc hin c kt ni im im v gy tr: lm kh khn v nh hng ti nhiu dng dch v (mng ring o - VPN, dch v thi gian thc). i vi nhiu dng dch v cn xc thc cng (port) ngun /ch, s dng NAT l khng th c. Trong khi , cc ng dng mi hin nay, c bit cc ng dng khch - ch ngy cng i hi kt ni trc tip u cui u cui. - Vic gi tin khng c gi nguyn tnh trng t ngun ti ch, c nhng im trn ng truyn ti ti gi tin b can thip, nh vy tn ti nhng l hng v bo mt.

Hnh 1.1 M hnh thc hin NAT ca a ch IPv4

1.1.2 NGUYN NHN RA I A CH IPV6


Nh bit, IPv4 c kh nhiu nhc im, trong quan trng nht l vic khng gian a ch IPv4 ang cn kit. iu ny dn n tt yu phi ra i mt th h a ch mi gii quyt c nhng nhc im ca IPv4, l IPv6. Th h a ch IPv6 khng nhng gii quyt c nhng vn ca IPv4 m cn cung cp thm mt s u im: Khng gian a ch ln. Kh nng m rng v nh tuyn.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

H tr tt hn truyn thng nhm (truyn thng nhm l mt ty chn ca a ch IPv4, tuy nhin kh nng h tr v tnh kh dng cha cao). H tr end to end d dng hn v loi b hon ton cng ngh NAT. Khng cn phi phn mnh, khng cn trng kim tra phn u. Bo mt: do IPv6 h tr IPsec, n lm cho cc nt mng IPv6 tr nn an ton hn (thc ra IPsec c th hot ng c vi c IPv4 v IPv6). T ng cu hnh: n gin hn trong vic cu hnh a ch IP cho cc thit b bng vic s dng a ch IPv6. IPv6 c kh nng t ng cu hnh m khng cn my ch DHCP nh trong mng s dng a ch IPv4. Tnh di ng: cho php h tr cc nt mng s dng a ch IP di ng (thi im IPv4 c thit k, cha tn ti khi nim v IP di ng. Nhng th h mng mi th dng thit b ny ngy cng pht trin, i hi cu trc giao thc Internet phi h tr tt hn.). Hot ng: trng phn u IPv4 lm thay i kch thc ca gi tin IP v thng b b i khng tnh n. Do cc b nh tuyn thng chuyn hng hoc t chi cc gi khi n bn. y chnh l l do ta khng trin khai IPsec trn nn IPv4. Cc b nh tuyn IPv6 hot ng khc gia trn cch x l khc i vi a ch IP v cc tuyn. Gi tin IPv6 c hai dng phn u: phn u c bn (basic phn u) v phn u m rng (extension phn u). Phn u c bn c chiu di c nh 40 bytes, cha nhng thng tin c bn trong x l gi tin IPv6, thun tin hn cho vic tng tc x l gi tin. Nhng thng tin lin quan n dch v m rng km theo c chuyn hn ti mt phn on khc gi l phn u m rng. Chi ph : gim gi thnh v cng tc qun l, tng an ninh, hot ng tt hn, cn t tin hn ng k a ch IP. Cc chi ph ny s cn bng chi ph cho vic chuyn t a ch IPv4 sang a ch IPv6.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

Hnh 1.2 S pht trin ca a ch IP 1.2 CU TRC A CH IPV6 1.2.1 TNG QUAN V A CH IPV6 V S KHC BIT SO VI A CH IPV4 a ch IPv6 c chiu di gp bn ln chiu di a ch IPv4, gm 128 bits. IPv6 l phin bn k tha ca IPv4, thng c biu din dng hexadecimal. Tuy nhin, a ch IPv6 v a ch IPv4 c nhiu im khc bit vi nhau c th hin trong bng sau: a ch IPv4 di a ch l 32 bits (4 byte). IPsec ch l ty chn Phn u ca a ch IPv4 khng c trng xc nh lung d liu ca gi tin cho cc b nh tuyn x l QoS(cht lng dch v). Vic phn on c thc hin bi a ch IPv6 di a ch l 128 bits (16 bytes). IPsec c gn lin vi IPv6. Trng nhn dng cho php xc nh lung gi tin cc b nh tuyn c th m bo cht lng dch v QoS. Vic phn on ch c thc hin

c b nh tuyn v my ch gi gi bi my ch pha gi m khng c s

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

tin. Phn u c cha trng Checksum.

tham gia ca b nh tuyn. Khng c trng kim tra trong IPv6 Phn u. Tt c cc ty chn c trong Phn u m rng. Khung ARP yu cu c thay th bi cc thng bo d tm cc nt mng truyn thng ln cn Giao thc IGMP c thay th bi cc thng bo. S dng thng bo qung b b nh

Phn u c cha nhiu ty chn.

Giao thc ARP s dng ARP yu cu qung b xc nh a ch vt l. S dng giao thc IGMP qun l thnh vin cc nhm mng con cc b.

S dng ICMP tm kim nh tuyn xc nh a ch cng Gateway mc nh ph hp nht, l ty chn.

tuyn (Router Advertisement) v ICMP d tm b nh tuyn thay cho ICMP tm kim nh tuyn , l bt buc.

a ch qung b truyn thng tin n tt c cc nt trong mt mng con.

Trong IPv6 khng tn ti a ch qung b, thay vo l a ch truyn thng nhm. Cho php cu hnh t ng, khng s dng nhn cng hay cu hnh qua DHCP. a ch my ch c lu trong DNS vi mc ch nh x sang a ch IPv6. H tr gi tin kch thc 1280 bytes (khng cn phn on).

Thit lp cu hnh bng th cng hoc s dng DHCP.

a ch my ch c lu trong DNS vi mc ch nh x sang a ch IPv4. H tr gi tin kch thc 576 bytes (c th phn on).

Bng 1.1 S khc bit gia a ch IPv4 v a ch IPv6

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

1.2.2 C IM CA IPV6 Trong IPv6 giao thc Internet c ci tin mt cch rng ln thch nghi c s pht trin khng bit trc c ca Internet. nh dng v di ca nhng a ch IP cng c thay i vi nhng gi nh dng. Nhng giao thc lin quan, nh ICMP cng c ci tin. Nhng giao thc khc trong tng mng nh ARP, RARP, IGMP hoc b xo hoc c trong giao thc ICMPv6. Nhng giao thc tm ng nh RIP, OSPF cng c ci tin kh nng thch nghi vi nhng thay i ny. Nhng chuyn gia truyn thng d on l IPv6 v nhng giao thc lin quan vi n s nhanh chng thay th phin bn IP hin thi.Th h mi ca IP hay IPv6 c nhng u im nh sau: a. Khng gian a ch ln: IPv6 c a ch ngun v ch di 128 bt. Mc d 128 bt c th to hn 3,4*10 38 t hp, khng gian a ch ca IPv6 c thit k d phng ln cho php phn b a ch v mng con t trc xng sng internet n tng mng con trong mt t chc. Cc a ch hin ang phn b s dng ch chim mt lng nh v vn cn tha rt nhiu a ch sn sng cho s dng trong tng lai. Vi khng gian a ch ln ny, cc k thut bo tn a ch nh NAT s khng cn cn thit na. b. Tng s phn cp a ch Cc a ch ton cc ca Ipv6 c thit k to ra mt h tng nh tuyn hiu qu,phn cp v c th tng qut ha da trn s phn cp thng thy ca cc nh cung cp dch v Internet (ISP) trn thc t.Trn mng internet da trn Ipv6,cc router mng xng sng(backbone) c s mc trong bng nh tuyn nh hn rt nhiu. c. n gin ha vic t a ch Host IPv6 s dng 64 bit sau cho a ch Host, trong 64 bit c c 48 bit l a ch MAC ca my, do , phi m vo mt s bit c nh ngha trc m cc thit b nh tuyn s bit c nhng bit ny trn subnet. Bng cch ny, mi my trm s c mt Host ID duy nht trong mng. d. Khun dng phn u n gin ha

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

Phn u 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 phn u m rng c t pha sau ca phn u IPv6. Khun dng phn u mi ca IPv6 to ra s x l hiu qu hn ti cc b nh tuyn. e. 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 khng trng thi(stateless) (khng c server DHCP). Vi t cu hnh a ch dng khng trng thi, 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 b nh tuyn cc b. Thm ch nu khng c b nh tuyn, 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. f. 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. g. H tr tt hn v cht lng dch v QoS Lu thng trn mng c phn thnh cc lung cho php x l mc u tin khc nhau ti cc b nh tuyn. h. H tr tt hn tnh nng di ng Kh nng IP di ng tn ng c cc u im ca ipv6 so vi ipv4 i. Kh nng m rng Thit k ca ipv6 c s d phng cho s pht trin trong tng lai ng thi d dng m rng khi c nhu cu. 1.2.3
BIU DIN A CH IPV6

a ch IPv6 c vit hoc theo 128 bits nh phn, hoc thnh mt dy ch s hexa. Tuy nhin, nu vit mt dy s 128 bits nh phn th khng thun tin, v nh chng th khng th. Do vy, a ch IPv6 thng c biu din di dng mt dy ch s hexa. u tin, 128 bits nh phn ca a ch IPv6 c biu din

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

thnh dy ch s hexadecimal. Sau , nhm 128 bits ny thnh cc nhm 4 bits. Tip n, chuyn i tng nhm 4 bits thnh s hexa tng ng v nhm 4 s hexa thnh mt nhm phn cch bi du :. Kt qu, mt a ch IPv6 c biu din thnh mt dy s gm 8 nhm s hexa cch nhau bng du :, mi nhm gm 4 ch s hexa.

128 bt= 16 bytes= 32ch s trong h m 16 111111101111101100 ..111111111111

FDEC : : 7654 3210 ADBF 2922 FFFF

Hnh 1. 3: 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. V 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.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

Cha rt gn

1080:0000:0000:0000:0008:0800:200C:417A rt gn

1080: 0: 0: 0: 8: 800:200C:417A Hnh 1. 4 : 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 truyn thng nhm, vng lp 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 Hnh1. 5: 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:

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

10

1080:0:0:0:8::/80 Hnh1. 6 : a ch CIDR ( CIDR Address) 1.2.4 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
23

6.5*10

a ch trn mi mt vung b mt tri t. a ch IPv6 128 bt c chia

thnh cc min phn cp theo trt t trn Internet. 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. Hnh 1.7 cho chng ta thy dng ca a ch IPv6:

Hnh1. 7 : 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:

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

11

Hnh1. 8 : C ch phn b a ch 1.2.5 PHN LOI A CH IPV6 Mt trong nhng c im ni bt nht ca IPV6 l m rng cu trc a ch.vi thit k mi,IPV6 cho php tng chiu di mt a ch IP t 32bit ln 128 bits.vi kin trc a ch mi ny,khng gian a ch tng ln ti 1 con s v cng ln.Theo cch thc gi tin c gi n ch,IPv6 c 3 loi a ch sau: 1.2.5.1 a ch unicast(truyn thng n hng):

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

12

Hnh1. 9. Unicast m nhiu kt ni ti cc my tnh khch hng a ch truyn thng n hng xc nh mt giao din duy nht. Trong m hnh nh tuyn, cc gi tin c a ch ch l a ch truyn thng n hng ch c gi ti mt giao din duy nht. a ch truyn thng n hng c s dng trong giao tip mt mt. Do vy, cung cp dch v cho nhiu khch hng, my ch s phi m nhiu kt ni ti cc my tnh khch hng. Nhng dng a ch thuc loi truyn thng n hng a. a ch c bit : IPv6 s dng hai a ch c bit sau y trong giao tip. a ch 0:0:0:0:0:0:0:0 hay cn c vit "::" l loi a ch khng nh danh c nt mng IPv6 s dng th hin rng hin ti n khng c a ch. a ch :: c s dng lm a ch ngun cho cc gi tin trong quy trnh hot ng ca mt nt mng IPv6 khi tin hnh kim tra xem c mt nt mng no khc trn cng ng kt ni s dng a ch IPv6 m n ang d nh dng hay cha. a ch ny khng bao gi c gn cho mt giao din hoc c s dng lm a ch ch. a ch 0:0:0:0:0:0:0:0:1 hay "::1" c s dng lm a ch xc nh giao din vng lp, cho php mt nt mng gi gi tin cho chnh n, tng ng vi a ch 127.0.0.1 ca IPv4. Cc gi tin c a ch ch ::1 khng bao gi c gi trn ng kt ni hay chuyn tip i bi b nh tuyn. Phm vi ca dng a ch ny l phm vi nt mng. b. a ch phc v cho giao tip trn mt ng kt ni (a ch Link-local)

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

13

Link-local l loi a ch phc v cho giao tip ni b, gia cc nt mng IPv6 trn cng mt Ethernet. IPv6 c thit k vi tnh nng plug-and-play, l kh nng cho php thit b IPv6 t ng cu hnh a ch v cc tham s phc v cho giao tip bt u t trng thi cha c thng tin cu hnh no. Tnh nng c c v nt mng IPv6 lun c kh nng t ng cu hnh nn mt dng a ch s dng cho giao tip ni b. chnh l a ch Link-local. a ch Link-local lun c nt mng IPv6 cu hnh mt cch t ng, khi bt u hot ng, ngay c khi khng c s tn ti ca mi dng a ch truyn thng n hng khc. a ch ny c phm vi trn mt ng kt ni (mt Ethernet), phc v cho giao tip gia cc nt mng ln cn. Mt nt mng IPv6 c th t ng cu hnh a ch Link-local l do nt mng IPv6 c kh nng t ng cu hnh 64 bits nh danh giao din. a ch Link-local c to nn t 64 bits nh danh giao din (Interface ID) v mt tin t (prefix) quy nh sn cho a ch Link-local l FE80::/10. Cu trc a ch Link-local: khi khng c b nh tuyn, cc nt mng IPv6 trn mt ng kt ni s s dng a ch Link-local giao tip vi nhau. Phm vi ca dng a ch ny l trn mt ng kt ni. a ch Link-local bt u bi 10 bits tin t FE 80::/10, theo sau bi 54 bits 0. 64 bits cn li l nh danh giao din (Interface ID).

10 bits

54 bits

64 bits nh danh giao din

1111 1110 10

000 000

Hnh 1. 10 Cu trc a ch Link-local c. a ch phc v cho giao tip phm vi mt mng (a ch site-local)

a ch IPv6 c ngha ging a ch IPv4 (private), a ch IPv6 c thit k vi mc ch s dng trong phm vi mt mng. Khi b nh tuyn IPv6 khng chuyn tip gi tin c a ch site-local ra khi phm vi mng ring. Do vy, mt vng a ch site-local c th c dng trng lp cho nhiu mng c quan, t chc

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

14

m khng gy xung t nh tuyn IPv6 ton cu. a ch site - local trong mt mng dng ring khng th c truy cp ti t mt mng khc. a ch site-local c tin t FEC0::/10, tip theo l 38 bits 0 v 16 bits m t chc c th phn chia mng con (subnet), nh tuyn trong phm vi mng ca mnh. 64 bits cui l 64 bits nh danh giao din c th trong mt mng con.

10 bits

38 bits

16 bits nh danh mng con

64 bits nh danh giao din

1111 1110 11

000...000

Hnh 1. 11 Cu trc a ch Site local d. a ch nh danh ton cu (a ch Global Unicast) L dng a ch tng ng vi a ch IPv4 (public) ang c s dng. a ch nh danh ton cu c nh tuyn v c th lin kt ti trn phm vi ton b mng Internet. Nt mng IPv6 ngay t lc khi to c kh nng giao tip, do lun c kh nng t ng to nn dng a ch Link-local. Vi a ch ny, nt mng ch c th thc hin giao tip trong phm vi mt LAN. Ngoi ra, nt mng a ch IPv6 cng c kh nng t ng cu hnh bng cch tm kim v t ng gn a ch nh danh ton cu, qua nhng giao tip ni b s dng a ch Link-local. a ch nh danh ton cu c tin t bao gm ba bits 001::/3.
48 bits 45 bits 001 Tin t nh tuyn ton cu 16 bits nh danh mng con 64 bits nh danh giao din

Hnh 1.12. Cu trc nh danh ton cu 3 bits u tin xc nh dng a ch nh danh ton cu (lun lun c nh).45 bits tip theo (phn nh tuyn ton cu): cc t chc qun l s phn cp qun l vng a ch ny, chuyn giao li cho cc t chc khc. Kch thc vng a ch nh nht

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

15

qung b ra ngoi phm vi mt mng ca mt t chc thng thng theo cu trc ny l /48. Thng thng, kch thc vng a ch nh nht c phn b cho mt ISP l /32 v kch thc vng a ch thng thng cp cho mng ca ngi s dng cui cng l /48.Tuy nhin vng a ch ton cu lun c thay i v xem xt ph hp nht vi nhu cu v hot ng mng. 16 bits tip theo (vng nh tuyn trong mng site): l khng gian a ch m t chc c th t mnh qun l, phn b, cp pht v t chc nh tuyn bn trong mng ca mnh. Vi mt vng a ch /48, t chc c th to nn 65.536 mng con c /64 hoc nhiu cp nh tuyn phn cp hiu qu s dng trong mng ca mnh. e. a ch tng thch (a ch Compatibility) Ra i nhm mc ch to s tng thch gia mng xy dng trn nn a ch IPv4 vi mng xy dng trn nn a ch IPv6. a ch IPv6 tng thch c s dng trong nhng cng ngh chuyn i t a ch IPv4 sang a ch IPv6 bao gm: cng ngh bin dch gia a ch IPv4 IPv6 v cng ngh ng hm (Tunnel). a ch IPv6 tng thch c cu hnh nn t a ch IPv4 v c nhiu dng tu thuc theo cc cng ngh chuyn i khc nhau. Mt s dng hin nay khng cn c s dng na. y, em xin c trnh by 3 dng a ch tng thch l a ch IPv4-compatible, a ch IPv4-mapped, a ch 6to4. a ch IPv4 - compatible: a ch IPv4 tng thch c to t 32 bits a ch IPv4 theo cch thc gn cc bits ton 0 vo trc 32 bits a ch IPv4 v c vit nh sau: 0:0:0:0:0:0:w.x.y.z hoc ::w.x.y.z (w.x.y.z l a ch IPv4 vit theo cch thng thng).
80 bits 000.000 16 bits 0000 32 bits a ch IPv4

Hnh 1. 13. a ch IPv4 - compatible

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

16

Khi mt gi tin IPv6 c a ch ngun v ch dng IPv4-tng thch, gi tin IPv6 s c t ng bc trong gi tin c phn u IPv4 v gi ti ch s dng c s h tng mng IPv4. a ch IPv4-mapped(nh x) c to nn t 32 bits a ch IPv4 theo cch thc gn 80 bits 0 u tin, tip theo l 16 bits c gi tr hexa FFFF vi 32 bits a ch IPv4. a ch IPv4-nh x nh sau: 0:0:0:0:0:FFFF:w.x.y.z hoc ::FFFF:w.x.y.z (w.x.y.z l a ch IPv4 vit theo cch thng thng).
80 bits 000 .. 000 16 bits FFFF 32 bits a ch IPv4

Hnh 1.14 a ch IPv4-mapped a ch IPv4-nh x s dng biu din mt nt mng thun IPv4 thnh mt nt mng IPv6 phc v trong cng ngh bin dch a ch IPv4 a ch IPv6. a ch IPv4 nh x khng bao gi c dng lm a ch ngun hay a ch ch ca mt gi tin IPv6. a ch 6to4: Trong vng a ch nh danh ton cu ( xc nh bng 3 bits u 001), IANA dnh ring mt di a ch, t tn l a ch 6to4, lm mt dng a ch tng thch phc v cho mt cng ngh to ng hm c tn gi cng ngh ng hm 6to4. a ch 6to4 c s dng trong giao tip gia hai nt mng chy ng thi c hai th tc IPv4 v IPv6 trn mng c s h tng nh tuyn ca IPv4. a ch 6to4 c hnh thnh nh sau: trong vng a ch nh danh ton cu, IANA cp pht mt di a ch dnh ring 2002::/16 to nn a ch 6 to 4 v bng cch gn 16 bits tin t 2002 ni trn vi 32 bits a ch IPv4 vit di dng hexa, t to nn mt vng a ch IPv6 kch thc /48. Vng a ch ny s c s dng to nn mng IPv6. Cc mng ny s kt ni vi nhau trn c s h tng mng Internet IPv4.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

17

1.2.5.2 a ch Multicast
a ch truyn thng nhm nh danh mt nhm nhiu giao din. Gi tin c a ch ch l a ch truyn thng nhm s c gi ti tt c cc giao din trong nhm c gn a ch . a ch truyn thng nhm c s dng trong giao tip mt nhiu. a ch truyn thng nhm c thit k thc hin c chc nng qung b v truyn thng nhm. Mi dng a ch truyn thng nhm c phm vi hot ng nht nh. Lu lng ca a ch truyn thng nhm s c chuyn ti ton b cc nt mng trong mt phm vi no hay ch c chuyn ti nhm cc nt mng trong phm vi l ty thuc vo dng a ch truyn thng nhm.

Hnh 1.15. Kt ni Multicast Vng a ch c tin t FF::/8 (8 bits u l 1111 1111), chim 1/256 khng gian a ch IPv6 c dnh ring lm a ch truyn thng nhm. a ch truyn thng nhm lun c bt u bi 8 bits tin t 1111 1111 v a ch truyn thng nhm khng bao gi c s dng lm a ch ngun ca mt gi tin IPv6.
8 bits 1111 1111 4 bits 4 bits flags Phm vi 80 bits 000..000 32 bits nh danh nhm

Hnh 1.16. Cu trc a ch Multicast

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

18

Chc nng cc nhm bits trong cu trc a ch Multicast 4 bits c (flats): trng ny c bn bits "0T00", trong 3 bits hin cha s dng c t gi tr 0, bit T s xc nh y l dng a ch truyn thng nhm c IANA gn vnh vin, s dng thng nht trong hot ng Internet IPv6 ton cu, hay l dng a ch Multicast do ngi s dng t gn. Nu bit T = 0, y l a ch truyn thng nhm vnh vin c IANA quy nh. Danh sch cc a ch ny c cung cp trong RFC2375 (IPv6 Multicast Address Assignments). Trong s c nhng dng a ch phc v cho nhng quy trnh hot ng ct yu ca IPv6, s dng cho nhng giao tip khi mt nt mng cn giao tip vi ton b hoc vi nhm cc nt mng xc nh trn mt ng kt ni (Ethernet). V d: FF02::1 l a ch truyn thng nhm gi ti mi nt mng trn mt ng kt ni. FF02::2 l a ch truyn thng nhm gi ti mi b nh tuyn (router) trn mt ng kt ni. Nu bit T = 1, y l dng a ch truyn thng nhm c gn bi ngi s dng trong mt phm vi nht nh. a ch truyn thng nhm s khng c ngha ngoi phm vi . Mt cch thc to nn a ch ny l t chc s dng tin t (prefix) ca vng a ch nh danh ton cu ca mnh gn cng vi 8 bits tin t FF to nn a ch truyn thng nhm. 4 bits phm vi (scope): trng ny xc nh phm vi ca nhm a ch truyn thng nhm. 1 : phm vi trong mt thit b (phm vi nt mng). Nu trng phm vi c gi tr l 0001 th phm vi ca a ch truyn thng nhm ny l phm vi nt mng. Gi tin truyn thng nhm s ch c gi trong phm vi cc giao din trong mt thit b m thi.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

19

2 : phm vi mt ng kt ni (phm vi Link). Nu trng phm vi c gi tr l 0010 th phm vi ca a ch truyn thng nhm l phm vi kt ni. Gi tin truyn thng nhm c gi trn phm vi ton b ng kt ni. 5 : phm vi mt mng (phm vi Site). 8 : phm vi t chc (phm vi Organization). E : phm vi ton cu (phm vi Global). Cc gi tr khc hin nay cha c gn.

global

site

link

Hnh 1.17. Phm vi ca a ch IPv6 32 bits nh danh nhm (Group ID): trng ny thc hin chc nng nh danh cc nhm truyn thng nhm. Trong mt phm vi, c nhiu nhm truyn thng nhm. Gi tr cc bits nh danh nhm s xc nh cc nhm truyn thng nhm.Trong mt phm vi, s nh danh ny l duy nht. Lu lng c a ch ch Multicast s c chuyn ti cc my thuc nhm truyn thng nhm t xc nh bi nh danh nhm Group ID, trong phm vi xc nh bi gi tr trng phm vi. Nhng dng a ch thuc loi truyn thng nhm a. a ch truyn thng nhm vnh vin: khi thit b c kch hot h tr IPv6, cc nt mng phi tham gia vo mt s nhm truyn thng nhm bt buc. Nt mng phi tham gia vo nhm truyn thng nhm dnh cho mi nt mng trong phm vi nt mng v phm vi kt ni. B nh tuyn phi tham gia vo nhm truyn thng nhm dnh cho mi b nh tuyn phm vi nt mng, phm vi kt ni. Truyn thng nhm ti mi nt mng: nhm truyn thng nhm mi nt mng gn gi
tr Group ID l "1".

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

20

a ch truyn thng nhm

Tn gi

Gi phm vi

tr

Gi tr Group ID "1"- Xc nh nhm

a ch truyn thng "1"-xc FF01::1 phm vi nt mng

nhm mi nt mng, nh phm truyn thng nhm vi nt mng mi nt mng "1"- Xc nh nhm

a ch truyn thng "2"-xc FF02::2 phm vi kt ni vi kt ni

nhm mi nt mng, nh phm truyn thng nhm mi nt mng

Bng 1.2 a ch multicast mi nt mng

My ch gi gi tin ti a ch truyn thng nhm mi nt mng phm vi kt ni

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

21

My ch gi gi tin ti a ch truyn thng nhm mi b nh tuyn phm vi kt ni Hnh 1.18. Multicast trong phm vi mt ng kt ni truyn thng nhm t ti mi b nh tuyn: nhm truyn thng nhm mi b nh tuyn gn gi tr Group ID l "2". a ch Multicast Tn gi a ch truyn thng FF01::2 nhm mi b nh tuyn, phm vi nt mng a ch truyn thng FF02::2 nhm mi b nh tuyn, phm vi kt ni "2"-xc nh phm vi mt ng kt ni "1"-xc nh phm vi mt thit b Gi tr scope Gi tr Group ID 2- Xc nh nhm truyn thng nhm Mi b nh tuyn "2"- Xc nh nhm truyn thng nhm Mi b nh tuyn "2"- Xc nh "5"-xc nh phm vi mt mng nhm truyn thng nhm Mi b nh tuyn

a ch truyn thng FF05::2 nhm mi b nh tuyn, phm vi 1 mng

Bng 1.3 a ch multicast mi router b. a ch Multicast Solicited nt mng Nh bit, th tc phn gii a ch (Address Resolution Protocol-ARP) ca IPv4 c mt hn ch l s dng a ch broadcast (qung b) nn khi mt nt mng thc hin th tc phn gii a ch, vn l quy trnh din ra thng xuyn nn lm phin ti mi nt mng trn mng LAN, lm gim hiu qu ca mng. Trong IPv6, chc nng phn gii a ch c m nhim bng mt th tc mi, ph trch giao tip ca cc nt mng trn mt ng kt ni c tn gi l th tc pht hin nt mng ln cn. Trong qu trnh phn gii a ch, trnh tc ng n ton b cc

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

22

nt mng trn ng kt ni, IPv6 s dng mt dng a ch truyn thng nhm c bit, c tn gi a ch nt mng thu ht truyn thng nhm. a ch nt mng thu ht truyn thng nhm c cu thnh t a ch truyn thng n hng gn cho nt mng. Mi mt a ch n hng c gn cho nt mng s c mt a ch nt mng thu ht truyn thng nhm tng ng. a ch nt mng thu ht truyn thng nhm c cu thnh t a ch truyn thng n hng bng cch gn 104 bits tin t (prefix) FF02::1:FF/104 vi 24 bits cui cng chnh l 24 bits cui ca a ch truyn thng n hng. c th giao tip, nt mng cn phn gii c cc a ch n hng IPv6 gn cho nt mng thnh a ch lp 2 tng ng, do vy vi mi mt a ch n hng c gn cho nt mng s c mt a ch nt mng thu ht truyn thng nhm. Nt mng IPv6 s va nghe lu lng ti a ch truyn thng n hng va nghe lu lng ti a ch nt mng thu ht truyn thng nhm tng ng a ch truyn thng n hng .
64 bits Tin t ca di a ch Unicast 64 bits nh danh giao din (Interface ID) 24 bits FF02: 0:0:0:0 :1:FF

Hnh 1.19 Cu thnh a ch Multicast Solicited nt mng t a ch Unicast

V d: Mt nt mng IPv6 c a ch: a ch Link-local FE80::2AA:FF:FE3F:2A1C. a ch Multicast Solicited nt mng tng ng a ch Link-local ny l FF02::1:FF3F:2A1C. Nu nt mng c gn a ch Unicast ton cu 2001:dc8::3005:BC68. a ch Multicast Solicited nt mng tng ng a ch Unicast ny lFF02::1:FF3F:BC68.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

23

1.2.5.3 a ch Anycast Anycast l khi nim mi trong a ch IPv6. a ch Anycast xc nh tp hp nhiu giao din. Trong m hnh nh tuyn, gi tin c a ch ch Anycast ch c gi ti mt giao din duy nht trong tp hp. Giao din l giao din gn nht theo khi nim ca th tc nh tuyn.

Hnh 1.20.cu trc a ch Anycast Anycast khng c khng gian a ch ring m thuc vng a ch Unicast (vng a ch xc nh bi tin t 001). Khi mt a ch Unicast c gn ng thi cho nhiu giao din, n s tr thnh a ch Anycast. Bi vy, a ch Anycast cng c ba phm vi (link local, site local v global local) nh a ch Unicast. Nhng vic s dng ca a ch Anycast cng khng r rng. Hin nay ang c nhng tho lun v vic c s dng dng a ch Anycast cho nhng mc ch nh tm DNS hoc Universal Plug and Play. Mt a ch Anycast c th c gn cho nhiu giao din ca nhiu nt mng. a ch Anycast khng bao gi c s dng lm a ch ngun ca mt gi tin IPv6. Hin nay, a ch Anycast khng c gn cho my tnh IPv6 m ch c gn cho cc b nh tuyn (router) IPv6. ng dng mong mun ca a ch Anycast l s dng xc nh mt tp cc b nh tuyn thuc v mt nh cung cp dch v Internet. Nhng dng a ch thuc loi Anycast Hin nay, mi ch c mt dng a ch Anycast c nh ngha v ng dng, c tn gi a ch Anycast Subnet-Router. Cch thc to a ch Anycast Subnet - Router t tin t ca mng con: gi nguyn cc bits tin t ca mng con (subnet) v t mi bits khc v gi tr 0. Ly a ch thu c lm a ch Anycast Subnet -Router ca mng con. Mi giao din b nh tuyn gn vi mng con ny c ng thi gn a ch Anycast Subnet - Router trn. a ch ny c s dng mt nt mng t xa giao tip vi mt trong s nhng b nh tuyn ca subnet.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

24

1.2.6 LA CHN A CH MC NH TRONG IPV6 IPv6 cho php nhiu a ch, thuc nhiu dng c th gn cho cng mt giao din. Vic c nhiu a ch trn mt giao din khin cho cc thc thi IPv6 thng xuyn i din vi tnh trng nhiu a ch ngun v a ch ch khi khi to giao tip. gim thiu tnh trng ny, c mt thut ton la chn a ch ngun v a ch ch. Thut ton cho php la chn a ch ny s dng nhiu yu t cn nhc. Trong c mt s yu t nh sau: Tnh trng a ch: mi mt a ch IPv6 gn cho nt mng IPv6 i km vi khong thi gian "sng" hp l. Nt mng IPv6 qun l tnh trng a ch theo thi gian sng, trong "preferred" tc a ch cn c la chn v "deprecated" tc a ch b i. Khi la chn a ch s dng trong giao tip, nt mng IPv6 s khng s dng nhng a ch "deprecated". Bng chnh sch (Policy Table): thut ton la chn a ch cn s dng trong bng lu tr gi l Policy Table. Bng ny lu tr cc tin t a ch (prefix) c gn cho nt mng vi hai gi tr i km l gi tr ch quyn u tin (Precedence) v gi tr nhn (Label). Trong , gi tr quyn u tin c s dng sp xp a ch ch v gi tr nhn s dng la chn mt prefix ngun nht nh tng ng vi mt prefix ch nht nh. Cc thut ton thng hay s dng a ch ngun (S) tng ng vi a ch ch (D) khi Label (S) = Label (D). Khi la chn gi tr nhn trng khp trong bng chnh sch, a ch s c la chn: Ngun l a ch thun IPv6 Ngun l a ch 6to4 Ngun l a ch IPv6-compatible Ngun l a ch IPv6-map ch l a ch thun IPv6. ch l a ch 6to4.

ch l a ch IPv6-compatible. ch l a ch IPv6-map.

S dng th t tr v ca DNS: khi nt mng IPv6 A kt ni ti mt nt mng B no , n c th la chn a ch ch cho giao tip trong s nhng a ch ca B da trn th t tr v t truy vn DNS.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

25

1.2.7

PHN U IPV6 Hot ng ca Internet da trn cc th tc, l tp cc quy trnh phc v cho

giao tip. Trong th tc Internet, nhng thng tin phc v cho thit lp giao tip v truyn ti d liu nh a ch IP ca ni gi v ni nhn gi tin, v nhng thng tin cn thit khc c t pha trc d liu. Phn thng tin c gi l phn u. Phn u IPv6 l phin bn ci tin, c t chc hp l hn so vi Phn u IPv4. Trong loi b i mt s trng khng cn thit hoc t khi s dng v thm vo nhng trng h tr tt hn cho lu lng thi gian thc.
8 16 C.d mo Phin bn Dng dch v u nh danh Thi gian sng Th tc a ch ngun (32 bits) a ch ch (32 bits) Ty chn m C 4

Tng chiu di Ch nh phn mnh Kim tra mo u

Hnh 1.21 Phn u ca IPv4


4 Phin bn Phn dng lu lng 12 16 24 Nhn dng Mo u tip theo Gii hn bc

Chiu di ti d liu

a ch ngun (128 bits)

a ch ch (128 bits)

Hnh 1.22 Phn u ca IPv6

1.2.7.1 Chiu di Phn u Ipv6:


Phn u IPv4 c mt trng chiu di khng c nh, l "Tu chn". Trng Tu chn" c s dng thm cc thng tin v cc dch v tu chn khc nhau trong IPv4, nh thng tin lin quan n m ho. Do , chiu di ca

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

26

Phn u IPv4 thay i tu theo tnh trng. V s thay i , cc b nh tuyn iu khin giao tip da trn nhng thng tin trong phn Phn u khng th bit trc chiu di ca Phn u. iu ny cn tr vic tng tc x l gi tin. Gi tin IPv6 c hai dng Phn u: phn u c bn (basic phn u) v phn u m rng (extension phn u). Phn u c bn c chiu di c nh 40 bytes, cha nhng thng tin c bn trong x l gi tin IPv6, thun tin hn cho vic tng tc x l gi tin. Nhng thng tin lin quan n dch v m rng km theo c chuyn hn ti mt phn on khc gi l phn u m rng.

Hnh 1.23 Cu trc gi tin IPv6

1.2.7.2 Nhng trng b i trong Phn u IPv6


Ty chn: nhng thng tin lin quan n dch v km theo (vn c m t bng trng Ty chn trong Phn u IPv4) c chuyn t ring trong Phn u m rng, t ngay sau Phn u c bn. V vy, chiu di phn u c bn ca IPv6 l c nh (40 bytes). Kim tra Phn u: l mt s s dng kim tra li trong Phn u, c tnh ton ra da trn nhng thng tin Phn u. Do gi tr ca trng "Thi gian sng" thay i mi khi gi tin c truyn qua mt b nh tuyn (router), s kim tra Phn u cn phi c tnh ton li mi khi gi tin i qua mt b nh tuyn IPv4. Nhng IPv6 gii phng b nh tuyn khi cng vic ny, nh gim c tr. Do lp TCP pha trn lp IP c kim tra li thng tin nn vic thc hin php tnh tng t ti tng IP l khng cn thit v d tha. Chiu di phn u: chiu di phn u c bn ca gi tin IPv6 c nh l 40 byte, do vy khng cn thit c trng ny.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

27

nh danh; c; ch nh phn mnh: y l nhng trng phc v cho vic phn mnh gi tin (IPv4). Trong IPv6, thng tin v phn mnh khng bao gm trong phn u c bn m c chuyn hn sang mt phn u m rng c tn gi phn u phn mnh. B nh tuyn IPv6 khng tin hnh phn mnh gi tin. Vic thc hin phn mnh do ng dng thc hin ngay ti my tnh ngun. Do vy, cc thng tin h tr phn mnh c b i khi phn u c bn l phn c x l ti cc b nh tuyn v c chuyn sang phn u m rng, l phn c x l ti u cui. 1.2.1.1 So snh gia vng phn u ca IPv4 v Ipv6 Trng di vng phn u b loi i trong IPv6 v di vng phn u c x l trong phin bn ny. Trng kiu dch v b loi i trong IPv6. Trng quyn u tin v nhn lu lng cng kim sot chc nng ca trng kiu dch v. Trng di tng cng b loi i trong IPv6 v c thay th bng trng di payload (ti d liu). Nhng Trng chng thc ( identification ), Trng c ( flag ), v nhng Trng offset b loi b t vng phn u nn tng trong IPv6. Chng c i km trong vnh phn u m rng tng ming. Trng TTL(Time To Live) c gi l Gii hn nhy trong IPv6. Trng giao thc dc thay th bi Trng vng phn u k tip. Vng phn u kim tra b loi i v kim tra c cung cp bi giao thc ca tng cao hn n v th khng cn thit y. Nhng Trng tu chn trong IPv4 c trang b nh nhng vng phn u m rng trong IPv6.

1.2.8 VNG PHN U M RNG


Phn u m rng l c tnh mi ca th h a ch IPv6. Trong IPv4, thng tin lin quan n nhng c tnh m rng (v d xc thc, m ho) c trong phn Tu chn ca Phn u IPv4. a ch IPv6 a nhng c tnh m rng v cc dch v thm vo thnh mt phn ring, tch bit khi Phn u c bn ca gi tin, c gi l Phn u m rng. Mt gi tin IPv6 c th c mt hay nhiu Phn u

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

28

m rng, c t sau Phn u c bn. Cc Phn u m rng c t ni tip nhau theo th t quy nh, mi dng c cu trc trng ring. Phn u c bn (kch thc 40 bytes) trong gi tin IPv6 l phn thng tin c x l ti mi b nh tuyn gi tin i qua trong khi , cc Phn u m rng li c x l ti ch. Tuy nhin, cng c dng Phn u m rng c x l ti mi b nh tuyn m gi tin i qua, l dng Phn u m rng "Tng bc" Trng Phn u tip theo s xc nh gi tin c tn ti Phn u m rng hay khng. Nu khng c Phn u m rng, gi tr ca trng s xc nh phn Phn u ca tng cao hn (TCP hay UDP, ), pha trn tng IP. Nu c, gi tr trng Phn u tip theo ch ra loi Phn u m rng u tin theo sau Phn u c bn. Trng Phn u tip theo ca Phn u m rng th nht s tr ti Phn u m rng th hai, ng k tip n. Trng Phn u tip theo ca Phn u m rng cui cng s c gi tr xc nh Phn u tng cao hn.

Hnh 1.24 Phn u m rng ca a ch IPv6


Gi tr trng Phn u tip theo c th hin trong bng Bng 1.4 Gi tr trng phn u tip theo trong cc phn Phn u

Gi tr 0 43 44 50 51 60

Dng Phn u m rng tng ng Tng bc nh tuyn Phn mnh M ha Xc thc ch

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

29

Hin nay, c 6 dng Phn u m rng tng ng 6 dch v ang c nh ngha. l: Tng bc (Hop-By-Hop), ch (Destination), nh tuyn(Routing), Phn mnh (Fragment), Xc thc (Authentication Phn u - AH), v M ho (Encapsulating Security Payload - ESP). Th t cc Phn u m rng trong gi tin c t theo mt quy tc nht nh.

Hnh 1.25.Nhng loi vng phn u m rng (Extension phn u types) Cc dng Phn u m rng ca IPv6 Tng bc (Hop by Hop): l Phn u m rng c t u tin ngay sau Phn u c bn. Phn u ny c s dng xc nh nhng tham s nht nh ti mi bc (hop) trn ng truyn dn gi tin t ngun ti ch. Do vy s c x l ti mi b nh tuyn (router) trn ng truyn dn gi tin. ch (Destination): c s dng xc nh cc tham s truyn ti gi ti ch tip theo hoc ch cui cng trn ng i ca gi tin. Nu trong gi tin c Phn u m rng "nh tuyn" th Phn u m rng "ch" mang thng tin tham s x l ti mi ch ti tip theo. Ngc li, nu trong gi tin khng c Phn u m rng "nh tuyn" th thng tin trong Phn u m rng "ch" l tham s x l ti ch cui cng.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

30

nh tuyn (Routing): m nhim xc nh ng dn nh tuyn ca gi tin. Nu mun gi tin c truyn i theo mt ng xc nh (khng la chn ng i ca cc thut ton nh tuyn), nt mng IPv6 ngun c th s dng Phn u m rng nh tuyn xc nh ng i, bng cch lit k a ch ca cc b nh tuyn (router) m gi tin phi i qua. Cc a ch thuc danh sch ny s c ln lt dng lm a ch ch ca gi tin IPv6 theo th t c lit k v gi tin s c gi t b nh tuyn ny n b nh tuyn khc, theo danh sch lit k trong Phn u m rng nh tuyn. Phn mnh (Fragment): Phn u m rng Phn mnh mang thng tin h tr cho qu trnh phn mnh v ti to gi tin IPv6, c s dng khi ngun IPv6 gi i gi tin ln hn gi tr MTU (Maximum Transmission Unit) nh nht trong ton b ng dn t ngun ti ch. Trong hot ng ca a ch IPv4, mi b nh tuyn (router) trn ng dn cn tin hnh phn mnh gi tin theo gi tr ca MTU t cho mi giao din, iu ny lm gim hiu sut ca b nh tuyn. Bi vy trong a ch IPv6, b nh tuyn khng thc hin phn mnh gi tin. Vic ny c thc hin ti ngun gi gi tin. Nt mng ngun IPv6 s thc hin thut ton tm kim gi tr MTU nh nht trn ton b mt ng dn nht nh t ngun ti ch (gi l gi tr PathMTU) v iu chnh kch thc gi tin tu theo gi tr ny trc khi gi chng. Nu ti ngun p dng phng thc ny, n s gi d liu c kch thc ti u, v khng cn thit x l ti tng IP. Tuy nhin, nu ng dng khng s dng phng thc ny, n phi chia nh gi tin c kch thc ln hn PathMTU. Trong trng hp , nhng gi tin ny cn c phn mnh ti tng IP ca nt mng ngun v phn u m rng Phn mnh c s dng mang nhng thng tin phc v cho qu trnh phn mnh v ti to gi tin IPv6 ti cc u cui ng kt ni. M ho (Encapsulating Security Payload - ESP): trong hot ng ca a ch IPv6, thc thi IPSec c coi l mt c tnh bt buc. Ty tng trng hp m IPSec c s dng. Khi IPSec c s dng, gi tin IPv6 cn c cc dng phn u m rng Xc thc v M ho". phn u m rng Xc thc dng xc

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

31

thc v bo mt tnh ng nht ca d liu . phn u m rng M ho dng xc nh nhng thng tin lin quan n m ho d liu. Th t t cc phn u m rng: khi s dng cng lc nhiu phn u m rng, cc phn u m rng ny c sp xp nh sau trong gi tin IPv6.

a ch IPv6 X l bi mi b nh tuyn trn ng X l bi b nh tuyn lit k trong mo u nh tuyn Lit k b nh tuyn s i qua

Tng bc

ch

inh tuyn

Phn mnh

X l ti ch

Xc thc

X l ti ch, sau khi ti to gi tin

M ha

M ha thng tin

ch

Ch c x l ti ch

Lp trn

Hnh 1.26 Th t x l cc phn u m rng


1.3 KT LUN CHNG Chng ny trnh by nhng hn ch ca phin bn IPv4,nhng im ni bt, cu trc tng quan ca a ch IPv6 v mt s dng a ch c bit thng c s dng. Chng ny cng cp ti mt phn thng tin c s dng trong gi d liu IP khi truyn dn cc b nh tuyn c th d dng lm vic hn l phn u (header). Phn u IPv6 l phin bn ci tin, c t chc hp l hn so vi phn u IPv4. Trong loi b i mt s trng khng cn thit hoc t khi s dng v thm vo nhng trng h tr tt hn cho lu lng thi gian thc.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

32

CHNG 2: C TNH V QUY TRNH HOT NG CA A CH IPV6 2.1 C TNH CA A CH IPV6 2.1.1 TNG QUT CHUNG Th h Internet IPv6 c pht trin do nguyn nhn v nguy c cn kit khng gian a ch IPv4. Tuy nhin, khng phi l l do duy nht. Hot ng Internet n thi im cn c th tc Internet u vit hn, p ng c cc yu cu v dch v ngy cng phong ph trn mng Internet, cng nh xu hng tch hp mng Internet vi mng vin thng, cung cp a dng dch v trn mt c s h tng mng thng nht. a ch IPv6 c nhiu c tnh u vit, c ci tin so vi th h trc IPv4. Trong , nhiu c tnh c tiu chun ha, cng cn nhiu c tnh cha c tiu chun ha hon thin, cn tip tc pht trin; nhiu c tnh c p dng rng ri v bt buc khi IPv6 hot ng, mt s cn cha c p dng rng ri. Tuy nhin c mt im chc chn, a ch IPv6 s c s dng, ng gp trong mng th h sau v pht huy nhng u im ca mnh. IPv6 c mt s c tnh ni tri nh sau: Khng gian a ch ln hn: nguyn nhn chnh ra i a ch IPv6 l s m rng v khng gian a ch. a ch IPv6 c chiu di 128 bits, gp 4 ln chiu di ca a ch IPv4. V l thuyt, m rng khng gian a ch t 4 t ln ti mt con s khng l ( 2128 = 3,4 x 1038) a ch. Tuy nhin vic qun l a ch IPv6 cng cn phi tht cht v thi im khi cng ngh thng tin ang pht trin th cha th bit trc c mng Internet s pht trin nh th no. Cng ging nh ti thi im ban u ca IPv4, ngi ta bung lng, khng qun l cht ch khng gian a ch. Do vy, gn y cc chnh sch qun l a ch IPv6 ang c iu chnh thch hp hn. Phn cp nh tuyn v phn cp a ch r rng hn: a ch IPv4 c th s dng bt c di tin t mng (prefix) no trong phm vi 32 bits. Vic nh a

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

33

ch IPv4 va c tnh phn cp, va khng phn cp. iu ny lm nh hng ti kh nng t hp nh tuyn v em li nguy c gia tng bng thng tin nh tuyn ton cu. Nhng a ch IPv6 th khc, vi thit k cu trc nh a ch v phn cp nh tuyn thng nht. Trong 128 bits a ch th 64 bits cui cng c s dng lm nh danh giao din. Phn cp nh tuyn ton cu da trn mt s mc c bn i vi cc nh cung cp dch v. Cu trc nh tuyn phn cp gip cho a ch IPv6 trnh khi nguy c qu ti bng thng tin nh tuyn ton cu vi chiu di a ch ln ti 128 bits. n gin ha dng thc ca phn u: phn u c bn c kch thc c nh gip tng hiu qu x l cho b nh tuyn. Vic t cc tu chn sang phn u m rng cho php nng cao tnh linh hot, c th c nhng tu chn mi trong tng lai. Kh nng cu hnh t ng a ch v nh s li: c th gn a ch v nhng thng s hot ng cho thit b IPv6 khi n kt ni vo mng m khng cn nhn cng cu hnh bng tay. C th s dng DHCPv6, gi l dng thc cu hnh t ng c trng thi (stateful autoconfiguration). Bn cnh , thit b IPv6 cn c kh nng t ng cu hnh a ch v cc thng s hot ng m khng cn c s h tr ca my ch DHCP. l c im mi trong th h a ch IPv6, c gi l dng thc cu hnh khng trng thi (stateless autoconfiguration). H tr cho cht lng dch v: IPv6 mo u c mt trng Nhn dng, trng ny cho php nh dng lu lng IPv6. Nhn dng cho php b nh tuyn (router) nh dng v cung cp cch thc x l c bit nhng gi tin thuc mt dng nht nh gia ngun v ch. Kh nng m rng: a ch IPv6 c thit k c tnh nng m rng. Cc tnh nng m rng c t trong mt phn mo u m rng ring sau mo u c bn. Khng ging nh mo u IPv4, ch c th h tr 40 bytes cho phn tu chn (Option), a ch IPv6 c th d dng c thm nhng tnh nng mi bng cch thm nhng mo u m rng sau mo u c bn.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

34

2.1.2 CHT LNG DCH V (QoS) TRONG TH H A CH IPV6 Trong hot ng mng, QoS l mt yu t rt quan trng. QoS lin h mt thit vi cc yu t sau nh: mt d liu, tr, bng thng dch vTt c chng nh hng ln n vic truyn ti d liu n ngi s dng m c th l cc kt ni u cui - u cui. Phn u ca a ch IPv4 c trng "Dng dch v" 8 bits, c s dng phn nh mc u tin v mt s gi tr khc dnh cho lu lng IPv4. Trong 3 bits dng xc nh u tin ca gi tin (s c 8 mc u tin); 4 bits tip theo c gi l ToS (Type of Service) gip xc nh dch v v mt s cc thng s khc nh tr, thng lng, tin cy; bit cui cng khng s dng, lun t gi tr 0. Phn u ca a ch IPv6 c hai trng c s dng phc v QoS:

bits 0

8 16 C.d mo Phin bn Dng dch v u nh danh Thi gian sng Th tc a ch ngun (32 bits) C

31 Tng chiu di Ch nh phn mnh Kim tra mo u IPv4

bits 0

12

16

24 Nhn dng Mo u tip theo

31

Phn dng lu Phin bn lng Chiu di ti d liu

Gii hn bc IPv6

a ch ngun (128 bits)

a ch ch (128 bits)

Hnh 2.1. Trng h tr QoS trong phn phn u ca Ipv4 v IPv6 Phn dng lu lng (8 bits) thc hin chc nng tng t trng Dng dch v ca a ch IPv4. Trng ny c s dng biu din mc u tin ca gi

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

35

tin. i vi th h a ch IPv6, trng Phn dng lu lng vi s bits nhiu hn s gip phn nh tt hn mc u tin cho gi tin. Nhn dng l trng mi ca phn u IPv6. Khi c s dng, trng ny s h tr tt hn thc thi QoS. Mt ngun IPv6 c th s dng 20 bits trng Nhn dng trong phn u IPv6 lm s nh danh xc nh gi tin gi i trong mt dng nht nh, yu cu router x l c bit hn. Nh vy, nhng ci tin trong phn u IPv6, cng vi nhng u im khc ca IPv6 nh: khng phn mnh, nh tuyn phn cp, c bit gi tin IPv6 c thit k vi mc ch x l hiu qu ti b nh tuyn Tt c to ra kh nng h tr tt hn cho cht lng dch v. 2.1.3 H tr tt hn v bo mt Trong hot ng Internet, vn bo mt ch yu c thc hin ti tng IP, ph bin l bng cng ngh IPSec. IPSec thc hin chc nng xc thc ni gi v m ha ng kt ni, do vy m bo c kt ni bo mt. IPSec c hai phng thc lm vic: "phng thc ng hm - Tunnel mode" v "phng thc truyn ti - transport mode". Phng thc ng hm thc hin IPSec bng vic thm mt phn u mi v ly ton b gi tin IP trc kia lm phn d liu (payload) cn phng thc truyn ti p dng IPSec cho truyn gi tin IP bi host, c s dng trong bo mt kt ni u cui - u cui gia cc nt mng. V cu trc IPSec bao gm: hai th tc bo mt Authentication Phn u (AH) v Encapsulating Security Payload (ESP); cc c s d liu lu tr tham s v chnh sch v bo mt v cc th tc trao i kha. Trong IPv6, thc thi IPSec c nh ngha nh l mt c tnh bt buc ca a ch IPv6 khi cc th tc bo mt ca IPSec c a vo thnh hai c tnh l hai phn u m rng ca a ch IPv6. l phn u Xc thc (Authentication Phn u - AH) v phn u M ho (Encapsulating Security Payload - ESP). Hai phn u ny c th c s dng cng lc, hoc ring r cung cp cc mc bo mt khc nhau cho nhng ngi s dng khc nhau. Trong hot ng mng IPv4, cng ngh bin dch a ch NAT c s dng v cng rng ri. Thit b thc hin NAT can thip v thay i phn u ca gi

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

36

tin, iu ny gy cn tr trong vic thc hin IPSec. Th h a ch IPv6 vi khng gian a ch v cng rng ln vi vic h tr IPSec s c s dng rng ri trong cc giao tip u cui u cui. 2.2 QUY TRNH HOT NG C BN CA A CH IPV6 2.2.1 MT S TH TC C BN C S DNG TRONG A CH IPV6 Th tc lp mng (Internet Protocol - IP) cung cp phng thc kt ni nhng mng ni b ring r thnh mt mng ln hn (lin mng - internetwork). 2.2.1.1 Th tc iu khin internet phin bn 6

Vai tr ca th tc iu khin ca Internet phin bn 6 (ICMPv6) trong hot ng ca IPv6


Th tc ICMP trong hot ng Internet phin bn 4 c s dng truyn ti nhng gi tin, c s dng vi mc ch bo li v iu khin truyn ti IP, cng nh thc hin nhng chc nng chn on mng. Phc v cho qu trnh li (redirect), l qu trnh b nh tuyn thng bo cho my tnh v mt ch tip theo tt hn chuyn lu lng ti mt ch nht nh. Trong hot ng Internet phin bn 6, ICMPv6 c t hp vi IPv6. Mi nt mng h tr IPv6 phi thc thi hon ton ICMPv6. ICMPv6 l phin bn c bin i v nng cp ca ICMP trong IPv4. Do , ngoi nhng vai tr s dng nh trong th tc ICMPv4 th ICMPv6 cn c mt s vai tr quan trng khc m ICMPv4 khng c c tt c cc quy trnh u c thc hin, iu khin bng th tc ICMPv6 nh: Quy chun ho cc thng ip phc v cho nhng quy trnh hot ng trong mng ni b. Cc quy trnh hot ng, giao tip gia cc nt mng IPv6 trong mt mng ni b, bao gm qu trnh phn gii t a ch lp 2 thnh a ch lp 3 v nhiu quy trnh khc c m nhim bng th tc mi ND (Neighbor Discovery - m nhim thc thi giao tip gia cc nt mng trong mt ng kt ni.) Vic qun l quan h thnh vin nhm truyn thng nhm c m nhim bng th tc MLD (Multicast Listener Discovery - th tc qun l quan h thnh vin

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

37

multicast, phc v cho nh tuyn multicast) nu nt mng IPv6 tham gia vo qu trnh nh tuyn multicast.

V d: Trong phin bn 4, ICMP ch bao gm cc thng ip iu khin, h tr hot ng mng. Cn cc quy trnh hot ng cn thit khc c m nhim bng nhng th tc ring: qu trnh phn gii a ch c m nhim bng th tc ARP; khi mt thit b IPv4 tham gia vo qu trnh nh tuyn truyn thng nhm, vic qun l quan h thnh vin nhm truyn thng nhm c m nhim bng th tc IGMP, s dng tp hp thng ip ring
Do vy, th tc ICMPv6 v nhng thng ip ICMPv6 ng vai tr v cng quan trng trong hot ng ca th h a ch IPv6. Cc quy trnh giao tip ct yu gia host vi host, gia host vi b nh tuyn IPv6 trn mt ng kt ni, vn l nn tng cho hot ng ca nt mng IPv6, u da trn vic trao i cc thng ip ICMPv6.

Cu trc gi tin iu khin ca Internet phin bn 6 (ICMPv6) Gi tin ICMPv6 bt u sau phn u c bn hoc mt phn u m rng ca IPv6 v c xc nh bi gi tr 58 ca trng phn u tip theo trong phn u c bn hoc phn u m rng pha trc. Gi tin ICMPv6 bao gm phn phn u ca ICMPv6 (ICMPv6 phn u) v phn thng ip (ICMPv6 message). ICMPv6 phn u bao gm ba trng: "Dng" (Type) 8 bits, "M" (Code) 8 bits v "Kim tra" (Checksum) 16 bits. Trong hai trng "Dng" v "M" trong phn u ICMPv6 c s dng phn loi thng ip ICMPv6. trng Dng th gi tr ca bits u tin s xc nh y l thng ip li, hay thng ip thng tin ("0" - li; "1"- thng tin). trng "M" s phn dng su hn gi tin ICMPv6, thng bo y l gi tin g trong tng loi thng ip
ICMPv6. trng Kim tra s cung cp gi tr s dng kim tra li cho ton b gi tin ICMPv6.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

38

Hnh 2.2. Cu trc gi tin ICMPv6 Phn thng ip ICMPv6 c chia lm hai loi: thng ip li v thng ip thng tin. Cc thng ip li: c s dng bo li trong qu trnh chuyn tip v phn phi gi tin IPv6, thc hin bi nt mng ch hoc router ang x l gi tin. Cc thng ip ny c gi tr ca 8 bits trng "Dng" t 0 n 127 (bits u tin c t gi tr 0). Cc thng ip li bao gm: Destination Unreachable (Khng ti c ch), Packet Too Big (Gi tin qu ln), Time Exceeded (Qu thi gian cho php), v Parameter Problem (C vn v tham s).

Dng

M t

Gi tr trng m 0 - Khng c tuyn ti ch

Destination 1 Unreachable (Khng ti c ch)

1 - Giao tip ti ch b cm 2 - Cha gn 3 - a ch khng kt ni c. 4 - Port khng kt ni ti c.

Packet Too Big 2 (Gi tin qu ln ) Time Exceeded 3 (Qu thi gian cho php) 0 0 - Vt qu gii hn bc(hop Limit). 1 - Thi gian to li gi tin vt qu gii hn cho php

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

39

0 - Li phn phn u Parameter Problem 4 (C vn v tham s) 1 - Khng nhn dng c phn u tip theo. 2 - Khng nhn ra ty chn IPv6
Bng 2.1. cc thng ip bo li Trong : Thng ip li "Khng ti c ch" c gi khi mt nt mng khng th chuyn tip gi tin v mt s l do no (khng phi do tc nghn mng). Nt mng gi thng bo li v ngun ca gi tin, trng "M" s ch nh nguyn nhn. Thng ip li Gi tin qu ln khi kch thc gi tin vt qu gi tr MTU ca ng kt ni. Trong IPv6, vic phn mnh khng c thc hin bi b nh tuyn, ch c nt mng ngun thc hin phn mnh. Thng ip Gi tin qu ln cn c s dng trong quy trnh tm kim gi tr MTU nh nht (PathMTU) trn ton b ng truyn dn ca IPv6, l mt quy trnh do th tc Neighbor Discovery m nhim. Thng ip li Qu thi gian cho php c gi khi gi tr Gii hn bc trong mo u gi tin IPv6 t ti 0 v gi tin s b hu b. Thng ip li C vn v tham s c gi nu mt nt mng nhn thy c vn trong phn u c bn, hoc trong mt phn u m rng ca gi tin IPv6. Dng li c ch nh bng gi tr trng M. Thng ip thng tin: thng ip thng tin ICMPv6 chia thnh hai nhm: thng ip thng tin c bn v thng ip thng tin m rng. Trng Dng (Type) ca gi tin thng ip thng tin ICMPv6 c gi tr trong khong 128 - 255 (bits u tin c thit lp gi tr 1). Thng ip thng tin c bn: bao gm Echo request (Yu cu phn hi) v Echo reply (Phn hi). Hai dng thng ip ny c s dng trong cc chng trnh d tm nh ping, trace route, thc hin chc nng chn on mng.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

40

Dng 128

M t Echo request (Yu cu phn hi) Echo reply

M 0

129

(Phn hi) Bng 2.2. Thng ip thng tin c bn

Thng ip thng tin m rng: l nhng thng ip ICMPv6 phc v cho cc th tc thc hin chc nng giao tip gia cc nt mng ln cn trong mt ng kt ni, s dng cho cc quy trnh hot ng ct yu ca IPv6. Dng M t Multicast Listener Query 130 (Truy vn i tng nghe lu lng Multicast) 0 M

Multicast Listener Report 131 (Bo co i tng nghe lu lng Multicast) Multicast Listener Done 132 (Kt thc nghe lu lng multicast) Router Solicitation 133 (D tm router) Router Advertisement 134 (Qung b ca router) Neighbor Solicitation 135 (D tm nt mng ln cn ) 0 0 0 0 0

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

41

Neighbor Advertisement 136 (Qung b ca nt mng ln cn ) Redirect 137 (Li) Bng 2.3. thng ip thng tin m rng
Trong : Thng ip Truy vn i tng nghe lu lng truyn thng nhm (MLQ) c gi tr trng Dng trong mo u ICMPv6 l 130. Thng ip ny c s dng bi b nh tuyn truy vn v nhng nt mng ang nghe lu lng truyn thng nhm trn mt ng kt ni. C hai dng thng ip Truy vn i tng nghe lu lng truyn thng nhm: truy vn thng thng v truy vn gn vi a ch Multicast c th: truy vn thng thng c s dng truy vn mi nt mng ca mi a ch truyn thng nhm v truy vn gn vi a ch truyn thng nhm c th c s dng truy vn nhng nt mng ang nghe mt a ch truyn thng nhm nht nh. Thng ip Bo co i tng nghe lu lng truyn thng nhm (MLR) c gi tr trng Dng trong phn u ICMPv6 l 131. Thng ip c nt mng ang nghe lu lng ti mt a ch truyn thng nhm s dng bo co rng mnh ang sn sng nhn lu lng truyn thng nhm. Thng ip ny cng c s dng p tr li thng ip Truy vn i tng nghe lu lng truyn thng nhm ca b nh tuyn. Thng ip Kt thc nghe lu lng truyn thng nhm (MLD) c gi tr trng Dng trong phn u ICMPv6 l 132. Thng ip c nt mng ang nghe lu lng truyn thng nhm s dng thng bo rng n khng cn mun nhn lu lng ca a ch truyn thng nhm c th no na. Khi mt nt mng t b khng cn nhn lu lng ca mt a ch truyn thng nhm, n gi mt thng ip Kt thc nghe lu lng truyn thng nhm ti a ch truyn thng nhm mi b nh tuyn phm vi link (FF02::2), thng tin mang trong gi tin l a ch truyn thng nhm m n khng cn mun nghe lu lng.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

42

Thng ip d tm b nh tuyn (RS) c gi tr trng Dng trong phn u ICMPv6 l 133. Thng ip ny s dng a ch ngun hoc l mt a ch truyn thng n c gn cho giao din gi gi tin, hoc trong trng hp a ch ny khng tn ti, n s dng a ch c bit 0:0:0:0:0:0:0:0. a ch ch thng thng l a ch truyn thng nhm mi b nh tuyn phm vi link (FF02::2). Do qu trnh t ng cu hnh v nh tuyn ph thuc vo kh nng tm thy b nh tuyn v tin t mng, thng ip ny l cn thit trc khi bt c giao tip no c thit lp. Thng ip Qung b ca b nh tuyn (RA) c gi tr trng Dng trong phn u ICMPv6 l 134. Ta bit, b nh tuyn (router) IPv6 ngoi chc nng chuyn tip gi tin cho cc my tnh trn mt ng kt ni, cn m nhim mt chc nng rt quan trng l qung b thng tin gip cc my tnh trn ng kt ni bit c s hin din ca router v nhn c nhng thng s tr gip cho hot ng. Nh phng thc qung b thng tin t b nh tuyn, my tnh IPv6 c kh nng t ng cu hnh a ch ton cu, cu hnh cc tham s phc v cho giao tip. Thng ip d tm nt mng ln cn (NS) c gi tr trng Dng trong phn u ICMPv6 l 135. Thng ip NS c mt nt mng s dng yu cu cc nt mng khc trn ng kt ni cung cp a ch lp 2 ca chng. Chc nng ny ging nh th tc phn gii a ch (ARP) trong IPv4. Khi , nt mng c hi s s dng thng ip Qung b ca nt mng ln cn (Neighbor Advertisement - NA) tr li v a ch lp 2 ca n. Ngoi ra, thng ip NS cn c s dng cho qu trnh kim tra trng lp a ch khi mt nt mng cn xc nhn rng khng c mt nt mng no khc trn ng kt ni c gn trng a ch ca n. Thng ip Qung b ca nt mng ln cn (NA) c gi tr trng Dng ICMPv6 136. Thng ip Qung b ca nt mng ln cn (NA) c nt mng dng p tr gi tin D tm nt mng ln cn (NS) ca mt nt mng khc. a ch ngun ca thng ip l a ch Unicast gn cho nt mng gi thng tin, a ch ch l a ch Unicast ca nt mng hi thng tin hoc l a ch truyn thng nhm mi nt mng phm vi link (FF02::1). Cng nh thng ip NS, cc gi tin

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

43

ny ch c gi trong phm vi ng kt ni v cn c trc khi cc giao tip c thit lp. Thng ip Li (R) c gi tr trng Dng ICMPv6 137. Thng ip ny lun c gi gia cc a ch Unicast. Khi mt b nh tuyn mun thng bo cho my tnh IPv6 rng c mt b nh tuyn khc tt hn th n c th s dng lm ch tip theo (next hop) gi gi tin n mt ch nht nh. a ch ngun ca thng ip l a ch Link-local ca giao din b nh tuyn. a ch ch l a ch ngun ca gi tin khin cho b nh tuyn phi gi thng ip Li. 2.2.1.2 Th tc pht hin nt mng ln cn Th tc pht hin nt mng ln cn (Neighbor Discovery ND) l mt th tc c pht trin mi trong phin bn IPv6. ND hot ng trn nn nhng thng ip ICMPv6 v iu khin cc quy trnh giao tip gia cc nt mng IPv6 trn cng mt ng kt ni. Nhng quy trnh hot ng giao tip ny (gia my tnh vi my tnh, gia my tnh vi router) l thit yu i vi hot ng ca th h a ch IPv6. ND s dng thng ip ICMPv6 m nhim nhng chc nng phn gii a ch, tm kim b nh tuyn (router), li (redirect), ng thi cng cung cp nhiu chc nng khc na. ND s dng tp hp 5 thng ip ICMPv6 sau y: Qung b ca router RA (Router Advertisement); D tm router RS (Router Solicitation); D tm nt mng ln cn NS (Neighbor Solicitation); Qung b ca nt mng ln cn NA (Neighbor Advertisement); Li (Redirect). Nhng thng ip ny c trao i gia cc nt mng ln cn trn mt ng kt ni trong quy trnh hot ng cn thit ca a ch IPv6. Cu trc gi tin ND Thng ip ND bao gm mt phn u ND v c hoc khng c cc tu chn ND. Ty chn ND s dng cha ng cc thng tin m thng ip ND cn truyn ti: a ch MAC, tin t mng (prefix) ca ng kt ni, thng tin n v truyn dn cc i (MTU) ca ng kt ni, cc tham s hot ng, d liu phc v cho vic li (redirect)

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

44

Thng ip ND Mo u IPv6 mo u tip theo Mo u ca ND bng 58 (ICMPv6) Cc ty chn ND

8 bits Dng

8 bits Chiu di

N8 bits Gi tr

Hnh 2.3. Cu trc gi tin ND Mt Ty chn ND c cu thnh t ba trng: Dng (Type), Chiu di (Lengh), Gi tr (Value). Trng Dng ch nh dng ca Ty chn ND, hin nay trong RFC2461 (Neighbor Discovery for IP Version 6 ), c cc dng

Dng 1 2 3 4 5

Ty chn a ch lp 2 ca ngun a ch lp 2 ca ch Tin t mng Li lu lng MTU


Bng 2.4. cc dng ty chn ND

Trong : Dng 1: ch nh a ch lp 2 ca ni gi thng ip ND. Ty chn ny c trong cc thng ip D tm nt mng ln cn (NS), D tm b nh tuyn (RS), v Qung b ca b nh tuyn (RA). Cc quy trnh s dng nhng thng ip trn cn c ty chn ny thng bo a ch lp 2 ca ni gi thng ip ND.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

45

Dng 2: ch nh a ch lp 2 ca nt mng m gi tin IPv6 nn c gi ti. Ty chn ny c trong thng ip Qung b ca nt mng ln cn (NA) v Li (Redirect). Dng 3: Ty chn Tin t mng c trong thng ip Qung b ca b nh tuyn (RA) ch nh tin t mng (prefix) trn ng kt ni vi b nh tuyn, ng thi cng mang thng tin ch nh v t ng cu hnh a ch. Trong mt thng ip RA, c th c ng thi nhiu ty chn Tin t mng thng bo cng lc nhiu prefix a ch trn mt ng kt ni. Trong thng ip c cha ty chn Tin t mng, phn Gi tr s l N nhm 8 bits, trong cha cc thng tin v chiu di tin t mng, thng tin v thi gian tn ti hp l ca tin t mng, c xc nh xem tin t mng c c s dng cu hnh a ch t ng hay khng, v mt s cc thng tin khc na. Dng 4: ty chn ny c trong thng ip Li (Redirect) xc nh gi tin IPv6, iu khin b nh tuyn phi gi thng ip Li. N c th bao gm mt phn hoc tt c gi tin IPv6, ty thuc vo kch c gi tin c gi ban u. Dng 5: ty chn ny c trong thng ip Qung b ca b nh tuyn (RA) ch nh gi tr MTU trn ng kt ni. Gi tr ca MTU ny s c dng thay cho gi tr MTU cung cp bi giao din phn cng. Nhng quy trnh ND cung cp Vi nm thng ip ICMPv6 m t nh trn (Thng ip Qung b ca b nh tuyn - RA; Thng ip d tm b nh tuyn RS; Thng ip d tm nt mng ln cn - NS; Thng ip Qung b ca nt mng ln cn NA; Thng ip Li), th tc Neighbor Discovery thc hin nhng quy trnh nh trong bng sau:

Quy trnh Tm kim b nh tuyn (Router discovery)

M t Quy trnh m nh , mt my tnh khm ph ra b nh tuyn trn ng kt ni sn sng chuyn tip gi tin cho my tnh.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

46

Tm kim tin t mng (Prefix discovery)

Quy trnh m nh , thit b tm thy tin t mng (network prefix) trn ng kt ni ca mnh. Quy trnh m nh , thit b tm c

Tm kim thng s (Parameter discovery)

nhng tham s hot ng nh gi tr MTU ca ng kt ni, gi tr Gii hn bc (hop limit) mc nh gi gi tin. Quy trnh m nh , nt mng c th

T ng cu hnh a ch (Address autoconfiguration)

cu hnh thng tin a ch IP cho cc giao din, theo phng thc c hoc khng c s hin din ca my ch DHCPv6. Quy trnh m nh , nt mng c th quyt nh a ch IPv6 ca ch tip theo gi tin s c chuyn tip ti, da trn a ch ch. a ch ny s hoc chnh l a ch ch cui cng, hoc l a ch ca ca b nh tuyn mc nh trn ng kt ni.

Quyt nh ch tip theo (Next hop determination)

Khm ph kh nng c th kt ni ti c ca nt mng ln cn (Neighbor unreachability detection) Kim tra trng lp a ch (Duplicate address detection)

Quy trnh m nh , nt mng quyt nh c mt nt mng ln cn c th cn nhn c gi tin hay khng Quy trnh m nh , nt mng c th bit a ch IPv6 n d nh s dng hin c mt nt mng no khc trn ng kt ni s dng ri hay cha.

Chc nng li

Quy trnh thng bo cho mt my tnh

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

47

(Redirect function )

a ch IPv6 ch tip theo (next hop) tt hn c th s dng ti c ch cui cng.

Bng 2.5. Quy trnh th tc ND cung cp 2.2.2 QUY TRNH HOT NG 2.2.2.1Quy trnh phn gii a ch lp 2 t a ch lp 3 Trong hot ng ca th tc IP phin bn 4, quy trnh ny c m nhim bi th tc ARP. Nt mng cn phn gii a ch s gi gi tin truy vn ti a ch ch l a ch qung b (a ch broadcast) ca mng, do vy s tc ng n mi nt mng khc trn ng kt ni, lm gim hiu sut mng.Khi mt nt mng IPv6 cn tm a ch lp 2 tng ng vi mt a ch IPv6 no , thay v gi gi tin truy

vn ti a ch truyn thng nhm mi nt mng phm vi link (FF02::1) tc


ng ti mi nt mng trn ng kt ni (tng ng nh a ch qung b trong IPv4), nt mng gi ti a ch ch l a ch Multicast Solicited Nt mng tng ng a ch Unicast cn phn gii. Mc khc, nt mng IPv6 khi c gn mt a ch Unicast, ngoi vic lng nghe lu lng ti a ch Unicast ny, s lp tc nghe v nhn lu lng ca mt dng a ch truyn thng nhm tng ng a ch Unicast l Multicast Solicited Nt mng. Do vy, trong qu trnh phn gii a ch ca IPv6, ch nhng nt mng ang nghe lu lng ti a ch Multicast Solicited Nt mng ph hp mi nhn v x l gi tin. iu ny gim thiu vic tc ng n mi nt mng trn ng kt ni, tng hiu qu hot ng. y l mt trong nhng ci tin ca IPv6 so vi phin bn IPv4. Khi mt nt mng cn phn gii a ch, n gi i trn ng kt ni thng ip NS, c cu trc c bn nh sau: a ch ngun l a ch IPv6 ca giao din gi gi tin v a ch ch l a ch IPv6 Multicast Solicited Nt mng tng ng a ch Unicast cn phn gii a ch. Khi , thng tin trong phn d liu c cha a ch lp 2 ca ni gi (nm trong trng Ty chn ca gi tin ND). Trn ng kt ni, khi nt mng ang nghe lu lng ti a ch Multicast Solicited Nt mng

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

48

trng vi a ch ch ca gi tin s nhn c thng tin. N s thc hin nhng hnh ng sau: cp nht a ch lp 2 ca ni gi vo bng Neighbor cache, sau gi thng ip NA p tr ti a ch ch l a ch ngun ca gi tin, thng tin trong phn d liu c a ch lp 2 ca n (v cng c cha trong trng Ty chn ca gi tin ND).

ICMPv6: Dng = 135. Ngun = A. ch = a ch Multicast Solicited Nt mng.

D liu c cha a ch lp 2 ca A.

ICMPv6: Dng

= 136.

Ngun = B. ch = a ch Multicast Solicited Nt mng. D liu c cha a ch lp 2 ca B.

Hai Nt mng c th lin lc, giao tip vi nhau


Hnh 2.4. Quy trnh phn gii a ch

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

49

2.2.2.2.Kim tra trng lp a ch trn mt ng kt ni Mi Nt mng IPv6 thc hin thut ton kim tra s trng lp v a ch (Duplicate Address Detection - DAD) trn mt ng kt ni trc khi chnh thc gn a ch Unicast cho mt giao din, nhm ngn nga vic xung t v a ch. Quy trnh ny c p dng d a ch c gn bng tay hoc bng hnh thc cu hnh t ng. Chng no thit b vn cn ang thc hin DAD v cha quyt nh c l a ch khng c s trng lp, th a ch c coi l a ch thm d . DAD s dng hai thng ip D tm nt mng ln cn (NS) v Qung b ca nt mng ln cn (NA). Tuy nhin mt s thng tin ca gi tin ny khc vi gi tin s dng trong qu trnh phn gii a ch. Khi mt nt mng cn kim tra trng lp a ch, n gi gi tin NS vi cu trc c bn nh sau: + + a ch IPv6 ngun l a ch c bit " :: ". a ch ch l a ch Multicast Solicited Nt mng tng ng a ch

ang kim tra trng lp. + Gi tin NS s cha a ch IPv6 ang c kim tra trng lp.

Sau khi gi NS, nt mng s i.Nu khng c phn hi, c ngha a ch ny cha c s dng. Ngc li nu a ch ny c mt nt mng no s dng ri, nt mng ny s nhn c thng ip NS v gi thng ip NA p tr. Khi nt mng ang kim tra a ch trng lp nhn c thng ip NA phn hi li NS mnh gi, n s hy b vic s dng a ch ny.
2.2.2.3.Kim tra kh nng c th kt ni c ti nt mng ln cn Thng ip D tm nt mng ln cn (NS) v Qung b ca nt mng ln cn (NA) cng c s dng cho nhng mc ch khc, nh qu trnh kim tra kh nng c th kt ni c ti nt mng ln cn (Neighbor Unreachability Detection NUD). Cc nt mng IPv6 duy tr bng thng tin v cc nt mng ln cn ca mnh trong bng lu tr (neighbor cache). Chng cp nht bng ny khi c s thay i tnh trng mng. Bng neighbor cache lu thng tin i vi c b nh tuyn (router) v my tnh (host). Nu mt nt mng mun kim tra tnh trng c th nhn

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

50

gi tin ca nt mng ln cn, n gi thng ip NS. Nu nhn c NA phc p, n bit tnh trng ca nt mng ln cn l c th kt ni c v s cp nht thng tin ny vo bng lu tr ca mnh. Tnh trng ny ch c coi l tm thi, trong mt khong thi gian nht nh, trc khi nt mng cn thc hin li quy trnh NUD. Khong thi gian quy nh ny, cng nh mt s cc tham s hot ng khc, my tnh s nhn c t thng tin Qung b ca router (Router Advertisement - RA) ca b nh tuyn trn ng kt ni.

2.2.2.4 Tm kim b nh tuyn trn ng kt ni (Router Discoverry)


Trong mng, b nh tuyn l thit b m nhim vic chuyn tip lu lng ca cc my tnh t mng ny sang mng khc. Mt my tnh phi nh vo b nh tuyn c th gi thng tin ti nhng nt mng nm ngoi ng kt ni ca mnh. Do vy, trc khi mt my tnh c th thc hin cc hot ng giao tip vi mng bn ngoi, n cn tm mt b nh tuyn v hc c nhng thng tin quan trng v b nh tuyn, cng nh v mng. Trong th h a ch IPv6, c th cu hnh a ch cng nh c nhng thng s cho hot ng, my tnh IPv6 cn tm thy b nh tuyn v nhn c nhng thng tin t b nh tuyn trn ng kt ni. B nh tuyn IPv6 ngoi vic m trch chuyn tip gi tin cho my tnh cn m nhim mt hot ng khng th thiu l qung b s hin din ca mnh v cung cp cc tham s tr gip my tnh trn ng kt ni cu hnh a ch v cc tham s hot ng. Thc hin nhng hot ng trao i thng tin gia my tnh trn ng kt ni v b nh tuyn (router) l mt nhim v rt quan trng ca th tc ND. Qu trnh tm kim, trao i gia my tnh v b nh tuyn thc hin da trn hai dng thng ip sau: D tm router: (Router Solicitation - RS) c gi bi my tnh ti cc b nh tuyn (router) trn ng kt ni. Do vy, gi tin c gi ti a ch ch Multicast mi router phm vi link (FF02::2). My tnh gi thng ip ny yu cu b nh tuyn qung b ngay cc thng tin n cn cho hot ng. Qung b ca router: (Router Advertisement - RA) ch c gi bi cc b nh tuyn qung b s hin din ca b nh tuyn v cc tham s cn thit khc cho

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

51

hot ng ca cc my tnh. B nh tuyn gi nh k thng ip ny trn ng kt ni v gi thng ip ny bt c khi no nhn c thng ip RS t cc my tnh trong ng kt ni. 2.2.2.5 Cu hnh a ch mt cch t ng ca thit b IPv6 Thit b IPv4 khi kt ni vo mng phi c cu hnh bng tay cc thng s nh: a ch, mt n mng, b nh tuyn mc nh, my ch tn min... gim cu hnh th cng, my ch DHCP c s dng c th cp pht a ch IP v thng s cho thit b IPv4 khi n kt ni vo mng. a ch IPv6 tin thm mt bc xa hn khi cho php mt nt mng IPv6 c th t ng cu hnh a ch v cc tham s hot ng m khng cn s h tr ca my ch DHCPv6.

Hnh 2.5 T ng cu hnh a ch ca thit b IPv6 Thit b IPv6 thc hin t ng cu hnh a ch v cc thng s hot ng m khng cn s h tr ca my ch DHCP (stateless autoconfiguration ) nh sau: Bc 1: to a ch Link local. a ch Link-local bt u bi 10 bits tin t FE80::/10, theo sau bi 54 bits 0. 64 bits cn li l nh danh giao din (interface ID). Khi khi ng, 64 bits nh danh giao din s c thit b t ng to t a ch lp 2. Ngoi phng thc to nh danh giao din t a ch vt l, 64 bits nh danh giao din cn c th c gn bng mt dy s ngu nhin. V d:

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

52

T a ch MAC 02-90-27-17-FC-0F, my tnh s to c 64 bits nh danh giao din 0290:27FF:FE17:FC0F. T to c a ch Link-local FE80::0290:27FF:FE17:FC0F. Bc 2: thc hin thut ton kim tra trng lp a ch (DAD). Trc khi thc s s dng a ch Link-local va to c, thit b s thc hin quy trnh kim tra trng lp a ch chc chn a ch Link - local mnh d nh s dng l duy nht trong phm vi ng kt ni nhm trnh xung t. Thut ton DAD da trn hai dng thng ip D tm nt mng ln cn (NS) v Qung b ca nt mng ln cn (NA). Bc 3: gn a ch Link local. Sau khi gi thng ip NS, nu thit b khng nhn c thng ip NA phc p, c ngha cha c nt mng no trn ng kt ni s dng a ch ny. Khi thit b s gn a ch Link-local cho mnh v ly a ch ny thc hin giao tip vi cc nt mng khc trn mng LAN. Bc 4: lin h vi b nh tuyn. Trong gi tin Qung b ca router (RA) s c cc thng tin hng dn thit b v cch thc cu hnh a ch, v tin t mng ca ng kt ni, v cc tham s khc. Do vy, thit b s i gi tin ny trong thng ip c b nh tuyn gi mt cch nh k, hoc s c gng lin h vi cc b nh tuyn trn ng kt ni. lin h vi b nh tuyn (router), thit b gi gi tin D tm b nh tuyn (RS) ti a ch ch truyn thng nhm mi b nh tuyn phm vi link - FF02::2. Router trn ng kt ni s gi thng ip qung b (RA) phc p. Trong cha d liu v tin t mng ca ng kt ni v cc thng s khc. Nu ng kt ni ang s dng phng thc cu hnh nh my ch DHCPv6, trong qung b ca router s khng c tin t mng v s c thng tin hng dn my tnh s dng my ch DHCPv6 nhn thng tin cu hnh. Bc 5: cu hnh a ch v xc lp cc gi tr thng s hot ng. T thng tin nhn c trong qung b RA ca b nh tuyn, my tnh s cu hnh a ch v xc lp cc thng s hot ng.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

53

2.2.2.6 Quy trnh tm kim gi tr PathMTU cho vic phn mnh gi tin Ipv6 Mng vi quy m ln hay nh cng c xy dng nn t cc ng kt ni vt l vi nhau. Mi ng kt ni c mt gi tr gii hn v kch thc cc i ca gi tin m my tnh c th gi trn ng kt ni, c gi l MTU (Maximum Transmition Unit).Trong hot ng ca th h a ch IPv4, trong qu trnh chuyn tip gi tin, nu router IPv4 nhn c gi tin ln hn gi tr MTU ca ng kt ni, b nh tuyn s thc hin phn mnh gi tin (fragment) thnh nhng gi tin nh hn. Sau qu trnh truyn ti, gi tin c xy dng li nh nhng thng tin trong phn u. Th h a ch IPv6 p dng mt m hnh khc phn mnh gi tin. Mi b nh tuyn IPv6 (router IPv6) khng tin hnh phn mnh gi tin, nh tng hiu qu, gim thi gian x l gi tin. Vic phn mnh gi tin c thc hin ti my tnh ngun, ni gi gi tin. Do vy, trong phn u c bn IPv6, cc trng h tr cho vic phn mnh v kt cu li gi tin (tng ng mo u IPv4) c b i. Nhng thng tin tr gip cho vic phn mnh v ti to gi tin IPv6 c trong mt phn u m rng ca gi tin IPv6 gi l phn u Phn mnh (Fragment Phn u). Gi tr MTU ti thiu mc nh trn ng kt ni IPv6 l 1280 byte. Tuy nhin, n c ch, gi tin s i qua nhiu ng kt ni c gi tr MTU khc nhau, vic phn mnh gi tin c thc hin ti my tnh ngun, khng thc hin bi cc b nh tuyn trn ng truyn ti. Do vy, my tnh ngun cn bit c gi tr MTU nh nht trn ton b ng truyn t ngun ti ch iu chnh kch thc gi tin ph hp. C hai khi nim v gi tr MTU trong IPv6, l: LinkMTU: l gi tr MTU trn ng kt ni trc tip ca my tnh. PathMTU: l gi tr MTU nh nht trn ton b mt ng truyn t ngun ti ch. tm Path MTU, my tnh ngun gi gi tin s dng gi tr MTU mc nh trn ng kt ni trc tip ca mnh. Nu trn ng truyn, kch thc gi tin vt qu gi tr MTU ca mt ng kt ni no , b nh tuyn ca ng kt ni phi hy b gi tin v gi thng ip "Gi tin qu ln" thng bo trong gi tin c cha gi tr MTU ca ng kt ni m router ph trch. Khi nhn c thng

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

54

tin ny, my tnh s s dng gi tr MTU ny gi li gi tin. C nh vy cho n khi gi tin ti c ch v my tnh s lu gi li thng tin v gi tr MTU nh nht dng (Path MTU) thc hin gi ln sau.

PathMTU = 1300 Ngun lu tr thng tin PathMTU Hnh 2.6. Quy trnh thc hin tm kim PathMTU
2.2.2.7 nh s li cho thit b Ipv6 nh s li mng IPv4 l cng vic m nhng nh qun tr rt ngi. N nh hng ti hot ng mng li v tiu tn nhn lc cu hnh li thng tin cho thit b trn mng. a ch IPv6 c thit k c cch thc nh s li cho thit b mng mt cch d dng hn. Mt a ch IPv6 gn cho nt mng s c hai trng thi, l cn c s dng - preferred v loi b - deprecated tu theo thi gian sng ca a ch . My tnh lun c gng s dng cc a ch c trng thi cn c s dng. Thi gian sng ca a ch c thit lp t thng tin qung b ca b nh tuyn. Do vy, cc my tnh trn mng IPv6 c th c nh s li nh thng bo ca b

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

55

nh tuyn t thi gian ht thi hn c th s dng cho mt tin t mng (network prefix). Sau , b nh tuyn thng bo tin t mng mi cc my tnh to li a ch IP. Trn thc t, cc my tnh c th duy tr s dng a ch c trong mt khong thi gian nht nh trc khi xa b hon ton. 2.3 .KT LUN CHNG Chng ny trnh by mt s thc tc c s dng trong qu trnh bt tay gia my tnh vi my tnh, gia my tnh vi router v gia b nh tuyn vi b nh tuyn.Cng nh trong phin bn v4, a ch IPv6 cng c nhng tp thng ip chng c th nhn bit c mt host mi trn ng kt ni hay mt host khng cn c s dng,v c bn tt c cc qu trnh c s dng bng hai th tc l ICMPv6 v th tc ND.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

56

CHNG 3 : CNG NGH CHUYN I GIAO TIP T IPV6 SANG IPV4 Ngy nay, cng vi s pht trin mnh m ca mng Internet th IPv4 l giao thc, mt thnh phn khng th thiu trong vic truyn dn gi tin. Do vy, vic chuyn i s dng t th tc IPv4 sang th tc IPv6 khng phi l mt iu d dng. Trong trng hp th tc IPv6 c tiu chun ha hon thin v hot ng tt, vic chuyn i c th c thc y thc hin trong mt thi gian nht nh i vi nhng mng nh, mng ca mt t chc... Tuy nhin, kh c th thc hin ngay c i vi mt mng ln. i vi mng Internet ton cu, c th ni l khng th. Th tc IPv6 pht trin khi IPv4 c s dng rng ri, mng li Internet IPv4 hon thin. Do , trong qu trnh trin khai th h a ch IPv6 trn mng Internet, khng th c mt thi im nht nh no m ti a ch IPv4 c hy b, thay th hon ton bi th h a ch mi IPv6. Hai th h mng IPv4, IPv6 s cng tn ti trong mt thi gian rt di. Trong qu trnh pht trin, cc kt ni IPv6 s tn dng c s h tng sn c ca IPv4.

3.1 TNG QUAN V CC CNG NGH CHUYN I IPV4 SANG IPV6


Nh trnh by trn, vic thay th chuyn i mt giao thc Internet khng phi l iu d dng. a ch IPv6 khng th tc khc thay th IPv4 trong thi gian ngn. y phi l qu trnh dn dn. Do vy, trong iu kin a ch IPv4 cn kit nhng a ch IPv6 li cha iu kin thay th hon ton th cn c nhng gii php hai th h a ch cng tn ti vi nhau. hai dng giao thc trn cng tn ti song song vi nhau th hai dng giao thc phi c kh nng chuyn i ln nhau. Nhng cng ngh chuyn i ny, v c bn c th phn thnh ba loi nh sau: Dual-stack: cho php IPv4 v IPv6 cng hot ng trong mt thit b mng. Cng ngh ng hm (Tunnel): cng ngh s dng c s h tng mng IPv4 truyn ti gi tin IPv6, phc v cho kt ni IPv6.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

57

Cng ngh bin dch: thc cht l mt dng thc cng ngh NAT, cho php thit b ch h tr IPv6 c th giao tip vi thit b ch h tr IPv4. 3.1.1 DUAL - STACK : CHNG HAI GIAO THC C ch Chng hai giao thc cn gi l c ch chng 2 lp. C ch ny m bo mi Host/Router c ci c hai giao thc IPv4 v IPv6. Vi c ch i (Dual) ny, hot ng ca cc Host/ Router hon ton tng thch vi IPv4 v IPv6. Nhng ng dng no c h tr Chng hai giao thc s hot ng c c vi a ch IPv4 v a ch IPv6. i vi Host/Router dng k thut Chng hai giao thc, c th kt hp vi cc cng ngh chuyn i nh cng ngh ng hm (c ch ny s c trnh by phn sau). i vi nhng nt mng ny, c th kt hp vi c ch Automatic Tunnel hoc Configured Tunnel, hoc c hai c ch ny. Do , c 3 trng hp ring c th s dng l: - Nt mng IPv4/IPv6 khng kt hp s dng c ch Tunnel(ng hm). - Nt mng IPv4/IPv6 s dng kt hp vi Configured Tunnel. - Nt mng IPv4/IPv6 s dng kt hp vi c Configured Tunnel v Automatic Tunnel. V cng theo c ch ny, IPv6 s cng tn ti vi IPv4,chng s dng chung h tng mng IPv4. Vic chn la Stack(giao thc) no hot ng (IPv4 hay IPv6) s da vo thng tin cung cp bi dch v phn gii tn min thng qua cc DNS Server. Thng thng, a ch IPv6 trong kt qu tr v ca DNS s c la chn so vi a ch IPv4.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

58

Hnh 3.1. chng 2 giao thc Nh trnh by trn, c ch Dual-stack hot ng di s tr gip ca dch v phn gii tn min DNS. Cc my ch Chng hai giao thc s c bn ghi a ch khai bo trong cc DNS Server, do vy DNS Server phi h tr IPv6. Khi , s c mt bn ghi (record table) A lu tr mt a ch IPv4 v mt bn ghi AAAA lu tr mt a ch IPv6. Mi bn ghi ny c th tr n mt a ch IPv4 hoc IPv6. Trong trng hp kt qu tm thy l mt bn ghi AAAA tr n a ch IPv4 (compatible IPv6) v mt bn ghi A tr n a ch IPv4 tng ng th kt qu tr v c gi tr sau: -Tr li duy nht a ch IPv6. -Tr li duy nht a ch IPv4. -Tr li c hai a ch IPv4 v IPv6. Vic la chn loi a ch no c tr v ph thuc vo tng trng hp. Trong trng hp c hai loi a ch tr v th trt t sp xp cc loi a ch lin quan n lung IP ca Host . Nu mt a ch IPv6 c tr v, Nt mng

giao tip vi Nt mng ch v gi tin c ng theo chun IPv6. Tng t,

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

59

nu a ch IPv4 c tr v, Nt mng giao tip vi mt Host IPv4 v lc ny gi tin c ng gi theo chun IPv4.

Hnh 3.2. Cng ngh Dual Stack Hin nay ng dng Chng hai giao thc c h tr trn cc h iu hnh Windows XP, Windows 2003, h iu hnh ca thit b nh tuyn Cisco Khi ngi qun tr mng cu hnh ng thi c hai dng a ch cho mt giao din trn b nh tuyn (router) th b nh tuyn s hot ng Chng hai giao thc.

Hnh 3.3. Dual-stack trong h iu hnh Cisco 3.1.2 CNG NGH NG HM (Tunnel) a ch IPv6 pht trin khi Internet IPv4 s dng rng ri v c mt mng li ton cu. Trong thi im rt di ban u, cc mng IPv6 s ch l nhng c o, thm ch l nhng my tnh ring bit trn c mt mng li IPv4 rng ln. nhng mng IPv6, nhng my tnh IPv6 ring bit ny c th kt ni vi nhau, hoc kt ni vi mng Internet IPv6 khi chng ch c ng kt ni IPv4. S dng c s h tng mng IPv4 kt ni IPv6 l mc tiu ca cng ngh ng hm (Tunnel).

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

60

Cng ngh ng hm l mt phng php s dng c s h tng sn c ca mng IPv4 thc hin cc kt ni IPv6 bng cch s dng cc thit b mng c kh nng hot ng Chng hai giao thc ti hai im u v cui nht nh. Cc thit b ny "bc" gi tin IPv6 trong gi tin c phn u IPv4 v truyn ti i trong mng IPv4 ti im u v g b phn u IPv4, nhn li gi tin IPv6 ban u ti im ch cui ng truyn IPv4.

ng hm: bc gi tin IPv6 trong gi tin IPv4 Mo u IPv4 Mo u IPv6 D liu IPv6

Hnh 3.4 Cng ngh ng hm Tunnel im kt thc ng hm c th c xc nh ti my tnh (Host) hoc b nh tuyn (Router) to nn cc kt ni nh sau: -Router - ti - Router: cc router IPv6/IPv4 kt ni vi nhau bi c s h tng mng IPv4. Do , c th thc hin chuyn cc gi tin (Datagram) theo nh dng IPv6 trn nn IPv4. Trong trng hp ny, ng hm tri rng t im bt u ti im kt thc ca on mng IPv4. -Host - ti - Router: mt chng giao thc cho host IPv6/IPv4 c th thc hin Tunnel IPv6 trn nn IPv4 chuyn cc gi tin ti cc b nh tuyn trung gian cng c cu hnh l cc Nt mng i IPv6/IPv4. Trong trng hp ny, ng hm tri rng trong phm vi t Host ti Router . -Router - ti - Host: IPv6/IPv4 Router c th dng Tunnel kt ni vi IPv6/IPv4 Host thng qua h tng mng IPv4.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

61

-Host - ti - Host: hai Host IPv6/IPv4 c th truyn cc gi tin theo nh dng IPv6 trn nn IPv4. Trong trng hp ny, c ch ng hm tri rng t im u n im cui. Vi nhiu cng ngh to ng hm khc nhau, cc my tnh IPv6, hay mng IPv6 ring bit hin nay trn Internet u c th c kt ni IPv6, v kt ni vo mng Internet IPv6 th nghim, tm hiu, trao i thng tin. Tuy nhin cc my tnh v mng ny phi c kt ni Internet IPv4 v la chn mt cng ngh ng hm ph hp.
3.1.2.1 Nguyn tc hot ng ca vic to ng hm

Nguyn tc ca vic to ng hm trong cng ngh ng hm nh sau: -Xc nh thit b kt ni ti cc im u v cui ng hm. Hai thit b ny phi c kh nng hot ng chng giao thc. -Trn hai thit b mng (c kt ni Internet IPv4) ti u v cui ng hm, thit lp mt giao din ng hm (giao din o, khng phi giao din vt l) dnh cho nhng gi tin IPv6 s c "bc" trong gi tin IPv4 i qua. -Xc nh a ch IPv4 v a ch IPv6 ti ngun v ch ca giao din ng hm. Gn a ch IPv6 cho giao din ng hm. -To tuyn (route) cc gi tin IPv6 i qua giao din ng hm. Ti , chng c "bc" trong gi tin IPv4 c gi tr trng "Th tc" - Protocol 41 v chuyn i da trn c s h tng mng IPv4 v nh cc b nh tuyn (router) ca mng IPv4.
3.1.2.2 Phn loi cng ngh ng hm:

Ty theo cng ngh ng hm, cc im bt u v kt thc ng hm c th c cu hnh bng tay bi ngi qun tr, hoc c t ng suy ra t a ch ngun v a ch ch ca gi tin IPv6, ng hm s c dng kt ni im - im hay im - a im. Da theo cch thc thit lp im u v cui ng hm, cng ngh ng hm c th phn thnh hai loi: ng hm bng tay (configured) v ng hm t ng (automatic).

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

62

- ng hm bng tay (Configured Tunnel): l hnh thc to ng hm kt ni IPv6 trn c s h tng mng IPv4, trong i hi phi c cu hnh bng tay ti cc im kt thc ng hm. Trong ng hm cu hnh bng tay, cc im kt cui ng hm ny s khng c suy ra t cc a ch nm trong a ch ngun v a ch ch ca gi tin IPv6. - ng hm t ng (Automatic Tunnel) l cng ngh to ng hm trong khng i hi cu hnh a ch IPv4 ca im bt u v kt thc ng hm bng tay. a ch IPv4 ca im bt u v kt thc ng hm c suy ra t a ch ngun v a ch ch ca gi tin IPv6. Hai k thut Automatic Tunnel v Configured Tunnel c im khc nhau c bn nht chnh l vic quyt nh a ch cui ca qu trnh ng hm, cn li v c bn, hai c ch ny ging nhau nh: c cng im khi to ng hm (im ng gi tin) to mt Phn u IPv4 ng gi v truyn gi tin va ng gi; nt mng kt thc ca qu trnh ng hm (im m gi tin) nhn c gi tin ng gi, tch b phn Phn u IPv4, sa i mt s trng ca Phn u IPv6 v x l phn d liu ny nh mt gi tin IPv6; nt mng ng gi cn duy tr cc thng tin v trng thi ca mi qu trnh Tunnel. V s lng cc qu trnh ng hm c th tng ln mt s lng kh ln, trong khi cc thng tin ny thng lp li. Do , c th s dng k thut b nh m (cache) x l v c loi b khi cn thit. 3.1.2.3 Mt s cng ngh to ng hm:

Trong khong thi gian u, khi trin khai mng IPv6 th vic kt ni vi nhau h tr cng nh chia s thng tin l rt quan trng. Nhiu t chc ln c kh nng xy dng ng truyn IPv6 kt ni vi nhau v vi nhng mng IPv6 ln khc, hnh thnh nn mng Internet IPv6 ton cu. Bn cnh , cng c nhng t chc, c nhn khc khng c c nhng ng truyn thun IPv6 nh vy. h tr kt ni IPv6, trn mng Internet hin nay c nhiu t chc ng ra lm trung gian, cho php cc t chc, c nhn khc thit lp ng hm IPv6 trn c s h tng mng IPv4 ti mng ca t chc trung gian, t kt ni ti

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

63

c mng Internet IPv6 hoc cc mng IPv6 khc m mng li ca t chc trung gian c ni ti. Di y l mt s cng ngh h tr, cho php mng IPv6 c th kt ni vi nhau. 3.1.2.3.1 Cu hnh ng hm bng tay
ng hm bng tay l hnh thc to ng hm kt ni IPv6 trn c s h tng mng IPv4, trong i hi phi c cu hnh bng tay ti cc im kt thc ng hm. y l hnh thc to ng hm c p dng khi mun c mt kt ni n nh, ring bit, thng gia hai mng IPv6, c kt ni IPv4 thng qua hai b nh tuyn (router) bin. Nu hai router bin ny c kh nng hot ng chng giao thc, ngi ta c th cu hnh bng tay mt ng hm (Tunnel) gia hai b nh tuyn bin nhm kt ni hai mng IPv6 s dng c s h tng mng IPv4. ng hm bng tay cng c s dng cu hnh gia b nh tuyn v my tnh nhm kt ni mt my tnh IPv6 vo mt mng IPv6 t xa. Cu hnh bng tay ng hm gia my tnh v b nh tuyn c p dng trong cng ngh Tunnel Broker, c cp chi tit ti mc sau. ng hm cu hnh bng tay tng ng vi mt ng kt ni IPv6 o vnh vin gia hai min IPv6 trn c s h tng mng IPv4. Dng kt ni ng hm ny l kt ni im-im. Tuy nhin, n i hi cu hnh, qun tr th cng. Nu mun kt ni ti nhiu im, s phi to nhiu cp giao din Tunnel v nhiu ng hm. Trng hp mt t chc c hai phn mng IPv6 ti hai vng a l v ch c c s h tng IPv4 gia hai phn mng ny. Khi , kt ni hai phn mng IPv6, to mt ng hm cu hnh bng tay gia hai router bin ca hai phn mng l la chn tt nht c mt kt ni n nh. 3.1.2.3.2 Cng ngh ng hm 6to4 Cng ngh ng hm 6to4 l cng ngh s dng a ch IPv4 ton cu to ra cc khi a ch IPv6 ring, khc bit vi a ch IPv6 cp bi cc t chc qun l ti nguyn quc t (thng c gi l a ch thun IPv6). Nhng khi a ch to

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

64

nn t IPv4 ny s dng cho cc mng IPv6 6to4, ng thi thit lp ng hm t ng kt ni cc mng ny, coi c s h tng IPv4 nh mt mi trng kt ni vt l o. 6to4 cn cho php mt my tnh c a ch IPv4 ton cu d dng tr thnh mt my tnh 6to4 v truy cp mng Internet IPv6 m khng cn cu hnh phc tp. H iu hnh Windows XP, Windows 2003 server h tr t ng cu hnh sn giao din o ng hm 6to4 khi my tnh c kch hot th tc IPv6. Khi tin hnh kch hot th tc IPv6 trn mt my tnh c kt ni mng Internet IPv4 vi mt a ch IPv4 ton cu gn cho card mng, h iu hnh s t ng bin my tnh thnh my tnh 6to4 v cu hnh nh tuyn mc nh kt ni my tnh vi mng 6to4 ca Microsoft. Do , thao tc c mt ng hm kt ni ti mng Internet IPv6 l khng cn thit. IANA cp ring mt tin t a ch 2002::/16 thuc vng a ch nh danh ton cu dnh cho cng ngh 6to4. Tin t a ch ny s kt hp vi mt a ch IPv4 ton cu to nn mt khi a ch IPv6, c gi l a ch 6to4. Cc mng, thit b IPv6 s dng dng a ch ny c gi tn l mng IPv6 6to4. Cc mng v thit b 6to4 kt ni vi nhau bng cng ngh ng hm t ng, s dng c s h tng mng IPv4, to nn mt th gii 6to4 ring. Tuy nhin, cc mng 6to4 khng ch kt ni vi nhau, chng cn c th kt ni ti mng Internet s dng a ch thun IPv6 bng mt thit b thc hin vai tr cu ni. Thit b ny gi l b nh tuyn chuyn tip 6to4 (6to4 relay router). a ch IPV6 s dng trong cng ngh ng hm 6to4 Tin t a ch 6to4 l 2002::/16, kt hp vi 32 bits ca mt a ch IPv4 s to nn mt tin t a ch 6to4 kch c /48 duy nht ton cu s dng cho mt mng IPv6. Tin t /48 ca a ch IPv6 tng ng mt a ch IPv4 ton cu c to nn bng cch sau:

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

65

Hnh 3.5. Cu trc a ch IPv6 6to4


- Phn tin t ca a ch c to nn bng cch gn 16 bits tin t dnh ring ca Tunnel 6to4 2002::/16, 32 bits tip theo l a ch IPv4 c vit di dng hexa. - Vng a ch /48 ny c th s dng phn b to nn mt mng IPv6 6to4. Mt mng con trong IPv6 c gn tin t mng /64. Nh vy, vi vng a ch /48 th 16 bits c s dng nh s v c khong ti 65536 mng LAN 6to4. y l con s rt ln v kh c th s dng ht vng a ch /48 ch t mt a ch IPv4. V d: Nu b nh tuyn (router) ang ni vo mng Internet IPv4 vi a ch 203.119.9.15. Khi vng a ch IPv6 6to4 s l: 2002:cb77:090f::/48. Tin t a ch ny c to nn bng cch gn 16 bits tin t dnh ring ca ng hm 6to4 2002::/16 vi cb77:090f chnh l 32 bits a ch IPv4 c vit di dng hexa.

Cc thnh phn ca cng ngh ng hm 6to4

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

66

Hnh 3.6.cc thnh phn ca tunnel 6to4 ng hm 6to4 l mt cng ngh ng hm t ng, cho php nhng min IPv6 6to4 tch bit c th kt ni qua mng IPv4 ti nhng min IPv6 6to4 khc. im khc bit c bn nht gia ng hm 6to4 v ng hm cu hnh bng tay l ch ng hm 6to4 khng phi kt ni im-im. ng hm 6to4 l dng kt ni im-a im. Trong , cc b nh tuyn khng c cu hnh thnh tng cp m chng coi mi trng kt ni IPv4 l mt mi trng kt ni vt l o. Chnh a ch IPv4 gn trong a ch IPv6 s c s dng tm thy u bn kia ca ng hm. Tuy nhin, thit b ti hai u ng hm phi c h tr c IPv6 v IPv4. M hnh ng dng cng ngh ng hm 6to4 (Tunnel 6to4) n gin nht l kt ni nhiu mng IPv6 ring bit, mi mng c t nht mt ng kt ni ti mng IPv4 chung qua router bin c gn a ch IPv4 ton cu. Cc thnh phn ca cng ngh ng hm 6to4: My tnh 6to4: l bt k my tnh IPv6 no c cu hnh vi t nht mt a ch 6to4. a ch ny c th c t ng cu hnh. B nh tuyn 6to4: l mt b nh tuyn chng giao thc h tr s dng giao din 6to4. B nh tuyn ny s chuyn tip lu lng ca mt mng 6to4 ti nhng b

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

67

nh tuyn 6to4 thuc mng khc. Vic cu hnh b nh tuyn 6to4 i hi cu hnh bng tay. B nh tuyn chuyn tip 6to4: l mt b nh tuyn 6to4, nhng c cu hnh c kh nng chuyn tip lu lng c a ch 6to4 ti nhng my tnh trn IPv6 Internet (s dng a ch thun IPv6, c phn b bi h thng t chc qun l a ch ton cu ). b nh tuyn chuyn tip 6to4 cn c cu hnh h tr chuyn tip nh tuyn gia a ch 6to4 v a ch IPv6 chnh thc nh danh ton cu. b nh tuyn chuyn tip 6to4 ng vai tr cu ni gia mng Internet IPv6 6to4 v IPv6 Internet, gip cho nhng mng Internet IPv6 6to4 c th kt ni ti mng Internet IPv6. a) Cng ngh Tunnel Broker Tunnel Broker l hnh thc to ng hm, trong mt t chc ng ra lm trung gian, cung cp kt ni ti mng Internet IPv6 cho nhng thnh vin ng k s dng dch v Tunnel Broker do t chc cung cp. T chc cung cp dch v Tunnel Broker c vng a ch IPv6 c lp, ton cu, xin cp t cc t chc qun l a ch IP quc t. Mng IPv6 ca t chc cung cp Tunnel Broker c kt ni ti mng Internet IPv6 v nhng mng IPv6 khc. Ngi s dng s c cung cp thng tin thit lp ng hm t my tnh hoc mng ca mnh n mng ca t chc duy tr Tunnel Broker v dng mng ny nh mt trung gian kt ni ti cc mng IPv6 khc. Cng ngh to ng hm trong Tunnel Broker l to ng hm bng tay. T chc duy tr Tunnel Broker s cung cp cho ngi s dng: - Mt vng a ch IPv6 t khng gian a ch IPv6 ca nh cung cp dch v Tunnel Broker, tho mn nhu cu ca ngi s dng. - Chuyn giao cho ngi s dng mt tn min cp di khng gian tn min ca nh cung cp dch v Tunnel Broker. y l tn min hp l ton cu, thnh vin ca Tunnel Broker c th s dng tn min ny thit lp website IPv6 cho php nhng mng IPv6 c kt ni ti mng ca nh cung cp dch v Tunnel Broker truy cp ti.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

68

- Cc thng tin v hng dn ngi s dng thit lp ng hm n mng ca t chc cung cp Tunnel Broker.

Hnh 3.7. kt ni ipv6 vi tunnel Broker

M hnh Tunnel Broker nh sau:

Hnh 3.8. M hnh ca tunnel Broker Tunnel Broker: - L nhng my ch dch v lm nhim v qun l thng tin ng k, cho php s dng dch v, qun l vic to ng hm, thay i thng tin ng hm cng nh xo ng hm. - Trong h thng dch v Tunnel Broker ca nh cung cp, my ch Tunnel Broker s lin lc vi Tunnel Server (thc cht l cc b nh tuyn Dual - stack) v my ch tn min ca nh cung cp Tunnel Broker thit lp ng hm pha

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

69

nh cung cp dch v v to bn ghi tn min cho ngi ng k s dng dch v Tunnel Broker. - Ngi s dng thng qua mng Internet IPv4 s truy cp my ch Tunnel Broker v ng k ti khon s dng dch v Tunnel Broker thng qua mu ng k di dng Web. My ch ng hm (Tunnel Server): - Thc cht l cc b nh tuyn chng giao thc lm nhim v cung cp kt ni ngi ng k s dng dch v kt ni ti truy cp vo mng IPv6 ca t chc cung cp Tunnel Broker. - Cc b nh tuyn ny l im kt thc ng hm pha nh cung cp dch v Tunnel Broker. Tunnel Server nhn yu cu t my ch Tunnel Broker v to, hoc xo ng hm pha nh cung cp Tunnel Broker. 3.1.3 CNG NGH CHUYN I: Cng ngh chuyn i thc cht l mt dng bin th ca cng ngh dch a ch mng (NAT), thc hin bin dch a ch v dng thc ca phn u, cho php thit b ch h tr IPv6 c th giao tip vi thit b ch h tr IPv4. Cng ngh ph bin c s dng l dch a ch mng - giao thc dch (NAT-PT:Network Address Translation-Protocal Translation). Thit b cung cp dch v NAT-PT s bin dch li mo u v a ch cho php mng IPv6 giao tip vi mng IPv4.

Hnh 3.9. Cng ngh bin dch NAT-PT

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

70

3.1.3.1 Phn loi cng ngh NAT-PT Traditional(truyn thng) NAT-PT: cho php cc host trong mng IPv6 truy cp n cc host trong mng IPv4. Cng ngh bin dch ny cho php cc phin truy cp l n hng (Uni-directional). NAT-PT truyn thng s dng mt khi a ch IPv4 c thit lp dnh ring cho vic bin dch a ch cc Host IPv6 khi to phin sang cc host IPv4 trong min ngoi. Vi cc gi tin i ra ngoi t min IPv6, a ch IP ngun v cc trng lin quan nh ICMP Phn u kim tra, TCP, UDP v ICMP s c bin dch. Vi cc gi tin i vo, a ch ch IP v cc kim tra, nu trn cng c bin dch. Bi-Directional NAT-PT: Cn c gi l NAT-PT song hng, cc phin c khi ng t cc host trong mng IPv4 nh cc host khi ng trong mng IPv6. Cc a ch mng IPv6 c lin kt (bind) vi cc a ch mng IPv4, c th tnh hoc ng ph thuc vo kt ni c thit lp trong mi hng. Cc Host trong mng IPv4 truy cp n cc Host trong mng IPv6 bng cch s dng DNS cho vic phn gii a ch. Mt h thng tn min- cng lp ng dng (DNS-ALG) phi c trin khai kt hp NAT-PT song hng to iu kin d dng nh x tn sang a ch. c bit, DNS-ALG phi c kh nng phin dch cc a ch IPv6 trong cc phin truy vn DNS v p ng sang cc a ch IPv4 tng ng v hay ngc li.

3.1.3.2 Nguyn l lm vic ca NAT-PT


Hin nay hu ht cc b nh tuyn (router) NAT-PT ch mi h tr NAT Prefix/96. NAT-PT nh ngha ra mt IPv6 Prefix c gi l NAT Prefix. Cc gi tin t mng IPv4 sang mng IPv6 khi qua b nh tuyn NAT-PT s c chuyn i thnh gi tin IPv6 vi a ch ngun l mt a ch IPv6 nm trong NAT Prefix ny. Trong trng hp NAT tnh (Static NAT), mi a ch trong NAT Prefix tng ng vi mt a ch IPv4 ban u (nh x 1:1). Trong trng hp NAT ng (Dynamic NAT), hoc NAT qu ti (NAT overload), mt a ch IPv6 trong NAT Prefix ny c th dng cho mt hoc nhiu a ch IPv4.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

71

Cc gi tin lu thng qua li gia cc Site IPv4 v IPv6 cn c s thay i v cu trc. Khi gi tin ri khi mng IPv4 sang mng IPv6 (hay ngc li IPv6 sang IPv4) thng qua b nh tuyn NAT-PT, IPv4 Phn u c tch ra v thay th bi IPv6 Phn u (hay ngc li). Tt c cc thng tin trong phn d liu (data) ca gi tin thng thng phi c bo ton ngoi tr cc gi ICMP v cc thng tin trao i vi DNS. Nguyn l hot ng c bn ca phng php NAT-PT c m t qua v d sau. Gi s a ch NAT Prefix c dng l "3ffe:aaaa::/96".

DA

SA ... data

3ffe:aaaa::a/96 3ffe::2
Cu hnh NAT_PT trn b nh tuyn

DA

SA ... data

203.162.0.1 192.168.0.3

Hnh 3.10. Chuyn i gi tin IPv4 thnh IPv6. Khi Nt mng IPv6 mun truyn thng n Nt mng IPv4, Nt mng IPv6 to gi tin IPv6 vi a ch ngun v ch ln lt l: Source Address: 3ffe::2 Destination Address : 3ffe:aaaa::a/96 (a ch ny thuc NAT Prefix). NAT Prefix ny c b nh tuyn NAT-PT qung b trong min IPv6. Cc gi tin IPv6 c a ch ch nm trong NAT Prefix ny s c nh tuyn n NAT-PT router. Ti y, gi tin IPv6 s c NAT-PT Router chuyn i thnh gi tin IPv4. Gi tin IPv6 sau khi c chuyn i thnh gi tin IPv4 s c a ch ngun v ch ln lt nh sau: Source Address : 192.168.0.3 Destination Address : 203.162.0.1

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

72

Gi tin sau khi c chuyn sang nh dng IPv4 s c h tng mng IPv4 chuyn n ch l Nt mng IPv4. Qu trnh ny cng xy ra tng t khi gi tin IPv4 t Nt mng IPv4 chuyn n Nt mng IPv6. Thng tin v vic nh x gia IPv4 v IPv6 c thit lp v lu gi trong b m ca b nh tuyn NAT-PT, thng tin ny c lu gi trong sut qu trnh truyn thng gia Nt mng IPv4 v Nt mng IPv6. 3.1 KT LUN CHNG: Xy dng mt mng c kh nng tng thch, c th s dng c hai dng a ch v4 v v6 l mt trong nhng kh khn ca cc nh qun tr mng ni ring, ca ngi s dng ni chung. Chng ny trnh by mt s gii php hai dng a ch v4 v v6 c th ni chuyn c vi nhau. Mt trong nhng gii php l: Dual-stack, Cng ngh ng hm (Tunnel), Cng ngh bin dch NAT. Nhng k thut ny ra i vi mc ch tit kim c chi ph trin khai mt mng

Backbone IPv6.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

73

CHNG 4 : DEMO M HNH THC HIN CU HNH CHUYN TIP T IPV4 SANG IPV6 4.1 M HNH THC HIN TRIN KHAI CU HNH

Hnh 4.1 M hnh cu hnh chung

4.2 CNG C DNG CU HNH Bi Lab c thc hin cu hnh gi lp trn thit b phn mm GNS3,l mt phn mm gi lp c giao din ha (graphical network simulator).Trong bi lab ny cc router( b nh tuyn) s dng IOS cisco router 3600. Cc Router mng IPv6 v6v4_R2 v v6v4_R3 kt ni vi mng IPv4 thng qua cc cng Serial 0/0 v Serial 0/1.Gia 2 mng IPv6 lin h vi nhau qua cng ngh ng hm vi a ch IP 3001::/64, cng ngh s dng c s h tng mng IPv4 truyn ti gi tin IPv6, phc v cho kt ni IPv6.Trn 2 Router v6v4_R2 v v6v4_R3 s dng Dual-stack(chng 2 giao thc) 2 a ch IPv4 v IPv6: cho php IPv4 v IPv6 cng hot ng trong mt thit b mng.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

74

4.3 TRIN KHAI CU HNH TRN CC ROUTER Router V4_R1

Hnh 4.2 cu hnh trn router V4_R1

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

75

Router V6V4_R2

Hnh 4.3 Cu hnh trn Router V6V4_R2

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

76

V6_R3

Hnh 4.4 Cu hnh trn Router V6_R3

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

77

Router V6V4_R3

Hnh 4.5 cu hnh trn Router V6V4_R3

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

78

Router V6_R5

Hnh 4.6 cu hnh trn Router V6_R5

4.4 PING KIM TRA KT QU Ta tin hnh ping t Router V6_R3 c a ch IP 2001:A:B:C::3/64 qua Router V6_R5 c a ch IP 4001:A:B:C::5/64 v c kt qu nh sau:

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

79

Hnh 4.7 kt qu ping t Router V6_R3 sang Router V6_R5 Sau ta ping ngc li t Router V6_R5 sang Router V6_R3

Hnh 4.8 kt qu ping t Router V6_R3 sang Router V6_R5

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

80

KT QU T C - Qua bi lab demo cu hnh cho thy 2 mng IPv6 v IPv4 giao tip vi nhau qua B nh tuyn bin (Border Router ) s dng cng ngh Tunnel,trn Router bin chy ng thi 2 giao thc kt hp c 2 a ch IPv4 v IPv6 trn cng 1 Router. - Nh Router bin m vic trao i gia 2 mng din ra d dng.t p dng vo thc tin,khi IPv4 ang cn kin,IPv6 ang dn c trin khai,p dng cc phng thc trn gip chng ta c th d dng lin h vi nhau gia 2 h thng mng IPv4 v IPv6 m khng lm ph v cu trc internet cng nh khng lm gin on hot ng ca mng internet. IPv6 c thit k vi hy vng khc phc nhng hn ch vn c ca a ch IPv4 nh hn ch v khng gian a ch, cu trc nh tuyn v bo mt, ng thi em li nhng c tnh mi tha mn cc nhu cu dch v ca th h mng mi nh kh nng t ng cu hnh m khng cn h tr ca my ch DHCP, cu trc nh tuyn tt hn, h tr tt hn cho Multicast, h tr bo mt v cho di ng tt hn. Hin nay IPv6 c chun ha tng bc, chun b a vo ng dng thc t trong tng lai. Ni dung ca cun n trnh by c nhng vn c bn nht c th trin khai trong thc t nh: v cu trc, cch nh a ch IP, khng gian a ch cung cpV nh trnh by trn, c c mt mng Internet s dng duy nht mt dng a ch IPv6 l mt vn rt kh khn, c th ni l khng th thc hin trong mt vi nm na. Do nhiu nguyn nhn khch quan cng nh ch quan m thc ti yu cu nh vy, nn n cng a ra nhng gii php cng ngh ha hp hai dng a ch l Cng ngh chuyn i IPv6 sang IPv4 trong Chng 3 nu ra, vi hy vng s gii quyt c vn thiu ht a ch do tc pht trin mnh ca CNTT hin nay.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

81

KT LUN V NH GI Khng gian a ch l mt vn nng bng ca ton th gii ni chung v ca Vit Nam ta ni ring. Khi chuyn sang s dng IPv6 th ta c th d dng v n gin hn trong vic trin khai a ch cho cc c quan, t chc. Bn cnh , cc thit b khi hot ng trn nn IPv6 c th d dng thay i v tr m khng gy tr ngi ln cho ngi qun tr. Tuy nhin, dng a ch ny hot ng tt th thng thng cc thit b phi c h tr c hai giao thc v4 v v6. M iu ny s l tr ngi ln trong phn mm cng nh phn cng ca thit b v mt kinh t cng nh k thut. Trn thc t ti VN, cc doanh nghip cung cp dch v Internet (ISP) cha nhn thy c s cn thit cn phi s dng loi a ch ny v nhiu nguyn nhn khc nhau. Song cho n thi im ny nc ta cng c c nhng bc i ban u c th trin khai dng a ch ny nh: c nhng ti cp nh nc nguyn cu v IPv6; cc nh cung cp dch v vin thng nh Viettel, Mobiphone, EVN Telecomecng a cn b ca mnh i tp hun k thut; Hin nay VNNIC trin khai chnh sch h tr cp pht min ph IPv6 cho mi thnh vin c cp IPv4. HNG PHT TRIN CA TI

Vic nguyn cu a ch IPv6 l cn thit c nh hng, lp k hoch pht trin v trin khai ng dng cc cng ngh mi vo mng vin thng Vit Nam. Vic trin khai dng a ch ny cn phi thc hin qua nhiu giai on v ph thuc vo yu cu thc ti cng nh cc chun m th gii a ra ng dng. Do , ni dung ca cun n ny cn c tip tc nguyn cu, m rng.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

82

PH LC GII THCH CC THUT NG ANYCAST Cch thc gi gi tin n mt ch bt k trong mt nhm cc my. APNIC - Asia Pacific Network Information Centre T chc qun l a ch IP, s hiu mng cp vng, ph trch khu vc chu Thi Bnh Dng. ARIN - American Registry for Internet Number T chc qun l a ch IP, s hiu mng cp vng, ph trch khu vc Bc M. ARP - Address Resolution Protocol Th tc phn gii a ch, s dng trong IPv4 phn gii a ch IPv4 thnh a ch lp 2 tng ng. BROADCAST Mt gi tin c a ch ch broadcast s c truyn ti ti v c x l bi mi my trong mt mng. CIDR - Classless Inter-Domain Routing L phng php gp cc a ch mng nh thnh mt a ch mng ln duy nht. L mt lc a ch mi cho Internet, n cho php s dng hiu qu ti nguyn a ch IP hn l m hnh lc a ch chia thnh cc lp A, B, C. DAD - Duplicate Address Detection Mt qu trnh cho php node IPv6 m bo c rng mt a ch cha c s dng trn ng kt ni trc khi node IPv6 quyt nh s dng a ch. DHCP - Dynamic Host Configuration Protocol Th tc cu hnh a ch ng, cp a ch tm thi cho thit b IPv4. c s dng cho php mt thit b IPv4 tm a ch IP v nhng thng tin khc nh my ch tn min ni b m khng cn ti cu hnh th cng v lu tr nhng thng tin ny trn my. DHCPv6 - Dynamic Host Configuration Protocol version 6 Th tc cu hnh a ch ng phin bn 6. y l th tc c ngha tng t nh DHCP. Dual-stack Mt node Dual - stack l mt node lm vic vi c IPv4 v IPv6. ng kt ni

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

83

ng kt ni (hay ng link): Khi nim s dng y ch mt kt ni Ethernet. FTP - File Transfer Protocol Thng c dng trao i tp tin qua mng li truyn thng dng giao thc TCP/IP (chng hn nh Internet - mng ngoi b - hoc intranet - mng ni b). Hot ng ca FTP cn c hai my tnh, mt my ch v mt my khch. FTP thng chy trn hai cng 20 v 21. Gateway My tnh, hoc thit b thc hin vai tr nh mt ca a lu lng t mt my tnh ra mng ngoi hoc sang mt mng khc. Header Phn u - phn cha cc thng tin phc v cho vic x l thng tin ti cc lp trong m hnh hot ng ca th tc TCP/IP. Hop limit Mt trng ca Mo u IPv6, xc nh s ng kt ni ti a m gi tin c th i qua trc khi b hu b. Host Khi nim dng y ch my tnh, hoc thit b khc, cung cp dch v, khng thc hin chc nng nh tuyn. HTTP - Hyper Text Transfer Protocol HTTP l mt giao thc chun trc thuc lp ng dng trong m hnh 7 lp OSI v c dng lin h thng tin gia my cung cp dch v (Web Server) v my dng dch v (Client). HTTP tng thch vi nhiu nh dng thng tin, media v h s. IANA - Internet Assigned Numbers Authority T chc qun l ti nguyn s (a ch IP, s protocol, s port...) quc t. ICANN - Internet Corporation for Assigned Names and Numbers. T chc phi li nhun, m nhim vai tr qun l v ti nguyn s (a ch IP, cc thng s th tc) v tn (h thng tn min), ng thi qun l h thng my ch tn min gc ton cu. ICMP - Internet Control Message Protocol Th tc ca nhng thng ip iu khin, s dng trao i nhng thng ip bo li giao tip, thng ip chn on mng trong hot ng ca IP. ICMPv4 - Internet Control Message Protoco version 4 Th tc ICMP phin bn 4. Khi nim ny ng nht vi khi nim ICMP.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

84

ICMPv6 - Internet Control Message Protoco version 6 Th tc ICMP phin bn 6, l phin bn c sa i, nng cp ca ICMP, phc v cho hot ng ca IPv6. IETF - Internet Engineering Taskforce T chc tiu chun ho, vit cc ti liu tiu chun ho (RFC) phc v hot ng Internet ton cu. IGMP - Internet Group Management Protocol Th tc s dng trong cng ngh Multicast IPv4 thit lp quan h thnh vin nhm Multicast trong mt mng. Th tc ny cho php mt my tnh thng bo vi b nh tuyn trn mng ca n rng n mun nhn lu lng ca mt a ch Multicast nht nh. InterNIC T chc Quc t chuyn tip nhn ng k cc tn min website v a ch Internet. InterNIC c thnh lp theo tha thun gia Network Solutions, National Science Foundation & General Atomics v AT&T. IPSec Mt cng ngh cung cp bo mt, xc thc v nhng dch v an ninh khc ti tng IP. IPv4 - Internet Protocol version 4 Phin bn 4 ca th tc Internet. Hin ang c s dng ph bin trong hot ng mng Internet ton cu. IPv6 - Internet Protocol version 6 Phin bn 6 ca th tc Internet, c pht trin nhm thay th IPv4, khc phc nhng hn ch ca phin bn IPv4 v ci thin thm nhiu c tnh mi. LACNIC - Latin American and Caribbean Internet Addresses Registry T chc qun l a ch IP, s hiu mng cp vng, ph trch khu vc M La tinh v bin Caribe. Link Bao gm mt hoc nhiu mng con cng ni vo 1 interface ca Router. Loopback Knh giao tip cho php phn mm khch (client) c th giao tip vi phn mm ch (server) trn cng mt my. Ngi s dng dng mt a ch IP thng l 127.0.0.1 tr v my tnh ny. Di a ch s dng cho chc nng loop back l t 127.0.0.0 n 127.255.255.255. MLD - Multicast Listener Discovery

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

85

L mt th tc, s dng cc thng ip ICMPv6, cho php cc b nh tuyn khm ph ra nhng a ch IPv6 Multicast no ang c nghe lu lng trn mt ng kt ni. MTU - Maximum Transmission Unit Kch thc gi tin ln nht c th truyn ti trn mt ng kt ni. Multicast Cng ngh cho php gi mt gi tin IP ng thi ti mt nhm xc nh cc thit b mng. Cc thit b mng ny c th thuc nhiu t chc v nh v cc v tr a l khc nhau. NAT - Network Address Translation Mt cng ngh thay th a ch trong gi tin IP khi gi tin i ra, hoc vo mt mng, cho php nhiu thit b mng nh a ch ring (private) c th chia s cng mt a ch ton cu (public) v kt ni vo Internet. ND - Neighbor Discovery Mt th tc mi, c pht trin trong hot ng IPv6. ND s dng cc thng ip ICMPv6 m nhim cc quy trnh giao tip cn thit gia cc node trn mt ng kt ni nh quy trnh phn gii a ch (thc hin bng th tc ARP trong IPv4), quy trnh tm kim b nh tuyn Node Khi nim y dng ch mt thit b (bao gm c my tnh, b nh tuyn, hoc thit b khc), l mt im kt ni vo mng. NUD - Neighbor Unreachability Detection Trong IPv6 th cc my tnh, router s dng cc thng ip NS, NA kim tra kh nng c th kt ni c ti node ln cn. PAT - Port Address Translation L phng thc chuyn i c a ch IP v port do cng mt lc c th cung cp nhiu phin NAT ra ngoi Internet. PathMTU Discovery Quy trnh tm kim gi tr MTU nh nht trn mt ng kt ni t ngun ti ch. Prefix L mt khi a ch IPv4 hoc IPv6, c quyt nh bng vic c nh mt s bits u tin ca a ch. V d 203.119.9.0/24 l tp hp cc a ch IPv4 t 203.119.9.0 n 203.119.9.255. i vi IPv6, 2000::/3 l tp hp cc a ch IPv6 c ba bits u tin l 001 (ch ci hexa u tin trong a ch l 2 hoc 3).

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

86

QoS - Quality of Service Cht lng dch v: Khi nim trong truyn ti lu lng, m bo lu lng mng i n ch theo mt cht lng nht nh (mc li, thi gian truyn ti lu lng...). RFC - Request For Comments Nhng ti liu tiu chun cho Internet, c son tho v xut bn bi IETF. RIPE NCC - Rseaux IP Europens T chc qun l a ch IP, s hiu mng cp vng, ph trch khu vc Chu u. RIR - Regional Internet Registry T chc qun l v phn b a ch IP cp vng cho cc hot ng Internet. Nhng t chc ny cng c nhng vai tr trong vic h tr qun l c s h tng Internet v pht trin chnh sch qun l ti nguyn a ch IP, s hiu mng ASN. Router - B nh tuyn Thit b mng thc hin chc nng chuyn tip lu lng gia cc mng. TCP/IP - Transmission Control Protocol/Internet Protocol Mt b cc giao thc giao tip, phc v cho vic kt ni cc thit b trn Internet. TFTP - Trivial File Transfer Protocol TFTP dng c ch ACK v truyn li (resending) theo tng ca giao thc TCP. C ch kim li th da trn c ch thng ip trong EFTP ca PARC. TFTP c hin thc trn nn tng ca UPD v vy n c th dng di chuyn file trn cc my trn cc mng khc nhau c hin thc UDP.TFTP cng c thit k hin thc nh gn v n gin, do FTP l giao thc b sung cc thiu st ca TFTP. Tunnel - ng hm L mt cch thc truyn gi tin IPv6 t mt im ti mt im khc trn mng, s dng c s h tng mng IPv4 bng cch bc gi tin IPv6 trong gi tin IPv4, do vy chng c th i c trong c s h tng mng IPv4. Unicast Cch thc gi gi tin thng thng. Trong gi tin ch c gi n mt ch duy nht. Nhng cch thc gi gi tin khc bao gm anycast, broadcast v multicast. VLSM - Variable Length Subnet Mask Phng php chia nh mt a ch mng ln thnh cc mng nh hn c subnet mask khc nhau.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

87

VPN - Virtual Private Network c nhc ti nh mt mng trong c cc phn mng cch nhau bi v tr a l c kt ni thng qua Internet cng cng. Song d liu truyn qua Internet c m ho, do vy ton b mng c xem nh mt mng ring o.

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S

n Tm hiu IPv6 v Cu hnh chuyn i giao tip t IPv6 sang IPv4

88

DANH MC TI LIU THAM KHO Ti liu ting vit: 1. Gio trnh mn mng my tnh,Th.s Nguyn Tn Khi(2004),i Hc Bch Khoa Nng,ti liu lu hnh ni b, Nng ,2004. 2. Gii thiu v th h a ch internet mi IPv6, K.S Nguyn Th Thu Thy, Th.s Nguyn Minh Cng(2006),Nxb bu in thnh ph H Ch Minh,2006. 3. Gio trnh h thng mng my tnh CCNA semester 1,Nguyn Hng Sn,Nxb Lao ng v X Hi 2005. 4. Cc website:

http://www.dancisco.com http://nhatnghe.com http://vnpro.org


Ti liu ting anh: 1. Microsoft Corporation, Introduction to IP Version 6, Published: September 2003 Updated: March 2004 - ti liu ca Microsoft 2. Joseph Davies (1999-2000), Understanding IPv6. 3. San Jose, Implementing IPv6 for Cisco IOS Software ,ti liu ca Cisco 4. cc website :

http://www.apnic.net http://www.cisco.com http://www.ipv6tf.org

GVHD:Hunh Cng Php

SVTH:L Xun Tm,Nguyn Hng S