IP Packet
The Internet Protocol (IP) is a protocol used for communicating data across a packet-switched internetwork using the Internet Protocol Suite (TCP/IP).
A packet is the unit of data that is routed between an origin and a destination on the Internet or any other packet-switched network.

Packet Structure : An IP packet consists of a header section and a data section.
Header Section : The header consists of 13 fields, of which only 12 are required. The 13th field is optional .

Version : The first header field in an IP packet is the four-bit version field. For IPv4, this has a value of 4 (hence the name IPv4).
Header Length (HL) : The second field (4 bits) is the Internet Header Length (IHL) telling the number of 32-bit words in the header. Since an IPv4 header may contain a variable number of options, this field specifies the size of the header . The minimum value for this field is 5 which is a length of 5×32 = 160 bits. Being a 4-bit value, the maximum length is 15 words or 480 bits.
Differentiated Services (DS) : Originally defined as the TOS field. The original intention of the Type of Services (TOS) field was for a sending host to specify a preference for how the datagram would be handled as it made its way through an internet. This provides an indication of the abstract parameters of the quality of service desired. When transmitting a datagram through a particular network these are used to guide the selection of the actual service parameters. Some networks offer service precedence, which somehow treats high precedence traffic as more important than other traffic (generally by accepting only traffic above a certain precedence at time of high load). The major choice is a three way tradeoff between low-delay, high-reliability, and high-throughput.
The following eight bits were allocated to a Type of Service (TOS) field:
bits 0–2: Precedence (111 - Network Control, 110 - Internetwork Control, 101 - CRITIC/ECP, 100 - Flash Override, 011 - Flash, 010 - Immediate, 001 - Priority, 000 - Routine)
bit 3: 0 = Normal Delay, 1 = Low Delay
bit 4: 0 = Normal Throughput, 1 = High Throughput
bit 5: 0 = Normal Reliability, 1 = High Reliability
bit 6: 0 = Normal Cost, 1 = Minimize Monetary Cost
bit 7: never defined
Total Length : This 16-bit field defines the entire datagram size, including header and data, in bytes. The minimum-length datagram is 20 bytes (20-byte header + 0 bytes data) and the maximum is 65,535 — the maximum value of a 16-bit word ( i.e 216 -1 ). The minimum size datagram that any host is required to be able to handle is 576 bytes ( The number 576 is selected to allow a reasonable sized data block to be transmitted in addition to the required header information), but most modern hosts handle much larger packets. Sometimes subnetworks impose further restrictions on the size, in which case datagrams must be fragmented. Fragmentation is handled in either the host or packet switch in IPv4.
Identification : Is primarily used for uniquely identifying fragments of an original IP datagram or in other word this is an identifying value assigned by the sender to aid in assembling the fragments of a datagram.
Flags : A three-bit field follows and is used to control or identify fragments. They are (in order, from high order to low order):
Bit 0: reserved, must be zero
Bit 1: (DF) 0 = May Fragment, 1 = Don't Fragment.
Bit 2: (MF) 0 = Last Fragment, 1 = More Fragments
If the DF flag is set and fragmentation is required to route the packet then the packet will be dropped. This can be used when sending packets to a host that does not have sufficient resources to handle fragmentation.
When a packet is fragmented all fragments have the MF flag set except the last fragment, which does not have the MF flag set. The MF flag is also not set on packets that are not fragmented — an unfragmented packet is its own last fragment.
Fragment Offset : Is 13 bits long, Identifies the position of the fragment in the datagram and it is measured in units of 8 octets (64 bits). The first fragment has offset zero.
Time To Live (TTL) : An eight-bit time to live (TTL) field helps prevent datagrams from persisting (e.g. going in circles) on an internet. This field limits a datagram's lifetime. It is specified in seconds, but time intervals less than 1 second are rounded up to 1. In latencies typical in practice, it has come to be a hop count field. Each packet switch (or router) that a datagram crosses decrements the TTL field by one. When the TTL field hits zero, the packet is no longer forwarded by a packet switch and is discarded.
Protocol : This field defines the protocol used in the data portion of the IP datagram. The Internet Assigned Numbers Authority maintains a list of Protocol numbers. example: ICMP, IGMP, TCP, UDP, OSPF.
Header Checksum : The 16-bit checksum field is used for error-checking of the header. At each hop, the checksum of the header must be compared to the value of this field. If a header checksum is found to be mismatched, then the packet is discarded. Note that errors in the data field are up to the encapsulated protocol to handle — indeed, both UDP and TCP have checksum fields. Since the TTL field is decremented on each hop and fragmentation is possible at each hop then at each hop the checksum will have to be recomputed.
Source address : An IPv4 address is a group of four eight-bit octets for a total of 32 bits. This address is the address of the sender of the packet.
Destination address : An IPv4 address is a group of four eight-bit octets for a total of 32 bits. Indicates the receiver of the packet.
Data : The last field is not a part of the header and, consequently, not included in the checksum field. The contents of the data field are specified in the protocol header field and can be any one of the transport layer protocols.

Comments

handa.rajat@gmail.com

About Me

Errors on Fast ethernet Interface - Cisco Routers

Roll back changes on your Cisco router with simple command