0% found this document useful (0 votes)
25 views

IP Header (Compatibility Mode)

The IPv4 packet header contains 12 fields with a total size of 20 octets (160 bits). It may include an optional Options field of variable length. The IPv6 packet header is simplified with only 8 required fields and a total size of 40 octets (320 bits). Fields were removed in IPv6 since fragmentation is handled by end hosts, not routers, and checksums occur at the data link and transport layers rather than the network layer.

Uploaded by

Sara Qasim
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

IP Header (Compatibility Mode)

The IPv4 packet header contains 12 fields with a total size of 20 octets (160 bits). It may include an optional Options field of variable length. The IPv6 packet header is simplified with only 8 required fields and a total size of 40 octets (320 bits). Fields were removed in IPv6 since fragmentation is handled by end hosts, not routers, and checksums occur at the data link and transport layers rather than the network layer.

Uploaded by

Sara Qasim
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

IPv4 Packet Header

The basic IPv4 packet header has 12 fields with a total size of 20 octets (160 bits).

The 12 fields may be followed by an Options field, which is followed by a data portion that is usually the transport-layer packet. The variable length of the Options field adds to the total size of the IPv4 packet header.

10

11

IP Datagram Format
bit # 0 version header length Identification time-to-live (TTL) protocol source IP address destination IP address options (0 to 40 bytes) payload 7 8 DS 15 16 ECN 0 D M F F 23 24 31 total length (in bytes) Fragment offset header checksum

Fields of the IP Header


Version (4 bits): current version is 4, next version will be 6. Header length (4 bits): length of IP header, in multiples of 4 bytes DS/ECN field (1 byte) This field was previously called as Type-of-Service (TOS) field. The role of this field has been re-defined, but is backwards compatible to TOS interpretation Differentiated Service (DS) (6 bits): Used to specify service level (currently not supported in the Internet) Explicit Congestion Notification (ECN) (2 bits): New feedback mechanism used by TCP
12 13

4 bytes

20 bytes Header Size < 24 x 4 bytes = 60 bytes 20 bytes Total Length < 216 bytes = 65536 bytes

Fields of the IP Header


Identification (16 bits): Unique identification of a datagram from a host. Incremented whenever a datagram is transmitted Flags (3 bits): First bit always set to 0 DF bit (Do not fragment) MF bit (More fragments) Will be explained later Fragmentation

Fields of the IP Header


Time To Live (TTL) (1 byte): Specifies longest paths before datagram is dropped Role of TTL field: Ensure that packet is eventually dropped when a routing loop occurs Used as follows: Sender sets the value (e.g., 64) Each router decrements the value by 1 When the value reaches 0, the datagram is dropped

14

15

Fields of the IP Header


Protocol (1 byte): Specifies the higher-layer protocol. Used for demultiplexing to higher layers.

Fields of the IP Header


Options: Security restrictions Record Route: each router that processes the packet adds its IP
address to the header.

Timestamp: each router that processes the packet adds its IP


address and time to the header.

(loose) Source Routing: specifies a list of routers that must be


traversed.

(strict) Source Routing: specifies a list of the only routers that


can be traversed.

Header checksum (2 bytes): A simple 16-bit long checksum which is computed for the header of the datagram.
16

Padding: Padding bytes are added to ensure that header ends on a 4-byte boundary
17

IPv6 Packet Header


The basic IPv6 packet header has 8 fields with a total size of 40 octets (320 bits).

Fields were removed from the IPv6 header because, in IPv6, fragmentation is not handled by routers and checksums at the network layer are not used. Instead, fragmentation in IPv6 is handled by the source of a packet and checksums at the data link layer and transport layer are used. In IPv6, use of the UDP checksum is required to check the integrity of the inner packet. Additionally, the basic IPv6 packet header and Options field are aligned to 64 bits, which can facilitate the processing of IPv6 packets.
19

18

Version: Same as in IPv4 Traffic Class: Similar to the Type of Service field in the IPv4 packet header. The Traffic Class field tags packets with a traffic class that is used in differentiated services. Flow Label: A new field in the IPv6 packet header. The Flow Label field tags packets with a specific flow that differentiates the packets at the network layer. Payload Length: Similar to the Total Length field in the IPv4 packet header.
20

Next Header: Similar to the Protocol field in the IPv4 packet header. Hop Limit: Similar to the Time to Live field in the IPv4 packet header. Because no checksum is in the IPv6 header, the router can decrement the value without needing to recalculate the checksum, which saves processing resources.

21

You might also like