Docsity

Understanding IP Datagrams: Format, Fragmentation, and Services, Slides of Computer Network Management and Protocols

Partial preview of the text

Download Understanding IP Datagrams: Format, Fragmentation, and Services and more Slides Computer Network Management and Protocols in PDF only on Docsity!

1

IP - The Internet Protocol

Relates to Lab 2. A module on the Internet Protocol.

docsity.com

•^

IP (Internet Protocol) is a Network Layer Protocol.

-^

IP’s current version is Version 4 (IPv4). It is specified in RFC891.

Orientation

docsity.com

Application protocol^ •

IP is the highest layer protocol which is implemented at bothrouters and hosts

docsity.com

IP Service^ •^

Delivery service of IP is minimal

-^

IP provide provides an unreliable connectionless best effort service (alsocalled: “datagram service”).–

Unreliable:

IP does not make an attempt to recover lost packets

-^

Connectionless:

Each packet (“datagram”) is handled independently.

IP is not aware that packets between hosts may be sent in a logicalsequence

-^

Best effort:

IP does not make guarantees on the service (no

throughput guarantee, no delay guarantee,…)

-^

Consequences:

-^

Higher layer protocols have to deal with losses or with

duplicate

packets

-^

Packets may be delivered out-of-sequence

docsity.com

-^

20 bytes

≤

Header Size < 2

4 x 4 bytes = 60 bytes

-^

20 bytes

≤

Total Length < 2

16

bytes = 65536 bytes

IP Datagram Format

ECN

version

headerlength

DS

total length (in bytes)

Identification

Fragment offset

source IP address destination IP addressoptions (0 to 40 bytes)

payload^ 4 bytes

time-to-live (TTL)

protocol

header checksum

bit #

0

15

23

24

8

31

7

16^0

MF D F

docsity.com

IP Datagram Format^ •

Question:

In which order are the bytes of an IP datagram

transmitted?

-^

Answer:

  • Transmission is row by row• For each row:
    1. First transmit bits 0-72. Then transmit bits 8-153. Then transmit bits 16-234. Then transmit bits 24-

•^

This is called

network byte

order or

big endian

byte

ordering.

-^

Note:

Many computers (incl. Intel processors) store 32-bit words in little

endian format. Others (incl. Motorola processors) use big endian.

docsity.com

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 inthe Internet)

  • Explicit Congestion Notification (ECN) (2 bits):
    • New feedback mechanism used by TCP

docsity.com

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

docsity.com

Fields of the IP Header^ •

Protocol (1 byte):

  • Specifies the higher-layer protocol.• Used for demultiplexing to higher layers.

•^

Header checksum (2 bytes):

A simple 16-bit long checksum

which is computed for the header of the datagram.

docsity.com

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.

•^

Padding:

Padding bytes are added to ensure that header

ends on a 4-byte boundary

docsity.com

IP Fragmentation

FDDIRing

Router

Host A

Host B

Ethernet

MTUs:

FDDI: 4352

Ethernet: 1500

•^

Fragmentation

  • IP router splits the datagram into several datagram• Fragments are reassembled at receiver -^

What if the size of an IP datagram exceeds the MTU?IP datagram is fragmented into smaller units.

-^

What if the route contains networks with different MTUs?

docsity.com

Where is Fragmentation done?

  • Fragmentation can be done at the sender or at

intermediate routers

  • The same datagram can be fragmented several times.• Reassembly of original datagram is only done at

destination hosts !!

Router

IP datagram

H^

Fragment 1

H

Fragment 2

H

docsity.com

What’s involved in Fragmentation?^ •^

The following fields in the IPheader are involved: Fragment offset

Offset of the payload of the currentfragment in the original datagram

Total length

Total length of the current fragment

ECN

version

headerlength

DS

total length (in bytes)

Identification

Fragment offset

time-to-live (TTL)

protocol

header checksum

0

MF D F

docsity.com

Example of Fragmentation^ •^

A datagram with size 2400 bytes must be fragmented according to anMTU limit of 1000 bytes

docsity.com