IP Packet Header: Format, Fields - Guru99

文章推薦指數: 80 %
投票人數:10人

IPv4 Header Components/Fields · Version: The first IP header field is a 4-bit version indicator. · Internet Header Length: Internet header length, ... Skiptocontent WhatisIPheader? IPHeaderismetainformationatthebeginningofanIPpacket.ItdisplaysinformationsuchastheIPversion,thepacket’slength,thesource,andthedestination. IPV4headerformatis20to60bytesinlength.Itcontainsinformationneedforroutinganddelivery.Itconsistsof13fieldssuchasVersion,Headerlength,totaldistance,identification,flags,checksum,sourceIPaddress,destinationIPaddress.Itprovidesessentialdataneedtotransmitthedata.LE IPv4HeaderComponents/Fields IPheaderformat Followingarevariouscomponents/fieldsofIPpacketheader Version:ThefirstIPheaderfieldisa4-bitversionindicator.InIPv4,thevalueofitsfourbitsissetto0100,whichindicates4inbinary.However,iftherouterdoesnotsupportthespecifiedversion,thispacketwillbedropped. InternetHeaderLength:Internetheaderlength,shortlyknownasIHL,is4bitsinsize.ItisalsocalledHELEN(HeaderLength).ThisIPcomponentisusedtoshowhowmany32-bitwordsarepresentintheheader. TypeofService:TypeofServiceisalsocalledDifferentiatedServicesCodePointorDSCP.ThisfieldisprovidedfeaturesrelatedtothequalityofservicefordatastreamingorVoIPcalls.Thefirst3bitsaretheprioritybits.ItisalsousedforspecifyinghowyoucanhandleDatagram. Totallength:Thetotallengthismeasuredinbytes.TheminimumsizeofanIPdatagramis20bytesandthemaximum,itcanbe65535bytes.HELENandTotallengthcanbeusedtocalculatethedimensionofthepayload. Allhostsarerequiredtobeabletoread576-bytedatagrams.However,ifadatagramistoolargeforthehostsinthenetwork,thefragmentationmethodiswidelyused. Identification:IdentificationisapacketthatisusedtoidentifyfragmentsofanIPdatagramuniquely.Somehaverecommendedusingthisfieldforotherthingslikeaddinginformationforpackettracing,etc. IPFlags:Flagisathree-bitfieldthathelpsyoutocontrolandidentifyfragments. Thefollowingcanbetheirpossibleconfiguration: Bit0:isreservedandhastobesettozero Bit1:meansdonotfragment Bit2:meansmorefragments. FragmentOffset:FragmentOffsetrepresentsthenumberofDataBytesaheadoftheparticularfragmentinthespecificDatagram.Itisspecifiedintermsofthenumberof8bytes,whichhasamaximumvalueof65,528bytes. Timetolive:Itisan8-bitfieldthatindicatesthemaximumtimetheDatagramwillbeliveintheinternetsystem.Thetimedurationismeasuredinseconds,andwhenthevalueofTTLiszero,theDatagramwillbeerased. EverytimeadatagramisprocesseditsTTLvalueisdecreasedbyonesecond.TTLareusedsothatdatagramsarenotdeliveredanddiscardedautomatically.ThevalueofTTLcanbe0to255. Protocol:ThisIPv4headerisreservedtodenotethatinternetprotocolisusedinthelatterportionoftheDatagram.ForExample,6numberdigitismostlyusedtoindicateTCP,and17isusedtodenotetheUDPprotocol. HeaderChecksum:Thenextcomponentisa16bitsheaderchecksumfield,whichisusedtochecktheheaderforanyerrors.TheIPheaderiscomparedtothevalueofitschecksum.Whentheheaderchecksumisnotmatching,thenthepacketwillbediscarded. SourceAddress:Thesourceaddressisa32-bitaddressofthesourceusedfortheIPv4packet. Destinationaddress:Thedestinationaddressisalso32bitinsizestorestheaddressofthereceiver. IPOptions:ItisanoptionalfieldofIPv4headerusedwhenthevalueofIHL(InternetHeaderLength)issettogreaterthan5.Itcontainsvaluesandsettingsrelatedwithsecurity,recordrouteandtimestamp,etc.YoucanseethatlistofoptionscomponentendswithanEndofOptionsorEOLinmostcases. Data:Thisfieldstoresthedatafromtheprotocollayer,whichhashandedoverthedatatotheIPlayer. YouMightLike: CCNATutorial:LearnNetworkingBasics 50BESTAPMTools:ApplicationPerformanceMonitoringTools RoutervsSwitch:MustKnowDifferences Subnetting:WhatisSubnetMask? WhatisWildcardMask?HowtoCalculateWildcardMask Postnavigation ReportaBug Previous PrevNextContinue Scrolltotop ToggleMenuClose Searchfor: Search



請為這篇文章評分?