IP fragmentation attack: Difference between revisions

Content deleted Content added
This extra space aligns the end of the second row of the text-based illustration
Hayazin (talk | contribs)
Process: Cleaned and tidied up the bit diagrams and
Line 17:
 
Three fields in the [[IPv4#Header|IP header]] are used to implement fragmentation and reassembly. The "Identification", "Flags" and "Fragment Offset" fields.
{| class="wikitable" style="margin: 0 auto; text-align: center;"
 
|+ IPv4 Header Format
<code>
|-
0 1 2 3
! ''Offsets''
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
! [[Octet (computing)|Octet]]
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! colspan="8" | 0
|Version| IHL |Type of Service| Total Length |
! colspan="8" | 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! colspan="8" | 2
| Identification |Flags| Fragment Offset |
! colspan="8" | 3
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|-
| Time to Live | Protocol | Header Checksum |
! | [[Octet (computing)|Octet]]
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! [[Bit]]
| Source Address |
! style="width:2.6%;"| 0
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! style="width:2.6%;"| 1
| Destination Address |
! style="width:2.6%;"| 2
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! style="width:2.6%;"| 3
| Options | Padding |
! style="width:2.6%;"| 4
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! style="width:2.6%;"| 5
</code>
! style="width:2.6%;"| 6
! style="width:2.6%;"| 7
! style="width:2.6%;"| 8
! style="width:2.6%;"| 9
! style="width:2.6%;"| 10
! style="width:2.6%;"| 11
! style="width:2.6%;"| 12
! style="width:2.6%;"| 13
! style="width:2.6%;"| 14
! style="width:2.6%;"| 15
! style="width:2.6%;"| 16
! style="width:2.6%;"| 17
! style="width:2.6%;"| 18
! style="width:2.6%;"| 19
! style="width:2.6%;"| 20
! style="width:2.6%;"| 21
! style="width:2.6%;"| 22
! style="width:2.6%;"| 23
! style="width:2.6%;"| 24
! style="width:2.6%;"| 25
! style="width:2.6%;"| 26
! style="width:2.6%;"| 27
! style="width:2.6%;"| 28
! style="width:2.6%;"| 29
! style="width:2.6%;"| 30
! style="width:2.6%;"| 31
|-
! 0
! 0
| colspan="4"|[[#Version|Version]]
| colspan="4"|[[#IHL|IHL]]
| colspan="6"|[[#DSCP|DSCP]]
| colspan="2"|[[#ECN|ECN]]
| colspan="16"|[[#Total Length|Total Length]]
|-
! 4
! 32
| colspan="16"|[[#Identification|Identification]]
| colspan="3"|[[#Flags|Flags]]
| colspan="13"|[[#Fragment Offset|Fragment Offset]]
|-
! 8
! 64
| colspan="8"|[[#TTL|Time To Live]]
| colspan="8"|[[#Protocol|Protocol]]
| colspan="16"|[[#Header Checksum|Header Checksum]]
|-
! 12
! 96
| colspan="32"|[[#Source address|Source IP Address]]
|-
! 16
! 128
| colspan="32"|[[#Destination address|Destination IP Address]]
|-
! 20
! 160
| colspan="32" rowspan="4" |[[#Options|Options]] (if IHL > 5)
|-
! 24
! 192
|-
! 28
! 224
|-
! 32
! 256
|}
 
Flags:
Line 44 ⟶ 112:
: Bit 2: (AF) 0 = Last Fragment, 1 = More Fragments.
 
{| class="wikitable" style="text-align: center;"
<code>
|-
0 1 2 13 bits
! Bit
+---+---+---+ +-----------------------------+
! 0 !! 1 !! 2 !! 3 |!! 4 !! |5 D!! |6 M!! |7 !! 8 !! |9 !! 10 !! 11 Fragment!! Offset12 !! 13 !! 14 !! |15
|-
| 0 | F | F | +-----------------------------+
! Field
+---+---+---+
| 0 || DF || MF || colspan="13" | Fragment Offset
</code>
|}
 
Fragment Offset specifies the fragment's position within the original Datagram, measured in 8-byte units.