🧠 IP Addressing
Addressing is a critical function of network layer protocols and enables data communication between hosts. Both IPv4 and IPv6 provide hierarchical addressing.
🌍 What is IPv4?
IPv4 is the fourth version of the Internet Protocol and uses a binary numbering system. IPv4 addresses consist of 32 binary bits, grouped into four 8-bit octets, separated by dots.
Example: 192.168.1.1 is a common IPv4 address format (in dotted decimal).
Tip: Run ipconfig
in Windows Command Prompt to see your current IPv4 address.
🔢 Converting Binary to Decimal
To convert the binary number 01101101
to decimal, we align it with powers of 2, from 27 to 20, and add up the values for bits that are 1.
Result: 109
Exercise: Convert binary 11001010
to decimal. (Answer at the bottom.)
🏗️ IPv4 Address Structure
All devices in the same network must share the same network portion of the address, while the host portion must be unique. The subnet mask defines how the address is split.
🧮 Subnet Masks
A subnet mask is a 32-bit number. The bits set to "1" represent the network portion, and the bits set to "0" represent the host portion.
Example: 255.255.255.0
corresponds to /24
CIDR notation.
✅ Conclusion
Understanding IPv4 is crucial for any networking professional. We’ve discussed address structure, binary math, and subnet masks. While IPv4 is still in use, IPv6 is its successor and offers greater scalability.
Answer: Binary 11001010
= Decimal 202