Nghien Cuu IPv4 & IPv6

  • View
    242

  • Download
    0

Embed Size (px)

Text of Nghien Cuu IPv4 & IPv6

  • 7/31/2019 Nghien Cuu IPv4 & IPv6

    1/62

    Trung tm pht trin CNTT-HQG TP. H ch minhTrung tm o to cng ngh cao Bch Khoa

    Gio vin hng dn : Th.S H Mnh o

    1

    Li cm nChng em xin chn th nh cm n thy gio thc

    s H Mnh o trc tip hng dn chng em xydng v ho n th nh n.

    Chng em xin chn th nh cm n cc thy ctrong trung tm cng ngh cao Bch Khoa HTC to

    mi iu kin gip chng em ho n th nh n n y.

    H Ni, thng 06 nm 2005

    Hc vinNguyn Quc Tun

    T Ho ng AnhNguyn Th Thu

  • 7/31/2019 Nghien Cuu IPv4 & IPv6

    2/62

  • 7/31/2019 Nghien Cuu IPv4 & IPv6

    3/62

    Trung tm pht trin CNTT-HQG TP. H ch minhTrung tm o to cng ngh cao Bch Khoa

    Gio vin hng dn : Th.S H Mnh o

    3

    Chng 1 Nhng hn ch ca IPv4 v c im ca IPv6

    1.1 Nhng hn ch ca IPv4:- Giao thc tng mng trong b giao thc TCP/IP hin ti ang l

    IPv4 (Internet- working protocol verision 4). IPv4 cung cp truyn thnhost-to-host gia nhng h thng trn Internet. Mc d IPv4 c thit kkh tt, s thng i thng tin tin trin t lc khi u IPv4 v o nhnm 1970, nhng IPv4 c nhng s thiu ht khin cho n khng ng bcho s pht trin nhanh ca Internet, gm nhng th sau:

    + IPv4 c 2 level cu trc a ch (netid v hostid) phn nhm v olp (A, B, C, D v E). S s dng nhng a ch l khng hiu qu. Vnh khi cos mt t chc c cp cho 1 a ch lp A, 16 triu a cha ch c phn phi duy nht cho t chc s dng. Nu 1 t chc cp cho 1 a ch lp C, mt khc ch c 256 a ch c phn phchc, y khng phi l mt s . Cng vy, nhiu triu a ch b ltrong nhm D v E. Phng thc phn a ch n y dng ht nhng ch ca IPv4, v mau chng s khng cn a ch n o cn cp cho bmt h thng mi n o mun kt ni v o Internet. Mc d sch lc subnetv supernet gim bt nhng vn v a ch, nhng subnet v sup l m cho ng truyn tr ln kh khn hn.

    + Internet phi thch nghi c vi s chuyn giao audio v videothi gian thc. Loi chuyn giao n y yu cu nhng sch lc tr ho n tnht v s t trc ca t i nguyn khng c cung cp trong thit k.

    + Internet phi thch nghi c vi s m ho v s chng nhn cad liu cho mt s ng dng. Khng mt s m ho v s chng nhn n oc cung cp trong IPv4.- khc phc thiu st trn IPv6 c bit n nh l IPng (Interworking Protocol, next generation), c xng v nay l mt chun.

    1.2 c im ca IPv6:- Trong IPv6 giao thc Internet c ci tin mt cch rng ln thnghi c s pht trin khng bit trc c ca Internet. nh dng v d i ca nhng a ch IP cng c thay i vi nhng gi nh dNhng giao thc lin quan, nh ICMP cng c ci tin. Nhng giao thkhc trong tng mng nh ARP, RARP, IGMP hoc b xo hoc trong giao thc ICMPv6. Nhng giao thc tm ng nh RIP, OSPF cnc ci tin kh nng thch nghi vi nhng thay i n y. Nhng chuygia truyn thng d on l IPv6 v nhng giao thc lin quan vi n snhanh chng thay th phin bn IP hin thi.Th h mi ca IP hay IPv6 c nhng u im nh sau:

  • 7/31/2019 Nghien Cuu IPv4 & IPv6

    4/62

    Trung tm pht trin CNTT-HQG TP. H ch minhTrung tm o to cng ngh cao Bch Khoa

    Gio vin hng dn : Th.S H Mnh o

    4

    1.2.1 Khng gian a ch ln IPv6 c a ch ngun v ch d i 128 bt. Mc d 128 bt c th

    hn 3,4*1038 t hp, khng gian a ch ca IPv6 c thit k d phngln cho php phn b a ch v mng con t trc xng sng internet tng mng con trong mt t chc. Cc a ch hin ang phn b

    dng ch chim mt lng nh v vn cn tha rt nhiu a ch sncho s dng trong tng lai. Vi khng gian a ch ln n y, cc k thubo tn a ch nh NAT s khng cn cn thit na.

    1.2.2 a ch phn cp, h tng nh tuyn hiu qu Cc a ch to n cc ca Ipv6 c thit k to ra mt h t

    nh tuyn hiu qa, phn cp v c th tng qut ho da trn s phnthng thy ca cc nh cung cp dch v Internet (ISP) trn thc t. Trmng Internet da trn IPv6, cc router mng xng sng (backbone) c s mc trong bng nh tuyn nh hn rt nhiu.

    1.2.3 Khun dng header n gin ho - Header ca IPv6 c thit k gim chi ph n mc ti thiun y t c bng cch chuyn cc trng khng quan trng v cc trngla chn sang cc header m rng c t pha sau ca IPv6 headKhun dng header mi ca IPv6 to ra s x l hiu qu hn ti ccrouter.

    1.2.4 T cu hnh a ch n gin cho vic cu hnh cc trm, IPv6 h tr c vic t c

    hnh a ch stateful nh kh nng cu hnh server DHCP v t cu hn

    ch stateless (khng c server DHCP). Vi t cu hnh a ch dstateless, cc trm trong lin kt t ng cu hnh chng vi a ch IPca lin kt (a ch cc b lin kt) v vi a ch rt ra t tin t qung b bi router cc b. Thm tr nu khng c router, cc trm trncng mt lin kt c th t cu hnh chng vi cc a ch cc b lin kgiao tip vi nhau m khng phi thit lp cu hnh th cng.

    1.2.5 Kh nng xc thc v bo mt an ninh Tch hp sn trong thit k IPv6 gip trin khai d d ng m b

    tng tc ln nhau gia cc nt mng.

    1.2.6 H tr tt hn v cht lng dch v QoS Lu thng trn mng c phn th nh cc lung cho php s l mc

    u tin khc nhau ti cc router.

    1.2.7 H tr tt hn tnh nng di ng

  • 7/31/2019 Nghien Cuu IPv4 & IPv6

    5/62

    Trung tm pht trin CNTT-HQG TP. H ch minhTrung tm o to cng ngh cao Bch Khoa

    Gio vin hng dn : Th.S H Mnh o

    5

    Kh nng di ng MobileIP tn dng c cc u im ca IPv6 svi IPv4.

    1.2.8 Kh nng m rng Thit k ca IPv6 c d phng cho s pht trin trong tng lai

    thi d d ng m rng khi c nhu cu.1.3 Cu trc a ch IPv61.3.1 a ch IPv6

    Mt a ch gm c 16 byte, l 128 bt d i. Kiu k hiu dchm trong h m 16 ( Hexadecimal Colon Notation):

    l m cho nhng a ch tr nn c th c c nhiu hn, IPtrnh by r trong kiu k hiu du 2 chm trong h m 16. Trong kihiu n y, 128 bt c chia th ng 8 phn, mi phn rng 2 byte. 2 byttrong kiu k hi h m 16 yu cu 4 ch s trong h m 16 n y. Vcho nn a ch gm c 32ch s trong h m 16 vi mi 4 ch s mtc mt du : chm(Hnh1)

    128 bt= 16 bytes= 32ch s trong h m 16

    FDEC : : 7654 3210 ADBF 2922 FFFF

    111111101111101100..111111111111

    Hnh 1: a ch IP phin bn 6 ( IPv6 Address)

    *Su rt gn:+ Mc d l a ch IP ngay c khi trong nh dnh h s m 16, vd i, nhiu ch s 0 trong mt a ch.

    Th d: 1080:0000:0000:0000:0008:0800:200C:417A

    Do c ch nn a ch c dng biu din d d ng hn cc lch dng n y. Ta khng cn vit cc s 0 u cc nhm, nhng nhng s0 bn trong th khng th xo.

  • 7/31/2019 Nghien Cuu IPv4 & IPv6

    6/62

    Trung tm pht trin CNTT-HQG TP. H ch minhTrung tm o to cng ngh cao Bch Khoa

    Gio vin hng dn : Th.S H Mnh o

    6

    Cha rt gn

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

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

    Hnh 2 : S rt gn a ch (Abbreviated Address)

    Hn na ta c th s dng k hiu :: ch mt chui cc s 0. Tnhin k hiu trn ch c s dng mt ln trong mt a ch. a chc d i c nh, ta c th tnh c s cc bit 0 m k hiu biu d

    Ta c th p dng u hay cui a ch. Cch vit n y c bit c lbiu din cc a ch multicast, loopback hay cc i ch cha ch

    Cha rt gn

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

    1080::8:800:200C:417A

    Hnh 3: 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 vcho n khi nhn c a ch nguyn bn (4 ch s trong 1 phn , 32s trong mt a ch)

    IPv6 cho php gim ln a ch v c biu din theo k phCIDR.V d: Biu din mng con c d i tin t 80 bt:

  • 7/31/2019 Nghien Cuu IPv4 & IPv6

    7/62

    Trung tm pht trin CNTT-HQG TP. H ch minhTrung tm o to cng ngh cao Bch Khoa

    Gio vin hng dn : Th.S H Mnh o

    7

    1080:0:0:0:8::/80

    Hnh 4 : a ch CIDR ( CIDR Address)

    1.3.2 Khng gian a chKhng gian a ch c d i ln hn IPv4( 128 bt so vi 32 bt)

    cung cp khng gian a ch ln hn rt nhiu. Trong khi khng gianch 32 bt ca IPv4 cho php khong 4 t a ch, khng gian a chth c khong 6.5*10

    23

    a ch trn mi mt vung b mt tri t. a IPv6 128 bt c chia th nh cc min phn cp theo trt t trn InternN to ra nhiu mc phn cp v linh hot trong a ch ho v nh tuhin khng c trong IPv4.

    Khng gian a ch c nhiu mc ch khc nhau. Ngi ta thia ch IP chia khng gian a ch th nh 2 phn, vi phn u ckiu tin t. Phn gi tr tin t n y cho bt mc ch ca a ch. m s c thit k sao cho khng c m s n o ging phn u ca bt km s n o khc. Do khng c s nhp nhng khi mt a ch c trkiu tin t c th d d ng xc nh c. Hnh 5 cho chng ta thy dca a ch IPv6:

    128 bt

    Bin Bin

    Kiu tin t Phn cn li ca a ch

    Hnh 5 : Cu trc a ch ( Address Structure)

    Khng gian IPv6 c chia trn c s cc bt u trong a chTrng c d i thay i bao gm cc bt u tin trong a ch gi l t nh dng ( Format Prefix) FP. C ch phn b a ch nh sau:

    Phn b Tin t nh dng T l trong khng gian

  • 7/31/2019 Nghien Cuu IPv4 & IPv6

    8/62

    Trung tm pht trin CNTT-HQG TP. H ch minhTrung tm o to cng ngh cao Bch Khoa

    Gio vin hng dn : Th.S H Mnh o

    8

    a chD phng 0000 0000 1/256D phng 0000 0001 1/256D phng cho a ch NSAP 0000 001 1/128D phng cho a ch IPX 0000 010 1/128

    Cha cp pht 0000 011 1/128Cha cp pht 0000 1 1/32Cha cp pht 0001 1/16a ch da trn v tr a l (Hin loi b)

    001 1/8

    Cha cp pht 101 1/8Cha cp pht 110 1/8Cha cp pht 1110 1/16Cha cp pht 1111 0 1/32Cha cp pht 1111 10 1/64

    Cha cp pht 1111 110 1/128Cha cp pht 1111 1110 0 1/512a ch lin kt cc b 1111 1110 10 1/1024a ch site cc b 1111 1110 11 1/1024a ch multicast 1111 1111 1/256

    Hnh 6 : C ch phn b a ch

    1.3.3 Cp pht a ch IPv61.3.3.1 a ch unicast trn c s ngi cung cp

    a ch trn c s ngi cung cp c s dng chung bi 1 hosbnh thng nh 1 a ch unicast. nh dng a ch c din t nh

    128 bits

    8 bits

    3 bits 5 bits

    ProviderIndentifler

    SubscriberIndentifler

    SubnetIndentifler

    NodeIndentifler

    010 Registry

  • 7/31/2019 Nghien Cuu IPv4 & IPv6

    9/62

    Trung tm pht trin CNTT-HQG TP. H ch minhTrung tm o to cng ngh cao Bch Khoa

    Gio vin hng dn : Th.S H Mnh o

    9

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

    Nhng trng cho a ch ngi dng trn c s cung cp nh sau :+ Chng thc kiu (Type indentifier): Trng 3 bt n y nh ngha

    nhng a ch nh l 1 a ch trn c s ngi cung cp.+ Chng thc ng k (Registry indentifier) : Trng 5 bt n y

    trnh b y chi nhnh ng k a ch. Hin thi th c 3 trung tm c nh ngha:

    RIPE- NCC (m 01000): Ti Chu u.INTERNIC (m 11000): Ti Bc M.APNIC (m 101