Networking Essentials: The Internet Protocol - Detailed Notes

Module Objectives

  • Module Title: The Internet Protocol
  • Module Objectives:
    • Explain the features of an IP address.

Purpose of an IPv4 Address

  • An IPv4 address is a logical address that identifies a host on a network.
  • Must be unique within the LAN and the global internet.
  • Assigned to devices like workstations, servers, printers, and routers.
  • Every packet on the internet contains both source and destination IPv4 addresses critical for routing.

Binary Conversion of an IPv4 Address

  • An IPv4 address consists of 32 binary bits grouped into four octets (8 bits each).
  • Dotted-decimal notation is used for readability, e.g., 192.168.1.5 corresponds to binary 11000000 10101000 00000001 00000101.
Binary to Decimal Conversion
  • Conversion of binary to decimal is essential for human understanding:
    • Each octet has a value depending on the binary positions (1, 2, 4, 8, 16, 32, 64, 128).
    • Examples:
    • 00000000 = 0
    • 11111111 = 255
    • 00100111 = 39 (32 + 4 + 2 + 1)

The IPv4 Address Structure

  • IPv4 address is split into network and host portions.
  • Example: For 192.168.5.11/255.255.255.0:
    • Network: 192.168.5 (first three octets)
    • Host: 11 (last octet)
  • Hierarchical addressing lets routers focus on networks, not individual hosts.
Logical AND for Network Identification
  • A logical AND operation is used to determine the network address:
    • 1 AND 1 = 1, others result in 0.
  • Example with 192.168.10.10 and 255.255.255.0.
Subnet Masks
  • Subnet masks define the network and host segments.
  • Important subnet masks include:
    • 255.0.0.0 (8 bits)
    • 255.255.0.0 (16 bits)
    • 255.255.255.0 (24 bits)
  • Calculation for maximum hosts:
    • Hosts = 2^host_bits - 2 (for network and broadcast addresses).

Classful IPv4 Addressing

  • IPv4 addresses are categorized into classes:
    • Class A: 0.0.0.0 - 127.255.255.255 (over 16M hosts)
    • Class B: 128.0.0.0 - 191.255.255.255 (up to 65k hosts)
    • Class C: 192.0.0.0 - 223.255.255.255 (up to 254 hosts)
    • Class D: Multicast addresses
    • Class E: Experimental addresses

Public and Private IPv4 Addresses

  • Public IPv4 Addresses: Globally routable and unique.
  • Private IPv4 Addresses: Non-unique, used internally; ranges:
    • 10.0.0.0/8
    • 172.16.0.0/12
    • 192.168.0.0/16
  • Address translation (NAT) is crucial for internet accessibility of private addresses.

Unicast, Broadcast, and Multicast Addresses

  • Unicast: One-to-one communication; packets sent to specific device addresses.
  • Broadcast: Sent to all devices in a network, using a broadcast address (e.g., 255.255.255.255).
  • Multicast: Sent to a selected group of hosts subscribed to a multicast group, using addresses from 224.0.0.0 to 239.255.255.255.
Summary of Transmission Types
  • Unicast:
    • Useful for client-server and peer-to-peer communication.
  • Broadcast:
    • Routers typically don’t forward broadcasts; limited broadcasts go to all devices on the local network.
  • Multicast:
    • Efficient for services like streaming, allowing traffic reduction by sending one packet to multiple clients.