internet networking spring 2005 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Internet Networking Spring 2005 PowerPoint Presentation
Download Presentation
Internet Networking Spring 2005

Loading in 2 Seconds...

play fullscreen
1 / 18

Internet Networking Spring 2005 - PowerPoint PPT Presentation


  • 130 Views
  • Uploaded on

Internet Networking Spring 2005. Tutorial 2 IP Checksum, Fragmentation. IP Header Diagram. Ver. IHL. TOS. Total Length. Identification. Flags. Fragment Offset. TTL. Protocol. Checksum. Source Address. Destination Address. Option. Padding. IP Checksum.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Internet Networking Spring 2005' - fala


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
internet networking spring 2005

Internet Networking Spring 2005

Tutorial 2

IP Checksum, Fragmentation

ip header diagram
IP Header Diagram

Ver.

IHL

TOS

Total Length

Identification

Flags

Fragment Offset

TTL

Protocol

Checksum

Source Address

Destination Address

Option

Padding

ip checksum
IP Checksum
  • Ensuring integrity of IP header
    • Reducing processing time at routers.
    • Does not check data integrity.
    • Allowing higher level protocols to choose their own checksum scheme for the data.
checksum rfc 1071
Checksum (RFC 1071)
  • Adjacent octets to be checksummed are paired to form 16-bit words. The checksum field is cleared.
  • The 16-bit 1's complement sum is computed over the 16-bit words
    • Any overflows are added to the sum.
  • The 1's complement of this sum is placed in the checksum field.
checksum
Checksum
  • To verify a checksum, the 1's complement sum is computed over the same set of octets, including the checksum field.
  • If the result is all 1 bits, the check succeeds.
checksum1
Checksum
  • Insensitive to:
    • Byte order.
    • Zero padding.
    • Word width (2 bytes, 4 bytes, etc.).
  • Hardware oriented (simple addition).
  • Not robust (unlike CRC).
incremental checksum update rfc 1141
Incremental Checksum Update (RFC 1141)
  • Updating part of the IP header data doesn’t require recomputing the entire Checksum field. (For example: when a router change the TTL field.)
  • The technique for speed up checksum recomputing in this case is called - incremental checksum update.
incremental checksum update
Incremental Checksum Update
  • Notation:
    • C - Old 1’s complement sum.
    • m - Old data.
    • C’ - New 1’s complement sum.
    • m’ - New data.

C’ = C + (-m) + m’ = C + ( m’ – m)

  • The checksum is the 1’ complement of C’:

~C' = ~(C + (-m) + m') = ~C + (m - m')

= ~C + m + ~m‘

    • Note, the second equality does not work if the sum in the brackets is 0xFFFF (see RFC 1624).
incremental internet checksum
Incremental Internet Checksum
  • Subtracting 1 from TTL field (common case)

~C’ = ~C + (m - m’) = ~C + 0100H

(TTL byte is higher byte of integer)

If ~C=220dH then

~C’ = 220dH + 0100H = 230dH

ip fragmentation
IP Fragmentation
  • The internet is used to connect network from different technologies.
  • In particular every technology has its own maximum packet size.
    • This maximum packet size is called MTU (Maximum Transfer Unit).
    • In Ethernet the MTU is 1514 bytes.
  • Large IP packets may traverse network in which the MTU is smaller than the packet sized.
    • These packets must be fragmented.
ip fragmentation1
IP Fragmentation
  • IP fragmentation is done in the entry point of the (physical) network that requires the fragmentation.
    • IP layer automatically performs fragmentation of a datagram when its too large to be sent on physical network.
    • A datagram could be fragmented more than one time.
    • Fragments are counted in units of 8 octets.
  • Reassemble is done in the IP layer at the destination.
    • Transparent to upper protocol.
ip fragmentation2
IP Fragmentation

Ver.

IHL

TOS

Total Length

Identification

Flags

Fragment Offset

TTL

Protocol

Checksum

Source Address

Destination Address

Option

Padding

identification field
Identification field
  • Unique integer that identifies the datagram
  • The originator of the IP packet (i.e. the source) 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.
    • Implemented by counter, which increments by one.
  • Ensures that fragments of different datagrams are not mixed.
fragment offset
Fragment Offset
  • Tells the receiver the position of a fragment in the original datagram.
    • Identifies the fragment location, relative to the beginning of the original unfragmented datagram.
  • The fragment offset and length determine the portion of the original datagram covered by this fragment.
  • The fragment offset is measured in units of 8 octets (64 bits).
    • Enables Additional fragmentation.
    • It does not include the length of the IP header.
    • Reason: 13 bits are used to map 16 bits (IP length).
  • The first fragment has offset zero.
slide16
Flag
  • Bit 0: reserved, must be zero.
  • Bit 1: (DF) 0 = May Fragment, 1=Don't Fragment.
    • If is set, then internet fragmentation of this datagram is NOT permitted
    • If fragmentation required, but this bit is set than the packet is discarded and ICMP is returned.
  • Bit 2: (MF) 0 = Last Fragment, 1=More Fragments.
    • Set if the datagram is not the last fragment.
fragmentation example

Datagram

header

Data1

600 octets

Data2

600 octets

Data3

200 octets

a

Datagram

header

Data1

600 octets

Fragment 1 offset = 0

Datagram

header

Data2

600 octets

Fragment 2 offset = 75

b

Datagram

header

Data3

200 octets

Fragment 3 offset = 150

Fragmentation - Example
fragmentation
Fragmentation
  • Fragmentation must be supported by every IP entities (routers, host, etc.).
  • Fragmentation should be avoided.
    • Loss of one fragment requires retransmission of the entire packet.
    • Advanced IP forwarding entities (e.g HW based forwarding entities) does not support IP fragmentation (i.e. IP fragmentation is an exception).
    • MTU discovery protocol (RFC 1191) that uses the DF bit, is used to avoid the necessity of IP fragmentation.