Internet Protocol: IPv4, IPv6, and MAC Addresses

  • IP Address (Internet Protocol)

    • A unique identifier that identifies a device on the Internet.
    • IP stands for Internet Protocol, which is a set of rules dictating how communication is sent and its destination.
    • IP Address Assignment: Provided by the Internet Service Provider (ISP) to both the network and individual devices.
    • Dynamic Nature: IP addresses can change automatically, often by the ISP.
  • IPv4 (Internet Protocol Version 4)

    • The most commonly used version in today's networks.
    • Utilizes TCP (Transmission Control Protocol) and IP for communication.
    • Finding Your IPv4 Address: Open the command prompt and type ipconfig (no space) to display network configuration, including the IPv4 address.
    • Random IPv4 Examples: 192.168.0.1, 192.168.1.1.
    • Types of IPv4 Addresses:
      • Public IP Address: Provided by the ISP, used for communication across the Internet.
      • Private IP Address: Used within a Local Area Network (LAN) for communication between devices without connecting to the Internet.
  • IPv4 Address Structure: Octets and Binary Conversion

    • IPv4 addresses consist of four octets.
    • An octet refers to 88 bits of digital information.
    • Each octet can represent a number from 00 to 255255, allowing for 256256 unique numbers (including zero).
    • Computer Understanding: Computers only understand binary language (00s and 11s). Therefore, all decimal numbers in an IP address are converted into binary.
    • Binary to Decimal Conversion:
      • A table of place values is used: (128,64,32,16,8,4,2,1128, 64, 32, 16, 8, 4, 2, 1).
      • To convert a binary number to decimal, sum the place values where a '11' appears in the binary sequence.
      • Example 1: Convert binary 10001001 to decimal:
        • 1imes128+0imes64+0imes32+0imes16+1imes8+0imes4+0imes2+1imes1=128+8+1=1371 imes 128 + 0 imes 64 + 0 imes 32 + 0 imes 16 + 1 imes 8 + 0 imes 4 + 0 imes 2 + 1 imes 1 = 128 + 8 + 1 = 137
      • Example 2: Convert binary 11111111 to decimal:
        • 1imes128+1imes64+1imes32+1imes16+1imes8+1imes4+1imes2+1imes1=2551 imes 128 + 1 imes 64 + 1 imes 32 + 1 imes 16 + 1 imes 8 + 1 imes 4 + 1 imes 2 + 1 imes 1 = 255
    • Decimal to Binary Conversion:
      • To convert a decimal number to binary, find the largest place value (128,64,32,extetc.128, 64, 32, ext{etc.}) that is less than or equal to the decimal number, put a '11' in that position, subtract the value, and repeat for the remainder.
      • Example 1: Convert decimal 6464 to binary:
        • 6464 fits into 6464 (put 11 at 6464's position, remainder is 00). Others are 00.
        • Result: 01000000
      • Example 2: Convert decimal 6565 to binary:
        • 6565 fits 6464 (put 11 at 6464's position, remainder is 11).
        • 11 fits 11 (put 11 at 11's position, remainder is 00).
        • Result: 01000001
      • Example 3: Convert decimal 252252 to binary:
        • 252=128+64+32+16+8+4252 = 128 + 64 + 32 + 16 + 8 + 4
        • Result: 11111100
  • Parts of an IPv4 Address

    • Network Part:
      • Indicates the distinctive variety assigned to a network.
      • Analogy: Represents a city (e.g., London, Birmingham).
      • Typically, the first three octets of an IP address (e.g., 192.168.1.xxx for London, 192.168.2.xxx for Birmingham) determine the network.
      • Allows for tracking an IP address to a specific network.
    • Host Part:
      • Uniquely identifies a machine or device on a network.
      • Analogy: Represents a house number within a city.
      • While the network part remains the same for all hosts on that network, the host part must vary for each device.
      • For example, in 192.168.1.70, 70 is the host part.
      • By default, the last octet is often considered the host part, but the division can be more flexible (e.g., two octets as network, two as host, or even half an octet).
    • Subnet Part (Non-Obligatory in IPv4 discussion):
      • An optional part used to further divide the host part of an IP address.
      • Analogy: Represents rooms within a house.
      • Used when a network has many users, allowing for further segmentation of the host part to create more space or organize the network more effectively. This concept will be covered in detail in future lessons.
  • Advantages and Disadvantages of IPv4

    • Advantages: Secure, relatively easy to attach multiple devices.
    • Disadvantages:
      • High system management complexity/prices.
      • Labor-intensive and complex to manage at scale.
      • Low scalability, especially with the rapid increase in the number of digital devices (mobile phones, laptops, smart devices, robots, online agents).
      • The number of possible IPv4 addresses is a significant limitation.
  • IPv4 vs. IPv6

    • IPv4:
      • Uses 3232 bits.
      • Supports approximately 4.34.3 billion (4.3imes1094.3 imes 10^9) unique addresses.
      • This number is becoming insufficient due to the proliferation of internet-connected devices.
      • Uses dots (.) as separators (e.g., 192.168.1.1).
    • IPv6:
      • Introduced to overcome the address limitations of IPv4.
      • Uses 128128 bits.
      • Supports approximately 340340 undecillion (3.4imes10383.4 imes 10^{38}) unique addresses, an