Monday, February 07, 2011

Frame/Packet Format

IP Packet

screenshot-51

Internet Protocol (IP) Packet Format

The Internet Protocol specified in RFC 791 defines the IP packet format. The IP packet header has specific fields that contain information about the packet and about the sending and receiving hosts. Below is a list of the fields in the IP header and a brief description for each one.

  • Version - Version number (4 bits); predominant version is IP version 4 (IPv4)
  • IP header length - Header length in 32-bit words (4 bits)
  • Precedence and type of service - How the datagram should be handled (8 bits); the first 3 bits are precedence bits (this use has been superseded by Differentiated Services Code Point [DSCP], which uses the first 6 bits [last 2 reserved])
  • Packet length - Total length (header + data) (16 bits)
  • Identification - Unique IP datagram value (16 bits)
  • Flags - Controls fragmenting (3 bits)
  • Fragment offset - Supports fragmentation of datagrams to allow differing maximum transmission units (MTUs) in the Internet (13 bits)
  • Time to Live (TTL) - Identifies how many routers can be traversed by the datagram before being dropped (8 bits)
  • Protocol - Upper-layer protocol sending the datagram (8 bits)
  • Header checksum - Integrity check on the header (16 bits)
  • Source IP address - 32-bit source IP address (32 bits)
  • Destination IP address - 32-bit destination IP address (32 bits)
  • IP options - Network testing, debugging, security, and others (0 or 32 bits, if any)

Header Length without options is 20 bytes or 160 bits.

The Layer 3 IP packet is encapsulated in the Layer 2 data link frame associated with that interface.

  • Preamble - Seven bytes of alternating 1s and 0s, used to synchronize signals
  • Start-of-frame (SOF) delimiter - 1 byte signaling the beginning of the frame
  • Destination address - 6 byte MAC address of the sending device on the local segment
  • Source address - 6 byte MAC address of the receiving device on the local segment
  • Type/length - 2 bytes specifying either the type of upper layer protocol (Ethernet II frame format) or the length of the data field (IEEE 802.3 frame format)
  • Data and pad - 46 to 1500 bytes of data; zeros used to pad any data packet less than 46 bytes
    Frame check sequence (FCS) - 4 bytes used for a cyclical redundancy check to make sure the frame is not corrupted

No comments:

Post a Comment