IPv4 Packet Header - NetworkLessons.com
文章推薦指數: 80 %
The minimum length of an IP header is 20 bytes so with 32 bit increments, you would see value of 5 here. The maximum value we can create with 4 bits is 15 so ... 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....
延伸文章資訊
- 1Chapter 1: Internet Protocol Operations Fundamentals ...
- 2IPv4 Header Format | Gate Vidyalay
In IPv4 header, the total length field comprises of 16 bits. Total length = Header length + Paylo...
- 3IP Header欄位 - 偽IT男的嘆息
IPv4 Version (4-bit) 表示這是IPv4 header(數值為0100) Header Length (4-bit), 最小值是5, 即20-byte , 最大值為15,
- 4IPv4 - 維基百科,自由的百科全書
- 5Internet Header Length - an overview | ScienceDirect Topics
The general structure of the IPv4 packet is shown in Figure 7.3. The minimum header (using no opt...