Go to Overview >>
Description of the Internet Protocol, IP
PPP headerIP headerData
IP Header:
00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Version IHL TOS Total length
Identification Flags Fragment offset
TTL Protocol Header checksum
Source IP address
Destination IP address
Options (IF ANY) and padding
:::
DATA
:::

Version. 4 bits.
Specifies the format of the IP packet header.

Version Description
0 Reserved.
1
2
3
 
4 IP, Internet Protocol.
5 ST, ST Datagram Mode.
6 SIP, Simple Internet Protocol.
SIPP, Simple Internet Protocol Plus.
IPv6, Internet Protocol.
7 TP/IX, The Next Internet.
8 PIP, The P Internet Protocol.
9 TUBA
10
-
14
 
15 Reserved.

IHL, Internet Header Length. 4 bits.
Specifies the length of the IP packet header in 32 bit words. The minimum value for a valid header is 5.

TOS, Type of Service. 8 bits.
Specifies the parameters for the type of service requested. The parameters may be utilized by networks to define the handling of the datagram during transport. The M bit was added to this field in RFC 1349.

00 01 02 03 04 05 06 07
Precedence D T R M 0

Precedence. 3 bits.

Value Description
0 Routine.
1 Priority.
2 Immediate.
3 Flash.
4 Flash override.
5 CRITIC/ECP.
6 Internetwork control.
7 Network control.

D. 1 bit.
Minimize delay.

Value Description
0 Normal delay.
1 Low delay.

T. 1 bit.
Maximize throughput.

Value Description
0 Normal throughput.
1 High throughput.

R. 1 bit.
Maximize reliability.

Value Description
0 Normal reliability.
1 High reliability.

M. 1 bit.
Minimize monetary cost.

Value Description
0 Normal monetary cost.
1 Minimize monetary cost.

Total length. 16 bits.
Contains the length of the datagram.

Identification. 16 bits.
Used to identify the fragments of one datagram from those of another. The originating protocol module of an internet datagram sets the identification field to a value that must be unique for that source-destination pair and protocol for the time the datagram will be active in the internet system. The originating protocol module of a complete datagram sets the MF bit to zero and the Fragment Offset field to zero.

Flags. 3 bits.

00 01 02
R DF MF

R, Reserved. 1 bit.
Should be set to 0.

DF, Don't fragment. 1 bit.
Controls the fragmentation of the datagram.

Value Description
0 Fragment if necessary.
1 Do not fragment.

MF, More fragments. 1 bit.
Indicates if the datagram contains additional fragments.

Value Description
0 This is the last fragment.
1 More fragments follow this fragment.

Fragment Offset. 13 bits.
Used to direct the reassembly of a fragmented datagram.

TTL, Time to Live. 8 bits.
A timer field used to track the lifetime of the datagram. When the TTL field is decremented down to zero, the datagram is discarded.

Protocol. 8 bits.
This field specifies the next encapsulated protocol.

Value Protocol
0 IPv6 Hop-by-Hop Option.
1 ICMP, Internet Control Message Protocol.
2 IGMP, Internet Group Management Protocol.
RGMP, Router-port Group Management Protocol.
3 GGP, Gateway to Gateway Protocol.
4 IP in IP encapsulation.
5 ST, Internet Stream Protocol.
6 TCP, Transmission Control Protocol.
7 UCL, CBT.
8 EGP, Exterior Gateway Protocol.
9 IGRP.
10 BBN RCC Monitoring.
11 NVP, Network Voice Protocol.
12 PUP.
13 ARGUS.
14 EMCON, Emission Control Protocol.
15 XNET, Cross Net Debugger.
16 Chaos.
17 UDP, User Datagram Protocol.
18 TMux, Transport Multiplexing Protocol.
19 DCN Measurement Subsystems.
20 HMP, Host Monitoring Protocol.
21 Packet Radio Measurement.
22 XEROX NS IDP.
23 Trunk-1.
24 Trunk-2.
25 Leaf-1.
26 Leaf-2.
27 RDP, Reliable Data Protocol.
28 IRTP, Internet Reliable Transaction Protocol.
29 ISO Transport Protocol Class 4.
30 NETBLT, Network Block Transfer.
31 MFE Network Services Protocol.
32 MERIT Internodal Protocol.
33 Sequential Exchange Protocol.
34 Third Party Connect Protocol.
35 IDPR, Inter-Domain Policy Routing Protocol.
36 XTP, Xpress Transfer Protocol.
37 Datagram Delivery Protocol.
38 IDPR, Control Message Transport Protocol.
39 TP++ Transport Protocol.
40 IL Transport Protocol.
41 IPv6 over IPv4.
42 SDRP, Source Demand Routing Protocol.
43 IPv6 Routing header.
44 IPv6 Fragment header.
45 IDRP, Inter-Domain Routing Protocol.
46 RSVP, Reservation Protocol.
47 GRE, General Routing Encapsulation.
48 MHRP, Mobile Host Routing Protocol.
49 BNA.
50 ESP, Encapsulating Security Payload.
51 AH, Authentication Header.
52 Integrated Net Layer Security TUBA
53 IP with Encryption.
54 NARP, NBMA Address Resolution Protocol.
55 Minimal Encapsulation Protocol.
56 TLSP, Transport Layer Security Protocol using Kryptonet key management.
57 SKIP.
58 ICMPv6, Internet Control Message Protocol for IPv6.
MLD, Multicast Listener Discovery.
59 IPv6 No Next Header.
60 Destination Options for IPv6.
61 Any host internal protocol.
62 CFTP.
63 Any local network.
64 SATNET and Backroom EXPAK.
65 Kryptolan.
66 MIT Remote Virtual Disk Protocol.
67 Internet Pluribus Packet Core.
68 Any distributed file system.
69 SATNET Monitoring.
70 VISA Protocol.
71 Internet Packet Core Utility.
72 Computer Protocol Network Executive.
73 Computer Protocol Heart Beat.
74 Wang Span Network.
75 Packet Video Protocol.
76 Backroom SATNET Monitoring.
77 SUN ND PROTOCOL-Temporary.
78 WIDEBAND Monitoring.
79 WIDEBAND EXPAK.
80 ISO Internet Protocol.
81 VMTP, Versatile Message Transaction Protocol.
82 SECURE-VMTP
83 VINES.
84 TTP.
85 NSFNET-IGP.
86 Dissimilar Gateway Protocol.
87 TCF.
88 EIGRP.
89 OSPF, Open Shortest Path First Routing Protocol.
MOSPF, Multicast Open Shortest Path First.
90 Sprite RPC Protocol.
91 Locus Address Resolution Protocol.
92 MTP, Multicast Transport Protocol.
93 AX.25.
94 IP-within-IP Encapsulation Protocol.
95 Mobile Internetworking Control Protocol.
96 Semaphore Communications Sec. Pro.
97 Ethernet-within-IP Encapsulation.
98 Encapsulation Header.
99 Any private encryption scheme.
100 GMTP.
101 IFMP, Ipsilon Flow Management Protocol.
102 PNNI over IP.
103 PIM, Protocol Independent Multicast.
104 ARIS.
105 SCPS.
106 QNX.
107 Active Networks.
108 IPPCP, IP Payload Compression Protocol.
109 SNP, Sitara Networks Protocol.
110 Compaq Peer Protocol.
111 IPX in IP.
112 VRRP, Virtual Router Redundancy Protocol.
113 PGM, Pragmatic General Multicast.
114 any 0-hop protocol.
115 L2TP, Level 2 Tunneling Protocol.
116 DDX, D-II Data Exchange.
117 IATP, Interactive Agent Transfer Protocol.
118 ST, Schedule Transfer.
119 SRP, SpectraLink Radio Protocol.
120 UTI.
121 SMP, Simple Message Protocol.
122 SM.
123 PTP, Performance Transparency Protocol.
124 ISIS over IPv4.
125 FIRE.
126 CRTP, Combat Radio Transport Protocol.
127 CRUDP, Combat Radio User Datagram.
128 SSCOPMCE.
129 IPLT.
130 SPS, Secure Packet Shield.
131 PIPE, Private IP Encapsulation within IP.
132 SCTP, Stream Control Transmission Protocol.
133 Fibre Channel.
134 RSVP-E2E-IGNORE.
135
-
254
 
255 Reserved.

Header checksum. 16 bits.
A 16 bit one's complement checksum of the IP header and IP options.

Source IP address. 32 bits.
IP address of the sender.

Destination IP address. 32 bits.
IP address of the intended receiver.

Options. Variable length.

00 01 02 03 04 05 06 07
C Class Option

C, Copy flag. 1 bit.
Indicates if the option is to be copied into all fragments.

Value Description
0 Do not copy.
1 Copy.

Class. 2 bits.

Value Description
0 Control.
1 Reserved.
2 Debugging and measurement.
3 Reserved.

Option. 5 bits.

Option Copy Class Value Length Description References
0 0 0 0

1

End of options list. RFC 791
1 0 0 1

1

NOP. RFC 791
2 1 0 130

11

Security. RFC 791, RFC 1108
3 1 0 131

variable

Loose Source Route. RFC 791
4 0 2 68 variable Time stamp. RFC 781, RFC 791
5 1 0 133

3 .. 31

Extended Security. RFC 1108
6 1 0 134   Commercial Security.  
7 0 0 7 variable Record Route. RFC 791
8 1 0 136

4

Stream Identifier. RFC 791, RFC 1122
9 1 0 137 variable Strict Source Route. RFC 791
10 0 0 10   Experimental Measurement.  
11 0 0 11 4 MTU Probe. RFC 1063
12 0 0 12 4 MTU Reply. RFC 1063
13 1 2 205   Experimental Flow Control.  
14 1 0 142   Expermental Access Control.  
15 0 0 15      
16 1 0 144   IMI Traffic Descriptor.  
17 1 0 145   Extended Internet Proto  
18 0 2 82 12 Traceroute. RFC 1393
19 1 0 147 10 Address Extension. RFC 1475
20 1 0 148

4

Router Alert. RFC 2113
21 1 0 149

6 .. 38

Selective Directed Broadcast Mode. RFC 1770
22 1 0 150   NSAP Addresses.  
23 1 0 151   Dynamic Packet State.  
24 1 0 152   Upstream Multicast Packet.  
25
-
31
           

Padding. Variable length.
Used as a filler to guarantee that the data starts on a 32 bit boundary.