The Internet Protokoll (IP) V4, defined in the RFC791, is the routing layer service of the TCP/IP network.

V4

4

8

16

32 bits

Ver

IHL

Type of Service/
DSCP & ECN

total length

Identification

 Flags |      Fragment offset

Time to Live

Protocol

Header checksum

Source address

Destination address

Options + Padding

Data



Vers

Version - mark the used version of the IP-protocol, "4" for V4

IHL

Internet Header Length - length of the IP-Header in units of 32 bits (min. 5)

Type of Service























Differentiated Service

old interpretation
Establishing of a service kindliness - for example priority, dilatory installment, reliability

Prec

0

Routine

1

Priority

2

Immediate

3

Flash

4

Flash override

5

CRITIC/ECP

6

Internetwork control

7

Network control

D

Low delay

T

High throughput

R

High reliability

M

Minimize monetary cost


new interpretation
The DSCP Feld, defined in the RFC2474, replaces the Type Of Sevice Feld (RFC3168) for IPv4

ECN-bits

            xx

   ECN-Capable Transport (ECT)

   Congestion Experienced (CE)

Class Selector PHB (Per Hop Behavior)

xxx000

Assured Forwarding PHB (AF PHB) /
Expedited Forwarding PHB (EF PHB)

all other

total length

total length (header + data) of the IP datagram

Identification

for reassembling of fragments

Flags

DF

don't fragment (this paket should not fragmented)

MF

more fragments follow

Fragment offset

position of the current fragment in the datagram in units of 64 bits

Time to Live

Lifespan during handling by router (discarding of the datagram with 0)

Protocol

Transportation protocol (TCP,UDP,ICMP,...)

Header checksum

Checksum of the harder, recalculation through each router (without data)

Source address

senders IP-address

Destination address

receivers IP-address

Options + Padding

optional parameters (0..40 bytes)

C

Copy

Class

0

Control

1

"Reserved"

2

Debugging ans measurement

3

"Reserved"

Option

0

End of Option list

1

NOP

2

Security

3

Loose Source Route

4

Time stamp

[RFC781],[RFC791]

5

Extended Security

[RFC1108]

6

Commercial Security

7

Record Route

[RFC791]

8

Strem Identifier

[RFC791],[RFC1122]

9

Strct Source Route

[RFC791]

10

Experimental Measurement

11

MTU Probe

[RFC1063]

12

MTU Reply

[RFC1063]

13

Experimental Flow Control

14

Experimental Access Control

15

16

IMI Traffic Descriptor

17

Extended Internet Proto

18

Traceroute

[RFC1393]

19

Adress Extension

[RFC1475]

20

Router Alert

[RFC2113]

21

Selective Directed Broadcast Mode

[RFC1770]

22

NSAP Addresses

23

Dynamic Packet State

24

Upstream Multicast Packet

...


plus filling byte on 32-bit-borders





IP version 6 (IPv6) is the new version of the Internet Protokoll based on IPv4.
Additional services and a widened IP-address room were integrated. The options of the IPv6 are placed on that occasion in a seperatem header between the IPv6 header and the Transportlayer header.

V6

4

8

16

24

32 bits

Ver

Priority

Flow label

Payload length

Next header

Hop limit

Source address
(128 bits)

Destination address
(128 bits)