Docstoc

Fragmentation and Reassembly

Document Sample
Fragmentation and Reassembly Powered By Docstoc
					         Fragmentation and Reassembly
• Since IP interfaces with different networks it has to conform the
  maximum data packet size of the interfacing network. This packet
  limitation is called the maximum transmission unit (MTU).
• Examples are Ethernet and FDDI where the MTUs are limited to 1500
  and 4464 Bytes respectively
• Successive fragmentation is possible if the IP paket passes through
  networks which demand that. This will happen If the MTU of some
  other network down-stream is found to be smaller than the fragment
  size, the fragment will be broken again into smaller fragments, as
  shown in Figure 1.
• This fragmentation imposes requirements of reassembly by destination
  IP. Also, if some of these fragmented or smaller packets are lost the
  whole original packet need to be discarded.
• To detect lost fragments, the destination host sets a timer once the first
  fragment of a packet arrives. If the timer expires before all fragments
  have been received, the host assumes the missing fragments were lost
  in the network and discards the other fragments.

                                                                          1
        Fragmentation and Reassembly
• As discussed last time and shown in Figure 2 there are
  three fields assigned for this purpose at the IP layer. These
  are known as: Identification, Flag and fragment offset. The
  flag field has three bits: one unused bit, one "don't
  fragment" (DF) bit, and one "more fragment" (MF) bit. If
  the DF bit is set to 1, it forces the router not to fragment the
  packet. If the packet length is greater than the MTU, the
  router will have to discard the packet and send an error
  message to the source
• Since the number of assigned bits for offset field are 13 the
  maximum number of offset possible are 8192 which allows
  a maximum packet size of 65,536 byte long packet to be
  fragmented and identified by this field. Thus, the packet ID
  is the same as the original packet ID but the offset identifies
  the sub-packets within a packet. Destination can now
  identify all sub-packets where the smallest packet size
  permissible is 8 bit packet.                                   2
       Fragmentation and Reassembly
•  The penalty one has to pay for this fragmentation is the
  packet repetition which might be required if the higher
  layers of TCP/IP demands.
• Some amount of ingenuity can be exercised at the router
  level, if a router has to discard a fragment, say, due to
  congestion, it might as well discard the subsequent
  fragments belonging to the same packet, since they will
  become useless at the destination.
     Example of fragmentation:
               Suppose a packet arrives at a router and is to be
     forwarded to an X.25 network having an MTU of 576
     bytes. The packet has an IP header of 20 bytes and the
     data part of 1484 bytes. Perform fragmentation and
     include the pertinent values of the IP header of the
     original packet and of each fragment.
                                                              3
       Fragmentation and Reassembly
The original packet size is 1484 Bytes + 20 Bytes of header = 1504 Bytes.
Since each fragmented packet has to have the original IP header, the total
allowed packet size for data is 576-20 = 556 Bytes. Since 556/8 = 69.5 we
can’t have sub-packet Length of 556. However one solution can be 69 * 8
= 552. Thus, the tree fragmented packets can be: 552 Bytes (sub-packet 1)
+ 552 Bytes (sub-packet 2) + 382 Bytes (1484 – 2*552 = 380 Bytes) (sub-
packet 3). Note that these are the packet sizes without the header. Each one
these will have20 more bytes for the header thus, the table below shows the
answer




                                                                        4
5
0                                                                                                                                                                            31




- - - - - - - - - - - - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - - - - - - - - - - - -
                                                      VER                                                 IHL        Service type                   Total length

                                                                                                          Identification                Flag          Fragment offset

                                                                                                 Time to live          Protocol                 Header checksum

                                                                                                                           Source network address

                                                                                                                       Destination network address
                                                                                                                      Options                                      Padding




                                                                                                                                                                                  6
      Classless Interdomain Routing (CIDR)
• A,B,C,D class categories were inefficient due to various reasons: Class
  A did not have enough fields for Net ID, Class B was probably not
  adequate for network ID on the world wide basis (only 65536 such
  allocations possible). Similarly, class C was not adequate for host ID
  available for a large corporation.
• In order to overcome these problems in 1993 the classful address space
  restriction was lifted. An arbitrary prefix length to indicate the network
  number, known as classless inter-domain routing (C1DR), was
  adopted in place of the classful scheme. The scheme is as follows.
• Using a CIDR notation, a prefix 205.100.0.0 of length 22 is written as
  205.100.0.0/22. The corresponding prefix range runs from 205.100.0.0
  through 205.100.3.0. The /22 notation indicates that the network mask
  is 22 bits, or 255.255.252.0 as shown below in the table.

      205.100.0.0 = 1100 1101 . 0110 0100. 0000 0000 . 0000 0000
      205.100.1.0 =1100 1101 . 0110 0100. 0000 0001 . 0000 0000
      205.100.2.0 =1100 1101 . 0110 0100. 0000 0010. 0000 0000
      205.100.3.0 =1100 1101 . 0110 0100. 0000 0011. 0000 0000
        mask     = 1111 1111. 1111 1111. 1111 1100. 0000 0000
                                                                           7

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:6
posted:3/1/2012
language:
pages:7