IPv4 vs IPv6 Headers
IPv4 (Internet Protocol version 4) yog plaub version ntawm Internet Protocol (IP). Nws yog siv rau ntawm pob ntawv-switched Link Layer networks xws li Ethernet. IPv4 siv txoj kev xa khoom zoo tshaj plaws, uas tsis muab kev lees paub ntawm kev xa khoom. IPv4 pob ntawv yog tsim los ntawm header thiab cov ntaub ntawv seem. Lub header no muaj kaum plaub teb. IPv6 (Internet Protocol version 6) yog tus IP version uas ua raws li IPv4. IPv6 tau tsim los ua ib qho kev daws teeb meem rau qhov chaw nyob qaug zog ntawm IPv4. IPv6 pob ntawv kuj tseem ua los ntawm cov ntawv header thiab cov ntaub ntawv seem. IPv6 header yog tsim los ntawm qhov loj me me uas tuaj yeem muab lub luag haujlwm tseem ceeb thiab kev xaiv los txuas ntxiv lub header kom suav nrog cov yam ntxwv tshwj xeeb.
IPv4 Headers yog dab tsi?
Version (4 ntsis) |
IHL (Internet Header Length) (4 ntsis) |
Type of Service (8 ntsis) |
tag nrho Length (16 me ntsis) |
||
Identification (16 me ntsis) |
Flags (3 ntsis) |
Fragment Offset (13 me ntsis) |
|||
Lub Sijhawm Ua Neej (8 ntsis) |
Protocol (8 ntsis) |
Header Checksum (16 me ntsis) |
|||
Qhov chaw IP chaw nyob (32 ntsis) |
|||||
Tus IP chaw nyob (32 ntsis) |
|||||
Options (variable length) |
padding (variable length) |
Nyob hauv IPv4 header, qhov chaw nyob thiab qhov chaw nyob muaj qhov ntev ntawm 32 me ntsis. Yog li ntawd, IPv4 tso cai rau qhov chaw nyob ntawm 4.3 × 10 9 (2 32) chaw nyob. Ntawm cov no, qee qhov chaw nyob tau tshwj tseg rau kev siv tshwj xeeb xws li kev sib txuas lus ntiag tug lossis chaw nyob multicast, uas txo qis cov chaw nyob ntxiv rau pej xeem siv.
IPv6 Headers yog dab tsi?
Version (4 ntsis) |
Chav Kawm (8 ntsis) |
Flow Label (20 me ntsis) |
||
Payload Length (16 me ntsis) |
Tom ntej Header (8 ntsis) |
Hop Limit (8 ntsis) |
||
Chaw Nyob (128 ntsis) |
||||
Chaw Nyob (128 ntsis) |
Lub header ntawm IPv4 muaj ib qho ruaj khov thiab txuas ntxiv. Qhov chaw ruaj khov muaj qhov chaw nyob thiab qhov chaw nyob, lub txee hop thiab siv rau qhov txuas ntxiv (yog tias muaj ib qho). Ib qho ntawm cov yam ntxwv tseem ceeb hauv IPv6 header yog qhov chaw nyob loj. Ob qhov chaw nyob thiab qhov chaw nyob tau tso cai kom muaj 128 ntsis. Qhov no yuav tsim 3.4 × 10 38 (2 128) chaw nyob. Lub taub hau txuas ntxiv muaj cov ntaub ntawv tshwj xeeb xws li cov ntaub ntawv hais txog kev khiav, kev ruaj ntseg, thiab lwm yam.
Qhov txawv ntawm IPv4 thiab IPv6 Headers yog dab tsi?
IPv4 yog plaub version ntawm Internet Protocol thiab IPv6 yog tus ua tiav ntawm IPv6. Qhov sib txawv tseem ceeb tshaj plaws ntawm ob qho no yog qhov loj ntawm qhov chaw nyob. IPv4 tso cai tsuas yog 32 ntsis qhov chaw thiab chaw nyob, qhov IPv6 tso cai rau 128 ntsis qhov chaw thiab chaw nyob. Qhov no ua rau qhov chaw nyob ntawm IPv4 4.3 × 10 9 (2 32) thiab qhov chaw nyob ntawm IPv6 3.4×1038(2128), uas loj dua. Tsis tas li ntawd, IPv4 muaj qhov chaw faib rau cov kev xaiv, tab sis hauv IPv6 ntu no tau hloov mus rau qhov txuas ntxiv. Tsis tas li ntawd, IPv6 header muaj qhov loj me me ntawm 40 bytes, thaum IPv4 header tuaj yeem hloov pauv loj vim yog cov kev xaiv hauv ntu IPv4 header. Tsis tas li ntawd qee qhov ntawm cov ntu hauv lub taub hau tau raug hloov npe. Piv txwv li, hom kev pabcuam tau hloov npe mus rau chav kawm tsheb; tag nrho qhov ntev tau raug hloov npe mus rau qhov ntev payload, thiab lwm yam. Tsis tas li ntawd, qee qhov chaw hauv IPv4 xws li IHL, kev qhia, tus chij tsis nyob hauv IPv6.