IP Packet - Gadjah Mada University
Download
Report
Transcript IP Packet - Gadjah Mada University
IP Packet
Ir. Risanuri Hidayat, M.Sc.
Packet Format
0
4
Version
8
HLen
16
TOS
31
Length
Ident
TTL
19
Flags
Protocol
Offset
Checksum
SourceAddr
DestinationAddr
Options (variable)
Pad
(variable)
Data
17 July 2015
IP Packet
2
Packet Format
• Version—Versi IP yang digunakan (0100=4)
• IP Header Length (IHL)—Datagram header length dalam
32-bit words.
• Type-of-Service—Specifies how an upper-layer protocol
would like a current datagram to be handled, and assigns
datagrams various levels of importance.
• Total Length—Panjang paket dalam bytes, termasuk data
dan header.
• Identification—Nilai integer ebagai identifikasi paket saat
ini. Item ini berguna pada fragmentation jika paket terdiri
atas potongan-potongan paket besar
17 July 2015
IP Packet
3
Packet Format
• Flags—Consists of a 3-bit field of which the two low-order
(least-significant) bits control fragmentation.
– The low-order bit specifies whether the packet can be fragmented.
– The middle bit specifies whether the packet is the last fragment in
a series of fragmented packets.
– The third or high-order bit is not used.
• Fragment Offset—Indicates the position of the fragment's
data relative to the beginning of the data in the original
datagram, which allows the destination IP process to
properly reconstruct the original datagram.
17 July 2015
IP Packet
4
Packet Format
• Time-to-Live—Maintains a counter that gradually
decrements down to zero, at which point the datagram is
discarded. This keeps packets from looping endlessly.
• Protocol—Indicates which upper-layer protocol receives
incoming packets after IP processing is complete.
• Header Checksum—Helps ensure IP header integrity.
• Source Address—Specifies the sending node.
• Destination Address—Specifies the receiving node.
• Options—Allows IP to support various options, such as
security.
• Data—Contains upper-layer information.
17 July 2015
IP Packet
5
Fragmentation and Reassembly
H2
H1
H3
Network 1 (Ethernet)
Network 2 (Ethernet)
R3
R1
R3
R1
R2
R2
H4
H7
H8
Network 4
(point-to-point)
Network 3 (FDDI)
H5
17 July 2015
H6
IP Packet
6
Fragmentation and Reassembly
H1
H8
TCP
R1
IP
IP
ETH
ETH
H1
ETHIP (1400)
17 July 2015
R2
R3
IP
FDDI
R1
FDDI
IP
PPP
PPP
R2
FDDIIP (1400)
R3
PPPIP(512)
PPPIP(512)
PPPIP(376)
IP Packet
TCP
IP
ETH
ETH
H8
ETHIP(512)
ETHIP(512)
ETHIP(376)
7
H1
R1
ETHIP (1400)
R2
FDDIIP (1400)
=0
0 Offset
Rest of header
PPPIP(512)
PPPIP(512)
PPPIP(376)
Start of header
Start of header
Ident
=x
R3
Ident
=x
1 Offset
=0
Rest of header
1400 data bytes
512 data bytes
H8
ETHIP(512)
ETHIP(512)
ETHIP(376)
Start of header
Ident
=x
1 Offset
= 512
Rest of header
512 data bytes
Start of header
Ident
=x
0 Offset
= 1024
Rest of header
IP Header = 4x5 = 20 bytes
376 data bytes
17 July 2015
IP Packet
8