0% found this document useful (0 votes)
4 views5 pages

IP Addressing Guide

This guide provides a comprehensive overview of IP addressing, starting from the basics of number systems and binary representation to the complexities of IPv4 and IPv6 addressing. It explains the structure of IP addresses, the concept of subnet masks, and the differences between public and private IP addresses, as well as how devices obtain their IP addresses through DHCP. The document also covers the transition from IPv4 to IPv6 due to address exhaustion and includes a quick reference summary of key concepts.

Uploaded by

jboro492
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views5 pages

IP Addressing Guide

This guide provides a comprehensive overview of IP addressing, starting from the basics of number systems and binary representation to the complexities of IPv4 and IPv6 addressing. It explains the structure of IP addresses, the concept of subnet masks, and the differences between public and private IP addresses, as well as how devices obtain their IP addresses through DHCP. The document also covers the transition from IPv4 to IPv6 due to address exhaustion and includes a quick reference summary of key concepts.

Uploaded by

jboro492
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

IP Addressing — Complete Guide

IP Addressing
A Complete Guide — from Binary to IPv6

This guide starts from the very foundation of how numbers work in computers and builds all the way up
to how billions of devices communicate across the globe.

Part 1 — Understanding Numbers

The Decimal System


You use 10 digits: 0–9. When you count past 9 you start a new column to the left — this is place value. Look
at 365:

3 × 100 + 6 × 10 + 5 × 1 = 365

Each column is 10 times the column to its right (1, 10, 100 …). This is called base 10.

The Binary System


Computers are made of billions of tiny electronic switches. Each switch has exactly two states: OFF (0) or
ON (1). So computers count with only 2 digits — this is base 2, or binary. Place values are powers of 2:

20=1 21=2 22=4 23=8 24=16 25=32 26=64 27=128

Binary → Decimal: 10110101

2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0

1 0 1 1 0 1 0 1

128 0 32 16 0 4 0 1

128 + 32 + 16 + 4 + 1 = 181
bit = 1 (active) bit = 0 (inactive)

What Is a Bit?
A bit is a single binary digit — a 0 or 1. With 8 bits you can represent 28 = 256 values (0 through 255). Eight
bits grouped together is called a byte or octet — the crucial building block of IP addresses.

Part 2 — What Is a Network & Why Do Devices Need Addresses?

A computer network is a group of devices connected together. When your laptop wants to send a message
to your printer it needs to know which device is the printer. Every device needs a unique address — just like
every house on a street has a unique number. That address is the IP address (Internet Protocol).

Page 1
IP Addressing — Complete Guide

Part 3 — IPv4: Internet Protocol Version 4

An IPv4 address is 32 bits long, split into 4 groups of 8 bits (4 octets) separated by dots. Each octet can
hold a value from 0 to 255.

IPv4 Address Structure: [Link]

192 . 168 . 1 . 105


11000000 10101000 00000001 01101001

Octet 1 Octet 2 Octet 3 Octet 4


Each octet: 8 bits → values 0–255 | Total: 32 bits

Total possible IPv4 addresses: 232 = 4,294,967,296 — just over 4 billion. With billions of devices today we
ran out, which is why IPv6 was invented.

Part 4 — Network vs Host: Two Parts of an IP Address

An IP address contains two pieces of information:

1. Network part — which network the device is on (like which street you live on)

2. Host part — which specific device on that network (like your house number)

How do we know where the network part ends and the host part begins? The subnet mask tells us.

Part 5 — Subnet Mask: The Dividing Line

A subnet mask is a 32-bit number that marks which bits are the 'network' part and which are the 'host' part.
Where the mask has a 1 → network bit; where it has a 0 → host bit.

Subnet Mask Applied: [Link] / [Link]

IP Address11000000 10101000 00000001 01101001


192 168 1 105

Subnet Mask
11111111 11111111 11111111 00000000
255 255 255 0

NETWORK (192.168.1) HOST (.105)

Network: [Link] | Broadcast: [Link] | Usable hosts: 254 (256 − 2)

Part 6 — CIDR Notation

Writing out [Link] every time is tedious. CIDR notation (Classless Inter-Domain Routing) simply
counts the number of 1-bits in the mask:

Page 2
IP Addressing — Complete Guide

[Link] → 11111111.11111111.11111111.00000000 → 24 ones → /24

So instead of writing the full mask you write: [Link]/24. The /24 means: 'the first 24 bits are the
network part.'

Part 7 — Classes of IP Addresses

Before CIDR, IPv4 addresses were divided into fixed classes based on the leading bits. You still see these
terms frequently.

IPv4 Address Classes

Class A [Link] – [Link] 126 networks, 16M hosts each


/8
Class B [Link] – 191.255.255.25516K networks, 65K hosts each
/16
Class C [Link] – [Link]
2M networks, 254 hosts each
/24
Class D Multicast

Class E Reserved / Experimental

Part 8 — Special & Reserved IP Addresses

Special & Reserved IP Ranges

Range / CIDR Type Purpose


[Link]/8 Private (Class A) Home/corporate LANs
[Link]/12 Private (Class B) Home/corporate LANs
[Link]/16 Private (Class C) Most home routers
[Link]/8 Loopback Device talks to itself (::1)
[Link]/16 Link-local (APIPA) No DHCP found
[Link] Limited Broadcast All devices on LAN
The private ranges (10.x, 172.16–31.x, 192.168.x) are used inside your home network. They are not
routable on the public internet — your router translates them using NAT.

Part 9 — Public vs Private IP & NAT

At home your devices have private IPs like [Link], but when visiting a website that site sees a public
IP assigned to your router by your ISP. This translation is called NAT (Network Address Translation).

Your Device private IP Home Router public IP Internet /


[Link] NAT [Link]

Router rewrites source IP: [Link] → [Link] (outbound) and reverses on reply (inbound).

Page 3
IP Addressing — Complete Guide

Part 10 — IPv6: The Solution to Address Exhaustion

IPv6 is 128 bits long — four times IPv4. It uses hexadecimal (base 16: digits 0–9 and A–F) arranged in 8
groups of 4 separated by colons.

IPv6 Address Structure: 2001:0db8:85a3:0000:0000:8a2e:0370:7334

2001 : 0db8 : 85a3 : 0000 : 0000 : 8a2e : 0370 : 7334

8 groups × 4 hex digits = 128 bits | Each hex digit = 4 bits | Compressed: 2001:db8:85a3::8a2e:370:7334
Total addresses: 2 (128th power) ≈ 340 undecillion — enough for every grain of sand on Earth × billions

IPv6 shorthand rules:

• Leading zeros in a group can be dropped: 0db8 → db8

• One consecutive run of all-zero groups can be replaced with :: (only once)

2001:0db8:0000:0000:0000:0000:0000:0001 → 2001:db8::1

Part 11 — How Devices Get Their IP Addresses (DHCP)

There are two ways a device gets an IP address:

Static (Manual) — A human types in an address. Common for servers, printers, and routers that need a fixed
address.

Dynamic via DHCP (Dynamic Host Configuration Protocol) — Used by most home devices. The four-step
handshake:

Your Phone Router/DHCP

1 DISCOVER
Phone → all: "Any DHCP server?"
2 OFFER
Router → Phone: "Take [Link]"
3 REQUEST
Phone → Router: "Yes, I'll take it"
4 ACK
Router → Phone: IP + mask + gateway + DNS

The router assigns the address for a set time called a lease. The device renews it before expiry; if it
disconnects the address returns to the pool.

Part 12 — The Full Picture: Typing [Link]

Step What Happens

1 Your device has IP [Link] (private, from DHCP)

2 Your router has public IP [Link] (from ISP)

3 Browser asks DNS server to resolve [Link] → [Link]

4 Device sends packet to [Link] with private IP as source

Page 4
IP Addressing — Complete Guide

5 Router does NAT — replaces private IP with [Link], sends to internet

6 Google's server receives request from [Link], sends reply back

7 Router checks NAT table, forwards reply to [Link]

8 Browser renders the page

Quick Reference Summary

Concept What it means

Bit Single binary digit: 0 or 1

Byte / Octet 8 bits grouped together

IPv4 32-bit address, written as 4 decimal octets (e.g. [Link])

IPv6 128-bit address, written as 8 hex groups (e.g. 2001:db8::1)

Subnet mask Divides an IP into network + host parts

CIDR /24 First 24 bits = network; last 8 bits = hosts (254 usable)

Private IP 10.x, 172.16–31.x, 192.168.x — only usable inside your LAN

Public IP Globally unique, assigned by ISP, visible on the internet

DHCP Protocol that auto-assigns IP addresses to devices

NAT Router translates private IPs to one public IP and back

Loopback [Link] — your device talking to itself

Broadcast [Link] or last address in subnet — sends to all devices

Page 5

You might also like