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 bits of digital information.
- Each octet can represent a number from to , allowing for unique numbers (including zero).
- Computer Understanding: Computers only understand binary language (s and s). Therefore, all decimal numbers in an IP address are converted into binary.
- Binary to Decimal Conversion:
- A table of place values is used: ().
- To convert a binary number to decimal, sum the place values where a '' appears in the binary sequence.
- Example 1: Convert binary
10001001to decimal: - Example 2: Convert binary
11111111to decimal:
- Decimal to Binary Conversion:
- To convert a decimal number to binary, find the largest place value () that is less than or equal to the decimal number, put a '' in that position, subtract the value, and repeat for the remainder.
- Example 1: Convert decimal to binary:
- fits into (put at 's position, remainder is ). Others are .
- Result:
01000000
- Example 2: Convert decimal to binary:
- fits (put at 's position, remainder is ).
- fits (put at 's position, remainder is ).
- Result:
01000001
- Example 3: Convert decimal to binary:
- 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.xxxfor London,192.168.2.xxxfor 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,70is 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.
- Network Part:
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 bits.
- Supports approximately billion () 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 bits.
- Supports approximately undecillion () unique addresses, an
- IPv4: