13 min total

Computer Networking

IPv4 and IPv6 addressing

IPv4 and IPv6 addressing

Ipv4 Datagram format

  1. Version number (4bits):
    Specifies IP protocol version, different IP versions use different datagram formats. Allows Router to deal with
  2. Header length (4bits):
    Since IPv4 datagram may contain variable options, header length is needed to understand from where does transport layer segment begins
  3. Type Of Service
    Allows to differentiate different types of IP datagrams to be distinguished from each other. For eg useful in distinguishing real time datagrams from non-real time traffic
  4. Datagram length:
    total length of IP datagram measured in bytes
  5. Identifier, flags, fragmentation offset:
    these three fields are related to IP fragmentation, large IP datagram is broken into several smaller IP datagrams which are sent separately to the destination
  6. Time to live
    Field ensures that IP datagrams do not circulate forever in the network

Field decrements by one each time datagram is processed by a router.
TTL reaches 0, router drops the datagram

  1. Protocol
    defines the transport layer protocol being used to which IP datagram should be passed to (TCP ya UDP)
  2. Header checksum

Detects bit errors in IP datagram. Sum each 2 bytes in the header and perform 1s complement this checksum is known as internet checksum

Router computes header checksum for each received IP datagram

  1. Source and destination IP Addresses
    source inserts src IP address and inserts dest IP address in the packet
  2. Options
    some IP datagrams may allow options and some may not, due to which one cannot determine clearly where the datafield would start. IP options are not included in IPv6 headers
  3. Data(Payload)

Contains the transport layer segment to be delivered

CN / Chap 4 — IPv4 and IPv6 addressing
CN / Chap 4 — IPv4 and IPv6 addressing
CN / Chap 4 — IPv4 and IPv6 addressing — notes
CN / Chap 4 — IPv4 and IPv6 addressing — notes
CN / Chap 4 — IPv4 and IPv6 addressing — notes
CN / Chap 4 — IPv4 and IPv6 addressing — notes