IPv4 Packet Header - NetworkLessons.com

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

IPv4 Packet Header · The first bit is always set to 0. · The second bit is called the DF (Don't Fragment) bit and indicates that this packet should not be ... Skiptocontent Searchfor: Search Youarehere:Home»Cisco»CCNARouting&SwitchingICND1100-105 TheIPv4packetheaderhasquitesomefields.Inthislessonwe’lltakealookatthemandI’llexplainwhateverythingisusedfor.Takealookatthispicture: Let’swalkthroughallthesefields: Version:thefirstfieldtellsuswhichIPversionweareusing,onlyIPv4usesthisheadersoyouwillalwaysfinddecimalvalue4here. HeaderLength:this4bitfieldtellsusthelengthoftheIPheaderin32bitincrements.TheminimumlengthofanIPheaderis20bytessowith32bitincrements,youwouldseevalueof5here.Themaximumvaluewecancreatewith4bitsis15sowith32bitincrements,thatwouldbeaheaderlengthof60bytes.ThisfieldisalsocalledtheInternetHeaderLength(IHL). TypeofService:thisisusedforQoS(QualityofService).Thereare8bitsthatwecanusetomarkthepacketwhichwecanusetogivethepacketacertaintreatment.YoucanreadmoreaboutthisfieldinmyIPprecedenceandDSCPlesson. TotalLength:this16-bitfieldindicatestheentiresizeoftheIPpacket(headeranddata)inbytes.Theminimumsizeis20bytes(ifyouhavenodata)andthemaximumsizeis65.535bytes,that’sthehighestvalueyoucancreatewith16bits. Identification:IftheIPpacketisfragmentedtheneachfragmentedpacketwillusethesame16bitidentificationnumbertoidentifytowhichIPpackettheybelongto. IPFlags:These3bitsareusedforfragmentation: Thefirstbitisalwayssetto0. ThesecondbitiscalledtheDF(Don’tFragment)bitandindicatesthatthispacketshouldnotbefragmented. ThethirdbitiscalledtheMF(MoreFragments)bitandissetonallfragmentedpacketsexceptthelastone. FragmentOffset:this13bitfieldspecifiesthepositionofthefragmentintheoriginalfragmentedIPpacket. TimetoLive:EverytimeanIPpacketpassesthrougharouter,thetimetolivefieldisdecrementedby1.Onceithits0therouterwilldropthepacketandsendsanICMPtimeexceededmessagetothesender.Thetimetolivefieldhas8bitsandisusedtopreventpacketsfromloopingaroundforever(ifyouhavearoutingloop). Protocol:this8bitfieldtellsuswhichprotocolisenapsulatedintheIPpacket,forexampleTCPhasvalue6andUDPhasvalue17. HeaderChecksum:this16bitfieldisusedtostoreachecksumoftheheader.Thereceivercanusethechecksumtocheckifthereareanyerrorsintheheader. SourceAddress:hereyouwillfindthe32bitsourceIPaddress. DestinationAddress:andhere’sthe32bitdestinationIPaddress. IPOption:thisfieldisnotusedoften,isoptionalandhasavariablelengthbasedontheoptionsthatwereused.Whenyouusethisfield,thevalueintheheaderlengthfieldwillincrease.Anexampleofapossibleoptionis“sourceroute”wherethesenderrequestsforacertainroutingpath. Here’sareallifeexampleofanIPpacketinWiresharkwhereyoucanseehowthesefieldsareused: IhopethislessonhasbeenhelpfultounderstandthedifferentfieldsintheIPv4packetheader.Ifyouhaveanyquestions,feelfreetoleaveacommentinourforum. Lessons CourseContentsCCNARouting&SwitchingICND1100-105Unit1:Introduction HowtostudyforCCNAR&S Howtostudy(Cisco)Networking HowtouseMindmapping BuildingaCCNALab WhatisNetworking Unit2:NetworkFundamentals IntroductiontotheOSIModel IntroductiontotheTCP/IPStackModel IntroductiontoInternetProtocolversion4(IPv4) IPv4PacketHeader ARP(AddressResolutionProtocol) IntroductiontoTCPandUDP TCPHeader TCPWindowScaling IntroductiontoICMP IntroductiontoDNS HowtotroubleshootNetworks IntroductiontoCiscoIOSCLI(CommandLineInterface) UsermodeandPrivilegedModeSecurity Unit3:LANSwitchingFundamentals 3.1:Introduction IntroductiontoLANs IntroductiontoEthernet CollisionDomain BroadcastDomain HowdoesaswitchlearnMACaddresses CiscoCampusNetworkDesignBasics NetworkTopologies IntroductiontoWirelessLAN HowtoconfigurePort-Security 3.2:VLANsandTrunking IntroductiontoVLANs HowtoconfigureVLANs Introductionto802.1Q HowtoconfigureTrunks VoiceVLAN 802.1QNativeVLAN IntroductiontoVTP(VLANTrunkingProtocol) CiscoDTP(DynamicTrunkingProtocol) TroubleshootingInterfaces TroubleshootingVLANsandTrunks 3.3:Spanning-Tree IntroductiontoSpanning-Tree Unit4:IPv4RoutingFundamentals 4.1:Introduction CiscoIOSRouterBasicConfiguration IntroductiontoRoutersandRouting IntroductiontoWAN(WideAreaNetwork) 4.2:Subnetting WhatisSubnetting? BasicsofBinaryNumbers SubnettinginBinary SubnettinginDecimal(Fast) ClasslessInterDomainRouting(CIDR) VariableLengthSubnetMask(VLSM) RouteSummarization HexadecimalCalculations CreateaSubnettingCheatSheet 4.3:Routing DefaultGateway StaticRouting IPRoutingExplained HowtoconfigureRouteronaStick InterVLANRouting RIP(RoutingInformationProtocol) RIPConfiguration RIPPassiveInterface RIPMaximumPaths RIPDefaultRoute TroubleshootingRIP AdministrativeDistance FloatingStaticRoute ClassfulvsClasslessRoutingProtocols RouteSummarization Unit5:IPv6 IntroductiontoIPv6 ShorteningIPv6addresses HowtofindtheIPv6prefix IPv6AddressTypes IPv6AddressAssignmentExample IPv6EUI-64 IPv6SummarizationExample IPv6SolicitedNodeMulticastAddress IPv6NeighborDiscoveryProtocol(NDP) StatelessAutoconfiguration IPv6DHCPServer IPv6StaticRouting Unit6:NetworkServices 6.1:DHCP IntroductiontoDHCP DHCPServer DHCPRelayAgent DHCPClient TroubleshootingDHCP 6.2:NAT(NetworkAddressTranslation) IntroductiontoNATandPAT StaticNAT DynamicNAT PAT(PortAddressTranslation) TroubleshootingNAT/PAT 6.3:Access-Lists IntroductiontoAccess-Lists WildcardBitsExplained StandardAccess-List ExtendedAccess-List TimeBasedAccess-List IntroductiontoFirewalls Unit7:NetworkManagement Syslog IntroductiontoNTP TroubleshootingNTP IntroductiontoCDP(CiscoDiscoveryProtocol) IntroductiontoLinkLayerDiscoveryProtocol(LLDP) IPv4AddressConfigurationonCiscoCatalystIOSSwitch TelnetServerandClient SSHServerandClient PingTroubleshooting Traceroute LoginBanner ConfigurationRegister CiscoIOSPasswordRecovery CiscoIOSFilesystem CopytoRunningConfiguration ConfigurationArchiveandRollback HowtoupgradeCiscoIOSImage CiscoIOSBootSystemImage IOSLicensing Unit8:PracticeExam ICND1100-105PracticeExam PreviousLessonIntroductiontoInternetProtocolversion4(IPv4)NextLessonARP(AddressResolutionProtocol) Tags:IPRouting ForumReplies HelloRene, Couldyoupleasehelponbelowqueries Hownetworklayerdecideswhetherapackettobefragmentedornot? Isitpossibleforaadmin/applicationtoenforceafragmentationdecisiononIPpacket? Isthereanyrelationbetweentotallengthfieldandmtu? HiAshok, Iwroteapostonthis,Ithinkitwillansweryourquestions: https://networklessons.com/ip-routing/pppoe-mtu-troubleshooting-cisco-ios/ Rene ThanksalotRene…Itwaswellexplainedthere… HiRene, WhyHeadermaximumlengthlimitedto24bytes? Asperthetheory,For5bitheaderfield,maximumvalueis15soheaderlengthwillbe4*15=60bytes. Pleasecorrectmeifitislimitedto24bytesinproduction. Regards, SV   HiSV, Goodquestion,somesources(forexampleRoutingTCP/IPVolume1)statethatthemaximumheaderlengthis24bytessothat6wouldbethemaximumvalue.Ican’tfindanyproofforthis,it’snotintheRFC. Ijustupdatedthelesson,with4bits,thehighestvaluewecancreateis15so15x32=480bits(60bytes) Thanksfortheinput! Rene 50morereplies!AskaquestionorjointhediscussionbyvisitingourCommunityForum Posting....



請為這篇文章評分?