http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 1
Mc lc Gii thiu IPv6 ...................................................................................................................... 2
i vi c gi ...................................................................................................................... 2
iu kin tin ................................................................................................................... 3
Tng quan v IPv6 ................................................................................................................ 3
Ti sao phi c phin bn IP mi? .................................................................................... 3
Ti sao khng phi l IPv5? .............................................................................................. 4
Lch s ngn gn .............................................................................................................. 4
c im ca IPv6 ................................................................................................................ 5
Cc ch nh v trong IPv6 ................................................................................................ 7
Ch nh v Unicast trong IPv6 ..................................................................................... 7
Ch nh v Multicast trong IPv6 ................................................................................... 8
Ch nh v Anycast trong IPv6..................................................................................... 8
Kiu & nh dng a ch trong IPv6 ...................................................................................... 9
H thng s thp lc phn trong IPv6 ............................................................................... 9
Cu trc a ch trong IPv6 .............................................................................................. 10
Interface ID trong IPv6 .................................................................................................... 11
a ch Unicast ton cu trong IPv6 ................................................................................. 12
a ch Lin kt-Ni b (Link-Local) trong IPv6 ................................................................ 12
a ch Duy nht-Ni b (Unique-Local) trong IPv6 ......................................................... 13
Phm vi ca cc a ch Unicast trong IPv6 ....................................................... 13
Cc a ch c bit trong IPv6 ............................................................................................ 14
a ch Multicast dnh ring cho cc Giao thc nh tuyn .............................................. 14
a ch Multicast dnh ring cho cc Router/Node .......................................................... 15
Cc trng Header trong IPv6 ............................................................................................ 15
Header c nh (Fixed Header) trong IPv6 ...................................................................... 15
Extension Header trong IPv6 .......................................................................................... 17
Giao tip trong IPv6 ............................................................................................................ 18
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 2
Giao thc pht hin ln cn (Neighbor Discovery Protocol) trong IPv6 ............................ 19
Subnetting trong IPv6 .......................................................................................................... 20
Chuyn tip t IPv4 ti IPv6 ............................................................................................... 20
Dual Stack Routers ......................................................................................................... 21
Tunneling ........................................................................................................................ 21
NAT Protocol Translation ................................................................................................ 22
Kh nng lu ng ca IPv6 .............................................................................................. 22
Qu trnh hot ng ca Mobility ca IPv6 ...................................................................... 23
S ti u ha tuyn ca IPv6 .......................................................................................... 25
nh tuyn (Routing) trong IPv6 .......................................................................................... 25
Cc giao thc nh tuyn trong IPv6 ............................................................................... 26
Cc giao thc c thay i h tr IPv6 .................................................................... 26
Tng kt v IPv6 ................................................................................................................. 27
Tng lai ca IPv6 ......................................................................................................... 27
Ti liu tham kho v IPv6 .................................................................................................. 28
Cc ng link hu ch v IPv4 & IPv6 .......................................................................... 28
Gii thiu IPv6 IPv6 l phin bn mi nht ca Giao thc Internet (IP) v phin bn u tin ca giao thc ny
c trin khai rng ri. IPv6 c pht trin bi IETF gii quyt vn c d bo trc
ca vic suy kit kho a ch IPv4. Phn hng dn ny s gip bn hiu v IPv6 v cc thut ng
lin quan n n cng vi cc v d tham kho thch hp.
Lot bi hng dn ca chng ti da trn ngun ti liu ca: Tutorialspoint
i vi c gi Phn hng dn c thit k gip cho ngi mi hc hiu cc khi nim c bn v IPv6
c yu cu trong khi lm vic vi cc giao thc da trn TCP/IP. Sau khi hon thnh phn hc
ny, bn s thy mnh mc trung bnh, t c s bn c th nng cao trnh ca mnh
ln.
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 3
iu kin tin Trc khi bt u tin hnh hc tp vi phn hng dn ny, chng ti gi s rng bn c
nhng hiu bit v cc khi nim c bn v my tnh v mng nh giao thc l g, ti sao chng ta
cn giao thc, cc tng mng.
Tng quan v IPv6 IPv6 l mt giao thc ghi a ch mi c thit k p ng tt c cc yu cu c th c v
internet trong tng lai m c chng ta bit n nh l Internet phin bn 2. Giao thc ny nh
giao thc IPv4 trc, lm vic trn Tng mng (Tng-3). Song song vi vic cung cp mt s
lng to ln v khng gian a ch logic, giao thc ny c nhiu tnh nng phong ph m t gii
quyt nhng nhc im ca IPv4.
Ti sao phi c phin bn IP mi? Cho n ny, IPv4 chng minh n l giao thc ghi a ch nh tuyn mnh m v phc v
chng ta trong nhiu thp k trn k thut phn phi vi n lc tt a. N c thit k vo u
nhng nm 80 v khng nhn c bt k s thay i ln no sau . Ti thi im ra i ca n,
Internet c gii hn ch cho mt s trng i hc cho mc ch nghin cu v ti cc phng
ban ca B quc phng. IPv4 l 32 bit di v cung cp khong 4,294,967,296 (232) a ch. Khng
gian a ch ny c coi l qu ti thi gian . Di y l nhng im chnh m ng vai tr
quan trng cho s ra i ca IPv6:
Internet pht trin theo cp s nhn v khng gian a ch c cho php bi IPv4 ang
bo ha. C mt yu cu c mt giao thc m c th tha mn cc nhu cu v a ch
Internet m tng bt ng trong tng lai.
IPv4 t n khng cung cp bt k tnh nng bo mt no. D liu c m ha vi mt s
ng dng bo mt trc khi c gi trn Internet.
Quyn u tin d liu trong IPv4 khng c cp nht. Mc d IPv4 c mt s bit c
dnh ring cho Kiu dch v hoc Cht lng dch v, nhng chng khng cung cp nhiu
chc nng.
IPv4 cho cc khch hng kh nng c th t nh cu hnh bng tay hoc h c th cn mt
s k thut nh cu hnh a ch. No khng c mt k thut nh cu hnh mt thit b
c a ch IP duy nht trn ton cu.
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 4
Ti sao khng phi l IPv5? Ti nay, IP mi ch c cng nhn ch c IPv4. Phin bn t 0 ti 3 c s dng trong khi chnh
giao thc ang trong tin trnh pht trin v th nghim. V th, chng ta c th gi s rt nhiu
cc hot ng nn tng vn tn ti trc khi t mt giao thc vo trong qu trnh sn xut. Tng
t nh th, giao thc phin bn 5 c s dng trong khi th nghim vi giao thc lung d liu
cho Internet. Chng ta c bit v n nh l Giao thc lung d liu (SP) m s dng IP phin
bn 5 gi gn d liu ca n. N khng bao gi c a vo s dng cng cng, nhng n
c s dng.
Di y l bng lit k cc phin bn IP v cch chng c s dng.
Lch s ngn gn Sau s pht trin ca IPv4 trong u nhng nm 80, khng gian a ch IPv4 c sn bt u rt
ngn li mt cch nhanh chng khi nhu cu v a ch tng nhanh theo hm m vi internet. Trc
nhn thc v tnh hung c th pht sinh, IETF, vo nm 1994, bt u pht trin mt giao thc
ghi a ch thay th cho IPv4. Tin trnh ca IPv6 c th c theo di theo phng thc RFC
cng b:
1998 RFC 2460 Basic Protocol
2003 RFC 2553 Basic Socket API
2003 RFC 3315 DHCPv6
2004 RFC 3775 Mobile IPv6
2004 RFC 3697 Flow Label Specification
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 5
2006 RFC 4291 Address architecture (revision)
2006 RFC 4294 Node requirement
Vo thng 6/2012, mt s t chc Internet ln chn t Server ca h trn IPv6. Hin ti chng ta
ang s dng k tut Dual Stack thc hin IPv6 song song vi IPv4.
c im ca IPv6 gi nhng tnh nng c bn ca vic ghi a ch IP, IPv6 c thit k li ton b. N cung
cp nhng c im sau:
Khng gian b nh rng hn
Tri ngc vi IPv4, IPv6 s dng s bit nhiu hn 4 ln nh v mt thit b trn
Internet. Vic s dng nhiu bit thm ny c th cung cp gn 3.4x1038 cc kt ni ca
cc a ch khc nhau. Lng a ch ny c th p ng cc nhu cu v vic cp pht a
ch ca hu ht mi th trn th gii ny. Theo tnh ton, mi mt vung trn tri t c th
c cp pht 1564 a ch.
Header c n gin ha
Cc Header ca IPv6 c n gin ha bi vic g b tt c cc thng tin v cc la
chn (m c trong IPv4) khng cn thit ti phn cui ca IPv6. Header ca IPv6 ch ln
hn gp 2 ln so vi trong IPv4 trong khi lng a ch IPv6 l gp 4 ln.
Kiu lin kt end-to-end
Mi h thng by gi c a ch IP duy nht v c th i qua Internet m khng s dng
NAT hoc cc thnh phn phin dch khc. Sau khi IPv6 c ci t v chy trn ton h
thng, mi host c th trc tip kt ni vi host khc trn internet, vi mt s gii hn lin
quan nh Tng la, cc Chnh sch ca t chc.
T ng nh cu hnh
IPv6 h tr c hai ch t ng nh cu hnh Stateful v Stateless ca cc thit b host.
Theo cch ny, s vng mt ca mt DHCP server khng t mt trm dng trn s giao
tip lin on.
nh tuyn/Chuyn tip nhanh hn
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 6
Header c n gin ha t tt c cc thng tin khng cn thit ti phn cui ca
Header. Thng tin c cha trong phn u ca Header l thch hp cho mt router to
cc quyt nh nh tuyn, v th vic to cc quyt nh nh tuyn s nhanh nh vic kim
tra phn lnh Header.
IPSec
Ngay t u, n c quyt nh rng IPv6 phi c bo mt IPSec, lm cho n an ton
hn IPv4. c im ny by gi c to ty .
Khng Broadcast
Mc d Ethernet/Token Ring c cho l mng Broadcast bi v chng h tr truyn ti
Broadcast, IPv6 khng c h tr Broadcast no na. N s dng Multicast giao tip vi
nhiu host.
H tr Anycast
y l c trng khc ca IPv6. IPv6 gii thiu ch Anycast trong vic nh tuyn gi
d liu. Trong ch ny, nhiu giao thc thng qua internet c ch nh cng a ch
Anycast IP. Cc router, trong khi nh tuyn, gi gi d liu ti ch n gn nht.
Tnh lu ng
IPv6 khi c thit k vn gi gn tnh lu ng. c im ny cho cc host (nh mobile
phone) kh nng di ng xung quanh cc khu vc a l khc nhau v vn gi c kt ni
vi cng a ch IP. Tnh lu ng ny ca IPv6 li dng kh nng t ng nh cu hnh IP
v cc Extension Header.
H tr quyn u tin c nng cao
IPv4 s dng 6 bit DHCP v 2 bit ECN cung cp Cht lng dch v (Quality of Service)
nhng n ch c th c s dng nu cc thit b end-to-end h tr n, l, thit b
ngun v ch n nm di mng phi h tr n.
Trong IPv6, hng Truyn ti v nhn hiu Dng d liu (Traffic class and Flow label) c
s dng ch cho cc router nm di cch x l mt cch hiu qu gi d liu v nh
tuyn n.
S chuyn tip mt m
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 7
Khng gian a ch IP ln trong IPv6 cho kh nng cp pht cc thit b vi cc a ch IP
duy nht trn ton cu. K thut ny lu gi cc a ch IP v NAT khng cn yu cu. V
th cc thit b c th gi/nhn d liu vi nhau, v d, VoIP v/hoc bt k phng tin
lung d liu no c th c s dng mt cch hiu qu hn.
Mt s tht khc l, Header c trng ti t hn, v th cc router c th to cc quyt nh
chuyn tip v chuyn chng ti ch khc nhanh nh khi chng n.
Tnh c th m rng
Mt trong nhng li th ln nht ca IPv6 Header l n c th m rng nhp thm
thng tin trong phn ty chn. IPv4 cung cp ch 40 byte cho phn ty chn, trong khi
ty chn trong IPv6 c th nhiu nh kch c ca chnh gi IPv6.
Cc ch nh v trong IPv6 Trong ch nh v v lin kt mng my tnh lin quan ti k thut hosting mt a ch trn mng.
IPv6 cung cp mt s kiu ch m bi n mt host n c th c nh v. Nhiu hn mt host
c th c nh v cng mt lc hoc host ti khong cch gn nht c th c nh v.
Ch nh v Unicast trong IPv6 Trong ch nh v Unicast, mt giao thc IPv6 c xc nh mt cch duy nht trong mt on
mng. Gi IPv6 cha c a ch ngun v ch n. Mt giao thc host c trang b vi mt a
ch IP m l duy nht trong on mng . Khi mt mng chuyn mch hoc mt router nhn mt
gi Unicast, c hng ch ti mt host n, n gi ra cho mt trong nhng giao din u ra
ca n m kt ni ti host c th .
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 8
Ch nh v Multicast trong IPv6 Ch Multicast trong IPv6 l ging nh trong Ipv4. Gi d liu hng ch ti nhiu host c
gi trn mt a ch Multicast c bit. Tt c cc host c lin quan trong thng tin Multicast, cn
tham gia nhm Multicast u tin. Tt c cc giao thc m tham gia nhm nhn gi ny v x l
n, trong khi cc host khc khng c lin quan b qua thng tin ny.
Ch nh v Anycast trong IPv6 IPv6 gii thiu mt kiu nh v mi, m c gi l nh v Anycast. Trong ch nh v ny,
nhiu giao thc c ch nh cng mt a ch Anycast IP. Khi mt host mun giao tip vi mt
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 9
host c trang b vi mt a ch Anycast IP, n gi mt thng bo Unicast. Vi s gip ca k
thut nh tuyn phc tp, m thng bo Unicast c phn phi ti host gn nht vi trm gi.
By gi chng ta xem mt v d v Server tutorialpoints.com, c t ti tt c cc lc a. Gi s
rng tt c cc Server c ch nh mt a ch Anycast IP n (IPv6). By gi khi mt ngi s
dng t Chu u mun truy cp vo trang ny, DNS ch ti server m t chnh Chu u. Nu mt
ngi s dng t n mun truy cp vo trang, DNS sau s ch ti web t ti Asia. Cc
quan h n nht c s dng trong Chi ph nh Tuyn (Routing Cost).
Trong hnh trn, khi mt client c gng tip cn mt server, yu cu c chuyn tip ti server
vi Chi ph nh tuyn thp nht.
Kiu & nh dng a ch trong IPv6 H thng s thp lc phn trong IPv6 Trc khi gii thiu nh dng a ch IPv6, chng ta s xem qua H thng s thp lc phn. Thp
lc phn l mt h thng s v tr m s dng c s 16. biu din cc gi tr trong nh dng c
c, h thng ny s dng cc k t t 0-9 biu th gi tr t 0-9 v A-F biu th cc gi tr
t 10-15. Mi k s trong H thp lc phn c th biu din gi tr t 0-15.
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 10
[Bng chuyn i]
Cu trc a ch trong IPv6 Mt a ch IPv6 c to bi 128 bit c phn chia thnh 8 khi 16 bit. Mi khi sau c
chuyn i thnh 4 k s thp lc phn c phn bit nhau bi du chm.
V d di y l mt a ch IPv6 128 bit c biu din trong nh dng nh phn v c phn
chia thnh 8 khi 16 bit:
0010000000000001 0000000000000000 0011001000111000 1101111111100001
0000000001100011 0000000000000000 0000000000000000 1111111011111011
Mi khi sau c chuyn i thnh H thp lc phn v phn bit nhau bi du hai chm (:).
2001:0000:3238:DFE1:0063:0000:0000:FEFB
Ngay sau khi chuyn i vo nh dng Thp lc phn, a ch IPv6 vn cn di. IPv6 cung cp mt
vi quy tc rt ngn a ch ny. Cc quy tc nh sau:
Quy tc 1: Loi b s 0 dn u:
Trong khi 5 (0063), hai s 0 dn u c th b b qua:
2001:0000:3238:DFE1:63:0000:0000:FEFB
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 11
Quy tc 2: Nu hai hoc nhiu khi lin tc cha cc s 0 lin tc, b qua tt c chng v thay i
bng hai du hai chm(::):
2001:0000:3238:DFE1:63::FEFB
Khi c cc s 0 lin tc c th c thay bng ch mt s 0 bi ::, v th nu vn c mt khi m
c cc s 0 lin tc trong a ch, chng ta c th ch dng mt s 0, nh khi 2:
2001:0:3238:DFE1:63::FEFB
Interface ID trong IPv6 IPv6 c 3 kiu giao thc a ch Unicast khc nhau. Mt na phn phn th hai ca a ch (64 bit
cui) thng c s dng cho Giao din ID. a ch MAC ca mt h thng c to thnh bi
48 bit v c biu din trong H thp lc phn. Cc a ch MAC c cho l c th c ch
nh mt cch duy nht trn ton th gii. Giao thc ID li dng tnh duy nht ny ca cc a ch
MAC. Mt host c th t ng nh hnh Giao thc ID ca n bi s dng nh dng EUI-64
(Extended Unique Identifier) ca IEEE. u tin, mt host phn chia a ch MAC ring ca n vo
trong 2 na 24 bit. Sau , gi tr thp lc phn (16 bit) 0xFFFE c xen vo gia hai na ca a
ch MAC, l kt qu t nh dng EUI-64.
[nh:ID Giao din EUI-64 ]
S chuyn i ca EUI-64 vo trong B nhn din giao thc IPv6
chuyn i EUI-64 vo trong B nhn din giao thc IPv6, bit th 7 c ngha nht ca EUI-64
c b.
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 12
[nh: IP Giao din IPV6]
a ch Unicast ton cu trong IPv6 Kiu a ch ny tng ng vi a ch cng cng trong IPv4. Cc a ch Unicast ton cu trong
IPv6 c th nhn din v nh v duy nht trn ton cu.
[nh: a ch Unicast
ton cu]
Tin t nh tuyn ton cu (Global Routing Prefix): 48 bit quan trng nht c ch nh nh l
Tin t nh tuyn ton cu m c ch nh ti h thng t qun l ring bit. 3 bit quan trng
nht ca GRP thng c thit lp l 001.
a ch Lin kt-Ni b (Link-Local) trong IPv6 a ch IPv6 t ng nh cu hnh c bit n nh l a ch Lin kt-Ni b. a ch ny
thng bt u vi FE80. 16 bit u tin ca a ch Lin kt-Ni b thng c thit lp l 1111
1110 1000 0000 (FE80). 48 bit tip theo thng c thit lp l 0, v th:
[nh:
a ch Lin kt-Ni b]
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 13
Cc a ch Lin kt-Ni b c s dng giao tip trong cc host IPv6 ch trn mt lin kt
(on Broadcast). Nhng a ch ny khng th nh tuyn, v th mt Router khng bao gi
chuyn tip nhng a ch ny ra bn ngoi ng lin kt.
a ch Duy nht-Ni b (Unique-Local) trong IPv6 Kiu a ch IPv6 ny l duy nht trn ton cu, nhng n nn c s dng trong giao tip ni b.
Phn na th hai ca a ch ny cha Giao din ID v phn na u c phn chia thnh
Prefix, Local Bit, Global ID v Subnet ID.
[nh:
a ch Duy nht-Ni b]
Prefix (tin t) thng c thit lp l 1111 1110. Local Bit (bit ni b) thit lp l 1 nu a ch
c ch nh ni b. Cho n nay, ngha ca vic thit lp Local bit v 0 cha c nh ngha.
V th, Unique Local thng bt u vi FD.
Phm vi ca cc a ch Unicast trong IPv6
[nh: Phm vi ca cc
a ch Unicast]
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 14
Phm vi ca a ch Link-Local c gii hn trong on mng. a ch Unique Local l ton cu,
nhng khng c nh tuyn qua internet, gii hn phm vi ca chng ti gii hn ca mt t
chc. a ch Global Unicast l duy nht trn ton cu v c th nhn bit.
Cc a ch c bit trong IPv6 Phin bn 6 c cu trc a ch IP hi phc tp hn trong IPv4. IPv6 dnh ring mt s a ch
v ghi ch a ch cho nhng mc ch c bit. Bn hy quan st bng bn di.
Nh ch trong bng, a ch 0:0:0:0:0:0:0:0/128 khng xc nh bt c ci g v c cho
l mt a ch khng c xc nh. Sau khi n gin ha, tt c cc s 0 c rt gn v
::/128.
Trong IPv4, a ch 0.0.0.0 vi netmask 0.0.0.0 biu din tuyn mc nh. Khi nim tng
t c p dng cho IPv6, a ch 0:0:0:0:0:0:0:0 netmask tt c s 0 biu din tuyn mc
nh. Sau khi p dng quy tc IPv6, a ch ny c rt gn thnh ::/0.
Cc a ch loopback trong IPv4 c biu din bi dy 127.0.0.1 ti 127.255.255.255.
Nhng trong IPv6, ch 0:0:0:0:0:0:0:1/128 biu din a ch Loopback. Sau khi loopback a
ch, n c th c biu din nh ::1/128.
a ch Multicast dnh ring cho cc Giao thc nh tuyn
Bng trn ch cc a ch Multicast dnh ring c s dng bi giao thc nh tuyn ni
b.
Cc a ch ny c dnh ring theo quy tc tng t nh trong IPv4.
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 15
a ch Multicast dnh ring cho cc Router/Node
Nhng a ch ny gip cc router v host giao tip vi cc router v host c sn trn mt
on mng m khng c nh cu hnh vi mt a ch IPv6. Cc host s dng EUI-64
xy dng trn c s t ng nh cu hnh t nh hnh mt a ch IPv6 v sau giao
tip vi cc host/router trn on mng bi phng thc ca cc a ch ny.
Cc trng Header trong IPv6 iu k diu ca IPv6 nm trong Header ca n. Mt a ch IPv6 bng 4 ln a ch IPv4, nhng
iu ng ngc nhin l, Header ca IPv6 ch ln hn 2 ln so vi Header trong IPv4. Cc Header
trong IPv6 c mt Fixed Header (Header c nh) v 0 hoc nhiu hn cc Header ty (Optical
Header). Tt c thng tin cn thit m thit yu cho mt router c gi trong Header c nh.
Header ty cha cc thng tin khng bt buc m gip cc router hiu cch x l mt gi/dng
d liu.
Header c nh (Fixed Header) trong IPv6
[nh: IPv6
Fixed Header]
Header c nh l 40 byte di v cha cc thng tin sau:
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 16
STT Trng & Miu t
1 Version - Phin bn (4 bit): N biu din phin bn ca Giao thc
Internet, v d: 0110.
2 Traffic Class - Hng truyn ti (8 bit): 8 bit ny c phn chia thnh 2
phn. 6 bit quan trng nht c s dng cho Kiu dch v ch dn
Router bit nhng dch v g nn c cung cp ti gi d liu ny. 2 bit t
quan trng hn c s dng cho ECN.
3 Flow Label - Nhn dng (20 bit): Nhn ny c s dng duy tr dng
lin tc ca gi d liu thuc s hu ca mt giao tip. Cc ngun dn
nhn lin lc gip router xc nhn rng mt gi d liu c th thuc s
hu ca mt dng thng tin ring bit. Trng ny gip trnh vic xp xp
li cc gi d liu. N c thit k cho phng tin lung/thi gian thc.
4 Payload Length - di trng ti (16 bit): Trng ny c s dng
chi cho cc router bit rng bao nhiu thng tin v mt gi c th cha
trong trng ti ca n. Trng ti gm cc Header ty v d liu Tng trn
(Upper Layer). Vi 16 bit, ln ti 65535 byte c th c biu th; nhng
nu cc trng Header ty cha Hop-by-Hop Extension Header, th sau
, trng ti c th vt qu 65535 byte v trng ny c thit lp v 0.
5 Next Header (8 bit): Trng ny c s dng ch hoc kiu ca
Extension Header hoc nu Extension Header khng hin th th khi n
ch Upper Layer PDU. Cc gi tr ca kiu Upper Layer PDU l ging nh
trong IPv4.
6 Hop Limit - Gii hn Hop (8 bit): Trng ny c s dng dng gi
d liu lp v hn trong mng. N ging nh TTL trong IPv4. Gi tr
ca trng Hop Limit c gim bt i 1 khi n truyn qua mt link (mt
router/hop). Khi trng ny tin v 0, gi c loi b.
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 17
7 Source Address - a ch ngun (128 bit): Trng ny ch a ch ca
ngun ca gi d liu.
8 Destination Address - a ch ch n (128 bit): Trng ny cung cp
a ch ch n.
Extension Header trong IPv6 Trong IPv6, Fixed Header ch cha nhng thng tin m cn thit, trnh vic nhng thng tin
hoc khng c yu cu hoc him khi c s dng. Tt c nhng thng tin ny c t gia
trng Fixed Header v Upper Layer Header, trong Extension Header. Mi Extension Header
c nhn din bi mt gi tr ring bit.
Khi cc Extension Header c s dng, trng Next Header ca Fixed Header trong IPv6 ch ti
trng Extension Header u tin. Nu c nhiu hn mt Extension Header, th khi trng Next
Header ca Extension Header u tin ch ti trng Extension Header th hai, v tng t nh
th. Trng Next Header ca Extension Header cui cng ch ti Upper Layer Header. V th, tt
c cc Header ch ti Header k tip trong mt phng thc danh sch kt ni.
Nu trng Next Header cha gi tr 59, n ch dn rng khng c Header no sau trng ny, k
c Upper Layer Header.
Extension Header tip theo phi c h tr bi mi RFC 2460:
Dy lin tc ca Extension Header s l:
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 18
Nhng Header ny:
1. c x l bi cc ch n u tin v tip theo .
2. c x l bi ch n Cui cng.
Cc Extension Header c xp xp theo th t ci ny sau ci kia trong mt phng thc danh
sch lin kt, nh c miu t trong s di:
[nh:
nh dng kt ni Extension Header]
Giao tip trong IPv6 Trong IPv4, mt host m mun giao tip vi host khc trn mng cn c mt a ch IP bi hoc
phng thc DHCP hoc bi s t nh cu hnh. Ngay sau khi mt host c trang b vi mt s
a ch IP c hiu lc, n c th giao tip vi bt k host no trn Subnet. truyn tin trn Tng-
3, mt cng host phi bit a ch IP ca host khc. Truyn tin trn mt link, c thit lp bi
phng thc phn cng c nhng bi cc a ch MAC. bit a ch MAC ca mt host m
a ch IP ca n c bit, mt host gi ARP Broadcast v trong s phn hi, host d nh gi
tr li a ch MAC ca n.
Trong IPv6, khng c cc k thut Broadcast. N khng l mt s cn thit cho mt IPv6 cho host
kh nng t c mt a ch IP t DHCP hoc t cch t nh cu hnh, nhng n c th t
ng nh cu hnh IP ca ring n.
ARP c thay i bi ICMPv6 Neighbor Discovery Protocol.
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 19
Giao thc pht hin ln cn (Neighbor Discovery Protocol) trong IPv6 Mt host trong mng IPv6 c kh nng t ng nh hnh chnh n vi mt a ch Lin kt-Ni b
duy nht. Ngay sau khi host nhn c mt a ch IPv6, n tham gia mt s nhm Unicast. Tt c
s truyn tin lin quan ti on mng din ra ch trn nhng a ch Unicast . Mt host i qua
dy cc tuyn b ca IPv6:
Neighbor Solicitation: Sau khi nh cu hnh IPv6 tt c bng tay hoc bng DHCP hoc
bi s t ng nh cu hnh, host gi mt thng bo Neighbor Solicitation ra ngoi ti a
ch Multicast FF2::1/16 cho tt c cc a ch IPv6 ca n bit rng khng ai khc c th
cng chim c cc a ch ny.
DAD (Duplicate Address Detection): Khi host khng nghe bt c nhng g v on mng
lin quan ti thng bo Neighbor Solicitation ca n, n gi s rng khng c bn sao a
ch no tn ti trn on mng.
Neighbor Advertisement: Sau khi ch nh cc a ch ti cc giao din ca n v lm
chng chy, host ln na gi ra ngoi mt thng bo Neighbor Advertisement ni cho tt
c cc host khc trn on mng, m n ch nh cc a ch IPv6 ti cc giao thc
ny.
Mt khi mt host thc hin vic nh cu hnh ca cc a ch IPv6 ca n, n thc hin cc th
sau tip theo:
Router Solicitation: Mt host gi mt thng bo Router Solicitation dng Unicast
(FF02::2/16) ra ngoi on mng ca n bit s hin din ca bt k router no trn
on mng ny. N gip host nh cu hnh router nh l gateway mc nh ca n. Nu
gateway mc nh ny go down, host c th chuyn ti router mi v lm cho router ny
tr thnh gateway ca n.
Router Advertisement: Khi mt host nhn c mt thng bo Router Solicitation, n
phn hi tr li ti host, qung b s hin din ca n trn link .
Redirect: N c th l tnh hung ti ni mt Router nhn mt yu cu Router Solicitation
nhng n bit rng khng phi l gateway tt nht cho host. Trong tnh hung ny,
router gi tr li mt thng bo Redirect ni cho host rng c sn mt router next-hop tt
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 20
hn. Next-hop l ni m host s gi d liu c hng ch ca n ti mt host m
khng thuc v cng on mng.
Subnetting trong IPv6 Trong IPv4, cc a ch c to trong cc hng. Cc a ch IPv4 phn hng xc nh r rng cc
bit c s dng cho cc tin t mng v cc bit c s dng cho cc host trn mng. chia
Subnet (Subnetting) trong IPv4, chng ta s dng netmask phn hng mc nh cho php chng ta
mn cc bit ca host s dng nh cc bit ca Subnet. iu ny to ra kt qu l nhiu Subnet
nhng t host mi Subnet hn. l, khi chng ta mn cc host bit to mt subnet, n lm
cho chng ta c t bit hn c s dng cho cc a ch host.
Cc a ch IPv6 s dng 128 bit biu din mt a ch m bao gm cc bit c s dng cho
vic Subnetting. Na th hai ca a ch (64 bit t quan trng hn) thng ch c s dng cho
cc host. V th, khng c s dung ha no nu chng ta chia Subnet cho mng.
[nh: Subnetting trong IPv6]
16 bit ca Subnet l tng ng vi mng Hng B trong IPv4. S dng cc bit Subnet ny, mt
t chc c th c 65 nghn Subnet khc m l qu so vi nhu cu.
V th cc tin t nh tuyn l /64 v host l 64 bit. Chng ta c th chia nhiu Subnet hn (thay v
16 bit) bi vic mn cc host bit. Nhng n c ngh rng 64 bit lun lun l c s dng
cho cc a ch host bi v vic t ng nh cu hnh yu cu 64 bit.
Chia Subnet trong IPv6 lm vic trn khi nim ging nh l Variable Length Subnet Masking trong
IPv4.
Tin t /48 c th c cp pht cho mt t chc cung cp n li ch ca vic c tin t Subnet
/64, m c 65535 Subnet, mi Subnet c 264 host. Mt tin t /64 c th c ch nh ti mt kt
ni point-to-point ni m ch c 2 host (hoc thit b IPv6) trn mt link.
Chuyn tip t IPv4 ti IPv6 S chuyn tip hon ton t IPv4 sang IPv6 vn cha th xy ra bi v IPv6 cha th tng thch
ngc. Kt qu l mt tnh hung m hoc mt site trn IPv6 hoc n khng. N l khng ging
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 21
nh s thc hin cc cng ngh mi khc m mt cng ngh mi hn l tng thch ngc h
thng c hn c th vn lm vic vi phin bn mi m khng cn thm bt c s thay i no.
gii quyt s hn ch ny, chng ta c mt s cng ngh m c th c s dng bo m
s chuyn tip tuy chm nhng nhp nhng t IPv4 sang IPv6.
Dual Stack Routers Mt router c th c ci t vi c cc a ch IPv4 v IPv6 c nh hnh trn cc giao thc
ca n ch ti gin IP mng thch hp.
[nh: Dual
Stack Router]
Trong s trn, mt server c a ch IPv4 cng nh a ch IPv6 c nh hnh cho n c
th giao tip vi tt c cc host trn c hai mng IPv4 v IPv6 vi s gip ca Dual Stack
Router. Dual Stack Router c th giao tip vi c hai mng. N cung cp mt trung gian cho cc
host truy cp mt server m khng phi thay i phin bn IP tng ng.
Tunneling Trong mt bi cnh m cc phin bn IP khc nhau tn ti trn ng truyn trung gian hoc
mng truyn ti, tunneling cung cp mt gii php tt hn d liu ca ngi s dng c th
truyn qua mt phin bn IP khng c h tr.
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 22
[nh:
Tunneling]
Gin trn miu t cch hai mng IPv4 t xa c th truyn tin thng qua mt Tunnel, ni m
mng truyn ti trn IPv6. Tin trnh ngc li l cng c th ni m mng truyn ti trn IPv6 v
cc site t xa c nh truyn tin l trn IPv4.
NAT Protocol Translation y l phng thc quan trng khc trong truyn ti ti IPv6 bi phng thc ca mt thit b
c cho quyn NAT-PT (Network Address Translation Protocol Translation). Vi s gip ca
mt thit b NAT-PT, vic truyn tin thc s c th din ra gia cc gi d liu IPv4 v IPv6 v
ngc li. Bn theo di gin di:
[nh: NAT -
Protocol Translation]
Mt host vi a ch IPv4 gi mt yu cu ti mt server c cho kh nng vi a ch IPv6 trn
Internet m khng hiu a ch IPv4. Trong trng hp ny, thit b NAT-PT c th gip chng giao
tip vi nhau. Khi host ca IPv4 gi mt gi yu cu ti IPv6 server, thit b/router NAT-PT tho ri
gi IPv4, g b Header ca n, v thm vo Header ca IPv6 v truyn n thng qua Internet. Khi
mt phn hi t IPv6 n host ca IPv4, router thc hin cng vic ngc li.
Kh nng lu ng ca IPv6 Khi mt host c kt ni ti mt link hoc mng, n thu c mt a ch IP v tt c giao tip
din ra s dng a ch IP trn lin kt . Ngay sau khi, host ging nh vy thay i v tr vt l
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 23
ca n, m l, di chuyn vo trong area / subnet / network / link khc, a ch IP ca n thay i
tng ng, v tt c giao tip din ra trn host s dng a ch IP c.
Kh nng lu ng (Mobility) ca IPv6 cung cp mt k thut cho host i lang thang (roam around)
quanh cc link khc nhau m khng tht lc bt c s kt ni/truyn tin v a ch IP ca n.
Cc i tng c lin quan trong cng ngh ny l:
Mobile Node: Thit b m cn kh nng lu ng ca IPv6.
Home Link: Lin kt ny c nh cu hnh vi tin t home subnet v y l ni m thit
b Mobile IPv6 nhn a ch Home ca n.
Home Address: y l a ch m Mobile Node ly c t Home Link. y l a ch c
nh ca Mobile Node. Nu Mobile Node vn cn trong cng Home Link, truyn tin gia cc
i tng khc nhau din ra nh bnh thng.
Home Agent: y l mt router m ng vai tr nh mt th ghi cho Mobile Node. Home
agent c kt ni ti Home Link v duy tr thng tin v tt c cc Mobile Node, Home
Address ca n, v a ch IP hin ti ca n.
Foreign Link: Bt c Link khc m khng c Home Link ca Mobile Node.
Care-of Address: Khi mt Mobile Node nhn mt nh km ti mt Foreign Link, n ly
c mt a ch IP mi ca Subnet ca Foreign Link . Home Agent duy tr thng tin ca
c Home Address v Care-of Address. Nhiu a ch Care-of c th c ch nh ti mt
Mobile Node, nhng ti bt c trng hp no, ch c mt a ch Care-of c s kt dnh
vi Home Address.
Correspondent Node: Bt k thit b c cho kh nng m d nh giao tip vi Mobile
Node.
Qu trnh hot ng ca Mobility ca IPv6 Khi mt Mobile Node trong Home Link ca n, tt c giao tip din ra trn a ch Home nh hnh
di:
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 24
[nh:
Mobile Node c kt ni ti Home Link]
Khi mt Mobile Node ri khi Home Link ca n v c lin kt ti mt vi Foreign Link, c im
lu ng ca IPv6 thc hin vai tr ca n. Sau khi nhn kt ni ti mt Foreign Link, Mobile Node
ly c mt a ch IPv6 t Foreign Link. a ch ny c gi l a ch Care-of. Mobile node gi
mt yu cu kt dnh ti Home Agent vi a ch Care-of mi. Home Agent kt dnh a ch Home
ca Mobile Node vi a ch Care-of, thit lp mt Tunnel gia hai thit b.
Bt c khi no mt Corresponden Node c gng thit lp kt ni vi Mobile Node (trn a ch
Home ca n), Home Agent chn gi d liu v chuyn n ti Care-of Address ca Mobile Node
qua Tunnel m c thit lp.
[nh:
Mobile Node c kt ni ti Foreign Link]
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 25
S ti u ha tuyn ca IPv6 Khi mt Correspondent Node khi to mt giao tip bi gi cc gi ti Mobile Node trn Home
Address, cc gi ca n c tunnel ti Mobile Node bi Home Agent. Trong ch ti u ha
nh tuyn, khi Mobile Node nhn mt gi d liu t Correspondent Node, n khng chuyn s
phn hi ti Home Agent. Thay vo , n gi gi ny trc tip ti Correspondent Node bi s
dng a ch Home nh l a ch ngun. Ch nu l ty v khng c s dng theo mc
nh.
nh tuyn (Routing) trong IPv6 Khi nim nh tuyn tn ti nh trong trng hp IPv6 nhng hu ht tt c cc giao thc nh
tuyn c xc nh li tng ng. Chng ta bn lun trc , cch mt host giao tip ti
gateway ca n. nh tuyn l mt tin trnh chuyn d liu c th nh tuyn bi chn tuyn tt
nht trong mt s tuyn hoc ng truyn c sn ti ch n. Mt Router l mt thit b m
chuyn tip d liu m khng c hng ch mt cch r rng ti n.
Tn ti hai mu giao thc nh tuyn:
Distance Vector Routing Protocol Giao thc nh tuyn vecto khong cch: Mt
router ang chy trn giao thc ny qung b cc tuyn c kt ni ca n v bit v cc
tuyn mi t router hng xm ca n. Chi ph nh tuyn tin ti ch n c tnh
ton bi phng thc cc hop gia ngun v ch n. Mt router tin cy vo cc router
hng xm ca n cho vic chn ng truyn tt nht, m cng c bit nh l nh
tuyn bi tin n. RIP v BGP l cc Giao thc vecto khong cch.
Link-State routing protocol Giao thc nh tuyn Trng thi-Lin kt: Giao thc ny
nhn trng thi ca lin kt v qung b ti cc router hng xm ca n. Thng tin v lin
kt mi c bit t cc router ngang bc. Sau khi tt c thng tin nh tuyn c
ng quy, Giao thc ny s dng thut ton ring ca n tnh ton ng truyn tt
nht trong tt c cc lin kt c sn. OSPF v IS-IS l cc giao thc nh tuyn trng thi
lin kt v c hai giao thc ny u s dng thut ton ng truyn u tin ngn nht
(Shortest Path First) ca Djikstra.
Cc giao thc nh tuyn c th c phn chia thnh hai loi:
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 26
Giao thc nh tuyn ni vi (Interior Routing Protocol): Cc giao thc trong loi ny
c s dng trong mt h thng hoc t chc t qun l phn phi cc tuyn gia tt
c cc router bn trong gii hn ca n. V d: RIP, OSPF.
Giao thc nh tuyn ngoi vi (Exterior Routing Protocol): Giao thc loi ny phn phi
thng tin nh tuyn gia hai h thng hoc t chc t qun l. V d: BGP.
Cc giao thc nh tuyn trong IPv6 RIPng
RIPng l vit tt ca Routing Information Protocol Next Generation - L giao thc thng tin
nh tuyn th h mi. y l giao thc nh tuyn ni vi v l mt giao thc vecto khong
cch. RIPng c nng cp h tr IPv6.
OSPFv3
OSPFv3 l vit tt ca Open Shortest Path First version 3 - y l M ng truyn ngn
nht u tin phin bn 3, Mt giao thc nh tuyn ni vi m c chnh sa h tr
IPv6. y l mt Giao thc trng thi - lin kt v s dng thut ton ca Djikrata tnh
ton ng truyn tt nht ti tt c ch n.
BGPv4
BGPv4 l vit tt ca Border Gateway Protocol - N ch m Giao thc gateway ngoi vi tiu
chun c sn. BGP l mt giao thc vecto khong cch m nhn H thng t qun l nh
l calculation metric, thay v s cc router nh l Hop. BGPv4 l s nng cp cu BGP
h tr nh tuyn IPv6.
Cc giao thc c thay i h tr IPv6 ICMPv6: L vit tt ca Internet Control Message Protocol version 6 - Giao thc thng bo
iu khin internet phin bn 6 l mt s nng cp ca ICMP thu nhn cc yu cu
IPv6. Giao thc ny c s dng cho cc chc nng thm d, thng bo li v thng tin,
cc mc ch thng k. Giao thc pht hin ln cn (NDP) ca ICMPv6 thay th cho ARP
v gip pht hin cc router ln cn trn ng lin kt.
DHCPv6: L vit tt ca Dynamic Host Configuration Protocol version 6 - Giao thc nh
hnh host ng phin bn 6 l mt s b sung ca DHCP. IPv6 cho cc host kh nng
khng yu cu bt k DHCP server no ly c a ch IP khi chng c th t ng
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 27
nh cu hnh. Khng phi chng cn DHCPv6 t DNS server bi v DNS server c th
c thm d v t nh cu hnh thng qua Giao thc pht hin ln cn ICMPv6.
DHCPv6 server c th cha c s dng cung cp nhng thng tin ny.
DNS: Khng c phin bn DNS mi no nhng by gi n c trang b vi phn m rng
cung cp s h tr cho vic truy vn cc a ch IPv6. Mt bn ghi AAAA mi c
thm vo phn hi cc thng bo truy vn IPv6. By gi DNS c th phn hi vi c
phin bn IP (4 v 6) m khng cn bt c s thay i no trong nh dng truy vn.
Tng kt v IPv6 IPv4 t nm 1982, l mt cng ngh lnh o Internet. Vi vic cn kit khng gian a ch
IPv4, IPv6 by gi ang dn kim sot Internet, m c gi nh l Internet 2.
IPv4 c trin khai rng ri v s thay th bi IPv6 s khng l vic d dng. Cho ti nay, IPv6
mi ch xm nhp vo khng gian a ch ca IPv4 cha ti 1%.
Th gii t chc bui l k nim cho mng IPv6 (m c bit nh l Ngy IPv6 Th gii) vo
8/6/2011 vi mc ch th nghim a ch IPv6 qua Internet. Vo ngy 6/6/2012, cng ng
Internet chnh thc khai trng IPv6. Ngy ny, tt c cc ISP ngi m cung cp IPv6 kch
hot n trn min cng cng v gi n hot ng. Tt c cc nh sn xut thit b cng tham
gia ngh chy IPv6 trn cc thit b c thit k ring.
y l mt bc tin c hoan nghnh bi cng ng Internet.
Cc t chc c cung cp nhiu cch khc nhau chuyn tip t IPv4 ti IPv6. Cc t chc
ny cng sn sng th nghim IPv6 trc khi vic chuyn tip hon ton c th chy ng thi c
IPv4 v IPv6. Cc mng ca cc phin bn IP khc nhau c th giao tip v d liu ngi s dng
c th c tunnel truyn qua ti site khc.
Tng lai ca IPv6 Hu ht cc pht trin IPv6 ang c thc hin bin ngoi US v Chu u. n v Trung Quc
ang thc hin cc bc thay i ton b khng gian ti IPv6. Trung Quc tuyn b mt k
hoch pht trin 5 nm mang tn Internet Th h tip theo ca nc ny.
Sau 6/6/2012, tt c cc ISP ln chuyn ti IPv6 v phn cn li vn ang c chuyn.
http://vietjack.com/ipv6/index.jsp Copyright vietjack.com
http://vietjack.com/ Trang chia s cc bi hc online min ph Page 28
IPv6 cung cp khng gian a ch rng ln v c thit k m rng cc dch v Internet ngy
nay. Cc tnh nng IPv6 internet 2 c th mang li nhiu iu hn s mong i.
Ti liu tham kho v IPv6 Cc ngun sau cha cc thng tin hu ch v IPv4 & IPv6. Mong bn s dng chng hiu su
hn nhng g chng ti cp trong lot bi ny.
Cc ng link hu ch v IPv4 & IPv6 Tutorialspoint Lot bi hng dn ca chng ti xy dng da trn ngun ny.
Transmission Control Protocol - Mt ti liu y v TCP protocol. (RFC 793)
IP/IPv4 Protocol - Mt ti liu y v Internet Protocol Version 4 (RFC 791)
IP/IPv6 Protocol - Mt ti liu y v Internet Protocol Version 6 (RFC 791)
IANA IPv4 Address Space Registry - S cp pht khng gian a ch ca Internet Protocol
version 4 (IPv4).
IPv6 on Wikipedia - Trang wikipedia v IPv6.
IP-Lookup - Bn s tm thy thng tin v a ch IP hin ti ca bn v bt k a ch IP no
khc. N h tr c a ch IPv4 v IPv6.
IP Version 6 Working Group - IP Version 6 Lm vic nhm (ipv6).