Back Next
IPv4 - Internet Protocol packet (datagram packet).
  Address
  4 octet current protocol - 2^32.
    Stateful - Class A,B,C,D,E  although stateles also supported.

    (IPv6) - 2^128 - Stateless

  Packet or datagram details. IPv4

  Minimum of 40 bytes and up to 65535 bytes.  
    Packet size independent of lan and router hop protocols.
    * IPv6 attempts to discover maximum packet size across the whole connection
      and limits the initial packet size to smallest frame.

  Besides data being transmitted, some information it contains:
    IPv4 header
      Version 4-bit

      Internet Header Length 4-bit (Header not data body)

      Differential Services Code Point 6-bit 
        Voice, streaming, email, file transfer, etc.  Helps with prioritizing
        packet delivery. 
         
    Explicit Congestion Notification 2-bit - used to help track network 
      congestion. Not used that much.

    Total length 16-bit - length of entire packet. 20-65535.

    Identification 16-bit - used if a packet needs to e fragmented when 
      traversing a particular link in the data-path.
 
    Flags 3-bit 
      Bit 0 = 0  Reserved.
      Bit 1      (DF) Don't fragment.
      Bit 2      (MF) More fragments.  Cleared if not fragmented or last 
        fragment being transmitted.

    Fragment Offset 13-bit - used if datagram larger than frame payload of 
      particular network. Packet fragmented and serialized.

    TTL 8-bit  - time to live, used to guard against lost and wandering packet.
      Set to number of seconds. But actually decremented at each hop.
      * IPv6 just calls it a hop count.

    Protocol number - type of packet: ICMP, UDP, TCP, others
      http://en.wikipedia.org/wiki/List_of_IP_protocol_numbers
 
    Header Checksum 16-bit. Only checks the header for correctness. TCP/IP
      protocol assumes UDP and TCP use separate check sum for payload.

    Source and destination IPs.

  Error checking - checksum at the IP level, just check that the packet been 
    delivered in an uncorrupted form. * IPv6 assumes error correction done at 
    data-link and drops use of checksum.

  Options - additional options, not used much.

  Data - payload. Usually a TCP or UDP packet, but others recognized.

IPv6
   Simpler header field with less used field moved to optional extensions. 
     Primary header 40 bytes.

   Does not allow fragmenting along hops. Requires either discovery of smallest
     packet/frame size allowed on end-to-end connection, fragmentation 
     initiated at source and reassembled and destination, or packet set at
     1280 octets maximum.

   Does not have header checksum, assumes checksums in payload will catch
     erros. Also, because Hop count (TTL) changes at each hop, new checksum
     had to be generated. 
  
   Supports Jumbograms up to 4GiB but useful only on local network where all
     devices support it. (IPv6 restricts fragmentation.)
 
   Privacy - supports generation of virtual IPv6 address for different tasks
     to prevent an outsider from being able to track a user's general system
     use by observing his IPv6 packets. Only helpful if many hosts on local
     network.

Format
  Version
  Traffic Class
  Flow Lable
  Payload Length
  Next Header - optional headers?
  Hop Limit (TTL)
  Source Address
  Destination Address