An IP address (Internet Protocol address) is the “home address” of a device on a network. It allows data packets to be routed from sender to receiver. Today, there are two versions: IPv4 and IPv6. Below is a clear explanation of both formats.
1) IPv4 – Dotted-Decimal Notation (e.g., 192.168.1.42)
Format: Four numbers separated by dots.
Range of each number (octet): 0–255.
Total bits: 32 bits (4 × 8 bits) → about 4.29 billion possible addresses.
Structure
Octets (four numbers): each represents 8 bits. Example:
192.168.1.42192 = first octet
168 = second
1 = third
42 = fourth
Meaning of the numbers
An IPv4 address is usually divided into a network part and a host part. How many bits are used for the network and how many for the host is defined by the subnet mask.
Subnet mask looks like:
Decimal: e.g.,
255.255.255.0Or CIDR notation: e.g.,
/24(means first 24 bits are the network part).
Example:
Address:
192.168.1.42Mask:
/24≡255.255.255.0Network:
192.168.1.0/24Host part:
.42identifies the specific device in the networkBroadcast:
192.168.1.255(message sent to all devices in the network)
In short: the earlier octets usually describe the network, the last octet(s) identify the device.
Common IPv4 ranges
Private addresses (for local networks):
10.0.0.0/8172.16.0.0/12(172.16.0.0–172.31.255.255)192.168.0.0/16
Loopback:
127.0.0.1APIPA (when DHCP fails):
169.254.0.0/16Multicast:
224.0.0.0–239.255.255.255Default route:
0.0.0.0
2) IPv6 – Eight Hexadecimal Groups (e.g., 2001:db8:85a3:0:0:8a2e:370:7334)
Format: 8 groups of hexadecimal numbers (0–9 and a–f) separated by colons.
Total bits: 128 bits → enormous address space.
Shortening rules
Leading zeros can be omitted:
03af→3af.One sequence of consecutive
:0:can be replaced by::(only once).Example:
2001:0db8:0000:0000:0000:8a2e:0370:7334
→2001:db8::8a2e:370:7334
Structure
IPv6 address = prefix (network part) + interface ID (host part).
Prefix length is written in CIDR notation: e.g.,
2001:db8:abcd::/64/64means: first 64 bits = network, last 64 bits = device ID.
Common IPv6 ranges
Link-local:
fe80::/10(valid only on local link)Unique local (private):
fc00::/7(commonlyfdxx::/8)Loopback:
::1
3) Are IPs “human-readable”?
IPv4 is somewhat readable (four numbers), but the numbers don’t have geographic or semantic meaning. They are only identifiers for routing. This is why we use DNS (
www.example.com→93.184.216.34) to map names to numbers.IPv6 is even harder to remember due to length and hex format, but follows the same principle.
4) Who assigns IP addresses?
Public IP address (the one your router uses on the internet) is usually assigned by your ISP via DHCP, or statically if contracted.
Private/local IP addresses inside your home/office are assigned by your router (also using DHCP) to devices like phones, laptops, or TVs.
5) Examples
IPv4 example
Address:
10.0.5.23Mask:
/16≡255.255.0.0Network:
10.0.0.0/16Host part:
.5.23identifies the deviceBroadcast:
10.0.255.255
IPv6 example
Address:
fd12:3456:789a:1::b3Prefix:
/64→fd12:3456:789a:1::/64Interface ID:
::b3identifies the deviceNote:
fd…indicates a unique-local (private) address.
6) Key notes for practice
Default gateway = your router’s IP (e.g.,
192.168.1.1).DNS servers map names to IPs (e.g.,
8.8.8.8,1.1.1.1).NAT allows multiple devices in your LAN to share one public IPv4 address.
CIDR is the standard notation today, instead of old A/B/C classes.
Summary
IPv4:
a.b.c.d(0–255), 32 bits, divided into network + host by subnet mask (/n).IPv6:
x:x:x:x:x:x:x:x, 128 bits, divided into prefix/n+ interface ID.Numbers are for routing, not human meaning. We rely on DNS for names.
Public IPs are assigned by ISPs, private IPs by your router.

Comments
Post a Comment